i want to display the bobs which are greater than area 15

1 次查看(过去 30 天)
code: label = bwlabel(bw,4); stats = regionprops(label,'Centroid','Area'); >> for n = 1:length(stats) disp(sprintf('Blob number = %d, Area = %g, Centroid = (%g, %g)',... n,stats(n).Area,stats(n).Centroid)) end Blob number = 1, Area = 22, Centroid = (11.3182, 5.81818) Blob number = 2, Area = 80, Centroid = (31.825, 114.138) Blob number = 3, Area = 4, Centroid = (50, 144) Blob number = 4, Area = 3, Centroid = (58.6667, 54) Blob number = 5, Area = 166, Centroid = (108.042, 46.8675) Blob number = 6, Area = 186, Centroid = (73.2473, 94.0484) Blob number = 7, Area = 2, Centroid = (61, 114.5) Blob number = 8, Area = 2, Centroid = (63, 114.5) Blob number = 9, Area = 12, Centroid = (75.1667, 154.5) Blob number = 10, Area = 14, Centroid = (79.9286, 142.286) Blob number = 11, Area = 1, Centroid = (79, 139)
  1 个评论
Datti Nagadhara Harini
I found it
x =15; >> biggestGrain = find([stats.Area]>=x); I got the result as biggestGrain = 1 2 5 6
That is true only these four regions i nneed. but how to calculate further with these blobs how should i display the 1 2 5 6 blobs

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Performance and Memory 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by