[Filename, pathname, fileindex] = uigetfile ('*. avi ', 'select an AVI file'); video_info = aviinfo ([pathname filename]); % info = % filename: Video name % filesize: Video size % filemoddate: video creation date % numframes: Total Video Frames % framespersecond: video collection rate % width: Video width % height: Video height % imagetype: 'truecolor' image mode % videocompression: 'did3' video image compression format % quality: 0% numcolormapentries: 0len = video_info.numframes; % get video length for k = 1: Len video_videotape (K) = aviread (video_info.filename, k ); video_image = video_videotape (k ). CDATA; if k <10 imwrite(video_image, strcat('{', int2str(k},'.bmp '), 'bmp'); % save each frame to the hard disk elseif K >=10 & K <100 ''), 'bmp '); % save each frame of image to the hard disk elseif K> = 100 & K <1000 imwrite(video_image, strcat('00', int2str(k),'.bmp '), 'bmp '); % save each frame of image to the hard disk elseif K> = 1000 & K <1000 ''), 'bmp '); % save each frame of image to the hard disk else imwrite(video_image,strcat(int2str(k),'.bmp '), 'bmp '); % save each frame of image to the hard disk end
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service