VideoWriter を使ってアニメーションを MPEG-4 として保存すると、画像がチカチカするのはなぜですか?
显示 更早的评论
VideoWriter オブジェクトを使用して、MATLAB のグラフィックスで作成したアニメーションを MPEG-4(.mp4) として保存しています。
作成した動画を Windows Media Player や VLC media playerなどの外部アプリケーションで再生すると、細いラインの色がチカチカと変化したり、フレーム毎の輝度が異なっているように見えます。
figure
t = linspace(0,10,1000);
y = randn(size(t));
plot(t,y)
hold on
h_x = xline(t(1),'--r');
v = VideoWriter('newfile.mp4','MPEG-4');
v.Quality = 100;
v.FrameRate = 10;
open(v)
for n = 1:length(t)
h_x.Value = t(n);
drawnow limitrate
frame = getframe(gcf);
writeVideo(v,frame);
end
close(v)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 アニメーション 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!