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

Calculate new point after remapping of points #13

Open
pskiselev opened this issue Jul 1, 2017 · 1 comment
Open

Calculate new point after remapping of points #13

pskiselev opened this issue Jul 1, 2017 · 1 comment

Comments

@pskiselev
Copy link

pskiselev commented Jul 1, 2017

I looked through all the code and did't find formulas that calculate new coordinates after using method apply_geometry_distortion of Modifier class.

After undistorting the image, some pixels are lost, and i would like to know its location behind the image (e.g. point (-20; 20)).

Can I somehow match the pixels coordinates on the original frame and undistorted?

@letmaik
Copy link
Owner

letmaik commented Jul 13, 2017

As written offline, setting scale=1.0 when doing mod.initialize() should avoid cropping. Since that didn't work for you it would be interesting to figure out what's going on and whether scale is supposed to be used like that (it comes directly from the underlying liblensfun library). The image of interest was one with barrel distortion. So the goal is to undistort the image without loosing any parts of the image, which typically means introducing black areas.

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