PixInsight 1.5

The Officially Unofficial Reference Guide

Rev.0.1 – 3/29/2010

Section 11: IntensityTransformations


This process, along with a quick histogram clipping feature, applies an automatic gamma transform to each RGB channel to achieve prescribed median values.

Histogram Clipping: Check this option if you want to do a histogram clipping.

Joint RGB/K channels: Select this option if you want to apply the clipping equally in all RGB/grayscale channels. If selected, only the R/K values under Shadow/Highlights Clipping need to be entered.

Individual RGB/K channels: Select this option if you want to apply the clipping differently for each RGB channels. If selected, the values for each channel need to be modified individually.

Shadows Clipping: The “black point” clipping values.

Highlights Clipping: The clipping values for the highlights.

Target Median Values: Check this option to perform gamma transform to each RGB channel to achieve prescribed median values. Uncheck it if you don't.

Joint/Individual RGB/K Channels: Select one option or the other depending on whether you want to perform the gamma transform to all RGB/grayscale channels equally or individually.

Set As Active Image: When clicked, the parameters in the AutoHistogram window will be populated with the corresponding data from the active image.


The Binarize process transforms all pixels in the image to either pure black (zero) or pure white (one). Binarize's threshold parameter also allows the perfect isolation of the stars in the mask by fine tuning the structure withdrawn.

Joint RGB/K channels: use a unique binarization threshold for all RGB/grayscale channels.

Individual RGB/K channels: Use an independent binarization threshold for each RGB/grayscale channel.


This process allows you to modify color saturation as a function of hue. This means that color saturation can be increased/decreased for a range of selected colors, as opposed to the CurvesTransform interface, which allows varying saturation as a function of itself. ColorSaturation works in a colorimetrically-defined HSVL space, which prevents noise transference from chrominance to luminance and ensures full preservation of color balance.

The ColorSaturation interface is very similar to CurvesTransform. The ColorSaturation curve is defined with respect to a horizontal axis that covers the entire range of hue angles from –pi to +pi. Vertical curve values are saturation biases. Each point in a ColorSaturation curve can take saturation bias values (that is, vertical, or Y-axis values) in the range from –10 to +10, including zero. Positive saturation biases increase color saturation, while negative bias values desaturate colors.

Hue / Saturation: These two parameters indicate the hue and saturation values for any point added to redefine the curve. The small blue triangle icons to the right of these two parameters allow you to navigate through all the selected curve redefinition points.

Hue Shift: An offset value that simply moves the origin of the hue axis. By varying hue shift, you can modify the ranges of colors which a given saturation curve acts on, without changing any curve points. For example, if you change hue shift from its default zero value to 0.5, what the original saturation curve was applying to blue/cyan colors will now be applied to orange/red colors. In this way you have a high freedom to fine-tune color saturation transforms with very little effort.


CurvesTransform implements a set of transfer curves that can be applied to selected channels of images. A transfer curve in PixInsight is an interpolated function applied to each pixel of an image. You define input and output values for a set of arbitrary points. Then for each pixel, the current pixel value is used to interpolate a new value from the set of given points, and the interpolated value replaces the original. Do that for every pixel in an image and you are an instance of CurvesTransform.

Current curve: The curve being modified. You can easily spot it because only the current (active) curve will display the locations of its points

Current point: When you modify a curve, you do so by creating one or more curve points.

Other modified curves: You can visualize other modified curves, or keep them out of the way (see Display Options below).

Point edit controls: The are Edit, Select and Delete. Edit mode allows you to add new points and move existing points. Select allows you to select a different current point – you cannot do anything to it,but it's useful for example to examine its coordinates. To delete a point, click on the Delete control, move the mouse over the point you want to delete, then click on it.

Channel selectors: PixInsight's CurvesTransformation allows you to modify many different channels. The are discussed below.

Current point coordinates: On a scale of 0 to 1, it shows the current point coordinates.

Point selector: The little blue arrows allow you to travel from one point to another.

