Borrar filtros
Borrar filtros

How can I do the same task with a loop in the step function?

3 visualizaciones (últimos 30 días)
kassem EL KEBBAR
kassem EL KEBBAR el 31 de Mayo de 2017
Respondida: Image Analyst el 1 de Jun. de 2017
Hello,
Please can anyone help me how can i correct this? I want to repeat taking pictures of the face detected, every 3 seconds, and save it in a file. (NB: the for..end is just for the video reader). Thank you.
for taoefaeffadef = 1:100
videoFrame = step(videoFileReader);
matchPic = imcropPolygon(bboxPolygon,videoFrame);
matchPic = cutPic(matchPic);
imwrite(matchPic,'test2.jpg');
....
end

Respuestas (1)

Image Analyst
Image Analyst el 1 de Jun. de 2017
I'm not sure what you're asking. If you want to take snapshots every 3 seconds and save to files on disk, then put this in the loop:
thisImage = getsnapshot();
filename = sprintf('Image %d.png', taoefaeffadef); % Change filename at each iteration.
imwrite(thisImage, filename); % Save to disk.
pause(3); % Wait 3 seconds

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by