I tried to compile the file "compile_mex_codes.m" but it it doesn't work correctly. It can not compile "zy_binary_boundary_detection.c". The following error appears:
??? Error using ==> mex at 208
Unable to complete successfully.
Error in ==> compile_mex_codes at 4
mex zy_binary_boundary_detection.c
The file ''movepixels.m'' does not exist in the zipped folder that I downloaded. So, I searched it in the net but the version that I found does not fit to the existing 3D image registration :(
Can you please tell me where I can find the 3D version of the file ''movepixels.m''.
Thanks.
The code is bug-prone because it has lots of unnecessary duplicated portions. I'd recommend instead <http://www.mathworks.com/matlabcentral/fileexchange/24504-fft-based-convolution>.
This is a simple code for 2-d convolution, based on the built-in matlab routine for 2-d fft. You can write it easily yourself, but this code is pretty clean and straightforward.
For large matrices, filter2 or conv2 are v. slow in matlab for large matrices. This code leads to a considerable speedup, by a factor of 5-10 on my machine, when I convolve a 500^2 matrix with a 100^2 one.
Comparison of calculation times
Signal length 1 second, impulse length 1 second, fs=44100, vectors (one-dimension).
conv 103.8 s
filter 79.4 s
fftfilt 0.38 s
convfft 0.92 s
Signal length 10 seconds, impulse length 1 second
fftfilt 1.28 s
convfft 14.61 s
Matlab 6.5.1
AMD Athlon XP 2000+ (1.67 GHz), 512 MB RAM
Comment only