cctcop75 2015-12-11 07:29 采纳率: 0%
浏览 2967

matlab2009VideoWriter(和writeVideo)不能使用

本人在使用matlab 2009中,使用VideoWriter(和writeVideo)出错。错误信息为:
??? Undefined function or method 'VideoWriter' for input arguments of type
'char'.

Error in ==> Untitled3 at 2
writerObj = VideoWriter('npc.avi');

代码为:

close all;
clear all;
clc;
%% 读视频
vObj = VideoReader('traffic.avi');
nFrames = vObj.NumberOfFrames;

%截取视频片段
myMovie = read(vObj,[1 nFrames-1]);
%% 写视频
%初始化
myVideo = VideoWriter('myfile.avi','Uncompressed AVI');
myVideo.FrameRate = 15;

%写入截取的视频
open(myVideo);
writeVideo(myVideo,myMovie);

  • 写回答

2条回答 默认 最新

  • 昨日歌儿 2015-12-11 09:36
    关注

    你好,我建议你安装Matlab2014b,上面的代码在该版本上运行无误,可以正常读取和写入AVI文件。

    评论

报告相同问题?

悬赏问题

  • ¥15 R语言绘制生存曲线时出现警告:All aesthetics have length 1, but the data has 2 rows.
  • ¥15 苍穹外卖拦截器token为null
  • ¥15 pyqt怎么把滑块和输入框相互绑定,求解决!
  • ¥20 wpf datagrid单元闪烁效果失灵
  • ¥15 券商软件上市公司信息获取问题
  • ¥100 ensp启动设备蓝屏,代码clock_watchdog_timeout
  • ¥15 Android studio AVD启动不了
  • ¥15 陆空双模式无人机怎么做
  • ¥15 想咨询点问题,与算法转换,负荷预测,数字孪生有关
  • ¥15 C#中的编译平台的区别影响