-
Notifications
You must be signed in to change notification settings - Fork 132
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
fixed focus oak-d-lite doesn't throw errors on autofocus APIs or declare it is fixed focus #326
Comments
Thanks! CC: @alex-luxonis and @saching13 - I'm not sure if we declared this in the EEPROM that they're fixed focus. I didn't think of it at least. |
Comparing my oak-d (self calibrated with cali script) and oak-d-lite (factory calibrated)...
Maybe I can risk assuming that any oak-d-lite that has a lensPosition=0 is a fixed focus? |
Yes. |
Yes. But as of now the script in the main cannot be used for OAK-D-Lite Calibration. |
Got it. I've implemented the probing workaround. |
closing as my local probing continues to work, and don't call the errant APIs when I can predict they could fail. |
I got my oak-d-lite fixed focus cameras and discovered that they do not id themselves as fixed nor do the autofocus apis throw errors.
At a minimum, I believe autofocus apis/commands to fail or throw errors.
Setup
Repro
Result
App runs.
No exceptions, errors, nor console/debug log output indicating that the autofocus apis will not and did not work on the fixed focus camera.
Expected
API to throw exceptions or return errors that indicate the specific problem of "no autofocus on this camera". I consider this to be the same level of error as calling an API for a sensor that doesn't exist on the device.
Notes
The way in which the API failure will likely be different for each api or scenario. For example
rgbCamera->initialControl.setAutoFocusMode()
is called before the camera pipeline starts. So without prior knowledge of the specific cameras abilities, no error is possible here. Caveat, future knowledge of the sensor might be possible with Device Discovery and Board Configuration #285std::make_unique<dai::Device>()
is a good place to throw exception or return an error. However, there are many errors that can occur here (no autofocus, no IMU, etc.). How does an app discern which error has occurred? I would prefer specific exceptions for each error case. If not that, then at a minimum, theexception::what()
text should be specific, customer ready language, and unchanging.dai::CameraControl::setAutoExposureRegion()
should throw exceptions since the knowledge is readily available that the camera has no autofocus. One doesn't even need to spin up an XLink packet since the host-side depthai-core code can cache the knowledge that there is no autofocus.Workarounds?
I do not know of any workarounds.
Is there any command or api that can detect a fixed focus color camera? Something that declares it or will fail/throw?
If such exist, then I can probe and persist the knowledge.
The text was updated successfully, but these errors were encountered: