beautypg.com

Returns, Parameters – Sensoray 2246 User Manual

Page 43

background image

Returns:

number of bytes read (image size) or MID2246_SNAP_ERR_UNSPECIFIED -1
MID2246_SNAP_ERR_BUFSIZE -2 'Size' of buffer provided is too small for snapshot.
MID2246_SNAP_ERR_BIST -3 Built in self test failed. Hardware not ready.
MID2246_SNAP_ERR_SYNCH -4 Aquisition's synchronization loop timed out.
MID2246_SNAP_ERR_CRITSEC -5 Aquisition's critical section already locked, and user doesn't
want to wait for it. MID2246_SNAP_ERR_PARTBUF -6 Didn't recieve a full frame of data.
MID2246_SNAP_ERR_DVBUF -7 Failed to get current frame buffer from DV
MID2246_SNAP_ERR_DVGRAB -8 The DV frame grabber was not setup
MID2246_SNAP_ERR_USERERR -9 Error returned from user's merge function

MID2246_API int SN_SnapshotToMem (BYTE * image, int size, int freezetime, int wait, int

board)

Get snapshot to memory function. Retrieves processed image into memory. Image is
converted to RGB (1 byte per color) and then the fields are merged using the algorithm set by
SN_SetMergeMethod().

Parameters:

image IN/OUT pointer to retrieved snapshot.
size is the size of the image buffer.
freezetime is the time, in milli-sec to freeze the image on the monitor. (a minimum value greater
than the video frame rate is required)
wait wait =1 will wait if operations pending(board locked), wait=0 returns error if board busy
board ID if multiple boards installed.

Returns:

number of bytes read (image size) or MID2246_SNAP_ERR_UNSPECIFIED -1
MID2246_SNAP_ERR_BUFSIZE -2 'Size' of buffer provided is too small for snapshot.
MID2246_SNAP_ERR_BIST -3 Built in self test failed. Hardware not ready.
MID2246_SNAP_ERR_SYNCH -4 Aquisition's synchronization loop timed out.
MID2246_SNAP_ERR_CRITSEC -5 Aquisition's critical section already locked, and user doesn't
want to wait for it. MID2246_SNAP_ERR_PARTBUF -6 Didn't recieve a full frame of data.
MID2246_SNAP_ERR_DVBUF -7 Failed to get current frame buffer from DV
MID2246_SNAP_ERR_DVGRAB -8 The DV frame grabber was not setup
MID2246_SNAP_ERR_USERERR -9 Error returned from user's merge function

MID2246_API int SN_SnapshotRaw (BYTE * image, int size, image_raw_t * pImage, int

freezetime, int wait, int board)

Get snapshot data from hardware only. This function does no processing on the image, it just
retrieves a pointer to the raw fields(field 1 will be null for 720p format) in YCrCb format

Parameters:

image is a pointer to pre-allocated space for image
size is the size of image array above
pImage is a pointer to the returned raw image fields
freezetime is the time, in milli-sec to freeze the image on the monitor. (a minimum value greater
than the video frame rate is required)
wait wait=1 will wait if operations pending(board locked), wait=0 returns error if board busy
board ID if multiple boards installed.

Returns:

number of bytes read (image size) or MID2246_SNAP_ERR_UNSPECIFIED -1
MID2246_SNAP_ERR_BUFSIZE -2 'Size' of buffer provided is too small for snapshot.
MID2246_SNAP_ERR_BIST -3 Built in self test failed. Hardware not ready.
MID2246_SNAP_ERR_SYNCH -4 Aquisition's synchronization loop timed out.

43