Documentation

This is machine translation

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

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

contrast

Grayscale colormap for contrast enhancement

Syntax

cmap = contrast(X)
cmap = contrast(X,m)

Description

The contrast function enhances the contrast of an image. It creates a new gray colormap, cmap, that has an approximately equal intensity distribution. All three elements in each row are identical.

cmap = contrast(X) returns a gray colormap that is the same length as the current colormap. If there are NaN or Inf elements in X the length of the colormap increases.

cmap = contrast(X,m) returns an m-by-3 gray colormap.

Examples

collapse all

Load clown to get image X and its associated colormap, map. Display the image produced by X and map.

load clown
figure
image(X)
colormap(map)

Use contrast to return a gray colormap that is the same length as the current colormap, map. Display the image with the new colormap, cmap.

cmap = contrast(X);
colormap(cmap)

See Also

| |

Introduced before R2006a

Was this topic helpful?