Curves cursor: As you move the mouse over the curve editing area, the cursor informs you where you are.

Zoom edit controls: The first control (4 arrows pointing out) allows you to zoom in the curve editing area. Click on the control, move the mouse over the curve editing area and click to zoom-in.

The second control allows you to zoom out.

The third control allows you to move (by means of clicking and dragging over the curve editing area) over a zoomed-in editing area.

The fourth control allows you to directly enter the zoom factor, from 1 to 99.

Zoom preset button: By clicking the [1] button, you reset the curve editing area back to scale 1.

Display options: The button on the left switches on/off the display of all modified (non-identity) curves, or just the current curve being edited. This is useful for comparison and reference purposes, for example. The button on the right toggles on/of the background grid.

Curve options: The button on the left allows you to temporarily save a curve. The next button will restore the curve to the saved position. The third button will reverse the curve, and the fourth button will reset the curve to its original position.

Interpolation options: Select which interpolation option you wish PixInsight to apply when reading your curve modifications. The Akima Subspline interpolation is considered the closest to how a person would draw a curve, only taking the nearest data points into account when the curve is determined at a certain position. The Cubic Spline interpolation still does a smooth curve function, but may require additional points to force smooth segments in some situations. The Linear interpolation may require a lot of points to be properly defined. However, straight curve features and rapid, abrupt variations, can be very easily built with just a few points.

Curve Channels in PixInsight's CurvesTransformation tool

To edit the curve of a particular channel, select it from the available buttons in the channel selector area.

R, G and B: The red, green and blue channels, respectively.

RGB/K: All three RGB (or grayscale) channels.

A: The Alpha channel.

L: The CIE L* component (luminance) from the CIE L*a*b color space. Luminance curves can be very helpful when uniformly illuminated areas with little hue variations hide image detail.

a: The CIE a* component

b: The CIE b* component

c: The CIE c* component

H: Hue. Because the hue curve is performed by transforming each pixel to the HSV space, and the HSV space is colorimetrically ignorant, hue curves must be used with some care to avoid wild luminance/chrominance variations.

S: Saturation. Because the saturation curve in CurvesTransform varies saturation as a function of itself, one can achieve the effect of increasing saturation for unsaturated pixels but without modifying already saturated ones. The effect of a saturation curve is quite smooth, controllable, and is guaranteed to preserve color balance.


Digital Development or DDP works by compressing the range of brightnesses between the bright and dim portions of an image. Although PixInsight offers several more powerful and versatile tools that can deal with this common problem in astrophotos much better, people more familiar with DDP can use this module instead.

PixInsight's DDP implementation works like this: A low-pass Gaussian filter is applied to the image, to which a pedestal acting as a break point is added to every pixel. The value of the original image is then divided this value, then a more general pedestal is added. After this is done, a high-pass filter is applied (edge emphasis), and finally a mask-based color emphasis technique is applied to correct the loss of chrominance by the dynamic range compression performed by the DDP process.

DDP Filter

These are the parameters that define the DDP filter.

Curve Break Point: The break point is a pedestal that acts as a breaking or turning point in the hyperbolic function defined by the DDP.

Curve Base Pedestal: An additive element to the DDP operation. Use higher values to generate a brighter image.

Edge Emphasis: Standard deviation of Gaussian filter. In more practical terms, this parameter defines the intensity of a very rough high-pass filter applied after the initial computation of the DDP is done.

DDP Color Emphasis

When we apply DDP to an image, the dynamic range is highly compressed. This means that the chrominance is compressed too. Therefore, the color contrast is decreased. The color emphasis operation helps compensate this. It works by assigning to each of the RGB channels a mask based on another (or the same) channel.

Red Mask: The pull-down control allows you to select the channel to which the red mask will be applied. When the luminance is used as the mask, no color compensation is done.

Green Mask: Likewise but for the green mask.

Blue Mask: Same as above, for the blue mask in this case.

