obj=VideoReader('C:\Users\liuxu\Desktop\5.avi')
读取视频文件信息
常规属性:
Name: '5.avi'
Path: 'C:\Users\liuxu\Desktop'
Duration: 31.8400
CurrentTime: 0
NumFrames: 796
视频属性:
Width: 1280
Height: 720
FrameRate: 25
BitsPerPixel: 24
VideoFormat: 'RGB24'
NumFrames=obj.NumFrames;
for j=1:NumFrames
frame=read(obj,j);
%imshow(frame);
imwrite(frame,strcat('D:\project',num2str(j),'.jpg'),'jpg');
end