I stumbled on this paper about compressing images using a kind of odd, but interesting idea. It seems pretty easy to implement and I was wondering if there is something wrong with it that I haven't picked up.
The main idea is that every possible number combination can be represented by an index in an imaginary list of all possible combinations.
So if we have 4 numbers that range from 0 to 255 e.g. [45, 129, 12, 32], we can pretend that it is a base 256 number, in the same way that [0, 1, 0, 1] is the base 2 number with index 5 (decimal value 5). So if we find the index of our original value then we could use that to represent it and thus achieve compression.
An example is provided where we have four pixels each one able to hold one of 3 possible color values:
So we end up representing 4 integers with just 1 (their index in all possible combinations)
This is an old paper though with no citations that I could find, but the idea seems appealing enough that I would like to test it. Is there anything wrong with the idea in general though? Anything I missed that makes it not actually implementable as a real compression algorithm.
Note: One would obviously have to split the image into windows and work on those segments individually using variable precision arithmetic since the index for a combination of values to low on the table would be huge.
we end up representing 4 integers with just 1
They stay at needing to identify 1 combination out of 81. Claims in the paper linked like […we need 3] bits to represent [index 5] instead of 8…, This leads to a compression ratio of 8/5 or 1,6 : 1 and We need 7 bits to represent [80] shed a light on the quality of the article and, to an extent, of the publication. Finding anoriginal value
in some table as a basis for data compression has been called dictionary compression. $\endgroup$