How to know what pixels where compressed and not compressed in a image?

2 次查看(过去 30 天)
Havin a image (jpg or png - I can have lots of extensions) it's possible to know what them was compressed?
For exemple, let's say that I have a 1280 x 720 image. Than in a uncompressed image I will have a 1280 x 720 matrix of int values representing the image.
But if the same image is compressed (if possible), will be less then that.
My goal: I need to process a image (compressed) and have a vector of ones and zeros representing their pixels. The ones means that the pixel in that position it's important and wasn't compressed. Otherwise, zeros means that this particular pixel is not important and was compressed.

采纳的回答

William Rose
William Rose 2022-11-28
It is not true that specific pixels are compressed or not compressed whn an image is compressed. The JPEG algorithm does a color transofrm on the entire eimage, then the chrominance component of color (at every pixel) is downlsized. This means that the color information at each pixel is now more coarse than originally. Then the image is divided into 8x8 pixlel cheunks, and each chuink is processed with a dicrete cosine transoform, and discarding the higher frequencies from each 8x8 black. Therefore this comptession step also does not keep or reject specific pixels. The last compression step, Huffman coding, also compresses in a way that is not pixel-specific.
PNG and other compression algorithms are also complex, like JPEG, and do not correspond to keeping or rejecting specific pixels.
  6 个评论
William Rose
William Rose 2022-11-30
Please email me to continue our discussion. Click on the WR circle next to my name. A window will appear, with an envelope icon in the top right corner. Click on the envelope to send me your email address, and I will reply.

请先登录,再进行评论。

更多回答(0 个)

类别

Find more on Denoising and Compression in Help Center and File Exchange

标签

Community Treasure Hunt

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

Start Hunting!

Translated by