Image encoding device, image decoding device, image encoding method, image decoding method, image encoding program, and image decoding program

By updating the encoding parameter k for blocks of pixels rather than individual pixels, the image encoding and decoding devices reduce computational load and achieve high compression ratios in Golom Rice coding and decoding.

JP7678679B2Active Publication Date: 2025-05-16SHIKINO HIGH TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2021026084
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-02-22
Publication Date
2025-05-16
Estimated Expiration
2041-02-22

AI Technical Summary

Technical Problem

Image coding devices and image decoding devices using the JPEG-LS system require frequent updates of the encoding parameter k for each pixel, leading to a significant increase in computational load.

Method used

The proposed solution involves an image encoding device and an image decoding device that update the encoding parameter k based on Golom Rice coded data for all pixels in a block, rather than per pixel, thereby reducing the computational burden.

Benefits of technology

This approach allows for Golom Rice coding and decoding with high compression ratios while significantly reducing the amount of computation required, resulting in faster processing times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007678679000001
    Figure 0007678679000001
  • Figure 0007678679000002
    Figure 0007678679000002
  • Figure 0007678679000003
    Figure 0007678679000003
Patent Text Reader

Abstract

To provide an image encoding device, an image encoding method, and an image encoding program capable of high-compression Golomb-Rice encoding with a small amount of computation, and an image decoding device, an image decoding method, and an image decoding program capable of high-compression Golomb-Rice decoding with a small amount of computation.SOLUTION: An encoding unit 16 performs Golomb-Rice encoding on a symbol generated from pixel values of the pixels of an original image to generate Golomb-Rice encoded data, and a parameter setting unit 18 performs Golomb-Rice encoding on all pixels in a block, and then updates an encoding parameter k on the basis of the Golomb-Rice encoded data for all pixels in the block, and the encoding unit 16 performs Golomb-Rice encoding on all pixels in the target block on the basis of the encoding parameter k calculated using a block consisting of a plurality of pixels that have already undergone Golomb-Rice encoding.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to an image encoding device, an image decoding device, an image encoding method, an image decoding method, an image encoding program, and an image decoding program. [Background technology]

[0002] Golomb-Rice coding is known as an entropy coding method. The key to determining the compression rate of Golomb-Rice coding is the determination of the coding parameter k. In the JPEG-LS method, which is an international standard, image coding devices and image decoding devices use the average value of prediction errors up to the original pixel to determine the coding parameter k (for example, see Non-Patent Document 1). [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] ISO / IEC 14495-1:1999, "Information Technology-Lossless and Near-Lossless Compression of Continuous-Tone Still Images : baseline" Summary of the Invention [Problem to be solved by the invention]

[0004] Image encoding devices and image decoding devices using the JPEG-LS format need to update the encoding parameter k on a pixel-by-pixel basis, which poses a problem of increased computational complexity.

[0005] Therefore, an object of the present invention is to provide an image coding device, an image coding method, and an image coding program capable of Golomb-Rice coding with a small amount of calculation, and to provide an image decoding device, an image decoding method, and an image decoding program capable of Golomb-Rice decoding with a small amount of calculation. [Means for solving the problem]

[0006] The image coding device of the present invention includes a coding unit that performs Golomb-Rice coding on symbols generated from pixel values ​​of pixels of an original image to generate Golomb-Rice coded data, and a parameter setting unit that updates a coding parameter k based on the Golomb-Rice coded data for all pixels in a block after the coding unit has completed Golomb-Rice coding for all pixels in the block. The coding unit performs Golomb-Rice coding on all pixels in a target block based on the coding parameter k calculated using a block consisting of a plurality of pixels that have already completed Golomb-Rice coding.

[0007] Preferably, the encoding unit generates a symbol from an error value between a pixel value of a pixel of the original image and a predicted value of the pixel of the original image, and performs Golomb-Rice encoding on the symbol.

[0008] Preferably, the parameter setting unit decreases the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belong to the specified group is equal to or greater than an upper threshold, and increases the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belong to the specified group is equal to or less than a lower threshold. The code length of the Golomb-Rice encoded data that belongs to the specified group is minimum.

[0009] Preferably, the prefix of the Golomb-Rice encoded data belonging to the defined group is 1 bit.

[0010] Preferably, the encoding unit performs Golomb-Rice encoding on all pixels in a block of interest based on an encoding parameter k calculated using at least one block adjacent to the block of interest, the encoding parameter k being composed of a plurality of pixels that have already undergone Golomb-Rice encoding.

[0011] Preferably, the block has a plurality of rows and a plurality of columns. When the block of interest is not at the beginning of the row direction and is not at the beginning of the column direction, the encoding unit performs Golomb-Rice encoding on all pixels in the block of interest based on an encoding parameter k calculated using a block consisting of a plurality of pixels that have already been Golomb-Rice encoded and adjacent to the block of interest in the row direction, and an average value of the encoding parameter k calculated using a block consisting of a plurality of pixels that have already been Golomb-Rice encoded and adjacent to the block of interest in the column direction.

[0012] The image decoding device of the present invention includes a decoding unit that Golomb-Rice decodes Golomb-Rice encoded data, which is the pixel value of a pixel of an encoded image, for a pixel of an encoded image, and a parameter setting unit that updates an encoding parameter k based on the Golomb-Rice encoded data for all pixels in a block after the decoding unit has completed Golomb-Rice decoding for all pixels in the block. The decoding unit Golomb-Rice decodes all pixels in a target block, based on the encoding parameter k calculated using a block consisting of a plurality of pixels that have already completed Golomb-Rice decoding.

[0013] Preferably, the parameter setting unit decreases the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belong to the specified group is equal to or greater than an upper threshold, and increases the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belong to the specified group is equal to or less than a lower threshold. The code length of the Golomb-Rice encoded data that belongs to the specified group is minimum.

[0014] Preferably, the prefix of the Golomb-Rice encoded data belonging to the defined group is 1 bit.

[0015] Preferably, the decoding unit performs Golomb-Rice decoding on all pixels in a block of interest based on an encoding parameter k calculated using at least one block adjacent to the block of interest, the encoding parameter k being composed of a plurality of pixels on which Golomb-Rice decoding has already been completed.

[0016] Preferably, the block has a plurality of rows and a plurality of columns. When the block of interest is not the first in the row direction and is not the first in the column direction, the decoding unit performs Golomb-Rice decoding on all pixels in the block of interest based on an average value of an encoding parameter k calculated using a block adjacent to the block of interest in the row direction and consisting of a plurality of pixels that have already been Golomb-Rice decoded, and an encoding parameter k calculated using a block adjacent to the block of interest in the column direction and consisting of a plurality of pixels that have already been Golomb-Rice decoded.

[0017] The image coding method of the present invention includes a step of Golomb-Rice coding symbols generated from pixel values ​​of pixels of an original image to generate Golomb-Rice coded data, and a step of updating a coding parameter k based on the Golomb-Rice coded data for all pixels in the block after the Golomb-Rice coding for all pixels in the block is completed. The step of generating Golomb-Rice coded data includes a step of Golomb-Rice coding all pixels in a target block based on a coding parameter k calculated using a block consisting of a plurality of pixels that have already been Golomb-Rice coded.

[0018] Preferably, the encoding step includes the steps of generating a symbol from an error value between a pixel value of a pixel of the original image and a predicted value of the pixel of the original image, and Golomb-Rice encoding the symbol.

[0019] The image decoding method of the present invention includes the steps of: Golomb-Rice decoding Golomb-Rice encoded data, which is the pixel value of the pixel of the encoded image, for each pixel of the encoded image; and updating an encoding parameter k based on the Golomb-Rice encoded data for all pixels in the block after the Golomb-Rice decoding for all pixels in the block is completed. The decoding step includes the step of Golomb-Rice decoding all pixels in the target block based on the encoding parameter k calculated using a block consisting of a plurality of pixels that have already been Golomb-Rice decoded.

