Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control camera with NN results #1051

Merged
merged 3 commits into from
Jun 14, 2023
Merged

Control camera with NN results #1051

merged 3 commits into from
Jun 14, 2023

Conversation

Erol444
Copy link
Member

@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
Copy link
Contributor

@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.

None yet

2 participants