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

OAK bug fixes and improvements #1143

Merged
merged 2 commits into from
Oct 8, 2023
Merged

OAK bug fixes and improvements #1143

merged 2 commits into from
Oct 8, 2023

Conversation

borongyuan
Copy link
Contributor

@borongyuan borongyuan commented Oct 7, 2023

Fix distortion correction problem of small FOV devices.
I have been testing with wide FOV devices before. When I tried OAK-D S2 today I found that it didn't work at all. I checked the doc and found that the default configuration does not perform distortion correction on small FOV devices. I can't understand why they do this. We need to force distortion correction on all devices.

Remove deprecated IMU firmware update API.
enableFirmwareUpdate() is deprecated since luxonis/depthai-core@12b198a. I don't feel the need to deal with firmware updates here. Most devices don't need to be updated. Or the user should have updated it in advance.

Add useSpecTranslation option.
We have had some discussions about this parameter before (luxonis/depthai-core#358 & luxonis/depthai-core#847). But most users are probably unaware of this potential problem. Although they insist that the translation information from the board design data will have better accuracy in most cases. But I actually have a development version of OAK that is not for sale. They changed the color camera's FOV, global shutter, and IMU model according to my requirements. The camera modules are all glued on by hand, so I don't think there's any manufacturing precision. I also noticed that the RAE's lens looks a bit skewed as well, although I haven't tested it yet. So let’s use the calibration data by default. It guarantees at least a lower bound of accuracy and meets most users' expectations.
From my experience, this parameter may have an impact on the accuracy and robustness of stereo VIO. If you read OpenVINS paper, you will find that mono mode often performs better than stereo mode. The accuracy of the baseline and different feature representations have a certain impact.

Reduce depth image noise and simplify calculation for compressed transport.
Depth images have fewer textures than mono images and therefore have higher compression rates when using mjpeg compression. So we can set the quality to the highest level without consuming too much bandwidth. The advantage of this is that it can reduce the noise generated near the sharp edges during depth map compression. Especially at the edges where depth values are missing. These noises are mainly caused by DCT during jpeg encoding. This doesn't completely eliminate the noise, but it's better than before. It should be better to use lossless jpeg mode, but currently OpenCV is unable to decode it. We will see if there are other decoding methods later, such as using ffmpeg or nvjpeg.
cv::divide() is supposed to be more efficient than the forEach method. It can handle division by 0.

@matlabbe matlabbe merged commit f06cc0b into introlab:master Oct 8, 2023
7 checks passed
@matlabbe
Copy link
Member

matlabbe commented Oct 8, 2023

My RAE has been shipped, next weekend I will be able to test more all your updates. Thx a lot keeping depthai integration up to date!

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