can anyone explain this code? this code is related to my project crowd density estimation
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
for a = 1:size(video,4)
imagesc(video(:,:,:,a));
axis image off
drawnow;
end;
3 comentarios
Image Analyst
el 27 de Mzo. de 2017
Guillaume
el 27 de Mzo. de 2017
Jan
el 27 de Mzo. de 2017
I've closed this question, because there is an accepted answer in the duplicate thread already. This thread will be deleted soon.
Respuestas (1)
This is very basic Matlab code. Please read the Getting Started chapters of the documentation and https://matlabacademy.mathworks.com/ . It would not be efficient to explain the absolute basics in the forum, when there are very good tutorials available already.
So only for a quick start:
You code is a loop over the indices along the 4th dimension of the variable "video". This is a 4D-array and the RGB images can be accessed using video(:, :, :, frameNumber). Then the axes is set to the "image" format (upside down) and mad invisible by the 'off'. Finally drawnow gives Matlab time to perform an update of the screen. Then the "end" closes the loop and the processing proceeds in the for line.
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!