if the fucntion of spectrum and psd can be applied on image ?

1 view (last 30 days)
In matlab , there are two fucntions called spectrum and psd which are showed to estimate PSD, but i can not sure the type of input data. if the fucntion of spectrum and psd can be applied on image ? Thanks!

Accepted Answer

Walter Roberson
Walter Roberson on 27 Apr 2014
The psd() that you are looking at requires a spectrum object to be passed in as the first parameter. The data array, X, that is passed in, will be treated as a discrete time signal. I think that means that each column would be treated as an independent channel, and possibly that only 2D arrays would be supported (not RGB). You might have to pass double() of your image in.
  1 Comment
youjie
youjie on 28 Apr 2014
when i applied the psd function on a 2-d matrix(m) and its transposed matrix(m'), i found results were different. I question if this fuction can be used to get PSD of image.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 28 Apr 2014
For an image you can call fft2() to get the spectrum. Then take the magnitude and square it. You might also take the log of that, just for display, to compress the lower frequencies so you can see them better.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!