Back to FabImage Library website

You are here: Start » Function Reference » Computer Vision » Image Analysis » CheckPresence_EdgeAmount_Deprecated

CheckPresence_EdgeAmount_Deprecated


Header: FIL.h
Namespace: fil
Module: FoundationPro

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

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

Syntax

void fil::CheckPresence_EdgeAmount_Deprecated
(
	const fil::Image& inImage,
	const fil::ShapeRegionDeprecated& inRoi,
	ftl::Optional<const fil::CoordinateSystem2D&> inRoiAlignment,
	fil::GradientMaskOperator::Type inEdgeOperator,
	fil::MagnitudeMeasure::Type inEdgeMeasure,
	const int inEdgeScale,
	int inMinStrength,
	float inMinAmount,
	float inMaxAmount,
	bool& outIsPresent,
	ftl::Optional<float&> outAmount = ftl::NIL,
	ftl::Optional<fil::Region&> outForeground = ftl::NIL,
	ftl::Optional<fil::ShapeRegionDeprecated&> outAlignedRoi = ftl::NIL
)

Parameters

Name Type Range Default Description
Input value inImage const Image& Input image
Input value inRoi const ShapeRegionDeprecated& Location at which object presence is being checked
Input value inRoiAlignment Optional<const CoordinateSystem2D&> NIL Adjusts the region of interest to the position of the inspected object
Input value inEdgeOperator GradientMaskOperator::Type Selected gradient operator
Input value inEdgeMeasure MagnitudeMeasure::Type Sum Selected method of gradient magnitude computation
Input value inEdgeScale const int 1 - 16 1 Scales the resulting gradient magnitudes
Input value inMinStrength int 0 - 255 15 Lowest acceptable edge magnitude
Input value inMinAmount float 0.0 - 1.0 0.2f Lowest acceptable fraction of pixels meeting the criteria
Input value inMaxAmount float 0.0 - 1.0 1.0f Highest acceptable fraction of pixels meeting the criteria
Output value outIsPresent bool& Flag indicating whether the object is present or not
Output value outAmount Optional<float&> NIL Fraction of pixels from meeting the criteria
Output value outForeground Optional<Region&> NIL Region of pixels meeting the criteria
Output value outAlignedRoi Optional<ShapeRegionDeprecated&> NIL Input ROI after transformation (in the image coordinates)

Optional Outputs

The computation of following outputs can be switched off by passing value ftl::NIL to these parameters: outAmount, outForeground, outAlignedRoi.

Read more about Optional Outputs.