On using 'regionprops'?

조회 수: 2 (최근 30일)
Deepak Sivadas
Deepak Sivadas 2018년 11월 21일
답변: Image Analyst 2018년 11월 21일
Hi,
Stats = regionprops(L,'all');
for instance, L is a labelled binary image of 256x256.
What determines the size of Stats ? Pls respond.
Thanks,
Deepak

채택된 답변

Image Analyst
Image Analyst 2018년 11월 21일
The length of the stats structure is the same as the number of blobs in your image.
[L, numberOfBlobs] = bwlabel(binaryImage);
stats = regionprops(L, 'All');
fprintf('There are %d blobs in the labeled image.\n', numberOfBlobs);
fprintf('There are structures, in the stats structure array.\n', length(stats));
You can see that length(stats) will be the same as numberOfBlobs.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by