Re: Positive image interpolation
- From: davem@xxxxxxxxx (Dave Martindale)
- Date: Wed, 18 Oct 2006 06:46:24 +0000 (UTC)
dudesinmexico@xxxxxxxxx writes:
Can you explain *why* you need this particular set of constraints on the
method?
Positivity of course is from physics: sampled images are basically
energy
maps, so any interpolation methods returning negative values does not
properly model the image formation process.
Yes, but how was the image captured? If you start with a real-world
all-positive energy map, and properly low-pass filter it before sampling
so there is no aliasing during sampling, then when you resample this
image to some other size you will not get negative values during the
reconstruction (interpolation process), even if you use an interpolation
filter with negative lobes (e.g. anything that approximates a sinc
function).
So if you get negative pixel values during interpolation, it may be
telling you that the image was sampled incorrectly, not that there is
anything wrong with the choice of interpolation function. You do want
to avoid interpolation methods that boost high frequencies, since that
can generate overshoot, but there are a number of filter functions with
no high-frequency boost that still have negative lobes.
Picking an interpolation function that is all-positive guarantees a
positive output for all inputs, even random noise, but at the cost of
discarding plenty of high-frequency information. Do you need this, or
do you merely need something that gives positive results when the input
is a properly sampled real image?
Using a cubic B-spline with the original data points as control points
will give you a curve that is C2 continuous (if I remember correctly)
and no overshoots. But it does not go through the original data points,
so it's not very useful for interpolation in most cases. There is a
preprocessing technique that calculates new control points such that the
spline passes through (interpolates) the original data points - but now
it can produce negative output values.
I am not sure about what do you mean by B-spline with the original
data points as control points, however this paper shows how B-spline
interpolation of any order will always undershoot/overshoot:
http://bigwww.epfl.ch/publications/thevenaz0302.html
I mean using the standard B-spline as described in (for example) the
Bartels/Beatty/Barsky spline book. This produces a curve influenced by
a sequence of control points, but the curve does not usually pass
through those points (it does remain inside the convex hull defined by
the sequence of points). If you use it as an image interpolating
method, directly using the pixel codes as control points for the spline,
the interpolating function is all-positive. (It also substantially
blurs the image, which is why this is not normally used).
I think you'll find that the Thevenaz paper's "B-spline interpolation"
method involves a prefiltering step followed by spline interpolation.
The prefiltering step takes the original *pixel code* values and
calculates a corresponding set of *control point* values that cause
the spline to pass through the pixel code values. This combination
gives an interpolating method that interpolates the original points and
is C2 continuous (and looks good) but it can overshoot. Although the
interpolation function is all positive with respect to the control
points, it effectively has negative lobes with respect to the pixel
values because of the subtractions that happen in the prefiltering
step.
Offhand, I don't know of any solution that meets all of these. Do you
care if the output doesn't pass through the input data points?
That constraints could be relaxed.
Ok, then try a simple B-spline. But I'll bet you won't like the output
when viewed as an image.
Dave
.
- Follow-Ups:
- Re: Positive image interpolation
- From: Marco Al
- Re: Positive image interpolation
- From: dudesinmexico
- Re: Positive image interpolation
- References:
- Positive image interpolation
- From: dudesinmexico
- Re: Positive image interpolation
- From: Dave Martindale
- Re: Positive image interpolation
- From: dudesinmexico
- Positive image interpolation
- Prev by Date: Re: Hough transform
- Next by Date: Re: Hough transform
- Previous by thread: Re: Positive image interpolation
- Next by thread: Re: Positive image interpolation
- Index(es):
Relevant Pages
|