Question
1 Create a MATLAB function named histogramEqualization() to enhance a low contrast image. a. Create the function header of histogramEqualization() with a lower constrast gray-level
1\ Create a MATLAB function named histogramEqualization() to enhance a low contrast image.
a. Create the function header of histogramEqualization() with a lower constrast gray-level image (imG) as its input and an enhanced image (imE) as its output.
b. Obtain the histogram count (hisCounts) for the input image imG.
c. Calculate the cumulative histogram counts (cumCounts) based on the obtained histogram counts.
d. Obtain the total number of pixels (px_total) in the given input image.
e. Obtain the coordinates of Point 1, the lowest point in the equalized cumulative histogram, where its x-coordinate (x1) is bin 0 and y-coordinate (y1) is the count in the equalized histogram.
f. Obtain the coordinates for Point 2, the highest point in the equalized cumulative histogram, where its x-coordinate (x2) is bin 255 and y-coordinate (y2) is the total number of pixels in the given image.
g. Derivate the line equation based on the Point 1 and Point 2.
h. Map the pixel intensity from the original image to enhanced image using the line equation.
2. Create a MATLAB script named HW07.m to achieve your goals. In particular, in the script you need to
a. Read a low contrast image (imG) such as tire.tif.
b. Call histogramEqualization() function to enhance the low contrast image as imE.
c. In Figure Window 1, use subplot to display the following:
Original image with its histogram and cumulative histogram.
Enhanced image with its histogram and cumulative histogram.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started