3

I would like to rotate a raster image by an arbitrary angle. I don't really care for speed: the rotation should be of highest quality possible. Could someone please suggest a suitable algorithm?

I'm familiar with the rotation by three shears but I'm not sure if the shears would not cause too much aliasing/blurring.

Ecir Hana
  • 1,459
  • 11
  • 20
  • The 'rotation by area mapping' algorithm described at http://www.leptonica.com/rotation.html looks like a good place to start – russ May 30 '16 at 07:39

1 Answers1

4

It speed does not matter, I suggest to use a truncated sinc or a Lanczos isotropic kernel: to compute a target pixel, you back-rotate the filter and convolve it with the image. Since it is isotropic, it is separable and you can even use a square filter parallel to the axis of the source image.

Fabrice NEYRET
  • 1,266
  • 8
  • 14