Image with specific frequencies

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?

• 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.
– jan
Commented Jul 23, 2013 at 15:03
• 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. Commented Jul 23, 2013 at 17:44
• 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?
– jan
Commented Jul 24, 2013 at 12:05
• 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. Commented Jul 24, 2013 at 16:27
• So, why not start with a white noise image and show that after your filter is applied, only the desired frequencies remain?
– jan
Commented Jul 25, 2013 at 8:10

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).

• This sounds quite difficult, I don't suppose you have any links to similar projects? Commented Jul 24, 2013 at 16:28
• 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. Commented Jul 25, 2013 at 6:54