Assembly: Cognex.VisionPro.CalibFix (in Cognex.VisionPro.CalibFix.dll) Version: 73.0.0.0
Parameters
- inputImage
- Type: Cognex.VisionPro ICogImage
The run-time image. The computed calibration space is attached to this image's coordinate space tree. If ComputationMode is PerspectiveAndRadialWarp, then this image is warped to remove the perspective and radial distortion.
- runParams
- Type: Cognex.VisionPro.CalibFix CogCalibCheckerboardRunParams
An CogCalibCheckerboardRunParams containing the run-time parameters.
Return Value
Type: ICogImageThe output image.
| Exception | Condition |
|---|---|
| CogCalibFixCannotWarpException | The transform between the selected space of inputImage and its pixels differs by more than a whole-pixel shift from the similar transformation object contained in the CalibrationImage. |
| CogSecurityViolationException | Security is not enabled for this vision tool. See Resolving Security Related Error Messages for more information. |
| CogImageBadTypeException | inputImage is incompatible with CalibrationImage. If CalibrationImage is CogImage8Grey, inputImage can be either CogImage8Grey or CogImage24PlanarColor. If CalibrationImage is CogImage16Grey, inputImage must also be CogImage16Grey. |
| CogOperatorNoInputImageException | inputImage is NULL. |
| CogOperatorNoRunParamsException | runParams is NULL. |
| ArgumentException | runParams.UnfilledPelValue is greater than 255 and inputImage is CogImage8Grey or CogImage24PlanarColor. |
| CogCalibFixNotCalibratedException | This object has not been calibrated. |
If ComputationMode is Linear, this method attaches the calibrated space to the coordinate tree of the inputImage. The new space is defined using the GetComputedUncalibratedFromCalibratedTransform transform that was last computed by this object. Its non-qualified name is determined by the value of the CalibratedSpaceName supplied within runParams. The method returns a newly created output image which shares the pixels and tree of the input image. The selected space name of the returned image is determined by the SpaceToOutput supplied within runParams.
If ComputationMode is PerspectiveAndRadialWarp, this method warps inputImage to remove nonlinear (radial and perspective) distortion. The warped image is provided as the output image and the calibrated space is added to its coordinate tree. As in linear mode, the non-qualified name is determined by the value of the CalibratedSpaceName supplied within runParams and the selected space name of the returned image is determined by the SpaceToOutput supplied within runParams.
No error results if the calibrated space already exists in the coordinate space tree of the input image prior to running the method. Instead, the existing definition of the calibrated space is updated using the computed UncalibratedFromCalibrated transform.