Page 1 of 1

Layer Module Use

Posted: Tue Feb 28, 2017 12:06 pm
by Guy
Here are some notes relating to using this module. It is not the only way to use the module and experimentation is encouraged.
Please let me know if anyone sees any errors or has any additional advice they think helpful.
I will update this post as needed.
For an index of similar notes on the other StarTools modules see StarTools Main Window Use.
To see a full alphabetical list of module topics click here.

Layer Module

Purpose:
  • To allow pixel manipulation in a very versatile but straightforward manner.
Description:
For a general overview see Layer: Versatile Pixel Workbench.
The Layer module performs Pixel math by means of graphical user interface. A huge range of operations is selectable, while multiple operations can be chained by means of a buffer.
The effects of using this module can range from very simple to highly complex - and the effective use of the full range of this module requires a great deal of knowledge about the effects of these transformations and their combination.
It is possible to cause clipping and artefacts with this module - which can negatively impact the image and subsequent processing.
However, it is possible to make effective use of some of its power with a little basic knowledge.

Useful Sources
The Official StarTools English Manual (pdf) gives a good description of all the modules. It relates to StarTools version 1.6+.
The Unofficial StarTools English Manual (pdf) is a good general source of help. There are versions that relate to StarTools version 1.6 and
version 1.7
The Processing video M8 in Color with modest data shows use of the Layer module between 13m18s and 14m36s. It shows v1.3.5 but is still relevant for this module.
The processing tutorial video StarTools: M42 H-alpha High Dynamic Range composite shows the use of the Layer module between 8m16s and 9m27s. It shows v1.3.2 but is still relevant for this module.
The notes below relate to StarTools version 1.5, 1.6, 1.7 and 1.8

When to use:
  • Usually it is best to use the Layer module towards the end of the workflow after Tracking has been turned off and denoise has been done.
  • Anything that causes artefacts (whether visible or not) like ringing, sharp edges, clipping, etc. will impact Tracking's ability to keep track of noise - so it is safest to use it after you have switched Tracking off.
  • If you know that what you are doing with the Layer module will not cause artefacts as described above then you can use it with Tracking on - and also the SMI and PIP techniques described below can be used safely with Tracking on.
Example Workflow (v1.7):
{Compose}-AutoDev-{Lens}-Bin-Crop-Wipe-AutoDev (or FilmDev)-{Contrast/HDR/Sharp/Decon/Flux}-Color-{Shrink/Filter/Entropy/SuperStr}-Track/NR-{Layer/Heal/Repair/Synth/Stereo 3D}
Key: {...} optional modules

Example Workflow (v1.8):
{Compose}-AutoDev-{Lens}-Bin-Crop-Wipe-AutoDev (or FilmDev)-{Contrast/HDR/Sharp/SVDecon}-Color-{Shrink/Filter/Entropy/SuperStr/NBAccent/}-Track/NR(Unified-Denoise)-{Flux/Repair/Heal/Layer/Synth/Stereo 3D}
Key: {...} optional modules

Example Workflow (v1.9):
{Compose}-OptiDev-{Lens}-Bin-Crop-Wipe-OptiDev(or FilmDev)-{Contrast/HDR/Sharp/SVDecon}-Color-{Shrink/Filter/Entropy/SuperStr/NBAccent}-Track/NR(Unified-Denoise)-{Flux/Repair/Heal/Layer/Synth}
Key: {...} optional modules.


Method:
There are so many ways of using the Layer module with so many different aims and no single method stands out - See the Special Techniques section for some of the more common uses.
The general process is:
  1. If multiple images are to be combined make sure they are the same size and aligned the same as described in the Background Notes.
  2. Start the Layer module - the current image gets loaded into both foreground (centre) and background (left) fields.
  3. Load another image - this will replace the image in the foreground.
  4. Swap the images if necessary to put the right image in the foreground.
  5. Create a mask if needed to protect certain parts from being altered.
  6. Select the desired Layer Mode.
  7. Select Filter Type or Brightness Mask Mode as required.
  8. Adjust other settings as required.
  9. The result is shown in the right hand field.
  10. 'Keep' the desired result.
What result to look for:
  • Ensure that image layers are properly aligned.
