Double Shear Rotation

(for use with run-length-encoded images)

The process is two step.

With this original image, we first perform a shear along the x-axis.

This results in an image which has its vertical edges aligned correctly. The second stage is a shear along the y-axis.

The final image should be oriented correctly, with slight error that depends upon the original skew of the image. This algorithm based on work done by Fateman and his students in 1995.