MEAN SQUARED ERROR on sectional images

1 回表示 (過去 30 日間)
Jerome
Jerome 2013 年 3 月 28 日
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 日
Why not just say
squaredDifference = (double(M1(192:318,1:900)) - double(M2(192:318,1:900))) .^ 2
MSE = mean2(squaredDifference);

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by