Function documentation - image capture functions, Parameters, Returns – Sensoray 2246 User Manual

Page 42

Advertising
background image

Function Documentation - Image capture functions

MID2246_API int SN_SetMergeMethod (MID2246_FIELDALG merge_method, mergefunc_t *

custom_alg, int board)

Set the interlaced field merging algorithm

Parameters:

merge_method is the method in mid2246const.h. If custom, specify function custom_alg
custom_alg is the custom merge algorithm. ( see above mergefunc_t description )
board ID if multiple boards installed.

Returns:

0 on success

MID2246_API int SN_SnapshotToFile (char * szFilename, int filetype, int freezetime, int

wait, int qual, int CustMergeSize, int board)

Takes a snapshot and saves to file in filename

Parameters:

szFilename is the fully qualified file + path (without extension)
filetype is the file type to save( see mid2246const.h: MID2246_FILE_JPEG and/or
MID2246_FILE_BMP)
freezetime is the time, in milli-sec to freeze the image. (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
qual Sets JPEG quality, (use 25-100, default 100).
CustMergeSize Size in bytes of the buffer sent to the custom image merge call back.
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_SnapshotToFileW (LPWSTR pFile, int filetype, int freezetime, int wait,

int qual, int CustMergeSize, int board)

Unicode version of SN_SnapshotToFile. Takes a snapshot and saves to file.

Parameters:

pFile Full filename plus path and no extension in unicode (Windows WideChar)
filetype is the file type to save( see mid2246const.h: MID2246_FILE_JPEG and/or
MID2246_FILE_BMP)
freezetime is the time, in milli-sec to freeze the image. (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
qual Sets JPEG quality, (use 25-100, default 100).
CustMergeSize Size in bytes of the buffer sent to the custom image merge call back.
board ID if multiple boards installed.

42

Advertising