laser curved line detection using opencv and python
I have taken out the laser curve of this image : (source: hostingpics.net ) And now, I'm trying to obtain a set of points (the more, the better), which are in the middle of this curve. I have tried to split the image into vertical stripes, and then to detect the centroid. But it doesn't calculate lots of points, and it's not satisfactory at all ! img = cv2.Canny(img,50,150,apertureSize = 3) sub = 100 step=int(img.shape[1]/sub) centroid=[] for i in range(sub): x0= i*step x1=(i+1)*step-1 temp = img[:,x0:x1] hierarchy,contours,_ = cv2.findContours(temp, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)