-
Notifications
You must be signed in to change notification settings - Fork 117
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
Undistorting the image #44
Comments
The result indeed clearly looks wrong. The lines which are straight in reality should become straight in the undistorted image. If the coefficients of So I can only guess. One possible mistake which can result in increasing the distortion rather than removing it would be to swap the roles of the coordinates. The correct algorithm is to use the pixel coordinate that is computed by unprojection and projection to look up the pixel color in the distorted image, and then write this color into the undistorted image at the original pixel coordinate (that was used for unprojection). If instead the original pixel coordinate is used to look up the color in the distorted image, and this color is written into the result image at the distorted coordinate, then the distortion may be increased. |
Thanks a lot, for some reason I was doing the opposite. |
Hey, I followed what you mentioned in #22 .
Here are my results, it looks like it gets even more distorted.
Distorted
Undistorted
Pinhole unprojection code
The text was updated successfully, but these errors were encountered: