このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
immse
平均二乗誤差
説明
例
ノイズを含むイメージの平均二乗誤差の計算
イメージを読み取り、それを表示します。
ref = imread('pout.tif');
imshow(ref)
参照イメージのコピーにノイズを追加して、別のイメージを作成します。
A = imnoise(ref,'salt & pepper', 0.02);
imshow(A)
2 つのイメージの間の平均二乗誤差を計算します。
err = immse(A, ref);
fprintf('\n The mean-squared error is %0.4f\n', err);
The mean-squared error is 353.7631
入力引数
出力引数
err
— 平均二乗誤差
正の数値
平均二乗誤差。正の数値として返されます。err
のデータ型は double
です。ただし、入力引数がデータ型 single
の場合、err
はデータ型 single
になります。
データ型: single
| double
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
immse
では C コードの生成がサポートされています (MATLAB® Coder™ が必要)。詳細については、イメージ処理のコード生成を参照してください。
GPU コード生成
GPU Coder™ を使用して NVIDIA® GPU のための CUDA® コードを生成します。
バージョン履歴
R2014b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)