Forums

Polyphase interpolation on an image with real value only

Started by ralph July 5, 2004
Hi all,  

I encounter some "problem" while using polyphase filter for
interpolation.  I have implemented a 8 zero crossing with upsampling
of L=32.

The image I used are a simulated image with 4 sinc impulse response
near the four corner.  All pixels values are positive.

While performing interpolation, such as for rotation operation, I
found that some of the values return is negative?  Is it suppose to be
so and if yes... what are the usual way to handle it?

Regards
[Please, if you can't do without a cross-post, at least select a
single followup-to.  Fixed.]

In comp.graphics.algorithms ralph <ralph@rome.com> wrote:

> While performing interpolation, such as for rotation operation, I > found that some of the values return is negative? Is it suppose to be > so and if yes... what are the usual way to handle it?
Sinc your filter has zero crossings, it'll have negative components. Yes, such a filter *can* yield negative results. There's nothing particularly mysterious about negative numbers, they're perfectly allowed answers as far as filtering theory is concerned. So, what to do about them if the output is restricted to be in a certain range, particularly a non-negative one? That depends on the application. Typically, you clamp, i.e. you return 0 if the actual result was negative, and the maximum allowed value if it was larger than that. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.

ralph wrote:
> > Hi all, > > I encounter some "problem" while using polyphase filter for > interpolation. I have implemented a 8 zero crossing with upsampling > of L=32. > > The image I used are a simulated image with 4 sinc impulse response > near the four corner. All pixels values are positive. > > While performing interpolation, such as for rotation operation, I > found that some of the values return is negative? Is it suppose to be > so and if yes... what are the usual way to handle it?
Yes this happens. And its possible to create images where the frequency content is such that it is very pronounced, but 'naturally' smooth images tend to not exhibit as much of this. The closer your interpolater is to ideal frequency response the worse the problem is. To avoid it completely your interpolaters impulse response must have no negative values, but that constraint will compromise it's ability to work as an anti-alias filter. Essentially what you want is to construct a filter where the gain is less than 1 for all frequencies. Assuming you don't want to change the filter or image - the way to handle it is either to clip to fit, or scale to fit the available range. Scaling would mean that the overall brightness of the image is reduced. -jim -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =-----