Finds strong edges (Sobel magnitude above the 90th percentile and at least 16) w...
https://bild.halowerk.com/v1/horizon-levelOverview
Finds strong edges (Sobel magnitude above the 90th percentile and at least 16) whose orientation lies within max_angle of horizontal on a copy with at most 800 px on the long side, votes them into an orientation-constrained Hough accumulator (0.1° steps), takes the strongest line and refines it with a weighted total-least-squares fit of the supporting edge pixels. A horizon is accepted when the supporting pixels span at least a quarter of the width.