function m = maxerror(im1,im2)
% Returns maximum pixel error
% m = maxerror(im1,im2)

  diff = abs(im1 - im2);

  m = max(max(diff));

  