How do i store area into a list?

1 view (last 30 days)
Shu Yi Ho
Shu Yi Ho on 5 Jul 2019
Commented: Shu Yi Ho on 5 Jul 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

Accepted Answer

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

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!