Used getframe command to create video, but get empty file
Mostrar comentarios más antiguos
Hi,
I am using getframe command to create a video, but got an empty file in the end.
Could anyone help me with this?
Thanks! Ruming
Here attached is the matlab script that I used:
for j = 1:a_w
for i = 1:b_w
array_2_with_diff(1, i) = Data_with_diff(j, i);
end
p = scatter(array_x_axis(1,:),array_2_with_diff(1,:),'o');
h = plot(array_x_axis(1,:),array_2_with_diff(1,:),'g');
drawnow;
F(i) = getframe(gcf);
pause(0.01);
delete(p);
delete(h);
end
video = VideoWriter('With_diff_movie.avi', 'Uncompressed AVI');
video.FrameRate = 60;
open(video);
writeVideo(video, F);
close(video);
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Audio and Video Data en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!