From: Stephen Montgomery-Smith Subject: Re: Fourier analysis of Images Date: Mon, 15 Nov 1999 21:58:20 -0600 Newsgroups: sci.math Keywords: Gibb's phenomenon "David C. Ullrich" wrote: > > Huh? If you _modify_ the FT and then take the inverse transform of > course you're going to get a modified image back, which means precisely > that some pixels will be different colors from the original. > > Could be that you expected smaller changes than what you got. > Try using a _smoother_ mask. (Don't just nuke some frequencies and > leave the rest the same, instead multiply all the frequencies by a nice > continuous mask function that equals 0 for the frequencies you want > to lose and 1 for most of the frequencies you want to keep, but > which makes the transition from 1 to 0 in a smooth way instead of > just jumping from 1 to 0 suddenly.) > I think that David has a good point. You may be experiencing some kind of Gibb's phenomenon. Suppose one considers the Fourier series for the square wave. Graphing the partial sums - maybe something like sum_{n=-N}^N a_n exp(inx) where the a_n are whatever you calculate from the formula you will see that near the discontinuities that you get wild oscillations. Now translate that into your example. If you Fourier transform your image, then cut off the high frequencies, and then Fourier transform back again, then near discontinuities, for example, near boundaries between a region of one color and another, you are going to get wild oscillations in your function, that is, spots of very different colors. The standard way to lessen or remove Gibb's phenomena is instead of considering the partial sums, to consider something like sum_{n=-N}^N phi(n) a_n exp(inx) where phi(n) is a function so that phi(0)=1, and phi(n)=0 for |n|>N, but for 0<|n|