Patent ID: 7729550

Claim:
A method for image compression coding, for coding a pixel of K-bit gray-level resolution into an L-bit codeword, wherein K is an integer greater than 0, L is an integer and 0<L<K, the coding method comprising: creating 2^K codebooks; providing a trellis coding diagram, the trellis coding diagram comprising a plurality of stages, each stage comprising N states respectively denoted as S 0 ˜S N−1 , wherein N is an integer greater than 0; respectively starting off from all states of a (r−1) th stage to locate a plurality of specific branch paths connected to S i of a r th stage, wherein S i is a i th state, r is an integer greater than 0, i is an integer and 0≦i≦N−1; determining a quantization value of quantized subsets of the specific branch paths by using an r th pixel; determining a quantization value of S i of the r th stage and a survival path connected to S i by using the r th pixel and the quantization value of the quantized subsets of the specific branch paths; locating a minimum error path in the trellis coding diagram; and determining a codeword corresponding to each pixel according to the minimum error path.