sjrothfuss / torch-rotate-image

Rotate images with torch
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

add missing center to grid coordinates #5

Closed alisterburt closed 3 months ago

alisterburt commented 3 months ago

closes #4

@sjrothfuss we had centered coordinates and rotated them but we need to un-center them for sampling. This is needed because the sampling utilities in torch image lerp expect coordinates which align with array indices [0, n-1] for each dim

hope this helps!

alisterburt commented 3 months ago

I'm unsure if the test will pass here, the rotation center being on the DC component might bring a strip of out of bounds pixels into the result

alisterburt commented 3 months ago

will need to coerce the center to tensor with the right dtype and on the right device - take this as a push in the right direction rather than a complete solution, good luck!