Histogram transformation

The histogram transformation is a pixel-by-pixel intensity transformation that is defined by several parameters. The tool can be called from the toolbar at the bottom or from the Image processing menu.

Screen

  • Zoom

    Horizontal Zoom.

  • Midtone Transfer Function

    These are the 3 sliders needed to perform the transformation.

    Click on the "triangle", keep clicking and move the mouse to the desired position.

    Tip

    Using the zoom function at the top of this window can be useful.

  • Channels

    Show or hide the histogram of the selected channel

  • Grids

    Show histogram grids

  • Curve

    Show Midtone Transfer Function curve

  • Autostretch

    Apply autostretch algorithm to image

  • Logarithmic scale

    Tick this option to display histogram in logarithm scale.

  • Zoom to 1

    Reset zooms to 1.

  • Apply to sequence

    If a sequence is loaded and this is activated, perform the processing on all images of the sequence instead of only the loaded image.

  • 10

    WarningClip %

    These are the clipped values. Keep an eye on these values to avoid clipping too many pixels.

Midtone Transformation

This is the main goal of this tool. One need to move the triangles above the histogram. Left triangle stands for shadow signal, right triangle for the highlights and middle triangle for the midtones.

Once cursors have been set to the desired values, a corresponding pixel transfer function (called midtones transfer function, MTF) is computed, giving three parameters shadows, midtones and highlights.

The new pixel values are then computed with this function:

xp = (original – shadows) / (highlights - shadows)

pixel = ((midtones - 1) * xp) / (((2 * midtones - 1) * xp) – midtones);

This also means that the same midtones transfer function can be used on a sequence. For that, check the box or use the seqmtf command.

Warning

There are two clipping areas: the shadows clipping and the highlights clipping.

The clipped value shows the amount of pixels whose values cannot be represented with the currently configured histogram transformation,

You should keep the clipping value as low as you can.

Tip

If clipping happens very quickly, maybe you have black areas in the image, maybe as a result of the image alignment process?

Make sure to remove them before stretching the algorithm, using the crop tool (draw a selection and right click on the image to crop it).

Advice

In general, moving the sliders of highlights is a very bad idea because it will saturate the stars in the images.

WarningNote for the user:

Be sure to use this with the linear rendering mode activated to better see the effect of pixel value stretching.