RGB/rgb Masks: Assign the RGB/rgb combination. This is the same as saying that the red mask will be applied to the red channel, the green mask to the green channel, and the blue mask to the blue channel.

RGB/bgr Masks: Assign the RGB/bgr combination. This is equivalent to say that the red mask will be applied to the blue channel, the green mask to the green channel, and the blue mask to the red channel.

Luminance Masks: Assigns the three color masks to the luminance, so no color emphasis is in fact done.


The goal of ExponentialTransformation is to increase the contrast in the shadows, avoiding noise amplification and preserving the information in the highlights at the same time.

Bringing out the faintest information in the image is nor hard to achieve with histograms or curves adjustments; however, by doing so we have to face two serious problems. On one hand, when we enhance features in the shadows, we are enhancing data that is represented by values just a bit over background noise, so noise will usually be increased too. The second problem is that, due to the fact that we are compressing the information in the midtones and highlights, there are many chances for the brightest objects to become saturated. By using a mask EP aids in the process of enhancing the desired information without increasing noise.

Function: ExponentialTransformation offers two different functions to address the problem stated above:

Order: Adjustment of the strength with which the selected function (SMI or PIP) is applied.

Smoothing: Amount of blurring applied to the duplicate image.

Luminance Mask: Activate a luminance mask protecting highlight areas of the image.

Comparison Between the SMI and PIP Methods

The PIP and SMI functions share many characteristics. Both functions increase the contrast in the shadows, but modifying the corresponding pixel values in different ways. In both cases, faint information can be improved to reach easily perceivable levels. However, the SMI and PIP functions are quite different in their aggressiveness. PIP is a good choice when the background becomes too bright, or if there is an excessive loss of overall contrast. There are also occasions where the SMI method may lead to unbalanced colors, or color casts. Also, because of the same greater aggressiveness of SMI, there are some occasions that the colors gets unbalanced, which in turns is shown as strange or unpleasant casts if any channels dominates.


Histograms are dynamic objects in PixInsight. They are calculated and generated automatically when necessary. Any view of an image window can be selected on the Histograms window to inspect and manipulate its histogram functions. When a view is selected this way, its histograms are immediately calculated if they don't already exist. When the selected view is modified in any way that modifies its pixel contents, its histograms are automatically recalculated and the Histograms window is updated accordingly.

Histogram manipulation is performed by the HistogramsTransformation process in PixInsight. This process by itself is not complex: just a few normalized numbers to clip pixels at the shadows or highlights and to expand the dynamic range, and a simple transfer curve to adjust the midtones balance. Yet, the interface for histogram manipulation in PixInsight is probably one of the most elaborated in the entire application.

Output histogram: Output histogram functions are predicted according to the whole set of parameters, as currently defined on the Histograms window. Since output histogram functions are necessarily predicted from interpolated data, in rare occasions you might find very small differences between predicted values and the resulting histogram values after applying or previewing the histogram transform.

Input histograms: When a view is selected in the view selection list, its histogram functions are drawn. Input histograms are actual functions calculated for the currently selected view.

Histogram cursor: As you move the mouse over the input or output histogram areas, the cursor informs you where you are.

Input/Output histograms zoom controls: Histogram functions can be quite complex and sometimes very difficult to read. For that reason, both the input and output histogram areas are zoomable from 1:1 to a factor of 999:1. Not only that, but both the horizontal and the vertical zoom ratios can be set independently. When a value greater than 1 is specified for horizontal or vertical zoom, scroll bars appear on the bottom or right edges, respectively, of the input and output histograms. You can use these scroll bars and their associated scroll thumbs and arrows to navigate on the magnified histogram.

View selection list: Here you can select an existing view to work with its histograms on the Histograms window. Any image view or preview can be selected. Immediately after a view is selected on the Histograms window, the program checks for availability of the associated histogram resources, and if not found, they are automatically generated and the histogram functions are calculated. Then the involved graphical elements are updated.

Once you have selected a view on the Histograms window, automatic recalculation and redisplay of its histogram functions takes place each time any pixel value is changed.

