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

why the size of distorsionCoeff is 4? #130

Open
xibeisiber opened this issue Apr 3, 2024 · 5 comments
Open

why the size of distorsionCoeff is 4? #130

xibeisiber opened this issue Apr 3, 2024 · 5 comments

Comments

@xibeisiber
Copy link

xibeisiber commented Apr 3, 2024

Hi, the distorsion coeff in sensor_msgs/CameraInfo has size of 5.

But in aruco_ros_utils.cpp, only 4 elements is used in distorsionCoeff.
besides, it checks whether the size of D is 4, if not, all distortion elements are set to 0...

why the last element is not used?

Thanks!

@saikishor
Copy link
Member

Hello @xibeisiber !

A very good question, I'm pretty sure there is a reason for it. I've to take a look and get back to you.

Thank you

@saikishor
Copy link
Member

saikishor commented Apr 20, 2024

Hello @xibeisiber!

I remember now, what we have observed is in general for normal camera models when the rectified image is parsed it usually works without any issues and the estimation is good. In the case of fisheye cameras, we have 4 distortion parameters and we usually undistort when we use a fisheye camera. If you want to add support for other cameras as well, please go ahead and open a PR, we will be happy to review and get it merged.

Thank you,

Best Regards,
PAL Robotics Team

@xibeisiber
Copy link
Author

I remember now, what we have observed is in general for normal camera models when the rectified image is parsed it usually works without any issues and the estimation is good.

For a normal camera, if I use a raw image and set "image_is_rectified" to false, aruco will not actually accept the distortion coefficient, since all distortion elements are set to 0 if the coefficient size is not 4.

Is this a problem?
Thanks!

@saikishor
Copy link
Member

Hello @xibeisiber!

I don't think it is a big problem. There might be a slight estimation error when the aruco is at the edges, but when it is at the center of the image, usually the estimation is fine enough

Thank you,

Best Regards,
PAL Robotics Team

@xibeisiber
Copy link
Author

I assume that it depends on how much the image is distorted.

If the distortion coefficient is relatively larger for a normal camera, wouldn't the estimation be improved more or less if the distortion coefficient is considered?

Thanks!
xibeisiber

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

No branches or pull requests

2 participants