JPH09149260A - Information processor and information processing method - Google Patents

Information processor and information processing method

Info

Publication number
JPH09149260A
JPH09149260A JP7304374A JP30437495A JPH09149260A JP H09149260 A JPH09149260 A JP H09149260A JP 7304374 A JP7304374 A JP 7304374A JP 30437495 A JP30437495 A JP 30437495A JP H09149260 A JPH09149260 A JP H09149260A
Authority
JP
Japan
Prior art keywords
encoding
code amount
generated code
image data
information processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP7304374A
Other languages
Japanese (ja)
Inventor
Hideshi Osawa
秀史 大沢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP7304374A priority Critical patent/JPH09149260A/en
Priority to US08/753,006 priority patent/US6266449B1/en
Publication of JPH09149260A publication Critical patent/JPH09149260A/en
Pending legal-status Critical Current

Links

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

PROBLEM TO BE SOLVED: To suppress the deterioration of the quality of encoding data and to encode data with a target compression rate by controlling encoding object data whether it is reversibly encoded or non-reversibly encoded in accordance with the quantity of generated codes and encoding object data based on a controlled result. SOLUTION: Data length on encoding information which is encoded by an encoding part 15 is inputted to a generated code quantity monitor part 14. The generated code quantity monitor part 14 outputs a flag for controlling a gradation conversion part 13 so that the compression rate becomes the target one which is previously set based on inputted data length. The flag is stored in a flag storage memory part 26 and is inputted to a gradation switch indication part 20 on a decoding side. The encoding method of reverse encoding and non-reverse encoding is switched by controlling the gradation of a picture being the encoding object. A gradation conversion part 21 gradation-converts respective pieces of picture information inputted based on an instruction from the gradation switch indication part 20 and outputs converted information to an interface part 22.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本願発明は、情報を処理する
情報処理装置及び方法に関するものである。
TECHNICAL FIELD The present invention relates to an information processing apparatus and method for processing information.

【0002】[0002]

【従来の技術】従来よく知られているデジタル白黒2値
画像の符号化方式では、画像をラスター単位に符号化し
ていく方式がある。例えばFAXで使われている、M
H、MR、MMR方式などは、白黒画素の続く長さ(ラ
ンレングス)に注目して符号化する可変長符号化方式で
ある。
2. Description of the Related Art As a well-known digital black-and-white binary image coding method, there is a method of coding an image in raster units. For example, M used in FAX
The H, MR, MMR method and the like are variable-length coding methods that perform coding by paying attention to the length (run length) of continuous black and white pixels.

【0003】また可変長符号化方式とは別に固定長符号
化方式が知られている。この方式には、画像をブロック
分割し、ブロック毎に固定長符号を割り当てるベクトル
量子化等があり、同一圧縮率で符号化を行うことができ
る。しかしブロック毎に符号化データの情報の質に差が
あり、復号化データの質(画質)に差がある。
In addition to the variable length coding system, a fixed length coding system is known. This method includes vector quantization in which an image is divided into blocks and a fixed-length code is assigned to each block, and encoding can be performed at the same compression rate. However, there is a difference in the quality of the encoded data information for each block, and there is a difference in the quality (image quality) of the decoded data.

【0004】またファクシミリ等の画像通信装置に使わ
れている符号化方式は、復号化側で原画像を完全に復元
できる可逆符号化方式であるが、そのほかに劣化をある
程度許容して、圧縮率を高くすることができる非可逆符
号化方式も使われている。
The coding system used in image communication devices such as facsimiles is a reversible coding system in which the original image can be completely restored on the decoding side. Lossy coding schemes that can increase the are also used.

【0005】[0005]

【発明が解決しようとしている課題】以上の様に、可変
長符号化方式は、画像によって発生符号量が異なるた
め、圧縮率を制御し、目標圧縮率(一定メモリ容量)で
符号化することが困難であるという問題があった。
As described above, in the variable-length coding system, the generated code amount differs depending on the image, so that it is possible to control the compression ratio and perform the coding at the target compression ratio (constant memory capacity). There was a problem that it was difficult.

【0006】これに対し、固定長符号化方式は圧縮率は
目標値に抑えられるが、局所的に符号化データの情報の
劣化が目立つという問題があった。
On the other hand, in the fixed length coding method, the compression rate can be suppressed to the target value, but there is a problem that the deterioration of the information of the coded data is conspicuous locally.

【0007】以上の問題を解決するために本願発明は、
符号化データの質の劣化を抑制すると共に目標の圧縮率
でデータを符号化することを目的とする。
In order to solve the above problems, the present invention is
It is an object to suppress deterioration of the quality of encoded data and to encode the data at a target compression rate.

【0008】また好ましくは、画像データの符号化にお
いて、符号化による画質の劣化を抑制すると共に目標の
圧縮率でデータを符号化することを目的とする。
Further, it is preferable to suppress deterioration of the image quality due to the encoding in encoding the image data and to encode the data at a target compression rate.

【0009】また、カラー画像データを符号化する際
に、視覚的な画像を劣化を抑えると共に、目標の圧縮率
でデータを符号化することを別の目的とする。
Another object is to suppress deterioration of a visual image when encoding color image data and to encode the data at a target compression rate.

【0010】[0010]

【課題を解決するための手段】以上の課題を解決するた
め、本願発明の請求項1に記載の情報処理装置によれ
ば、データを所定単位毎に順次符号化する情報処理装置
において、符号化済のデータを符号化した際の発生符号
量を監視する監視手段と、該発生符号量に応じて、前記
符号化対象データを可逆符号化するか非可逆符号化する
かを制御する制御手段と、該制御手段により制御された
結果に基づいて前記符号化対象データを符号化する符号
化手段とを有することを特徴とする。
In order to solve the above-mentioned problems, according to an information processing apparatus according to claim 1 of the present invention, in an information processing apparatus for sequentially encoding data in a predetermined unit, encoding is performed. Monitoring means for monitoring the amount of generated code when the already-encoded data is encoded, and control means for controlling whether the data to be encoded is lossless-encoded or lossy-encoded according to the amount of generated code And encoding means for encoding the encoding target data based on the result controlled by the control means.

【0011】[0011]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

(第1の実施の形態)図1は本願発明の第1の実施の形
態を説明するための情報処理装置全体の構成を表すブロ
ック図である。
(First Embodiment) FIG. 1 is a block diagram showing the configuration of the entire information processing apparatus for explaining the first embodiment of the present invention.

【0012】10はディザ画像メモリ、11は符号化側
の予測部、12は符号化側の予測判定部、13は階調変
換部、14は発生符号量監視部、15は符号化部、16
は圧縮メモリである。
Reference numeral 10 is a dither image memory, 11 is a coding side prediction unit, 12 is a coding side prediction judgment unit, 13 is a gradation conversion unit, 14 is a generated code amount monitoring unit, 15 is a coding unit, 16
Is compression memory.

【0013】17は復号化部、18は復号化側の予測
部、19は復号化側の予測判定部、20は階調切換指示
部、21は階調変換部、22はインターフェイス部、2
6はフラグ記憶メモリ部である。
Reference numeral 17 is a decoding unit, 18 is a decoding side prediction unit, 19 is a decoding side prediction determination unit, 20 is a gradation switching instruction unit, 21 is a gradation conversion unit, 22 is an interface unit, 2
6 is a flag storage memory unit.

【0014】ディザ画像メモリ10には、図2で示す様
な多値ディザ回路によって2ビット/画素に変換された
画像情報が記憶されている。
The dither image memory 10 stores image information converted into 2 bits / pixel by a multi-valued dither circuit as shown in FIG.

【0015】図2は4値ディザ回路のブロック図であ
る。初めに8ビットの画像情報が記憶されている画像メ
モリ23から画像情報を4値ディザ回路24に出力し、
4値ディザ回路24において後述する閾値マトリクス
(図3を参照)を用いて4値ディザ処理を行った後、デ
ィザ画像メモリ10に格納する。4値ディザ回路は、閾
値と画像情報を比較するコンパレータなどで構成される
簡単な回路であるので詳細な説明は省略する。
FIG. 2 is a block diagram of a four-value dither circuit. First, the image information is output from the image memory 23 in which 8-bit image information is stored to the 4-value dither circuit 24,
The 4-value dither circuit 24 performs 4-value dither processing using a threshold value matrix (see FIG. 3) described later, and then stores the dither image memory 10. The four-valued dither circuit is a simple circuit composed of a comparator or the like that compares a threshold value with image information, and therefore detailed description thereof is omitted.

【0016】階調変換部13では、画像情報の各画素に
ついて順次2ビット/画素のディザ画像情報を1ビット
/画素のディザ画像情報に変換して1ビットの情報21
0として出力する。最も単純な方法は、2ビットの最上
位ビット(MSB)をとることにより実現できる。この
ディザ画像情報の変換処理の詳細については後述する。
In the gradation conversion unit 13, the dither image information of 2 bits / pixel is sequentially converted into 1 bit / pixel of dither image information for each pixel of the image information, and the 1-bit information 21.
Output as 0. The simplest method can be implemented by taking the two most significant bits (MSB). Details of the conversion process of this dither image information will be described later.

