IMAGE ENCODING APPARATUS, IMAGE DECODING APPARATUS AND CONTROL METHOD THEREFOR

Information

  • Patent Application
  • 20070217703
  • Publication Number
    20070217703
  • Date Filed
    March 07, 2007
    17 years ago
  • Date Published
    September 20, 2007
    16 years ago
Abstract
The present invention is able to determine an encoding parameter using a simple method with little processing load or memory cost, and enables encoding of image data with excellent compression performance. To this end, a prediction error generating unit of an encoding apparatus according to the present invention calculates the difference (prediction error) between a pixel of interest and a predicted value. A prediction order conversion unit converts the prediction error to a non-negative integer, and outputs the non-negative integer as a prediction order M(e). A Golomb encoding unit performs encoding in accordance with a k parameter supplied from a k parameter updating unit. The k parameter updating unit updates the k parameter for use in the next updating based on the prediction order M(e) of the pixel of interest and the k parameter supplied to the Golomb encoding unit.
Description

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.



FIG. 1 is a block configuration diagram of an image processing apparatus according to a first embodiment.



FIG. 2 shows a table for quantizing the difference between neighboring pixels.



FIG. 3 shows the relative positional relation between a pixel x for encoding and neighboring pixels a, b and c.



FIG. 4 is a flowchart showing the flow of encoding according the first embodiment.



FIG. 5A is a table showing the relation between Golomb encoding parameters k and the code lengths of symbols.



FIG. 5B is a table showing the relation between Golomb encoding parameters k, the code lengths of symbols, and correction values.



FIG. 6 shows an example of k parameter transition in the image processing apparatus according to the first embodiment.



FIG. 7 shows a probability distribution f(n,1) at which the encoding probability is maximized when k=1.



FIGS. 8A and 8B show transition probabilities for the k parameter.



FIG. 9 shows the configuration of a code stream output from the image processing apparatus.



FIG. 10 is a block configuration diagram of an image processing apparatus according to second and third embodiments.



FIG. 11 is a flowchart showing the flow of processing by a k parameter updating unit 1002 in the second embodiment.



FIG. 12 shows the association between index values i and parameters k in the third embodiment.



FIG. 13 is a flowchart showing the flow of processing by a k parameter updating unit 1002 in the third embodiment.



FIG. 14 is a block configuration diagram of an information processing apparatus in the case where the first to third embodiments are realized by software.



FIG. 15 is a block configuration diagram of an image processing apparatus that performs decoding in the first embodiment.



FIG. 16 shows exemplary Golomb encodes.


