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

AVL.CheckPresence_PixelAmount(AvlNet.Image, AvlNet.ShapeRegion, AvlNet.CoordinateSystem2D?, AvlNet.HSxColorModel, int, int, int, int?, int?, int?, float, float, bool, float, AvlNet.Region, AvlNet.ShapeRegion, AvlNet.Image)

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void CheckPresence_PixelAmount(
	AvlNet.Image inImage,
	AvlNet.ShapeRegion inRoi,
	AvlNet.CoordinateSystem2D? inRoiAlignment,
	AvlNet.HSxColorModel inColorModel,
	int inBeginHue,
	int inEndHue,
	int inMinSaturation,
	int? inMaxSaturation,
	int? inMinBrightness,
	int? inMaxBrightness,
	float inMinAmount,
	float inMaxAmount,
	out bool outIsPresent,
	out float outAmount,
	out AvlNet.Region outForeground,
	out AvlNet.ShapeRegion outAlignedRoi,
	out AvlNet.Image diagHsxImage
)

Parameters

inImage
Type: AvlNet.Image
inRoi
Type: AvlNet.ShapeRegion
inRoiAlignment
Type: System.Nullable<AvlNet.CoordinateSystem2D>
inColorModel
Type: AvlNet.HSxColorModel
inBeginHue
Type: System.Int32
inEndHue
Type: System.Int32
inMinSaturation
Type: System.Int32
inMaxSaturation
Type: System.Nullable<System.Int32>
inMinBrightness
Type: System.Nullable<System.Int32>
inMaxBrightness
Type: System.Nullable<System.Int32>
inMinAmount
Type: System.Single
inMaxAmount
Type: System.Single
outIsPresent
Type: System.Boolean
outAmount
Type: System.Single
outForeground
Type: AvlNet.Region
outAlignedRoi
Type: AvlNet.ShapeRegion
diagHsxImage
Type: AvlNet.Image

Description

The filter extracts foreground pixels by means of image thresholding and checks if their number comparing to the area of the whole ROI fits the range (inMinAmount, inMaxAmount). If the input image has 3 channels, the ThresholdToRegion_HSx filter is used for thresholding, and if the image has 1 channel (i.e. it is monochromatic), the simple ThresholdToRegion filter is performed. In the latter case only inMinBrightness and inMaxBrightness parameters matter.

Examples

CheckPresence_PixelAmount performed on sample image with inMinAmount = 0.7. The defects are present in red circles.

See also