I am using Python v2.7 for this work. As an input i have a relatively white image with a clear black line on it. The line is always linear, no polynomial of second or above order. The line can be anyway on the image
I am trying to define the equation of this line in the form of y = ax +b
Currently my approach would be to find which pixel belongs to the line then do a linear regression to get the equation. But i am trying to find out which function in python i need to use to achieve this and this is where I would need some help
Or maybe you have an even simpler way of doing it.
adding one image as example