# Amount of information in scaled-down images

Does an image that is scaled down lose more Information when calculating averages of pixels rather than selecting single pixels?

One way to scale down an image is to replace 2x2 pixel blocks with the average of those four pixels, the other way is to just select the top-left pixel (or any other) instead.

Averaging is done by summation and integer division. We reduce the Problem to just scaling 2x2 images down to 1x1 images. For black and white images there are 16 possible images, 15 of those will be black and one will be white thus the entropy of the scaled down image is 0.337 bits. For grayscale images with 5bits per pixel results in 4.2524 bits, with 6bits per pixel we end up at 5.251 bits.

I'm aware that you lose some information due to rounding but my calculations don't seem to converge so rounding wouldn't explain everything.

Averaging-and-truncation certainly loses more information. It is not because you are not preserving any specific pixel: it is because you are taking an even probability distribution and giving it a strong bias in one direction.

If I have understood you correctly, you have taken the 16 possible 2x2 images and transformed one of them to white and 15 of them to black. This 15:1 split is about as bad as you can get! It destroys information, and it is the reason why your results are so bad compared to the "take top left corner".

The nearer you get to an "8:8" split, the less information you will lose. So try averaging and rounding: what I think you call "taking the median". This will split 11:5, which is less bad. It is still not very good, because the 6 cases of "2 black, 2 white pixels" all have to be translated either to black or to white - that is why you can only get 11:5 rather than the ideal 8:8 between black and white outcomes. [It would be interesting to try "use the majority value if there is a majority value; if not, use the top left"].

If you try $3\times 3$ blocks then either a clear majority of pixels will be white or a clear majority of pixels will be black: a straight 256:256 split. This is the best possible outcome, and if you simulate it then you should find it leads to the least information loss.

The averaged downscale gives you the mean of pixels (obviously), but in the most cases information is lost — you have not preserved any pixels from the original (and if you do it is unknown from only a downscaled picture). When you always take the same pixel from each kernel ($2x2$) then you have preserved these pixels perfectly.

Another possibility is to take the median, then you preserve one of the pixels, but lose the position (using a definition of median of even number of elements to take for example $\lfloor N / 2\rfloor$).

Using entropy here shows only how disordered the image is (or what is left after downsampling), so this is probably not the measure you want to use. Think about ideally random pixels, what changes after preserving $1/4$ and what after averaging them. Or what about the case when the pixels you select are ideally random and the discarded ones are not — this vastly changes the results, but in one case you still have 25% of the image preserved and in the second scheme you don't.

• downscaling looses information anyway, information that can't be reconstructed no matter what. If you have a perfectly random pictures, is it better to select the top-left pixel or do an average to preserve as much information as possible. I'd say too that "entropy" isn't the right tool here :(. Jun 9, 2016 at 16:04
• @mroman in one case you preserve something solid, in the second not, but it is true, downscaling loses pieces of information, otherwise it would be called lossless compression. Is there something more that you have expected in the answe?
– Evil
Jun 9, 2016 at 16:10