Thresholds an image with a different threshold value for each pixel (inBaseImage(x, y) + inValue).
|inRoi||Region*||Region of interest|
|inBaseImage||Image||Pixels of this image are subtracted from inImage before thresholding|
|inMinRelativeValue||Real*||Minimum relative value of a pixel that is considered foreground (Auto = -INF)|
|inMaxRelativeValue||Real*||Maximum relative value of a pixel that is considered foreground (Auto = +INF)|
|inFuzziness||Real||0.0 -||A tolerance for inMin/MaxRelativeValue that results in intermediate output values|
The operation transforms each pixel value of inImage to the maximum or minimum level thus creating binary image. The result of the transformation depends on the pixel intensity compared with the intensity of the inBaseImage pixels:
- Pixels that are brighter than corresponding pixels of inBaseImage by at least inMinRelativeValue and at most inMaxRelativeValue are transformed to the maximum level.
- Other pixel values are transformed to the minimum level.
If any of the parameters inMinRelativeValue, inMaxRelativeValue is not set, it is assumed to be, accordingly, -infinity or infinity.
Parameter inFuzziness (set to 0 by default) allows to perform fuzzy thresholding which linearly interpolates those pixel values that differ by at most inFuzziness from the border intensities; thus creating smooth transition between minimum and maximum values in the resulting image (see Remarks section).
In the multichannel images the operation uses an average of channel values in each pixel, thus the resulting image is always monochromatic.
This operation is optimized for SSE2 technology for pixels of types: 1xUINT8 (for inFuzziness = 0), 3xUINT8 (for inFuzziness = 0).
This operation is optimized for AVX2 technology for pixels of types: 1xUINT8 (for inFuzziness = 0), 3xUINT8 (for inFuzziness = 0).
This operation supports automatic parallelization for multicore and multiprocessor systems.
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
|DomainError||Image formats are not the same in ThresholdImage_Relative.|
|DomainError||Image sizes are not equal in ThresholdImage_Relative.|
|DomainError||Region exceeds an input image in ThresholdImage_Relative.|
This filter is available on Advanced Complexity Level.
This filter is member of ThresholdImage filter group.
- ThresholdToRegion_Relative – Thresholds an image with a different threshold value for each pixel (inBaseImage(x, y) + inValue).