can anyone provide a code for converting an connected binary component labelling into a 4-connected labelling??

 채택된 답변

I already answered this in your duplicate question http://www.mathworks.com/matlabcentral/answers/196207-i-want-an-algorithm-to-convert-an-8-connected-labelling-into-a-4-connected-labelling-on-this-binary You said that you did not want to use the MATLAB function that does it, bwlabel(), and so I provided you with a Wikipedia link which has the algorithm that you can program up yourself from scratch: http://en.wikipedia.org/wiki/Connected-component_labeling. So I'm puzzled as to why you're asking again. You said "I want to convert..." rather than "I want someone to give me their code..." so I gave you the recipe where you can do it. Is that not correct?

댓글 수: 4

sir i really appreciate ur help, bt i didnt receive this mail of yours before ? Plz dont mind ! Definitely I would do it myself ?
I didn't email you anything. I gave you the Wikipedia link that has the algorithm. All you have to do is to translate the steps into MATLAB code.
No, I don't have the code because I use the built-in function, like most people. For some reason, you said you wanted to do it: "Definitely I would do it myself" so, good luck. Again, I don't have it to send to you even if I could.

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

추가 답변 (1개)

There is one more thing ? if i store the positions of 1's of a binary image in an array, can i perform labeling by applying suitable operations on the indices of 1's which are stored in the array ??

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2015년 4월 6일

댓글:

2015년 4월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by