Home > C: Programming > Function Descriptions > | History back Previous chapter Next chapter Print |
is_FaceDetection |
uEye Camera Manual Version 3.80
is_FaceDetection
USB uEye XS |
USB uEye XS |
Syntax
INT is_FaceDetection (HIDS hCam,
UINT nCommand,
void *pParam,
UINT nSizeOfParam)
Description
Using is_FaceDetection(), you can control the built-in face detection function if supported by your uEye model.
The nCommand input parameter is used to select the function mode (e.g. enable/disable face detection, return number of detected faces). The pParam input parameter depends on the selected function mode. If you select functions for setting or returning a value, pParam contains 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.
With some uEye models, you can use the face detection function to control the automatic brightness.
|
|
|
|
|
Input Parameters
hCam |
Camera handle |
|
nCommand |
|
|
FDT_CMD_GET_CAPABILITIES |
Returns the face detection functions supported by the camera.
|
|
Start / stop face detection |
||
FDT_CMD_SET_ENABLE |
Enables face detection.
|
|
FDT_CMD_SET_DISABLE |
Disables face detection.
|
|
FDT_CMD_GET_ENABLE |
Returns the face detection status (enabled/disabled).
|
|
FDT_CMD_SET_SUSPEND |
Temporarily suspends the face detection function.
|
|
FDT_CMD_SET_RESUME |
Resumes face detection.
|
|
FDT_CMD_GET_SUSPEND |
Returns the face detection status (suspended/running).
|
|
Search angle (facial orientation angle) for face detection |
||
FDT_CMD_SET_SEARCH_ANGLE |
Sets a search angle for face detection.
|
|
FDT_CMD_GET_SEARCH_ANGLE |
Returns the search angle that is currently set for face detection.
|
|
FDT_CMD_SET_SEARCH_ANGLE_ENABLE |
Enables the search angle for face detection.
|
|
FDT_CMD_SET_SEARCH_ANGLE_DISABLE |
Disables the search angle for face detection.
|
|
FDT_CMD_GET_SEARCH_ANGLE_ENABLE |
Returns the status of the search angle for face detection.
|
|
Output and marking of detected faces |
||
FDT_CMD_GET_FACE_LIST |
Returns a list of information on the detected faces.
|
|
FDT_CMD_GET_NUMBER_FACES |
Returns the current number of detected faces.
|
|
FDT_CMD_GET_MAX_NUM_FACES |
Returns the maximum number of faces that can be detected by the camera.
|
|
Returns the horizontal resolution of the face detection function.
|
||
FDT_CMD_GET_VERTICAL_RESOLUTION |
Returns the vertical resolution of the face detection function.
|
|
FDT_CMD_SET_INFO_MAX_NUM_OVL |
Sets the maximum number of faces that will be marked with an overlay box in the live image.
|
|
FDT_CMD_GET_INFO_MAX_NUM_OVL |
Returns the maximum number of faces that will be marked with an overlay box in the live image.
|
|
FDT_CMD_SET_INFO_OVL_LINE_WIDTH |
Sets the line width you want to use for the overlay boxes around the detected faces in the live image.
|
|
FDT_CMD_GET_INFO_OVL_LINE_WIDTH |
Returns the line width set for the overlay boxes that indicate the detected faces in the live image.
|
|
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. |
Status flags from FDT_CAPABILITY_CAP_FLAGS
FDT_CAP_SUPPORTED |
The camera supports face detection |
FDT_CAP_SEARCH_ANGLE |
Face detection supports presetting a search angle |
FDT_CAP_SEARCH_AOI |
Face detection supports presetting a search area |
FDT_CAP_INFO_POSX |
Face detection supports output of the X position of a face |
FDT_CAP_INFO_POSY |
Face detection supports output of the Y position of a face |
FDT_CAP_INFO_WIDTH |
Face detection supports output of the width of a face |
FDT_CAP_INFO_HEIGHT |
Face detection supports output of the height of a face |
FDT_CAP_INFO_ANGLE |
Face detection supports output of the orientation angle of a face |
FDT_CAP_INFO_POSTURE |
Face detection supports output of the posture of a face |
FDT_CAP_INFO_FACENUMBER |
Face detection supports output of the number of faces detected |
FDT_CAP_INFO_OVL |
Face detection supports marking detected faces with an overlay box |
FDT_CAP_INFO_NUM_OVL |
Face detection supports setting the maximum number of faces for marking |
FDT_CAP_INFO_OVL_LINEWIDTH |
Face detection supports setting the line width for the overlay boxes |
Contents of the list of detected faces FDT_INFO_LIST
UINT |
nSizeOfListEntry |
Must be preset with the size of a list entry in bytes |
UINT |
nNumDetectedFaces |
Returns the number of detected faces |
UINT |
nNumListElements |
Must be preset with the number of list entries |
UINT |
nReserved[4] |
Reserved |
FDT_INFO_EL |
FaceEntry |
First entry in the list. The memory area for additional list entries has to come directly after this entry. |
Contents of the list entry FDT_INFO_EL
INT |
nFacePosX |
X position of the face (center) The face position always refers to the horizontal and vertical resolution of the face detection function (see note above). |
INT |
nFacePosY |
Y position of the face (center) |
INT |
nFaceWidth |
Width of the face The face size always refers to the horizontal and vertical resolution of the face detection function (see note above). |
INT |
nFaceHeight |
Height of the face. |
INT |
nAngle |
Orientation angle of the face: 0 / 90 / 270: Angle in degrees (0° corresponds to 12 o'clock position) -1: Undefined |
UINT |
nPosture |
Posture of the face; see table below 0...8 |
UEYETIME |
TimestampSystem |
Structure with timestamp information in PC system time format, see is_GetImageInfo(). The time resolution is approx. 15 ms. |
UINT64 |
nReserved |
Reserved |
UINT |
nReserved2[4] |
Reserved |
Possible values for posture (viewing direction)
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
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_CAPTURE_MODE |
This function is not supported in the current operating mode |
IS_INVALID_PARAMETER |
One of the parameters passed is invalid |