Re: 'Magic' kernel for image zoom resampling?
- From: "John Costella" <jpcostella@xxxxxxxxxxx>
- Date: 9 Jun 2006 04:20:20 -0700
Thanks all -- it is making much more sense to me now. I started off
with filters and sinc functions, didn't do a good job of it, and went
back to something simple, that worked better that I expected it to. The
explanation that it is a truncated sinc makes it make a helluva lot
more sense -- many thanks.
I've also followed up on the excellent suggestion to determine the
continuous version of the discrete case, to figure out what I'm
actually using. It's becoming a lot clearer now, although I'm still
trying to figure out the best way to express it mathematically.
The key seems to be that, in one dimension, for upsampling by a factor
of m = 2^k, each pixel of the original image contributes to three
pixels in the upsampled image, or in other words that the kernel, from
the upsampled image's point of view, is 3m pixels wide. The kernel is
made up of three parabolas, each of width m pixels, which smoothly join
together. The parabolas on either end reduce to zero at the extremes.
The curvature of the center parabola is twice the magnitude, and of
opposite sign, of the other two.
The key net effect of these qualities seems to be the property
k(x-m) + k(x) + k(x+m) = const.
for -m <= x <= m. This is what ensures that the convolution of each
pixel with the kernel "joins together" with all the other pixels, like
jigsaw pieces, without any systematic artifacts.
Put another way, if you place a copy of the kernel every m pixels
apart, and add them together, you get a constant function across all
pixels.
It is not clear to me whether it is possible to do this for an
arbitrary type of function. In fact, it's not even clear to me that it
is easy to do for functions of finite support. In any case, I believe
that this is why the kernel does such a good job of avoiding visually
obvious artifacts.
And, of course, the best thing about the kernel is that it is so
lightning fast to implement, not to mention positive definite. :)
John
.
- References:
- 'Magic' kernel for image zoom resampling?
- From: jpcostella
- Re: 'Magic' kernel for image zoom resampling?
- From: jim
- 'Magic' kernel for image zoom resampling?
- Prev by Date: Re: Separate two clouds of points
- Next by Date: Re: automatic number plate recognition
- Previous by thread: Re: 'Magic' kernel for image zoom resampling?
- Next by thread: Mosaicing along depth
- Index(es):
Relevant Pages
|