You are here: Start » AVL.NET » Function Reference » Computer Vision » Image Analysis » AVL.CheckPresence_EdgeAmount

AVL.CheckPresence_EdgeAmount

Verifies object presence by analysing the amount of edges in the specified region.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void CheckPresence_EdgeAmount
(
	AvlNet.Image inImage,
	AvlNet.ShapeRegion inRoi,
	AvlNet.CoordinateSystem2D? inRoiAlignment,
	AvlNet.GradientMaskOperator inEdgeOperator,
	AvlNet.MagnitudeMeasure inEdgeMeasure,
	int inEdgeScale,
	int inMinStrength,
	float inMinAmount,
	float inMaxAmount,
	out bool outIsPresent
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageInput image.
inRoiAvlNet.ShapeRegionLocation at which object presence is being checked.
inRoiAlignmentAvlNet.CoordinateSystem2D?Adjusts the region of interest to the position of the inspected object. Default value: atl::NIL.
inEdgeOperatorAvlNet.GradientMaskOperatorSelected gradient operator.
inEdgeMeasureAvlNet.MagnitudeMeasureSumSelected method of gradient magnitude computation. Default value: Sum.
inEdgeScaleint<1, 16>1Scales the resulting gradient magnitudes. Default value: 1.
inMinStrengthint<0, 255>15Lowest acceptable edge magnitude. Default value: 15.
inMinAmountfloat<0.0f, 1.0f>0.2fLowest acceptable fraction of pixels meeting the criteria. Default value: 0.2f.
inMaxAmountfloat<0.0f, 1.0f>1.0fHighest acceptable fraction of pixels meeting the criteria. Default value: 1.0f.
outIsPresentboolFlag indicating whether the object is present or not.

Description

The filter extracts foreground pixels and checks if their number comparing to the area of the whole ROI fits the range (inMinAmount, inMaxAmount). The pixel is considered a foreground pixel if and only if its gradient magnitude is at least inMinStrength.

Examples

CheckPresence_EdgeAmount performed on sample images with inMinAmount = 0.2. In the left image the object is present, while in the right image it is not. Green pixels are foreground pixels.

Errors

List of possible exceptions:

Error type Description
DomainError Region exceeds an input image in CheckPresence_EdgeAmount.

Function Overrides

See also