How to know what pixels where compressed and not compressed in a image?
3 ビュー (過去 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.
0 件のコメント
採用された回答
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
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 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!