【0017】予測部11では、入力された情報210の
うち符号化対象画素よりも前に符号化される周囲画素の
1ビットの情報を基に符号化対象画素の1ビットの画像
情報が0か1かを予測する処理が行われ、予測された画
像情報(予測シンボル)203と後述するインデクス2
12を出力する。また、符号化部15からは後述する更
新情報213が入力される。
In the prediction unit 11, whether the 1-bit image information of the pixel to be encoded is 0 based on the 1-bit information of the surrounding pixels encoded before the pixel to be encoded in the input information 210. 1 is performed, and the predicted image information (predicted symbol) 203 and the index 2 to be described later are executed.
12 is output. Also, update information 213, which will be described later, is input from the encoding unit 15.

【0018】予測判定部12では、予測シンボル203
と情報210として入力された符号化対象画素の画像情
報の値(0/1)とが一致したかどうかを判定し、この
判定結果を示す情報202を符号化部15で符号化す
る。
In the prediction judgment unit 12, the prediction symbol 203
And the value (0/1) of the image information of the pixel to be encoded input as the information 210 are determined, and the information 202 indicating the determination result is encoded by the encoding unit 15.

【0019】圧縮メモリ16には、符号器15で符号化
された符号化情報が蓄積される。以上で説明した画像情
報の符号化処理が完全に終了した後に、復号動作が始ま
る。
The compression memory 16 stores the coded information coded by the encoder 15. The decoding operation starts after the image information encoding process described above is completely completed.

【0020】復号化部17では、上述の予測判定部12
で判定した予測の判定結果の情報(情報202に対応)
が復号されて情報207として出力される。予測部18
は予測部11と同じ構成のものであり、復号化された周
囲画素の1ビットの画像情報を基に符号化対象画素の画
像情報の値(0/1)を予測した予測シンボル206
(予測シンボル203と予測シンボル206は等しい)
を予測判定部19に出力する。
In the decoding unit 17, the above-mentioned prediction judgment unit 12 is used.
Information of the judgment result of the prediction judged in (corresponding to information 202)
Is decoded and output as information 207. Prediction unit 18
Has the same configuration as the prediction unit 11, and is a prediction symbol 206 that predicts the value (0/1) of the image information of the pixel to be encoded based on the decoded 1-bit image information of the surrounding pixels.
(Prediction symbol 203 and prediction symbol 206 are equal)
Is output to the prediction determination unit 19.

【0021】予測判定部19は、情報207及び予測シ
ンボル206を参照することにより実際の符号化対象画
素の画像情報の値(0/1)を出力する。具体的に説明
すると、予測シンボル206が1であった場合に情報2
07が「予測シンボルと一致しなかった」ことを示す情
報だった際には符号化対象画素の画像情報の値は0を出
力し、「予測シンボルと一致した」ことを示す情報だっ
た場合には1を出力する。予測シンボルが0だった場合
にも同様の判断により1または0を出力する。
The prediction determination unit 19 outputs the value (0/1) of the image information of the actual pixel to be coded by referring to the information 207 and the prediction symbol 206. Specifically, if the predicted symbol 206 is 1, the information 2
When 07 is the information indicating "not matching the prediction symbol", the value of the image information of the pixel to be encoded is 0, and when it is the information indicating "matching the prediction symbol". Outputs 1. When the predicted symbol is 0, 1 or 0 is output by the same judgment.

【0022】発生符号量監視部14には、符号化部15
で符号化された符号化情報のデータ長が入力される。発
生符号量監視部14は入力されたデータ長を基に予め設
定された目標の圧縮率になるように階調変換部13をコ
ントロール(2ビット/画素にするか1ビット/画素に
するか)する為のフラグを出力する。このフラグはフラ
グ記憶メモリ部26にも出力され、記憶される。フラグ
記憶メモリ26に記憶された情報は、復号化側の階調切
換指示部20に入力される。
The generated code amount monitoring unit 14 includes an encoding unit 15
The data length of the coded information coded in is input. The generated code amount monitoring unit 14 controls the gradation conversion unit 13 based on the input data length so as to achieve a preset target compression ratio (2 bits / pixel or 1 bit / pixel). Output the flag to do. This flag is also output and stored in the flag storage memory unit 26. The information stored in the flag storage memory 26 is input to the gradation switching instruction unit 20 on the decoding side.

【0023】階調切換指示部20は、入力された情報に
基づいて、階調変換部21に入力された画像情報の値が
階調変換部13で階調変換されているかどうかを判定
し、階調変換されている場合には階調変換部21に階調
変換を行う命令を出力する。
The gradation switching instructing section 20 determines whether the value of the image information input to the gradation converting section 21 is gradation converted by the gradation converting section 13 based on the input information. When gradation conversion is performed, the gradation conversion unit 21 outputs a command for gradation conversion.

【0024】階調変換部21は、階調切換指示部20か
らの命令に基づいて入力された画像情報の各々を階調変
換し、変換された画像情報をインターフェイス部22に
出力する。この画像情報は、インターフェイス部22か
らプリンター等の外部機器に出力される。
The gradation conversion unit 21 converts the gradation of each of the image information input based on the command from the gradation switching instruction unit 20, and outputs the converted image information to the interface unit 22. This image information is output from the interface unit 22 to an external device such as a printer.

【0025】図3に4値ディザ処理を行う為の閾値マト
リクス(マトリクスサイズが2×2画素)の一例を示
す。多値ディザ回路24では、この閾値を基に8ビット
の入力画像情報(0〜255)を4値ディザ処理する。
具体的には以下の様な処理を行う。まず、2×2画素の
画像情報に対して第1の閾値との画素値の比較を行い、
第1の閾値以下の画素はレベル0と決定する。
FIG. 3 shows an example of a threshold value matrix (matrix size is 2 × 2 pixels) for performing four-value dither processing. The multi-level dither circuit 24 performs 4-level dithering on the 8-bit input image information (0 to 255) based on this threshold value.
Specifically, the following processing is performed. First, the pixel value of the image information of 2 × 2 pixels is compared with the first threshold value,
Pixels below the first threshold are determined as level 0.

【0026】次に、上述の画像情報と第2の閾値との比
較を行い、第2の閾値以下の画素(レベルが未決定の画
素のみ)はレベル1と決定する。
Next, the above-mentioned image information is compared with the second threshold value, and the pixels below the second threshold value (only the pixels whose level has not been determined) are determined to be level 1.

【0027】次に、上述の画像情報と第3の閾値との比
較を行い、第3の閾値以下の画素(レベルが未決定の画
素のみ)はレベル2と決定する。
Next, the above-mentioned image information is compared with the third threshold value, and the pixels below the third threshold value (only the pixels whose level has not been determined) are determined to be level 2.

【0028】次に、上述の画像情報が第3の閾値以上の
画素(レベルが未決定の画素のみ)をレベル3と決定す
る。
Next, the pixels whose image information is equal to or larger than the third threshold value (only the pixels whose level has not been determined) are determined as level 3.

【0029】以上の処理により1画素が2ビット(4
値)で表される。
By the above processing, one pixel has 2 bits (4
Value).

【0030】本願発明では、画像をバンド分割してお
き、前バンドまでの符号の発生量に応じて次のバンドの
符号化方法を切り換える処理を行う。
In the present invention, the image is divided into bands, and the process of switching the coding method of the next band is performed according to the amount of codes generated up to the preceding band.

【0031】この符号化方法の切り換えは、符号化対象
画像の階調を制御することにより実現している。即ち初
期画像情報を4値(2ビット/画素)と考えるとする
と、4値ディザ画像のまま符号化する時は可逆符号化に
なり、4値ディザ画像を階調変換して2値ディザ画像に
してから符号化する場合は非可逆符号化になる。
The switching of the encoding method is realized by controlling the gradation of the image to be encoded. That is, assuming that the initial image information is 4-valued (2 bits / pixel), lossless encoding is performed when the 4-valued dither image is encoded as it is, and the 4-valued dither image is gradation-converted into a 2-valued dither image. If it is encoded later, it will be lossy.

【0032】図4は上述の画像のバンド分割方法を説明
する為の図である。ここでは、画像を6つのバンドに分
割する例を示す。各バンドのフラグ領域には、4値ディ
ザ画像を符号化するのか(符号化フラグ0)、4値ディ
ザ画像を2値ディザ画像に変換してから符号化するのか
(符号化フラグ1)を示すフラグ(フラグ記憶メモリ部
26に記憶されるフラグに対応)を記憶しておく。
FIG. 4 is a diagram for explaining the above-described image band division method. Here, an example of dividing an image into six bands is shown. In the flag area of each band, whether the 4-valued dither image is encoded (encoding flag 0) or whether the 4-valued dither image is converted into the binary dither image and then encoded (encoding flag 1) is indicated. The flag (corresponding to the flag stored in the flag storage memory unit 26) is stored.

【0033】復号化側での復号の際には、このフラグを
使って各バンドのディザ画像の種類を判定(上述の階調
切換指示部20に対応)する。
At the time of decoding on the decoding side, this flag is used to determine the type of dither image in each band (corresponding to the gradation switching instruction section 20 described above).

【0034】図5はバンド毎の符号発生量の目標値とフ
ラグ切り換えのタイミングを説明する為の図である。
FIG. 5 is a diagram for explaining the target value of the code generation amount for each band and the timing of flag switching.

