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

1 visualización (últimos 30 días)
Chandvi Arora
Chandvi Arora el 18 de Jul. de 2017
Comentada: Walter Roberson el 18 de Jul. de 2017
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?

Respuesta aceptada

Walter Roberson
Walter Roberson el 18 de Jul. de 2017
You forgot to uint8() the result of the idct before using imwrite()
  2 comentarios
Chandvi Arora
Chandvi Arora el 18 de Jul. de 2017
Can you please provide a demo code to explain this further?
Walter Roberson
Walter Roberson el 18 de Jul. de 2017
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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by