Graphics style: You can view the histograms in three different ways: lines, area, bars and dots.

Plot resolution: Histograms are calculated with 16-bit accuracy in PixInsight. If you select a plot resolution smaller than 16 bits on the Histograms window, histogram values are once more rescaled to the specified range before drawing the histogram functions. Although the default value is usually fine, you may want to use a specific plot resolution with a particular image to adapt the graphical representation of histogram values to actual image contents.

Please note that this parameter defines the plot resolution, not the bit-depth of the image being analyzed!

Information panel: This panel shows information associated with the current cursor position over the input or output histograms. For example, the line

x = 0.820669 (51->51); 1225, %0.0127 | y = 0.362694

Means: The horizontal cursor position over the histogram graphic corresponds to a normalized pixel value of 0.820669. The selected view contains 1225 pixels for this level, which is equivalent to the 0.0127 percent of the total amount of pixels. Finally, the vertical cursor position corresponds to a relative intensity of 0.362694 in the normalized [0,1] range.

Channel selectors: You can define independent histogram manipulations for red, green, blue and combined RGB or grayscale channels. Transforms defined for the red, green and blue channels are applied to the same channels of RGB color image views. For RGB color image views, the combined channel transform applies equally to the three channels. For grayscale image views, only the combined channel transform (whose corresponding channel selector is labeled as RGB/K) applies.

Shadows/highlights clipping: Shadows and highlights clipping parameters (as well as midtones balance) can be edited either by typing numerical values or by moving their corresponding triangular sliders (histogram controls area). Histogram manipulation parameters are defined in the normalized real dynamic range, that is, from 0 to 1. The edit controls implement the standard PixInsight's parsing procedures to ensure that you always specify strictly valid numerical values within the valid range. An additional constraint guarantees that the value of shadows clipping is always less than or equal to highlights clipping.

Note that each edit control is tied to its corresponding triangular slider control. When you modify a value in the clipping edit control box, the triangular slide is updated accordingly and the other way around.

Midtones balance: Same as above but for the midtones balance.

Histogram controls:To the bottom of the input histograms there is a horizontal rectangular area whose background is drawn as a gradient, ranging from pure black to pure red, green, blue or white, depending on the currently selected channel. This gradient represents the full available dynamic range, and is oriented as pixel values vary for histogram functions, transfer curves and readouts.

Three small triangular shapes, known as sliders, are shown ordered on this area and are associated with their respective histogram manipulation parameters, namely, from left to right: shadows clipping, midtones balance and highlights clipping. You can click on any slider and drag it horizontally to change its associated parameter.

MTF curve: This is the midtones transfer curve.

Histogram display: There's four controls here. From left to right:

Readout mode buttons: Readouts work by clicking on any view (image or preview) of an image window in any of the four available readout modes - from left to right: normal (value is displayed in the histogram but nothing is changed), black point, midtones and white point). In this mode, while the mouse button is held down, readout values are calculated for the cursor coordinates and sent to the histogram window. In other words, after clicking on these icons, hover over an image and click on an area - the black point, midtones or white point, depending on the readout button selected - will be set to the value of the pixel you just clicked.

Automatic adjustments: The Auto Clip buttons automatically clip histograms by predefined amounts. If the currently selected view is an RGB color image, automatic clipping occurs for each individual RGB channel. For grayscale images, automatic clipping works for the RGB/K combined channel only.

AutoClip Shadows and AutoClip highlights will perform the autoclip for the shadows and highlights values respectively. Auto zero shadows and Auto zero highlights will reset the shadows and highlights values.

The predefined clipping amounts can be established by clicking on the Auto Clip Setup button. When you do so, the Histogram Auto Clipping Setup dialog is shown. In this dialog you can define whether to clip at each histogram end, and the amount of pixels that will be automatically clipped. Amounts are expressed as percentages of the total number of pixels in the target image. Default values are: shadows and highlights clipping enabled, 0% pixels clipped. These settings will only clip unused segments of dynamic range at both ends of histograms.

