美文网首页
2018-08-30

2018-08-30

作者: 学EE的AlvinLO | 来源:发表于2018-08-31 07:54 被阅读0次

    将连续图像帧序列用Matlab转化为视频流

    % 声明视频输出路径
    outputVideo = VideoWriter( fullfile( 'D:\phd codes\SfmLearner-Pytorch-master\SfmLearner-Pytorch-master\dataset\sequences\00\image_1', 'test.avi' ) );
    % 设置视频输出的参数
    outputVideo.FrameRate = 24;
    outputVideo.Quality = 100
    % 启动
    open( outputVideo )
    % 准备图像,使用该目录下所有png格式图像
    imageNames = dir( fullfile( 'D:\phd codes\SfmLearner-Pytorch-master\SfmLearner-Pytorch-master\dataset\sequences\00\image_1','*.png' ) )
    for ii = 1 : length( imageNames )
    img = imread(fullfile( 'D:\phd codes\SfmLearner-Pytorch-master\SfmLearner-Pytorch-master\dataset\sequences\00\image_1', imageNames(ii).name ) );
    writeVideo( outputVideo, img ) % 写入
    end
    % 关闭写入器,使视频生效
    close(outputVideo)`

    相关文章

      网友评论

          本文标题:2018-08-30

          本文链接:https://www.haomeiwen.com/subject/oywjwftx.html