You are here: Start » AVL.NET » AVL.CheckPresence_EdgeAmount(AvlNet.Image, AvlNet.ShapeRegion, AvlNet.CoordinateSystem2D?, AvlNet.GradientMaskOperator, AvlNet.MagnitudeMeasure, int, int, float, float, bool, float, AvlNet.Region, AvlNet.ShapeRegion)

AVL.CheckPresence_EdgeAmount(AvlNet.Image, AvlNet.ShapeRegion, AvlNet.CoordinateSystem2D?, AvlNet.GradientMaskOperator, AvlNet.MagnitudeMeasure, int, int, float, float, bool, float, AvlNet.Region, AvlNet.ShapeRegion)

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

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


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,
	out float outAmount,
	out AvlNet.Region outForeground,
	out AvlNet.ShapeRegion outAlignedRoi
)

Parameters

inImage
Type: AvlNet.Image
Input image
inRoi
Type: AvlNet.ShapeRegion
Location at which object presence is being checked
inRoiAlignment
Type: System.Nullable<AvlNet.CoordinateSystem2D>
Adjusts the region of interest to the position of the inspected object, or null.
inEdgeOperator
Type: AvlNet.GradientMaskOperator
Selected gradient operator
inEdgeMeasure
Type: AvlNet.MagnitudeMeasure
Selected method of gradient magnitude computation
inEdgeScale
Type: System.Int32
Scales the resulting gradient magnitudes
inMinStrength
Type: System.Int32
Lowest acceptable edge magnitude
inMinAmount
Type: System.Single
Lowest acceptable fraction of pixels meeting the criteria
inMaxAmount
Type: System.Single
Highest acceptable fraction of pixels meeting the criteria
outIsPresent
Type: System.Boolean
Flag indicating whether the object is present or not
outAmount
Type: System.Single
outForeground
Type: AvlNet.Region
outAlignedRoi
Type: AvlNet.ShapeRegion

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.

See also