Clipped pixel counts: Clipping counts refer to the number of clipped pixels at both histogram ends. Clipped pixels at the shadows will be set to zero (black), while clipped pixels at the highlights will be set to one (white). Information from clipped pixels is always lost.

Dynamic range expansion: These controls let you enter values for low and high dynamic range expansion parameters. These two parameters actually allow expansion of the unused dynamic range at both ends of the histogram.

This can be probably better understood as a two-step procedure: first, dynamic range is expanded to occupy the entire interval defined by the lower and upper bound parameters, but actual pixel values are not changed. The second step is to rescale both dynamic range and pixel values back to the normalized [0,1] range. The result of this process is that all pixel data are constrained to a smaller effective interval, and free unused portions appear at the histogram ends. This is used as a previous step for some image processing techniques with the purpose of preserving actual pixel data from losses due to excessive contrast gains.


This process does not contain a dialog box – that is, it's immediate and it's applied to the last active view. It will invert (negative image) the currently active view.


The Rescale process does, as its name indicates, a general rescaling of the values of all pixels in an image, so as to use the entire dynamic range available. It does so by dividing the value of each pixel minus the minimum pixel value in the image by the difference of the maximum and minimum pixel values in the image.

In other words, if the minimum pixel value in an image is 0.3 (remember, PixInsight defines the dynamic range of an image from 0 to 1) and the maximum value is 0.7, the Rescale process will recalculate all pixels in the image so that 0.3 becomes 0, and 0.7 becomes 1, and of course, all values in between get recalculated accordingly.

Joint RGB/K channels: Apply the rescaling to all RGB channels as a whole.

Luminance: Apply the rescaling function only to the luminance.


The ScreenTransferFunction tool in PixInsight, defines a nonlinear transformation that will be applied to the screen rendition of an image, but without modifying its actual pixel data in any way. In other words, it allows you to visually stretch an image but without making any changes to the image itself. Hence, ScreenTransferFunction allows us to work with linear images, just as if they were nonlinear in an easy and completely transparent way.

Edit STF mode: Select this mode to modify (drag) the values of the different channels. If you hold the shift key wile dragging, image update events will be blocked.

Link RGB channels: Enabling this option will cause that any change in any of the RGB channels will affect equally all three RGB channels. When disabled, you can modify each channel separately.

Zoom 1:1: Reset the zoom to 1:1

AutoStretch: Click this icon to perform an automatic screen transfer stretch. Ctrl-click to edit the default AutoStretch parameters.

Edit STF parameters: Click to manually enter the values of the different channels.

Zoom-in mode: Once selected, clicking on the editing area will zoom-in the editing area. Useful to perform more detailed adjustments.

Zoom-out mode: Once selected, clicking on the editing area will zoom-out the editing area.

Scroll mode: Select this mode to pan around the editing area. Only useful if you have previously zoomed-in.

Reset channel buttons: Bring the given channel back to its original state.

Black point readout: Readouts work by clicking on any view (image or preview) of an image window in any of the readout modes (black, midtones, white point). In this mode, while the mouse button is held down, readout values are calculated for the cursor coordinates and sent to the STF window. In other words, after clicking on this icon, hover over an image and click on an area - the black point of all channels will be set to the value of the pixel you just clicked.

Midtones readout: Same as the black point readout but to set the midtones point.

White point readout: The same except to set the white point.

Enable STF: This allows you to quickly tell the STF engine whether to apply the STF to the target image or not. If disabled, the moment you make any changes to the STF, it will automatically re-enable itself – unless the track view option (below) is also disabled.

To reset STF for a given image, you must reset the STF, not just disable it. The reset button is the button on the right-down corner of the STF dialog.

Track view:When enabled, any changes made to the STF window will be visible in the target image. When disabled, the target image will not display any adjustments you make. Note that if you have already made changes to the STF, disabling track view will NOT reset the STF used by the image.

Back to the Index | Copyright Note