views:

299

answers:

1

Hi,
I'm just learning to use OpenCV and am having a problem with using DFT. I've done a signal processing class which used MatLab, so I'm trying to go through some of the exercises we did in that class. I'm trying to get and display the FT of an image, so I can mask some of the frequencies. I'd like to be able to see the FT, so I know how big to make the mask, but when I tried, I got an image like this:
alt text
rather than like one of these
alt text
Am I forgetting a step somewhere? I'm loading the image, converting its type to CV_32FC1, getting the matrix of it, getting the DFT, and then getting turning the resulting matrix back into an image. I'll post the code I'm using if it will be of any help?
Or if someone has a link to an example of displaying the FT? I could only find ones which used it for the convolution.

EDIT: Did I get the Phase of the image?

+1  A: 

RTFM is appropriate I suppose, there's an example of using the DFT included with OpenCV which shows exactly how to use it...

Simonw