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?