MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > imfilter speed 

I have a 3D volumetric image and wanted to clean it up a bit. It doesn't seem the image processing toolbox can do what I need (consider the points in neighboring slices as well as in the current slice), so I rolled my own averaging algorithm. The problem is its really slow  it takes almost 30 minutes to do even on our really fast 64bit machine. When using a similar imfilter averaging function on the same image though, it can be done in under a minute. Granted, for 2D filtering the matrix is only 2 dimensions but that doesn't seem like it should slow it downt that much as it still has to do all the slices. I was wondering how the image processing toolbox executes so quickly considering it has to do the same thing I'm doing  loop through every point in the image. Is there some quicker way to do it that I'm missing? Is there another way to do it besides a double for loop  
Patrick: 
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <ec392abe777a4e54bc1d66a333219047@k16g2000yqm.googlegroups.com>... 
Here is the code. 
Patrick: 
I'm not doing much inside that loop. I wrote a test script similiar to what I'm doing here and the killer appears to be: 
You're simply taking the mean? Well talk about your separable 
On Jun 8, 9:41 pm, "Patrick " <praph...@gmail.com> wrote: 
On 6/8/2011 3:41 PM, Patrick wrote: 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.