Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to use the output of cv2.fitLine()

I am basically trying to fit 2 lines to 2 sets of points (each has 100 points) and find the normal distance between the lines, I am using cv2.fitLine() to fit the line in python

From the documentation, fitLine returns a vector containing: (vx, vy, x0, y0), Where vx,vy are normalized vector collinear to the line and x0,y0 is a point on the line. I am confused on how to get the equation of the line from these values so that I can find the normal distance between the two lines.