The present invention provides an image encoding device that can balance encoding at a high compression ratio and restoration of a high-quality image by decoding in a short processing time. Compression mode determination means 3 determines a compression mode to be one of DPCM and PCM based on target pixel data inputted from a terminal 21 and predicted data calculated by a predetermined method. For the DPCM, DPCM compression means 5 compresses a difference value between the target pixel data and the predicted data to DPCM encoded data having a predetermined DPCM code length. For the PCM, PCM compression means 7 compresses the target pixel data to PCM encoded data having a PCM code length determined by PCM code length determination means 9. The PCM code length determination means 9 calculates the PCM code length for each piece of target pixel data such that a total of post-encoding code lengths becomes an allowable value or less in a unit of predetermined pixel group among the plurality of pixels. Tag/code output means 13 outputs the encoded data by adding a tag indicating whether the compression mode is the DPCM or the PCM to the encoded data.
Legal claims defining the scope of protection, as filed with the USPTO.
1. An image encoding device that performs encoding processing by compressing image data including pieces of pixel data of a plurality of pixels arrayed in a scanning sequence, the image encoding device comprising: compression mode determination means for determining a compression mode of target pixel data of the encoding processing to be one of DPCM and PCM based on the target pixel data and predicted data calculated by a predetermined method; DPCM compression means for compressing a difference value between the target pixel data and the predicted data to DPCM encoded data having a predetermined DPCM code length when the compression mode determination means determines the compression mode to be the DPCM; PCM compression means for compressing the target pixel data to PCM encoded data having an assigned PCM code length when the compression mode determination means determines the compression mode to be the PCM; PCM code length determination means for calculating the PCM code length for each piece of the target pixel data such that a total of post-encoding code lengths becomes an allowable value or less in a unit of predetermined pixel group among the plurality of pixels, and transmitting the PCM code length to the PCM compression means; and tag/code output means for producing and outputting output encoded data by adding a tag indicating whether the compression mode is the DPCM or the PCM according to the compression mode to the DPCM encoded data outputted from the DPCM compression means or the PCM encoded data outputted from the PCM compression means.
2. The image encoding device according to claim 1 , wherein, based on initial setting data including information on the number of pixels constituting the predetermined pixel group and the allowable value and progress data including information on the number of processed pixels in which encoding processing of pixel data is already completed among the pixels constituting the predetermined pixel group and a processed code length total that is a total of post-encoding code lengths of the processed pixels, the PCM code length determination means derives the number of unprocessed pixels at the time of processing among the number of pixels constituting the predetermined pixel group and a producible code length total, and determines the PCM code length by a maximum code length which is a maximum value of an identical code length in a case where a total code length of pixel data of the number of the unprocessed pixels encoded using the identical code length does not exceed the producible code length total.
3. The image encoding device according to claim 2 , wherein the predetermined pixel group is a plurality of pixels constituting one line in the image data, and the allowable value is a maximum value of a line memory.
4. The image encoding device according to claim 2 , wherein the predetermined pixel group is a plurality of pixels constituting one frame in the image data, and the allowable value is a maximum value of a frame memory.
5. The image encoding device according to claim 1 , wherein the PCM code length determination means is configured such that the PCM code length can be externally assigned, and is configured to output the assigned PCM code length to the PCM compression means when the PCM code length is assigned.
6. The image encoding device according to claim 1 , wherein, for each predetermined number of pixels of at least two pixels, the tag/code output means puts tags respectively corresponding to pixel data of the predetermined number of pixels on a head, and the DPCM encoded data or the PCM encoded data of the pixel data of each pixel on the lower bit side of the tags, and produces and outputs the output encoded data.
7. The image encoding device according to claim 2 , further comprising an initial setting data storage unit in which the initial setting data externally inputted is stored, wherein the initial setting data is configured to include information on the number of pixels constituting the predetermined pixel group, information on the allowable value, and information on the number of colors per pixel.
10. The image encoding device according to claim 2 , wherein the PCM code length determination means determines a value equal to the PCM code length of the most recent pixel data to be the PCM code length of the target pixel data based on information on the number of processed pixels included in the progress data, when the pixel of the target pixel data corresponds to an even-numbered pixel counting from a head pixel in the predetermined pixel group and when the compression mode of the most recent pixel data is the PCM.
12. An image encoding method for performing encoding processing by compressing image data including pieces of pixel data of a plurality of pixels arrayed in a scanning sequence, the image encoding method comprising: a compression mode determination step of determining a compression mode of target pixel data of the encoding processing to be one of DPCM and PCM based on the target pixel data and predicted data calculated by a predetermined method; a compression step of performing compression processing based on the compression mode of the DPCM or the PCM, the compression mode being determined in the compression mode determination step; and a tag-equipped encoded data generation step of producing and outputting output encoded data by adding a tag indicating whether the compression mode is the DPCM or the PCM to the data generated in the compression step, wherein the compression step is a step of compressing a difference value between the target pixel data and the predicted data to DPCM encoded data having a predetermined DPCM code length when the compression mode is determined to be the DPCM in the compression mode determination step, and of compressing the target pixel data to PCM encoded data having a PCM code length determined in a PCM code length determination step when the compression mode is determined to be the PCM, and the PCM code length determination step is a step of calculating the PCM code length for each piece of the target pixel data such that a total of post-encoding code lengths becomes an allowable value or less in a unit of predetermined pixel group among the plurality of pixels.
13. The image encoding method according to claim 12 , wherein the PCM code length determination step is a step of, based on initial setting data including information on the number of pixels constituting the predetermined pixel group and the allowable value and progress data including information on the number of processed pixels in which encoding processing of pixel data is already completed among the pixels constituting the predetermined pixel group and a processed code length total that is of a total of post-encoding code lengths of the processed pixels, deriving the number of unprocessed pixels at the time of processing among the number of pixels constituting the predetermined pixel group and a producible code length total, and determining the PCM code length by a maximum code length which is a maximum value of an identical code length in a case where a total code length of pixel data of the number of the unprocessed pixels encoded using the identical code length does not exceed the producible code length total.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
September 26, 2011
December 9, 2014
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.