# US 2006/0050974 A1 · Image encoding apparatus and method, computer program, and computer-readable storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2006/0050974 A1
- Document ID: US20060050974A1
- Status: Published application
- Kind: A1
- Application number: 11/220,536
- Filed: 2005-09-08
- Published: 2006-03-09
- Earliest claimed: 2004-09-08
- Assignees: Canon Kabushiki Kaisha
- Inventors: Hirokazu Tamura; Naoki Ito
- Web page: https://patentgrep.com/patent/US20060050974A1

## CPC

- H04N 19/436: using parallelised computational arrangements
- H04N 19/12: Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
- H04N 19/124: Quantisation
- H04N 19/15: by monitoring actual compressed data size at the memory before deciding storage at the transmission buffer
- H04N 19/152: by measuring the fullness of the transmission buffer
- H04N 19/172: the region being a picture, frame or field
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/192: the adaptation method, adaptation tool or adaptation type being iterative or recursive
- H04N 19/423: characterised by memory arrangements (H04N19/433 takes precedence)
- H04N 19/60: using transform coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

According to this invention, degradation of the image quality of a decoded image is reduced while losslessly encoded data and lossily encoded data coexist. For this purpose, a first encoding unit performs JPEG encoding for each pixel block, and a second encoding unit performs JPEG-LS encoding. Letting Lx be the code length of encoded data generated by the first encoding unit and Ly be the code length of encoded data generated by the second encoding unit, an encoding sequence control unit selects one of the two encoded data and stores the selected data in a first memory in accordance with whether Lx and Ly satisfy a predetermined non-linear boundary function f( ): Ly≧a f(Lx). At this time, when the axis of abscissas represents the code length of the encoded data generated by the second encoding unit and the axis of ordinates represents that of the encoded data generated by the first encoding unit, the non-linear boundary function f( ) has a curved portion at the two code lengths.

## Claims

### Claim 1

An image encoding apparatus which encodes image data for each pixel block, comprising:
first encoding means for lossily encoding input image data for each pixel block to generate encoded data;
second encoding means for losslessly encoding input image data for the pixel block to generate encoded data; and
selection means for, letting Lx be a code length of the encoded data generated by said second encoding means and Ly be a code length of the encoded data generated by said first encoding means, if Lx and Ly satisfy a predetermined non-linear boundary function f( ):
Ly≧f(Lx)
selecting and outputting the encoded data generated by said second encoding means, and if Lx and Ly do not satisfy the function, selecting and outputting the encoded data generated by said first encoding means.

### Claim 2 (depends on 1)

The apparatus according to claim 1, wherein the predetermined code length is positioned near a maximum possible value of Lx when an image area which has a gradation attribute and smoothly changes in density is encoded by said second encoding means.

### Claim 3 (depends on 1)

The apparatus according to claim 1, wherein the non-linear boundary function f( ) is formed from a look-up table memory which receives the code lengths Lx and Ly as addresses and stores data representing which of encoded data is to be selected.

### Claim 4 (depends on 1)

The apparatus according to claim 1, wherein said second encoding means includes JPEG-LS encoding means, and said first encoding means includes JPEG encoding means for generating encoded data at a different compression ratio in accordance with a supplied quantization matrix table.

### Claim 5 (depends on 4)

The apparatus according to claim 4, further comprising:
initialization means for setting an initial matrix table Q0 for said first encoding means at a start of encoding one page;
first storage means for storing encoded data output from said selection means;
monitoring means for monitoring an encoded data amount in said first storage means; and
control means for, when said monitoring means determines that the encoded data amount becomes not less than a predetermined data amount, (a) discarding the encoded data in said first storage means, and (b) updating a parameter from a quantization matrix table Qi currently set for said first encoding means to a quantization matrix table Qi+1.

### Claim 6 (depends on 5)

The apparatus according to claim 5, wherein said control means includes means for, after the quantization matrix table is updated, inputting image data again and resuming encoding.

### Claim 7 (depends on 5)

The apparatus according to claim 5, further comprising:
second storage means for storing data losslessly encoded by said second encoding means; and
re-encoding means for decoding the encoded data in said second storage means, re-encoding the decoded data in accordance with a supplied parameter to generate lossily encoded data, selecting one of the encoded data after re-encoding and the losslessly encoded data before re-encoding in accordance with the non-linear boundary function f( ), and storing the selected encoded data in said first storage means,
wherein when said monitoring means determines that an encoded data amount in said first storage means becomes not less than a predetermined data amount, said control means (c) sets a parameter Qi for said re-encoding means to cause said re-encoding means to generate encoded data before the encoded data amount becomes not less than the predetermined data amount, in addition to (a) and (b).

### Claim 8

An image encoding method of encoding image data for each pixel block, comprising:
a first encoding step of lossily encoding input image data for each pixel block to generate encoded data;
a second encoding step of losslessly encoding input image data for the pixel block to generate encoded data; and
a selection step of, letting Lx be a code length of the encoded data generated in the second encoding step and Ly be a code length of the encoded data generated in the first encoding step, when Lx and Ly satisfy a predetermined non-linear boundary function f( ):
Ly≧f(Lx)
selecting and outputting the encoded data generated in the second encoding step, and when Lx and Ly do not satisfy the function, selecting and outputting the encoded data generated in the first encoding step.

### Claim 9

A computer program which is loaded and executed by a computer and functions as an image encoding apparatus for encoding image data for each pixel block, functioning as:
first encoding means for lossily encoding input image data for each pixel block to generate encoded data;
second encoding means for losslessly encoding input image data for the pixel block to generate encoded data; and
selection means for, letting Lx be a code length of the encoded data generated by said second encoding means and Ly be a code length of the encoded data generated by said first encoding means, when Lx and Ly satisfy a predetermined non-linear boundary function f( ):
Ly≧f(Lx)
selecting and outputting the encoded data generated by said second encoding means, and when Lx and Ly do not satisfy the function, selecting and outputting the encoded data generated by said first encoding means.

### Claim 10 (depends on 9)

A computer-readable storage medium characterized by storing a computer program defined in claim 9.
