rgb_avi.m
来自「Run RGB Video and watch the R-G-B Video 」· M 代码 · 共 31 行
M
31 行
close all
clear all
avi = aviread('samplevideo.avi');
video = {avi.cdata};
for a = 1:length(video)
b=video{a};
% figure(1)
% set(gcf,'Position',[50 450 400 300]);
% imagesc(b);title('original video')
% axis image off
% drawnow;
figure(2)
set(gcf,'Position',[650 450 400 300]);
imagesc(b(:,:,1));colormap(gray);title('Red Component Video')
axis image off
drawnow;
% figure(3)
% set(gcf,'Position',[50 40 400 300]);
% imagesc(b(:,:,2));colormap(gray);title('Green Component Video')
% axis image off
% drawnow;
% figure(4)
% set(gcf,'Position',[650 40 400 300]);
% imagesc(b(:,:,3));colormap(gray);title('Blue Component Video')
% axis image off
% drawnow;
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?