?? costfuncmad.m
字號:
% Computes the Mean Absolute Difference (MAD) for the given two blocks% Input% currentBlk : The block for which we are finding the MAD% refBlk : the block w.r.t. which the MAD is being computed% n : the side of the two square blocks%% Output% cost : The MAD for the two blocks%% Written by Aroh Barjatyafunction cost = costFuncMAD(currentBlk,refBlk, n)%currentBlk=double(currentBlk);%refBlk=double(refBlk);err = 0;for i = 1:n for j = 1:n err = err + abs((currentBlk(i,j) - refBlk(i,j))); endendcost = err / (n*n);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -