Document not found! Please try again

Export to Video - MATLAB & Simulink.pdf - Google Drive

0 downloads 188 Views 81KB Size Report
Export to Video - MATLAB & Simulink.pdf. Export to Video - MATLAB & Simulink.pdf. Open. Extract. Open with. Sign
Export to Video ®

To create an Audio/Video Interleaved (AVI) file from MATLAB  graphics animations or from still images, follow these steps: 1.  Create a VideoWriter object by calling the VideoWriter function. For example: myVideo = VideoWriter('myfile.avi');

By default, VideoWriter prepares to create an AVI file using Motion JPEG compression. To create an uncompressed file, specify the Uncompressed AVI profile, as follows: uncompressedVideo = VideoWriter('myfile.avi', 'Uncompressed AVI');

2.  Optionally, adjust the frame rate (number of frames to display per second) or the quality setting (a percentage from 0 through 100). For example: myVideo.FrameRate = 15;  % Default 30 myVideo.Quality = 50;    % Default 75

Note:   Quality settings only apply to compressed files. Higher quality settings result in higher video quality, but also increase the file size. Lower quality settings decrease the file size and video quality.

3.  Open the file: open(myVideo);

Note:   After you call open, you cannot change the frame rate or quality settings.

4.  Write frames, still images, or an existing MATLAB movie to the file by calling writeVideo. For example, suppose that you have created a MATLAB movie called myMovie. Write your movie to a file: writeVideo(myVideo, myMovie);

Alternatively, writeVideo accepts single frames or arrays of still images as the second input argument. For more information, see the writeVideo reference page. 5.  Close the file: close(myVideo);

See Also VideoWriter