Use of wcodemat and wkeep ?

1 回表示 (過去 30 日間)
Pooja
Pooja 2013 年 8 月 8 日
sz=size(input image);
LL3 = wcodemat(a3,ncolors,'m',X); LL3 = wkeep(LL3, sz/8);
HL3 = wcodemat(h3,ncolors,'m',X); HL3 = wkeep(HL3, sz/8);
LH3 = wcodemat(v3,ncolors,'m',X); LH3 = wkeep(LH3, sz/8);
HH3 = wcodemat(d3,ncolors,'m',X); HH3 = wkeep(HH3, sz/8);
By using wkeep will my input image's information be lost?

採用された回答

Wayne King
Wayne King 2013 年 8 月 8 日
That isn't the use case for wcodemat(). wcodemat() is simply for scaling images for display purposes.
The 2D DWT is invertible. The only loss is numerical precision unless of course you modify the wavelet coefficients, which is often the purpose of doing the wavelet transform in the first place. If you don't modify the coefficients, then the transform is invertible (just the the DFT)
load nbarb1;
[C,S] = wavedec2(X,3,'db4');
Xrec = waverec2(C,S,'db4');
max(max(abs(X-Xrec)))
wkeep() and wkeep2() -- wkeep2 is for image data. It is a convenience function that is used internally in other functions of the Wavelet Toolbox to retain the appropriate output from convolutions. An example is the use of wkeep2() inside of iswt2.m

その他の回答 (1 件)

Wayne King
Wayne King 2013 年 8 月 8 日
編集済み: Wayne King 2013 年 8 月 8 日
Yes, in the sense that the inverse wavelet transform will no longer work. By using wkeep() you are removing elements of the detail images.
The same is true of using wcodemat() which is really just for display.
  1 件のコメント
Pooja
Pooja 2013 年 8 月 8 日
Generally for wavelet transform float form some information will be lost ,if we use wcodemat and multiply it with some subband weights it will become lossless right(integer wavelet transform)?What is the real application of wkeep?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeWavelet Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by