Claims
  • 1. An image encoding apparatus comprising: input means for inputting a symbol to be encoded;encoding means for encoding the symbol in accordance with an encoding parameter to generate encoded data;judging means for judging whether the symbol exceeds an upper limit of a target range for the encoding parameter, and whether the symbol falls below a lower limit of the target range; andupdating means for updating the encoding parameter according to a result of the judgment.
  • 2. A control method of controlling an image encoding apparatus, comprising: an input step of inputting a symbol to be encoded;an encoding step of encoding the symbol in accordance with an encoding parameter to generate encoded data;a judging step of judging whether the symbol exceeds an upper limit of a target range for the encoding parameter, and whether the symbol falls below a lower limit of the target range; andan updating step of updating the encoding parameter according to a result of the judgment.
  • 3. A computer program stored on a computer readable storage medium, and for causing a computer to function as an image encoding apparatus claimed in claim 1 as a result of the computer reading and executing the stored computer program.
  • 4. A computer readable storage medium storing a computer program as claimed in claim 3.
  • 5. An image decoding apparatus comprising: input means for inputting encoded data;decoding means for decoding the encoded data in accordance with a decoding parameter to generate symbol data;judging means for judging whether the symbol exceeds an upper limit of a target range for the decoding parameter, and whether the symbol falls below a lower limit of the target range; andupdating means for updating the decoding parameter according to a result of the judgment.
  • 6. A control method of controlling an image decoding apparatus, comprising: an input step of inputting encoded data;a decoding step of decoding the encoded data in accordance with a decoding parameter to generate symbol data;a judging step of judging whether the symbol exceeds an upper limit of a target range for the decoding parameter, and whether the symbol falls below a lower limit of the target range; andan updating step of updating the decoding parameter according to a result of the judgment.
  • 7. A computer program stored on a computer readable storage medium, and for causing a computer to function as an image decoding apparatus claimed in claim 5 as a result of the computer reading and executing the stored computer program.
  • 8. A computer readable storage medium storing a computer program as claimed in claim 7.
  • 9. An image encoding apparatus that encodes image data based on a dynamic probability distribution model, comprising: input means for inputting image data in pixel units;symbol generating means for generating a symbol for entropy encoding from pixel data of interest input by the input means;encoding means for encoding the symbol generated by the symbol generating means in accordance with a given encoding parameter to generate encoded data;judging means for judging whether the encoding parameter used when the symbol is encoded by the encoding means is within a possible range of the encoding parameter at which a codeword of the symbol is within a target code length, exceeds an upper limit of the range, or falls below a lower limit of the range; andupdating means for updating the encoding parameter based on a result of the judgment by the judging means.
  • 10. The image encoding apparatus according to claim 9, wherein the encoding means is Golomb encoding means.
  • 11. The image encoding apparatus according to claim 9, wherein said symbol generating means includes: predicted value calculating means for calculating a predicted value for pixel data of interest from at least one of pixels, which had been encoded, neighboring the pixel data of interest;prediction error calculating means for calculating a prediction error, being a difference between the calculated predicted value and the pixel data of interest; andconversion means for converting a plus/minus sign of the calculated prediction error to a distinguishable non-negative integer value,wherein the symbol generating means generates the non-negative integer value converted by the conversion means as the symbol.
  • 12. The image encoding apparatus according to claim 9, wherein if the encoding parameter used when the symbol is encoded by the encoding means is defined as K, and a lower limit and an upper limit of a range of the encoding parameter at which the length of codeword of the symbol is within a target code length are respectively defined as KSmin and KSmax, the updating meansincreases the encoding parameter K if K<KSmin,decreases the encoding parameter K if KSmax<K, andmaintains the value of the encoding parameter K if KSmin≦K≦KSmax.
  • 13. The image encoding apparatus according to claim 9, further comprising: state information calculating means for calculating state information S for a position of a pixel of interest X, based on data of pixels, which had been encoded, neighboring the pixel of interest X; andencoding parameter storage means for storing an encoding parameter array K[ ] of a possible range of the state information S,wherein the encoding means performs the encoding in accordance with an encoding parameter K[S] specified by the state information S of the pixel data of interest, andthe updating means updates the encoding parameter K[S].
  • 14. The image encoding apparatus according to claim 13, wherein if the encoding parameter used when the symbol is encoded by the encoding means is defined as K[S], and a lower limit and an upper limit of a range of the encoding parameter at which the length of codeword of the symbol is within a target code length are respectively defined as KSmin and KSmax, the updating meansincreases the encoding parameter K[S] if K[S]<KSmin,decreases the encoding parameter K[S] by aprobability of less than 1 if KSmax<K[S], and maintains the value of the encoding parameter K[S] if KSmin≦K[S]≦KSmax.
  • 15. The image encoding apparatus according to claim 9, further comprising: state information calculating means for calculating state information S for a position of a pixel of interest X, based on data of pixels, which had been encoded, neighboring the pixel of interest X;index storage means for storing an index array i[ ] of a possible range of the state information S obtained by the state information calculating means, andencoding parameter storage means for storing an encoding parameter array K[i[ ]] of a possible range of the index array i[ ],wherein the encoding means performs the encoding in accordance with an encoding parameter K[i[S]] specified by the state information S of the pixel data of interest, andthe updating means updates the encoding parameter K[i[S]].
  • 16. The image encoding apparatus according to claim 15, wherein if the encoding parameter used when the symbol is encoded by the encoding means is defined as K[i[S]], and a lower limit and an upper limit of a range of the encoding parameter at which the length of codeword of the symbol is within a target code length are respectively defined as KSmin and KSmax, the updating meansincreases the encoding parameter K[i[S]] by a preset correction value a if K[i[S]]≦KSmin,decreases the encoding parameter K[i[S]] by a correction value β that is smaller than the correction value a if KSmax<K[i[S]], andmaintains the value of the encoding parameter K[i[S]] if KSmin≦K[i[S]]≦KSmax.
  • 17. A control method for an image encoding apparatus that encodes image data based on a dynamic probability distribution model, comprising: an input step of inputting image data in pixel units;a symbol generating step of generating a symbol for entropy encoding from pixel data of interest input in the input step;an encoding step of encoding the symbol generated in the symbol generating step in accordance with a given encoding parameter to generate encoded data;a judging step of judging whether the encoding parameter used when the symbol is encoded in the encoding step is within a possible range of the encoding parameter at which a codeword of the symbol is a target code length, exceeds an upper limit of the range, or falls below a lower limit of the range; andupdating the encoding parameter based on a result of the judgment in the judging step.
  • 18. A computer program stored on a computer readable storage medium, and for causing a computer to function as an image encoding apparatus as claimed in claim 9 as a result of the computer reading and executing the stored computer program.
  • 19. A computer readable storage medium storing a computer program as claimed in claim 18.
  • 20. An image decoding apparatus that decodes encoded image data based on a dynamic probability distribution model, comprising: input means for inputting encoded data in pixel units;decoding means for decoding the encoded data input by the input means in accordance with a given decoding parameter to generate a symbol of a pixel of interest;image data restoring means for restoring pixel data of the pixel of interest from the symbol obtained by decoding;judging means for judging whether the decoding parameter used when the symbol is decoded by the decoding means is within a possible range of an encoding parameter at which a codeword of the symbol is within a target code length, exceeds an upper limit of the range, or falls below a lower limit of the range; andupdating means for updating the decoding parameter based on a result of the judgment by the judging means.
  • 21. A control method for an image decoding apparatus that decodes encoded image data based on a dynamic probability distribution model, comprising: an input step of inputting encoded data in pixel units;a decoding step of decoding the encoded data input in the input step in accordance with a given decoding parameter to generate a symbol of a pixel of interest;a restoring step of restoring pixel data of the pixel of interest from the symbol obtained by decoding;a judging step of judging whether the decoding parameter used when the symbol is decoded in the decoding step is within a possible range of an encoding parameter at which a codeword of the symbol is within a target code length, exceeds an upper limit of the range, or falls below a lower limit of the range; andan updating the decoding parameter based on a result of the judgment in the judging step.
  • 22. A computer program stored on a computer readable storage medium, and for causing a computer to function as an image decoding apparatus as claimed in claim 21 as a result of the computer reading and executing the stored computer program.
  • 23. A computer readable storage medium storing a computer program as claimed in claim 22.
Priority Claims (1)
Number Date Country Kind
2006-075544 Mar 2006 JP national