You are here: Start » AVL.NET » Function Reference » Computer Vision » 2D Edge Detection » AVL.DetectEdges_AsRegion

AVL.DetectEdges_AsRegion

Extracts a pixel-precise region of continuous edges.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void DetectEdges_AsRegion
(
	AvlNet.Image inImage,
	AvlNet.EdgeFilter inEdgeFilter,
	float inStdDevX,
	float inEdgeThreshold,
	float inEdgeHysteresis,
	float inMaxJoiningDistance,
	int inMinBlobArea,
	AvlNet.Region outEdgeRegion
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageImage from which edges will be extracted.
inEdgeFilterAvlNet.EdgeFilterType of edge filter used for computing gradients.
inStdDevXfloat<0.0f, INF>2.0fAmount of horizontal smoothing used by the edge filter. Default value: 2.0f.
inEdgeThresholdfloat<0.0f, INF>15.0fSufficient edge strength; edges of that strength will always be detected. Default value: 15.0f.
inEdgeHysteresisfloat<0.0f, INF>5.0fValue by which the edge threshold is decreased for edge points neighboring with sufficiently strong edges. Default value: 5.0f.
inMaxJoiningDistancefloat<0.0f, INF>0.0fMaximal distance between edges that can be joined. Default value: 0.0f.
inMinBlobAreaint<0, INF>1Minimal area of an edge blob. Default value: 1.
outEdgeRegionAvlNet.RegionRegion of the found edges.

Description

The operation extracts edges from the inRoi region in the inImage image and stores the result in the outEdgeRegion region. The extraction process is the same as in DetectEdges_AsPaths, the only difference being the data type of the result. This filter returns a region rather than array of subpixel-precise paths computed by DetectEdges_AsPaths.

The extraction process starts from gradient computing. Depending on which edge filter is chosen, gradients are computed using recursive (Deriche or Lanser) or standard non-recursive filter proposed by Canny. The inStdDevX and inStdDevY parameters control size of the filter mask. The greater their values are, the larger this size is. It should be noted that the execution time of the non-recursive filter depends greatly on the size of the filter mask, while the recursive filters execution time is independent of it.

On the so computed gradient image threshold with hysteresis (as in ThresholdImage_Hysteresis) is performed with inEdgeThreshold and inEdgeHysteresis parameters. After this step only gradients which are strong enough are present. The resulting edge region can be much too thick, thus it has to be thinned. To achieve this, the non-maximum suppression is used. Every pixel with at least one of its neighbors having larger gradient is no longer considered to be an edge pixel (only neighbors in the direction of pixel's gradient matter).

Examples

DetectEdges_AsRegion performed on the sample image with inEdgeFilter = Canny, inStdDevX = 2.0, inStdDevY = 2.0, inEdgeThreshold = 10, inEdgeHysteresis = 5.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

Hardware acceleration settings may be manipulated with Settings class.

Function Overrides

See also