Assembly: Cognex.VisionPro.ImageProcessing (in Cognex.VisionPro.ImageProcessing.dll) Version: 93.1.0.0
Parameters
- inputImage
- Type: Cognex.VisionPro CogImage8Grey
The image of which to compute sharpness.
- region
- Type: Cognex.VisionPro ICogRegion
The region within inputImage to compute sharpness.
Return Value
Type: DoubleThe returned sharpness.
| Exception | Condition |
|---|---|
| CogOperatorNoInputImageException | inputImage is NULL. |
| CogImageNoPixelsException | inputImage is not allocated. |
| ArgumentException | Mode is AutoCorrelation and the height or width of inputImage is less than 3 pixels. |
| ArgumentException | Mode is AbsDiff and AbsDiffDistanceX or AbsDiffDistanceY like outside of inputImage. |
Calculates the sharpness of of the supplied inputImage within the supplied region.
If Mode is GradientEnergy, the image is processed using Gaussian smoothing before measuring sharpness.
The returned sharpness value is only valid with respect to other sharpness values computed using the current Mode and image content. You cannot compare sharpness scores generated using different methods or images.