camera_get_3a_face_id()

Retrieve the ID of the face that the 3A face-detection priority algorithms are currently tracking.

Synopsis:

#include <camera/camera_api.h>
 
camera_error_t camera_get_3a_face_id(camera_handle_t handle,                 
                                     uint32_t *id)

Since:

BlackBerry 10.2.0

Arguments:

handle

The handle returned by a call to the camera_open() function.

id

A pointer to a uint32_t value that is updated with the ID of the face that is currently being tracked.

Library:

libcamapi (For the qcc command, use the -l camapi option to link against this library)

Description:

Use this function to query which face the 3A face-detection priority algorithms are currently operating on. If the user has previously selected a face to track using camera_set_3a_face_id(), then the returned ID will match the ID the user provided. If the user has not previously specified a face to track, then this function will return the ID of the face which the 3A face-priority algorithms have defaulted to tracking. You can only use this function after 3A algorithms are switched to face-detection priority mode using camera_set_3a_face_priority().

If no face is being tracked, this function returns CAMERA_ENODATA. Reasons for no face being tracked include:
  • There are no faces detected in the scene.
  • The user-selected face is no longer present in the scene.

The viewfinder must be running before using this function.

Returns:

CAMERA_EOK when the function successfully completes, CAMERA_ENODATA when there is no face being tracked, otherwise another camera_error_t value that provides the reason that the call failed.