Skip to content
Advertisement

Find end point on each line using OpenCV

I’m trying to get the coordinate of every end point on every line, but i couldn’t come up with a solution, this is what I’ve currently got but its finding the outline of the lines not the lines itself

floorplan

enter image description here

JavaScript

Advertisement

Answer

The hit-or-miss transform can be used to find end points of a line after skeletonization.

Code:

JavaScript

enter image description here

JavaScript

enter image description here

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement