You are here: Start » FIL.NET » FIL.CheckPresence_EdgeAmount
Verifies object presence by analysing the amount of edges in the specified region.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void CheckPresence_EdgeAmount ( FilNet.Image inImage, FilNet.ShapeRegion inRoi, FilNet.CoordinateSystem2D? inRoiAlignment, FilNet.GradientMaskOperator inEdgeOperator, FilNet.MagnitudeMeasure inEdgeMeasure, int inEdgeScale, int inMinStrength, float inMinAmount, float inMaxAmount, out bool outIsPresent, out float outAmount, FilNet.Region outForeground, out FilNet.ShapeRegion outAlignedRoi )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | FilNet.Image | Input image. | ||
![]() | inRoi | FilNet.ShapeRegion | Location at which object presence is being checked. | ||
![]() | inRoiAlignment | FilNet.CoordinateSystem2D? | Adjusts the region of interest to the position of the inspected object. Default value: ftl::NIL. | ||
![]() | inEdgeOperator | FilNet.GradientMaskOperator | Selected gradient operator. | ||
![]() | inEdgeMeasure | FilNet.MagnitudeMeasure | Sum | Selected method of gradient magnitude computation. Default value: Sum. | |
![]() | inEdgeScale | int | <1, 16> | 1 | Scales the resulting gradient magnitudes. Default value: 1. |
![]() | inMinStrength | int | <0, 255> | 15 | Lowest acceptable edge magnitude. Default value: 15. |
![]() | inMinAmount | float | <0.0f, 1.0f> | 0.2f | Lowest acceptable fraction of pixels meeting the criteria. Default value: 0.2f. |
![]() | inMaxAmount | float | <0.0f, 1.0f> | 1.0f | Highest acceptable fraction of pixels meeting the criteria. Default value: 1.0f. |
![]() | outIsPresent | bool | Flag indicating whether the object is present or not. | ||
![]() | outAmount | float | Fraction of pixels from meeting the criteria. | ||
![]() | outForeground | FilNet.Region | Region of pixels meeting the criteria. | ||
![]() | outAlignedRoi | FilNet.ShapeRegion | Input ROI after transformation (in the image coordinates). |
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.
Function Overrides
- CheckPresence_EdgeAmount(Image, ShapeRegion, GradientMaskOperator, MagnitudeMeasure, Int32, Int32, Single, Single, Boolean)
- CheckPresence_EdgeAmount(Image, ShapeRegion, Nullable<CoordinateSystem2D>, GradientMaskOperator, MagnitudeMeasure, Int32, Int32, Single, Single, Boolean)
- CheckPresence_EdgeAmount(Image, ShapeRegion, GradientMaskOperator, MagnitudeMeasure, Int32, Int32, Single, Single, Boolean, NullableValue<Single>, NullableRef<Region>, INullable<ShapeRegion>)
- CheckPresence_EdgeAmount(Image, ShapeRegion, Nullable<CoordinateSystem2D>, GradientMaskOperator, MagnitudeMeasure, Int32, Int32, Single, Single, Boolean, NullableValue<Single>, NullableRef<Region>, INullable<ShapeRegion>)