【0035】図中において、原点から最終目標値(要求
圧縮率から計算される符号量)に伸びた斜線は各バンド
の符号化が終了した時点での総符号量の目標値であり、
バンド番号の軸に対し垂直に示された実線の範囲は各バ
ンドの符号化が終了した時点での総符号量の許容範囲で
ある。また、破線で示した折れ線は発生符号量を示すデ
ータである。
In the figure, the diagonal line extending from the origin to the final target value (the code amount calculated from the required compression rate) is the target value of the total code amount at the time when the coding of each band is completed,
The range of the solid line shown perpendicular to the band number axis is the allowable range of the total code amount at the time when the coding of each band is completed. The broken line indicated by the broken line is data indicating the generated code amount.

【0036】上述の許容範囲は、例えば各バンドの発生
符号量の−10%〜+10%の範囲に設定されている。
The above-mentioned allowable range is set, for example, within the range of -10% to + 10% of the generated code amount of each band.

【0037】次に1画面分の画像情報をバンド毎に順次
符号化して行く際の発生符号量を制御する方法について
説明する。
Next, a method for controlling the generated code amount when the image information for one screen is sequentially encoded for each band will be described.

【0038】まず最初に、バンド0を2ビット/画素と
して符号化した時点での符号量は許容範囲に入っている
のでフラグは初期値(0)のまま次のバンドの符号化を
行う。
First, since the code amount at the time of encoding band 0 as 2 bits / pixel is within the allowable range, the next band is encoded with the flag set to the initial value (0).

【0039】次にバンド1をフラグの値(0)に基づい
て符号化(2ビット/画素として符号化)を行う。この
際、符号化されたバンド0〜バンド1の総符号量を算出
し、この総符号量が許容範囲に入っているかどうかを判
断する(発生符号量監視部14に対応)。図5の場合、
許容範囲以上になっているので、フラグを0から1へ変
更する。これによりバンド2以降は1ビット/画素を符
号化する様にするので発生符号量を減少することができ
る。
Next, band 1 is encoded (encoded as 2 bits / pixel) based on the flag value (0). At this time, the total code amount of the encoded band 0 to band 1 is calculated, and it is determined whether or not the total code amount is within the allowable range (corresponding to the generated code amount monitoring unit 14). In the case of FIG.
Since it is over the allowable range, the flag is changed from 0 to 1. As a result, 1 bit / pixel is coded in band 2 and thereafter, so that the generated code amount can be reduced.

【0040】次にバンド2の符号化を行った時点で、バ
ンド0〜バンド3の総符号量を算出した結果、許容範囲
内なのでフラグは1のままバンド3の符号化を行う。
Next, when the band 2 is coded, the total code amount of the band 0 to the band 3 is calculated. As a result, since it is within the allowable range, the band 3 is coded while the flag remains 1.

【0041】次にバンド3の符号化を行った時点のバン
ド0〜バンド3までの総符号量を算出した結果、総符号
量が許容範囲以下になっているのでフラグを1から0に
変更する。これによりバンド4以降は2ビット/画素を
符号化する様にするので発生符号量を多くすることがで
きる。
Next, as a result of calculating the total code amount from band 0 to band 3 at the time of encoding band 3, the total code amount is below the allowable range, so the flag is changed from 1 to 0. . As a result, since 2 bits / pixel are coded in band 4 and thereafter, the generated code amount can be increased.

【0042】次にバンド4の符号化を行った結果、バン
ド0〜バンド4の総符号量が許容範囲以上になっている
ので、フラグを1から0に変更し、バンド5の符号化を
行う。
Next, as a result of encoding the band 4, since the total code amount of the bands 0 to 4 exceeds the allowable range, the flag is changed from 1 to 0 and the encoding of the band 5 is performed. .

【0043】以上の処理を行うことによって1画面の画
像情報の総符号量を最終目標値に近づける様な符号量制
御が可能になる。
By performing the above processing, it is possible to control the code amount so that the total code amount of the image information of one screen approaches the final target value.

【0044】また本実施の形態では、可逆符号化(フラ
グが0)を続けている際に総符号量が許容範囲以下であ
ることが続いてもフラグは0のままで良く、この状態が
続いた場合には、目標の符号量よりも少なく抑えること
ができる。
Further, in the present embodiment, the flag may remain 0 even if the total code amount remains below the allowable range while continuing the lossless encoding (the flag is 0), and this state continues. In this case, the code amount can be suppressed to be smaller than the target code amount.

【0045】図6は、フラグの切り換えにより、符号化
に用いる画像情報を切り換える様子を示す図である。
FIG. 6 is a diagram showing how the image information used for encoding is switched by switching the flag.

【0046】(A)は4値ディザ画像として符号化する
領域であり、各画素2ビットの情報(最上位ビットMS
Bと最下位ビットLSB)をMSBからLSBの順番で
符号化していく。
(A) is an area to be coded as a four-valued dither image, in which each pixel has 2-bit information (most significant bit MS).
B and the least significant bit LSB) are encoded in order from MSB to LSB.

【0047】(B)は2値ディザ画像として符号化する
領域である。符号化画素が領域(A)から領域(B)に
変わる(フラグが0から1に変わる)と、領域(B)の
4値ディザ画像を2値ディザ画像(本実施の形態ではM
SBの1ビットをとることにより2値ディザ画像の情報
とする)に変換して符号化を行う。また、符号化画素が
領域(C)に変わる(フラグが1から0に変わる)と、
領域(C)を領域(A)と同様の符号化を行う。
(B) is an area to be coded as a binary dither image. When the coded pixel changes from the area (A) to the area (B) (the flag changes from 0 to 1), the 4-valued dither image of the area (B) is changed to the binary dither image (M in the present embodiment).
By taking 1 bit of SB, it is converted to binary dither image information) and encoded. When the coded pixel changes to the area (C) (the flag changes from 1 to 0),
The area (C) is encoded in the same manner as the area (A).

【0048】図7は図6の処理を行う為に4値ディザ画
像と2値ディザ画像を選択的に出力する階調変換部13
のブロック図の一例である。
FIG. 7 is a gradation conversion unit 13 which selectively outputs a four-value dither image and a two-value dither image in order to perform the processing of FIG.
2 is an example of a block diagram of FIG.

【0049】図において、80はパラレル・シリアル変
換部であり、4値ディザ画像(2ビットのパラレル信
号)の情報を1ビットのシリアル信号に変換していき、
4値・2値変換部81及びセレクタ82に4値の画像情
報として出力する。
In the figure, reference numeral 80 denotes a parallel / serial conversion unit which converts information of a 4-valued dither image (2-bit parallel signal) into a 1-bit serial signal.
It is output to the 4-value / binary conversion unit 81 and the selector 82 as 4-valued image information.

【0050】81は4値・2値変換部であり、4値の画
像情報を2値の画像情報に変換するものであり、セレク
タ82に2値の画像情報として出力する。本実施の形態
では、4値(2ビット)の情報のMSBのみをとる方法
を用いる。
Reference numeral 81 denotes a four-value / binary conversion unit for converting four-value image information into binary image information, which is output to the selector 82 as binary image information. In this embodiment, a method of taking only the MSB of 4-valued (2-bit) information is used.

【0051】セレクタ82は、パラレル・シリアル変換
部から入力された4値の画像情報と4値・2値変換部8
1から入力された2値の画像情報とを、発生符号量監視
部14から出力されたフラグ(1/0)に応じて選択的
に切り換えて出力する。
The selector 82 includes the 4-value image information input from the parallel / serial converter and the 4-value / binary converter 8.
The binary image information input from 1 is selectively switched according to the flag (1/0) output from the generated code amount monitoring unit 14 and output.

【0052】図8は予測部11のブロック図である。FIG. 8 is a block diagram of the prediction unit 11.

【0053】符号化済の画像情報210はテンプレート
生成部50に順次入力され、所定ライン数分格納され
る。また、格納された画像情報を元に符号化対象画素の
画像情報の予測に必要な周囲画素の画像情報の状態を表
すデータ211を予測状態メモリ51に出力する。
The coded image information 210 is sequentially input to the template generator 50 and stored for a predetermined number of lines. Also, based on the stored image information, the data 211 indicating the state of the image information of the surrounding pixels necessary for predicting the image information of the pixel to be encoded is output to the prediction state memory 51.

【0054】予測状態メモリ51には、公知技術である
算術符号化に用いる確率推定テーブルが格納されてい
る。また、符号化対象画素の周囲画素の画像情報の状態
毎に確率推定テーブルのインデクス情報が記憶されてい
る。
The prediction state memory 51 stores a probability estimation table used for arithmetic coding, which is a known technique. In addition, index information of the probability estimation table is stored for each state of image information of pixels around the pixel to be encoded.

【0055】この予測状態メモリ51は、テンプレート
生成部50からデータ211が入力されると、データ2
11に対応するインデクス情報を取り出し、確率推定テ
ーブル上からこのインデクス情報に対応する予測シンボ
ル203を発生し、これを予測判定部12に出力する。
これと同時にこの際に用いたインデクス情報212を符
号化部15に出力する。
This predictive state memory 51 receives the data 2 when the data 211 is input from the template generator 50.
The index information corresponding to 11 is taken out, a prediction symbol 203 corresponding to this index information is generated from the probability estimation table, and this is output to the prediction determination unit 12.
At the same time, the index information 212 used at this time is output to the encoding unit 15.

