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

Document the order of the coefficients in rs2_intrinsics::coeffs #7061

Conversation

foohyfooh
Copy link
Contributor

I could not find the order of the distortion coefficients in the Realsense documentation so I am adding them to it. I am assuming that they follow the order that is used in OpenCV for its distortion coefficients.
Feel free to correct me if this order is wrong.

@foohyfooh foohyfooh changed the base branch from master to development August 8, 2020 04:33
@foohyfooh foohyfooh force-pushed the documentation/rs2_intrinsics_coeffs_order branch from 891a725 to e2ca808 Compare August 8, 2020 04:41
Copy link
Collaborator

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

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

@foohyfooh , thanks for the contribution.
The order is correct, however it applies only to the distortion model that utilizes radial and tangential coefficients.
In case of FishEye, for example a different (Theta-distortion) model is used with four coefficients K1..K4.

I suggest to adjust the wording to reflect that the coefficients [1..5] can be read [k1,k2,p1,p2,k3] where applicable, but other interpretations are possible as well.

Copy link
Collaborator

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

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

Documentation change

@foohyfooh foohyfooh force-pushed the documentation/rs2_intrinsics_coeffs_order branch from e2ca808 to 4676e23 Compare August 26, 2020 15:00
@foohyfooh
Copy link
Contributor Author

foohyfooh commented Aug 26, 2020

From what I saw about Kannala-Brandt distortion model, there appears to be an eight parameter model with the parameters being [ fx, fy, cx, cy, k1, k2, k3, k4]. So would I be correct in assuming that the four coefficients in the array are [k1, k2, k3, k4, -]?

@ev-mp
Copy link
Collaborator

ev-mp commented Aug 30, 2020

Correct, for Fisheye those are mapped to K1..K4 ( coeffs[4] is undefined)

Copy link
Collaborator

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

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

@foohyfooh , sorry for the delay and thank you for the contribution.
Much appreciated!

@ev-mp ev-mp merged commit 7a79e7f into IntelRealSense:development Oct 7, 2020
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