imaqGetPixelAddress

NI Vision for LabWindows/CVI Function

imaqGetPixelAddress

Usage

void* imaqGetPixelAddress(const Image* image, Point pixel);

Purpose

Returns the address of a given pixel in an image. If the requested pixel location is outside of the image, the function fails and returns NULL.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_U16, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name

Type

Description

image const Image* The image containing the requested pixel.
pixel Point The coordinates of the pixel whose pointer the function retrieves.

Return Value

Type

Description

void* On success, this function returns a pointer to the requested pixel in the image. The type of the pointer the function returns depends on the type of the image, as follows:

Image Type Pointer Type
IMAQ_IMAGE_U8 unsigned char
IMAQ_IMAGE_U16 unsigned short
IMAQ_IMAGE_I16 short
IMAQ_IMAGE_SGL float
IMAQ_IMAGE_COMPLEX Complex structure
IMAQ_IMAGE_RGB RGBValue structure
IMAQ_IMAGE_HSL HSLValue structure
IMAQ_IMAGE_RGB_U64 RGBU64Value structure


On failure, this function returns NULL. To get extended error information, call imaqGetLastError().