-
Notifications
You must be signed in to change notification settings - Fork 24
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
Make perspective transformations composable and invertable #66
Comments
The function (::PerspectiveMap)(v::AbstractVector)
scale = 1/v[end]
return [v[i] * scale for i in 1:length(v)-1]
end This isn't invertable since you need to know |
Would it be useful to define the To be clear though, I'm not sure if I'm missing some main point here. |
Are you trying to invert a perspective camera projection? |
I think I meant to write "Always.", I apologize for the mistake, the tone might have sounded off putting, which was not at all my intention. Sorry again. |
I think when you take a projective transformation from 3D to 2D, such as for a intrinsic model of a camera or for a "camera calibration" model, you cannot invert the transformation and get a unique point? Typically these camera models have 4-5 coefficients which describe how to perform the linear transformation from 3D to 2D coordinates. The scaling /focal distance in the principal camera directions, shear, center point locations are all encoded in these coefficients. See Eq. 7 here: https://learnopencv.com/geometry-of-image-formation/ I think if you do the inversion of the projective transform, you'll kind of see that the system is underdetermined. A single camera coordinate is often not enough to determine a unique point in 3D space? You can get a "minimum distance" solution using something like pseudoinverse or some other technique, but I don't think there is a single "unique" solution to the problem, even with a specified projective transformation? |
Thank you @SamRodkey, those are really good documentations! This is a good explanation for what is missing. I'll close this for now. |
Currently it is not possible to invert a perspective transformation:
and composition is problematic when combined with a projective transformation (see on slack or on zulip).
The MWE in those links is detailed here as well:
The text was updated successfully, but these errors were encountered: