# MATLAB: Root mean square error of two images

image processingroot mean square error

What is the function to calculate RSME of two images in matlab?
i use:
``I = imread('C:\Users\teymo\Desktop\New folder\CPU\rgray8.bmp');J = imread('C:\Users\teymo\Desktop\New folder\CPU\blur.bmp');pog = sqrt(mean((J(:)-I(:)).^2));%                 ^^^  ^^^ add thismessage = sprintf('The Root mean square error is %.3f.', pog);msgbox(message);``