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.

vision.HistogramEqualizer System object

Package: vision

Enhance contrast of images using histogram equalization

Description

    Note:   The vision.HistogramEqualizer System object will be removed in a future release. Use the histeq function with equivalent functionality instead.

The HistogramEqualizer object enhances contrast of images using histogram equalization.

    Note:   Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

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.

The HistogramEqualizer System object does not support variable size signals.

Introduced in R2012a

Was this topic helpful?