Maximum of normxcorr2

4 views (last 30 days)
emar
emar on 16 Jun 2017
Hello,
I need to calculate the maximum of normalized cross correlation of million of particles. The size of the two parameters of normxcorr2 is 56*56. I can't parallelize the calculations. Is there any way to speed up the code especially that I dont need all the results but only the maximum value of each cross correlation (to know the displacement)?
Example of the algorithm
%The choice of 170 particles is because in each time the code detects 170 particles, so over 10000 images it's 1 700 000 particles
particle_1=rand(56,56,170);
particle_2=rand(56,56,170);
for i=1:170
C=normxcorr2(particle_1(:,:,i),particle_2(:,:,i));
L(i)=max(C(:));
end
Thanks in advance

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!