function error = MSError(img, Nimg)

[height, width] = size(img);
a = (double(img) - double(Nimg)).^2;
error = sum(a(:))/(height*width);

