Code covered by the BSD License  

Highlights from
first order correlation

from first order correlation by BABY VIJILIN
first order correlation of an image can be find out, which is useful in image analysis

[s1]=firstordercorr()
%%%FIRST ORDER CORRELATION OF AN IMAGE%%%
 function [s1]=firstordercorr()
file=uigetfile({'*.tif';'*.png';'*.jpg';'*.gif';'*.*'},'Select the image','s');
X=imread(file);
[m,n]=size(X);
X=double(X);
A=m.*n;
s1=0.0;
s1=double(s1);
for i=1:m
    for j=1:n
     s1=s1+X(i,j);
    end
end
s1=s1./A;
disp('first order correlation value is');

Contact us at files@mathworks.com