Does wavedec2 and waverec2 support complex valued array inputs?

2 ビュー (過去 30 日間)
Johnathan Le
Johnathan Le 2023 年 4 月 19 日
編集済み: Johnathan Le 2023 年 4 月 19 日
I'm trying to use the wavedec2 and waverec2 functions on a complex valued image and I'm finding that the reconstructed image is not match the input image. Using dwt2 and idwt2 seems to work with the same complex valued array however.
%% works
[cA,cH,cV,cD] = dwt2(Image,'haar');
test = idwt2(cA,cH,cV,cD,'haar');
norm(Image - test,2) %% returns 1.27e-12
%% does not work
[c,s] = wavedec2(Image,1,'haar');
test = waverec2(c,s,'haar');
norm(Image - test,2) %% returns 6.79e+03

回答 (1 件)

Walter Roberson
Walter Roberson 2023 年 4 月 19 日
The documentation for wavedec2() does not say that the input, X, must be real-valued.
However, the output vector is defined as being real-valued, and is defined as having a particular size, and those conditions together imply that you cannot reconstruct a complex matrix
  1 件のコメント
Johnathan Le
Johnathan Le 2023 年 4 月 19 日
編集済み: Johnathan Le 2023 年 4 月 19 日
Thank you for replying to the question. The documentation does say that the output vector is real-valued but I do get complex-valued wavelet coefficients when inputing a complex-valued matrix. Furthermore, it doesn't make sense to me why dwt2 and idwt2 work for complex-valued inputs while wavedec2 and waverec2 do not work when specifying wavedec2 and waverec2 to do a single level wavelet transform.

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

カテゴリ

Help Center および File ExchangeImage Analysis についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by