Learn together matlab-matlab study notes 4
Data Import and Export save multimedia files and read _2
Find useful, welcome to discuss mutual learning together - Follow Me
Reference books
"matlab programming and integrated application" Zhang Defeng waiting to thank Zhang's books, so I appreciate the convenience matlab
Import / export graphics files
imread function
Use imread function can import graphics files into MATLAB workspace. imread function supports graphic file standard file formats, including TIFF (TaggedImageFileFormat), GIF (GraphicsInterchangeFormat), JPEG (JointPhotographicExpertsGroup) and PNG (PortableNetworkGraphics) format. The following command will read graphics data in JPEG format MATLAB workspace with storage array imdata
imwrite function
imwrite function can be derived from a graphics file format standard MATLAB workspace, supports the same format as imread. The following statement MATLAB workspace multidimensional array data X to read TIFF file format.
Import / export graphics files
There are many MATLAB functions can query file information containing audio and video data, such as mmfilinfo function. Meanwhile, MATLAB provides many import audio / video data to the function of the operating space, you can be imported from a file, using the input device may be recorded, such as a microphone.
Import audio / video function mainly auread, aviread and wavread, sound files can be read separately, AV WAVE sound and video.
MATLAB function to export the audio has auwrite and wavwnte, you can export audio file formats such as WAV and AU, respectively. The export video files more complicated, you need to create an object with avifile avifile function, and then use the methods and properties AVI file object to control the export process. As in MATLAB, you can save a series of graphics that can be played as a movie, and then export the MAT file.