Re: [Numpy-discussion] Help speeding up element-wise operations for video processing

2008-09-17 Thread Brendan Simons
On 17-Sep-08, at 5:34 AM, Francesc Alted wrote: > A Wednesday 17 September 2008, Brendan Simons escrigué: > [clip] >> I would love a c-types code snippet. I'm not very handy in c. Since >> I gather numpy is row-major, I thought I up and down crops very >> quickly b

Re: [Numpy-discussion] Help speeding up element-wise operations for video processing

2008-09-16 Thread Brendan Simons
On 16-Sep-08, at 4:50 AM, Stéfan van der Walt wrote: > Hi Brendan > > 2008/9/16 brendan simons <[EMAIL PROTECTED]>: >> #interpolate the green pixels from the bayer filter image ain >> g = greenMask * ain >> gi = g[:-2, 1:-1].astype('uint16') >> g

Re: [Numpy-discussion] Help speeding up element-wise operations for video processing

2008-09-16 Thread Brendan Simons
ou do, please report your experience, I'd be very interested to hear about it. HTH, David On Tue, Sep 16, 2008 at 4:50 AM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: Hi Brendan 2008/9/16 brendan simons <[EMAIL PROTECTED]>: > #interpolate the green pixels from th

[Numpy-discussion] Help speeding up element-wise operations for video processing

2008-09-15 Thread brendan simons
Hi everyone I have a quick problem. I'm trying to write a routine to "demosaic" video data extremely quickly. I thought my algorithm would make good use of my processor's vector math units, but it isn't fast enough (it currently takes about 300ms for each 8 megapixel frame) Maybe you can hel