Patent ID: 7116832

Claim:
A method for compressing a digital image comprising a matrix of elements, each element comprising at least one digital component for representing a pixel, the method comprising: splitting the digital image into a plurality of blocks, and calculating for each block a group of discrete cosine transform (DCT) coefficients for the different types of components; quantizing the DCT coefficients for each group using a corresponding quantization table scaled by a gain factor for achieving a target compression factor; further quantizing the DCT coefficients for each group using the corresponding quantization table scaled by a pre-set factor; arranging the further quantized DCT coefficients in a vector; calculating a basic compression factor provided by the quantization table scaled by the pre-set factor as a first function of the vector, the calculating comprising determining a first number of bits required to encode the vector for each block; summing all the first numbers of bits associated with each block with a second number of bits required to encode control values, and dividing the sum by a number of elements of the digital image; 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.