How can i store the labeled coordinates in differnt arrays?
古いコメントを表示
i want to find the coordinates of labeled images .i got labeled values but issue is to separate the labels in separate array which just show me coordinates of label 1 and in the same way for the rest of my all labels till max for particular image
i got labels on 8-neighborhood basis and also show me max number of labels
L = bwlabel(B,8) mx=max(max(L))
i also showed all labels separately in figure form but rather than figure i need coordinates of those labeled object and for figures i used this (for loop)
for s=1:mx
[x y]=find(L==s);
figure, imshow(B(x,y));
end
actually i don't need to show figures i want coordinates of those figures which will store separately in some separate array of variables like label 1's coordinates will store in one array for label 2 in other array and so on till end please help me out ...I'll be thankful to you
採用された回答
その他の回答 (1 件)
Matt Kindig
2012 年 7 月 20 日
0 投票
Run regionprops() on B, and then look at the 'PixelList' property.
4 件のコメント
sameen
2012 年 7 月 21 日
Matt Kindig
2012 年 7 月 22 日
編集済み: Matt Kindig
2012 年 7 月 22 日
I'm not sure how this is relevant to the question... did you perhaps mistakenly comment on the wrong question? What are u and v?
Image Analyst
2012 年 7 月 22 日
Trust me - you don't need assignin().
Matt Kindig
2012 年 7 月 22 日
True, you don't need assignin(). But did you try the regionprops() suggestion that I made?
カテゴリ
ヘルプ センター および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!