[0020] The image coding program of the present invention causes a computer to function as an encoding unit that Golomb-Rice codes symbols generated from pixel values ​​of pixels of an original image to generate Golomb-Rice coded data, and a parameter setting unit that updates a coding parameter k based on the Golomb-Rice coded data for all pixels in a block after the encoding unit has completed Golomb-Rice coding for all pixels in the block. The encoding unit Golomb-Rice codes all pixels in a target block, based on the coding parameter k calculated using a block consisting of a plurality of pixels that have already completed Golomb-Rice coding.

[0021] Preferably, the encoding unit generates a symbol from an error value between a pixel value of a pixel of the original image and a predicted value of the pixel of the original image, and performs Golomb-Rice encoding on the symbol.

[0022] The image decoding program of the present invention causes a computer to function as a decoding unit that Golomb-Rice decodes Golomb-Rice encoded data, which is the pixel value of a pixel of an encoded image, for each pixel of an encoded image, and a parameter setting unit that updates an encoding parameter k based on the Golomb-Rice encoded data for all pixels in a block after the decoding unit has completed Golomb-Rice decoding for all pixels in the block. The decoding unit Golomb-Rice decodes each of all pixels in a target block based on the encoding parameter k calculated using a block consisting of a plurality of pixels that have already completed Golomb-Rice decoding. Effect of the Invention

[0023] According to the present invention, Golomb-Rice encoding and Golomb-Rice decoding with a high compression rate can be performed with a small amount of calculation. [Brief description of the drawings]

[0024] [Figure 1] 1 is a flowchart showing a procedure for image encoding in the JPEG-LS format. [Diagram 2] 1 is a flowchart showing a procedure for decoding an image in the JPEG-LS format. [Diagram 3] 1 is a diagram showing a configuration of an image coding device 1 according to an embodiment. [Figure 4] FIG. 1 is a diagram showing an example of Golomb-Rice encoding and Golomb-Rice decoding when k=3. [Diagram 5] FIG. 1 is a diagram showing an example of Golomb-Rice encoding and Golomb-Rice decoding when k=5. [Figure 6] FIG. 2 is a diagram showing a Golomb-Rice coding table. [Figure 7] 1 is a flowchart showing an image encoding procedure according to an embodiment. [Figure 8] FIG. 2 is a diagram illustrating blocks according to the first embodiment. [Figure 9]FIG. 2 is a diagram showing a block (source block) for which an encoding parameter k used by a target block is calculated in the first embodiment. [Figure 10] FIG. 2 illustrates a configuration of an image decoding device 2 according to an embodiment. [Figure 11] 1 is a flowchart showing a procedure of image decoding according to an embodiment. [Figure 12] FIG. 11 is a diagram illustrating blocks according to a second embodiment. [Figure 13] FIG. 11 is a diagram showing a block (source block) for which an encoding parameter k used by a target block is calculated in the second embodiment. [Figure 14] FIG. 13 is a diagram illustrating blocks according to a third embodiment. [Figure 15] FIG. 13 is a diagram showing a block (source block) for which an encoding parameter k used by a target block is calculated in the third embodiment. [Figure 16] FIG. 13 is a diagram showing a block (source block) for which an encoding parameter k used by a target block is calculated in the fourth embodiment. [Figure 17] FIG. 2 is a diagram showing the internal configuration of an image encoding device and an image decoding device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0025] Hereinafter, embodiments will be described with reference to the drawings. [Reference example] FIG. 1 is a flowchart showing the procedure for image encoding in the JPEG-LS format.

[0026] In step S101, the image encoding device initializes parameters RESET, A, and N. A is the sum of data. N is the number of data. A / N represents the average value of data. Here, data is an error value E, which will be described later. RESET is a value for resetting A and N. A and N are initialized to 0. RESET is fixed to a predetermined value (e.g., 16, 32, etc.).

[0027] In step S102, the image coding apparatus initializes a coding parameter k to zero.

[0028] In step S103, if the value obtained by shifting N to the left by k bits is less than A, the process proceeds to step S104, and if the value obtained by shifting N to the left by k bits is equal to or greater than A, the process proceeds to step S105.

[0029] In step S104, the image coding apparatus increments k by 1. After that, the process returns to step S103.

[0030] In step S105, the image encoding apparatus obtains a pixel value S of a pixel of interest in the original image.

[0031] In step S106, the image encoding apparatus generates a predicted value P of the pixel of interest. In step S107, the image encoding apparatus calculates an error value E (=SP) of the pixel of interest.

[0032] In step S108, the image encoding device generates a symbol SB (unsigned data) from the error value E (signed data). Specifically, if the error value E is positive, the image encoding device sets 2×E as the symbol SB, and if the error value E is negative, the image encoding device sets (−2×E−1) as the symbol SB. The image encoding device performs Golomb-Rice encoding on the symbol SB with the currently set encoding parameter k.

[0033] In step S109, the image coding apparatus increments N by 1. The image coding apparatus updates A by adding the absolute value of the error value E to A.

[0034] In step S110, if N is equal to RESET, the process proceeds to step S111, and if N is not equal to RESET, the process proceeds to step S112.

[0035] In step S111, the image coding apparatus updates N by dividing N by 2, and updates A by dividing A by 2. After that, the process proceeds to step S112.

[0036] In step S112, the image coding apparatus increments N by one. In step S113, if acquisition of pixel values ​​for all pixels of the original image has not been completed, the process proceeds to step S114, and if acquisition of pixel values ​​for all pixels of the original image has been completed, the process ends.

[0037] In step S114, the image coding apparatus moves the pixel of interest by scanning the original image in a predetermined scanning order.

[0038] FIG. 2 is a flowchart showing the procedure for decoding an image in the JPEG-LS format. In step S301, the image decoding apparatus initializes parameters RESET, A, and N. RESET, A, and N are the same as those in the encoding process.

[0039] In step S301, the image decoding apparatus initializes an encoding parameter k to zero.

[0040] In step S302, if the value obtained by shifting N to the left by k bits is less than A, the process proceeds to step S304, and if the value obtained by shifting N to the left by k bits is equal to or greater than A, the process proceeds to step S305.

[0041] In step S304, the image decoding apparatus increments k by 1. After that, the process returns to step S303.

[0042] In step S305, the image decoding apparatus obtains the pixel value of the pixel of interest in the encoded image.

[0043] In step S306, the image decoding apparatus performs Golomb-Rice decoding on the pixel value of the pixel of interest in the encoded image using the currently set k to generate a symbol SB.

[0044] In step S307, the image decoding apparatus generates a predicted value P of the pixel of interest in the original image.

[0045] In step S308, the image decoding device generates an error value E (signed data) from the decoded symbol SB (unsigned data). Specifically, if the decoded symbol SB is an even number, the image decoding device sets SB / 2 as the error value E, and if the decoded symbol SB is an odd number, the image decoding device sets -(SB+1) / 2 as the error value E. The image decoding device restores the pixel value S (=P+E) of the pixel of interest in the original image.

[0046] In step S309, the image decoding apparatus increments N by 1. The image decoding apparatus updates A by adding the absolute value of the error value E to A.

[0047] In step S310, if N is equal to RESET, the process proceeds to step S311, and if N is not equal to RESET, the process proceeds to step S312.

[0048] In step S311, the image decoding apparatus updates N by dividing N by 2, and updates A by dividing A by 2. After that, the process proceeds to step S312.

[0049] In step S312, the image decoding apparatus increments N by one. In step S313, if acquisition of pixel values ​​of all pixels of the encoded image has not been completed, the process proceeds to step S314, and if acquisition of pixel values ​​of all pixels of the encoded image has been completed, the process ends.

