Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImageFilter.Kernel uses kernel weights in the wrong order? #3678
Comments
|
Additional note, this kernel shifts the image left by one pixel as expected: shift_left = (
0, 0, 0,
0, 0, 1,
0, 0, 0,
) |
|
Possibly related to #3134? |
|
This can't ever be fixed due to backward compatibility. Think about this as a call convention. The only we can do is update documentation. Pull requests are welcome. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What did you do?
I'm using the
ImageFilter.Kernelfilter with a 3x3 kernel that should shift the image down by one pixel, but instead it is shifting the image one pixel up.I'm assuming the order of weights in the kernel is left-right, top-bottom because, AFAIK, the documentation doesn't specify the order and I assume it uses the same ordering/coordinates as the image itself.
So, this is either a bug in the code, or a bug in the documentation.
What did you expect to happen?
The image should be shifted one pixel down.
What actually happened?
The image is shifted one pixel up.
What are your OS, Python and Pillow versions?