cv2.line:
image = cv2.line(image, starting point coordinates, end point coordinates, color, thickness)
When using cv2.line, the following error is reported
error prompts that the parameter type with index 1 is wrong, ie (weight, right_y), (0, left_y)
By printing, it is found that the data types of weight, right_y, and left_y are float
After changing the data type to int, no error will be reported
img = cv2.line(image3,(int(weigh), int(right_y)), (0, int(left_y)), (0, 255, 0), 2)