setCameraFocusPosition abstract method

int setCameraFocusPosition(
  1. double x,
  2. double y
)

Adjusting the Focus (for Mobile OS)

This API can be used to achieve the following:

  1. A user can tap on the camera preview.
  2. A rectangle will appear where the user taps, indicating the spot the camera will focus on.
  3. The user passes the coordinates of the spot to the SDK using this API, and the SDK will instruct the camera to focus as required.
  • Parameters:
    • x(double):
      • The x-coordinate value of the desired focus point
    • y(double):
      • The y-coordinate value of the desired focus point

Note Before using this API, you must first disable auto focus using enableCameraAutoFocus.

Return Description:

  • 0: Operation successful;
  • Negative number: Operation failed.

Implementation

int setCameraFocusPosition(double x, double y);