[0050] In step S314, the image decoding apparatus moves the pixel of interest by scanning the original image in a predetermined scanning order (the same order as in the encoding process).

[0051] As described above, the image encoding method and image decoding method of the JPEG-LS format have a problem in that the amount of calculation increases because the encoding parameter k is updated for each pixel.

[0052] [First embodiment] (Image encoding device) FIG. 3 illustrates a configuration of an image coding device 1 according to an embodiment.

[0053] The image encoding device 1 includes an image input unit 10, a symbol generation unit 11, an encoding unit 16, a parameter setting unit 18, and an image scanning unit 19. The symbol generation unit 11 includes an image prediction unit 12 and a prediction error generation unit 14.

[0054] The image input unit 10 acquires a pixel value S of a pixel of an original image. The symbol generating unit 11 generates symbols from pixel values ​​S of pixels of the original image. The symbol generating unit 11 sets an image consisting of symbols for each pixel value as a converted image, and makes the bias in the frequency of occurrence of pixel values ​​(symbols) of the converted image larger than the bias in the frequency of occurrence of pixel values ​​of the original image.

[0055] In this embodiment, the symbol generating unit 11 generates symbols from errors representing differences between pixel values ​​of an original image and predicted values ​​of pixel values ​​of the original image, but the present invention is not limited to this. For example, the symbol generating unit 11 may generate symbols from pixel values ​​of a transformed image obtained by performing a discrete cosine transform on the original image.

[0056] The image prediction unit 12 generates a predicted value P of the pixel of interest. For example, the image prediction unit 12 calculates the predicted value P of the pixel of interest according to the following formula using the encoded surrounding pixels a, b, and c. The pixel values ​​of the pixels a, b, and c of the original image are A, B, and C. When the pixels of the original image are acquired in raster order, the pixel a can be the pixel immediately to the left of the pixel of interest, the pixel b can be the pixel immediately above the pixel of interest, and the pixel c can be the pixel to the upper left of the pixel of interest.

[0057] P = min(A,B) (when max(A,B) ≦ C)…(1) P = max(A,B) (when min(A,B) ≥ C)…(2) P = A + BC (min(A,B) <C<max(A,B)のとき)…(3) The prediction error generating unit 14 calculates an error value E (=SP) of the pixel of interest as a symbol.

[0058] The encoding unit 16 generates a symbol SB for each pixel of the original image from an error value E between the pixel value of the pixel of the original image and a predicted value of the pixel of the original image. The encoding unit 16 performs Golomb-Rice encoding on the symbol SB to generate Golomb-Rice encoded data. The encoding unit 16 performs Golomb-Rice encoding on all pixels in the block of interest, based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice encoded.

[0059] The parameter setting unit 18 sets parameters k, M, THa, and THb. The parameter k is an encoding parameter. The parameters THa and THb are an upper threshold and a lower threshold, respectively. The parameter M represents the number of data in a block determined to belong to group 0 of the Golomb-Rice encoding table. Here, the data is Golomb-Rice encoded data.

[0060] After the encoding unit 16 finishes Golomb-Rice encoding for all pixels in the block, the parameter setting unit 18 updates the encoding parameter k based on the Golomb-Rice encoded data for all pixels in the block.

[0061] The image scanning unit 19 moves a target block and a target pixel within the target block by scanning the original image.

[0062] FIG. 4 is a diagram showing an example of Golomb-Rice encoding and Golomb-Rice decoding when k=3.

[0063] Golomb-Rice coding is performed as follows: The lower bits (suffix) of the coded data are generated from the lowest k (=3) bits of the fixed-length 8-bit pre-coding data, and the higher bits (prefix) of the coded data are generated from the highest 5 bits of the fixed-length 8-bit pre-coding data. The lowest 3 bits (011) of the pre-coding data become the suffix (011) of the coded data as is. As the highest bits (00110) of the pre-coding data are expressed as "6" in decimal, the higher bits of the prefix of the coded data will be six consecutive 0s (000000), and the lowest bit of the prefix of the coded data will be the fixed value "1".

[0064] Golomb-Rice decoding is performed as follows. In the example of FIG. 4, six consecutive "0"s are input, followed by a stop bit "1". Therefore, the prefix (high-order bits) is recognized as 7 bits (0000001). Because k=3, the suffix is ​​recognized as 3 bits (011). The suffix (011) of the encoded data becomes the lower 3 bits (011) of the fixed-length 8-bit pre-encoding data. The upper bits of the pre-encoding data generated from the prefix of the encoded data are 5 (=8-3) bits. Because the prefix has six consecutive "0"s, the upper 5 bits of the pre-encoding data become (00110), which is the binary representation of "6".

[0065] FIG. 5 is a diagram showing an example of Golomb-Rice encoding and Golomb-Rice decoding when k=5.

[0066] Golomb-Rice coding is performed as follows: The lower bits (suffix) of the coded data are generated from the lowest k (=5) bits of the fixed-length 8-bit pre-coding data, and the higher bits (prefix) of the coded data are generated from the highest 3 bits of the fixed-length 8-bit pre-coding data. The lowest 5 bits (10011) of the pre-coding data become the suffix (10011) of the coded data as is. As the highest bits (001) of the pre-coding data are expressed as "1" in decimal, the higher bits of the prefix of the coded data will be one consecutive 0 (0), and the lowest bit of the prefix of the coded data will be the fixed value "1".

[0067] Golomb-Rice decoding is performed as follows. Golomb-Rice decoding is performed as follows. Input data (encoded data) during decoding is a bit stream (inputted sequentially from the most significant bit, and the end of the data is unclear). In the example of FIG. 5, one "0" is input, followed by a stop bit "1". Therefore, the prefix (higher bits) is recognized as 2 bits (01). Since k=5, the suffix is ​​recognized as 5 bits (10011). The suffix (10011) of the encoded data becomes the lower 5 bits (10011) of the fixed-length 8-bit pre-encoded data as is. The upper bits of the pre-encoded data generated from the prefix of the encoded data are 3 (=8-5) bits. Since the prefix has one "0", the upper 3 bits of the pre-encoded data become (001), which is the binary representation of "1".

[0068] FIG. 6 is a diagram illustrating a Golomb-Rice encoding table. In the following description, 0bX1X2... represents a binary representation, where X1 and X2 are either 0 or 1.

[0069] The coded data consists of a prefix, which is the most significant bit, and a suffix, which is the least significant bit. The suffix, which is the least significant bit, is k bits long. In the suffix of the coded data belonging to group i, the least significant bit is 1, and the most significant bits are i consecutive 0s. The code length of the coded data belonging to group i is (i+1+k). The number of coded data belonging to each group is 2 k It is.

[0070] For example, the prefix, which is the upper bits of the coded data belonging to group 0, is "0b1." The suffix, which is the lower bits, is k bits, so the code length of the coded data belonging to group 0 is (1+k).

[0071] The prefix, which is the upper bits of the coded data belonging to group 1, is "0b01." The suffix, which is the lower bits, is k bits, so the code length of the coded data belonging to group 1 is (2+k).

[0072] The prefix, which is the upper bits of the coded data belonging to group 2, is "0b001." The suffix, which is the lower bits, is k bits, so the code length of the coded data belonging to group 2 is (3+k).

[0073] The prefix, which is the upper bit of the encoded data belonging to group i, is "0b{00···0} (i) 1". {00···0} (k) represents K consecutive 0s. Since the suffix of the lower bits is k bits, the code length of the coded data belonging to group i is (i+1+k).

[0074] The occurrence frequency of data belonging to group i is greater than the occurrence frequency of data belonging to group (i+1). The ideal occurrence frequency of group 0 is 50%, and the ideal occurrence frequency of group 1 is 25%. The ideal occurrence frequency of group i is (1 / 2) (i+1) ×100(%).