【0056】また、このインデクス情報を用いて符号化
された後に更新されるインデクス情報213を入力する
ことにより、更新されたインデクス情報として上書き記
憶する。これは、符号化部15で符号化を行う度に行わ
れる予測符号化方法の学習に基づき、次に同じ周囲画素
の画像情報の状態になった場合に予測される予測シンボ
ルが実際の符号化対象画素と同じになる確率を上げる様
に最適化する処理あり、周囲画素の画像情報の状態毎に
上書き記憶されていくものである。
By inputting the index information 213 which is updated after being encoded using this index information, it is overwritten and stored as the updated index information. This is based on the learning of the predictive coding method performed every time the coding is performed by the coding unit 15, and the predicted symbol predicted when the state of the image information of the same surrounding pixel is next is the actual coding. There is a process of optimizing so as to increase the probability of becoming the same as the target pixel, and it is overwritten and stored for each state of image information of surrounding pixels.

【0057】図9はテンプレート生成部50の内部で予
測参照画素(周囲画素)を用いる処理について詳細に説
明する為の図である。符号化対象画素xを中心に近傍の
周囲画素c、d、e、fとディザ周期(本実施の形態で
は2×2)に対応した画素a、b、g、h、iの画像情
報を、合成器90で合成し、上述のデータ211として
予測状態メモリ51に出力する。
FIG. 9 is a diagram for explaining in detail the process of using the predicted reference pixel (peripheral pixel) inside the template generation unit 50. Image information of surrounding pixels c, d, e, f around the pixel x to be encoded and pixels a, b, g, h, i corresponding to the dither period (2 × 2 in the present embodiment), The data is combined by the combiner 90 and output to the prediction state memory 51 as the above-mentioned data 211.

【0058】図10は符号化部15のブロック図であ
り、インデクス情報212が算術符号化部102に入力
される。また算術符号化部102は、算術符号化部10
2で符号化された後に更新されたインデクス情報213
を予測部11に出力する。
FIG. 10 is a block diagram of the encoding unit 15, in which the index information 212 is input to the arithmetic encoding unit 102. In addition, the arithmetic coding unit 102 includes the arithmetic coding unit 10
The index information 213 updated after being encoded by 2
Is output to the prediction unit 11.

【0059】図11は復号化部17のブロック図であ
り、インデクス情報208が算術復号化部104に入力
される。また算術復号化部104では、算術復号化部1
04で復号化された後に更新されたインデクス情報20
9を予測部18に出力する。
FIG. 11 is a block diagram of the decoding unit 17, in which the index information 208 is input to the arithmetic decoding unit 104. In the arithmetic decoding unit 104, the arithmetic decoding unit 1
Index information 20 updated after being decrypted in 04
9 is output to the prediction unit 18.

【0060】算術符号化としては、ISOの国際標準符
号化方式で使われているQM−Coderなどを用いる
ことが考えられる。
As the arithmetic coding, it is conceivable to use QM-Coder or the like used in the ISO international standard coding method.

【0061】本実施の形態によれば、符号化による画質
の劣化を抑制すると共に目標の圧縮率でデータを符号化
することができる。
According to this embodiment, it is possible to suppress the deterioration of the image quality due to the encoding and to encode the data at the target compression rate.

【0062】(第2の実施の形態)第2の実施の形態
は、多値画像のDPCM符号(差分パルス符号)化にお
いて、可逆符号化、非可逆符号化を切り換えることによ
り発生符号量を制御する方法である。
(Second Embodiment) In the second embodiment, in the DPCM coding (differential pulse coding) of a multivalued image, the generated code amount is controlled by switching between lossless coding and lossy coding. Is the way to do it.

【0063】可逆のDPCMで符号化するためには、差
分データをそのままハフマン符号化する。また、非可逆
のDPCMで符号化するためには、差分データを量子化
した後にハフマン符号化する。
In order to encode with the reversible DPCM, the difference data is directly Huffman-encoded. Further, in order to encode with the irreversible DPCM, the differential data is quantized and then Huffman-encoded.

【0064】図12は全体系のブロック図である。FIG. 12 is a block diagram of the entire system.

【0065】図12において、30は8ビット画像メモ
リ、31は減算器、32は量子化器、33は1画素ディ
レイ、34は逆量子化器、35は可変長符号化器、36
は圧縮メモリ、37は可変長符号の復号器、38は逆量
子化器、39は加算器、40は1画素ディレイである。
In FIG. 12, 30 is an 8-bit image memory, 31 is a subtractor, 32 is a quantizer, 33 is a 1-pixel delay, 34 is an inverse quantizer, 35 is a variable length encoder, 36.
Is a compression memory, 37 is a variable-length code decoder, 38 is an inverse quantizer, 39 is an adder, and 40 is a one-pixel delay.

【0066】画像メモリ30から入力された符号化対象
画素の画像情報は、減算器31で前画素の画像情報出力
との差分がとられ、差分データを出力する。この差分デ
ータは量子化器32で量子化される。ここで量子化され
た差分データ及び後述する量子化切り換え制御の情報
は、逆量子化器34に入力されて局部復号化の為に用い
られる。
The image information of the pixel to be coded input from the image memory 30 is subtracted from the image information output of the previous pixel by the subtractor 31, and the difference data is output. This difference data is quantized by the quantizer 32. The quantized difference data and the information on the quantization switching control, which will be described later, are input to the dequantizer 34 and used for local decoding.

【0067】量子化された差分データは可変長符号器3
5において、ハフマン符号化等の符号化が行なわれ、圧
縮メモリ36に記憶される。これと同時に量子化された
差分データは局部復号化部34で、逆量子化され、局部
復号化される。局部復号化された画像情報はディレー回
路33で1画素分遅延され、次の画素との差分をとる為
に減算器31に出力される。
The quantized difference data is the variable length encoder 3
5, coding such as Huffman coding is performed and stored in the compression memory 36. At the same time, the quantized difference data is dequantized and locally decoded by the local decoding unit 34. The locally-decoded image information is delayed by one pixel in the delay circuit 33 and output to the subtractor 31 to obtain the difference from the next pixel.

【0068】可変長符号器35で符号化された符号化デ
ータの符号量は、発生符号量監視部14に入力される。
可変長符号器35は、入力された符号量と予想符号量と
の差に応じて、量子化器による量子化方法を制御する。
The code amount of the encoded data encoded by the variable length encoder 35 is input to the generated code amount monitoring unit 14.
The variable length encoder 35 controls the quantization method by the quantizer according to the difference between the input code amount and the expected code amount.

【0069】可逆符号化と非可逆符号化の切り換えは、
量子化器に与えるパラメータを切り換えることにより行
う。
Switching between lossless encoding and lossy encoding is
This is done by switching the parameters given to the quantizer.

【0070】即ち、量子化係数を1にすれば、情報を完
全に残すことになり、一方、量子化を1を越える数で行
うと非可逆の量子化になる。
That is, if the quantized coefficient is set to 1, information is completely left. On the other hand, if the number of quantized values exceeds 1, irreversible quantization is performed.

【0071】以上の量子化を行うことにより、差分デー
タのヒストグラムが0付近に集中するので、このヒスト
グラムに基づいたハフマン符号化等を行えば発生符号量
を抑制できる。
By performing the above quantization, the histogram of the difference data is concentrated near 0, so that the amount of generated codes can be suppressed by performing Huffman coding based on this histogram.

【0072】また以上の量子化を切り換えるタイミング
を示す切り換えフラグは、フラグメモリ26に記憶して
おき、復号時に使われる。
The switching flag indicating the timing for switching the above quantization is stored in the flag memory 26 and used at the time of decoding.

【0073】圧縮メモリ36の出力は、可変長復号器3
7で復号され、逆量子化器38で逆量子化処理される。
この結果、差分データが出力され、加算器39において
この差分データと前画素の復号化済画像情報が加算さ
れ、画像情報が再生される。この画像情報は、I/F2
2を通して出力される。また、再生された画像情報は、
ディレイ40にも入力され、次の差分データとの加算に
用いられる。
The output of the compression memory 36 is the variable length decoder 3
7, and the inverse quantizer 38 performs inverse quantization processing.
As a result, difference data is output, and the adder 39 adds the difference data and the decoded image information of the previous pixel to reproduce the image information. This image information is I / F2
It is output through 2. Also, the reproduced image information is
It is also input to the delay 40 and used for addition with the next difference data.

【0074】上述の逆量子化器38の逆量子化におい
て、フラグ記憶メモリ26からは、逆量子化の際の量子
化パラメータを切り換えさせる為の切り換え信号を出力
する。
In the above-described inverse quantization of the inverse quantizer 38, the flag storage memory 26 outputs a switching signal for switching the quantization parameter at the time of inverse quantization.

【0075】発生符号量の制御方法は第1の実施の形態
と同様に、図5に従って行う事とし、符号量が許容範囲
以上になった場合には非可逆符号化を行う様に切り換
え、符号量が許容範囲以下になった場合には、可逆符号
化行う様に切り換える事とする。以上の処理により最終
目標値の発生符号量に近くなる様な制御が可能になる。
As in the first embodiment, the control method of the generated code amount is performed according to FIG. 5, and when the code amount exceeds the allowable range, switching is performed so as to perform lossy encoding, If the amount falls below the permissible range, switching is performed so that lossless encoding is performed. By the above processing, it is possible to perform control so that the generated code amount of the final target value is close to the generated code amount.

