Ask Your Question

How do I follow the detected line and find more points connected to it?

asked 2017-10-02 10:32:48 -0500

Splintersfury gravatar image

updated 2020-12-09 08:22:33 -0500

So I have create a code to find the edge of a wall, through finding the intersect of the lines from the edges detected within a ROI. I have the coordinates of the lines in (x1,y1,x2,y2) form, for this case, I would have 3 lines from that point.


What I would like to do, is follow the lines along the edges and find another intersection. How do I go about doing this search? I would like to do this with limited regions of interest, whereby I perform canny only on the initial ROI, and also run canny on a certain ROI around the line.

edit retag flag offensive close merge delete


pklab gravatar imagepklab ( 2017-10-06 04:55:31 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-10-03 09:15:27 -0500

John_OpenCVdev gravatar image

Find the contours for your edge image and sort the contour points. Those points may help you to follow the line. You have the initial Point, simply you can look for a deviation in the X points for your horizontal line and Y for your vertical line.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-10-02 10:32:48 -0500

Seen: 577 times

Last updated: Oct 03 '17