www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/WriteImageToMotionJPEG2000FileExample.m
%% Write Image to Motion JPEG 2000 File % Write an RGB image to a Motion JPEG 2000 file with lossless compression. %% % Create an array containing data from the sample still image, |peppers.png|. % Copyright 2015 The MathWorks, Inc. A = imread('peppers.png'); %% % Create a |VideoWriter| object for a new video file. Use the |'Archival'| % profile to specify a Motion JPEG 2000 file with lossless compression. v = VideoWriter('myFile','Archival'); %% % Verify the type of video compression for the new file. v.VideoCompressionMethod %% % Open the video file for writing. Then, write the image data in |A| to the % file. open(v) writeVideo(v,A) %% % Close the video file. close(v)