[0075] The code length of Golomb-Rice encoded data belonging to group 0 is the smallest. All bits of the prefix, which is the upper bits of the encoded data, may be inverted. Therefore, the prefix, which is the upper bits of the encoded data belonging to group 0, is one bit, either "0b1" or "0b0".

[0076] The parameter setting unit 18 decreases the encoding parameter k when the number of pixels belonging to group 0 among the Golomb-Rice encoded data for all pixels in the block is equal to or greater than an upper threshold, and increases the encoding parameter k when the number of pixels belonging to group 0 is equal to or less than a lower threshold. This makes it possible to bring the proportion of pixels belonging to group 0 closer to a desirable value (50%).

[0077] 7 is a flowchart showing an image coding procedure according to an embodiment of the present invention. The processing of this flowchart may be realized by a computer executing an image coding program.

[0078] In step S201, the parameter setting unit 18 initializes parameters k, THa, and THb. The encoding parameter k is set to a predetermined initial value. For example, the encoding parameter k is set to a value that provides a high compression ratio through experiments. The upper threshold THa is set to a predetermined value. The lower threshold THb is set to a predetermined value. For example, when the number of pixels in a block is 16, the upper threshold THa can be set to 12, and the lower threshold THb can be set to 4.

[0079] In step S202, the parameter setting unit 18 initializes a parameter M (= the number of Golomb-Rice encoded data in a block determined to belong to group 0 in the Golomb-Rice encoding table) to 0.

[0080] In step S203, the image input unit 10 obtains the pixel value S of the pixel of interest in the original image.

[0081] In step S204, the image prediction unit 12 generates a predicted value P of the pixel of interest. In step S205, the prediction error generating unit 14 calculates the error value E (=SP) of the pixel of interest.

[0082] In step S206, the encoding unit 16 generates a symbol SB (unsigned data) from the error value E (signed data). Specifically, if the error value E is positive, the encoding unit 16 sets 2×E as the symbol SB, and if the error value E is negative, the encoding unit 16 sets (−2×E−1) as the symbol SB. The encoding unit 16 performs Golomb-Rice encoding on the symbol SB with the currently set encoding parameter k.

[0083] In step S207, if the pixel value after Golomb-Rice encoding belongs to group 0 of the Golomb-Rice encoding table, the process proceeds to step S208, and if the pixel value after Golomb-Rice encoding does not belong to group 0 of the Golomb-Rice encoding table, the process proceeds to step S209.

[0084] In step S208, the parameter setting unit 18 increments M by 1. After that, the process proceeds to step S209.

[0085] In step S209, if acquisition of pixel values ​​of all pixels in the block of interest is completed, the process proceeds to step S211. If acquisition of pixel values ​​of all pixels in the block of interest is not completed, the process proceeds to step S210.

[0086] In step S210, the image scanning unit 19 moves the pixel of interest within the block of interest by scanning the original image in a predetermined order. Then, the process proceeds to step S203.

[0087] In step S211, if M is equal to or greater than the upper threshold THo, the process proceeds to step S212, and if M is less than the upper threshold THo, the process proceeds to step S213.

[0088] In step S212, the parameter setting unit 18 decreases k by 1. As a result, when the ratio of elements belonging to group 0 is large, the ratio of elements belonging to group 0 can be brought closer to a desirable value (for example, 50%) by decreasing k. Then, the process proceeds to step S215.

[0089] In step S213, if M is equal to or smaller than the lower threshold THb, the process proceeds to step S214, and if M exceeds the lower threshold THb, the process proceeds to step S215.

[0090] In step S214, the parameter setting unit 18 increases k by 1. In this way, when the ratio of elements belonging to group 0 is small, the ratio of elements belonging to group 0 can be brought closer to a desirable value (for example, 50%) by increasing k. Then, the process proceeds to step S215.

[0091] In step S215, if acquisition of pixel values ​​for all pixels of the original image has not been completed, the process proceeds to step S216, and if acquisition of pixel values ​​for all pixels of the original image has been completed, the process ends.

[0092] In step S216, the image scanning unit 19 moves the block of interest by scanning the original image in a predetermined scanning order. The image scanning unit 19 sets the top pixel of the block of interest as the pixel of interest of the block of interest.

[0093] (source of parameter k) The encoding unit 16 performs Golomb-Rice encoding on all pixels in a block of interest based on an encoding parameter k calculated using blocks adjacent to the block of interest, the encoding parameter k being composed of a plurality of pixels that have already undergone Golomb-Rice encoding.

[0094] 8 is a diagram showing a block in the first embodiment. A block consists of one pixel in the row direction (=up and down direction) and 16 pixels in the column direction (left and right direction). The pixels are acquired in order from left to right within the block of interest. The order of the blocks moves from top to bottom in the leftmost column, then moves sequentially to the right column, and repeats this process of moving from top to bottom.

[0095] FIG. 9 is a diagram showing a block (source block) for which an encoding parameter k used by a target block is calculated in the first embodiment.

[0096] 9(a), when the block of interest is not located at the top in the row direction (the beginning in the row direction), the source block is the block one block above. Therefore, when the block of interest is not located at the top in the row direction (the beginning in the row direction), the encoding unit 16 performs Golomb-Rice encoding on all pixels in the block of interest based on the encoding parameter k calculated using the blocks adjacent to the block of interest in the row direction, which are composed of a plurality of pixels that have already been Golomb-Rice encoded.

[0097] 9(b), when the block of interest is located at the top in the row direction (the beginning of the row direction), the source block is the block located at the top of the previous column. Therefore, when the block of interest is located at the top in the row direction (the beginning of the row direction), the encoding unit 16 performs Golomb-Rice encoding on all pixels in the block of interest based on the encoding parameter k calculated using the blocks adjacent to the block of interest in the column direction, which are composed of a plurality of pixels that have already been Golomb-Rice-coded.

[0098] When the block of interest is located at the top in the row direction (the beginning in the row direction), the coding parameter k may be set to a predetermined initial value.

[0099] (Image Decoding Device) FIG. 10 illustrates a configuration of an image decoding device 2 according to an embodiment.

[0100] The image decoding device 2 includes an image input unit 20 , a decoding unit 26 , an image prediction unit 22 , an image restoration unit 24 , a parameter setting unit 28 , and an image scanning unit 29 .

[0101] The image input unit 20 acquires a pixel value S of a pixel of an encoded image. The decoding unit 26 performs Golomb-Rice decoding on the Golomb-Rice encoded data, which is the pixel value of the pixel of the encoded image, for the pixel of the encoded image to generate a symbol SB. The decoding unit 26 performs Golomb-Rice decoding on all pixels in the block of interest, based on the encoding parameter k calculated using a block consisting of a plurality of pixels that have already been Golomb-Rice decoded.

[0102] The parameter setting unit 28 sets parameters k, M, THa, and THb. The parameter k is an encoding parameter. The parameters THa and THb are an upper threshold and a lower threshold, respectively. The parameter M represents the number of data in a block determined to belong to group 0 of the Golomb-Rice encoding table. Here, the data is Golomb-Rice encoded data.

[0103] After the decoding unit 26 has completed Golomb-Rice decoding for all pixels in the block, the parameter setting unit 28 updates the encoding parameter k based on the Golomb-Rice encoded data for all pixels in the block.

[0104] The parameter setting unit 18 decreases the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belong to group 0 is equal to or greater than an upper threshold, and increases the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belong to group 0 is equal to or less than a lower threshold.

[0105] The image prediction unit 22 generates a predicted value P of the pixel of interest. For example, the image prediction unit 22 calculates the predicted value P of the pixel of interest using the restored surrounding pixels a, b, and c according to the following formula. The pixel values ​​of the restored pixels a, b, and c are A, B, and C. When the order of acquisition of the pixels of the encoded image is the raster order, the pixel a can be the pixel immediately to the left of the pixel of interest, the pixel b can be the pixel immediately above the pixel of interest, and the pixel c can be the pixel to the upper left of the pixel of interest.

