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

projective transforms hidden under affine_transform #9181

Open
VolkerH opened this issue Aug 27, 2018 · 2 comments
Open

projective transforms hidden under affine_transform #9181

VolkerH opened this issue Aug 27, 2018 · 2 comments
Labels
query A question or suggestion that requires further information scipy.ndimage

Comments

@VolkerH
Copy link

VolkerH commented Aug 27, 2018

This is not a bug report but rather a comment about nomenclature / usability.
I was looking for projective transforms in scipy.ndimage and initially didn't find them, so I thought I would have to go with geometric_transform.
Only when looking at the documentation for affine_transform later did I notice that affine_transform also supports homogeneous coordinates and thus actually supports transformations that are more general than affine. I feel that there should be something like a projective_transform function that defaults to using homogeneous coordinates.

@ilayn
Copy link
Member

ilayn commented Aug 27, 2018

If I understand you correctly:

From the affine transform y=A@x + b, if you don't include the offset which is b and 0. by default you have projective transform A@x. Hence it already defaults to homogeneous coords.

@ilayn ilayn added scipy.ndimage query A question or suggestion that requires further information labels Aug 27, 2018
@VolkerH
Copy link
Author

VolkerH commented Aug 27, 2018

My point is that a homography is more general, as it doesn't necessarily keep parallel lines parallel (which an affine transformation does).
Edit (got interrupted while writing this):

So when looking for available transformations by name it isn't obvious that you can actually use affine_transform for projective transformations, this only becomes clear when reading the detailed documentation that mentions the possibility to use homogeneous coordinates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
query A question or suggestion that requires further information scipy.ndimage
Projects
None yet
Development

No branches or pull requests

2 participants