Special Techniques:

Masking out the effect of a previous module
This is a technique for selectively removing the effect of the last module using a mask. In the case below a star mask is created. See this forum topic
This
  1. Launch Layer Module
  2. Open the Mask editor
  3. Create Mask - for example a star mask: Auto Stars Do - Keep
  4. In Layer Module - Copy the Undo buffer to the foreground layer - Undo > Fg
  5. You can mask the effect of the last module as required - The mask active (green) area is the area where the effect of the last module is undone.
  6. Adjust Mask Fuzz to get a smooth transition
  7. Adjust the mask to include all the elements you want to exclude.
Combining images of different exposure lengths
This is useful when you have a subject with a high dynamic range and you can't, in a single image, get the exposure right so that you get the detail you want in the fainter portions without saturating the brighter portions. M42 is one of a few subjects which causes this problem.
The two data sets are made as follows:
  • One data set is exposed optimally and has no overexposed elements (but lacks the background detail)
  • The other data set is overexposed and will have blown out cores but contains background details
  • Make sure the data sets are the same size and aligned the same as described in the Background Notes.
This Technique is shown in video StarTools: M42 H-alpha High Dynamic Range composite. This uses StarTools version 1.3.200RC so is very old but the approach still works.
  1. Process each image separately:
    • Use FilmDev (Develop) instead of AutoDev - save each result.
    • In the Color module use the same Red, Green and Blue ratios for the second set as the first.
  2. Restart StarTools.
  3. Load both images into Layer Module - with the longer exposure in the foreground (centre).
  4. Set the Layer Mode to 'Blend'.
  5. Use the Filter Type 'Max Contrast' or 'Max Distance to 1/2 Unity'.
  6. You can combine the two by copying the result (Copy) of one filter, pasting to the Foreground (Paste>Fg), and then apply the other filter.
  7. Increase the Filter Kernel Radius until a smooth blend is achieved (can be near max. of 51 pixels).
  8. Adjust the Blend Amount (to 50% or 100% perhaps).
  9. You can repeat the process by copying the result and Paste to the Foreground (Paste>Fg) (or Background).
  10. Keep the result.
  11. You might also try other Layer Mode types e.g. 'Distance' or 'Distance, Multiply Compensate Gamma Hybrid'.
Adding narrowband (e.g. Ha) to visual spectrum data - by creating highlights using the Layer module.
This is good for where the object does not primarily emit at the narrowband wavelength.
Described in this forum post.
In this case it can be very effeective to accent the visual spectrum data with the narrowband.
The method gives good control of balance by blending towards the end of processing.
  • Process visual spectrum dataset as normal
  • Save the image
  • Process narrowband dataset simply using Wipe and AutoDev.
  • Save the image
  • Launch the Compose Module
  • Load the narrowband (Ha) image as Red
  • Set Channel Interpolation to 'Off'.
  • Set 'Luminance, Color' to 'RGB, RGB (Legacy Software)' to extract the red channel.
  • Press 'Keep'. No need to start tracking.
  • Launch the Layer Module - the Red Ha data will be loaded into both foreground and background
  • Press 'Open' and select the visual spectrum data - this loads it into the foreground
  • Set the 'Layer Mode' to 'Lighten'
  • Adjust the 'Blend Amount' to taste.
  • You can try different 'Brightness Mask Mode' settings if you want to further choose between foreground and background.
  • Press 'Keep' when done.
