| PixInsight LE Tutorial Basic Histograms and Curves Adjustments in PixInsight By Vicent Peris (PTeam) |
|
|
||
|
PixInsight, as most image processing software applications, offers basic tools for histogram manipulation. In this processing example we'll learn how to apply histograms and curves transforms efficiently. For this purpose we have the following image of the Scutum constellation: [mouseover:
processed image vs. original image] This astrophotograph was taken through a 90 mm f/2.8 lens on 35 mm Provia 400F film. The starting image for this tutorial has been previously processed in PixInsight Standard, including registration and average integration of two 15 minutes exposures, and correction of uneven illumination due to vignetting and light pollution. In this tutorial, we'll simply adjust the black, white and midtones histogram points. Then we'll apply some transfer curves to improve contrast and to achieve a correct chromatic balance. The first step, as with almost
any image, is adjusting the histogram clipping points. We may open the
Histograms processing window by clicking the Histograms tool button ( To get the histogram of the image represented on the Histograms window, we must select it from the Image View combo box, as shown below:
The image will appear included in the views list by its current identifier (Image01 in this example). After selecting the image, its histogram functions will be calculated, if necessary, and then plotted on the corresponding graphic panels of the Histograms window:
The bottom graphics panel (input histograms) shows the current image histograms and, when the Raw check box is unchecked, it reflects possible changes made to adjustment parameters for individual color channels. If you want to see just the unaltered histograms, ignoring changes to individual channels, leave the Raw check box checked. The top graphics panel (output histograms) shows the predicted histogram according to the whole set of adjustment parameters, including adjustments for the RGB/K combined channel as well as individual channel parameters, when applicable. PixInsight can perform an automatic adjustment of shadows and highlights clipping points by clicking the Auto Clip button (and Ctrl-clicking to access a setup dialog box). However, the automatic clipping function may fail setting shadows clipping points because noisy pixels can have values well below mean sky background levels. To properly adjust shadows clipping points, we'll set them manually just to the starting points of the histogram functions for each color channel separately. Increasing the horizontal zoom ratio on the Histograms window can be of great help to apply really accurate adjustments. You can use the couple of edit controls just below the input histograms panel to specify separate horizontal and vertical zoom ratios. On the following figure you can see how a horizontal 10× zoom is helping to define a very precise shadows clipping value for the red channel.
It is also advisable setting the plot resolution to 16 or 12 bits (65536 or 4096 plotted levels, respectively). Note that this only affects the number of discrete levels used to represent histogram functions, not the accuracy of histogram calculations. PixInsight always generates histogram functions with 16-bit accuracy. Parameters for the three individual color channels must be adjusted independently. When switching back to the RGB/K combined histogram representation (resetting zoom ratios to 1:1), we'll notice how the output histograms (top panel) have changed, and also, if the Raw check box is checked, the input histograms (bottom panel). Try to activate/deactivate the Raw option to toggle between the current and modified histograms. Modified histogram functions are actually predicted histograms, that is, the histogram functions as they will be after applying the histograms transform process to the image. To achieve a good chromatic balance, one must start by setting the peaks (maxima) for the red, green and blue histograms to the same value, as accurately as possible. However, in the present example we'll set the red channel maximum a bit to the right (i.e., in the highlights direction) with respect to green and blue. This is because we know this Milky Way area is plenty of golden and ocher tones. As you see, color-balancing astrophotos is a matter of taste and personal feeling, to some degree. To align the three histogram peaks we can use the mouse cursor, which is replaced by two perpendicular hairlines when it's placed over histogram graphics. We can read histogram values corresponding to the current cursor position directly on the Histograms window. Histogram adjustments can be previewed in real time by checking the R-T check box on the Histograms window. On the screenshot below, to the left you can see the original image, on the middle the Real-Time Preview window, and to the right the Histograms window. Note that the Real-Time Preview window is working as a preview for Histograms since the R-T check box is active on this processing window.
To actually apply the histograms
transform that we have defined, we just drag the small square button After adjusting the chromatic
balance of the image with the Histograms window, some areas acquired a
slight green cast, probably due to small inaccuracies in the background
model used for vignetting correction. This can be easily fixed by
applying a SCNR (Subtractive Chromatic Noise Reduction) process. To
access the SCNR processing window, click the
To apply the process, just drag
the process drag object ( Once we've adjusted the image histograms, and fixed green casts with SCNR, our next step is applying a curves transform. This way we intend to achieve two main goals: increasing contrast and applying very refined color corrections. To open the Curves processing
window, select the main menu option
or click the The first phase is to enhance contrast. If the left mouse button is held down while moving the mouse cursor over the image, three vertical lines appear on the Curves graphic panel (and also on the Histograms graphic panels), which work as precise readouts of actual pixel values corresponding to the current cursor location:
To make readout values independent on small-scale variations, as dim stars or noise, we must use an appropriate readout probe size. This can be selected on the readout pop-up menu, which can be accessed as shown on the figure below. For our example we selected a 15×15 readout probe.
The readout values shown on the Curves screenshot above correspond to the main Scutum cloud, which is the brightest feature on the image, and also what we are most interested in to improve the image. We start by defining a curve for the combined RGB/K channel:
As on the Histograms window, the R-T check box on the Curves window allows us to see real-time parameter changes. After applying the curve defined
above by dragging the process drag object (
Finally, we have to refine the chromatic balance of the image, which definitely is a matter of subjective interpretation to some degree. Basically, we'll apply a slight midtones transformation to the individual RGB channels. Modifying color balance is a delicate task. We can use a little trick here. With PixInsight we can preview in real time (or by using a preview object) some simultaneous adjustments made to the R, G and B individual channels, as well as to the combined RGB/K, luminance, hue and saturation channels. In other words, we can modify curves for all of these channels and preview the combined effect of such modifications at once. This resource can be used to apply a very subtle and accurate chromatic adjustment. A good method consists on increasing the saturation and change midtones for individual RGB channels at the same time, to see the combined result on the Real-Time Preview window:
This way, any global color cast will become easily detectable, since the increased saturation will magnify existing chromatic differences. Different curves, affecting chiefly midtones, must be defined for individual RGB channels, as required. In the case of the present example, only the red and blue channels required intervention. For the blue channel, increasing the zoom ratio five times was of great help to define a slightly but precisely modified curve:
The saturation curve defined above can be applied if appropriate. However, in our example we didn't apply it, since we only used it to facilitate an accurate adjustment of color balance. To avoid applying a curve for a specific channel, in case we had modified it previously, we must click the Reset button for that channel before applying the CurvesTransform process. This is how the final image looks like, after color correction with the described curves adjustment:
Once we have finished processing the image, we can save the entire processing to disk. To this purpose we must create a process icon, where all the information on applied processes and their parameters will be stored. The process icon can be created
from the Processing History window, which can be accessed by clicking
the corresponding tool button (
This way a process icon is created ("Process06" on the figure above), which owns a copy of the whole processing history of the image. The way process icons are created and managed on PixInsight's main window is quite similar to handling folder and file icons on the Windows desktop. The new icon is an instance of ProcessContainer. To save it to a folder on our system, we can use the main menu option, or the option from the context menu that pops up by right-clicking on the main window's work area. This way a new file will be generated with the file name chosen and the ".pi-psm" extension. We can open this file later to load the icon (or icons) it containes, which we can reuse to apply it to other images —by just dragging and dropping it—, to modify it, or to integrate its processes into a new processing strategy. After a few easy —but essential— processing steps, we have managed to apply a considerable enhancement to our original image: |