【0076】本実施の形態によれば、符号化対象データ
以前の発生符号量に基づいて可逆符号化及び非可逆符号
化を切り換えることにより、符号化による画質の劣化を
抑制すると共に目標の圧縮率でデータを符号化すること
ができる。
According to this embodiment, lossless encoding and lossy encoding are switched based on the amount of generated code before the data to be encoded, thereby suppressing deterioration of image quality due to encoding and achieving a target compression rate. The data can be encoded with.

【0077】また本実施の形態では、DPCM符号化の
量子化パラメータを切り換えることにより可逆、非可逆
の符号化を切り換えていたが、これに限らず可逆符号化
をMH、MR符号化等を用い、非可逆符号化にJPEG
符号化等を用いても良い。即ち、可逆符号化はデータを
完全再生できる方法であれば良く、非可逆符号化はデー
タを効率良く符号化できるものであれば良い。
In the present embodiment, reversible and irreversible coding is switched by switching the quantization parameter of DPCM coding. However, the present invention is not limited to this, and MH, MR coding or the like is used for reversible coding. , JPEG for lossy encoding
Encoding or the like may be used. That is, the lossless encoding may be any method capable of completely reproducing the data, and the lossy encoding may be any method capable of efficiently encoding the data.

【0078】(第3の実施の形態)図13は、第3の実
施の形態を示す装置全体のブロック図である。
(Third Embodiment) FIG. 13 is a block diagram of the entire apparatus showing a third embodiment.

【0079】23は1画素8ビットの画像データを格納
するための画像メモリ(8ビット)、24は4値ディザ
処理部、25は4値ディザ画像メモリ、26は2値ディ
ザ処理部、27は2値ディザ画像メモリ、28は4値デ
ィザ画像データと2値ディザ画像データのどちらかをセ
レクトするセレクタ、29は圧縮部、16は圧縮メモリ
15はフラグ情報記憶部、14は復号化部、13は4
値、2値ディザ画像データ(2ビット画像データ)用の
混在メモリである。
Reference numeral 23 is an image memory (8 bits) for storing 8-bit image data for one pixel, 24 is a 4-value dither processing unit, 25 is a 4-value dither image memory, 26 is a binary dither processing unit, and 27 is a Binary dither image memory, 28 is a selector for selecting either 4-value dither image data or binary dither image data, 29 is a compression unit, 16 is compression memory 15, flag information storage unit, 14 is a decoding unit, 13 Is 4
It is a mixed memory for value and binary dither image data (2-bit image data).

【0080】画像メモリ23に格納されている8ビット
の画像データは、4値ディザ部24に入力されて4値化
された後4値ディザメモリ25に記憶される。同様に8
ビットの画像データは、2値ディザ部26に入力されて
2値化された後2値ディザメモリ27に記憶される。
(図3の4値ディザ閾値及び図14の2値ディザ閾値を
用いる)
The 8-bit image data stored in the image memory 23 is input to the 4-valued dither section 24 and is converted into 4-valued data, and then stored in the 4-valued dither memory 25. Similarly 8
The bit image data is input to the binary dither unit 26, binarized, and then stored in the binary dither memory 27.
(The four-valued dither threshold of FIG. 3 and the two-valued dither threshold of FIG. 14 are used.)

【0081】セレクタ28では、後述する圧縮部29か
らの切り換えフラグに応じて4値ディザ画像データと2
値ディザ画像データを切り換えて圧縮部29に出力す
る。
In the selector 28, 4-valued dither image data and 2
The value dither image data is switched and output to the compression unit 29.

【0082】出力されたデータは、圧縮部29で符号化
され、圧縮メモリ16に蓄えられる。
The output data is encoded by the compression unit 29 and stored in the compression memory 16.

【0083】切り換えフラグ情報はセレクタ28に出力
すると共に、記憶器31に出力されて記憶される。この
フラグは復号化部32で行う復号化の際に参照される。
The switching flag information is output to the selector 28 and also to the storage unit 31 for storage. This flag is referred to in the decoding performed by the decoding unit 32.

【0084】復号化部32では、圧縮メモリ内の符号化
データを読み出し、復号化データの各ビットが、4値デ
ィザ画像データのMSBか、LSBか、2値ディザ画像
データの値なのかを記憶器31からの切り換えフラグ情
報に基づいて判定し、その結果を2ビット深さの混在デ
ィザ画像メモリ33に格納する。
The decoding unit 32 reads the encoded data in the compression memory and stores whether each bit of the decoded data is the MSB, the LSB, or the value of the binary dither image data of the 4-level dither image data. The determination is made based on the switching flag information from the device 31, and the result is stored in the mixed dither image memory 33 having a depth of 2 bits.

【0085】混在ディザメモリ33からは、復号化され
た画像データがI/F回路22を通して、プリンタ等の
外部機器に出力される。
From the mixed dither memory 33, the decoded image data is output to an external device such as a printer through the I / F circuit 22.

【0086】図15は圧縮部29の内部構成を示すブロ
ック図である。
FIG. 15 is a block diagram showing the internal structure of the compression unit 29.

【0087】11は予測器、12は予測判定器、15は
符号化器、14は発生符号量監視部である。
Reference numeral 11 is a predictor, 12 is a prediction decision unit, 15 is an encoder, and 14 is a generated code amount monitoring unit.

【0088】ディザ画像データは、予測器11と予測判
定器12に入力される。予測器11では、各ビットプレ
ーン毎に周囲画素から符号化対象画素のビットの0/1
を予測する処理が行われる。
The dither image data is input to the predictor 11 and the prediction determiner 12. In the predictor 11, for each bit plane, 0/1 of the bit of the pixel to be encoded is calculated from the surrounding pixels.
Is predicted.

【0089】予測判定器12では、予測値と実際のビッ
トの値(0/1)の、一致/不一致を判定し、その結果
を符号器15で符号化する。
The prediction decision unit 12 decides whether or not the predicted value and the actual bit value (0/1) match, and the encoder 15 encodes the result.

【0090】圧縮メモリ16には、符号器15で符号化
された符号化データが蓄積される。
The compression memory 16 stores the encoded data encoded by the encoder 15.

【0091】発生符号量監視部14には符号データ長が
入力され、目標圧縮率になるようにディザの切り換えフ
ラグをコントロールする。
The code data length is input to the generated code amount monitoring unit 14, and the dither switching flag is controlled so that the target compression rate is achieved.

【0092】図16は復号化部32のブロック図であ
る。
FIG. 16 is a block diagram of the decoding unit 32.

【0093】17は復号化器、18は予測器、19は予
測判定器、21は階調補正器である。すべてのディザ画
像データの符号化が終了した後に、以下の復号動作が始
まる。
Reference numeral 17 is a decoder, 18 is a predictor, 19 is a prediction decision device, and 21 is a gradation corrector. After the encoding of all the dither image data is completed, the following decoding operation starts.

【0094】復号器17では、予測一致/不一致の結果
が復号される。予測器18は予測器11と同じ構成のも
ので、周囲画素から符号化対象画素の0/1の値を予測
し、予測判定器19により、実際の0/1値に戻され
る。
The decoder 17 decodes the prediction match / mismatch result. The predictor 18 has the same configuration as the predictor 11, predicts the 0/1 value of the pixel to be encoded from the surrounding pixels, and the prediction determiner 19 restores the value to the actual 0/1 value.

【0095】フラグ解読器20では、階調変換されてい
るかをフラグ記憶器からのフラグを使って4値ディザ処
理、2値ディザ処理の切り換え命令を行う。階調補正器
21では、2ビット相当のディザ画像データに階調補正
する。ここで予測器18は予測器11と同じ構成であ
る。
The flag decoder 20 uses a flag from the flag memory to determine whether gradation conversion has been performed, and issues a switching instruction for 4-value dither processing or 2-value dither processing. The tone corrector 21 performs tone correction on the dither image data corresponding to 2 bits. Here, the predictor 18 has the same configuration as the predictor 11.

【0096】4値ディザ処理部の構成は図2の構成を用
いる事とし、上述した処理を行う。
The configuration of the four-valued dither processing section is to use the configuration of FIG. 2, and the above-mentioned processing is performed.

【0097】図17は、4値化されたときの13レベル
のディザパターンの一例である。各画素は白、薄いグレ
ー、濃いグレー、黒の4段階で表されるが、ディザの面
積階調により、13レベルの中間調表現が可能である。
FIG. 17 is an example of a 13-level dither pattern when it is quaternarized. Each pixel is represented by four levels of white, light gray, dark gray, and black, and 13 levels of halftone expression are possible by the area gradation of dither.

【0098】本実施の形態によれば、符号化による画質
の劣化を抑制すると共に目標の圧縮率でデータを符号化
することができる。
According to this embodiment, it is possible to suppress the deterioration of the image quality due to the coding and code the data at the target compression rate.

【0099】(第4の実施の形態)バンド処理の欠点
は、ハンド毎に頻繁に処理が変わる場合に、バンド処理
の区切りが目立つという点であることである。
(Fourth Embodiment) A drawback of band processing is that the band processing breaks out when the processing frequently changes for each hand.

