MATlab处理视频文件时候出错了
clearall;%读取视频str='noise1.avi';info=aviinfo(str);len=info.NumFrames;fori=1:lenmov=avi...
clear all;
%读取视频
str='noise1.avi';
info = aviinfo(str);
len = info.NumFrames;
for i = 1 : len
mov = aviread(str, i);
I = mov.cdata;
%转成灰度图像
g = im2double(I);
f = rgb2gray(g);
%线性增亮
j=1:576;
k=1:720;
f(j,k)=f(j,k)*7;
imwrite(f,strcat('original image1\orig_im',int2str(i),'.jpg'),'jpg');
end
出现了下面的错误:??? Error using ==> rgb2gray>parse_inputs at 82
MAP must be a m x 3 array.
Error in ==> rgb2gray at 35
X = parse_inputs(varargin{:});
Error in ==> original at 11
f = rgb2gray(g); 展开
%读取视频
str='noise1.avi';
info = aviinfo(str);
len = info.NumFrames;
for i = 1 : len
mov = aviread(str, i);
I = mov.cdata;
%转成灰度图像
g = im2double(I);
f = rgb2gray(g);
%线性增亮
j=1:576;
k=1:720;
f(j,k)=f(j,k)*7;
imwrite(f,strcat('original image1\orig_im',int2str(i),'.jpg'),'jpg');
end
出现了下面的错误:??? Error using ==> rgb2gray>parse_inputs at 82
MAP must be a m x 3 array.
Error in ==> rgb2gray at 35
X = parse_inputs(varargin{:});
Error in ==> original at 11
f = rgb2gray(g); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询