Skip to content

Conversation

@Erol444
Copy link

@Erol444 Erol444 commented Jun 13, 2023

added option to control the camera component (auto-focus and auto-exposure) with nn detection results.

Code sample

from depthai_sdk import OakCamera

with OakCamera() as oak:
    color = oak.create_camera('color')
    face_det = oak.create_nn('face-detection-retail-0004', color)
    # Control the camera's exposure/focus based on the (largest) detected face
    color.control_with_nn(face_det, auto_focus=True, auto_exposure=True, debug=False)

    oak.visualize(face_det, fps=True)
    oak.start(blocking=True)

Demo

image
Left: default AF/AE. Right: AF/AE on detected face (code sample above)

@Erol444 Erol444 changed the base branch from main to develop June 13, 2023 22:16
@Erol444 Erol444 requested a review from daniilpastukhov June 13, 2023 22:17
Copy link

@daniilpastukhov daniilpastukhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Erol444 Erol444 merged commit e689c9c into develop Jun 14, 2023
@Erol444 Erol444 deleted the ae_af_on_detection_results branch June 14, 2023 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants