System and method for lossless image compression having improved sequential determination of golomb parameter
First Claim
1. A method for compressing a digitized image composed of an array of pixels each having a value, the method including a method of determining a Golomb-power-of-two code, comprising:
- initializing an array of counters, N, each counter for counting the number of pixels in each of at least one context;
initializing an array of accumulators, A, each accumulator for accumulating a sum of magnitudes of prediction residuals encountered in each of at least one context;
for each pixel in the image;
determining in which context the pixel occurs;
incrementing the counter N for the context;
predicting the value of the pixel;
determining a prediction residual, ε
, for the pixel by subtracting the predicted value from the pixel value;
mapping the prediction residual ε
to a non-negative value M(ε
)determining a parameter k as a function of the values A and N;
adding the magnitude of the prediction residual to the accumulator A for the context;
encoding the mapped value M(ε
) in a first portion and in a second portion, the first portion being a binary representation of M(ε
) mod m and the second portion being a unary representation of .left brkt-bot.M(ε
)/m.right brkt-bot., where m=2k.
2 Assignments
0 Petitions
Accused Products
Abstract
A lossless image compression encoder/decoder system having a context determination circuit and a code generator. The image compressor uses the context of a pixel to be encoded to predict the value of the pixel and determines a prediction error and maps the prediction error to a mapped value having a distribution suitable for Golomb encoding. The image compressor contains a context quantizer that quantizes the context of pixels. The image compressor determines a Golomb parameter based on the context and historical information gathered during the coding of an image. To avoid systematic prediction biases in an image, the image compressor adjusts the distribution of prediction residuals to a distribution suitable for Golomb coding. As it encodes a particular pixel, the encoder uses the Golomb parameter to determine a Golomb code for the prediction error and encodes that value. To decompress an image, the decompressor determines and quantizes the context of each pixel being decoded. The decompressor uses the same pixels as the compressor to determine the context. The decompressor uses the context and historical information gathered during the decompression of the image to determine a Golomb parameter for the context in which the pixel occured. The decompressor retrieves from the compressed image the code for the pixel. Using the Golomb parameter and the retrieved code, the decompressor determines the mapped value of the code. The decompressor then uses the inverse mapping to determine the error value. The decompressor uses a predictor to predict the value of the pixel based on the context and adds the error value to determine the actual value of the pixel. In one embodiment the image compressor uses an alphabet extension, embedded in its context model, in specific low gradient contexts to reduce the redundancy of the encoding.
Other systems and methods are disclosed.
184 Citations
59 Claims
-
1. A method for compressing a digitized image composed of an array of pixels each having a value, the method including a method of determining a Golomb-power-of-two code, comprising:
-
initializing an array of counters, N, each counter for counting the number of pixels in each of at least one context; initializing an array of accumulators, A, each accumulator for accumulating a sum of magnitudes of prediction residuals encountered in each of at least one context; for each pixel in the image; determining in which context the pixel occurs; incrementing the counter N for the context; predicting the value of the pixel; determining a prediction residual, ε
, for the pixel by subtracting the predicted value from the pixel value;mapping the prediction residual ε
to a non-negative value M(ε
)determining a parameter k as a function of the values A and N; adding the magnitude of the prediction residual to the accumulator A for the context; encoding the mapped value M(ε
) in a first portion and in a second portion, the first portion being a binary representation of M(ε
) mod m and the second portion being a unary representation of .left brkt-bot.M(ε
)/m.right brkt-bot., where m=2k. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method for operating a computer to compress a digitized image composed of an array of pixels each having a value, the method including a method of determining a Golomb code, comprising:
-
initializing an array of counters, N, each counter for counting number of pixels in each of at least one context; initializing an array of accumulators, A, each accumulator for accumulating a sum of magnitudes of prediction residuals encountered in each of at least one context; for each pixel in the image; determining in which context the pixel occurs; incrementing the counter N for the context; predicting the value of the pixel; determining a prediction residual, ε
, for the pixel by subtracting the predicted value from the pixel value;mapping the prediction residual ε
to a non-negative value M(ε
);determining a parameter m as a function of values A'"'"' and N'"'"';
where A'"'"'=Aq and N'"'"'=Nq and wherein q is a positive integer;adding the magnitude of the prediction residual ε
to the accumulator A for the context;encoding the mapped prediction residual M(ε
) in a first portion and in a second portion, the first portion being a binary representation of M(ε
) mod m and the second portion being a unary representation of .left brkt-bot.M(ε
)/m.right brkt-bot.. - View Dependent Claims (9)
-
-
10. A method of operating a computer to losslessly compress digitized images comprising the steps of:
-
a. retrieving an image to compress from an input device; b. for each pixel in the image; i. directing the computer to determine a context for the pixel; ii. directing the computer to use the context of a pixel in the image to determine a predicted value for the pixel; iii. comparing the predicted value and the actual value, thereby producing a residual value ε
,iv. mapping the residual value ε
to a mapped value M(ε
);v. computing a Golomb corresponding to the residual from a context-specific value N and a context-specific value A, where N is a count of pixels encountered in the context, and A is an accumulation of magnitudes of prediction residuals for pixels in the context; and c. transmitting the code to a decoder. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33)
-
-
34. An image compression encoder system wherein for each pixel in an image there is a context based on the pixels that have been encoded prior to the each pixel, having an encoder comprising:
-
a. an image buffer containing a portion of at least one digitized image; b. a pixel generator connected to the image buffer and operable to determine the value of a pixel in the image buffer and the context of the pixel; c. a predictor for predicting the value of the pixel; d. a comparator connected to the pixel generator to obtain the value of the pixel and connected to the predictor to obtain the predicted value, and operable to compute a prediction residual for the pixel; e. a context quantizer operable to compute a quantized context for the pixel; f. a storage unit connected to the context quantizer and operable to store a count N of occurrences of each quantized context and an accumulation of magnitudes of prediction residuals A for pixels in each context; g. a Golomb code parameter generator connected to the storage unit and the context quantizer and operable to compute a Golomb parameter m as a function of the value N and the value A for the context of the pixel; and h. a code generator connected to the comparator and the Golomb code parameter generator and operable to produce a Golomb code for the pixel based on the Golomb parameter m and the predicted value. - View Dependent Claims (35, 36, 37, 38, 39, 40, 41)
-
-
42. An image decoder system wherein for each pixel in a compressed image there is a context based on the pixels that have been decoded prior to the each pixel, the decoder comprising:
-
a. means for retrieving encoded pixels of a compressed image; b. a decompressed image buffer for storing a portion of at least one decompressed digitized image; c. a context generator connected to the decompressed image buffer and operable to determine the value of a context of a pixel being decoded; d. a context quantizer operable to compute a quantized context for the pixel being decoded; e. a storage unit connected to the context quantizer and operable to store a count N of occurrences of each quantized context and an accumulation of magnitudes of prediction residuals A for pixels in each context; f. a Golomb code parameter generator connected to the storage unit and the context quantizer and operable to compute a Golomb parameter m as a function of the value N and the value A for the context of the pixel being decoded; g. a code decoder connected to the means for retrieving encoded pixels to obtain a Golomb code for the pixel being decoded and to the Golomb code parameter generator and operable to produce a prediction residual value for the pixel being decoded; h. a predictor for predicting the value of the pixel being decoded; and i. an adder connected to the code decoder to obtain the prediction residual value for the pixel being decoded and connected to the predictor to obtain the predicted value, and operable to add the prediction residual value to the predicted value, thereby producing a decoded value for the pixel. - View Dependent Claims (43, 44, 45, 46, 47, 48, 49)
-
-
50. A method of operating a computer to decompress encoded digitized images comprising the steps of:
-
a. retrieving a compressed image to decompress from an input device; b. for each pixel to be decompressed from the compressed image; i. directing the computer to determine a context for the pixel from previously decompressed pixels; ii. directing the computer to use the context of a pixel in the decompressed image to determine a predicted value for the pixel; iii. retrieving a Golomb code for the pixel from the compressed image; iv. computing a Golomb parameter corresponding to a context-specific value N and a context-specific value A, where N is a count of pixels encountered in the context, and A is an accumulation of magnitudes of prediction residuals for pixels in the context; v. decoding the Golomb code using the Golomb parameter, thereby producing a mapped value, M(ε
);vi. mapping the mapped value M(ε
) to a residual value εvii. and adding the residual value ε
to the predicted value, thereby producing the decoded value for the pixel. - View Dependent Claims (51, 52, 53, 54, 55, 56, 57)
-
-
58. A computer storage media having computer executable instructions for controlling the operation of a computer to compress digitized images, comprising:
instructions for causing said computer to, for each pixel in the image; i. determine a context for the pixel; ii. use the context of a pixel in the image to determine a predicted value for the pixel; iii. compare the predicted value and the actual value, thereby producing a residual value ε
,iv. map the residual value ε
to a mapped value M(ε
); andv. compute a Golomb code corresponding to the residual from a context-specific value N and a context-specific value A, where N is a count of pixels encountered in the context, and A is an accumulation of magnitudes of prediction residuals for pixels in the context.
-
59. A computer storage media having computer executable instructions for controlling the operation of a computer to decompress compressed digitized images, comprising:
instructions for causing said computer to, for each encoded pixel in the compressed digitized image; i. determine a context for the pixel; ii. use the context of a pixel in the image to determine a predicted value for the pixel; iii. retrieve a Golomb code from the compressed digitized image; iv. determining a Golomb code parameter from the context using a context-specific value N and a context-specific value A, where N is a count of pixels encountered in the context, and A is an accumulation of magnitudes of prediction residuals for pixels in the context; v. decoding the retrieved Golomb code using the Golomb code parameter, thereby obtaining a mapped prediction residual M(ε
);vi. map M(ε
) to a prediction residual ε
; andvii. add the prediction residual ε
to the predicted value, thereby producing a decompressed pixel value.
Specification