How do i store area into a list?

1 vue (au cours des 30 derniers jours)
Shu Yi Ho
Shu Yi Ho le 5 Juil 2019
Commenté : Shu Yi Ho le 5 Juil 2019
Here are my following questions:
1) How do i store area into a list then call for the max (function5)
2) How can i tidy up my code as i have some repeative
Currently I have issue with function 5. I want to store the area into a list. later part will call for the max area and compare with a value, if it exceed the range, alarm will be trigerred.
%% FUNCTION 5: AREA OF BLACK BLOBS (INDIVIDUAL)
if max(blobArea) > 3000
[a,fs]= audioread('Test/WarningAlarm.mp3');
sound(a(1:300000,1),fs);
numNGcases = numNGcases + 1;
fprintf('FUNCTION 5 Error\n');
else
numOKcases = numOKcases + 1;
end

Réponse acceptée

Image Analyst
Image Analyst le 5 Juil 2019
%% FUNCTION 5: AREA OF BLACK BLOBS (INDIVIDUAL)
allBlobAreas = [blobMeasurements.Area] % Put all blob areas into one list (vector).
if max(allBlobAreas) > 3000
etc.
  1 commentaire
Shu Yi Ho
Shu Yi Ho le 5 Juil 2019
Thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by