from Blur and Affine Invariants by Asad Ali
Combined Blur and Affine Moment Invariants by Suk and Flusser.

CentralMoments(x,y,p,q,pixelValues)
% Calculate Central Moments
function [cenMoment] = CentralMoments(x,y,p,q,pixelValues)
    cenMoment = sum(x.^p .* y.^q .* pixelValues);
    

Contact us at files@mathworks.com