Can I use opencv to get vector / curve data from line(s) drawn on a whiteboard? [closed]

asked 2019-02-25 15:52:52 -0600

BenPetersonCV gravatar image

This is an arbitrarily drawn line, not a basic shape like a circle or square. I'd ideally like to get curve data that I could feed into a procedural houdini model.

Multiple lines would be cool too, but just one could also be useful.

Hope I haven't overlooked something obvious. Thanks!

edit retag flag offensive reopen merge delete

Closed for the following reason not a real question by berak
close date 2019-02-26 07:11:05.270284

Comments

1

One option: There is a skeletonization algorithm ("thinning") implemented by OpenCV contrib. From there you can make a line from each pixel and the neighbouring pixels that are also part of the skeleton(s).

The code is at: https://github.com/opencv/opencv_cont...http://answers.opencv.org/question/18...

There is also another code that does not require OpenCV contrib: http://felix.abecassis.me/2011/09/ope...

sjhalayka gravatar imagesjhalayka ( 2019-02-25 17:55:04 -0600 )edit
1

Thanks sjhalayka I could see that being part of a solution! though the random lines on the "B" in the second link kinda show the limitations of it but that's not too bad at all. I'd upvote if i could here

BenPetersonCV gravatar imageBenPetersonCV ( 2019-02-25 18:41:49 -0600 )edit
1

No problem, good luck, and please post an answer once you've got it all figured out.

Also, check this Python code out: https://scikit-image.org/docs/dev/aut...

Notice in that page that there is a skeletonize_3d function. That looks like it's better than traditional thinning.

sjhalayka gravatar imagesjhalayka ( 2019-02-25 19:25:30 -0600 )edit