Re: Gibbs phenomenon
- From: "Fred Marshall" <fmarshallx@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 10 May 2007 07:48:51 -0700
"SEngel" <khrden@xxxxxxxxx> wrote in message
news:frKdneXY8dD-lN7bnZ2dnUVZWhednZ2d@xxxxxxxxxxxxxxx
Hi!
I am working over high quality image processing algorithms (image shifts,
image rotation, etc). I am trying to use 1D sinc interpolation, but it
produces Gibbs artifacts. Is it possible to modify sinc interpolation in
some way in order to reduce these artidacts? Perhaps, it is better to use
some other interpolations for the case of sharp edges?
I have tried to apply some windows (Hann, Lanczos) - but they have not
satisfied me - the sharpness of edges is being lost due to them.
Well, you haven't told us how they are dissatisfying so it's hard to know
how to help. You also didn't say whether the interpolation was in space or
spatial frequency - which might be nice to know. I suppose it's in space
though...
The Gibbs phenonmenon is a direct result of using a sinc. It's simply the
integral of a sinc that you see when convolving over a step / edge.
Convolution with a sinc will always do this perforce.
As you've apparently tried, the way around this is to use a different kernel
for interpolation. A fact of life is that as the Gibbs phenomenon is
reduced, the width of the central peak of the kernel function increases -
and this makes edges less sharp. In real life the increase isn't all that
much though. You should be able to reduce the Gibbs phenomenon effects
quite a bit with only a small reduction in edge resolution.
Studies have been done to find the best / narrowest kernels with the
narrowest *and* monotonic step response. From a December 2003 post on
comp.dsp:
"Take a look at page 199 of Temes, Barcilon and Marshall "The Optimization
of
Bandlimited Sytems" Proc IEEE Vol 61 No. 2 Feb 1973 pp 196-234. Here,
Victor Barcilon discusses time spread and frequency spread, deltaT and
deltaOmega respectively, and shows that the Gaussian is optimum, that
deltaT*deltaOmega>=1/2, etc...... These are optimum functions and not
system functions."
So, you might try using something that approximates a Guassian function.
Or, you might use something that's a bit narrower but with just a bit of
ringing. Again, the width differences tend to be small when going from one
"good" window or kernel to another of the same general type.
Bhaskar says in another post: "A kaiser window is a good approximation in
the discrete domain for a Gaussian filter in the contn domain (although they
each have different
equations). I don't have a proof for this but this is what my intuition
tells me."
So, maybe try a Kaiser window function here.
Understand that we are talking about a narrow kernel in whichever space
you're in. It's transformed counterpart is a very wide function and
Guassian corresponds to Gaussian I believe you will find. So, the
interpolation in space with a narrow kernel will have the effect of cutting
the high frequencies. With no ringing (Gibbs) the frequency domain function
will be zero at the ends and at least the first derivative will also be zero
at the ends. There's a relationship between ringing and the derivatives at
the ends.
A gate in frequency corresponds to a sinc and decays as 1/x
A triangle in frequency corresponds to a sinc^2 and decays as 1/x^2
A raised cosine in frequency corresponds to [1/4 1/2 1/4] in space I do
believe and is often used for image/video interpolation because it's OK in
performance and easy to implement. Generally you don't want an interpolator
for images that is very long at all.
One might try an experiment like this:
Start with the sinc as you've done.
Gradually build functions that will eventually become a full-fledged raised
cosine by adding ever-growing cosine to the gate corresponding to the sinc.
At each stage, look at the result until you see something that looks
relatively satisfying. I think this means using kernels that look like
this:
[ 0 1 0] corresponding to a sinc .. it's the "do nothing" case.
[ .05 .9 .05]
[.1 .8 .1]
[.15 .7 .15]
[.2 .6 .2]
[.25 .5 .25]
Well, these steps aren't very gradual but you should get the idea. Then you
might experiment with wider kernels but I'm not so sure that's what you
want. What is the interpolation factor anyway?
Fred
.
- Follow-Ups:
- Re: Gibbs phenomenon
- From: SEngel
- An observation re Gibbs phenomenon
- From: Jerry Avins
- Re: Gibbs phenomenon
- References:
- Gibbs phenomenon
- From: SEngel
- Gibbs phenomenon
- Prev by Date: Re: Gibbs phenomenon
- Next by Date: An observation re Gibbs phenomenon
- Previous by thread: Re: Gibbs phenomenon
- Next by thread: An observation re Gibbs phenomenon
- Index(es):
Relevant Pages
|
Loading