You are here: Start » AVL.NET » Function Reference » Image » Image Thresholding » AVL.ThresholdToRegion_Relative_DarkBright
Thresholds an image using two relative thresholds and produces two regions (Dark and Bright) in a single image pass.
Namespace: | AvlNet |
---|---|
Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void ThresholdToRegion_Relative_DarkBright ( AvlNet.Image inImage, NullableRef<AvlNet.Region> inRoi, AvlNet.Image inBaseImage, float inDarkThreshold, float inBrightThreshold, float inHysteresis, AvlNet.Region outDarkRegion, AvlNet.Region outBrightRegion )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImage | AvlNet.Image | Input image. | |||
inRoi | AvlNet.NullableRef<AvlNet.Region> | Region of interest. Default value: atl::NIL. | |||
inBaseImage | AvlNet.Image | Pixels of this image are subtracted from inImage before thresholding. | |||
inDarkThreshold | float | 64.0f | Maximum relative value of a pixel that is considered DarkRegion. Default value: 64.0f. | ||
inBrightThreshold | float | 192.0f | Minimum relative value of a pixel that is considered BrightRegion. Default value: 192.0f. | ||
inHysteresis | float | <0.0f, INF> | 0.0f | Defines how much the threshold criteria are lowered for pixels neighboring with other foreground pixels. Default value: 0.0f. | |
outDarkRegion | AvlNet.Region | Region of pixels equal or lower than inDarkThreshold. | |||
outBrightRegion | AvlNet.Region | Region of pixels equal or greater than inBrightThreshold. |
Hardware Acceleration
This operation is optimized for SSE2 technology for pixels of types: 1xUINT8, 3xUINT8.
This operation is optimized for NEON technology for pixels of types: 1xUINT8, 3xUINT8.
This operation supports automatic parallelization for multicore and multiprocessor systems.
Hardware acceleration settings may be manipulated with Settings class.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Image formats are not the same in ThresholdToRegion_Relative_DarkBright. |
DomainError | Image sizes are not equal in ThresholdToRegion_Relative_DarkBright. |
DomainError | Region exceeds an input image in ThresholdToRegion_Relative_DarkBright. |