Giving narrowband images RGB-colored stars.
This allows you to remove the narrowband stars and replace them with broadband stars for more accurate star colors.
Described in this forum post, also in this post.
And Referencing this Cloudy Nights forum post.
As Ivo says: "This procedure avoids artifacts, avoids tainting your image with artificial detail, retains the (usually) tighter stars of the Narrowband image, and gives you full per-pixel control, should you need it."
  • Make sure your datasets are aligned the same using a reference frame.
  • When processing the data sets in StarTools make sure the Bin and Crop module settings are the same for both data sets.
  • Process the RGB dataset as normal.
  • Save the resulting image as a TIFF file.
  • Process the Narrowband dataset as normal.
  • Use Compose to combine the Narrowband Data (e.g. Ha and OIII as HOO bi-colour). Usually they will be combined in the proportions they would appear in the visual spectrum to match more naturally the star colours.
  • For example, you could use what is effectively Ha:(Ha+OIII)x1.5:OIII which is the Steve Cannistra method described in the Compose module 'Special Techniques' section.
  • Save the image as a TIFF file.
  • Launch the Layer Module - the Narrowband data will be loaded into both foreground and background. We will keep the Narrowband data in the background and load the RGB stack in the foreground.
  • Press 'Open' and select the RGB data file - this loads it into the foreground.
  • Staying in the 'Layer' module press the 'Mask' button. We will create a star mask that contains all the stars that we want to select from the RGB data.
  • Press 'Auto' - 'Stars' then 'Do', or consider the 'FatStars' or 'AltStars' presets.
  • Press 'Keep'. This will return to the main 'Layer' module screen.
  • Set 'Layer Mode' to 'Color of Foreground'. The background Narrowband image now gets the colouring of the foreground RGB data as dictated by the mask - so just for the stars.
  • Adjust 'Mask Fuzz' and 'Filter Kernel Radius' to smoothly blend the foreground and background images.
  • Press 'Keep' when done.
Removing purple stars
It is quite common to end up with purple stars - e.g. with HST (SHO) pallette narrow band images. This is a simple technique for removing them which is described in this forum topic
At the end of processing, after Tracking is switched off:
  1. Load the Layer Module.
  2. Set 'Layer Mode' to 'Invert fg' - This inverts the foreground and has the effect of making any purple things green.
  3. Keep the result.
  4. Load the Color Module.
  5. Set 'Cap Green' to 100%.
  6. Keep the result.
  7. Load the Layer Module.
  8. Set 'Layer Mode' to 'Invert fg' - This sets the image back as it was - but without the purple stars.
  9. Keep the result.
Combining Luminance and RGB images using the Layer module
This is a generic method to combine (synthetic) luminance and colour data as described in Mel 15. It is an alternative to the method 'Processing Ha,R,G,B using a synthetic luminance frame' described in Compose Module Use.
  1. Make sure the images are the same size and aligned the same as described in the Background Notes.
  2. Process luminance data as normal - trying to tease out the detail - and save it.
  3. Process the R+G+B colour stack, making sure the noise is minimal and there is a good continuum of colours - then save it.
  4. Restart StarTools.
  5. Load the luminance data.
  6. Start the Layer module - the current image gets loaded into both foreground and background.
  7. Load the colour data - this will replace the image in the foreground.
  8. Select Layer Mode 'Color Extract fg' to extract the luminance independent (normalised) colours from the colour image.
  9. Click Copy to store the composite output in the buffer.
  10. Click Paste>Fg to paste the extracted colours into the foreground layer.
  11. Select the Layer Mode 'Color Of fg' (or 'Multiply') to use the luminance information from the background and the colour of the foreground.
  12. If darker parts of the background are too bright - select Brightness Mask Mode 'Where fg is dark, use bg' or 'Where composite is dark, use bg'.
  13. Use the Brightness Mask Power to subdue the colouring of the background.
  14. Use the Blend Amount to increase/decrease saturation.
  15. 'Keep' the desired result.
Creating a synthetic luminance frame
Creating a synthetic luminance frame, derived by combining the results from different narrow-band filters while they are linear and unprocessed, allows you to process the luminance and the colour separately. The luminance is processed to enhance the detail, the other frames are processed to minimise noise - see M45 Advanced Processing In StarTools Part 2.
To create the synthetic luminance frame we combine all the data we have into a weighted average - weighting according to the exposure time collected in each channel. This is an alternative to using the Compose Module.
Example: R:G:B:Ha 30m:30m:30m:110m T1:T2:T3:T4
See also the description: Ha,R,G,B ->synthetic luminance.
We load one file and then add the other channels one by one using the Layer module.
  1. Make sure the images are the same size and aligned the same as described in the Background Notes.
  2. Start StarTools.
  3. Open R file - indicate the data is not linear (even though it is) by selecting 'Modified and not linear' - This turns Tracking off.
  4. Open the Layer module.
  5. Open G - Set blend to T2/(T1+T2)% - which is 30/60=50% in the example.
  6. Copy, then Paste>Bg
  7. Open B - Set blend to T3/(T1+T2+T3)% - which is 30/90=33% in the example.
  8. Copy, then Paste>Bg
  9. Open Ha - Set blend to T4/(T1+T2+T3+T4)% - which is 110/200=55% in the example.
  10. Either:- Save the image to a file and open as a linear file later - or turn Track on.
