Hi, That's the way to do it, but I'd directly save the result in the output array:
ret = np.empty_like(image) for i in range(depth): ret[:,:,i] = integral_image(image[:,:,i])
Johannes Schönberger Am 06.08.2013 um 11:36 schrieb masa <masahi129@gmail.com>:
Hi all,
I want to calculate integral images for each depth in a three dimensional array. My code is something like this:
ret = np.empty(height, width, depth) int_imgs = [integral_image(image[:,:,i]) for i in range(depth)] for i in range(depth): ret[:,:,i] = int_imgs[i]
Is there better way to do this?
Thanks, masa
-- You received this message because you are subscribed to the Google Groups "scikit-image" group. To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.