System object: vision.ContrastAdjuster
Package: vision

Adjust contrast in input image


Y = step(H,X)


Y = step(H,X) performs contrast adjustment of input X and returns the adjusted image Y.

    Note:   H specifies the System object™ on which to run this step method.

    The object performs an initialization the first time the step method is executed. This initialization locks nontunable properties and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the release method to unlock the object.

Enhance Image Quality Using Contrast Adjuster

Create a contrast adjuster object.

hcontadj = vision.ContrastAdjuster;

Read an image.

x = imread('pout.tif');

Apply the contrast adjuster to the image using the object's step method.

y = step(hcontadj,x);

Display the original and enhanced image.

imshow(x); title('Original Image');
title('Enhanced image after contrast adjustment');

Was this topic helpful?