【0100】カラー画像(YMC画像、Y:イエロー、
M:マゼンタ、C:シアン)に対してバンド処理を行う
ときには、バンド毎に処理の違いが目立ちにくい色(た
とえばイエロー)などを優先的に4値から2値変換する
方法が有効である。
Color image (YMC image, Y: yellow,
When performing band processing on (M: magenta, C: cyan), it is effective to preferentially convert four values into a binary value for a color (for example, yellow) whose processing difference is not noticeable for each band.

【0101】これを説明するための全体構成図を図18
に示す。符号化処理は、Yのバンド、Mのバンド、Cの
バンド、Yのバンド、Mのバンドという順番で、図13
と同様に4値、2値ディザ処理の切り換えによる符号化
を行う。以上の切り換え処理を含む図13と異なるRG
Bの切り換え制御等はRGB切り換え制御部34により
行われ、RGB切り換え制御部34はセレクタ28のR
GB毎の切り換えや、バンド単位にRGB信号の発生符
号量の累積を行う際に伴う切り換え処理の制御等も行
う。
FIG. 18 is an overall configuration diagram for explaining this.
Shown in The encoding process is performed in the order of Y band, M band, C band, Y band, and M band in FIG.
Similarly to the above, encoding is performed by switching between 4-value and 2-value dither processing. RG different from FIG. 13 including the above switching processing
The B switching control and the like are performed by the RGB switching control unit 34, and the RGB switching control unit 34 controls the R of the selector 28.
It also controls the switching for each GB and controls the switching process that accompanies the accumulation of the generated code amount of the RGB signals in band units.

【0102】図19は、各バンドの色毎に切り換えフラ
グをつけた場合の例を示している。組み合わせは、モー
ド0からモード3までの4種類ある。
FIG. 19 shows an example in which a switching flag is set for each color of each band. There are four types of combinations from mode 0 to mode 3.

【0103】モード0はYMCの各バンドが4値ディザ
圧縮行う場合を示す。
Mode 0 shows the case where each band of YMC performs 4-level dither compression.

【0104】モード1はYが2値ディザ圧縮、MとCが
4値ディザ圧縮を行う場合を示す。
Mode 1 shows a case where Y performs binary dither compression and M and C perform quaternary dither compression.

【0105】モード2はYCが2値ディザ圧縮、Mが4
値ディザ圧縮を行う場合を示す。
In mode 2, YC is binary dither compression and M is 4
The case where value dither compression is performed is shown.

【0106】モード3はYMC各バンドが2値ディザ圧
縮を行う場合を示している。
Mode 3 shows a case where each YMC band performs binary dither compression.

【0107】これらは、目標符号量と発生符号量との比
較結果に基づいて切り換えていく。
These are switched based on the comparison result of the target code amount and the generated code amount.

【0108】例えば、目標符号量よりもかなり発生符号
量の方が小さい場合には、モード0の圧縮を行い、これ
より大きくなるに従ってモード1、モード2、モード3
を使うように制御する。
For example, when the generated code amount is considerably smaller than the target code amount, mode 0 compression is performed, and as it becomes larger, mode 1, mode 2 and mode 3
Control to use.

【0109】具体的なモード切り換えの一例を示す。図
20はモードの切り換えテーブルである。目標符号量と
発生符号量の差が許容範囲内か許容範囲外かで4つの場
合に分類し、夫々に対応するテーブルに従ってモードを
切り換える。
An example of specific mode switching will be shown. FIG. 20 is a mode switching table. There are four cases in which the difference between the target code amount and the generated code amount is within the permissible range or outside the permissible range, and the modes are switched according to the corresponding tables.

【0110】発生符号量が許容範囲よりも小さい場合に
は現在の符号化モードが0の場合には0、モードが1の
場合には0、モードが2の場合には0、モードが3の場
合には1に切り換えることにより大幅に圧縮率を下げ
る。
When the generated code amount is smaller than the allowable range, 0 is set if the current coding mode is 0, 0 if the mode is 1, 0 if the mode is 2, and 3 if the mode is 3. In this case, the compression rate is significantly reduced by switching to 1.

【0111】発生符号量が目標符号量よりも小さく、許
容範囲以内にある時には、現在の符号化モードが0の場
合には0、モードが1の場合には0、モードが2の場合
には1、モードが3の場合には2に切り換えることによ
りある程度圧縮率を下げる。
When the generated code amount is smaller than the target code amount and is within the allowable range, 0 when the current coding mode is 0, 0 when the mode is 1 and 2 when the mode is 2. When the mode is 1 and the mode is 3, the compression rate is lowered to some extent by switching to the mode 2.

【0112】発生符号量が目標符号量よりも大きく、許
容範囲以内にある時には、現在の符号化モードが0の場
合には1、モードが1の場合には2、モードが2の場合
には3、モードが3の場合には3に切り換えることによ
りある程度圧縮率を上げる。
When the generated code amount is larger than the target code amount and is within the allowable range, it is 1 when the current coding mode is 0, 2 when the mode is 1, and 2 when the mode is 2. 3. If the mode is 3, the compression rate is increased to some extent by switching to 3.

【0113】発生符号量が許容範囲よりも大きい場合に
は現在の符号化モードが0の場合には2、モードが1の
場合には3、モードが2の場合には3、モードが3の場
合には3に切り換えることにより大幅に圧縮率を上げ
る。
When the generated code amount is larger than the allowable range, the current coding mode is 0, the mode is 2, the mode is 3, the mode is 2, the mode is 3, and the mode is 3. In this case, the compression rate is greatly increased by switching to 3.

【0114】以上の様なモード切り換え処理により、カ
ラー画像を圧縮した際の符号量を制御することができ
る。
By the mode switching processing as described above, the code amount when the color image is compressed can be controlled.

【0115】また、視覚的に重要度の低い色成分信号に
対し高圧縮率の符号化を行うことにより、最終的に目標
符号量に抑えることができる。
Further, by encoding a color component signal of low visual importance with a high compression rate, the target code amount can be finally suppressed.

【0116】なお、以上の実施の形態において、色成分
信号をLabまたはYIQとしても良く、その際には視
覚的に重要度の低い色成分信号である色度信号の圧縮率
を制御することにより、視覚上の画像の劣化を抑えた符
号量の制御が可能となる。
In the above embodiments, the color component signal may be Lab or YIQ, in which case the compression rate of the chromaticity signal, which is a color component signal of low visual importance, is controlled. , It is possible to control the code amount while suppressing the deterioration of the image visually.

【0117】(第5の実施の形態)以上の実施の形態を
応用して、4値画像(4値ディザ画像)と2値画像(2
値ディザ画像)を画素単位に変更することにより、切り
換えノイズを目立たなくすることができる。
(Fifth Embodiment) By applying the above embodiments, a four-value image (four-value dither image) and a two-value image (two-value image)
By changing the value dither image) on a pixel-by-pixel basis, switching noise can be made inconspicuous.

【0118】図21に示す4値ディザ閾値は、上述の閾
値の組み合わせとは別の組み合わせのものであり、これ
による画像のパターンは図22の様になる。
The four-valued dither threshold value shown in FIG. 21 is a combination different from the combination of the above-mentioned threshold values, and the image pattern resulting therefrom is as shown in FIG.

【0119】図23は2×2のディザ画像を4個集めて
4×4画素グループをつくり、2値画像として扱う画素
位置の設定を変えて、モード0からモード3まで作った
例である。図の丸印がついた画素が4値ディザ画像内で
2値画像に置き変わる画素位置を示している。これら
は、上述した様に予定符号量と発生符号量とに応じて、
バンド単位にモードを切り換える様にする。
FIG. 23 shows an example in which four 2 × 2 dither images are collected to form a 4 × 4 pixel group, and the setting of the pixel position treated as a binary image is changed to create modes 0 to 3. Pixels with circles in the figure show pixel positions in which the binary image is replaced in the 4-value dither image. These are, according to the planned code amount and the generated code amount as described above,
Switch the mode in band units.

【0120】また第2〜第5の実施の形態において、第
1の実施の形態と同様に発生符号量が目標値以下になっ
ても良く、その際のフラグも変更しない。これにより最
終的な符号量を目標値以下に抑えることができる。
Further, in the second to fifth embodiments, the generated code amount may be equal to or less than the target value as in the first embodiment, and the flag at that time is not changed. As a result, the final code amount can be suppressed below the target value.

【0121】本実施の形態では、バンド内の最小限の領
域に対してのみ画質を変更することにより符号量制御す
るので、容易に発生符号量を制御できる。
In the present embodiment, since the code amount is controlled by changing the image quality only for the minimum area in the band, the generated code amount can be easily controlled.

【0122】以上第1〜第5の実施の形態において、符
号化済データの発生符号量に基づいて符号化対象データ
の符号化方法を制御するのでリアルタイムに符号化する
ことができる。
As described above, in the first to fifth embodiments, the encoding method of the data to be encoded is controlled based on the generated code amount of the encoded data, so that the data can be encoded in real time.

【0123】[0123]

【発明の効果】以上の様に本願発明は、符号化データの
質の劣化を抑制すると共に目標の圧縮率でデータを符号
化することができる。
As described above, according to the present invention, it is possible to suppress the deterioration of the quality of encoded data and encode the data at a target compression rate.