We now have our weighted average synthetic luminance frame.

Hubble Palette synthetic luminance frame Example:
Example Ha:SII:OIII 110m:40m:40m T1:T2:T3
  1. Make sure the images are the same size and aligned the same as described in the Background Notes.
  2. Start StarTools.
  3. Open the Ha File - indicate the data is not linear.
  4. Open the Layer module.
  5. Open the SII file - Set blend to T2/(T1+T2)%=40/150=27%.
  6. Copy, then Paste>Bg
  7. Open the OIII file - Set blend to T3/(T1+T2+T3)%=40/190=21%.
  8. Either:- Save the image to a file and open as a linear file later - or turn Track on.
Colour balancing of data that was captured using a light pollution filter
Data that was captured using a light pollution filter is difficult to colour balance. In this technique the colour data is captured without a light pollution filter. The luminance data is a longer exposure using a light pollution filter. The method described here uses the Layer Mode and a Brightness Mask to combine the two data sets.
See also Colour balancing of data that was filtered with a light pollution filter.
  1. Make sure the images are the same size and aligned the same as described in the Background Notes.
  2. Load the colour data.
  3. Launch the Layer module.
  4. Select Layer Mode 'Color Extract fg' to extract the colours from the colour image.
  5. Click Copy to store the output in the buffer.
  6. Open the luminance image.
  7. Click Swap - swaps background and foreground (putting luminance in the background).
  8. Click Paste->Fg to paste the extracted colours into the foreground layer.
  9. Select Layer Mode 'Color Of fg' to use the luminance information from the background and the colour of the foreground.
  10. Select the Brightness Mask Mode 'Where fg is dark use bg'.
  11. Use the Brightness Mask Power to subdue the colouring of the background.
  12. Use the Blend Amount to increase/decrease saturation.
  13. Use the Filter Kernel Radius (with Gaussian filter) to mitigate colour noise.
  14. Keep the result.
Creating Bi-Colour images using Steve Cannistras method
This is a description of a method proposed by Steve Cannistra Modified Bicolor Technique for combining Ha and OIII images which can produce fairly 'natural' results.
You may get better results if you preprocess the images separately and then combine them as described here.
  1. Create Synthetic Green Image:
    - Make sure the Ha and OIII images are aligned and the same size in pixels.
    - Load Ha data - indicate the data is not linear (even though it is) by selecting 'Modified and not linear' - This turns Tracking off.
    - Open the Layer Module.
    - Load OIII data into foreground.
    - Set Layer Mode to 'Multiply'.
    - Set Blend Amount to 100%.
    - Keep.
    - Save as a Tiff file.
  2. Re-start StarTools.
  3. Load the LRGB Module.
  4. Load the Ha data into the Red Channel.
  5. Load the saved Synthetic Green image into the Green Channel.
  6. Load the OIII data into the Blue Channel.
  7. Increase the Green Ratio to about 1.50 - or as you prefer - this increases the influence of the Synthetic Green data.
  8. Keep.
  9. When prompted for Type of Data select 'Linear, was not bayered or is whitebalanced'.
  10. Process with other modules as normal - Crop, wipe etc.
  11. When using the Color Module with narrow-band data the automatic colour balance that happens on loading may produce odd results. Set the Bias Sliders back to 1.00 and then adjust from there until you get the result you want. Adjust the Saturation Amount if you want.
