imaqSetSimpleCalibration
Usage
int imaqSetSimpleCalibration(Image* image, ScalingMethod method, int learnTable, const GridDescriptor* grid, const CoordinateSystem* system);
Purpose
Sets a simple calibration for an image. In a simple calibration, a pixel coordinate is transformed to a real-world coordinate through scaling in the horizontal and vertical directions.
Note Simple calibration cannot correct for perspective distortion or nonlinear lens distortion. |
Image Types Supported
IMAQ_IMAGE_U8, IMAQ_IMAGE_U16, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64
Parameters
Name
|
Type
|
Description
|
---|---|---|
image | Image* | The image the function sets calibration information for. This image should either have no associated calibration information or simple calibration information. |
method | ScalingMethod | Defines the scaling method correction functions used to correct the image. If the image has been calibrated previously, using the imaqLearnCalibrationPoints() or imaqLearnCalibrationGrid(), this parameter is ignored and the previously defined scaling is used. IMAQ_SCALE_TO_PRESERVE_AREA and IMAQ_SCALE_TO_FIT are valid options. |
learnTable | int | Set this parameter to TRUE to process and store the correction table. The correction table accelerates the process of correcting an image and is useful if you plan to correct several images using this calibration setup. |
grid | const GridDescriptor* | Defines scaling constants for the image. If the image has been calibrated previously, using the imaqLearnCalibrationPoints() or imaqLearnCalibrationGrid(), this parameter is ignored and the previously defined scaling constants are used. |
system | const CoordinateSystem* | Defines the coordinate system for the calibrated real-world coordinates. |
Return Value
Type |
Description |
---|---|
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError(). |
Parameter Discussion
grid—Set grid to NULL to use the following default scaling constants:
xStep | 1 |
yStep | 1 |
unit | IMAQ_UNDEFINED |
system—Set system to NULL to use the following default coordinate system:
origin | {0, 0} |
angle | 0 |
axisOrientation | IMAQ_INDIRECT |