12-02-2014 08:10 PM
12-03-2014 11:40 AM
The Image struct is intentionally left opaque in the Vision library since its implementation is subject to change. If you look at "nivision.h" you'll see the following useful function:
typedef struct ImageInfo_struct {
CalibrationUnit imageUnit; //If you set calibration information with imaqSetSimpleCalibrationInfo(), imageUnit is the calibration unit.
float stepX; //If you set calibration information with imaqSetCalibrationInfo(), stepX is the distance in the calibration unit between two pixels in the x direction.
float stepY; //If you set calibration information with imaqSetCalibrationInfo(), stepY is the distance in the calibration unit between two pixels in the y direction.
ImageType imageType; //The type of the image.
int xRes; //The number of columns in the image.
int yRes; //The number of rows in the image.
int xOffset; //If you set mask offset information with imaqSetMaskOffset(), xOffset is the offset of the mask origin in the x direction.
int yOffset; //If you set mask offset information with imaqSetMaskOffset(), yOffset is the offset of the mask origin in the y direction.
int border; //The number of border pixels around the image.
int pixelsPerLine; //The number of pixels stored for each line of the image.
void* reserved0; //This element is reserved.
void* reserved1; //This element is reserved.
void* imageStart; //A pointer to pixel (0,0).
} ImageInfo;
IMAQ_FUNC int IMAQ_STDCALL imaqGetImageInfo(const Image* image, ImageInfo* info);