Creating a Starless Image by using StarNet++ with StarTools on linear data
This technique is derived from Ivos process described in this thread: Using StarNet++ with StarTools on linear data
It allows you to use the StarNet++ method of removing stars in an image to create a mask you can use on (linear) data in StarTools processing.
Thanks to Jochen for contributing this.
  • The point of using this procedure is to obtain a star mask, using StarNet++'s star detection. All I/we know is that StarNet++ only works on (e.g. has been trained with) stretched, processed images.
  • It is always good to ask yourself if removing stars is the best course of action - there may be better ways to achieve your aim.
  • See the link above for further discussion on when and how to use this.
  • The source image in this case, is the "processed" image you would normally feed to StarNet++. E.g. this source image has been stretched to bring out all the stars so that StarNet++'s neural net can "see" them.
  • StarNet++ only works with "finished" images. However, with the guide below, we can use StarNet++'s smarts to successfully process a linear dataset in StarTools. The crux of the method, is the creation of a perfect star mask, by having StarTools look at which pixels were modified by StarNet++.
  • Once that star mask has been extracted, StarTools' heal module should actually yield superior results in terms of removal, as the Heal module is agnostic when it comes to the replacement of stars. StarNet++'s neural net will be only as good as the stars it has been trained on when it comes to replacing them.
Creating the Starnet++ Starless Image:
  1. Fully process the image from the raw data as normal in StarTools and save that (stretched) image as a 16-bit TIFF.
  2. Use that image as input to StarNet++ (e.g. starnet-ip.tif)
  3. Process
  4. Save the resulting StarNet++ output (starless) image (e.g. starnet-op.tif).
  5. Convert this image file to FITS or IBM PC byte-order TIFF format as needed. For example - to convert to a suitable TIFF format using ImageMagick - use the command line: convert input.tif -depth 16 +compress output16bituncompressed.tiff
Creating the Star Mask using the StarNet++ output:
  1. Load the (stretched) StarNet input (e.g. with stars still in place - starnet-ip.tif) image in StarTools. Don't turn Tracking on - when prompted select 'Non-linear sRGB source' then 'Don't activate Tracking'.
  2. Launch the Layer module.
  3. Load the (stretched) StarNet output (e.g. with stars removed - starnet-op.tif) image in the Layer module.
  4. Set Layer Mode to "Difference".
  5. You could skip to step 9 here, but the following steps may be needed if the Starless image has been normalized.
  6. Click Copy.
  7. Click Paste Foreground (Paste>Fg) button.
  8. Set Layer Mode to "Multiply Foreground Only".
  9. Set Blend Amount to 500% (max).
  10. Keep the result.
  11. Launch the FilmDev module.
  12. Set Skyglow to 49%.
  13. Keep the result.
  14. Save the image (e.g. starnet-mask.tif).
Now use the Star Mask to remove the stars from linear data using the Heal module:
  1. Now load your original raw data into StarTools once more. Don't turn Tracking on - when prompted select 'Non-linear sRGB source' then 'Don't activate Tracking'.
  2. Load the Mask file (starnet-mask.tif) using the Mask module. StarTools will automatically convert it into a mask and all stars should be correctly selected at this point.
  3. Launch the Heal module, your stars will be healed out using the mask.
  4. Keep the result.
You can now turn Tracking on & process as normal.

Notes:
  • Once the star mask is created you can use it in a number of ways - removing, healing, separating, recombining etc.
  • If using LRGB data then do the process on the luminance or synthetic luminance only.
Splitting a colour image into Luminance and RGB before Processing
The technique was described by Kevin Bisher and based on Scott Rosens LLRGB method for DSLR image processing - which used PhotoShop.
It allows us to process luminance and colour separately which can produce superior results. The luminance is processed to enhance the detail, the RGB is processed to minimise noise - see M45 Advanced Processing In StarTools Part 2. This is an alternative to using the Compose Module.
  1. Load the image.
  2. Bin and Crop the Image as needed.
  3. Save the image - this is the RGB version.
  4. Create a Luminance (monochrome) version of the image (one way is: Layer -> Layer Mode=Desaturate fg (Luminance) -> Keep) and save it.
  5. Load and Process the RGB version using heavy denoise - save it.
  6. Load and Process the Luminance image - concentrating on bringing out the detail.
  7. Merge images using the Layer module:
    • Make sure the images are the same size and aligned the same as described in the Background Notes.
    • Load the Layer module - Luminance image will be loaded into centre (foreground) and left (background) panel.
    • Load the RGB image - this puts the RGB image in foreground (Luminance stays in background).
    • Set the Layer Mode to 'Blend'.
    • Set the Blend Amount - reduce from 100% as needed.
  8. Do any further processing needed to the combined image.
  9. Optionally - Load the Luminance image again, swap and put it in the background, 'Blend' again, and process the combined image. This is the main additional step in the LLRGB method.
  10. You can repeat this process with the result to further improve it.
  11. Keep the result.
