Patent ID: 7024044

Claim:
A method for compressing a digital image comprising a matrix of elements, each element comprising a plurality of digital components of different types for representing a pixel, the method comprising: determining at least one energy measure of the digital image; estimating a gain factor as a function of the at least one energy measure, the function being determined experimentally according to a target compression factor; splitting the digital image into a plurality of blocks, and calculating for each block a group of discrete cosine transform (DCT) coefficients for the digital components of different types, each group of DCT coefficients comprising at least one direct current (DC) coefficient and a plurality of alternating current (AC) coefficients; and quantizing the DCT coefficients for each block using a corresponding quantization table scaled by the gain factor for achieving the target compression factor; wherein determining the at least one energy measure comprising receiving the plurality of digital components, and calculating the at least one energy measure in a pixel domain using the plurality of digital components; wherein estimating the gain factor comprises estimating a first number of bits required to encode the AC coefficients of all the blocks using the quantization tables scaled by a pre-set factor as a first function of the at least one energy measure, the first function being determined experimentally according to the target compression factor, calculating a second number of bits required to encode the DC coefficients of all the blocks using the quantization tables scaled by the pre-set factor, estimating a basic compression factor provided by the quantization tables scaled by the pre-set factor according to the first number of bits and the second number of bits, and estimating the gain factor as a second function of the basic compression factor, the second function being determined experimentally according to the target compression factor.