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 CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by