Skip to content

equ_histo_imageEquHistoImageEquHistoImageequ_histo_imageequ_histo_image🔗

Short description🔗

equ_histo_imageEquHistoImageEquHistoImageequ_histo_imageequ_histo_image — Histogram linearization of images

Signature🔗

equ_histo_image( image Image, out image ImageEquHisto )void EquHistoImage( const HObject& Image, HObject* ImageEquHisto )static void HOperatorSet.EquHistoImage( HObject image, out HObject imageEquHisto )def equ_histo_image( image: HObject ) -> HObject

Herror equ_histo_image( const Hobject Image, Hobject* ImageEquHisto )

Herror T_equ_histo_image( const Hobject Image, Hobject* ImageEquHisto )

HImage HImage::EquHistoImage( ) const

HImage HImage.EquHistoImage( )

Description🔗

The operator equ_histo_imageEquHistoImage enhances the contrast. The starting point is the histogram of the input images. The following simple gray value transformation \(f(g)\) is carried out for byte images:

\[\begin{eqnarray*} f(g) = 255 \sum_{x=0\dots g} { h(x) } \end{eqnarray*}\]

\(h(x)\) describes the relative frequency of the occurrence of the gray value \(x\). For uint2 images, the only difference is that the value 255 is replaced with a different maximum value. The maximum value is computed from the number of significant bits stored with the input image, provided that this value is set. If not, the value of the system parameter 'int2_bits'"int2_bits" is used (see set_systemSetSystem), if this value is set (i.e., different from -1). If none of the two values is set, the number of significant bits is set to 16.

This transformation linearizes the cumulative histogram. Maxima in the original histogram are “spreaded” and thus the contrast in image regions with these frequently occurring gray values is increased. Supposedly homogeneous regions receive more easily visible structures. On the other hand, of course, the noise in the image increases correspondingly. Minima in the original histogram are dually “compressed”. The transformed histogram contains gaps, but the remaining gray values used occur approximately at the same frequency (“histogram equalization”).

Attention🔗

The operator equ_histo_imageEquHistoImage primarily serves for optical processing of images for a human viewer. For example, the (local) contrast spreading can lead to a detection of fictitious edges.

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

  • Automatically parallelized on channel level.

Parameters🔗

Imageimageimage (input_object) (multichannel-)image(-array) → object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject (byte / uint2)

Image to be enhanced.

ImageEquHistoimageEquHistoimage_equ_histo (output_object) (multichannel-)image(-array) → object (byte / uint2)HObject (byte / uint2)HImage (byte / uint2)HObject (byte / uint2)Hobject * (byte / uint2)

Image with linearized gray values.

Combinations with other operators🔗

Combinations

Possible successors

disp_imageDispImage

Alternatives

equ_histo_image_rectEquHistoImageRect, scale_imageScaleImage, scale_image_maxScaleImageMax, illuminateIlluminate

See also

equ_histo_image_rectEquHistoImageRect, scale_imageScaleImage

References🔗

R.C. Gonzales, P. Wintz: “Digital Image Processing”; Second edition; Addison Wesley; 1987.

Module🔗

Foundation