Tutorial (PixInsight):
Example: M31 Andromeda Galaxy - DSLR
This tutorial is a post-processing example involving an image of the M31 Andromeda Galaxy captured with a DSLR camera. As a result, the image is a One Shot Colour (OSC) image. The fully pre-processed image (done according to this tutorial) used as the post-processing example here was provided by a friend, Gordon Barrett. Full credit for the image therefore goes to him. The following is the technical image data provided:
Mount: Skywatcher NEQ6 Pro
Telescope: Celestron C11 XLT SCT with Starizona Hyperstar III
Imaging Camera: Canon EOS 600D DSLR (Full Spectrum Mod)
Filters: Hutech IDAS LPS D1
Autoguiding Camera: None
Software: Backyard EOS, PHD2 and PixInsight
Exposure Details: 151 x 30 seconds at ISO800 from a Light Pollution Red Zone
As with all post-processing examples, the tutorial is fairly self-contained in its explanations, but it is advantageous if the reader has some idea of the concepts involved in making use of some of the PixInsight processes and scripts. Below is a full list with links to other tutorials for further reading.
Assumed for this tutorial:
Please feel free to ask questions or leave comments via the comments section on the bottom of this page.
Assumed for this tutorial:
- Knowledge of operating PixInsight, related to dealing with images, processes and masks (read this, sections 3, 4 and 6).
- Your image has already been pre-processed fully (read this).
- Some prior knowledge of cropping with DynamicCrop is advantageous (read this, section 1).
- Some prior knowledge of removing light pollution glow with DynamicBackgroundExtraction is advantageous (read this, sections 1 and 2).
- Some prior knowledge of colour-calibrating images is advantageous (read this).
- Some prior knowledge of stretching linear images to non-linear with HistogramTransformation is advantageous (read this, section 3).
- Some prior knowledge of producing masks is advantageous (read this).
- Some prior knowledge of noise reduction is advantageous (read this).
- Some prior knowledge of sharpening fine details with MultiscaleLinearTransform is advantageous (read this, section 2).
- Some prior knowledge of enhancing feature contrast is advantageous (read this).
Please feel free to ask questions or leave comments via the comments section on the bottom of this page.
Contents |
1. Cropping out black edges and bright corners, and removing light pollution glow
We start with our image open and autostretched in PixInsight.
There is already some detail visible there, which bodes well for our final result. Nevertheless, we must remove the light pollution glow but before that happens, we must crop out the black edges present. These are the result of pre-processing aligning images together for stacking. We will use the DynamicCrop process to crop out the black edges. We simply open the process, click Reset to initialise it, drag the edges inward to exclude the black edges and then click Execute to carry out the crop. It may help to zoom out one step so that you can drag the edges inward. It later helps to zoom in so you can see if you have fully excluded the black edges.
With the black edges now removed, we proceed to remove the light pollution glow with DynamicBackgroundExtraction. We open the process and click Reset to initialise it on our image.
It is normally best to let DynamicBackgroundExtraction automatically place sample points as it saves us time, especially when there is a significant amount of background to the image. Since this is a DSLR image and on top of that it has been Drizzled during pre-processing, the image size is huge at 10,404 x 6,930 pixels. Therefore, we need to set a fairly large Default sample radius. 15 is usually a good value though for images this big, you can generally go as high as 20 without issues. In order to sample the background better, we increase Samples per row to 15. As the background is pretty bright as it stands, a Tolerance value of 0.500 will add close to no sample points automatically. Therefore, we increase this to say, 1.500. Once done, we click the Generate button to automatically place sample points.
One should never have sample points over stars or nebulosity, so indeed we must scour the image to remove the sample points that are placed over areas containing stars or nebulosity. If you suspect there is nebulosity below a sample point (but you can barely tell due to the excessive glow), simply move the sample point out of the way. If you are not sure at all, you can always apply DynamicBackgroundExtraction and if you see a sample point was indeed over a star or nebulosity, you can go back and remove or move the sample point, before re-applying the process.
Below, I have removed some sample points (by clicking them and pressing the DEL key on my keyboard), added some new ones (by clicking on the image) and moved some aside (by clicking and dragging them around). I made sure none were above any stars, no matter how small, and I left the centre of the image and what I expect to be area covered by the M31 Andromeda Galaxy across the image, without any samples points.
Below, I have removed some sample points (by clicking them and pressing the DEL key on my keyboard), added some new ones (by clicking on the image) and moved some aside (by clicking and dragging them around). I made sure none were above any stars, no matter how small, and I left the centre of the image and what I expect to be area covered by the M31 Andromeda Galaxy across the image, without any samples points.
All sample points currently in my image are grey, which means they are accepted by the Tolerance value set. Ideally however, one should use the lowest Tolerance value possible (not going below its default 0.500 or so). Let us try to lower it until we get sample points being rejected (they will turn red). I lower my Tolerance value to 1.250 and click Resize All to check. Do not click Generate as it will undo your work of manually placing sample points.
Clearly none of my sample points are rejected (red squares), so this value of Tolerance is better. When I tried 1.000, several of the sample points on the top-left corner turned red so they were being rejected. As a result, I keep my Tolerance value at 1.250. You can refine it further but it is not critical. Perform a final check of your image, add some more sample points if you want, move others, etc. Once you are happy, select Subtraction from the Correction list and feel free to enable Discard background model if you do not want DynamicBackgroundExtraction to show you what was subtracted (as well as your end result). If you do want to see the subtracted image, simply leave this option disabled (as is the default). Once set, click the Execute button to remove the light pollution glow.
The image now has its light pollution glow subtracted, showing a tremendous amount of detail was hidden underneath, as is evident by the above autostretched result. We may now close the DynamicBackgroundExtraction process as well as the original image.
Before we proceed, we note that the newly-background-subtracted image is showing an odd bright band to the right side and some glow to the top-left corner. Though we can try and remove the top-left corner glow with DynamicBackgroundExtraction, there is little to gain here. Also, the discontinuity in the band on the right side is not easy to deal with, plus that area of the image adds nothing overall anyway. Therefore, we can perform an extra crop on the image to exclude these troublesome areas. The process of choice is again DynamicCrop, so we open that.
Instead of clicking its Reset button, we can simply drag a selected area on our image. If we click its Reset button, we will have to drag each of the sides inward to exclude the areas we want to crop out. Sometimes simply dragging a selected area on the image is faster. You can always modify the selected area created by dragging, by dragging the sides or corners inward or outward. Once we are happy with our selected area, we click the Execute button.
Before we proceed, we note that the newly-background-subtracted image is showing an odd bright band to the right side and some glow to the top-left corner. Though we can try and remove the top-left corner glow with DynamicBackgroundExtraction, there is little to gain here. Also, the discontinuity in the band on the right side is not easy to deal with, plus that area of the image adds nothing overall anyway. Therefore, we can perform an extra crop on the image to exclude these troublesome areas. The process of choice is again DynamicCrop, so we open that.
Instead of clicking its Reset button, we can simply drag a selected area on our image. If we click its Reset button, we will have to drag each of the sides inward to exclude the areas we want to crop out. Sometimes simply dragging a selected area on the image is faster. You can always modify the selected area created by dragging, by dragging the sides or corners inward or outward. Once we are happy with our selected area, we click the Execute button.
Once the crop is performed, we close the DynamicCrop process. The above result retains all the important features of the image while excluding the troublesome background areas.
2. Performing colour calibration and initial noise reduction
Just because the image was captured with a One Shot Colour (OSC) camera does not mean that it does not need a colour-calibration procedure to be applied to it. We start this procedure by creating adequate preview boxes on the image. One should be related to the background and another should contain a large number of stars (including the galaxy, preferably). The background preview box need not be very large and should definitely not include any stars whatsoever. It helps to zoom in extensively to pick an area devoid of anything interesting and showing an average sample of what the image's background looks like.
Above, the small preview box contains background alone whereas the very large preview box contains our galaxies and most of the stars in the image. The first process we use is BackgroundNeutralization. In it, we simply select the background preview box (in my case called Preview01) and click the Apply button at default settings. After Applying the process, you may have to re-apply your autostretch as the changes made to the background may severely affect your view of the image. Do not worry, re-applying the autostretch in PixInsight will reveal detail again, with a more neutral background (as intended).
We now close the BackgroundNeutralization process and open the ColorCalibration process, which will do the bulk of the work. In it, we select our large preview box encompassing lots of stars in the list under White Reference (for me, Preview02) and select our small background preview box in the list under Background Reference (for me, Preview01). Default settings here work very well so we just Apply the process to the image. Again, you will probably need to re-apply your PixInsight autostretch to get a good look at the end result.
The preview boxes can now be deleted as we no longer need them. This is done quickly through the Preview -> Delete All menu. The ColorCalibration process can be closed as well. Finally, we now use the SCNR process to remove the usual green colour cast that appears in images. This process is extremely simple to use, as in fact default settings work perfectly well in the vast majority of the cases. Simply open SCNR and click the Apply button. You may close SCNR afterwards. Again, you will probably need to re-apply the PixInsight autostretch to truly see the end result.
With the image now colour-calibrated, we will now perform some initial noise reduction. This needs to target the low signal areas (background) more than the high signal areas (galaxies and stars). We therefore need to employ use of a mask. A good type of mask to use in this scenario is a Lightness image of our image itself. Before we extract a Lightness image, we first need to tell PixInsight that all three colour channels (Red, Green and Blue) should contribute to Lightness equally. For this, we use the RGBWorkingSpace process. Simply set all three, Red, Green and Blue, to 1.000000 and click the circle Apply Global button. Once done, close the RGBWorkingSpace process.
To perform the Lightness image extraction, we use the ChannelExtraction process. We set this process to CIE L*a*b* mode and disable a and b (the chrominance channels), only leaving L enabled. We then Apply the process to our image.
Above shows the Lightness image extracted, autostretched for demonstration purposes. We can now close the ChannelExtraction process. We should also remove the autostretch on the Lightness image extracted. Instead of an autostretch, we need to actually stretch the Lightness image. This is important because the image acts as a map of dark and bright areas and will therefore work excellently as a mask (protecting bright areas more than dark areas).
The autostretch is a good stretch to apply to the Lightness image, but it needs to actually be applied permanently, rather than visually like the autostretch does. For this, we open both the ScreenTransferFunction and HistogramTransformation processes. Click Reset on both so that at their defaults. To apply an autostretch to the Lightness image, we click the Auto Stretch button on ScreenTransferFunction while the Lightness image is selected. We can now transfer the autostretch parameters to HistogramTransformation, which will be responsible for applying it permanently. To do this, drag and drop the New Instance button from ScreenTransferFunction on to the bottom bar of HistogramTransformation (in-between the bottom seven buttons). Once dropped there, HistogramTransformation will show a steep curve rather than a straight line.
The autostretch is a good stretch to apply to the Lightness image, but it needs to actually be applied permanently, rather than visually like the autostretch does. For this, we open both the ScreenTransferFunction and HistogramTransformation processes. Click Reset on both so that at their defaults. To apply an autostretch to the Lightness image, we click the Auto Stretch button on ScreenTransferFunction while the Lightness image is selected. We can now transfer the autostretch parameters to HistogramTransformation, which will be responsible for applying it permanently. To do this, drag and drop the New Instance button from ScreenTransferFunction on to the bottom bar of HistogramTransformation (in-between the bottom seven buttons). Once dropped there, HistogramTransformation will show a steep curve rather than a straight line.
We now click the Reset button on ScreenTransferFunction and close it. This will remove the autostretch but HistogramTransformation is now prepared to apply the same stretch, but permanently. To do so, simply Apply it to the Lightness image. You may close HistogramTransformation at this point.
With the mask image now prepared, we apply it as a mask to our original image. This is done through the menu Mask -> Select Mask (or press CTRL M on your keyboard) and selecting the Lightness image from the list.
By default, the mask above is protecting the background and not the galaxies and stars, so we need to invert it. This is done through the menu Mask -> Invert Mask (or press CTRL SHIFT I on your keyboard).
We may now apply noise reduction at will. The process of choice at this point is MultiscaleLinearTransform. Since noise is mostly small scale, we can get away with only applying it to the first four wavelet layers. DSLRs are inherently noisy so applying it somewhat aggressively to the first wavelet layer is a good idea. However, this image is comprised of 151 exposures and therefore it is less noisy than usual.
To use MultiscaleLinearTransform for noise reduction, we keep Layers set to 4 (as we do not need larger wavelet layers), select Layers 1 to 4 and enable Noise Reduction in each case. Since noise is mostly contained in the first wavelet layer, we should be most aggressive here. Therefore, I will set Threshold to 4.000 and Iterations to 3 here. However, Amount will be reduced to 0.50. This will blend 50% of the original image with 50% of the noise reduced image, producing a smoother result. For Layer 2, I set Threshold to 2.000 and Iterations to 2. For Layer 3, I set Threshold to 1.000 and Iterations to 2. For Layer 4, I set Threshold to 0.500 and Iterations to 1. In all cases, Amount was set to 0.50.
To use MultiscaleLinearTransform for noise reduction, we keep Layers set to 4 (as we do not need larger wavelet layers), select Layers 1 to 4 and enable Noise Reduction in each case. Since noise is mostly contained in the first wavelet layer, we should be most aggressive here. Therefore, I will set Threshold to 4.000 and Iterations to 3 here. However, Amount will be reduced to 0.50. This will blend 50% of the original image with 50% of the noise reduced image, producing a smoother result. For Layer 2, I set Threshold to 2.000 and Iterations to 2. For Layer 3, I set Threshold to 1.000 and Iterations to 2. For Layer 4, I set Threshold to 0.500 and Iterations to 1. In all cases, Amount was set to 0.50.
We now simply click Apply on MultiscaleLinearTransform, with our original image selected (and the mask active), to perform the noise reduction. You may hide the mask through the menu Mask -> Show Mask (or press CTRL K on your keyboard). This will toggle the mask visibility on and off, though it will keep it active and doing its job. Below shows the effect of applying the above noise reduction, with the mask hidden.
The noise reduction is welcome as it smooths out the small scale noise, more so on the background than the galaxies and stars. It is also not excessive in terms of reduction amount, giving rise to a smoother background that is not artificially smooth. After all, we are after noise reduction not noise elimination. Once done, you may close MultiscaleLinearTransform. You may also remove the mask from your image through the menu Mask -> Remove Mask and close the Lightness image without saving it.
3. Stretching to non-linear and further noise reduction
Our post-processing now comes to the stage where we leave the linear state and enter the non-linear state, by stretching the image. There are multiple processes able to perform this task, though I will use my preferred HistogramTransformation at this point. First and foremost, we remove the autostretch on our image. We then open HistogramTransformation, click its Reset button, select the image from the list and enable the Real-Time Preview window.
We now move the mid-tones slider on HistogramTransformation towards the left to perform a stretch. The histogram that would result from the stretch is shown on the top graph, whereas the bottom graph displays the histogram's current state. You may want to zoom in on your bottom graph with the mouse wheel to tweak the mid-tones slider more closely.
Once you are happy with the stretch, click the Apply button. Make sure to click the Reset button straight after as otherwise the Real-Time Preview window will be showing you what your image would look like should you apply the same stretch again (no doubt completely white!).
Your first stretch may be extensive, but it may not be the end. You may want to stretch one or two more times, but obviously a lot less aggressively. After each stretch, ensure you check the black-point. Normally this is set a little high, bringing up your background brightness and reducing contrast in the features that matter. To adjust the black-point, move the black-point slider towards the right. Pay close attention to the numbers displayed by Shadows on the bottom. This corresponds to the number of pixels being black clipped (deleted by setting them to black, effectively). The percentage figure is related to the entire image's number of pixels. Feel free to black clip some pixels, but I generally never have to go above 0.005% to get a good result. For your initial black-point adjustment, you may not need to black clip any pixels whatsoever.
Your first stretch may be extensive, but it may not be the end. You may want to stretch one or two more times, but obviously a lot less aggressively. After each stretch, ensure you check the black-point. Normally this is set a little high, bringing up your background brightness and reducing contrast in the features that matter. To adjust the black-point, move the black-point slider towards the right. Pay close attention to the numbers displayed by Shadows on the bottom. This corresponds to the number of pixels being black clipped (deleted by setting them to black, effectively). The percentage figure is related to the entire image's number of pixels. Feel free to black clip some pixels, but I generally never have to go above 0.005% to get a good result. For your initial black-point adjustment, you may not need to black clip any pixels whatsoever.
Again, once you click Apply, click Reset as well so that you get a realistic view of your image's current state. It is clear from my histogram and image preview that the image can do with a second (less aggressive) stretch. This is again done by moving the mid-tones slider to the left. Generally, the peak of the histogram should be located about 1/4 way up the graph. This tends to provide the best contrast in your images. With a second stretch, a second black-point adjustment may be necessary, which may black clip some pixels this time (but not many at all!). You may adjust the black-point at the same time as you perform a stretch.
Once you are happy with your image's non-linear state, you can close the HistogramTransformation process and its Real-Time Preview window.
Some further noise reduction may be applied with the image in its non-linear state. Again, we will need an appropriate mask. Since the image is already non-linear, we do not need to do what we did before. We will however extract a new Lightness image using the ChannelExtraction process. You need not use the RGBWorkingSpace process again if you have not closed PixInsight, as the settings will still be the same. In ChannelExtraction, again make sure you select CIE L*a*b* mode, disabling a and b and only leaving L enabled. Apply this to the image itself.
Some further noise reduction may be applied with the image in its non-linear state. Again, we will need an appropriate mask. Since the image is already non-linear, we do not need to do what we did before. We will however extract a new Lightness image using the ChannelExtraction process. You need not use the RGBWorkingSpace process again if you have not closed PixInsight, as the settings will still be the same. In ChannelExtraction, again make sure you select CIE L*a*b* mode, disabling a and b and only leaving L enabled. Apply this to the image itself.
The ChannelExtraction process can now be closed. We will actually allow HistogramTransformation to automatically clip the shadows and highlights, bringing a lot more contrast to the Lightness image (useful for use as a mask!). For this, open the HistogramTransformation process, click its Reset button, select the Lightness image from the list and click both the Auto clip shadows and Auto clip highlights buttons. Once done, click Apply with the Lightness image selected.
You may now close HistogramTransformation. The above makes a great mask as it really allows us to attack the background with noise reduction. Apply this Lightness image as a mask to your image, through the menu Mask -> Select Mask (or press CTRL M on your keyboard) and selecting it from the list. You will have to invert the mask once again, through the menu Mask -> Invert Mask (or press CTRL SHIFT I on your keyboard).
The process of choice is once again MultiscaleLinearTransform, since it provides such good control over noise reduction to individual wavelet layers. However, since we applied this process earlier, we need to be less aggressive about it now. In line with this, I keep Amount for all four smallest wavelet layers set to 0.50 but I reduce Threshold to 3.000 for the first wavelet layer. I also change Iterations to 2, 2, 1 and 1 (for each respective wavelet layer).
Click Apply once set, which will perform the extra noise reduction on your image. Make sure that the noise reduction is not too aggressive as we do not want to end up with smoothed-out noise all over the background. Once done, close MultiscaleLinearTransform and open ACDNR - our next process for noise reduction. ACDNR does not really work on linear images but can do wonders on non-linear images in terms of removing small scale noise. Though default settings generally work well, I would like to target slightly larger noise than the default so I increase StdDev to 2.0. I set Amount to 0.75 so it blends 75% of the noise reduced image with 25% of the original image, producing a smoother end result. The rest of the settings work well, with Iterations left at 3 being sufficient as we no longer have a lot of noise to deal with. Under the Chrominance tab, we leave default settings as they are good. I definitely keep Chrominance noise reduction via ACDNR enabled as it helps reduce the colour noise in the background. Once all is set, click Apply.
Once noise reduction is applied, we can close ACDNR and remove the mask from our image via the menu Mask -> Remove Mask. You may also close the Lightness image without saving it.
Following noise reduction in the non-linear state, particularly after using ACDNR, it helps to check the image's histogram with HistogramTransformation and applying an adjustment if required. Normally an adjustment to the black-point is necessary. This can be accompanied by a very, very minor stretch to boost overall constrast.
Following noise reduction in the non-linear state, particularly after using ACDNR, it helps to check the image's histogram with HistogramTransformation and applying an adjustment if required. Normally an adjustment to the black-point is necessary. This can be accompanied by a very, very minor stretch to boost overall constrast.
Being happy with the minor adjustment to the image's histogram, I click Apply and then close both the HistogramTransformation process and its Real-Time Preview window.
4. Reducing background colour and contrast
The image is now non-linear and has received a good amount of noise reduction. Contrast is high, but ideally the background could be darker in contrast with the target, thereby making it pop more. There is also some colour to the background noise. We will now address these issues. Since we want to reduce colour and contrast in the background only, we will need a mask to protect what matters - the galaxies and the stars. RangeSelection can provide an excellent mask at this point, so we open this process. You will need to work with its Real-Time Preview so make sure you enable that. Under Fuzziness, I usually enter 0.15 and under Smoothness, I usually enter 5.00. These gives some blurring to the mask image, making transitions smoother. In order to produce your mask image, simply drag the Lower limit slider to the right slowly until the background is being excluded (black) and the stars and interesting features are mostly white.
The process of excluding background while including interesting features is always a compromise. Interesting features that are barely above the background are difficult to include in the mask without also including tons of background noise, which is very much undesirable. Above shows a decent compromise for this image. Areas that are nearly saturated are naturally excluded from the mask, such as the galaxy core and bright star cores. We can modify that now though. Once happy with your RangeSelection settings, click Apply and then close the process and its Real-Time Preview window. Your new range mask is now ready.
To modify the range mask, we can use the CloneStamp process. This process allows us to copy an area of the image and paint over another area with it. The idea is to copy a white area of the range mask and paint over the core and bright star cores so that these are also protected from our post-processing. Open the CloneStamp process and with the range mask image selected, click its Reset button to initialise it. I usually set Radius to a much larger value such as 30 to 50. The rest of the settings work well. Simply click on a white area of your range mask image while keeping your keyboard's CTRL key pressed and then feel free to paint over the black areas that should be white.
You need not paint over all the stars that appear over the galaxy itself (as tiny black holes). You may however want to paint a little extra along the outer spiral arms or other features of your image. This is your chance to define (by painting white) the areas of your image that should remain protected despite what RangeSelection was able to pick out. I for example paint the outer spiral arms white to ensure their colour and contrast remains protected.
I personally went around the entire galaxy smoothing out the protected areas by painting a white outline over them. This does however mean that the range mask is now a little abrupt in terms of protection.
Once you are happy with your paint job, simply click the Execute button on CloneStamp to apply the changes and close CloneStamp. Since the changes are very abrupt now, due to the hard edges in the range mask, we have to blur the range mask to smooth things out so that protection is more well transitioned. For this, we use the MultiscaleLinearTransform process. Click Reset once you open it. Now, we simply disable the first four wavelet layers by double-clicking them on the list (or selecting each one and then disabling them through their Detail Layer check boxes). Leave only the R (Residual) layer intact, then click Apply with the range mask image selected. You may close MultiscaleLinearTransform afterwards.
You may apply this two or three times if you wish, to make the range mask even smoother. I applied the process three times. The range mask is now smoother and ready for use. We therefore apply this image as a mask to our original image, through the menu Mask -> Select Mask (or press CTRL M on your keyboard) and selecting the range mask from the list. You will need to invert the mask as well, through the menu Mask -> Invert Mask (or press CTRL SHIFT I on your keyboard).
Let us start by reducing the background colour. This can also be done with the MultiscaleLinearTransform process, so open it again and click Reset. To attack the colour with this process, we will need to select Chrominance (restore CIE Y) as your Target from the bottom list. Since the colour is generally found in large wavelet layers, I select 8 under Layers, so that the list of available wavelet layers expands. We now select Layers 5 to 8 individually and on each one, enter the minimum value of Bias allowed, -1.000. This will remove emphasis on the colours in those wavelet layers. Once done, click Apply. You may want to hide the mask through the menu Mask -> Show Mask (or press CTRL K on your keyboard) so you can better see the end result. Below I show before and after.
At this point you may realise how important it is that your range mask is adequately protecting your interesting features, as otherwise you will lose a lot of colour in them. This technique is particularly good for images captured with a DSLR, due to their noisy nature, and especially when the images are captured in a fairly light polluted zone. You may close MultiscaleLinearTransform at this stage.
With the range mask still applied, we can now reduce contrast in the background somewhat, to neutralise it further. For this, HistogramTransformation is a good process to use. Click Reset once opened. Select the image from the list and drag the mid-tones slider to the right (rather than the left!). This is the opposite of a stretch and will reduce contrast. Since the interesting features are protected by the mask, you will be essentially be reducing contrast on the background alone. This can be very quickly overdone however, making the image look very artificial. Ensure you only apply a very small adjustment at this stage. Use the Real-Time Preview window to gauge what is happening.
With the range mask still applied, we can now reduce contrast in the background somewhat, to neutralise it further. For this, HistogramTransformation is a good process to use. Click Reset once opened. Select the image from the list and drag the mid-tones slider to the right (rather than the left!). This is the opposite of a stretch and will reduce contrast. Since the interesting features are protected by the mask, you will be essentially be reducing contrast on the background alone. This can be very quickly overdone however, making the image look very artificial. Ensure you only apply a very small adjustment at this stage. Use the Real-Time Preview window to gauge what is happening.
Click Apply once you are happy with the minor change in HistogramTransformation, then close the process and its Real-Time Preview window. We should now remove the range mask from the image. Do this through the menu Mask -> Remove Mask. Do not close the range mask image yet however as we will use it again momentarily. You may minimise it and set it aside so it is not in the way.
Before we move on to more specialised treatment, let us boost contrast somewhat more including reducing the background further, but this time image-wide. The process to use for this is CurvesTransformation. Open it, click Reset and enable its Real-Time Preview. In its default RGB/K mode, we simply create an S-curve. This involves clicking just below the straight line 1/4 of the way up the graph and clicking above the straight line 3/4 of the way up the graph. Clicking creates points that will distort the straight line into curving it. The curve should take an S-shape, as shown below.
Before we move on to more specialised treatment, let us boost contrast somewhat more including reducing the background further, but this time image-wide. The process to use for this is CurvesTransformation. Open it, click Reset and enable its Real-Time Preview. In its default RGB/K mode, we simply create an S-curve. This involves clicking just below the straight line 1/4 of the way up the graph and clicking above the straight line 3/4 of the way up the graph. Clicking creates points that will distort the straight line into curving it. The curve should take an S-shape, as shown below.
It is important that this be done to the entire image, with no masks whatsoever. Also, notice the points I created are very close to keeping the line straight. In other words, do not overdo it. This will brighten bright features and darken dark features in your image. This also means that you are further saturating saturated areas and further dampening faint features that may be deemed interesting. As with everything, this is a compromise. I am happy with my adjustment shown above, so I click Apply and close both the CurvesTransformation process and its Real-Time Preview window.
5. Boosting colour and fine detail contrast in the target
Having reduced the background's colour and contrast, our target now appears to pop out of the image more clearly. We will now venture to boost the colour and detail inside the galaxy, while leaving the background and stars protected from this treatment. This will require a specialised mask, which is a combination of two. We have a good range mask already created. We now simply need to create a star mask. We will subtract the star mask from the range mask, which will in the most part exclude the stars from the mask image. We can modify it manually to properly exclude the stars. To create an appropriate star mask, we will use the StarMask process, but we first need to clone our image and remove most of its brightness information (so that StarMask can pick up stars everywhere, including on top of the galaxy).
To create a clone copy of the image, simply right-click on it and click Duplicate. Then open the HDRMultiscaleTransform process, click its Reset button and with default settings, change Number of layers to 3 and Number of iterations to 2 (so the process is aggressive) and Apply it to the clone copy of the image.
To create a clone copy of the image, simply right-click on it and click Duplicate. Then open the HDRMultiscaleTransform process, click its Reset button and with default settings, change Number of layers to 3 and Number of iterations to 2 (so the process is aggressive) and Apply it to the clone copy of the image.
We may now close the HDRMultiscaleTransform process and open the StarMask process. In order for it to pick up almost every star, we increase Scale to 6. Large-scale and Small-scale are reduced to 0. Smoothness can be left at its default of 16. In order for the star mask to appear brighter as soon as it is created, we will allow StarMask to stretch it. To do this, decrease Midtones to something like 0.01000. Quite importantly, we need to raise our Noise threshold. If we do not, noise specks picked up will be deemed stars, and we do not want that. A larger value such as 0.20000 suffices, though you may want to raise it to 0.25000 if you have noise specks coming up as stars in your star mask image. Ensure you Apply the StarMask process to the clone copy of your image - the one which had its brightness information destroyed by HDRMultiscaleTransform.
With stars showing up over the galaxies, it tells us this star mask image is suitable. We can now close the StarMask process and the clone copy of the image (without saving it). We should further stretch the star mask image to make the stars picked up brighter. We can use HistogramTransformation for this, giving it a fairly aggressive stretch, as shown below.
Once done, you may close the HistogramTransformation process and its Real-Time Preview window. We can now combine both the range mask and the star mask, to produce a combined mask image. To do this, open the PixelMath process and click its Reset button. In the RGB/K text box, enter the following:
range_mask - star_mask
Expand PixelMath's Destination tab and select Create new image, then select Grayscale from Color space. When you click the square Apply button, a new image will pop up, which is your combined mask image. Please note my range mask and star mask images are minimised and on the top-right corner of PixInsight, so they are out of the way.
We should now remove all the remaining stars and star halos in the combined mask image. For this, we can use CloneStamp again to copy black areas of the image over them, essentially deleting these stars and star halos. However, it is not a task for the faint of heart. In fact, I find it easier to simply save the combined mask image as a 16-bit TIFF image, open it in Photoshop and have at it with the paintbrush tool (set to paint black). Remember that what is black in this combined mask image will not receive any boost to colour or detail contrast. Ensure you take that into account when blacking out areas of the image. The aim is to remove all stars and star halos outside of the galaxy structures.
With the sacrilegious practice of painting done outside of PixInsight, all is well with the world. We save changes and open the modified combined mask image in PixInsight. You can leave the format in 16-bit TIFF - there is no problem with that. We can now apply this as a mask to our image, through the menu Mask -> Select Mask (or press CTRL M on your keyboard) and selecting the combined mask image from the list.
In this case, we do not need to invert the mask because it is protecting the background and stars, allowing us to attack the galaxies' features alone - perfect for boosting colour and detail contrast! You may however want to hide the mask through the menu Mask -> Show Mask (or press CTRL K on your keyboard), so we can better see what happens, while keeping the mask active.
Let us now boost the colour in the galaxies just like we neutralised the colour in the background earlier, using the MultiscaleLinearTransform process. Click the Reset button, select 8 under Layers and select Chrominance (restore CIE Y) under Target. We again address the large wavelet Layers 5 to 8. This time however, the Bias values we enter are positive and nowhere near as aggressive. I will enter 0.150 for Layers 5 and 6 and 0.200 for Layers 7 and 8. The following shows before and after.
Let us now boost the colour in the galaxies just like we neutralised the colour in the background earlier, using the MultiscaleLinearTransform process. Click the Reset button, select 8 under Layers and select Chrominance (restore CIE Y) under Target. We again address the large wavelet Layers 5 to 8. This time however, the Bias values we enter are positive and nowhere near as aggressive. I will enter 0.150 for Layers 5 and 6 and 0.200 for Layers 7 and 8. The following shows before and after.
Having brought out the colour information in the galaxies' features, we can now boost their overall colour saturation selectively, using the ColorSaturation process. This will help bring out the reds and blues but not everything. We close MultiscaleLinearTransform and with the combined mask image still active, we open ColorSaturation. Here, we click to create a point above the blues and then create several more points in order to flatten everything else.
We can click the left and right arrow buttons on ColorSaturation to jump through each point. Doing so allows us to precisely edit their values for Saturation. I go through each point, making sure they are all set to 0.00000 in Saturation, except the peak above the blues, which I keep at 0.50000 for Saturation.
To enhance the reds (and browns), I simply go to the very first point and the very last point and for each one, I enter a value such as 0.30000 for Saturation. This increases the colour saturation on the reds (and browns). Below shows the end result displayed in ColorSaturation's Real-Time Preview window:
Once happy with the resulting colour boost, simply click Apply and close both the ColorSaturation process and its Real-Time Preview window.
We now use HDRMultiscaleTransform to bring down the galaxy core a little and increase overall detail in the brightest regions of the image. Open it and click its Reset button. Here, the larger the value in Number of layers, the less aggressive the HDR boost is. A value of 10 works well for this image, with Number of iterations left at 1. We do however enable To lightness and Lightness mask so that the brightness is brought down while keeping everything else consistent. Once done, click Apply, making sure this is applied to your image while its combined mask image is still active.
We now use HDRMultiscaleTransform to bring down the galaxy core a little and increase overall detail in the brightest regions of the image. Open it and click its Reset button. Here, the larger the value in Number of layers, the less aggressive the HDR boost is. A value of 10 works well for this image, with Number of iterations left at 1. We do however enable To lightness and Lightness mask so that the brightness is brought down while keeping everything else consistent. Once done, click Apply, making sure this is applied to your image while its combined mask image is still active.
Once done, close the HDRMultiscaleTransform process. We now sharpen the small scale structures within the galaxy, using MultiscaleLinearTransform. Open the process and click its Reset button. All we are going to do now is increase Bias a little for Layers 2 and 3, which are small wavelet layers containing small scale structures. Under Target, you should have the default RGB/K components this time. I tend to use values as low as 0.100 for Bias in cases of sharpening, but you will find values ranging up to 0.150 are usually fine (sometimes you need to use values as low as 0.050 or 0.075 however, depending on end result). Click Apply once set. Note that Layer 1 is not enhanced because most small scale noise lives in this layer. Layers 2 and 3 are small scale structures generally above the noise floor. The following shows before and after.
With the sharpening applied to our liking, we can close MultiscaleLinearTransform. We can also remove the combined mask image through the menu Mask -> Remove Mask. You may keep it on the side just in case you want to use it again later.
6. Final enhancement to overall contrast and colour saturation, and mirroring the image
We now come to a close on final enhancements to the image. We revisit the CurvesTransformation process in order to perform one final enhancement to overall image contrast and colour saturation (since no mask is applied, this is overall). Open the process, click its Reset button and enable its Real-Time Preview window. Again create an S-curve on RGB/K mode, as before, but less aggressively.
Before clicking Apply, go to Saturation mode (S) and click to create a point in the middle of the straight line. Drag this point upwards towards the top-left corner of the graph. This will boost overall colour saturation. Do not overdo it though as it need not be a big adjustment to make a large difference to the image, as shown below.
You may repeat this for Lightness mode (L), making the image brighter. I do not do this because this image is already very bright. Once you are happy with your adjustments, click the Apply button and then close both the CurvesTransformation process and its Real-Time Preview window.
Finally, if your image contains areas of dark nebulosity, such as this image with the dark dust lanes, you can use the DarkStructureEnhance script for a further boost to contrast. Simply open the script through the menu Script -> Utilities -> DarkStructureEnhance, enter an Amount and click OK. The default value of 0.40 for Amount works very well but you may want to lower it to something like 0.20 or 0.30 so it is not so aggressive. You may also alter Iterations, though 1 is usually plenty. Below shows before and after.
Finally, if your image contains areas of dark nebulosity, such as this image with the dark dust lanes, you can use the DarkStructureEnhance script for a further boost to contrast. Simply open the script through the menu Script -> Utilities -> DarkStructureEnhance, enter an Amount and click OK. The default value of 0.40 for Amount works very well but you may want to lower it to something like 0.20 or 0.30 so it is not so aggressive. You may also alter Iterations, though 1 is usually plenty. Below shows before and after.
Finally, the star mask image we created earlier can be extremely useful in bringing out the star colours. This is done by applying the star mask image as a mask through the menu Mask -> Select Mask (or press CTRL M on your keyboard) and selecting the star mask image from the list. Do not invert it this time, simply hide it while keeping it active (go to Mask -> Show Mask or press CTRL K on your keyboard).
Above, we see that everything is being protected except the stars, which is our aim - to attack the stars. We hide the mask and open the CurvesTransformation process yet again, clicking the Reset button as soon as it is opened. In Saturation mode (S), we create a point in the middle of the straight line and drag it upwards towards the top-left corner of the graph, as before. The boost here should be fairly severe however, as shown below. Ensure you enable the Real-Time Preview.
Above shows we have recovered the natural star colours, though you can overdo it here as well if you go a bit far and over-saturate. Simply click Apply once happy and close both the CurvesTransformation process and its Real-Time Preview window. You may remove the star mask image through the menu Mask -> Remove Mask straight after.
Finally, so that this image takes a more natural pose for the M31 Andromeda Galaxy, I use the FastRotation process to vertically mirror the image.
Finally, so that this image takes a more natural pose for the M31 Andromeda Galaxy, I use the FastRotation process to vertically mirror the image.
The image is now fully post-processed (shown below resized down to 25% its original size):
Comment Box is loading comments...