[SciPy-User] ndimage.sobel multiple passes?

Oleksandr Huziy guziy.sasha@gmail....
Sun Feb 26 09:41:50 CST 2012


Rughly I would do the following

def worker(arg):
   index, data = arg
   return sobel(vdata, index)

p = Pool()
data_list = 3 * [data]
result = p.map(worker, zip(xrange(3), data_list))

Cheers

--
Oleksandr Huziy



2012/2/26 Oleksandr Huziy <guziy.sasha@gmail.com>:
> Hi,
>
> you could try multiprocessing, if you have more than one core
>
> You could speed it up 3 times at least.
> --
> Oleksandr Huziy
>
> 2012/2/25 Me Myself <mobilebackup77@gmail.com>:
>>
>> In my code base, currently I need to compute sobel on a 3d dataset. I do
>> this using:
>>
>> # ndimage.sobel
>>     dx = sobel(vdata, 0)
>>     dy = sobel(vdata, 1)
>>     dz = sobel(vdata, 2)
>>
>> any ideas how this can be done using one pass instead of doing this in 3
>> passes. My dataset is large and it would be nice to speed this up.
>>
>> Thanks,
>> --R
>>
>>
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>


More information about the SciPy-User mailing list