summaryrefslogtreecommitdiffstats
path: root/fix_taskset_names.sh
diff options
context:
space:
mode:
Diffstat (limited to 'fix_taskset_names.sh')
0 files changed, 0 insertions, 0 deletions
id='n14' href='#n14'>14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
function [diffI,corr,mag,theta] = get_diff2(I,J,w)
% car: I
% background: J

% half window size
if (nargin == 2)
 w = 1;
end

[gIx,gIy] = grad2(I,w);
[gJx,gJy] = grad2(J,w);
gx = gIx;
gy = gIy;

% normalize
sI= sqrt(gIx.*gIx+gIy.*gIy);
sJ= sqrt(gJx.*gJx+gJy.*gJy);
gIx = gIx./sI;
gIy = gIy./sI;
gJx = gJx./sJ;
gJy = gJy./sJ;

theta = cart2pol(gIy,gIx);
corr = gIx.*gJx + gIy.*gJy;

%[gx,gy]= grad((I-J),w);mag = sqrt(gx.*gx+gy.*gy);
%mag = sI;