M ATLAB L ECTURE 3 Histogram Processing
H ISTOGRAM E QUALIZATION The imhist function create a histogram that show the distribution of intensities in pout.tif. (figure command display the image a new window.) >>figure, imhist(I)
H ISTOGRAM E QUALIZATION The toolbox provides several ways to improve the contrast in an image. One way is to call the histeq function to spread the intensity values over the full range of the image, a process called histogram equalization. >>I2 = histeq(I);
H ISTOGRAM E QUALIZATION Display the new equalized image, I2, in a new figure window. >>figure, imshow(I2) Call imhist again to create a histogram of the equalized image I2. If you compare the two histograms, the histogram of I2 is more spread out than the histogram of I1. >>figure, imhist(I2)
E XAMPLE 2 As you see, the very dark image has a corresponding histogram heavily clustered at the lower end of the scale. But we can apply histogram equalization to this image, and display the results:
E XAMPLE 2 AFTER APPLYING HISTEQ >> ch=histeq(c); >> imshow(ch),figure,imhist(ch) results shown below: