Login  Register

Re: DHT parabolic mask "checkerboard" effect

Posted by James Ewing on Nov 13, 2012; 2:07pm
URL: http://imagej.273.s1.nabble.com/Changing-fonts-in-macros-for-the-Series-Labeler-tp5000755p5000789.html

Eric - examine the modulus of result of the first (forward) FFT.  You may have to take out some central points to get a reasonable dynamic range.  You should see a non-central 'spike,' possibly a leading-edge (or trailing-edge) spike, in the modulus of the forward FFT.  That's the glitch that is causing you trouble.  Identify the source of that spike and your checkerboarding will go away.
 - Jim

On Nov 13, 2012, at 6:33 AM, Eric Barnhill wrote:

> Hi all,
>
> I'm wondering if anyone can give me insight into an effect I am getting in attempting to implement an algorithm.
>
> The algorithm denotes a forward Laplacian operator as, dropping some constants,
>
> FFT^-1[(p^2+q^2)FFT(f(x,y))]
>
> and a corresponding inverse Laplacian operator as
>
> FFT^-1[FFT(f(x,y)) / (p^2 + q^2)]
>
> in short, forward and inverse Laplacians are obtained by multiplying and dividing the FFT by a parabolic mask.
>
> x and y are row and column coordinates, p and q are fourier space coordinates with origin in the middle of the image.
>
> I was quite interested in this algo because it's not too hard to get the Laplacian, but the inverse Laplacian? Hard.
>
> However, the inverse is not quite working for me. I get a "checkerboarding" effect where pixels alternate positive-negative. For example, -55 might be right next to +55. If I take the Math.(abs) of the inverse it looks like it might be about right, though if so the algorithm doesn't work so great -- too much high pass on the way in and too much low pass on the way back. I can attach an image if that helps clarify anything.
>
> I am wondering, is the checkerboarding a result of the nature of the DHT? Might I have more luck using some other kind of DFT, or a discrete cosine transform?
>
> Thanks for any insights,
> Eric
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html