I have this two Images
Vertical white line on a black background
Horizontal white line on a black background
I used the following code to get the angle of t