First time here? Check out the FAQ!

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 Jul 5 '16

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 .

Preview: (hide)

1 answer

Sort by » oldest newest most voted
3

answered Jul 5 '16

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.

Preview: (hide)

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 (Jul 5 '16)edit

Question Tools

1 follower

Stats

Asked: Jul 5 '16

Seen: 1,257 times

Last updated: Jul 05 '16