|Image Processing Toolbox User's Guide|
3. Improve Image Contrast
pout.tif is a somewhat low contrast image. To see the distribution of intensities in
pout.tif, you can create a histogram by calling the
imhist function. (Precede the call to
imhist with the
figure command so that the histogram does not overwrite the display of the image
I in the current figure window.)
Notice how the intensity range is rather narrow. It does not cover the potential range of [0, 255], and is missing the high and low values that would result in good contrast.
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.
Display the new equalized image,
I2, in a new figure window.
Equalized Version of pout.tif
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
The toolbox includes several other functions that perform contrast adjustment, including the
adapthisteq functions. See Intensity Adjustment for more information. In addition, the toolbox includes an interactive tool, called the Adjust Contrast tool, that you can use to adjust the contrast and brightness of an image interactively. To start this tool, call the
imcontrast function. For more information, see Adjusting the Contrast and Brightness of an Image.
|2. Check How the Image Appears in the Workspace||4. Write the Image to a Disk File|
© 1994-2005 The MathWorks, Inc.