Problem in using IDWT2

4 ビュー (過去 30 日間)
Jagadeesh p
Jagadeesh p 2012 年 2 月 29 日
x=imread('lena.jpg');
sX=size(x);
[LL,LH,HL,HH]=dwt2(x,'haar');
y=idwt2(LL,LH,HL,HH,'haar',sX);
figure(1),imshow(x);
figure(2),imshow(y);
My Code is unable to retrieve original COLOR image after performing idwt2. It shows a white image with 2-5 spots on it.
PLS help.

採用された回答

UJJWAL
UJJWAL 2012 年 2 月 29 日
The input image is of the type Unsigned Integer of 8 bits (uint8). The output image y is of the type double. So due to the difference in the data type you are not able to visualize them in the same way on the screen. Prefix the following code before imahow(y).
y = uint8(y);
The image will now be displayed perfectly
  1 件のコメント
Jagadeesh p
Jagadeesh p 2012 年 2 月 29 日
Thank u so much, Since i am new to MATLAB I was unable to find out error

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by