0

I am trying to get the rotation (to be more precise the skew) angles of an image (a scan of a fabric) using Python.

My benchmark for this operation is ImagMagick which however I cannot use.

From here I found out that ImageMagick uses something called the Radon transform, which this answer provides more detail and some code about.

However in reading the code in the answer I realize that it can inherently only return integers, as it uses an array index as the result, while ImageMagick does provide float-precision rotation angles.

In inspecting the images rotated by the Python code I see that the angle is slightly off, while with ImageMagick it's perfect.

How do I get higher precision deskew angles in Python?

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
simone
  • 4,667
  • 4
  • 25
  • 47

0 Answers0