Azzera filtri
Azzera filtri

How do i store area into a list?

1 visualizzazione (ultimi 30 giorni)
Shu Yi Ho
Shu Yi Ho il 5 Lug 2019
Commentato: Shu Yi Ho il 5 Lug 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

Risposta accettata

Image Analyst
Image Analyst il 5 Lug 2019
%% FUNCTION 5: AREA OF BLACK BLOBS (INDIVIDUAL)
allBlobAreas = [blobMeasurements.Area] % Put all blob areas into one list (vector).
if max(allBlobAreas) > 3000
etc.

Più risposte (0)

Categorie

Scopri di più su Images in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by