CogBlobResult GetBoundingBox Method Cognex VisionPro
Gets a bounding box of the blob that is aligned with the specified axis. The exclude extrema properties of the run parameters are used when calculating the bounding box, except when Axis is set to CogBlobAxisConstants::PixelAlignedNoExclude.

Namespace: Cognex.VisionPro.Blob
Assembly: Cognex.VisionPro.Blob (in Cognex.VisionPro.Blob.dll) Version: 65.1.0.0
Syntax

public CogRectangleAffine GetBoundingBox(
	CogBlobAxisConstants axis
)

Return Value

Type: CogRectangleAffine
The returned bounding box: a CogRectangleAffine.
Exceptions

ExceptionCondition
ArgumentExceptionaxis is not a member of CogBlobAxisConstants.
CogBlobEntireBlobExcludedException The entire blob has been excluded because you specified an extrema exclusion setting greater than or equal to the area of the blob.
InvalidOperationException If no result data is available.
Remarks

Gets a bounding box of the blob that is aligned with the specified axis. The run-time ExtremaExcludeMode settings are used when calculating the bounding box, except when axis is set to PixelAlignedNoExclude.

The returned bounding box is in the selected space of the InputImage.

Note: If you specify PixelAlignedNoExclude for axis, the tool ignores the extrema exclusion settings and returns a graphic that is in the pixel space of the input image. This option requires less time than the other options to execute.
See Also