Now, it is time to combine the function written in the previous section with what you learned about imtool
in the previous chapter, in order to pinpoint the areas of the image where adapthisteq
provides superior results. The following steps will help you combine the functions:
First, let's load the image we will be using:
>> img = imread('holiday_image2.bmp');
Then you should enhance the image using the two versions of histogram equalization:
>> img_he = ContrastEnhancement(img,1); >> img_ahe = ContrastEnhancement(img,3);
Now, let's use
imtool
for the first and second result:>> imtool(img_he) >> imtool(img_ahe)
First, we zoom in using the magnifying glass icon with the plus sign. Once selected, we use the mouse to select the parts in the two images where
adapthisteq
enhances details more (we can enter the same zoom factor):Then, we zoom out and zoom in on again the left area of the image so that we pinpoint the...