how can i calculate rmse ?

조회 수: 3 (최근 30일)
nadia
nadia 2016년 6월 19일
댓글: Muhammad Usman Saleem 2016년 6월 28일
Hi, I want to calculate rmse without using for loops between 2 images. this should produce a number not a matrix. can you help me?

채택된 답변

Image Analyst
Image Analyst 2016년 6월 26일
Use the immse() function in the Image Processing Toolbox.

추가 답변 (1개)

Muhammad Usman Saleem
Muhammad Usman Saleem 2016년 6월 19일
편집: Muhammad Usman Saleem 2016년 6월 19일
if you upload your images, batter for me to make a code then. Try this prototype
in order to calculate some RMS error for your images, you require two points
(1) YourOrginalimaege
(2) Extimatedimage
YourOrginalimage=imread('imageA.tif');
Extimatedimage=imread('imageB.tif');
Then you can calculate RMS error as
RMS=sqrt(sum(YourOrginalimage (:)-Extimatedimage (:))^2/N) % thanks to John
where N may be total no of samples in YourOrginalimage
Check it and tell me?
  댓글 수: 2
John D'Errico
John D'Errico 2016년 6월 19일
Um, NO!
You need to square those differences before the sum. In your formula, there is no square operation at all.
As importantly, if the image arrays are stored as uint8, the computation you propose will fail completely. Those image values must first be assured to be doubles before any such computation.
Muhammad Usman Saleem
Muhammad Usman Saleem 2016년 6월 28일
has corrected now

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by