I am trying to measure the mean, max, min, and SD distance between two lines, drawn by mouse in python. My main goal is to measure the retinal thickness of images obtained by medical devices (Look at the image attached please).
However, I don’t know how can I assign a value to both lines and then measure the parameters among them.
I only could write this code to draw a line using mouse:
import cv2 import numpy as np def click_event(event,x,y,flags,param): if event == cv2.EVENT_LBUTTONDOWN: cv2.circle(img,(x,y),3,(255,0,0),-1) points.append((x,y)) if len(points) >= 2: cv2.line(img,points[-1],points[-2],(0,255,0),1) cv2.imshow("image", img) cv2.imshow("image",img) points =  cv2.setMouseCallback('image',click_event) cv2.waitKey(0)