Scripting command: forcedynamic [Sample=0...1] [Exclude=0...1]
This will change the contrast of the selected area in such a way as to push the minimum and maximum measured levels to the minimum and maximum possible levels. You can use the sample tool directly or with the eyedropper to sample the area first, and then adjust a different area with this tool, or you can have the operator do the sampling directly by checking ✓ Take Sample From Area
When ✓ Take Sample From Area is checked, ✓ Exclude Soft Edges tells the sample taken from the area selection to ignore pixel values underneath soft edges of the selection; otherwise, particularly when scripting or using Redo, the sample would include information from pixels that were partly processed by previous operations, which can give you quite different results than what you were expecting.
Force dynamic is a very interesting and useful operator. It is well worth the time it takes to get familiar with it. What it does is, based upon the contrast range in the sampled area (which can be the selected area, or an area you sampled previously), it adjusts the contrast so that the maximum possible dynamic range — that is, the brightest to the darkest possible values without damaging the color balance of the sampled area — is used by the selected region.
Forced dynamic can be used to bring up faint details in a controlled manner, to enhance astrophotos, radiological images, and increase clothing transparency in fashion and glamour shots.
I've taken this image, un-checked ✓ Take Sample From Area in the Force Dynamic operator, selected the Rectangle tool, clicked Sample and Apply Entire, and pulled the rectangle around the barely visible structure at the center of the bulb. Once the sample was taken, the Operators dialog returned to the Force Dynamic operator and applied it to the entire image; the result you can see below.
So what happened here is that the sample tool measured the maximum and minimum levels in the selected area (the rectangle) and then Force dynamic operator pushed the entire image so that those levels reached the maximum dynamic range possible, and in so doing, the inner structure of the LED bulb, previously of such low contrast as to be almost invisible, is revealed.
|Please consider supporting my iToolBox development efforts with a small PayPal donation.|