Line | |
---|
1 | % mycorr2 modified version of the 2D correlation |
---|
2 | % for the use with im2col and col2im |
---|
3 | % see GETPOINT |
---|
4 | % |
---|
5 | % |
---|
6 | % $Id: mycorr2.m,v 2.0 2003/06/19 12:06:52 svoboda Exp $ |
---|
7 | |
---|
8 | % Note: It written in order to gain speed. The clarity of the code suffers accordingly |
---|
9 | |
---|
10 | function R = mycorr2(X,G,Gn,Gn2) |
---|
11 | |
---|
12 | % Gn = G-mean(G); |
---|
13 | % Gn2 = sqrt(sum(Gn.^2)); |
---|
14 | |
---|
15 | mX = repmat(mean(X),size(X,1),1); |
---|
16 | mXn = X - mX; |
---|
17 | smX = sum(mXn.^2); |
---|
18 | |
---|
19 | numerator = (mXn'*Gn)'; |
---|
20 | denominator = smX*Gn2; |
---|
21 | |
---|
22 | R = numerator./denominator; |
---|
23 | |
---|
24 | return |
---|
Note: See
TracBrowser
for help on using the repository browser.