【0124】また、画像データの符号化において、符号
化による画質の劣化を抑制すると共に目標の圧縮率でデ
ータを符号化することができる。
Further, in the encoding of image data, it is possible to suppress the deterioration of the image quality due to the encoding and to encode the data at the target compression rate.

【0125】また、カラー画像データを符号化する際
に、視覚的な画像を劣化を抑えると共に、目標の圧縮率
でデータを符号化することができる。
Further, when encoding color image data, it is possible to suppress deterioration of a visual image and to encode the data at a target compression rate.

【図面の簡単な説明】[Brief description of the drawings]

【図1】第1実施の形態のブロック図FIG. 1 is a block diagram of a first embodiment.

【図2】4値ディザ回路のブロック図FIG. 2 is a block diagram of a four-value dither circuit.

【図3】4値ディザ閾値マトリクスFIG. 3 is a four-value dither threshold matrix

【図4】バンド分割の説明図FIG. 4 is an explanatory diagram of band division.

【図5】発生符号量に応じて符号化方法を切り換える処
理を説明する図
FIG. 5 is a diagram illustrating a process of switching an encoding method according to a generated code amount.

【図6】4値ディザ画像と2値ディザ画像混在時の符号
化処理の説明図
FIG. 6 is an explanatory diagram of encoding processing when a 4-valued dither image and a 2-valued dither image are mixed.

【図7】階調変換回路のブロック図FIG. 7 is a block diagram of a gradation conversion circuit.

【図8】予測部11のブロック図FIG. 8 is a block diagram of a prediction unit 11.

【図9】ディザ画像の参照画素位置の説明図FIG. 9 is an explanatory diagram of reference pixel positions of a dither image.

【図10】符号化部15のブロック図FIG. 10 is a block diagram of an encoding unit 15.

【図11】復号化部17のブロック図FIG. 11 is a block diagram of a decoding unit 17.

【図12】第2の実施の形態を説明する為の全体ブロッ
ク図
FIG. 12 is an overall block diagram for explaining a second embodiment.

【図13】第3の実施の形態を説明する為の全体ブロッ
ク図
FIG. 13 is an overall block diagram for explaining a third embodiment.

【図14】第3の実施の形態に用いる2値ディザ閾値を
示す図
FIG. 14 is a diagram showing a binary dither threshold used in the third embodiment.

【図15】圧縮部29の内部構成を示すブロック図FIG. 15 is a block diagram showing an internal configuration of a compression unit 29.

【図16】復号化部32のブロック図FIG. 16 is a block diagram of a decoding unit 32.

【図17】4値化されたときの13レベルのディザパタ
ーンの一例を示す図
FIG. 17 is a diagram showing an example of a 13-level dither pattern when quaternarized.

【図18】第4の実施の形態を説明するための全体構成
FIG. 18 is an overall configuration diagram for explaining a fourth embodiment.

【図19】各バンドの色毎に切り換えフラグをつけた場
合の例を示す図
FIG. 19 is a diagram showing an example in which a switching flag is added for each color of each band.

【図20】符号化モードの切り換えテーブルを示す図FIG. 20 is a diagram showing a coding mode switching table.

【図21】4値ディザ閾値マトリクス2FIG. 21 is a four-valued dither threshold matrix 2

【図22】4値化されたときの13レベルのディザパタ
ーンの一例を示す図
FIG. 22 is a diagram showing an example of a 13-level dither pattern when quaternarized.

【図23】2値画像データとして扱う画素位置の設定方
法を説明する図
FIG. 23 is a diagram illustrating a method of setting a pixel position treated as binary image data.

【符号の説明】 10 ディザ画像メモリ 11 予測部 12 予測判定部 13 階調変換部 14 発生符号量監視部 15 符号化部 16 圧縮メモリ 17 復号化部 18 復号化側の予測部 19 予測判定部 20 階調切換指示部 21 階調変換部 22 インターフェース部 26 フラグ記憶メモリ部[Description of Codes] 10 dither image memory 11 prediction unit 12 prediction determination unit 13 gradation conversion unit 14 generated code amount monitoring unit 15 encoding unit 16 compression memory 17 decoding unit 18 decoding side prediction unit 19 prediction determination unit 20 Gradation switching instruction section 21 Gradation conversion section 22 Interface section 26 Flag storage memory section

Claims (18)

【特許請求の範囲】[Claims] 【請求項1】 データを所定単位毎に順次符号化する情
報処理装置において、 符号化済のデータの発生符号量を監視する監視手段と、 該発生符号量に応じて、符号化対象データを可逆符号化
するか非可逆符号化するかを制御する制御手段と、 該制御手段により制御された結果に基づいて前記符号化
対象データを符号化する符号化手段とを有することを特
徴とする情報処理装置。
1. An information processing apparatus for sequentially encoding data in units of a predetermined unit, monitoring means for monitoring the generated code amount of encoded data, and reversible encoding target data according to the generated code amount. Information processing characterized by having control means for controlling encoding or lossy encoding, and encoding means for encoding the encoding target data based on the result controlled by the control means. apparatus.
【請求項2】 前記監視手段による発生符号量の監視
は、符号化される画像データを複数個に分割して生成さ
れたバンド単位に行われることを特徴とする請求項1に
記載の情報処理装置。
2. The information processing according to claim 1, wherein the monitoring of the generated code amount by the monitoring unit is performed for each band generated by dividing the encoded image data into a plurality of pieces. apparatus.
【請求項3】 前記制御手段による制御は、発生符号量
が許容範囲以上の際に非可逆符号化手段に切り換え、発
生符号量が許容範囲以下の際に可逆符号化手段に切り換
えることを特徴とする請求項1に記載の情報処理装置。
3. The control by the control means is switched to the lossy encoding means when the generated code amount is above the allowable range and switched to the lossless encoding means when the generated code amount is below the allowable range. The information processing device according to claim 1.
【請求項4】 前記可逆符号化及び非可逆符号化は、多
値画像のDPCM符号化であることを特徴とする請求項
1に記載の情報処理装置。
4. The information processing apparatus according to claim 1, wherein the lossless encoding and the lossy encoding are DPCM encoding of a multi-valued image.
【請求項5】 前記符号化手段による符号化において、
該制御手段により制御された結果に基づいて量子化パラ
メータを切り換えて用いることを特徴とする請求項4に
記載の情報処理装置。
5. In the encoding by the encoding means,
The information processing apparatus according to claim 4, wherein the quantization parameter is switched and used based on a result controlled by the control means.
【請求項6】 前記可逆符号化はN値画像データの符号
化であり、前記非可逆符号化は該N値画像データが変換
されたM値画像データの符号化であることを特徴とする
請求項1に記載の情報処理装置。
6. The lossless encoding is encoding of N-valued image data, and the lossy encoding is encoding of M-valued image data obtained by converting the N-valued image data. The information processing device according to item 1.
【請求項7】 データを所定単位毎に順次符号化する情
報処理方法において、 符号化済のデータの発生符号量を監視する監視ステップ
と、 該発生符号量に応じて、符号化対象データを可逆符号化
するか非可逆符号化するかを制御する制御ステップと、 該制御ステップで制御された結果に基づいて前記符号化
対象データを符号化する符号化ステップとを有すること
を特徴とする情報処理方法。
7. An information processing method for sequentially encoding data in predetermined units, a monitoring step of monitoring a generated code amount of encoded data, and reversible encoding target data according to the generated code amount. Information processing characterized by having a control step of controlling whether to perform encoding or lossy encoding, and an encoding step of encoding the data to be encoded based on a result controlled by the control step. Method.
【請求項8】 画像データを中間調処理する中間調処理
手段と、 該中間調処理手段により中間調処理された画像データを
符号化した際の発生符号量を監視する監視手段と、 該発生符号量に応じて、前記中間調処理手段による中間
調処理方法を制御する制御手段と、 該制御手段による制御に基づいて中間調処理された画像
データを符号化する符号化手段とを有することを特徴と
する情報処理装置。
8. A halftone processing means for performing halftone processing on image data, a monitoring means for monitoring a generated code amount when the image data halftone processed by the halftone processing means is coded, and the generated code. A control means for controlling the halftone processing method by the halftone processing means according to the amount; and an encoding means for encoding the halftone processed image data under the control of the control means. Information processing device.
【請求項9】 前記中間調処理手段は、M値画像データ
を、M>NであるN値画像データに変換することを特徴
とする請求項8に記載の情報処理装置。
9. The information processing apparatus according to claim 8, wherein the halftone processing means converts the M-value image data into N-value image data with M> N.
【請求項10】 前記発生符号量は、符号化済のデータ
を符号化した際の符号量であることを特徴とする請求項
8に記載の情報処理装置。
10. The information processing apparatus according to claim 8, wherein the generated code amount is a code amount when the encoded data is encoded.
【請求項11】 前記中間調処理手段はM値画像データ
を生成する処理第1の処理手段と、M値画像データとは
異なるN値画像データを生成する処理第2の処理手段と
を有することを特徴とする請求項8に記載の情報処理装
置。
11. The halftone processing means has a processing first processing means for generating M-value image data and a processing second processing means for generating N-value image data different from the M-value image data. The information processing apparatus according to claim 8, wherein
【請求項12】 画像データを中間調処理する中間調処
理ステップと、 該中間調処理ステップで中間調処理された画像データを
符号化した際の発生符号量を監視する監視ステップと、 該発生符号量に応じて、前記中間調処理手段による中間
調処理方法を制御する制御ステップと、 該制御ステップでの制御に基づいて中間調処理された画
像データを符号化する符号化ステップとを有することを
特徴とする情報処理方法。
12. A halftone processing step of performing halftone processing of image data, a monitoring step of monitoring a generated code amount when the image data subjected to the halftone processing in the halftone processing step is monitored, and the generated code. A control step for controlling the halftone processing method by the halftone processing means in accordance with the amount; and an encoding step for encoding the halftone-processed image data based on the control in the control step. A characteristic information processing method.
【請求項13】 カラー画像データを所定単位毎に符号
化する情報処理装置において、 符号化済のカラー画像データの発生符号量を監視する監
視手段と、 該発生符号量に応じて符号化対象のカラー画像データの
圧縮率を制御する制御手段と、 該制御手段により制御された結果に基づいて前記符号化
対象データを符号化する符号化手段とを有することを特
徴とする情報処理装置。
13. An information processing apparatus for encoding color image data for each predetermined unit, monitoring means for monitoring the generated code amount of coded color image data, and an encoding target for encoding in accordance with the generated code amount. An information processing apparatus comprising: a control unit that controls a compression ratio of color image data; and an encoding unit that encodes the encoding target data based on a result controlled by the control unit.
【請求項14】 前記制御手段による圧縮率の制御は、
前記カラー画像データの各色成分データに割り当てられ
る圧縮率の比を変更することを特徴とする請求項13に
記載の情報処理装置。
14. The control of the compression rate by the control means comprises:
The information processing apparatus according to claim 13, wherein a ratio of compression ratios assigned to each color component data of the color image data is changed.
【請求項15】 カラー画像データを所定単位毎に符号
化する情報処理方法において、 符号化済のカラー画像データの発生符号量を監視する監
視ステップと、 該発生符号量に応じて符号化対象のカラー画像データの
圧縮率を制御する制御ステップと、 該制御ステップで制御された結果に基づいて前記符号化
対象データを符号化する符号化ステップとを有すること
を特徴とする情報処理方法。
15. An information processing method for encoding color image data for each predetermined unit, the monitoring step of monitoring the generated code amount of encoded color image data, and the encoding target of the encoded object according to the generated code amount. An information processing method comprising: a control step of controlling a compression rate of color image data; and an encoding step of encoding the encoding target data based on a result controlled by the control step.
【請求項16】 画面を複数のブロックに分割する分割
手段と、 発生符号量を監視する監視手段と、 該発生符号量に応じて、前記複数のブロックの各々の圧
縮方法を制御する制御手段とを有し、 該制御手段による圧縮方法の制御は、前記ブロック内に
N値画像とM値画像(N≠M)を混在させることを特徴
とする情報処理装置。
16. A dividing unit for dividing a screen into a plurality of blocks, a monitoring unit for monitoring a generated code amount, and a control unit for controlling a compression method of each of the plurality of blocks according to the generated code amount. The information processing apparatus, characterized in that the control means controls the compression method by mixing N-valued images and M-valued images (N ≠ M) in the block.
【請求項17】 前記制御手段による圧縮方法の制御
は、前記ブロック内に混在するN値画像とM値画像(N
≠M)の比率を制御することを特徴とする請求項16に
記載の情報処理装置。
17. The control of the compression method by the control means is such that N-value images and M-value images (N
The information processing apparatus according to claim 16, wherein a ratio of ≠ M) is controlled.
【請求項18】 画面を複数のブロックに分割する分割
ステップと、 発生符号量を監視する監視ステップと、 該発生符号量に応じて、前記複数のブロックの各々の圧
縮方法を制御する制御ステップとを有し、 該制御ステップでの圧縮方法の制御は、前記ブロック内
にN値画像とM値画像(N≠M)を混在させることを特
徴とする情報処理方法。
18. A dividing step of dividing a screen into a plurality of blocks, a monitoring step of monitoring a generated code amount, and a control step of controlling a compression method of each of the plurality of blocks according to the generated code amount. The information processing method, wherein the control of the compression method in the control step includes mixing an N-value image and an M-value image (N ≠ M) in the block.
JP7304374A 1995-11-22 1995-11-22 Information processor and information processing method Pending JPH09149260A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP7304374A JPH09149260A (en) 1995-11-22 1995-11-22 Information processor and information processing method
US08/753,006 US6266449B1 (en) 1995-11-22 1996-11-19 Information processing apparatus and method which selectively controls data encoding by monitoring amount of encoded data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7304374A JPH09149260A (en) 1995-11-22 1995-11-22 Information processor and information processing method

