I wish to compute this formula in matlab
[m,n,d]=size(img1);
matrix1=sum(abs(img1-img2));
a= matrix1/ m*n ;
b=a*100;
where img1,img2 are two images of dimension 512*512*3
The objective is to obtain a single numeral value, but i am getting a matrix. The actaul formula in case of a matrix A,B with i rows and j columns is
= (summation [abs(A(i,j)- B(i,j))] / m*n ) * 100
to obtain a percentile
I know its very simple, but i think i am missing something !!!