There is a good function that I need, which is implemented in Java program: ImageJ I need to understand the algorithm used there. The function has several parameters: link text
And before using FFT it converts image to a special one: The Bandpass Filter uses a special algorithm to reduce edge artifacts (before the Fourier transform, the image is extended in size by attaching mirrored copies of image parts outside the original image, thus no jumps occur at the edges)
Can you tell me more about this special transform? Actually tiling mirrored image.
I am writing on C++ and wish to rewrite that part of the program on C++.
EDIT1: I need to understand how it does that tiling mirrored image operation, may be it is special one. Actually at first it converts image to a new sized image, so for my images it will be: convertion from 600X480 to 1024X1024 sized image. How the tiling is used here?
EDIT2: Also it is hard to understand this description of tileMirrored function:
Puts ImageProcessor (ROI) into a new ImageProcessor of size width x height y at position (x,y). The image is mirrored around its edges to avoid wrap around effects of the FFT. What is meant by "...of size width x height y at position (x,y). "?
EDIT3: I implemented that bandpass filter, and it gives the same results as the original program. But, the algorithm itself in original program (also in my program) is very slow I want to use that filter not once in my program, but it calculates approximately 0.5 to 2 seconds each call (depending on parameter value). There is used an FHT transform (not FFT), is it more quicly than FFT? I think the filter itself is not optimized, please see filterLargeSmall function implementation: source code