Image dividing/labeling using color code?
조회 수: 1 (최근 30일)
이전 댓글 표시
IS there a certain coding to label different parts of the edges from this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153840/image.png)
to something like this?:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153841/image.png)
I was thinking about using bwlabel but that seems to only apply on connected objects. It doesn't apply to dividing them and then labeling.
댓글 수: 0
답변 (1개)
Image Analyst
2014년 7월 31일
Well you have to think of some way to split the boundaries. Since there is nothing that really indicates where to split it, you might have to do that manually. Use ginput(3) to have the user click on 3 points. Then zeros them out and then do this:
labeledImage = bwlabel(binaryImage, 8); % Label each blob so we can make measurements of it
coloredLabels = label2rgb (labeledImage, 'hsv', 'k', 'shuffle'); % pseudo random color labels
imshow(coloredLabels);
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!