Crack Mask
Desired Result
I am trying to fit line segments on cracks to approximate thier coordinates using OpenCV in python. I also want the coordinates of both ends of the line segment.
I applied skeletonization and then an approximate poly DP function of OpenCV but did not get suitable results. Other contour approximation functions did not help either, though cv.fitLine can work but there must be a minimum angle at which a line segment should be fitted.
getgud is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.