3 ms·
You can do this in Python with 1 function call: https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.affine_transform.html https://docs.scipy.org
by amelius 4y ago
You can do this in Python with 1 function call:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.affine_transform.html https://docs.scipy.org/doc/scipy/reference/generated/scipy.n...
- deleted 4y ago[deleted]
- okaleniuk 4y agoYes, but you need to compute the matrix first. That's the tricky part I suppose since applying the transformation itself is as simple as multiplying every output bitmap center by the inverse projective transformation matrix and translating the original color.
- amelius 4y agoTrue! But this is of course basic knowledge for people working in 3d graphics. If you don't have that knowledge, I think you can get quite far by just starting with a unit matrix and changing the coefficients iteratively until you get something that looks right.