Method for image compression, where an acquired image is represented by a
two dimensional array of pixels. The array is divided into blocks of
identical rectangular areas. Data related to the division is stored and a
threshold of pixel attribute value is determined. The value of each block
is calculated, stored and compared to the value of its adjacent blocks.
Whenever the difference between two adjacent blocks exceeds the
threshold, adjacent compared blocks are divided into sub-blocks. Each
sub-blocks contain half the number of pixels and data related to that
division is stored. The value of each sub-block is calculated and
compared to the value of the adjacent sub-blocks. Whenever the difference
between two adjacent compared blocks is below the threshold, the blocks
are represented by representative pixels with identical attributes level
that equals the value of the pixels that correspond to the compared block
or sub-block.