is compression used to reduce the file size?
Mostrar comentarios más antiguos
please can someone explain me what is compression... is it means reducing size of an image.... i got a code for image compression.... but my input image size is 256*256 and the compressed image size is also 256*256.... i'm totally confused... i read few topics related to compression.... but i'm not clear about that.... please can someone spare few time to explain me....
Respuesta aceptada
Más respuestas (2)
Walter Roberson
el 25 de Abr. de 2014
2 votos
Several students lately have been working with DCT or DWT, arriving at a matrix of coefficients that is the same size as the original, and then asking what the compression ratio is.
DCT and DWT themselves do not compress. What they do is find a way to describe images so that the last coefficients are describing finer and finer detail that a human would often overlook. If you keep only the beginning coefficients and discard the ending coefficients for a block, you have kept most of the information about how the block looks, and since you are not keeping all of the information you do not need as much space to store what you kept. Then when it is time to rebuild, the coefficients that were discarded are filled in with 0 and the block is rebuilt from that matrix, an action which produces an output block that differs only slightly from the original image block. The fewer coefficients you discarded, the more accurate the reconstruction but the lower the compression ratio. The more coefficients you discard, the less accurate the reconstruction but the higher the compression ratio.
1 comentario
Elysi Cochin
el 26 de Abr. de 2014
Image Analyst
el 25 de Abr. de 2014
1 voto
You need to look at how many bytes are used to store the 256*256 pixels on disk . When you read it back in , it will undo any compression what was applied and you will end up back with the same resolution that you started with , though perhaps with some intensity changes depending on how lossy the compression was.
Categorías
Más información sobre Denoising and Compression en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!