CogHistogram Execute Method Cognex VisionPro
Generates a histogram from the provided InputImage and optional Region, creating a CogHistogramResult object that provides the result of the analysis. If Region is nothing then histogram will be generated from the entire InputImage.

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

public CogHistogramResult Execute(
	ICogImage inputImage,
	ICogRegion region
)

Parameters

inputImage
Type: Cognex.VisionPro ICogImage

The image for which to generate a histogram.

region
Type: Cognex.VisionPro ICogRegion

A region that, together with the RegionMode and InputImageMask, specifies the region of the image for which the histogram will be generated.

Return Value

Type: CogHistogramResult

The histogram result.

Exceptions

ExceptionCondition
CogOperatorNoInputImageException

inputImage is NULL.

CogImageNoPixelsException

inputImage is not allocated.

CogOperatorInvalidRegionException

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

ArgumentException

RegionMode is not PixelAlignedBoundingBox or PixelAlignedBoundingBoxAdjustMask.

OUTOFMEMORYException

Could not allocate memory for OutputImage.

Remarks

Generates a histogram from the provided inputImage and optional region, creating a CogHistogramResult object that provides the result of the analysis. If region is Nothing (the default), the histogram will be generated from the entire inputImage.

See Also