My DCT image is showing a zero matrix. Why is it so?

1 回表示 (過去 30 日間)
Chandvi Arora
Chandvi Arora 2017 年 7 月 18 日
コメント済み: Walter Roberson 2017 年 7 月 18 日
I converted YUV image to gray and then found its DCT and IDCT. The resulting image(IDCT one) is showing a zero matrix when I view it through imread command. I can't understand the reason behind it. And secondly, how to reduce the no. of elements of a matrix? For example say, I want to reduce my matrix form 10*10 to 8*8 one?

採用された回答

Walter Roberson
Walter Roberson 2017 年 7 月 18 日
You forgot to uint8() the result of the idct before using imwrite()
  2 件のコメント
Chandvi Arora
Chandvi Arora 2017 年 7 月 18 日
Can you please provide a demo code to explain this further?
Walter Roberson
Walter Roberson 2017 年 7 月 18 日
Suppose that you have named the result of the idct to be Result. Then between the idct and the imwrite add
Result = uint8( Result) ;
After that proceed to imwrite

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by