Hi 2 all,
I have one formula for finding moments But i could not know how to proceed further i.e) how to write matlab code for this.Anyone can clarify this? Please send ur suggestion….
imagemoment=summation(imagepixel(i,j)*(x-x')2) / summation(imagepixel(i,j))
summation will be perfformed from 1 to 8
My code:
im=imread('image.jpg'); %binary image of 256x256
u1=xcos(0)+ysin(0);for i=1:256for j=1:256 for k=1:8 for l=1:8 sigma(k,l)=im(k,l)*u1; %doubtful statement
endendendend
%here sigma value must be the summation of 64 values that means in x axis 8 values and y axis 8 values(8×8 block) How to perform this cumulative addition Please post how to perform basic summation Thx in advance……..
im1=x=1 to 8x'=summation(imagepixel*x) / summation(image pixel)i,j varies from 1 to 8
Best Answer