1 | initial version |
If you already have the contours of the lines you want the measure you could use cv2.boundingRect(cnt) to draw a box around the contours. The third value this function returns is the width of this box. (Which should be equal to the width of your line)
Was this what you wanted to know?