Documentation Center

  • Trial Software
  • Product Updates

vision.HistogramEqualizer System object

Package: vision

Enhance contrast of images using histogram equalization

Description

The HistogramEqualizer object enhances contrast of images using histogram equalization.

Construction

H = vision.HistogramEqualizer returns a System object, H. This object enhances the contrast of input image using histogram equalization.

H = vision.HistogramEqualizer(Name,Value) returns a histogram equalization object, H, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1, Value1,...,NameN,ValueN).

Code Generation Support
Supports MATLAB® Function block: Yes
System Objects in MATLAB Code Generation.
Code Generation Support, Usage Notes, and Limitations.

Properties

Histogram

How to specify histogram

Specify the desired histogram of the output image as one of Uniform | Input port | Custom. The default is Uniform.

CustomHistogram

Desired histogram of output image

Specify the desired histogram of output image as a numeric vector. This property applies when you set the Histogram property to Custom.

The default is ones(1,64).

BinCount

Number of bins for uniform histogram

Specify the number of equally spaced bins the uniform histogram has as an integer scalar value greater than 1. This property applies when you set the Histogram property to Uniform. The default is 64.

Methods

cloneCreate histogram equalizer object with same property values
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs from step method
isLockedLocked status for input attributes and nontunable properties
release Allow property value and input characteristics changes
stepPerform histogram equalization on input image

Examples

Enhance quality of an image:

 hhisteq = vision.HistogramEqualizer;
 x = imread('tire.tif');
 y = step(hhisteq, x);
 imshow(x); title('Original Image');
 figure, imshow(y); 
 title('Enhanced Image after histogram equalization');

Algorithms

This object implements the algorithm, inputs, and outputs described on the Histogram Equalization block reference page. The object properties correspond to the block parameters, except:

The Histogram property for the object, corresponds to both the Target Histogram and the Histogram Source parameters for the block.

See Also

Was this topic helpful?