Repository navigation
Affine transform xy - #1975
Affine transform xy#1975akuchibotla wants to merge 4 commits into
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. |
|
|
||
| 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.
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?