appcoef2
2 次元 Approximation 係数
説明
例
イメージの Approximation 係数の再構成
この例では、イメージの多重レベル ウェーブレット分解から Approximation 係数を再構成する方法を示します。
DWT 拡張モードをゼロパディングに設定します。イメージを読み込んで表示します。
origmode = dwtmode('status','nodisplay'); dwtmode('zpd','nodisp') load woman image(X) colormap(map) title('Original')
size(X)
ans = 1×2
256 256
db1
ウェーブレットを使用して、イメージの 3 レベルのウェーブレット分解を実行します。係数配列 cfs
の要素数とブックキーピング行列 inds
の内容を表示します。cfs
には X
と同じ数の要素があることに注意してください。
wv = 'db1';
[cfs,inds] = wavedec2(X,3,wv);
numel(X)
ans = 65536
numel(cfs)
ans = 65536
inds
inds = 5×2
32 32
32 32
64 64
128 128
256 256
レベル 2 の Approximation 係数を抽出して表示します。
cfs2 = appcoef2(cfs,inds,wv,2); figure imagesc(cfs2) colormap('gray') title('Level 2 Approximation Coefficients')
size(cfs2)
ans = 1×2
64 64
レベル 3 の Approximation 係数を抽出して表示します。
cfs3 = appcoef2(cfs,inds,wv,3); figure imagesc(cfs3) colormap('gray') title('Level 3 Approximation Coefficients')
size(cfs3)
ans = 1×2
32 32
拡張モードを元に戻します。
dwtmode(origmode,'nodisplay')
入力引数
S
— ブックキーピング行列
正の整数の行列
2 次元信号のウェーブレット分解のブックキーピング行列。正の整数の行列として指定します。ブックキーピング行列は、ウェーブレット分解ベクトル C
の係数をレベルごとに解析するのに使用されます。
例: [C,S] = wavedec2(randn(256,256),4,'db4')
は、行列の 4 レベルのウェーブレット分解を返します。
データ型: double
wname
— ウェーブレット
文字ベクトル | string スカラー
2 次元信号のウェーブレット分解の生成に使用するウェーブレット。文字ベクトルまたは string スカラーとして指定します。ウェーブレットは、次のいずれかのウェーブレット ファミリから指定します。最適局在化 Daubechies、Beylkin、Coiflet、Daubechies、Fejér-Korovkin、Haar、Han 線形位相モーメント、Morris 最小帯域幅、Symlet、Vaidyanathan、Discrete Meyer、双直交、および逆双直交。各ファミリの利用可能なウェーブレットについては、wavemngr
を参照してください。
例: 'db4'
出力引数
アルゴリズム
入力ベクトル C
とブックキーピング行列 S
には、2 次元信号分解に関するすべての情報が含まれます。
NMAX = size(S,1)-2
とすると、C = [A(NMAX) H(NMAX) V(NMAX) D(NMAX) … H(1) V(1) D(1)]
となります。ここで、A
、H
、V
、および D
はベクトルです。N = NMAX
の場合、単純な抽出が行われます。それ以外の場合、appcoef2
は、逆ウェーブレット変換を使用して Approximation 係数を反復的に計算します。
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
使用上の注意および制限:
可変サイズのデータのサポートが有効になっていなければなりません。
入力
wname
は定数でなければなりません。
GPU 配列
Parallel Computing Toolbox™ を使用してグラフィックス処理装置 (GPU) 上で実行することにより、コードを高速化します。
使用上の注意および制限:
'sym'
および'per'
拡張モードのみサポートしています。dwtmode
を参照してください。
バージョン履歴
R2006a より前に導入
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)