Home > C: Programming > AVI Function Descriptions > | History back Previous chapter Next chapter Print |
isavi_SetImageSize |
uEye Camera Manual Version 3.80
isavi_SetImageSize
USB 2.0 GigE |
- |
Syntax
INT isavi_SetImageSize (INT nAviID,
INT cMode,
long Width, long Height,
long PosX, long PosY,
long LineOffset)
Description
isavi_SetImageSize() sets the size and position of the area of interest which will be saved to the AVI file. Only the defined area of interest of each frame will be saved. In addition, this function specifies the input color format of the frames. You define these settings only once for the entire video.
|
|
Input Parameters
nAviID |
Instance ID set by the isavi_InitAVI() function. |
cMode |
Color format of the input frames captured by the uEye. |
Width |
Width of the entire frame or of the area of interest. |
Height |
Height of the entire frame or of the area of interest. |
PosX |
X position (offset) of the area of interest. |
PosY |
Y position (offset) of the area of interest. |
LineOffset |
Line increment. The line increment is the difference between the width of the entire frame (in pixel) and the area of interest (in pixel). |
Return Values
IS_AVI_NO_ERR |
Function executed successfully |
IS_AVI_ERR_INVALID_ID |
The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). |
IS_AVI_ERR_INVALID_FILE |
The AVI file is not open. |
IS_AVI_ERR_CAPTURE_RUNNING
|
Another capturing operation is in progress or an AVI file is still open. |
IS_AVI_ERR_ALLOC_MEMORY |
No memory could be allocated. |
IS_AVI_ERR_INVALID_CM |
The submitted color mode is not supported for AVI capturing. |
IS_AVI_ERR_INVALID_SIZE |
The submitted size is invalid. |
IS_AVI_ERR_INVALID_POSITION |
The submitted position is invalid. |
Related Functions
Example
// Query image buffer geometry int nWidth, nWidth, nBits, nPitch; is_InquireImageMem ( hCam, pLast, nImageID, &nWidth, &nHeight, &nBits, &nPitch); INT nOffsetX = is_SetImagePos ( hCam, IS_GET_IMAGE_POS_X_ABS, 0); INT nOffsetY = is_SetImagePos ( hCam, IS_GET_IMAGE_POS_Y_ABS, 0);
// Derive pixel pitch from buffer byte pitch INT nPitchPx=0; nPitchPx = (nPitch * 8 ) / nBits;
INT nAviWidth = nWidth /8 * 8; // Width must be multiple of 8 INT LineOffsetPx = nPitchPx - nAviWidth ; isavi_SetImageSize( nAviId, m_cMode, nAviWidth, nHeight, nOffsetX, nOffsetY, LineOffsetPx); |