Camsetcenteredwoi, Camsetwoi, Camgetwoi – Metrologic Instruments IS4910 Series User Manual

Page 18: Amera, Upport, Ibrary

Advertising
background image

12

C

AMERA

S

UPPORT

L

IBRARY

C

AM

L

IB

camSetCenteredWOI

This function sets the window of interest (WOI) of the given size centered horizontally and vertically in the
field of view of the camera.

Prototype:

int camSetCenteredWOI (int cam_handle, int img_width, int img_height);

Parameters:

cam_handle - [in] handle to the camera device returned by the camOpen function.
img_width

- [in] image width, in pixels (should be a multiple of 16, the maximum value is 1280).

img_height

- [in] image height, in rows (should be an even number, the maximum value is 960).


Return Value:

0: Success; -1: Failure

camSetWOI

This function sets the window of interest (WOI) at the given location in the field of view of the camera.
The WOI width should be a multiple of 16 and the WOI height should always be an even number.

Prototype:

int camSetWOI (int cam_handle, int img_leftx, int img_topy, int img_rightx, int img_bottomy);

Parameters:

cam_handle - [in] handle to the camera device returned by the camOpen function.
img_leftx

- [in] x-coordinate of the window upper-left corner (the maximum value is 1279).

img_topy

- [in] y-coordinate of the window upper-left corner (the maximum value is 959).

img_rightx

- [in] x-coordinate of the window bottom-right corner (the maximum value is 1279).

img_bottomy - [in] y-coordinate of the window bottom-right corner (the maximum value is 959).

Return Value:

0: Success; -1: Failure

camGetWOI

This function returns the location of the window of interest (WOI) in the field of view of the camera.

Prototype:

int camGetWOI (int cam_handle, int *img_leftx, int *img_topy, int *img_rightx, int *img_bottomy);

Parameters:

cam_handle - [in] handle to the camera device returned by the camOpen function.
img_leftx

- [out] x-coordinate of the window upper-left corner (the maximum value is 1279).

img_topy

- [out] y-coordinate of the window upper-left corner (the maximum value is 959).

img_rightx

- [out] x-coordinate of the window bottom-right corner (the maximum value is 1279).

img_bottomy - [out] y-coordinate of the window bottom-right corner (the maximum value is 959).

Return Value:

0: Success; -1: Failure

Advertising