I want save each each white nodules as an image from the below binary image?
1 回表示 (過去 30 日間)
古いコメントを表示
2 件のコメント
回答 (1 件)
Image Analyst
2020 年 2 月 1 日
You can use regionprops() to get the bounding box of each blob, then crop it and use imwrite() to write it out as its own image. Something like this untested code:
props = regionprops(binaryImage, 'BoundingBox');
for k = 1 : length(props)
croppedImage = imcrop(binaryImage, props(k).BoundingBox);
fileName = sprintf('Blob %2.2d', k);
imwrite(croppedImage, filename);
end
This just does what your subject line asked - how to save each blob as an image. It does not compute the GLCM of each blob. If you want, you can call glcm() on each cropped image and save the results in a .mat file using save().
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Segmentation and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!