how to crop bigger size of blob in binary image and count its pixel .

5 ビュー (過去 30 日間)
Rahul punk
Rahul punk 2019 年 1 月 12 日
コメント済み: Rahul punk 2019 年 1 月 14 日
  1 件のコメント
Rahul punk
Rahul punk 2019 年 1 月 12 日
the size of images all time change so not a constant image size.
thank you!

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2019 年 1 月 12 日
Not sure what you mean. You can use imcrop() if you want. You can also find the bounding boxes if you want:
props = regionprops(binaryImage, 'BoundingBox');
To crop out each one individually, do this
for k = 1 : length(props)
thisBB = props(k).BoundingBox;
subImage = imcrop(binaryImage, thisBB);
figure;
imshow(subImage);
end
This is done in my Image Processing Tutorial
screenshot.jpg
  3 件のコメント
Image Analyst
Image Analyst 2019 年 1 月 13 日
Use bwareafilt()
biggestBlob = bwareafilt(binaryImage, 1); % Extract largest blob ONLY
areaOfBiggestBlob = nnz(biggestBlob) % Get its area
Rahul punk
Rahul punk 2019 年 1 月 14 日
its very easy thanks image analysis

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2011b

Community Treasure Hunt

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

Start Hunting!

Translated by