0
$\begingroup$

I have created a frequency domain image filter and would like to test it against some images where it is known that the frequencies only occur within a given band. Trouble is, I don't know how to go about creating such images.

I have though about making an image that consists of intensities varying about the x and y axes as a function of sine waves of frequencies within the band. I don't know if this would be good enough though. Another method (don't know about the practicality of this) might be to define a matrix in the Fourier domain and then do an iDFT. Does anyone have any thoughts on the best way to proceed?

$\endgroup$
  • 1
    $\begingroup$ What exactly do you want to test? If you want a random image with certain frequencies you could start with white noise (basically containing all frequencies) and then filter out unwanted ones. But in your case this seems kind of circular. $\endgroup$ – jan Jul 23 '13 at 15:03
  • $\begingroup$ So I'm testing the frequency band which determines best how I am able to classify between two images. For this I would like to know the ground truth. Filtering with the filter I'm testing would obviously not be so good for this, so I need another way to create images that contain information only within a certain band. $\endgroup$ – user1531177 Jul 23 '13 at 17:44
  • $\begingroup$ So you are actually looking to design a filter that extracts the frequency band containing the information that your classifier needs? Did I understand that correctly? Is that frequency band already known and you are trying to design a filter for this band? Or are you still looking for the frequency band that works optimally for classification? $\endgroup$ – jan Jul 24 '13 at 12:05
  • $\begingroup$ So the idea is that I can create a set of images with frequencies with a specified range. I can then demonstrate the ability of my filter to select out the specified components in noisy versions of the image. $\endgroup$ – user1531177 Jul 24 '13 at 16:27
  • $\begingroup$ So, why not start with a white noise image and show that after your filter is applied, only the desired frequencies remain? $\endgroup$ – jan Jul 25 '13 at 8:10
0
$\begingroup$

Your second option is the most common: choose a frequency of interest, set the corresponding coefficient in the Fourier domain then take the inverse transform. You have to pay attention to the correct scaling of the non-zero coefficient and to the particular FFT coefficient arrangement (continuous frequency in the middle or in one corner of the Fourier matrix).

$\endgroup$
  • $\begingroup$ This sounds quite difficult, I don't suppose you have any links to similar projects? $\endgroup$ – user1531177 Jul 24 '13 at 16:28
  • $\begingroup$ This is not difficult at all: say you want to test against a horizontal line. Put 1 in any coefficient of this line, invert the transform, and rescale the image between 0 and 1. This way you do not even have to take care of the correct coefficient scaling. $\endgroup$ – sansuiso Jul 25 '13 at 6:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.