Claims
- 1. A process for allocating bits for a multi-stage digital image compression such that image quality is optimized subject to a constraint on maximum bit allowance, said process comprising:
a) calculating a distortion term and a bit demand measure associated with each of a finite number of possible quantization scales for each stage of the image compression; b) selecting a combination of quantization scales for all stages that minimizes total distortion subject to a constraint on maximum bit demand; c) allocating to a first stage of compression a number of bits required to quantize the first stage with the quantization scale selected for the first stage, and updating the constraint on maximum bit demand by subtracting off the bit demand associated with the quantized first stage; and d) recalculating the distortion terms and the bit demand measures associated with each of the finite number of possible quantization scales for each remaining stage of the image compression in light of the quantization of a previous stage.
- 2. The process of claim 1, further comprising:
e) recursive application of analogues of steps b) through d), wherein the words first stage are replaced with current stage, until quantization scales and thus bit allocations have been selected for all stages of the image compression.
- 3. The process of claim 1, where dependencies in the multi-stage compression process imply that distortion and bit demand data for at least one later stage of the process will be affected by the quantization performed at a previous stage.
- 4. The process of claim I wherein the image compression includes pyramidal image decomposition and wherein the stages of compression comprise encoding the various bands of an image pyramid.
- 5. The process of claim 4 wherein a predict function used in the pyramidal decomposition involves an inverse update step, which updates values for pixels in a lower band that also appeared in a previous downsampled higher band.
- 6. The process of claim 4 wherein step d) further comprises modifying data for remaining stages by convolving histograms for each remaining band with a smoothing function of width corresponding to the previously selected quantization scale before recomputing distortion terms and bit demand measures.
- 7. The process of claim 1 wherein the distortion term calculated for each stage and each quantization scale comprises a weighted squared error.
- 8. The process of claim 1 wherein the distortion term calculated for each stage and each quantization scale comprises a peak signal-to-noise ratio (PSNR).
- 9. The process of claim 1 wherein the selection of the combination of quantization scales in step b) is made using a dynamic programming algorithm.
- 10. An apparatus for allocating bits for a multi-stage digital image compression scheme such that image quality is optimized subject to a constraint on the maximum bit allowance, said apparatus comprising:
a) means for calculating a distortion term and a bit demand measure associated with each of a finite number of possible quantization scales for each stage of the image compression; b) means for selecting a combination of quantization scales for all stages that minimizes total distortion subject to a constraint on maximum bit demand; c) means for allocating to a first stage of compression a number of bits required to quantize the first stage with the quantization scale selected for the first stage, and means for updating the constraint on maximum bit demand by subtracting off the bit demand associated with the quantized first stage; and d) means for recalculating the distortion terms and the bit demand measures associated with each of the finite number of possible quantization scales for each remaining stage of the image compression in light of the quantization of a previous stage.
- 11. The apparatus of claim 10, further comprising:
e) means to recursively apply steps b) through d), wherein the words first stage are replaced with current stage, until quantization scales and thus bit allocations have been selected for all stages of the image compression.
- 12. The apparatus of claim 10, where dependencies in the multi-stage compression process imply that distortion and bit demand data for at least one later stage of the process will be affected by the quantization performed at a previous stage.
- 13. The apparatus of claim 10 wherein the image compression includes pyramidal image decomposition and wherein the stages comprise encoding the various bands of an image pyramid.
- 14. The apparatus of claim 13 wherein a predict function used in the pyramidal decomposition involves an inverse update step, which updates values for pixels in a lower band that also appeared in a previous downsampled higher band.
- 15. The apparatus of claim 13 wherein step d) further comprises modifying data for remaining stages by convolving histograms for each remaining band with a smoothing function of width corresponding to the previously selected quantization scale before recomputing distortion terms and bit demand measures.
- 16. The apparatus of claim 10 wherein the distortion term calculated for each stage and each quantization scale comprises a weighted squared error.
- 17. The apparatus of claim 10 wherein the distortion term calculated for each stage and each quantization scale comprises a peak signal-to-noise ratio (PSNR).
- 18. The apparatus of claim 10 wherein the means for selecting the combination of quantization scales is made using a dynamic programming algorithm.
- 19. A system for encoding and decoding a compressed digital image, said system including the bit allocation apparatus of claim 10.
CROSS-REFERENCES TO RELATED APPLICATIONS
[0001] The present application is related to co-pending U.S. patent application Ser. No. 10/028,998, “Efficiently Adaptive Double Pyramidal Coding,” filed Dec. 20, 2001, the disclosure of which is incorporated herein by reference for all purposes. The present application is also related to co-pending U.S. patent application Ser. No. 10/032,394, “Adaptive Transforms,” filed Dec. 19, 2001, the disclosure of which is incorporated herein by reference for all purposes.