-
Notifications
You must be signed in to change notification settings - Fork 606
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
Add equidistant distortion model #358
Add equidistant distortion model #358
Conversation
5bb1c24
to
c03885f
Compare
The equidistant distortion model is based on the following publication: J. Kannala and S. Brandt (2006). A Generic Camera Model and Calibration Method for Conventional, Wide-Angle, and Fish-Eye Lenses, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 28, no. 8, pp. 1335-1340 In OpenCV, this model is called the "fisheye" distortion model.
c03885f
to
f2b8437
Compare
Thank you for the review of #306 and contribution. I successfully tested this PR with ros-perception/image_pipeline#592 in I'm not a maintainer of this repo, the following is my own personal opinion: Overall, I hope this PR goes through |
@DavidTorresOcana : Thank you for your kind words and for testing this PR! And also for your work on #306 and the other PRs all across the image processing core packages. Let's hope some maintainer finds time to merge all those PRs soon!
Well, as you say it implements different distortion models, but the camera model is always the pinhole model. The distortion and camera models are more or less orthogonal and can be combined arbitrarily. Look at this Kalibr wiki page. In Kalibr nomenclature, vision_opencv already supports the |
This installs python3-osrf-pycommon. It should be a dependency of python3-catkin-tools, but is missing at the moment: catkin/catkin_tools#594 (comment) Also installs build-essential in order to get "make" (missing when run from Dockerfile).
I fixed the Travis CI, but now the build farm tests have an unrelated failure. Closing and re-opening to retrigger the build farm. |
Thank you very much, 👍 for this PR. |
@mjcarroll @vrabaud Could one of the maintainers review and merge this PR? Looking at the list of open PRs, it seems that vision_opencv is largely unmaintained. It's sad to see such an important ROS package die... |
Bump |
Could somebody please merge this? Come on, it has tests and everything. |
Hi, great work! |
The equidistant distortion model is based on the following publication: J. Kannala and S. Brandt (2006). A Generic Camera Model and Calibration Method for Conventional, Wide-Angle, and Fish-Eye Lenses, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 28, no. 8, pp. 1335-1340 In OpenCV, this model is called the "fisheye" distortion model.
The equidistant distortion model is based on the following publication: J. Kannala and S. Brandt (2006). A Generic Camera Model and Calibration Method for Conventional, Wide-Angle, and Fish-Eye Lenses, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 28, no. 8, pp. 1335-1340 In OpenCV, this model is called the "fisheye" distortion model.
The equidistant distortion model is based on the following publication: J. Kannala and S. Brandt (2006). A Generic Camera Model and Calibration Method for Conventional, Wide-Angle, and Fish-Eye Lenses, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 28, no. 8, pp. 1335-1340 In OpenCV, this model is called the "fisheye" distortion model.
This PR adds support for the equidistant distortion model. In OpenCV, this model is called the fisheye distortion model. It is based on the following publication:
J. Kannala and S. Brandt (2006). A Generic Camera Model and Calibration Method for Conventional, Wide-Angle, and Fish-Eye Lenses, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 28, no. 8, pp. 1335-1340
The equidistant model was listed in sensor_msgs/distortion_models.h since Kinetic, but
image_geometry
support was missing until now.The
equidistant
distortion model is especially useful for high-FOV cameras:Original image:
Rectified image:
Left:
plumb_bob
distortion modelRight:
equidistant
distortion modelNotice the distortions in the bottom right and top right corners of the
plumb_bob
image. The camera calibrations for the images above were obtained using Kalibr, and the rectified images were generated using this PR.Adding the
equidistant
model was tackled in a number of previous PRs (#184, #299, #306, Intermodalics#1). To fully implement a new distortion model, the following functions (and only those) should be modified: rectifyPoint, rectifyImage, unrectifyPoint, unrectifyImage. The last one is not implemented, so that leaves the first three. Here's an overview of the PRs that I could find that implement theequidistant
model:(1) implemented by modifying initRectificationMaps
(2) Intermodalics#1 not only implements the
equidistant
(aka "fisheye_cv") distortion model, but also thefov
model. That would also be great to have here in a later PR.So only #306 has implementations of all three functions. Unfortunately it's a bit hard to review because it's a huge diff. Therefore I cleaned up #306 and added set of unit tests. During testing, I noticed several bugs in #306, so I fixed them and decided to submit a separate PR. Thanks to @DavidTorresOcana for his work on #306, upon which this PR is based.