Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Contrast Adjustment

Contrast adjustment, histogram equalization, decorrelation stretching

Contrast adjustment remaps image intensity values to the full display range of the data type. An image with good contrast has sharp differences between black and white.

To illustrate, the image on the left has poor contrast, with intensity values limited to the middle portion of the range. The image on the right has higher contrast, with intensity values that fill the entire intensity range [0, 255]. In the high contrast image, highlights look brighter and shadows look darker.

The functions described in this section apply primarily to grayscale images. However, some of these functions can be applied to color images as well. For information about how these functions work with color images, see the reference pages for the individual functions.

Functions

imadjustAdjust image intensity values or colormap
imadjustnAdjust intensity values in N-D volumetric image
imcontrastAdjust Contrast tool
imsharpenSharpen image using unsharp masking
locallapfiltFast Local Laplacian Filtering of images
localcontrastEdge-aware local contrast manipulation of images
localtonemapRender HDR image for viewing while enhancing local contrast
histeqEnhance contrast using histogram equalization
adapthisteqContrast-limited adaptive histogram equalization (CLAHE)
imhistmatchAdjust histogram of 2-D image to match histogram of reference image
imhistmatchnAdjust histogram of N-D image to match histogram of reference image
decorrstretchApply decorrelation stretch to multichannel image
stretchlimFind limits to contrast stretch image
intlutConvert integer values using lookup table
imnoiseAdd noise to image

Examples and How To

Adjust Image Contrast in Image Viewer App

You can adjust image contrast by manipulating the histogram of intensity values or by setting the window and level.

Adjust Image Intensity Values to Specified Range

This example shows how to increase the contrast in a grayscale image by remapping the data values to fill the entire available intensity range [0, 255].

Histogram Equalization

Histogram equalization adjusts image intensity automatically by mapping the histogram of the output images to a specified histogram.

Adaptive Histogram Equalization

Adaptive histogram equalization adjusts image intensity in small regions in the image.

Enhance Color Separation Using Decorrelation Stretching

Decorrelation stretching enhances the color separation of an image to improve visual interpretation and make feature discrimination easier.

Correct Nonuniform Background Illumination and Analyze Foreground Objects

This example shows how to enhance an image as a preprocessing step before analysis.

Concepts

Interactive Contrast Adjustment

The Adjust Contrast tool in Image Viewer app enables interactive constrast and brightness adjustment.

Gamma Correction

Gamma correction enables nonlinear mapping of intensity values during contrast adjustment.

Was this topic helpful?