19
C
AMERA
S
UPPORT
L
IBRARY
C
AM
L
IB
camAcquireImage
This function performs an image acquisition and delivers the image data to the application. If called when
the camera is running in the video mode, the function delivers the image of the most recent video frame.
The image buffer of the size sufficient to hold at least one frame of the entire image (1280 x 960 eight-bit
pixels maximum) should be allocated by the application prior to calling the function, and the pointer to it
along with the information about the buffer’s size should be passed to the function.
In the snapshot mode the image buffer is automatically mapped into the memory space of the IS4910
device driver, so that the image acquisition is done directly to the buffer.
In the video mode, the actual image acquisition is done into the buffer provided by the camStartVideo()
function, and upon the completion, if the image buffer specified by the application is not NULL, the image
is copied into it.
Prototype:
int camAcquireImage (int cam_handle, unsigned char *image_buf, long image_buf_size);
Parameters:
cam_handle - [in] handle to the camera device returned by the camOpen function.
image_buf - [out] image data buffer.
image_buf_size - [in] image data buffer’s size, in bytes.
Return Value:
0: Success; -1: Failure
camAcquireImageEx
This function performs an image acquisition and delivers the image data to the application. If called when
the camera is running in the video mode, the function delivers the image of the most recent video frame.
The image buffer of the size sufficient to hold at least one frame of the entire image (1280 x 960 eight-bit
pixels maximum) should be allocated by the application prior to calling the function, and the pointer to it
along with the information about the buffer’s size should be passed to the function.
In the snapshot mode the image buffer is automatically mapped into the memory space of the IS4910
device driver, so that the image acquisition is done directly to the buffer.
In the video mode, the actual image acquisition is done into the buffer provided by the camStartVideo()
function, and upon the completion, if the image buffer specified by the application is not NULL, the image
is copied into it.
This function performs similarly to the function camAcquireImage(), except that it also returns the frame
offset. In the snapshot mode, the frame offset is always 0. In the video mode, the frame offset
represents the offset in bytes of the returned image from the beginning of the image buffer, the pointer to
which was specified in the call to camStartVideo().
Prototype:
int camAcquireImageEx (int cam_handle, unsigned char *image_buf, long image_buf_size, long
*frame_offset);