Publications (1)

Publication Number Publication Date
JPH09149260A true JPH09149260A (en) 1997-06-06

Family

ID=17932256

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7304374A Pending JPH09149260A (en) 1995-11-22 1995-11-22 Information processor and information processing method

Country Status (1)

Country Link
JP (1) JPH09149260A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005114980A1 (en) * 2004-05-20 2005-12-01 Seiko Epson Corporation Dot data processing device, image processing system, and image data processing device
WO2006035512A1 (en) * 2004-09-29 2006-04-06 Tadahiro Ohmi Data reproduction device, reproduction method, data compression device, and compression method
JP2007181051A (en) * 2005-12-28 2007-07-12 Seiko Epson Corp Image encoding device and method
US20080212130A1 (en) * 2007-02-21 2008-09-04 Samsung Electronics Co., Ltd. Data file compression apparatus and method thereof
US7486829B2 (en) 2004-03-18 2009-02-03 Ricoh Company, Ltd. Apparatus and method for image processing, and computer product
WO2009054248A1 (en) * 2007-10-26 2009-04-30 Fujifilm Corporation Data compression device, data compression program, imaging device
US7835582B2 (en) 2006-03-02 2010-11-16 Canon Kabushiki Kaisha Image encoding apparatus and control method thereof
US7916954B2 (en) 2006-09-15 2011-03-29 Canon Kabushiki Kaisha Image encoding apparatus and control method thereof
WO2012160626A1 (en) * 2011-05-20 2012-11-29 富士通株式会社 Image compression device, image restoration device, and program

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7486829B2 (en) 2004-03-18 2009-02-03 Ricoh Company, Ltd. Apparatus and method for image processing, and computer product
WO2005114980A1 (en) * 2004-05-20 2005-12-01 Seiko Epson Corporation Dot data processing device, image processing system, and image data processing device
US7813007B2 (en) 2004-05-20 2010-10-12 Seiko Epson Corporation Image processing system determining dot formation for each pixel group and method for the same
WO2006035512A1 (en) * 2004-09-29 2006-04-06 Tadahiro Ohmi Data reproduction device, reproduction method, data compression device, and compression method
JP2007181051A (en) * 2005-12-28 2007-07-12 Seiko Epson Corp Image encoding device and method
US7835582B2 (en) 2006-03-02 2010-11-16 Canon Kabushiki Kaisha Image encoding apparatus and control method thereof
US7916954B2 (en) 2006-09-15 2011-03-29 Canon Kabushiki Kaisha Image encoding apparatus and control method thereof
US20080212130A1 (en) * 2007-02-21 2008-09-04 Samsung Electronics Co., Ltd. Data file compression apparatus and method thereof
WO2009054248A1 (en) * 2007-10-26 2009-04-30 Fujifilm Corporation Data compression device, data compression program, imaging device
WO2012160626A1 (en) * 2011-05-20 2012-11-29 富士通株式会社 Image compression device, image restoration device, and program
JPWO2012160626A1 (en) * 2011-05-20 2014-07-31 富士通株式会社 Image compression apparatus, image restoration apparatus, and program

Similar Documents

Publication Publication Date Title
US6266449B1 (en) Information processing apparatus and method which selectively controls data encoding by monitoring amount of encoded data
US5363219A (en) Image processing method and apparatus
EP0535963B1 (en) Orthogonal transformation encoder
US6233355B1 (en) Encoding apparatus and method and storage medium
JP2794281B2 (en) Code decoding processor for dither signal
US5317411A (en) Image encoding
EP0858210A1 (en) Image processing apparatus
US5761342A (en) Image processing apparatus and method
JPH09149260A (en) Information processor and information processing method
US6266440B1 (en) Color image data compressing apparatus
JPH09261067A (en) Information processor and its method
JP2952007B2 (en) Image coding device
JP3119373B2 (en) Image coding device
JP2832059B2 (en) Color image encoding device
JP2872334B2 (en) Color image encoding device
JPH046948A (en) Binarizing method for color picture
JPH04316279A (en) Color picture encoder
JPH0937081A (en) Device and method for processing picture
JPH0993440A (en) Multi-value image processor
JP2667860B2 (en) Image processing method and apparatus
Gharavi Conditional variable-length coding for gray-level pictures
JP2002344753A (en) Image encoder, image decoder, and image encoding and decoding device, and their method
JPH05145766A (en) Image processor
JP3427659B2 (en) Adaptive quantization for orthogonal transform coding
JP2000244751A (en) Binary coding method for multilevel image and binary encoder for multilevel image

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040521

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040601

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040730

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041019

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050301