Tip #39Kinesense LE

How to use histogram edit and histogram equalisation

Bring out detail with manual histogram editing, global equalisation, and local equalisation for scenes with both bright and dark areas.

Patricia McCabeSoftware Engineer

Kinesense: The Clarification Chronicles continues with Histograms this week. A histogram is a graphical representation of the tonal distribution in an image. In Kinesense there are three different options that can be accessed from the histogram clarification Histogram button

Histogram Edit

Histogram Edit with the sliders narrowed to the concentrated part of the histogram, turning a washed-out scene clear.

Histogram Edit allows the manual tuning of the image transform. It can be used to bring out specific features of an image.

The Histogram Edit graph with sliders on either side of the main peak.

Histogram Edit provides the selected transform algorithm with the same target values for each colour channel. You have the option to edit these channels individually. Moving the sliders on the bottom to just include the concentrated information will clear up the image. You also have the option to use either Linear or Histogram transform.

Histogram Equalisation

A low-contrast viewing platform scene before and after histogram equalisation.

This option can bring out general detail in an image. It is a pre-configured algorithm that will attempt to stretch the contrast of the image via an analysis of it’s histogram. It differs from contrast stretch by using a non-linear transform function.

Histogram Local Equalisation

A test image of grey and coloured circles before and after local histogram equalisation reveals hidden stars and the word HELLO.

Local Histogram runs a small window over the image and carries out the equalisation process on each section of the image – this means that if you have an image with both light and dark regions, each region will be equalised separately. This is used when you wish to examine areas of over or under exposure within a scene for additional detail where a general histogram equalisation is insufficient.

The local histogram equalisation options: sample box radius, diamond sample, global peak, filter histograms, pyramid weighting and contrast limiting.

The options for Local Histogram are as follows:

**Radius =**size of the window

**Pyramid Weighting =**This defines the profile of the window. The standard option is to treat all samples within the box equally when calculating the histogram. Pyramid weighting gives more importance to the samples closest to the pixel. At a Pyramid Weighting value of 1 the sample co-located with the pixel has a value of 2xRadius, and a sample at one Radius distance has a value of one Radius. Lowering the Pyramid Weighting increases the importance of the samples closer to the pixel.

Pyramid weighting provides some smoothing to the HLW effect and can reduce the effect of haloing.

Global Peak= Limits the stretch to an image wide max. Good when the image has both bright and dark regions.

Diamond Sample= Window is rotated 45 degrees

Filter Histograms= The histogram modification uses the peak value found within the sample to set an upper limit. Filter Histogram removes the top n percent of samples from this calculation. The purpose of this is to mitigate the effects of noisy pixels on the calculation and is particularly effective when there are noisy pixels in an otherwise homogeneous area. NOTE: Global peak and Filter Histogram are mutually exclusive. Filter Histogram is performed before Contrast Limiting.

Contrast Limiting= Contrast limiting smooths the histogram by trimming any scores above a given value and redistributing the excess across the rest of the histogram. The intended effect is to reduce the effect of peaks from areas with a strong homogeneity.

For more in depth reading on this subject check out Histogram Equalization

Next week we’ll have a quiz to see if you’ve been paying attention!

Format support

3000+ video formats

Anything playable in Windows Media Player, VLC or FFmpeg is supported, without the manufacturer's original player. Have a format that isn't listed? Our engineers have 17 years experience of dealing with difficult formats.