Heal Module Use
Posted: Wed Apr 12, 2017 5:33 pm
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.
Heal Module
Purpose:
For a general overview see Heal
The Heal module was created to provide a means of substituting unwanted pixels in an neutral way. The elements to remove are indicated by the mask. The Heal algorithm is content aware and is able to synthesise extremely plausible substitution pixels for even the large areas.
Useful Sources
There are a number of useful links in StarTools Links and Tutorials.
The StarTools video tutorial A simple processing workflow tutorial with imperfect real-world data includes the use of the module. This shows v1.5 but is still relevant for this module.
See this description for Removing Satellite trails.
See also this description for Creating a starless image.
The notes below relate to StarTools versions 1.5-1.8
When to use:
AutoDev-{Band/Lens}-Bin-Crop-Wipe-AutoDev(or Develop)-{As needed: Decon/Sharp/Contrast/HDR/Flux/Life}-Color-{Filter}-Denoise-{If needed: Layer/Magic/Heal/Repair/Synth}
Key: {...} optional modules
Example Workflow (v1.6):
AutoDev-{Band/Lens}-Bin-Crop-Wipe-AutoDev (or Develop)-{Contrast/HDR/Sharp/Decon/Flux/Life}-Color-{Entropy/Filter}-Denoise (or Denoise 2)-{Layer/Shrink/Heal/Repair/Synth/Stereo 3D}
Key: {...} optional modules
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
Method:
There are many variations in using the Heal module. Here is a common process to remove unwanted elements.
Using the Heal module to remove satellite trails
See also the description in the topic Lens flare and artifact removal.
See also the description in the topic Creating a starless image.
See also the description Using Heal to process stars and background independently.
Mask:
For general instructions on using mask see Mask.
Sets the maximum value of new pixels (as a percentage of full white).
Temporarily grows the mask - like pressing the 'Grow' button the set number of times.
Sets the quality with which the new pixels are rendered. Higher quality settings give marginally better results but are slower.
Sets the size of the local area where the algorithm can look for good candidate seed pixels.
For a large area being healed using seed samples avoid repeating patterns. Leaving it to 0 means the heal algorithm will not use any seed samples.
Sets whether any new pixels created must be darker than the ones they replace.
This setting makes it possible to subtract the healed image from the original image.
Removing Star Trails in Comet Images
If you want to replace the star trails in an image of a comet with point stars you can use the Heal module.
A variation of this is to take an image of the stars with a shorter duration and use this as the basis for the stars-only image. This will reduce the brightness of the background stars and so highlight the comet.
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.
Heal Module
Purpose:
- To remove unwanted elements in an image (e.g. satellite trails, stars, scratches, stuck pixels, etc) and replace them with pixels similar to the surrounding pixels.
- Note: Heal is not well suited for removing noise
For a general overview see Heal
The Heal module was created to provide a means of substituting unwanted pixels in an neutral way. The elements to remove are indicated by the mask. The Heal algorithm is content aware and is able to synthesise extremely plausible substitution pixels for even the large areas.
Useful Sources
There are a number of useful links in StarTools Links and Tutorials.
The StarTools video tutorial A simple processing workflow tutorial with imperfect real-world data includes the use of the module. This shows v1.5 but is still relevant for this module.
See this description for Removing Satellite trails.
See also this description for Creating a starless image.
The notes below relate to StarTools versions 1.5-1.8
When to use:
- The Heal Module can only be used when Tracking is Off.
- It is normally used after most of the processing has been done - after the Tracking has been turned off and Denoise done.
- Can be used more than once.
AutoDev-{Band/Lens}-Bin-Crop-Wipe-AutoDev(or Develop)-{As needed: Decon/Sharp/Contrast/HDR/Flux/Life}-Color-{Filter}-Denoise-{If needed: Layer/Magic/Heal/Repair/Synth}
Key: {...} optional modules
Example Workflow (v1.6):
AutoDev-{Band/Lens}-Bin-Crop-Wipe-AutoDev (or Develop)-{Contrast/HDR/Sharp/Decon/Flux/Life}-Color-{Entropy/Filter}-Denoise (or Denoise 2)-{Layer/Shrink/Heal/Repair/Synth/Stereo 3D}
Key: {...} optional modules
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
Method:
There are many variations in using the Heal module. Here is a common process to remove unwanted elements.
- Open the Heal module.
- Create a mask highlighting the elements to be removed.
- Set 'New Must be Darker Than' as needed
- Set 'Grow Mask' as needed to replace pixels around the elements to be removed.
- Set 'New Darker Than Old' to Yes.
- 'Keep' the result when finished.
- Ensure elements to be removed are completely gone.
- Ensure the replaced pixels look natural and are not too bright (or dim) - set 'New Must be Darker Than' value to adjust.
- Ensure the area around the removed elements don't have a halo.
- Make sure you don't have star 'doughnuts' - if so, grow the mask a bit to select more pixels and then retry.
- If using the Heal module to remove elements such as satellite trails try stacking with a different stacking algorithm - such as median or sigma stacking, or some other outlier rejection stacking algorithm.
- If possible, avoid using the Heal module by removing the problem earlier on in processing - for example - by discarding bad sub-frames.
- Consider using other modules that require Tracking to be off - like Magic, Repair and Synth.
Using the Heal module to remove satellite trails
See also the description in the topic Lens flare and artifact removal.
- Open the Heal module.
- Create a mask for the satellite trail by Clearing the mask and using the 'Line Toggle (Click & Drag)' Brush Mode and clicking the start and end of the trail.
- Click 'Grow' a few times until the green line covers the whole trail.
- 'Keep' the result.
- Set 'New Must be Darker Than' to 30%.
- Set 'Grow Mask' to 3 or so as needed.
- Set 'New Darker Than Old' to Yes.
- Keep other settings at default Values.
- The trail will be removed. 'Keep' the result when you are happy with it.
See also the description in the topic Creating a starless image.
- Launch the Heal module.
- Create a mask for the stars - Mask-Auto-Stars-Do.
- If the mask picks up details that are not stars - in 'Auto', adjust 'Filter Sensitivity' as needed (Note: lower values are more sensitive - i.e. more features detected).
- If the mask picks up detail which is in a particular colour channel you can ignore that channel. To do this - in 'Auto', adjust 'Exclude Color' to stop selection of elements of that colour channel (channels are - Red, Blue, Yellow (Red + Green) and Purple (Red+Blue)).
- Manually adjust the mask to remove any remaining masking of non-stars.
- When you are happy with the mask 'Keep' it - we are then back in the Heal module.
- Set 'New Darker Than Old' to 'Yes'.
- Set 'Grow Mask' as needed to ensure all pixels are masked.
- The Heal module should remove the masked stars with all other settings at their default values.
- Go back and adjust the mask if there are outstanding stars or star halos.
- 'Keep' the result when you are happy with it.
See also the description Using Heal to process stars and background independently.
- Create a starless image as described above.
- 'Keep' the starless background image when you are happy with it.
- Save the starless image for use later.
- Create a stars-only image:
- Launch the 'Layer' module.
- Click the preset 'Undo->Bg' - this sets the background (left panel) to what is in the undo buffer - which is the original image.
- Set the 'Layer Mode' to 'Subtract' - and the result (right panel) is the extracted stars.
- 'Keep' the resulting stars-only image.
- Save the stars-only image - we will need it later.
- Process the starless image:
- Click 'Undo' - reverts to the image before the last modules' changes - to restore the starless image.
- Process the starless image as you want (e.g. Sharp, Life, Denoise, HDR etc.) until you are happy with it.
- Merge the stars back in:
- Launch the 'Layer' module - This loads the starless image in the foreground (centre panel).
- Click 'Open' and select the saved stars-only image - This will load into the foreground (centre panel) and the starless image becomes the background (left panel).
- Set the 'Layer Mode' to 'Add'.
- The resulting merged image is in the right panel.
- Click 'Keep' to keep the merged image.
Mask:
For general instructions on using mask see Mask.
- Mask areas which need to be healed.
- Set 'Grow Mask' as needed to ensure all pixels are masked.
Sets the maximum value of new pixels (as a percentage of full white).
- This is useful when the Heal algorithm generates elements that look like stars. By putting a cap on the maximum brightness these elements will not be mistaken for stars.
- Adjust this if the replacement pixels are too bright.
- Default value is 0% (Pure Black). Range is 0% to 100% (Off).
Temporarily grows the mask - like pressing the 'Grow' button the set number of times.
- Default value is 0 pixels. Range is 0 to 10 pixels.
- Set Grow Mask as needed to ensure all pixels are masked.
- A value of 2-3 is normally all that is needed.
Sets the quality with which the new pixels are rendered. Higher quality settings give marginally better results but are slower.
- Low
- Medium
- High
- Ultra
- Default value is Medium.
Sets the size of the local area where the algorithm can look for good candidate seed pixels.
- Default value is 200 pixels. Range 0 pixels to the image size.
For a large area being healed using seed samples avoid repeating patterns. Leaving it to 0 means the heal algorithm will not use any seed samples.
- Default value is 0. Range 0 to 500.
Sets whether any new pixels created must be darker than the ones they replace.
This setting makes it possible to subtract the healed image from the original image.
- Yes
- No
- Default value is No.
- Set to Yes if creating a starless image or processing stars separately - as described in the Special Techniques section.
Removing Star Trails in Comet Images
If you want to replace the star trails in an image of a comet with point stars you can use the Heal module.
- Take a sequence of comet images for stacking.
- Stack the comet images - using the comet as the alignment point. Use sigma clipping removes some if not all the stars. This gives the clear image of the comet with blurred (or reduced) stars.
- Re-stack using the stars as the alignment points. Use sigma clipping to reduce the comet. This gives a clear image of the stars with a fainter blurred image of the comet.
- Create a completely starless image using the clear comet image - as described in 'Creating a Starless Image' above.
- 'Keep' the comet-only image when you are happy with it.
- Create a stars-only image:
- Launch the 'Layer' module.
- Click the preset 'Undo->Bg' - this sets the background (left panel) to what is in the undo buffer - which is the original image.
- Set the 'Layer Mode' to 'Subtract' - and the result (right panel) is the extracted stars.
- 'Keep' the resulting stars-only image.
- Save the stars-only image - we will need it later.
- Process the comet image:
- Load the comet image.
- Process the starless comet image as you want (e.g. Sharp, Life, Denoise, HDR etc.) until you are happy with it.
- Merge the stars back in:
- Launch the 'Layer' module - This loads the comet image in the foreground (centre panel).
- Click 'Open' and select the saved stars-only image - This will load into the foreground (centre panel) and the comet image becomes the background (left panel).
- Set the 'Layer Mode' to 'Add'.
- The resulting merged image is in the right panel.
- Click 'Keep' to keep the merged image.
A variation of this is to take an image of the stars with a shorter duration and use this as the basis for the stars-only image. This will reduce the brightness of the background stars and so highlight the comet.