contourlet.m
上传用户:l56789
上传日期:2022-02-25
资源大小:2422k
文件大小:1k
源码类别:

图形图像处理

开发平台:

Matlab

  1. % contourlet.m
  2. % written by: Duncan Po
  3. % Date: August 24, 2002
  4. % Performs the Contourlet Transform on an Image
  5. % Usage: coefs = contourlet(pyrfilter, dirfilter, levndir, imname, imformat)
  6. %        coefs = contourlet(pyrfilter, dirfilter, levndir, image)
  7. % Inputs:   pyrfilter   - Pyramid filter (e.g. '9-7')
  8. %           dir         - Directional filter (e.g. 'cd')
  9. %           levndir     - the number of subbands in each level
  10. %           imname      - the name of the image in a file
  11. %           imformat    - the format of the image file
  12. %           image       - the image in memory
  13. % Output:   coefs       - contourlet coefficients in subband structure
  14. function coefs = contourlet(pyrfilter, dirfilter, levndir, imname, imformat)
  15. if nargin == 5
  16.     pic = imread(imname,imformat);  
  17.     pic = double(pic);
  18. elseif nargin == 4
  19.     pic = imname;
  20. end;
  21. %figure;
  22. %imshow(uint8(pic));
  23. coefs = pdfbdec(pic, pyrfilter, dirfilter, levndir);