%%
clear;close all
A=VideoReader('rhinos.avi');B=read(A);
disp(size(B))
N_Frames=A.NumFrames
Height=A.Height
Width=A.Width
mov(1:N_Frames)=struct('cdata',zeros(Height,Width,3,'unit8'),'colormap',[]);
for i=1:N_Frames
mov(i).data=B(:,:,:,i)
end
h=figure
set(h,'position',[150,150,Width,Height]);
movie(h,mov);
这个视频文件是matlab自带的文件,为什么出错了呢,应该怎么改呢?

 채택된 답변

cnphsxn
cnphsxn 2023년 5월 23일

0 개 추천

是uint8,不是unit8

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Coder에 대해 자세히 알아보기

질문:

2023년 5월 23일

답변:

2023년 5월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!