function [ RR,DH,DV,DO ] = HaarTest( ipt )
[m,n]=size(ipt);

AUX1=ipt(1:2:m,1:2:n);
AUX2=ipt(1:2:m,2:2:n);
AUX3=ipt(2:2:m,1:2:n);
AUX4=ipt(2:2:m,2:2:n);

RR=(AUX1+AUX2+AUX3+AUX4)/2;
DH=(AUX1+AUX2-AUX3-AUX4)/2;
DV=(AUX1-AUX2+AUX3-AUX4)/2;
DO=(AUX1-AUX2-AUX3+AUX4)/2;

end 


