I'm trying to find a way to fit a spline on an image. I know that in the images to be processed there is a line that is:
- somewhat horizontal
- from left to right edge
- not continuous
I cannot find a way to fit a spline there. This can be achieved with NI LabView, so it's hard to believe there wouldn't be a way also with OpenCV.
This is how far I have gotten:
import cv2
frame = cv2.imread("./download.png")
edged = cv2.Canny(frame, 50, 200)
cv2.imshow('frame', frame)
cv2.imshow('edge', edged)
cv2.waitKey()
Schematic image below describes what I have accomplished and what is the expected output (red manually drawn spline).

