localcontrast
イメージのエッジ保存型の局所的コントラスト操作
説明
例
局所的なコントラストの増減
RGB イメージをインポートします。
A = imread('peppers.png');
入力イメージの局所的なコントラストを増大させます。
edgeThreshold = 0.4; amount = 0.5; B = localcontrast(A, edgeThreshold, amount);
結果を表示して元のイメージと比較します。
imshowpair(A, B, 'montage')
入力イメージの局所的なコントラストを低下させます。
amount = -0.5; B2 = localcontrast(A, edgeThreshold, amount);
この場合も新しい結果を表示して元のイメージと比較します。
imshowpair(A, B2, 'montage')
入力引数
A
— フィルター処理するグレースケール イメージまたは RGB イメージ
m 行 n 列または m x n x 3 の実数非スパース行列
フィルター処理するグレースケール イメージまたは RGB イメージ。m 行 n 列または m x n x 3 の実数非スパース行列として指定します。
データ型: single
| int8
| int16
| uint8
| uint16
edgeThreshold
— そのまま保持する強いエッジの振幅
0.3
(既定値) | 範囲 [0,1]
の数値スカラー
そのまま保持する強いエッジの振幅。[0,1]
の範囲の数値スカラーとして指定します。
データ型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
amount
— 必要な強調または平滑化の量
0.25
(既定値) | 範囲 [-1,1]
の数値スカラー
必要な強調または平滑化の量。範囲 [-1,1]
の数値スカラーとして指定します。負の値はエッジ保存型平滑化を指定します。正の値はエッジ保存型強調を指定します。
値 | 説明 |
---|---|
0 | 入力イメージをそのまま保持します。 |
1 | 入力イメージの局所的なコントラストを特に強調します。 |
-1 | 入力イメージの細部を特に平滑化します。 |
データ型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
出力引数
B
— フィルター処理されたイメージ
数値配列
フィルター処理されたイメージ。サイズとクラスが入力イメージと同じ数値配列として返されます。
バージョン履歴
R2016b で導入
参考
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)