Thresholds an image relatively to the average pixel value in a local rectangular neighborhood.
|inRoi||Region*||Region in which pixels are written|
|inSourceRoi||Region*||Region from which pixels are read|
|inRadiusX||Integer||0 - 65535||Horizontal radius of internal mean blur|
|inRadiusY||Integer*||0 - 65535||Vertical radius of internal mean blur (Auto = inRadiusX)|
|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)|
|inHysteresis||Real||0.0 -||Defines how much the threshold criteria are lowered for pixels neighboring with other foreground pixels|
|diagBaseImage||Image||Diagnostic blurred image.|
The operation is a cousin of ThresholdImage_Dynamic yet computes a region instead of an image. The resulting region contains only those pixels of the input image, which are brighter at least by inMinRelativeValue and at most by inMaxRelativeValue than the local average. If any of the parameters inMinRelativeValue, inMaxRelativeValue is not set, it is assumed to be, accordingly, -infinity or infinity.
Pixel neighbourhood used to compute the local average is a rectangle of dimensions centered at the pixel being processed.
In the multichannel images the operation uses an average of channel values in each pixel.
- Define inMinRelativeValue to extract objects which are brighter than the neighborhood.
- Define inMaxRelativeValue to extract objects which are darker than the neighborhood.
- Increase inRadiusX (and optionally inRadiusY) to define a bigger neighborhood.
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
|DomainError||Region exceeds an input image in ThresholdToRegion_Dynamic.|
|DomainError||Roi exceeds image dimensions in ThresholdToRegion_Dynamic.|
|DomainError||Source roi exceeds image dimensions in ThresholdToRegion_Dynamic.|
This filter is available on Basic Complexity Level.
This filter is member of ThresholdToRegion filter group.
- ThresholdImage_Dynamic – Thresholds an image relatively to some value calculated in a local rectangular neighbourhood.