How to make traversal in an image and change color of the specified pixels along the path by some criteria, for example in my image i shown as under, I want to place after each five pixels a white pixel in an image.?

조회 수: 1 (최근 30일)
  댓글 수: 5
Mohammad Bhat
Mohammad Bhat 2017년 11월 18일
hi, Actually I want to extract underlying graph from handwritten word image.As shown in figure , i have extracted branch and end points. To represent whole image in an exact manner, I want to add nodes or after regular intervals along the path.So that we get better reprentation intetms of nodes.
Mohammad Bhat
Mohammad Bhat 2017년 11월 18일
1. find start and end points. 2. find branch or junction points. 3. add nodes along the path. 4. then add edges along the path.
Image is binarised and thinned by using bwmorph command of matlab..

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2017년 11월 19일
I think you want bwmorph() with the 'endpoints' and 'branchpoints' options.
  댓글 수: 3
Image Analyst
Image Analyst 2017년 11월 19일
Why? You can subtract branchpoints from the original image to break it apart into segments. Then you'd have to write some custom code to "traverse" each segment but I see no reason to do this. Good luck on writing that code though.
Mohammad Bhat
Mohammad Bhat 2017년 11월 19일
here is algo which I want to implement:- 1. For each connected component 2. find junction points 3. invert junction points 4. For each connected sub-component 5. Find start and end points 6. add nodes along the path 7. replace neighbours of junction point 8. add edges based on skeleton. ----------------------------------------- image is filtered,binarised character image let us say small character 'e'...

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Walter Roberson
Walter Roberson 2017년 11월 18일
  댓글 수: 12
Mohammad Bhat
Mohammad Bhat 2017년 11월 19일
I have extracted branch and end points of a binary handwritten image of letter 'e' . Between every points (branch and end ) I have to place atleast two or three nodes more, inorder to represent it more accurately....
Image Analyst
Image Analyst 2017년 11월 19일
You can remove the branchpoints to break apart the blobs. Then use regionprops() and ask for PixelIdxList to get the linear indexes or PixelList to get a list of (x,y) coordinates of pixels in the blob. This may not give pixels in the exact order - it probably does for linear shapes but you'd have to check for blobs that loop back, like a C shape.

댓글을 달려면 로그인하십시오.


Mohammad Bhat
Mohammad Bhat 2017년 11월 19일
If we have some code to begin with....If we try letter e...

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by