OpenCV: Searching for pixels along single-pixel branches -


i'm trying find neat way of storing separate "branches" in binary image. little animation explains it:

searching branches

as go along branches need collect pixel indices makes single-pixel wide branch. when hit junction point should split , store new branches.

one way of going maybe create 3x3 subregion, find out if there white pixels inside it, move accordingly, create junction point if there more two. store previous subregion 1 can use making sure don't move regions scanned. it's bit tricky figure out how go though.

i need reorder pixels based on "line/curve" hierarchy. part of application redraw figures, internally works creating lines between points hence need have them "ordered".

i don't know if apply in case should take @ cv::findcontour. vector of points ordered.

http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/find_contours/find_contours.html


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -