Ask Your Question
0

I am trying to write a c++ code for finding the endpoints and branch points of a skeleton. dose anybody have any idea how to do that using opencv?

asked 2016-07-05 03:29:22 -0500

Saturn gravatar image

I am new in working with opencv. I have a binary skeleton result and the result of skeleton has some annoying branches and I want to clean up my skeleton and only preserve the main branches. then I want to trace the line which normally has a bifurcation by DFS. I would appreciate if anybody could help me .

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2016-07-05 04:19:10 -0500

kbarni gravatar image

Hint: the endpoints have only one neighbor, the points on the skeleton have two neighbors and the junction points have more than two neighbors (by neighbor I mean active point).

You can track the branches from the endpoints to the nearest junction, and count its length. If it's shorter than a given distance, just delete it.

edit flag offensive delete link more

Comments

You are welcome to answer your own question, but please make sure to give an answer. Remember that you can always revise your original question.

Saturn gravatar imageSaturn ( 2016-07-05 07:24:30 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-07-05 03:29:22 -0500

Seen: 500 times

Last updated: Jul 05 '16