MEAN SQUARED ERROR on sectional images

I am interested in computing the mean squared error (MSE) for a section of the image; however, I get an error. Can someone assist me with it?
>> MSE=reshape(mean(mean((double(M1(192:318,1:900)) - double(M2(192:318,1:900))).^2,2),1),[1,3]);
Error: To RESHAPE the number of elements must not change.

댓글 수: 1

Image Analyst
Image Analyst 2013년 3월 28일
편집: Image Analyst 2013년 3월 28일
mean mean is one number. You're trying to shape it into a 1 by 3 array. By the way, how about going back and accepting some answers to your prior questions?

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

답변 (1개)

Image Analyst
Image Analyst 2013년 3월 28일

1 개 추천

Why not just say
squaredDifference = (double(M1(192:318,1:900)) - double(M2(192:318,1:900))) .^ 2
MSE = mean2(squaredDifference);

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2013년 3월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by