Contrast Module Use

Notes from users, documentation addendums.
Post Reply
Posts: 158
Joined: Thu Feb 19, 2015 8:35 am

Contrast Module Use

Post 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.
They relate to StarTools version 1.5 and later.
Please let me know if anyone sees any errors or has any additional advice they think helpful.
I will update this post as needed.
To see a full alphabetical list of module topics click here.

Contrast Module

To optimise medium-to-large local contrast (dynamic range) by doing local stretching.
  • Complements the HDR module which optimises medium-to-small local contrast, and the Sharp module for detail enhancements.
For a general overview see Contrast: Local Contrast Optimisation.
  • Adjusts stretch locally on medium-to-large elements to improve visibility.
  • Similar in approach to the Wipe module but without the masking capability.
  • Complements HDR module which adjusts stretch locally on small-to-medium elements.
Useful Sources
The Unofficial guide is also a good source of help. It relates to version 1.3.5 so there may have been some changes. The notes below relate to StarTools version 1.4.
The processing tutorial video StarTools: Lifting structures from heavy noise with the Life module Shows the use of the Contrast module between 5m55s and 6m26s.

When to use:
  • After final global stretch (Develop or AutoDev modules) and optionally after using the Decon module to reduce atmospheric effects and the Heal or Crop modules to remove larger Dark Anomalies.
  • Use before the Color module.
  • It may be that if you have used the Wipe module the scope for further enhancement is limited.
Example Workflow (v1.5):
AutoDev-{Band/Lens}-Bin-Crop-Wipe-AutoDev(or Develop)-{Decon/Sharp/Contrast/HDR/Flux/Life}-Color-{Entropy/Filter}-Denoise-{Layer/Shrink/Heal/Repair/Synth}

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

This is a way of using the module which should give good results in most cases:
  1. Identify any dark anomalies that might interfere with the automatic detection of the background level. Dark Anomalies are darker than the galactic background. Examples include dead pixels, stacking artefacts, dust particles, trees, mountains etc.
  2. For small Dark Anomalies such as dead pixels, small dust specks, or small scratches, identify and eliminate these using the Dark Anomaly Filter (and Dark Anomaly Headroom).
  3. For larger anomalies it is necessary to use the Heal or Crop modules first. There is no equivalent to the mask in the Wipe module. Using the Heal module must be done with Tracking off which may cause complications and so limit this as an option.
  4. Press 'Do'.
  5. 'Keep' the result when you are happy with it.
What result to look for:
  • Increased contrast in areas of medium to large detail within the image.
  • If halos appear it is likely that there are hot or dead pixels that have not been taken into account.
  • If detail is being lost - try reducing the Aggressiveness setting.
Ways of getting better results:
  • If you can't get the results you want with the Contrast module, try the HDR module or the Sharp module to highlight medium to small detail.
Description of Controls:

Compensate Gamma
Used to compensate for any darkening by increasing the Gamma (slight non-linear stretch).
  • Default Value is No.
  • Changing this may sometimes improve the visibility of darker features. Other modules may work on the area of interest better.
Dark Anomaly Filter
Defines the size of the dark anomalies that will be detected and stopped from interfering in the modules action. Described further here.
  • Default Value is 1 pixel. Range is 0 to 30 pixels.
  • Change to include larger dark anomalies. Common values are 2-10 pixels.
Dark Anomaly Headroom
Defines how much headroom is given to any dark anomalies detected - the percentage reduction in the number of gray levels they used to occupy.
For more information see the Background Notes below.
  • The lower the value the lower the dynamic range allocated to Dark Anomalies. 0% means no headroom is allocated - Dark Anomalies become black.
  • Higher values mean less compression of the dynamic range allocated to Dark Anomalies. 100% means no dynamic range compression.
  • Default Value is 15%. Range is 0% to 100%.
Expose Dark Areas
Specifies whether the module can be allowed to increase brightness if that benefits contrast. Normally contrast is increased only by darkening areas.
  • Setting to Yes can cause clipping.
  • Default Value is No.
  • Default value is safest - only change when the effect is truly beneficial and the negative impact is minimal.
Specifies the size and amount of samples the module takes in calculating the background level.
  • Default Value is 256x256 pixels. Possible values are 128x128, 256x256, 512x512, 1024x1024, or 2048x2048.
  • Where the gradients change quickly a higher precision (smaller sample size) may be needed.
  • Change from the default is not normally needed.
Sets how hard the module works to increase contrast.
  • The higher the aggressiveness the harder the module works to increase contrast.
  • Default Value is 75%. Range is Off (0) to 100%.
  • Reduce if losing detail - i.e. if the default (75%) is too harsh.
Background Notes:
The Contrast module uses a similar algorithm to that used by the Wipe module. As a result the effect of the Wipe module can be to reduce or eliminate the effectiveness of the Contrast module.

Dark Anomaly Headroom
The range of pixel values that represent dark anomalies contain no useful information so some of it can be reallocated to increase the dynamic range of real detail.
The Contrast Module compresses the dynamic range that Dark Anomalies use to free up dynamic range for the detail - as shown in the diagram below.
The amount of compression is controlled by the Dark Anomaly Headroom value.
Dark Anomaly Headroom
Dark Anomaly Headroom
Wipe01-3 m6.png (18.16 KiB) Viewed 3759 times
See a further description of how it works in this forum post.

The Image Scale that Contrast works on
The Contrast module works on medium-to-large areas. However terms like "medium-to-large" and "medium-to-small" are actually (and unhelpfully) image dependent.
It roughly depends on the entropy of the image at different scales (roughly corresponding with "busyness" at different scales, which itself roughly corresponds with the angular size of the image).
As a result, the same settings for Contrast may yield different effects for different images.
If the entropy at large scales is low (for example the presence of a "fog" amongst a busy star field), Contrast, regardless of (most) settings will have the effect of lifting that fog.
If that fog did not exist and we just had a busy star field, Contrast would appear to do very little.
Post Reply