[Numpy-discussion] nd_image.affine_transform edge effects

James Turner jturner@gemini....
Sat Mar 24 20:16:38 CDT 2007

Hi Stéfan,

 > Agreed, but the aliasing effects isn't not the problem here, as it
 > should be visible in the input image as well.

It's a bit academic now that Zach seems to have found the answer, but
I don't think this is true. Aliasing is *present* in the input image,
but is simply manifested as blockiness (due to the larger pixel size
relative to the scene). It is only once you interpolate the data in a
more general way that the aliasing turns into other artefacts. The
reduced image contains too few sample points to determine the
frequency content of the underlying scene uniquely for interpolating,
but the values still *have* to be meaningful until you resample in
some other way, because all you did was average over contiguous areas.

 > The image definately is a scaled down version of the original Lena
 > -- very interesting, btw, see

Cool. I wondered where the picture came from (I suppose I could have
looked that up in wikipedia too). The full frame is also nice :-).

 > A rotation should take place without significant shifts in colour.
 > This almost looks like a value overflow problem.

Sounds like this idea was correct. I was also just starting to form
some suspicion about the integers getting maxed out...

 > Could you apply the PyRAF rotation on the Lena given above and post
 > the result?

I'd be happy to, but is the problem solved now? I can't handle colour
images directly in IRAF/PyRAF, but I could split the 3 channels into
separate images, rotate each of them and put them back together. Do I
need to use something like PIL to read your PNG into numarray? I
usually use FITS files... Let me know if you still want to try this.

 > I always thought we could simply revert to using bilinear and
 > bicubic polygon interpolation (instead of spline interpolation)

Interesting. In my brief look at your paper and Web page (so far), I
had missed that your polygon interpolation can be bicubic, rather
than just linear like Drizzle. I'll have to figure out what this
means and whether it might be useful for what I'm doing.



More information about the Numpy-discussion mailing list