[Numpy-discussion] bilinear/sampled scaling
pete at visionart.com
Tue Nov 7 18:07:27 CST 2000
i have image data in a 2D array that i'd like to change the size
of. currently, i'm just doing a dirty sampled scaling that i came
up with. this works, but can only do a 2x resize.
dst[::2,::2] = src
dst[1::2,::2] = src
dst[:,1::2] = dst[:,::2]
this isn't too bad, but it's definitely one of my bottlenecks,
can the code to do this be sped through some ingenious use of
i'm also trying to figure out a clean, fast way to do
bilinear scaling on my data. it seems like there would be
something in numeric to do linear resampling, but i haven't
figured it out. i'd like to be able to resample stuff like
audio data as well as just image data.
thanks for any pointers into this.
More information about the Numpy-discussion