Displaying Fourier transforms in OpenCV

Posted by Simonw on Stack Overflow See other posts from Stack Overflow or by Simonw
Published on 2010-06-05T10:14:13Z Indexed on 2010/06/05 10:22 UTC
Read the original article Hit count: 627

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?

© Stack Overflow or respective owner

Related posts about matlab

Related posts about image-processing