このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
imadd
2 つのイメージを追加または定数をイメージに追加
説明
例
2 つの uint8 配列の加算
この例では、2 つの uint8
配列を加算する (値が 255 を超える場合は切り捨て) 方法を説明します。
X = uint8([ 255 0 75; 44 225 100]); Y = uint8([ 50 50 50; 50 50 50 ]); Z = imadd(X,Y)
Z = 2x3 uint8 matrix
255 50 125
94 255 150
2 つのイメージの加算と出力クラスの指定
2 つの uint8
グレースケール イメージをワークスペースに読み取ります。
I = imread('rice.png'); J = imread('cameraman.tif');
イメージを加算します。結果の切り捨てが生じないように、出力を uint16
型で指定します。
K = imadd(I,J,'uint16');
結果を表示します。
imshow(K,[])
イメージへの定数の加算
イメージをワークスペースに読み取ります。
I = imread('rice.png');
イメージに定数を加算します。
J = imadd(I,50);
元のイメージと結果を表示します。
imshow(I)
figure imshow(J)
入力引数
出力引数
バージョン履歴
R2006a より前に導入
参考
imabsdiff
| imcomplement
| imdivide
| imlincomb
| immultiply
| imsubtract
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)