How do I compute RMSE for Color Image ??

4 visualizaciones (últimos 30 días)
Chidiebere Ike
Chidiebere Ike el 16 de Nov. de 2018
Comentada: Rik el 19 de Nov. de 2018
I wish to compute RMSE for color images and I applied the code below was to compute RMSE for grayscale image.
Please will this same code be applicable to (RGB) color image ??
% RMSE for Grayscale Images
data = imread('woman_GT[1-Original].bmp'); % Read real data
estimate = imread('woman_GT[8-Our Method].bmp'); % Read predicted data
rmseResults=RMSE(data,estimate); % Compute RMSE
% Alert user of the answer.
message = sprintf('The Root mean square error is %.3f.', rmseResults);

Respuesta aceptada

Rik el 17 de Nov. de 2018
If the function you are using is from this FEX submission, then yes, it will work. The interpretation of the RMSE might be more difficult, or it might not even make sense.
The root mean square error is just that: sqrt(mean(err^2)), so as long as you modify that to support vectors or matrices, it should work.
  3 comentarios
Rik el 19 de Nov. de 2018
I agree with the use of built-in functions whenever you have access to them, you never know where Mathworks engineers were able to put some tricks to increase performance (now or in a future release).
However, the code here will only yield the expected result for vector input, because mean will return an array with one dimension less than the input, so a 2D input will become a vector. (of course for a scalar input, the output will not be 0 dimensions)

Iniciar sesión para comentar.

Más respuestas (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by