このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
imdivide
あるイメージを別のイメージに除算、またはイメージを定数で除算
説明
例
2 つの uint8 配列の除算
この例では、2 つの uint8
配列を除算する方法を説明します。
X = uint8([ 255 0 75; 44 225 100]); Y = uint8([ 50 50 50; 50 50 50 ]);
X
の各要素を対応する Y
の要素で除算します。0.5 以上の小数値は、最も近い正の整数方向に丸められます。
Z = imdivide(X,Y)
Z = 2x3 uint8 matrix
5 0 2
1 5 2
Y
の各要素を対応する X
の要素で除算します。ゼロ除算の場合、出力は整数型の範囲に切り捨てられます。
W = imdivide(Y,X)
W = 2x3 uint8 matrix
0 255 1
1 0 1
イメージの背景の除算
グレースケール イメージをワークスペースに読み取ります。
I = imread('rice.png');
背景を推定します。
background = imopen(I,strel('disk',15));
イメージの背景を除算します。
J = imdivide(I,background);
元のイメージと処理後のイメージを表示します。
imshow(I)
figure imshow(J,[])
定数係数によるイメージの除算
イメージをワークスペースに読み取ります。
I = imread('rice.png');
イメージの各値を定数係数 2 で除算します。
J = imdivide(I,2);
元のイメージと処理後のイメージを表示します。
imshow(I)
figure imshow(J)
入力引数
出力引数
バージョン履歴
R2006a より前に導入
参考
imabsdiff
| imadd
| imcomplement
| 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)