Screen Mask Invert (SMI)
This is an old method used by PhotoShop/PixInsight users to increase contrast in the shadows. See this external reference for more details.
Normally other StarTools functions are better but, if needed, StarTools can achieve this as described in SMI
  1. It is best run just before the Color Module (while Tracking is still on!)
  2. Launch the Layer module.
  3. Set 'Layer Mode' to 'Screen'.
  4. Set 'Brightness Mask Mode' to 'Where foreground is light, use background'.
  5. Keep the result.
Power of Inversed Pixel (PIP)
This is an old method used by PhotoShop/PixInsight users to increase contrast in the shadows. See this external reference for more details.
Normally other StarTools functions are better but, if needed, StarTools can achieve this as described in PIP
  1. It is best run just before the Color Module (while Tracking is still on!).
  2. Launch the Layer module.
  3. Set 'Layer Mode' to 'Power of Inverse'.
  4. Set 'Brightness Mask Mode' to 'Where foreground is light, use background'.
  5. Keep the result.
Description of Controls:

Mask
For general instructions on using masks see Mask
  • The mask is applied to the foreground.
  • Non-green parts appear in the result on the right as they are in the background image, unchanged.
  • The effect of the Filter, Layer Mode and the Brightness Mask Mode are all masked out.
Buffer Actions:
The following Buffer Action buttons are at the top of the screen:
Note: Fg=Foreground, Bg=background
  • Open - Opens an image and loads it into the Foreground (centre image)
  • Paste>Fg - Pastes Copy Buffer (i.e. the Image last Copied to the Copy Buffer) to the Foreground - greyed out if nothing in the Copy Buffer.
  • Paste>Bg - Pastes Copy Buffer (i.e. the Image last Copied to the Copy Buffer) to the Background - greyed out if nothing in the Copy Buffer.
  • Undo>Fg - Copies Undo Buffer (i.e. the old Image - as it was at the start of the previous module) to the Foreground.
  • Undo>Bg - Copies Undo Buffer (i.e. the old Image - as it was at the start of the previous module) to the Background.
  • Copy - Copies the Layered composite result (right hand image) to the Copy buffer. If there is not an image in the right hand side StarTools may crash in some versions.
  • Swap - Swaps the Foreground and Background images
Layer Mode
Defines how the foreground image should be layered on top of the background image.
This layering is applied after the Filter has been applied to the Foreground.
  • Blend - Copies the foreground over the background. Change the Blend Amount to change the Fg vs Bg.
  • Lighten - Copies the pixels that are the lighter of the foreground and the background.
  • Darken - Copies the pixels that are the darker of the foreground and the background.
  • Multiply - Multiplies the background image by the foreground image.
  • Add - Adds the foreground image to the background image.
  • Subtract - Subtracts the foreground image from the background image.
  • Difference - Calculates the difference (positive or negative) between the foreground image and the background image.
  • HardLight - Dark pixels are darker, light pixels are lighter.
  • Divide - Divides the background image by the foreground image.
  • Brightness of fg - Applies the luminance ('brightness') information of the foreground to the background.
  • Color of fg - Applies the chroma ('colour') information of the foreground to the background channel.
  • Screen - Works like having two slide projectors projecting foreground and background images on top of each other.
  • Power of Inverse - The blending algorithm used in the PIP algorithm.
  • Desaturate fg (Average) - Projects a desaturated (i.e. black and white) version of the foreground over the background. The foreground is desaturated by using the average value of the combined red, green and blue channels.
  • Desaturate fg (Luminance) - Projects a desaturated (i.e. black and white) version of the foreground over the background. The foreground is desaturated by using the weighted values for the red, green and blue channels corresponding to human-perceived luminance values (0.299, 0.587 and 0.114 respectively).
  • Invert fg - Projects a negative version of the foreground on top of the background.
  • Color Extract fg - Generates an image devoid of luminance information (luminance information is set to unity), leaving only the (normalised) colour information.
  • Multiply Luminance - Multiplies the luminance info of the foreground image by the background image. Using this mode in conjunction with the Color Extract fg mode allows us to recombine luminance and colour information into one image again.
  • Multiply Compensate Gamma - Multiplies the foreground and the background and then takes the square root.
  • Distance - Calculates the magnitude as if the foreground and background were two vectors.
  • Distance, MCG Hybrid - A hybrid of the Distance and Multiply Compensate Gamma modes.
  • Overlay - Overlays the foreground image on top of the background image. It darkens the image but not as much as the Multiply mode.
  • SoftLight - Dark pixels are darker, light pixels are lighter, edges softened and colors desaturated a bit.
  • Multiply Foreground Only - takes the (filtered) foreground image and uses the Blend Amount as a multiplier - allows under- or over- exposing an image - Over-exposing may clip.
  • Default is 'Blend'
