| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
cmap = contrast(X)
cmap = contrast(X,m)
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.
cmap = contrast(X,m) returns an m-by-3 gray colormap.
Add contrast to the clown image defined by X.
load clown; cmap = contrast(X); image(X); colormap(cmap);
Color Operations for related functions
![]() | contourslice | conv | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |