Making normxcorr2 function efficient
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello the problem I'm facing is that for calculations with large matrix, the normxcorr2 takes much time.So is there be any way of doing the function for a limited range.Pls see the code that I have attached.I want the function normxcorr2 to return only the highlighted part in the image(which is time efficient).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/167640/image.png)
tmp1=magic(5)
tmp2=magic(6)
cnorm=normxcorr2(tmp1,tmp2)
MinLagR = -2; MaxLagR =1;
MinLagC = -2; MaxLagC =2;
zerolagr=size(cnorm,1)-size(tmp2,1)+1;
zerolagc=size(cnorm,2)-size(tmp2,2)+1;
c=cnorm(zerolagr,zerolagc)
cx=cnorm(zerolagr+MinLagR:zerolagr+MaxLagR,zerolagc+MinLagC:zerolagc+MaxLagC )
0 Commenti
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!