CogIPTwoImageSubtract Execute Method Cognex VisionPro 9.8 SR1
Interface for subtracting an image from another. InputImageB is subtracted from InputImageA.

Namespace: Cognex.VisionPro.ImageProcessing
Assembly: Cognex.VisionPro.ImageProcessing (in Cognex.VisionPro.ImageProcessing.dll) Version: 75.0.0.0
Syntax

public ICogImage Execute(
	ICogImage inputImageA,
	ICogImage inputImageB,
	ICogRegion regionA,
	ICogRegion regionB
)

Return Value

Type: ICogImage

The image generated by subtracting inputImageB from inputImageA

Exceptions

ExceptionCondition
CogOperatorNoInputImageException

inputImageA or inputImageB is NULL.

CogImageNoPixelsException

inputImageA or inputImageB is not allocated.

CogOperatorInvalidRegionException

The selected space of one of the regions is not a valid space of the corresponding input image.

ArgumentException

RegionModeA or RegionModeB is not AffineTransform or PixelAlignedBoundingBox.

OutOfMemoryException

Could not allocate memory for OutputImage.

CogIPNoRegionOverlapException

The regions do not overlap.

Remarks

Generates a new image that is the result of subtracting the specified regions of the two input images. If the region parameter is Nothing, the entire image is used.

See Also