How do i store area into a list?

1 visualización (últimos 30 días)
Shu Yi Ho
Shu Yi Ho el 5 de Jul. de 2019
Comentada: Shu Yi Ho el 5 de Jul. de 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

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by