Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Image Analysis » CheckPresence_EdgeAmount

CheckPresence_EdgeAmount


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

Name Type Range Description
inImage Image Input image
inRoi ShapeRegion Location at which object presence is being checked
inRoiAlignment CoordinateSystem2D* Adjusts the region of interest to the position of the inspected object
inEdgeOperator GradientMaskOperator Selected gradient operator
inEdgeMeasure MagnitudeMeasure Selected method of gradient magnitude computation
inEdgeScale Integer 1 - 16 Scales the resulting gradient magnitudes
inMinStrength Integer 0 - 255 Lowest acceptable edge magnitude
inMinAmount Real 0.0 - 1.0 Lowest acceptable fraction of pixels meeting the criteria
inMaxAmount Real 0.0 - 1.0 Highest acceptable fraction of pixels meeting the criteria
outIsPresent Bool Flag indicating whether the object is present or not
outAmount Real Fraction of pixels from meeting the criteria
outForeground Region Region of pixels meeting the criteria
outAlignedRoi ShapeRegion Input ROI after transformation (in the image coordinates)

Applications

Quick and easy presence verification, e.g. for missing caps, screws, labels.

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.

Hints

  • Connect the inImage input with an appropriate image source. Make sure that this image is available (the program was previously run).
  • If the object location is variable, Connect an appropriate local coordinate system to inRoiAlignment.
  • Define inRoi to specify the image location at which the object presence will be checked.
  • Set inMinStrength to a value that results in good edges visible on the outForeground output.
  • Investigate the values that appear on the outAmount output, then set inMinAmount and inMaxAmount to values appropriate for correct objects.
  • When creating data previews, use outAlignedRoi and NOT inRoi as only the former will be properly aligned to the object location.

Examples

Description of usage of this filter can be found in examples and tutorial: Tablets.

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.

Complexity Level

This filter is available on Basic Complexity Level.

Filter Group

This filter is member of CheckPresence filter group.

See Also

  • ThresholdToRegion_HSx – Creates a region containing image pixels which belongs to specified region in HSV, HSL or HSI space.
  • ThresholdToRegion – Creates a region containing image pixels with values within the specified range.