I have an image that I'd like to convolve with a filter bank of 38 filters. However, for every pixel I must apply the filters to a patch surrouding said pixel, I can't apply the filters to the whole image at once. This is because I need to normalize (zero mean and unit standard deviation) each patch before applying the filter bank.
This means that, for a 512x512 image, I'd have 512*512*38 convolutions - that's almost 10^7. Each pixel is taking 200ms to process, so we're looking at over 14 hours for a single image! What can I do better?
I'm currently generating the patches manually (no blockproc) and applying the filters using imfilter. The filters are 31x31 pixels and the patches are 71x71 (plus padding to get correct filter responses at the edges).