the best results are obtained by forcing to unity the coefficients q 0 0 st q 0 1 q 1 0 q st q 1 1 st corresponding to the lowest dct frequencies when this is done one avoids the possibility of having lack of uniformity between the tonalities of adjacent sub blocks in the decoded and decompressed image blocking effect in order to avoid producing artifacts moreover the weights w i j may be applied only to those frequencies for which the measured statistical error lay below a certain threshold for example half the statistical error measured on the dc component alternatively the weights w i j may be applied only to those frequencies for which the measured statistical error lay above a certain threshold experiments bring out a significant increase of the compression ratio as compared with the performance obtained with standard matrices when the quality of the decoded decompressed image is kept constant the graphs reproduced in fig3 a and 3 b illustrate the performance increment in terms of bit rate in particular the graph of fig3 a illustrates the bit rates in abscissa obtained with optimized matrices curve 10 and standard matrices curve 11 in the case of 36 images subjected to jpeg standard compression encoding the percentage gain in terms of bit rate is illustrated by curve 12.