
1. you can do a skeleton, then use a np.ones((3,3)) to convolve. then 3 means junction, one means termin. 2 means path.2. trace from a termin. iterate all the pixel > 0. and add node if != 2! some tips:1. if you do skeleton straightly, you will get some small branch, you can remove them by graph analysis. but I have a tip, you can do a gauss blur, then threshold again. this will smooth the binary image.2. trace the path is not very simple, you need care many detail... you can look mine.3. the scikit-image's skeleton method prefers to generate branch (sometimes we want, but here we need not), you can look here. you can have a try my project imagery do some test. which can wrap scikit-image like photoshop!(but I do not know if scikit-image has a method to build the skeleton) My English is solo, forgive me. YXDragon - ImagePy--------------------------------来自我的新浪邮箱android客户端-------- 原始邮件 --------发件人:Leena Chourey时 间:2017年5月18日 12:05(星期四)收件人:scikit-image@python.org主题:[scikit-image] Need help to get graph from imageDear All,I need to convert shape based image(graph_search2.jpg) into graph and then graph data structure. I have tried to filter the image and then with threshold, contour based approach access shapes(nodes), lines(edges) and arrows. but facing difficulty in getting relation b/w nodes and edges. Please help to find interest point(interest_points.jpg) and relation in node n edges.-- Thanks & Regards, -धन्यवादLeena Chourey , लीना चौरे C-DAC Mumbai सी-डैक, मुम्बई _______________________________________________scikit-image mailing listscikit-image@python.orghttps://mail.python.org/mailman/listinfo/scikit-image -------------------------------- 来自我的新浪邮箱android客户端