[0106] P = min(A,B) (when max(A,B) ≤ C) (1) P = max(A,B) (when min(A,B) ≥ C) (2) P = A + BC (min(A,B) <C<max(A,B)···(3) The image restoration unit 24 generates an error value E from the decoded symbol SB. The image restoration unit 24 restores the pixel value S (=P+E) of the pixel of interest in the original image.

[0107] The image scanning unit 29 moves the block of interest and the pixel of interest within the block of interest by scanning the encoded image in the same order as that used for encoding.

[0108] 11 is a flowchart showing the procedure of image decoding according to the embodiment. The processing of this flowchart may be realized by a computer executing an image decoding program.

[0109] In step S401, the parameter setting unit 28 initializes the parameters k, THa, and THb. The encoding parameter k is set to a predetermined initial value. k, THa, and THb are set to the same values ​​as those at the time of encoding.

[0110] In step S402, the parameter setting unit 18 initializes a parameter M (= the number of Golomb-Rice encoded data in a block determined to belong to group 0 in the Golomb-Rice encoding table) to 0.

[0111] In step S403, the image input unit 10 obtains the pixel value of a pixel of interest in the encoded image.

[0112] In step S404, if the pixel value of the pixel of interest in the encoded image belongs to group 0 of the Golomb-Rice encoding table, the process proceeds to step S405, and if the pixel value of the pixel of interest in the encoded image does not belong to group 0 of the Golomb-Rice encoding table, the process proceeds to step S406.

[0113] In step S405, the parameter setting unit 28 increments M by 1. After that, the process proceeds to step S406.

[0114] In step S406, the decoding unit 26 performs Golomb-Rice decoding on the pixel value of the pixel of interest in the encoded image using the currently set k to generate the symbol SB.

[0115] In step S407, the image prediction unit 22 generates a predicted value P of the pixel of interest in the original image.

[0116] In step S408, the image restoration unit 24 generates an error value E (signed data) from the decoded symbol SB (unsigned data). Specifically, when the decoded symbol SB is an even number, the image restoration unit 24 sets SB / 2 as the error value E, and when the decoded symbol SB is an odd number, the image restoration unit 24 sets −(SB+1) / 2 as the error value E. The image restoration unit 24 restores the pixel value S (=P+E) of the pixel of interest in the original image.

[0117] In step S409, if acquisition of pixel values ​​of all pixels in the block of interest is completed, the process proceeds to step S411. If acquisition of pixel values ​​of all pixels in the block of interest is not completed, the process proceeds to step S410.

[0118] In step S41, the image scanning unit 29 moves the pixel of interest in the block of interest by scanning the encoded image in a predetermined order (=the same scanning order as in encoding). After that, the process proceeds to step S403.

[0119] In step S411, if M is equal to or greater than the upper threshold THo, the process proceeds to step S412, and if M is less than the upper threshold THo, the process proceeds to step S413.

[0120] In step S412, parameter setting unit 28 decreases k by 1. As a result, when the ratio of elements belonging to group 0 is large, the ratio of elements belonging to group 0 can be brought closer to a desirable value (for example, 50%) by decreasing k. Then, the process proceeds to step S415.

[0121] In step S413, if M is equal to or smaller than the lower threshold THb, the process proceeds to step S414, and if M exceeds the lower threshold THb, the process proceeds to step S415.

[0122] In step S414, parameter setting unit 28 increases k by 1. In this way, when the ratio of elements belonging to group 0 is small, it is possible to bring the ratio of elements belonging to group 0 closer to a desirable value (for example, 50%) by increasing k. Then, the process proceeds to step S415.

[0123] In step S415, if acquisition of pixel values ​​of all pixels of the encoded image has not been completed, the process proceeds to step S416, and if acquisition of pixel values ​​of all pixels of the encoded image has been completed, the process ends.

[0124] In step S416, the image scanning unit 29 moves the block of interest by scanning the encoded image in a predetermined scanning order (= the same scanning order as used during encoding). The image scanning unit 29 sets the first pixel of the block of interest as the pixel of interest of the block of interest.

[0125] (source of parameter k) The decoding unit 26 is made up of a plurality of pixels that have already undergone Golomb-Rice coding, and performs Golomb-Rice decoding on all pixels in the block of interest based on the coding parameter k calculated using blocks adjacent to the block of interest.

[0126] As shown in Fig. 8, a block consists of one pixel in the row direction (=up and down direction) and 16 pixels in the column direction (left and right direction). The pixels are acquired in order from left to right within the block of interest. The order of the block moves from top to bottom of the leftmost column, then moves sequentially to the right column, and repeats this process from top to bottom.

[0127] 9(a), when the block of interest is not at the top in the row direction (the beginning in the row direction), the source block is the block one block above. Therefore, when the block of interest is not at the top in the row direction (the beginning in the row direction), the decoding unit 26 performs Golomb-Rice decoding on all pixels in the block of interest based on the coding parameter k, which is composed of a plurality of pixels that have already been Golomb-Rice decoded and is calculated using blocks adjacent to the block of interest in the row direction.

[0128] As shown in FIG. 9(b), when the block of interest is located at the top of the row direction (the beginning of the row direction), the source block is the block located at the top of the previous column. Therefore, the decoding unit 26 performs Golomb-Rice decoding on all pixels in the block of interest based on the coding parameter k calculated using the blocks adjacent to the block of interest in the column direction and consisting of a plurality of pixels that have already been Golomb-Rice decoded. Note that when the block of interest is located at the top of the row direction (the beginning of the row direction), the coding parameter k may be set to a predetermined initial value.

[0129] (Experimental Results) An experiment was conducted to compare the compression ratio and calculation time of image coding by the JPEG-LS method and image coding by this embodiment using eight natural images included in the JIS X 9201:2001 standard and eight natural images included in the JIS X 9204 2004 standard. In the JPEG-LS method, RESET=16 was used, and in this embodiment, a block consisting of one pixel in the row direction and 16 pixels in the column direction was used. In this embodiment, the coding parameter k was used as shown in Figs. 9(a) and (b). The experiment showed that the image coding by this embodiment has a compression ratio higher than that by the JPEG-LS method by about 1% on average. It was shown that the image coding and image decoding by this embodiment have a calculation time shorter than that by the JPEG-LS method by about 5% on average.

[0130] As described above, according to this embodiment, the process of updating the coding parameter k is executed for each block, not for each pixel, so that the amount of calculation can be reduced.

[0131] [Second embodiment] (source of parameter k) 12 is a diagram showing a block in the second embodiment. A block consists of one pixel in the row direction (up and down direction) and 16 pixels in the column direction (left and right direction). The pixels are acquired in order from left to right within a block of interest. The order of the blocks moves from left to right in the top row, then moves to the rows below, and repeats this process from left to right.

[0132] FIG. 13 is a diagram showing a block (source block) for which an encoding parameter k used by a target block is calculated in the second embodiment.

[0133] As shown in FIG. 13(a), when the block of interest is not located at the leftmost position in the column direction (the beginning of the column direction), the source block is the block one block to the left. Therefore, when the block of interest is not located at the leftmost position in the column direction (the beginning of the column direction), the encoding unit 16 performs Golomb-Rice encoding on all pixels in the block of interest based on the encoding parameter k calculated using the blocks adjacent to the block of interest in the column direction and consisting of a plurality of pixels that have already been Golomb-Rice encoded. When the block of interest is not located at the leftmost position in the column direction (the beginning of the column direction), the decoding unit 26 performs Golomb-Rice decoding on all pixels in the block of interest based on the encoding parameter k calculated using the blocks adjacent to the block of interest in the column direction and consisting of a plurality of pixels that have already been Golomb-Rice decoded.

[0134] As shown in FIG. 13(b), when the block of interest is located at the leftmost position in the column direction (the beginning of the column direction), the source block is the block located at the leftmost position in the previous row (i.e., the block one block above). Therefore, when the block of interest is located at the leftmost position in the column direction (the beginning of the column direction), the encoding unit 16 performs Golomb-Rice encoding on all pixels in the block of interest based on the encoding parameter k calculated using a block adjacent to the block of interest in the row direction and consisting of a plurality of pixels that have already been Golomb-Rice encoded. When the block of interest is located at the leftmost position in the column direction (the beginning of the column direction), the decoding unit 26 performs Golomb-Rice decoding on all pixels in the block of interest based on the encoding parameter k calculated using a block adjacent to the block of interest in the row direction and consisting of a plurality of pixels that have already been Golomb-Rice decoded.

[0135] When the block of interest is located at the leftmost position in the column direction (at the beginning of the column direction), the coding parameter k may be set to a predetermined initial value.

[0136] This embodiment has the following advantages. For example, when the image coding device and image decoding device described in the embodiment are implemented as hardware and an image input from a camera or an image sensor is directly processed, the input order of pixels is basically raster scan. That is, the input order of pixels is scanning from left to right, and when scanning of the number of horizontal pixels is completed, the pixel moves to the pixel below, and scanning from left to right is repeated. That is, since the coding order and decoding order of this embodiment are also raster scan order, there is no need to use a large capacity memory. Also, for example, when the image coding device and image decoding device described in the embodiment are implemented as software (program), image data of one frame is basically stored in memory in raster scan order. That is, if processing is performed in raster scan order as in this embodiment, it is possible to process in the order of consecutive addresses, and therefore it is possible to process faster than the order described in the first embodiment.

[0137] [Third embodiment] (source of parameter k) 14 is a diagram showing a block in the third embodiment. A block consists of 16 pixels in the row direction (up and down) and 1 pixel in the column direction (left and right). The pixels are acquired in order from top to bottom within a block of interest. The order of the blocks moves from left to right in the top row, then moves to the rows below, and repeats this process.

[0138] FIG. 15 is a diagram showing a block (source block) for which an encoding parameter k used by a target block is calculated in the third embodiment.

[0139] As shown in FIG. 15(a), when the block of interest is not located at the leftmost position in the column direction (the beginning of the column direction), the source block is the block one block to the left. Therefore, when the block of interest is not located at the leftmost position in the column direction (the beginning of the column direction), the encoding unit 16 performs Golomb-Rice encoding on all pixels in the block of interest based on the encoding parameter k calculated using the blocks adjacent to the block of interest in the column direction and consisting of a plurality of pixels that have already been Golomb-Rice encoded. When the block of interest is not located at the leftmost position in the column direction (the beginning of the column direction), the decoding unit 26 performs Golomb-Rice decoding on all pixels in the block of interest based on the encoding parameter k calculated using the blocks adjacent to the block of interest in the column direction and consisting of a plurality of pixels that have already been Golomb-Rice decoded.

[0140] As shown in FIG. 15(b), when the block of interest is located at the leftmost position in the column direction (the beginning of the column direction), the source block is the block located at the leftmost position in the previous row. Therefore, when the block of interest is located at the leftmost position in the column direction (the beginning of the column direction), the encoding unit 16 performs Golomb-Rice encoding on all pixels in the block of interest based on the encoding parameter k calculated using a block adjacent to the block of interest in the row direction and consisting of a plurality of pixels that have already been Golomb-Rice encoded. When the block of interest is located at the leftmost position in the column direction (the beginning of the column direction), the decoding unit 26 performs Golomb-Rice decoding on all pixels in the block of interest based on the encoding parameter k calculated using a block adjacent to the block of interest in the row direction and consisting of a plurality of pixels that have already been Golomb-Rice decoded.

[0141] When the block of interest is located at the leftmost position in the column direction (at the beginning of the column direction), the coding parameter k may be set to a predetermined initial value.

[0142] [Fourth embodiment] FIG. 16 is a diagram showing a block (source block) for which the coding parameter k used by the target block is calculated in the fourth embodiment.

[0143] When the block of interest is not located at the top of the row (the beginning of the row) and not located at the leftmost column (the beginning of the column), the average value of the coding parameter k calculated in the block above the block of interest and the coding parameter k calculated in the block to the left of the block of interest is used for the block of interest.

[0144] Therefore, when the block of interest is not located at the top in the row direction (the beginning in the row direction) and not located at the leftmost in the column direction (the beginning in the column direction), the encoding unit 16 performs Golomb-Rice encoding on all pixels in the block of interest based on the encoding parameter k calculated using a block consisting of a plurality of pixels that have already been Golomb-Rice encoded and adjacent to the block of interest in the row direction, and the average value of the encoding parameter k calculated using a block consisting of a plurality of pixels that have already been Golomb-Rice encoded and adjacent to the block of interest in the column direction.

[0145] When the block of interest is not located at the top in the row direction (the beginning in the row direction) and not located at the leftmost in the column direction (the beginning in the column direction), decoding unit 26 performs Golomb-Rice decoding on all pixels in the block of interest based on an encoding parameter k calculated using a block consisting of a plurality of pixels for which Golomb-Rice decoding has already been completed and adjacent to the block of interest in the row direction, and an average value of the encoding parameter k calculated using a block consisting of a plurality of pixels for which Golomb-Rice decoding has already been completed and adjacent to the block of interest in the column direction.

[0146] When a block of interest is located at the top in the row direction (the beginning of the row direction) and not at the leftmost in the column direction (the beginning of the column direction), the encoding unit 16 performs Golomb-Rice encoding on all pixels in the block of interest based on an encoding parameter k calculated using a block adjacent to the block of interest in the column direction and consisting of a plurality of pixels that have already undergone Golomb-Rice encoding.

[0147] When the block of interest is located at the top in the row direction (the beginning of the row direction) and not at the leftmost in the column direction (the beginning of the column direction), the decoding unit 26 performs Golomb-Rice decoding on all pixels in the block of interest based on an encoding parameter k calculated using a block adjacent to the block of interest in the column direction and consisting of a plurality of pixels that have already undergone Golomb-Rice decoding.

[0148] When the block of interest is not located at the top in the row direction (the beginning in the row direction) and is located at the leftmost in the column direction (the beginning in the column direction), the encoding unit 16 performs Golomb-Rice encoding on all pixels in the block of interest, based on an encoding parameter k calculated using a block adjacent to the block of interest in the row direction and consisting of a plurality of pixels that have already undergone Golomb-Rice encoding.

[0149] When the block of interest is not located at the top in the row direction (the beginning in the row direction) and is located at the leftmost in the column direction (the beginning in the column direction), the decoding unit 26 performs Golomb-Rice decoding on all pixels in the block of interest based on the encoding parameter k calculated using the blocks adjacent to the block of interest in the row direction and consisting of a plurality of pixels that have already undergone Golomb-Rice decoding.

[0150] (Internal configuration of image encoding device and image decoding device) FIG. 17 illustrates the internal configuration of an image encoding device and an image decoding device.

[0151] 17, the image encoding device or the image decoding device may be configured by a computer. The computer includes a bus 3300, a CPU (Central Processing Unit) 3301, a ROM (Read Only Memory) 3302, a RAM (Random Access Memory) 3303, a HDD (Hard Disk Drive) 3304, a DVD drive 3306 connected to a DVD (Digital Versatile Disk) 3307, a network I / F 3309, a keyboard 3310, a mouse 3311, a memory port 3312 connected to a removable memory 3313, and a display 3308.

[0152] Input from the user is accepted through a keyboard 3310 and a mouse 3311. An image encoding program or an image decoding program for realizing the functions described in the above-mentioned embodiments on a computer is transferred from the DVD 3307, the removable memory 3313, and the network I / F 3309 to the HDD 3304.

[0153] The image encoding device 1 of Fig. 1 is configured by the computer (CPU3301) executing an image encoding program. In other words, the image encoding program causes the computer to function as each component of the image encoding device 1 of Fig. 1 (image input unit 10, image prediction unit 12, prediction error generation unit 14, encoding unit 16, parameter setting unit 18, and image scanning unit 19). The image decoding device 2 of Fig. 10 is configured by the computer (CPU3301) executing an image decoding program. In other words, the image decoding program causes the computer to function as each component of the image decoding device 2 of Fig. 10 (image input unit 20, decoding unit 26, parameter setting unit 28, image prediction unit 22, and image restoration unit 24).

[0154] The ROM 3302 stores, for example, a startup program, etc. The RAM 3303 stores a program being executed, its working data, etc. The network I / F 3309 is connected to the Internet 3400 and can acquire data on the Web 1000.

[0155] The embodiments disclosed herein should be considered to be illustrative and not restrictive in all respects. The scope of the present disclosure is defined by the claims, not the above description, and is intended to include all modifications within the meaning and scope of the claims. [Explanation of symbols]

[0156] 1 image encoding device, 2 image decoding device, 10, 20 image input unit, 11 symbol generation unit, 12, 22 image prediction unit, 14 prediction error generation unit, 16 encoding unit, 18, 28 parameter setting unit, 19, 29 image scanning unit, 24 image restoration unit, 26 decoding unit, 3300 bus, 3302 ROM, 3303 RAM, 3306 drive, 3308 display, 3310 keyboard, 3311 mouse, 3312 memory port, 3313 removable memory, 3400 Internet, 3309 network I / F.

Claims

1. an encoding unit that performs Golomb-Rice encoding on symbols generated from pixel values ​​of pixels of an original image to generate Golomb-Rice encoded data; a parameter setting unit that updates an encoding parameter k based on Golomb-Rice encoded data for all pixels in the block after the encoding unit has completed Golomb-Rice encoding for all pixels in the block; the encoding unit performs Golomb-Rice encoding on all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice encoded; an image encoding device, wherein the parameter setting unit decreases an encoding parameter k when the number of Golomb-Rice encoded data for all pixels in a block that belongs to a predetermined group is equal to or greater than an upper threshold, and increases the encoding parameter k when the number of data belonging to the predetermined group is equal to or less than a lower threshold, and the code length of the Golomb-Rice encoded data belonging to the predetermined group is a minimum.

2. 2. The image encoding device according to claim 1, wherein the encoding section generates the symbol from an error value between a pixel value of the pixel of the original image and a predicted value of the pixel of the original image, and performs Golomb-Rice encoding on the symbol.

3. 3. The image encoding device according to claim 1, wherein a prefix of the Golomb-Rice encoded data belonging to the predetermined group is 1 bit.

4. The image encoding device according to any one of claims 1 to 3, wherein the encoding unit is configured of a plurality of pixels that have already completed Golomb-Rice encoding, and performs Golomb-Rice encoding on all pixels in the block of interest based on an encoding parameter k calculated using at least one block adjacent to the block of interest.

5. An encoding unit that performs Golomb-Rice encoding on symbols generated from pixel values ​​of pixels of an original image to generate Golomb-Rice encoded data; a parameter setting unit that updates an encoding parameter k based on Golomb-Rice encoded data for all pixels in the block after the encoding unit has completed Golomb-Rice encoding for all pixels in the block; the encoding unit performs Golomb-Rice encoding on all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice encoded; the encoding unit performs Golomb-Rice encoding on all pixels in the block of interest based on an encoding parameter k calculated using at least one block adjacent to the block of interest, the encoding parameter k being composed of a plurality of pixels that have already been Golomb-Rice-encoded; The block is a multi-row and a multi-column block, an image encoding device in which, when the block of interest is not at the beginning of a row and not at the beginning of a column, the encoding unit performs Golomb-Rice encoding on all pixels in the block of interest based on an encoding parameter k calculated using a block consisting of a plurality of pixels that have already been Golomb-Rice encoded and that is adjacent to the block of interest in the row direction, and an average value of the encoding parameter k calculated using a block consisting of a plurality of pixels that have already been Golomb-Rice encoded and that is adjacent to the block of interest in the column direction.

6. a decoding unit that performs Golomb-Rice decoding on pixels of an encoded image by Golomb-Rice decoding Golomb-Rice encoded data that is a pixel value of the pixel of the encoded image; a parameter setting unit that updates an encoding parameter k based on Golomb-Rice encoded data for all pixels in the block after the decoding unit has completed Golomb-Rice decoding for all pixels in the block; the decoding unit performs Golomb-Rice decoding on all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice decoded; the parameter setting unit decreases the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in a block that belongs to a predetermined group is equal to or greater than an upper threshold, and increases the encoding parameter k when the number of data belonging to the predetermined group is equal to or less than a lower threshold, and the code length of the Golomb-Rice encoded data belonging to the predetermined group is a minimum.

7. 7. The image decoding device according to claim 6, wherein a prefix of the Golomb-Rice coded data belonging to the determined group is 1 bit.

8. 8. The image decoding device according to claim 6, wherein the decoding unit performs Golomb-Rice decoding on all pixels in the block of interest based on an encoding parameter k calculated using at least one block adjacent to the block of interest, the encoding parameter k being composed of a plurality of pixels for which Golomb-Rice decoding has already been completed.

9. A decoding unit that performs Golomb-Rice decoding on pixels of an encoded image by Golomb-Rice decoding Golomb-Rice encoded data that is a pixel value of the pixel of the encoded image; a parameter setting unit that updates an encoding parameter k based on Golomb-Rice encoded data for all pixels in the block after the decoding unit has completed Golomb-Rice decoding for all pixels in the block; the decoding unit performs Golomb-Rice decoding on all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice decoded; the decoding unit performs Golomb-Rice decoding on all pixels in the block of interest based on an encoding parameter k calculated using at least one block adjacent to the block of interest, the encoding parameter k being composed of a plurality of pixels that have already been Golomb-Rice decoded; The block is a multi-row and a multi-column block, the decoding unit, when the block of interest is not at the beginning of a row and not at the beginning of a column, performs Golomb-Rice decoding on all pixels in the block of interest based on an average value of an encoding parameter k calculated using a block consisting of a plurality of pixels for which Golomb-Rice decoding has already been completed and which is adjacent to the block of interest in the row direction, and an encoding parameter k calculated using a block consisting of a plurality of pixels for which Golomb-Rice decoding has already been completed and which is adjacent to the block of interest in the column direction.

10. Golomb-Rice encoding symbols generated from pixel values ​​of pixels of the original image to generate Golomb-Rice encoded data; after completion of the Golomb-Rice coding for all pixels in the block, updating the coding parameter k based on the Golomb-Rice coded data for all pixels in the block; the step of generating the Golomb-Rice encoded data includes a step of Golomb-Rice encoding all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice encoded; The step of updating the encoding parameter k includes a step of decreasing the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belong to a predetermined group is equal to or greater than an upper threshold, and increasing the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belong to the predetermined group is equal to or less than a lower threshold, and a step of increasing the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belong to the predetermined group is equal to or less than a lower threshold, and a code length of the Golomb-Rice encoded data that belongs to the predetermined group is a minimum.

11. The image encoding method described in claim 10, wherein the step of generating the Golomb-Rice encoded data includes a step of generating the symbol from an error value between a pixel value of a pixel of the original image and a predicted value of a pixel of the original image, and Golomb-Rice encoding the symbol.

12. A step of Golomb-Rice encoding symbols generated from pixel values ​​of pixels of an original image to generate Golomb-Rice encoded data; after completion of the Golomb-Rice coding for all pixels in the block, updating the coding parameter k based on the Golomb-Rice coded data for all pixels in the block; The step of generating the Golomb-Rice encoded data includes performing Golomb-Rice encoding on all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice encoded; The step of generating the Golomb-Rice encoded data includes a step of Golomb-Rice encoding all pixels in the block of interest based on an encoding parameter k calculated using at least one block adjacent to the block of interest, the Golomb-Rice encoded data being composed of a plurality of pixels that have already been Golomb-Rice encoded; The block is a multi-row and a multi-column block, the step of generating the Golomb-Rice coded data includes, when the block of interest is not at the beginning of a row and not at the beginning of a column, a step of Golomb-Rice coding all of the pixels in the block of interest based on an average value of an coding parameter k calculated using a block consisting of a plurality of pixels for which Golomb-Rice coding has already been completed and adjacent to the block of interest in the row direction, and an coding parameter k calculated using a block consisting of a plurality of pixels for which Golomb-Rice coding has already been completed and adjacent to the block of interest in the column direction.

13. Golomb-Rice decoding, for pixels of an encoded image, Golomb-Rice encoded data that is a pixel value of the pixel of the encoded image; after completing the Golomb-Rice decoding for all pixels in the block, updating the encoding parameter k based on the Golomb-Rice encoded data for all pixels in the block; the step of Golomb-Rice decoding includes a step of Golomb-Rice decoding all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice decoded; The Golomb-Rice decoding step includes a step of decreasing an encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belongs to a predetermined group is equal to or greater than an upper threshold, and increasing the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belongs to the predetermined group is equal to or less than a lower threshold, and a step of increasing the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in the block that belongs to the predetermined group is equal to or less than a lower threshold, and a code length of the Golomb-Rice encoded data that belongs to the predetermined group is a minimum.

14. A step of Golomb-Rice decoding, for a pixel of an encoded image, Golomb-Rice encoded data which is a pixel value of the pixel of the encoded image; after completing the Golomb-Rice decoding for all pixels in the block, updating the encoding parameter k based on the Golomb-Rice encoded data for all pixels in the block; the step of Golomb-Rice decoding includes a step of Golomb-Rice decoding all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice decoded; The step of Golomb-Rice decoding includes a step of Golomb-Rice decoding all pixels in the block of interest based on an encoding parameter k calculated using at least one block adjacent to the block of interest, the encoding parameter k being composed of a plurality of pixels that have already been Golomb-Rice decoded, The block is a multi-row and a multi-column block, an image decoding method in which, when the block of interest is not at the beginning of a row and not at the beginning of a column, the Golomb-Rice decoding step performs Golomb-Rice decoding on all pixels in the block of interest based on an average value of an encoding parameter k calculated using a block consisting of a plurality of pixels for which Golomb-Rice decoding has already been completed and adjacent to the block of interest in the row direction, and an encoding parameter k calculated using a block consisting of a plurality of pixels for which Golomb-Rice decoding has already been completed and adjacent to the block of interest in the column direction.

15. Computer, an encoding unit that performs Golomb-Rice encoding on symbols generated from pixel values ​​of pixels of an original image to generate Golomb-Rice encoded data; After the encoding unit has completed Golomb-Rice encoding for all pixels in the block, the encoding unit functions as a parameter setting unit that updates an encoding parameter k based on Golomb-Rice encoded data for all pixels in the block; the encoding unit performs Golomb-Rice encoding on all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice encoded; The parameter setting unit decreases an encoding parameter k when the number of Golomb-Rice encoded data for all pixels in a block that belongs to a predetermined group is equal to or greater than an upper threshold, and increases the encoding parameter k when the number of Golomb-Rice encoded data for all pixels in a block that belongs to the predetermined group is equal to or less than a lower threshold, and the code length of the Golomb-Rice encoded data that belongs to the predetermined group is a minimum.

16. 16. The image encoding program according to claim 15, wherein the encoding unit generates the symbol from an error value between a pixel value of the pixel of the original image and a predicted value of the pixel of the original image, and performs Golomb-Rice encoding on the symbol.

17. A computer comprising: an encoding unit that performs Golomb-Rice encoding on symbols generated from pixel values ​​of pixels of an original image to generate Golomb-Rice encoded data; After the encoding unit has completed Golomb-Rice encoding for all pixels in the block, the encoding unit functions as a parameter setting unit that updates an encoding parameter k based on Golomb-Rice encoded data for all pixels in the block; the encoding unit performs Golomb-Rice encoding on all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice encoded; the encoding unit performs Golomb-Rice encoding on all pixels in the block of interest based on an encoding parameter k calculated using at least one block adjacent to the block of interest, the encoding parameter k being composed of a plurality of pixels that have already been Golomb-Rice-encoded; The block is a multi-row and a multi-column block, and when the block of interest is not at the beginning of a row and not at the beginning of a column, the encoding unit performs Golomb-Rice encoding on all pixels in the block of interest based on an average value of an encoding parameter k calculated using a block consisting of a plurality of pixels that have already been Golomb-Rice encoded and that is adjacent to the block of interest in the row direction, and an encoding parameter k calculated using a block consisting of a plurality of pixels that have already been Golomb-Rice encoded and that is adjacent to the block of interest in the column direction.

18. Computer, a decoding unit that performs Golomb-Rice decoding on pixels of an encoded image by Golomb-Rice decoding Golomb-Rice encoded data that is a pixel value of the pixel of the encoded image; After the decoding unit has completed the Golomb-Rice decoding for all pixels in the block, the parameter setting unit updates an encoding parameter k based on the Golomb-Rice encoded data for all pixels in the block; the decoding unit performs Golomb-Rice decoding on all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice decoded; The parameter setting unit decreases an encoding parameter k when the number of Golomb-Rice encoded data for all pixels in a block that belongs to a predetermined group is equal to or greater than an upper threshold, and increases the encoding parameter k when the number of data belonging to the predetermined group is equal to or less than a lower threshold, and the code length of the Golomb-Rice encoded data belonging to the predetermined group is a minimum.

19. A computer comprising: a decoding unit that performs Golomb-Rice decoding on pixels of an encoded image by Golomb-Rice decoding Golomb-Rice encoded data that is a pixel value of the pixel of the encoded image; After the decoding unit has completed the Golomb-Rice decoding for all pixels in the block, the parameter setting unit updates an encoding parameter k based on the Golomb-Rice encoded data for all pixels in the block; the decoding unit performs Golomb-Rice decoding on all pixels in a target block based on an encoding parameter k calculated using a block of pixels that has already been Golomb-Rice decoded; the decoding unit performs Golomb-Rice decoding on all pixels in the block of interest based on an encoding parameter k calculated using at least one block adjacent to the block of interest, the encoding parameter k being composed of a plurality of pixels that have already been Golomb-Rice decoded; The block is a multi-row and a multi-column block, the decoding unit, when the block of interest is not at the beginning of a row and not at the beginning of a column, performs Golomb-Rice decoding on all pixels in the block of interest based on an average value of an encoding parameter k calculated using a block consisting of a plurality of pixels for which Golomb-Rice decoding has already been completed and adjacent to the block of interest in the row direction, and an encoding parameter k calculated using a block consisting of a plurality of pixels for which Golomb-Rice decoding has already been completed and adjacent to the block of interest in the column direction.

Citation Information

Patent Citations

  • IEC14495-1

  • Coder and its method

    JP2000115770A

  • Image encoding device, decoding device, and control method thereof, and computer program and computer-readable storage medium

    JP2007251834A

  • Binarization scheme for intra-prediction residuals and improvement of intra-prediction in HEVC lossless coding

    JP2015517285A

  • Image encoding apparatus, control method, program, and storage medium

    JP2017085285A