Back to Aurora Vision Library website

You are here: Start » Function Reference » Image » Image Thresholding » ThresholdToRegion_Relative_DarkBright

ThresholdToRegion_Relative_DarkBright


Header: AVL.h
Namespace: avl
Module: FoundationBasic

Thresholds an image using two relative thresholds and produces two regions (Dark and Bright) in a single image pass.

Applications: This filter can replace two instances of ThresholdToRegion_Relative which may slightly improve performance.

Syntax

C++
C#
 
void avl::ThresholdToRegion_Relative_DarkBright
(
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inRoi,
	const avl::Image& inBaseImage,
	float inDarkThreshold,
	float inBrightThreshold,
	float inHysteresis,
	avl::Region& outDarkRegion,
	avl::Region& outBrightRegion
)

Parameters

Name Type Range Default Description
Input value inImage const Image& Input image
Input value inRoi Optional<const Region&> NIL Region of interest
Input value inBaseImage const Image& Pixels of this image are subtracted from inImage before thresholding
Input value inDarkThreshold float 64.0f Maximum relative value of a pixel that is considered DarkRegion
Input value inBrightThreshold float 192.0f Minimum relative value of a pixel that is considered BrightRegion
Input value inHysteresis float 0.0 - 0.0f Defines how much the threshold criteria are lowered for pixels neighboring with other foreground pixels
Output value outDarkRegion Region& Region of pixels equal or lower than inDarkThreshold
Output value outBrightRegion 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.

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.