CurvesTransformation Part 1
The CurvesTransformation process in PixInsight has a number of purposes, and understanding it can help up the quality of your images a great deal. Here is what the interface looks like with Track View turned on and with the tutorial luminosity data loaded after doing a dynamic crop.
The CurvesTransformation process in PixInsight has a number of purposes, and understanding it can help up the quality of your images a great deal. Here is what the interface looks like with Track View turned on and with the tutorial luminosity data loaded after doing a dynamic crop.
When used in the default RGB/K mode the curves transformation tool is showing the histogram of the data in the active image, much like what shows when using the HIstogram Transformation. Note the peak in the histogram almost to the left side. Here is the same data seen in the HistogramTransformation process.
Notice how very similar the bottom histogram is in the HistogramTransformation process compared with the histogram in the CurvesTranformation process. They are almost identical, except the CurvesTransformation process shows a indication of brightness at the various levels to the far left in the histogram. There is a similar brightness bar along the bottom as well. Both also have a line going from the bottom left of the histogram to the upper right. This line is indicating how the data will be transformed. In this default state, the data coming out will look like the data going in. No transformation will take place.
In the image above, I have used the HistogramTransformation process to do a mild stretch and I am showing the results in the Real-Time Preview window (Real-Time Preview is turned on). Now what would happen if I tried to duplicate that shape of the line in the curvesTransformation process?
I could not duplicate the curve exactly, but notice how very very similar the results in the Real-Time Preview window look! In fact, if I had been able to duplicate the transformation curve exactly, they would look identical.
Now we have seen what the CurvesTransformation process is doing at a fundamental level. It is applying a transformation curve to an image, in this case (because we have RGB/K selected) it is applying that curve to the brightness of the image.
If you are patient enough, it is actually very possible to stretch an image using just the CurvesTransformation process. But the normal stretch tools make that process much easier.
If there are easier ways to stretch an image, then why use this process at all?. It turns out, that among its many uses, it is excellent for tuning the results you got from stretching the image in some other process. Lets look at an example.
Now we have seen what the CurvesTransformation process is doing at a fundamental level. It is applying a transformation curve to an image, in this case (because we have RGB/K selected) it is applying that curve to the brightness of the image.
If you are patient enough, it is actually very possible to stretch an image using just the CurvesTransformation process. But the normal stretch tools make that process much easier.
If there are easier ways to stretch an image, then why use this process at all?. It turns out, that among its many uses, it is excellent for tuning the results you got from stretching the image in some other process. Lets look at an example.
In the above, I have done a HistogramStretch in two stages to the luminosity data after the DynamicCrop. Bring up your version of the file and stretch it using a stretching tool of your choice to look much like the above. Try not to clip the shadows (blacks). Save the file under another name so you can reload it if necessary. I called mine L_HistStretch4CurvesLesson and I saved in .fit format.
Load the CurvesTranformation process and use Reset (4 blue arrows) to reset the process. Make sure Track View is turned on. You should have something that looks similar to the above.
Now to actually do something useful with the CurvesTranformation process. It turns out that in sections of the image where the slope of the line describing the curve is steep, we get higher contrast, and where the slope of the line is shallow, we get reduced contrast. You can change the shape of the line by left clicking the line at a point along it and holding the mouse button down dragging the point that has been created where you want. The line will change shape as you move that point. You can create multiple points, and in fact earlier I did when copying the curve from the HistogramTransformation. I had created 4 points.
Here, create a point about where the straight line intersects the peak to the left. Drag that point down a bit. Use Real-Time Preview to see what happens to the image.
Now to actually do something useful with the CurvesTranformation process. It turns out that in sections of the image where the slope of the line describing the curve is steep, we get higher contrast, and where the slope of the line is shallow, we get reduced contrast. You can change the shape of the line by left clicking the line at a point along it and holding the mouse button down dragging the point that has been created where you want. The line will change shape as you move that point. You can create multiple points, and in fact earlier I did when copying the curve from the HistogramTransformation. I had created 4 points.
Here, create a point about where the straight line intersects the peak to the left. Drag that point down a bit. Use Real-Time Preview to see what happens to the image.
Notice how the image gets dark as a whole. In affect, we have undone some of the original stretch. Everything but the absolute brightest areas of the image are now darker than they were. That doesn't necessarily sound all that useful yet. But let's add another point. This time, add a point about midway across and drag that point up. As you are dragging the point up, use the Real-Time Preview window to see what you are doing. Drag that point up to about the 5/8ths mark or maybe a little more (there is no magic about these numbers, they will change image to image. You adjust according to taste).
Now we actually have a useful result. Here are the original stretched image and the modified image with the curve applied shown next to each other.
Note the much greater contrast between the bright nebulosity and the background of the image. This sort of S curve that we created is commonly used to increase the contrast of images.
A side affect is that you can use this same kind of S curve to move down some of the background noise so it is less visible while retaining detail in the rest of the image. You just need to choose your first point to the left carefully.
By the way, at any time during the process where you are editing the curve, you can click on a point you previously added and move it around.
What would happen if we built a curve that looks like this?
A side affect is that you can use this same kind of S curve to move down some of the background noise so it is less visible while retaining detail in the rest of the image. You just need to choose your first point to the left carefully.
By the way, at any time during the process where you are editing the curve, you can click on a point you previously added and move it around.
What would happen if we built a curve that looks like this?
Let's think about this. The slope of the line is much steeper now in the darker parts of the image, is much more shallow in the middle parts of the image, and is steeper again in the brightest sections. Following what was said earlier, steeper slopes have more contrast and shallow slopes have less. So here the darkest and lightest parts of the image will have more contrast. But the parts of the image that have medium brightness levels will have less contrast. This is what the result looks like.
The image as a whole appears to have less contrast because our eyes are rather attuned to that middle brightness part of the image. In affect much of the image has been restricted to using only a small range of brightness values. The image looks "flat".
The use of the CurvesTransformation process to tune the contrast of an image is an important tool. We can actually tune particular parts of an image in the CurvesTransformation tool. If we move our cursor over a luminosity image, at the bottom of PixInsight in the status area a K value is shown. This value indicates the brightness of the image at that point.
The use of the CurvesTransformation process to tune the contrast of an image is an important tool. We can actually tune particular parts of an image in the CurvesTransformation tool. If we move our cursor over a luminosity image, at the bottom of PixInsight in the status area a K value is shown. This value indicates the brightness of the image at that point.
We can use that value to place a point in the CurvesTransformation process. The K value of the dim part of the nebula the cursor is over is 0.1588 or about .16. We can then add a point so that its X value in CurvesTransformation process is at .16. We can make that exact by using the input box.
Mousing over the Image again, one of the brighter parts of the nebula is at about .4. We add a point there as well.
We can now pop the contrast of that part of the image (the nebula) by moving that 2nd point up. Of course this will affect how other parts of the image are rendered. But if we want to emphasize the contrast of the nebula, this is a way to very precisely do so.
The nebula that we sampled the points from now looks great. It does come at the expense of slightly bloating some of the stars.