-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Affine transform xy #1975
Affine transform xy #1975
Conversation
Just talked to @stefanv and the translation is expected because of the origin, so looks like it's a non-issue. I'll write up some tests for this. |
The reason the shear goes in a slightly unintuitive direction is because the values are fractions -- if you set it to > 1, then I guess it will look as expected. |
@@ -49,10 +49,9 @@ def test_estimate_transform(): | |||
|
|||
|
|||
def test_matrix_transform(): | |||
tform = AffineTransform(scale=(0.1, 0.5), rotation=2) | |||
tform = AffineTransform(scale=(0.1, 0.5), rotation=2, shear=(0.5, 2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test both versions of shear, and make sure the pixels end up where they are supposed to. This can be done by, e.g., having a white pixel in an image, warping it, and making sure that white pixel ends up in the right place (use interpolation oder = 0)
@akuchibotla Did you have a chance to look at the tests? The PR needs a rebase. |
Can you tell me the matrix being used in case of only shear?The code shows shear being used only in Y axis |
Hey, I think this was addressed in the recently merged PR #6752. I am not sure why this stalled. Nevertheless thank you @akuchibotla for your contribution! Even though it wasn't merged in the end it is appreciated and might have informed later work. :) |
In efforts to address #1779
Here's a demo:
There seems to be some unwanted extra translation occurring though. Any ideas how to tackle this?