Home > C: Programming > Function Descriptions > | History back Previous chapter Next chapter Print |
is_ImageFormat |
uEye Camera Manual Version 3.80
is_ImageFormat
USB uEye XS |
USB uEye XS |
Syntax
INT is_ImageFormat (HIDS hCam,
UINT nCommand,
void *pParam,
UINT nSizeOfParam)
Description
Using is_ImageFormat, you can query a list of possible image sizes and set a new image format if supported by your uEye model. This is useful for sensors that do not support a free selection of the area of interest or image format. Using the AOI, binning/subsampling or scaling functions, the driver sets the selected image format to achieve the best possible image quality. For a complete list of available image formats see table below.
The nCommand input parameter is used to select the function mode. The pParam input parameter depends on the selected function mode. If you select functions for setting or returning a value, pParam receives a pointer to a variable of the UINT type. The size of the memory area to which pParam refers is specified in the nSizeOfParam input parameter.
|
|
Input Parameters
hCam |
Camera handle |
|
nCommand |
|
|
IMGFRMT_CMD_GET_LIST |
Returns a list of all image formats supported by the sensor.
|
|
IMGFRMT_CMD_GET_NUM_ENTRIES |
Returns the number of entries in the list.
|
|
IMGFRMT_CMD_SET_FORMAT |
Sets the desired image format.
|
|
IMGFRMT_CMD_GET_ARBITRARY_AOI_SUPPORTED |
Returns if the sensor supports a free selection of the area of interest (AOI).
|
|
pParam |
Pointer to a function parameter; which function parameter is referred to here depends on nCommand. |
|
nSizeOfParam |
Size (in bytes) of the memory area to which pParam refers. |
Contents of the IMAGE_FORMAT_LIST list of image formats
UINT |
nSizeOfListEntry |
Must be preset with the size of a list entry in bytes |
UINT |
nNumListElements |
Must be preset with the number of list entries (from IMGFRMT_CMD_GET_NUM_ENTRIES) |
UINT |
nReserved[4] |
Reserved |
IMAGE_FORMAT_INFO |
FormatInfo[0] |
First entry in the list. After having been filled by IMGFRMT_CMD_GET_LIST, the list contains additional entries FormatInfo[1]... FormatInfo[nNumListElements-1]. |
Contents of the list entry IMAGE_FORMAT_INFO
INT |
nFormatID |
Format ID of the specified image format (see table below) |
UINT |
nWidth |
Width of the area of interest |
UINT |
nHeight |
Height of the area of interest |
UINT |
nX0 |
Start point of the area of interest (X) |
UINT |
nY0 |
Start point of the area of interest (Y) |
UINT |
nSupportedCaptureModes |
Image capture modes supported for this format (see table below) |
UINT |
nBinningMode |
Binning mode used |
UINT |
nSubsamplingMode |
Subsampling mode used |
IS_CHAR |
strFormatName[64] |
Description of the format |
double |
dSensorScalerFactor |
Scaling factor used (only sensors that support scaling). |
UINT |
nReserved[24] |
Reserved |
Possible values for CAPTUREMODE
CAPTMODE_SINGLE |
Freerun mode, single frame (freerun snap) |
CAPTMODE_FREERUN |
Freerun mode, continuous (freerun live) |
CAPTMODE_TRIGGER_SOFT_SINGLE |
Software triggered mode, single frame |
CAPTMODE_TRIGGER_SOFT_CONTINUOUS |
Software triggered mode, continuous |
CAPTMODE_TRIGGER_HW_SINGLE |
Hardware triggered mode, single frame |
CAPTMODE_TRIGGER_HW_CONTINUOUS |
Hardware triggered mode, continuous |
For further information on the image capture modes, see also Operating Modes in the Basics chapter.
Format ID |
Resolution |
Name |
Camera model |
||||||||||
UI-1490 |
UI-1480 |
UI-1460 |
UI-1550 |
UI-1640 |
UI-1540 |
UI-1240 |
UI-1220 |
XS Live |
XS Snap |
UI-1120 |
|||
1 |
3264x2448 |
(8M) |
X |
|
|
|
|
|
|
|
|
X |
|
2 |
3264x2176 |
(8M 3:2) |
X |
|
|
|
|
|
|
|
|
X |
|
3 |
3264x1836 |
(8M 16:9) |
X |
|
|
|
|
|
|
|
|
X |
|
4 |
2592x1944 |
(5M) |
X |
|
|
|
|
|
|
|
|
X |
|
5 |
2048x1536 |
(3M) |
X |
X |
X |
|
|
|
|
|
|
X |
|
6 |
1920x1080 |
(Full HD 16:9) |
X |
X |
X |
|
|
|
|
|
|
X |
|
7 |
1632x1224 |
(2M) |
X |
X |
X |
|
|
|
|
|
|
X |
|
8 |
1280x960 |
(1.2M 4:3) |
X |
X |
X |
X |
X |
X |
X |
|
X |
X |
|
9 |
1280x720 |
(HD 16:9) |
X |
X |
X |
X |
X |
X |
X |
|
X |
X |
|
11 |
960x480 |
(WVGA 2:1) |
X |
X |
X |
X |
X |
X |
X |
|
X |
X |
|
12 |
800x480 |
(WVGA) |
X |
X |
X |
X |
X |
X |
X |
|
X |
X |
|
13 |
640x480 |
(VGA) |
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
|
14 |
640x360 |
(VGA 16:9) |
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
|
15 |
400x240 |
(WQVGA) |
X |
X |
X |
X |
X |
X |
X |
|
X |
X |
|
16 |
352x288 |
(CIF) |
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
|
17 |
288x352 |
(CIF Portrait) |
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
|
18 |
320x240 |
(QVGA) |
X |
X |
X |
X |
X |
X |
X |
|
X |
X |
|
19 |
240x320 |
(QVGA Portrait) |
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
|
20 |
1600x1200 |
(UXGA) |
X |
X |
X |
X |
|
|
|
|
X |
X |
|
21 |
3840x2748 |
(10M) |
X |
|
|
|
|
|
|
|
|
|
|
22 |
1920x1080 |
(Full HD 16:9, HQ) |
X |
|
|
|
|
|
|
|
|
|
|
23 |
2560x1920 |
(5M) |
|
X |
|
|
|
|
|
|
|
|
|
24 |
768x576 |
(CCIR) |
X |
X |
|
|
|
|
X |
|
|
|
X |
25 |
1280x1024 |
(1.3M SXGA) |
X |
|
|
X |
X |
X |
X |
|
|
|
|
26 |
2448x2048 |
(5M) |
|
|
|
|
|
|
|
|
|
|
|
27 |
1024x768 |
(XGA) |
X |
X |
X |
|
|
|
X |
|
|
|
|
Return Values
IS_SUCCESS |
Function executed successfully |
IS_NO_SUCCESS |
General error message |
IS_NOT_SUPPORTED |
This function is not supported by the current camera |
IS_INVALID_PARAMETER |
One of the parameters passed is invalid |
Related Functions
HIDS hCam; char strCamFileName[256]; int nRet;
// Get number of available formats and size of list UINT count; UINT bytesNeeded = sizeof(IMAGE_FORMAT_LIST); nRet = is_ImageFormat(hCam, IMGFRMT_CMD_GET_NUM_ENTRIES, &count, 4); bytesNeeded += (count - 1) * sizeof(IMAGE_FORMAT_INFO); void* ptr = malloc(bytesNeeded);
// Create and fill list IMAGE_FORMAT_LIST* pformatList = (IMAGE_FORMAT_LIST*) ptr; pformatList->nSizeOfListEntry = sizeof(IMAGE_FORMAT_INFO); pformatList->nNumListElements = count; nRet = is_ImageFormat(hCam, IMGFRMT_CMD_GET_LIST, pformatList, bytesNeeded);
// Activate trigger mode for capturing high resolution images (USB uEye XS) nRet = is_StopLiveVideo(hCam, IS_WAIT); nRet = is_SetExternalTrigger(hCam, IS_SET_TRIGGER_SOFTWARE);
// Prepare for creating image buffers char* pMem = NULL; int memID = 0;
// Set each format and then capture an image IMAGE_FORMAT_INFO formatInfo; for (int i = 0; i < count; i++) { formatInfo = pformatList->FormatInfo[i]; int width = formatInfo.nWidth; int height = formatInfo.nHeight;
// Allocate image mem for current format, set format nRet = is_AllocImageMem(hCam, width, height, 24, &pMem, &memID); nRet = is_SetImageMem(hCam, pMem, memID); nRet = is_ImageFormat(hCam, IMGFRMT_CMD_SET_FORMAT, &formatInfo.nFormatID, 4);
// Capture image nRet = is_FreezeVideo(hCam, IS_WAIT); } |