-range-threshold low-black,low-white,high-white,high-black
Perform either hard or soft thresholding within some range of values in an image. Values may be expressed in quantumrange or percents and should be monotonically increasing, but can have same values. No decreases should be used.
A soft range-threshold ramps from black to white, stays at white for while, then ramps down to black again.
Code: Select all
magick -size 50x256 gradient: -rotate 90 -range-threshold 20,40,60,80% soft_thresh.png
Profile:
A hard range-threshold is black for a while, then white for while, then black for while. This is done by duplicating the first two values and duplicating the last two values.
Code: Select all
magick -size 50x256 gradient: -rotate 90 -range-threshold 40,40,60,60% hard_thresh.png
Profile: