Azzera filtri
Azzera filtri

On using 'regionprops'?

1 visualizzazione (ultimi 30 giorni)
Deepak Sivadas
Deepak Sivadas il 21 Nov 2018
Risposto: Image Analyst il 21 Nov 2018
Stats = regionprops(L,'all');
for instance, L is a labelled binary image of 256x256.
What determines the size of Stats ? Pls respond.

Risposta accettata

Image Analyst
Image Analyst il 21 Nov 2018
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.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by