Blend Amount
Controls the relative intensity of the foreground image to the background image.
  • Default is 100%. Range is 0% to 500%.
  • For synthetic luminance - normally set so that the foreground is the same relative proportion as the components of the background.
  • Examples of how to calculate the correct blend amount are shown in the Special Techniques section above.
Cap Mode
Defines how negative and over-unity values should be treated:
  • Clip - Truncates the negative values to 0 and over-unity values to unity.
  • Normalize - stretches levels to span the whole available dynamic range.
  • Soft Clip
  • Default is 'Clip'
Offset X
Specifies the horizontal offset (in pixels) of the foreground relative to the background.
  • Default is 0.0 pixels. Range is -50.0 pixels to 950.0 pixels.
Offset Y
Specifies the vertical offset (in pixels) of the foreground relative to the background.
  • Default is 0.0 pixels. Range is -50.0 pixels to 950.0 pixels.
Brightness Mask Mode
Specifies an optional masking using the brightness information contained in both the foreground and background mode. This feature allows you to blend an image based on brightness. The available modes are:
  • Off
  • Where fg is dark, use bg
  • Where fg is light, use bg
  • Where fg is light & dark, use bg
  • Where fg is grey, use bg
  • Where composite is dark, use bg
  • Where composite is light, use bg
  • Where composite is light & dark, use bg
  • Where composite is grey, use bg
  • Default is Off
Brightness Mask Power
Sets the power that should be applied to a pixel in the brightness mask, giving you control over the range of very brightest (or darkest) pixels that will still impact the brightness mask blending procedure.
  • A lower value lowers the Brightness Mask threshold.
  • Default is 1.00. Range is 0.00 to 5.00 in 0.1 increments.
Filter Type
Specifies the type of filter to be applied to the foreground layer before layering:
  • Gaussian (Fg) - Applies a Gaussian filter with a kernel size as specified in Filter Kernel Radius
  • Median (Fg) - Applies a median filter with a window size of (1+ [Filter Kernel Radius]x2)
  • Mean of Medium Half (Fg) - Applies a 'mean of median half' filter with window size of (1+ [Filter Kernel Radius]x2)
  • Minimum (Fg) - Applies a minimum filter with window size of (1+ [Filter Kernel Radius]x2)
  • Maximum (Fg) - Applies a maximum filter with window size of (1+ [Filter Kernel Radius]x2)
  • Lightness (Fg) - Applies a maximum and minimum filter with window size of (1+ [Filter Kernel Radius]x2) to the foreground layer. It then takes the mean of the minimum and maximum.
  • Differential Adaptive Noise - Suppresses any noise increase in the foreground due to brightening.
  • Min Distance to 1/2 Unity - chooses between foreground and background values based on which value is closest to 1/2 unity (gray). Filter Kernel Radius controls the smoothness of the blend between the two.
  • Max Contrast - chooses between foreground and background values based on which adds most contrast to the image. Filter Kernel Radius controls the smoothness of the blend between the two.
  • Sobel - Performs a Sobel edge detection operation on the foreground image.
  • Median Horizontal (Fg) - Performs a horizontal median filter with a horizontal kernel size of (1+ [Filter Kernel Radius]x2) pixels.
  • Fractional Differentiation - Applies Fractional Differentiation Filtering on the foreground image. The Filter Kernel Radius governs the v parameter, while alpha is fixed at 0.5. For some images this can show additional structural detail which otherwise would be hidden.
  • Mode Approx. - Uses a fast method to approximate the Statistical Mode of a patch of pixels.
  • Localized Histogram Equalize - performs Histogram Equalisation one patch at a time.
  • Localized Histogram Optimize - calculate a non-linear transformation curve for each patch in such a way that the patch's histogram shape resembles a bell curve - This gives a much more natural look, rather than histogram equalisation, and is very effective.
  • Mean of Medium Half Distance Weighted - performs the same type of filtering as Mean of Medium Half - but weighted by distance.
  • Local Maximum Entropy RGB Selection -
  • Default is 'Gaussian (Fg)'
