Fit a straight line on curve in image with OpenCV

616 Views Asked by At

I am trying to detect a straight line on an image containing a not so straight line using OpenCV python.

For example in this image, we can see there is a somewhat horizontal line.

Raw image

I have tried using Hough lines but only small segments are detected. Do you know how I should proceed for this? Ideally I would have a detected line as follows: detected line

0

There are 0 best solutions below