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

ImgFrame: report camera settings (focus, exposure, iso) #191

Merged
merged 12 commits into from
Oct 3, 2022

Conversation

alex-luxonis
Copy link
Contributor

@alex-luxonis alex-luxonis commented Aug 4, 2021

Add new API which can be used on ImgFrame packets received from camera:

  • getExposureTime()
  • getSensitivity()
  • getLensPosition() - (note: lens position may be reported one frame in advance at the moment) should be fixed
  • getColorTemperature()

FW updates:

  • fix black image when initial manual exposure was set with other controls -- was merged previously
  • fix switching from auto to manual exposure causing the lens to jump to zero
    (note: the lens is directly set now with manual focus, bypassing 3A) -- was merged previously

WIP, currently only reports values for ColorCamera. - Fixed

Related PR: luxonis/depthai-shared#51

getLensPosition(), getExposureTime(), getSensitivity()
Only the first is implemented for now
(note: lens position may be reported one frame in advance),
fix black image when initial manual exposure was set with other controls,
fix switching from auto to manual exposure causing the lens to jump to zero
(note: the lens is directly set now with manual focus, bypassing 3A)
Comment on lines 46 to 48
int ImgFrame::getExposureTime() const {
return img.cam.exposureTimeUs;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO duration would be more applicable in this case

std::chrono::microseconds ImgFrame::getExposureTime() const {
    return std::chrono::microseconds(img.cam.exposureTimeUs);
}

Copy link
Collaborator

@themarpe themarpe left a comment

Choose a reason for hiding this comment

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

Seems like video frames don't get this information applied to it, but preview do.
TODO - check how FW handles this.

@Erol444
Copy link
Member

Erol444 commented Sep 21, 2022

This (newer) PR also includes features added in this PR: #210

@alex-luxonis
Copy link
Contributor Author

Seems like video frames don't get this information applied to it, but preview do.
VideoEncoder didn't forward the new ImgFrame metadata, was fixed.

@alex-luxonis alex-luxonis marked this pull request as ready for review September 27, 2022 19:57
@alex-luxonis alex-luxonis merged commit 1d03f7e into develop Oct 3, 2022
@alex-luxonis alex-luxonis deleted the report_cam_settings branch October 3, 2022 12:51
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