Filter Kernel Radius
Controls a parameter of the selected filter:
  • Kernel size for Filter Types of: Gaussian (Fg), Median Horizontal (Fg)
  • Window Size for Filter Types of: Median (Fg), Mean of Medium Half (Fg), Minimum (Fg), Maximum (Fg), Lightness (Fg)
  • Smoothness of the blend for Filter Types of: Min Distance of 1/2 Unity, Max Contrast
  • v Parameter for Filter Types of: Fractional Differentiation
  • Default is 1.0 pixels. Range is 1.0 to 51.0 pixels
Mask Fuzz
If a mask is used the Mask Fuzz parameter will ensure smooth, undetectable, transitions between the background and foreground images.
  • This parameter specifies the kernel radius of an optional Gaussian blur, to be applied to the mask.
  • Default is 1.0 pixels. Range is 1.0 to 101.0 pixels.
Background Notes:
PixInSight nearest equivalent: - GradientHDRComposition, Morphological Filters, PixelMath

Aligning two or more Images
In cases where multiple images are combined it is important that the images are exactly the same size.
If they are not you will get the error message: 'Dimension differ from already loaded file'. If you do, check the dimensions of individual data files by loading them in StarTools individually. The dimensions are listed to the right of the file name at the top of the screen.
Also, in most cases it is important to ensure all the images are aligned the same.
To ensure multiple stacked images are aligned you can use one of the sub-frames as a reference frame.
This is described for Deep Sky Stacker (DSS) and Regim in the Background Notes in LRGB Module Use notes.
When processing the images in StarTools before combining, make sure you Bin and Crop each image the same amount.

Pixel Maths
In the Layer module the resulting pixel value depends on three functions:
  • Filter(mode,blend amount, Fg,Bg) - calculated first.
  • Layer Combination(mode, kernel radius, Fg,Bg) - calculated using the result of the filter.
  • Brightness mask(mode, power, Fg,Bg) - overall mask applied to result.
This result can be used as the input and processed again.

Filter Types
See the 'Filter Type' parameter for a large selection of different filters.
The Filter Types in StarTools are similar to some of the Filter Types in Photoshop and GIMP or the Filters in PixInsight. They fall into three broad groups:
  • Noise reduction - Gaussian, Median, Mean of Medium Half, Differential Adaptive Noise, Mean of Medium Half Distance Weighted.
  • Bring out detail - Minimum, Maximum, Lightness, Local Histogram Equalize, Local Maximum Entropy RGB Selection, Sobel, Fractional Differentiation.
  • Blending Foreground and Background - Min Distance to 1/2 Unity, Max Contrast - these can be used to create High Dynamic Range composites from 2 images with different exposure lengths.
Layer Modes
The Layer Modes in StarTools specify how the background and foreground are combined. They are similar in effect to some of the GIMP Layer Modes or the Photoshop Blending Modes or PixInsight Blending Modes. See also the Wikipedia article on Blend Modes.

Layer Modes can be split into the following general groups:
  • Lightening - Lighten, Screen, Add, Power of Inverse
  • Darkening - Darken, Multiply, Multiply Luminance
  • Making Dark Darker, Light Lighter - Overlay, SoftLight, HardLight
  • Increasing Saturation - Color Extract fg
  • Desaturation (Black and White) - Desaturate fg (Average), Desaturate fg (Luminance)
  • Combining L and RGB - Brightness of fg, Color Of fg
  • More Extreme Darkening - Subtract, Difference, Divide