Digital Signal Processing Experiment (0)--one-dimensional sound signal processing and two-dimensional image processing

Source: Internet
Author: User

I. I/O of sound signal in MATLAB 1, read WAV file function

? y = Wavread ('filename'= wavread ('filename' ) = Wavread ('filename' = Wavread ('filename') , [N1 N2])

2. Write WAV file function
? wavwrite (Y,'filename')? Wavwrite (Y,fs,'filename')  )? Wavwrite (Y,fs,n,'filename')

3. Play sound function
Sound (Y,FS), sound (y), Sound (y,fs,bits)

Second, the image processing related MATLAB comes with the function 1, reads the Image:

The function Imread can read an image in any bit depth from any MATLAB supported image file format. The format is:

x=imread (' FILENAME. FMT ')%filename-The image file name%fmt-for the image format that needs to be read in

2. Image display
Imshow (gray); Displays grayscale image, Gray is a two-dimensional matrix imshow (RGB)  ; Displays a true color image, RGB is a three-dimensional matrix imshow (BW)   ; Displays a binary image, BW is a two-dimensional matrix

3. Image Preservation
Imwrite (I,' filename. file format '% file format: BMP, JPG, PCX, TIF.

3. Image format Conversion
Rgb2gray (' picture name ');        %RGB turns into grayscale IM2BW (' picture name ');           % gray to two-value image

Digital Signal Processing Experiment (0)--one-dimensional sound signal processing and two-dimensional image processing

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.