-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Needing clarification for implementation of Inverse-Brown-Conrady transformation #7335
Comments
Has no one else stumbled across the inconsistent projection and deprojection for |
I got the same problem as you. It would be good to have an official confirmation of which model has been used for the calibration (including the exact formula used) and that the erroneous code get removed from the lib. |
Further important observation:
At least our D435 model seems to be not affected by this bug, since all radial and tangential distortion coefficients of the color intrinsics are zero, so it does not matter, whether the model is Brown-Conrady, Inverse-Brown-Conrady or Modified-Brown-Conrady. |
Hi, @sisiplac . I glad someone finally finds the Inverse-Brown-Conrady is something wrong. I think this is the problem that causes the projection and deprojection a few pixels away. I have to use alignment to depth frame to avoid this problem.
Right? However, the deproject for MODIFIED_BROWN_CONRADY is missing How do you fix it? |
Yes, deprojection is missing for MODIFIED_BROWN_CONRADY. To get an invertible transformation, you could do the following:
Alternatively, you could also implement your own nonlinear estimator for the MODIFIED_BROWN_CONRADY deprojection. Compared to the first option this is probably more complex and more prone to errors. |
For that deprojection you might find the Matlab code by @diegonehab and me useful: https://www.dlr.de/rm/en/Portaldata/52/Resources/Software/CalLab/matlab_f_undistort_triangulate.zip I read somewhere that they are not supporting RGB undistortion for D400, that might be the reason/consequence for/of its absence. In addition, they usually map depth frames into the rgb/color frames, and not the other way around (i.e., rgb deprojection is rarely needed). |
Hi, While engineering continues to work on this, they have provided the following PR to help mitigate these issues. Thanks |
L515 Brown-Conrady distortion plus testing, deproject impl (GitHub #7335)
Hi, Will you be needing further help with this? Thanks |
Hi, This has been implemented in the following PR: Will you be needing any further help with this? If we don’t hear from you in 7 days, this issue will be closed. Thanks |
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
We are using RealSense L515 devices and are trying to fetch the color intrinsics to do some Augmented-Reality visualizations.
The color intrinsics of the L515 devices are given as
Inverse-Brown-Conrady
transformation.The implementation of the Inverse-Brown-Conrady projection and deprojection functions seems very strange to me, due to the following reasons:
rs2_project_point_to_pixel
andrs2_deproject_pixel_to_point
in https://github.com/IntelRealSense/librealsense/blob/master/include/librealsense2/rsutil.hAccording to the documentation (https://dev.intelrealsense.com/docs/projection-in-intel-realsense-sdk-20) the projection part should need
iteration or lookup tables
, what corresponds with my knowledge about the Inverse Brown Conrady transformation.Inverse-Brown-Conrady
andModified-Brown-Conrady
is absolutely identical, what is also strange. Why are two different model names used for the same mathematical transformation?From my point of view the parameters for the L515 seem to follow the
Modified-Brown-Conrady
orBrown-Conrady
model, but NOT theInverse-Brown-Conrady
model. We were able to confirm this by doing a calibration of the L515 color channel using our own tools and comparing this transformation with the parameters obtained by the SDK.What I would recommend to fix the problem:
RS2_DISTORTION_INVERSE_BROWN_CONRADY
path from thers2_project_point_to_pixel
path and includeassert(intrin->model != RS2_INVERSE_DISTORTION_BROWN_CONRADY)
insteadModified-Brown-Conrady
orBrown-Conrady
for the color channel of L515 devices.Important question: Which of the two models is used?
The text was updated successfully, but these errors were encountered: