Measure the skew angle of a scanned or photographed text page with a projection-...
https://bild.halowerk.com/v1/page-deskewOverview
Measure the skew angle of a scanned or photographed text page with a projection-profile search and return the straightened image as PNG or JPEG. Binarises a downscaled copy (Otsu), collects dark pixels and searches the rotation that maximises the squared differences of the horizontal projection profile (Postl method): coarse 0.25° steps over ±max_angle, then 0.02° refinement.