New -range-threshold operator in IM 7

Announcements pertaining to ImageMagick, or ImageMagick related software. This list is moderated. No discussions here, instead post to the users group instead.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

New -range-threshold operator in IM 7

Post by fmw42 »

As of IM 7.0.8.10, there is a new function:

-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
Image

Profile:

Image



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
Image

Profile:

Image
Post Reply