JP3235510B2 - Encoding method and encoding device, decoding method and decoding device - Google Patents

Encoding method and encoding device, decoding method and decoding device

Info

Publication number
JP3235510B2
JP3235510B2 JP9617597A JP9617597A JP3235510B2 JP 3235510 B2 JP3235510 B2 JP 3235510B2 JP 9617597 A JP9617597 A JP 9617597A JP 9617597 A JP9617597 A JP 9617597A JP 3235510 B2 JP3235510 B2 JP 3235510B2
Authority
JP
Japan
Prior art keywords
data
prediction
context
unit
value
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.)
Expired - Lifetime
Application number
JP9617597A
Other languages
Japanese (ja)
Other versions
JPH10290166A (en
Inventor
徳明 土屋
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP9617597A priority Critical patent/JP3235510B2/en
Publication of JPH10290166A publication Critical patent/JPH10290166A/en
Application granted granted Critical
Publication of JP3235510B2 publication Critical patent/JP3235510B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/004Predictors, e.g. intraframe, interframe coding

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像データとその
属性データとが混在するデータ列や、多値画像をレベル
プレーン展開したデータ列などを符号化する符号化方法
及びその装置、および、そのような符号化方法、装置に
よって符号化された符号データを復号する復号化方法お
よびその装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an encoding method and apparatus for encoding a data string in which image data and its attribute data are mixed, a data string obtained by expanding a multi-valued image into a level plane, and the like, and an encoding method therefor. The present invention relates to a decoding method for decoding encoded data encoded by such an encoding method and apparatus, and an apparatus therefor.

【0002】[0002]

【従来の技術】2値画像の符号化技術の1つとして、周
辺の画素から注目画素の状態を予測し、予測した結果を
符号化する予測符号化方式がある。予測符号化において
は、注目画素と相関関係があると思われる周囲画素をマ
ルコフ情報源として予測に用いる。
2. Description of the Related Art As one of coding techniques for a binary image, there is a prediction coding method for predicting a state of a target pixel from peripheral pixels and coding a result of the prediction. In predictive coding, surrounding pixels considered to have a correlation with a target pixel are used for prediction as a Markov information source.

【0003】予測方式には、予測値を直接決定する方法
と、間接的に決定する方法が知られている。予測値を直
接決定する方法としては、例えば特開平5−31637
0号公報で示されるように、複数の予測器の中から的中
率の高い予測器を適応的に切り替え、最終的に1つの予
測器を選択し、原画像の予測に使用する方法がある。ま
た、予測値を間接的に決定する方法としては、例えば、
予測値等の情報をメモリに格納し、周辺の画素値からメ
モリの情報を読み出して予測に使用する方法がある。
As the prediction method, there are known a method of directly determining a predicted value and a method of indirectly determining a predicted value. As a method of directly determining a predicted value, for example, Japanese Patent Laid-Open No. 5-31637
As disclosed in Japanese Patent Laid-Open No. 0, there is a method in which a predictor with a high hit ratio is adaptively switched from a plurality of predictors, and one predictor is finally selected and used for prediction of an original image. . Also, as a method of indirectly determining the predicted value, for example,
There is a method in which information such as a predicted value is stored in a memory, and information in the memory is read from peripheral pixel values and used for prediction.

【0004】特公平6−95645号公報に開示されて
いる予測方式は、後者のメモリを用いた間接的に予測値
を決定する予測方式であり、周辺の複数画素の値をアド
レスとして、テーブルルクアップ方式で出力される予測
値を用い、予測誤差データを生成している。しかし、予
測画素の位置を全て固定とはせず、1画素のみ位置を可
変にし、予測的中率によって予測位置を変更させている
方式をとっている。ITU−T T.82、T−85で
定められたJBIG(Joint Bi−level
Image coding expert Grou
p)で用いられる予測方式は、上述の特公平6−956
45号公報に示されている予測方式であり、符号化状態
によって予測メモリの情報を更新していく学習型の方式
が採用されている。符号化には、注目画素を上述の予測
方式で予測した結果である予測誤差データが使用され
る。
A prediction method disclosed in Japanese Patent Publication No. 6-95645 is a latter prediction method in which a prediction value is indirectly determined using a memory. The prediction error data is generated using the prediction value output in the up-up method. However, all the positions of the predicted pixels are not fixed, but the position of only one pixel is made variable, and the predicted position is changed by the predictive accuracy. ITU-TT. 82, JBIG (Joint Bi-level) defined by T-85
Image coding expert Grou
The prediction method used in p) is the above-mentioned Japanese Patent Publication No. 6-956.
In the prediction method disclosed in Japanese Patent Publication No. 45, a learning type method in which information in a prediction memory is updated according to an encoding state is adopted. For encoding, prediction error data that is a result of predicting a target pixel by the above-described prediction method is used.

【0005】JBIGにおいては、予測誤差データを符
号化する符号化部に、算術符号化が採用された。算術符
号化は、例えば特公平1−17295号公報に示されて
いるように、数直線上の領域を入力されたシンボルの
1,0の発生確率に合わせて分割し、入力シンボルの値
によって領域を選択する。このとき、予測と一致したシ
ンボル(優勢シンボル)をMPS(More Prob
able Symbol)、一致しないシンボル(劣性
シンボル)をLPS(Less Probable S
ymbol)と呼ぶ。このMPS、LPSの発生確率推
定値は、予測的中率などによって変化させる。JBIG
では、シンボルの出現確率の推定部にLPS発生時の確
率値(=領域幅LSZ)を持たせるとともに、その確率
推定値をシンボルの出現過程に応じて更新する学習機能
を持たせている。確率推定の学習機能は上述の予測値の
学習機能と連動する。この分割選択処理を情報源の出力
系列の分だけ行ない、最終段の分割で得られた領域内の
1点の2進小数表示で出力系列を表わす。
[0005] In JBIG, arithmetic coding is employed in a coding unit for coding prediction error data. In arithmetic coding, for example, as shown in Japanese Patent Publication No. 1-17295, a region on a number line is divided according to the probability of occurrence of 1,0 of an input symbol, and the region is divided by the value of an input symbol. Select At this time, a symbol (dominant symbol) that matches the prediction is assigned to MPS (More Probe).
Able Symbol), a symbol that does not match (recessive symbol) is converted to an LPS (Less Probable S
ymbol). The estimated value of occurrence probability of MPS and LPS is changed by predictive predictive value or the like. JBIG
In the above, the symbol appearance probability estimating unit has a probability value (= region width LSZ) at the time of LPS occurrence and a learning function of updating the probability estimation value in accordance with the symbol appearance process. The learning function of the probability estimation is linked with the learning function of the predicted value described above. This division selection process is performed for the output sequence of the information source, and the output sequence is represented by a binary decimal representation of one point in the area obtained by the final division.

【0006】図13は、算術符号化の概念図である。斜
線で示した領域が、それぞれシンボルの符号化終了後の
有効領域である。初期状態では、有効領域は[0,1)
区間であり、LPS発生時の領域幅LSZ(0)が設定
されている。1−LSZ(0)がMPS発生時の領域幅
である。ここではシンボルが「0」のときをMPS、
「1」のときをLPSとする。図13において確率値は
2進数で示している。
FIG. 13 is a conceptual diagram of arithmetic coding. The shaded areas are the effective areas after the symbol encoding is completed. In the initial state, the effective area is [0, 1).
This is a section, and the area width LSZ (0) at the time of LPS occurrence is set. 1-LSZ (0) is the area width when MPS occurs. Here, when the symbol is “0”, MPS,
LPS is defined as “1”. In FIG. 13, the probability values are represented by binary numbers.

【0007】図13では、最初に入力されたシンボルが
「0」であるので、MPSの発生により有効領域は図1
3(A)においてハッチングを施した領域となる。そし
てこの有効領域内をLPS発生時とMPS発生時の領域
に分割する新たな領域幅LSZ(1)を設定する。次の
シンボルが「1」のときは、LPSの発生により図13
(B)においてハッチングを施した領域が有効領域とな
る。同様にして、3番目のシンボルが「0」のとき、図
13(C)においてハッチングを施した領域が有効領域
となり、さらに4番目のシンボルが「1」のとき、図1
3(D)においてハッチングを施した領域が有効領域と
なる。
[0007] In FIG. 13, since the first input symbol is “0”, the effective area is changed as shown in FIG.
3 (A) is a hatched area. Then, a new area width LSZ (1) for dividing the effective area into areas at the time of LPS generation and at the time of MPS generation is set. When the next symbol is "1", the occurrence of LPS causes
In (B), the hatched area is the effective area. Similarly, when the third symbol is “0”, the hatched area in FIG. 13C becomes an effective area, and when the fourth symbol is “1”, FIG.
The area shaded in 3 (D) becomes the effective area.

【0008】出力される符号はCで表わされる。入力さ
れたシンボル列「0101」に対する符号は、図13
(D)における有効領域内の1点とすればよい。ここで
は、有効領域の基底、すなわち有効領域の最も小さい値
C(3)を符号として表わし、出力することになる。
The output code is represented by C. The code for the input symbol sequence “0101” is shown in FIG.
What is necessary is just one point in the effective area in (D). Here, the base of the effective area, that is, the smallest value C (3) of the effective area is represented as a code and output.

【0009】算術符号化においては、符号化の過程で、
有効領域の1点を符号とするため、領域を大きくとれ
ば、有効桁が減り符号量が減る。つまり、MPS発生時
にはなるべくLSZの値を小さくし、LPS発生時には
なるべくLSZの値を大きくすることによって、有効領
域を多く確保でき、符号量を減らすことができる。
In arithmetic coding, during the coding process,
Since one point in the effective area is used as a code, if the area is made large, the effective digits are reduced and the code amount is reduced. That is, by reducing the value of LSZ as much as possible when MPS occurs and increasing the value of LSZ as much as possible when LPS occurs, it is possible to secure a large effective area and reduce the code amount.

【0010】図14は、JBIGで採用されている予測
符号化方式の概略図である。図中、1は画像データ、2
はコンテキスト生成部、3はコンテキスト、4は予測
部、5はステート、6は確率推定テーブル、7はLSZ
およびSW、8は予測値、9は算術符号化部、10は符
号データ、11は書き換えデータ、12は書き換え信号
である。
FIG. 14 is a schematic diagram of a predictive coding system employed in JBIG. In the figure, 1 is image data, 2
Is a context generation unit, 3 is a context, 4 is a prediction unit, 5 is a state, 6 is a probability estimation table, 7 is LSZ
SW and 8 are prediction values, 9 is an arithmetic coding unit, 10 is code data, 11 is rewrite data, and 12 is a rewrite signal.

【0011】画像データ1は、符号化のために算術符号
化部9に入力されるとともに、コンテキスト生成部2に
入力される。コンテキスト生成部2においては、注目画
素の予測を行なうために、周辺画素を使用して予測のモ
デルテンプレートを作成する。図15は、JBIGで使
用されるテンプレートの一例の説明図である。Pを注目
画素とすると、図15に示す参照画素X9 〜X0 を使用
するテンプレートが生成される。この参照画素X9 〜X
0 の値が210状態(コンテキスト)の10重マルコフ情
報源となり、そのまま予測部4にコンテキスト3として
入力され、予測に使用される。
The image data 1 is input to an arithmetic coding unit 9 for coding, and is also input to a context generation unit 2. The context generation unit 2 creates a prediction model template using neighboring pixels in order to predict a target pixel. FIG. 15 is an explanatory diagram of an example of a template used in JBIG. Assuming that P is the target pixel, a template using the reference pixels X 9 to X 0 shown in FIG. 15 is generated. The reference pixels X 9 to X 9
A value of 0 becomes a 10-fold Markov information source of 2 10 states (contexts), and is directly input to the prediction unit 4 as a context 3 and used for prediction.

【0012】予測部4には、参照画素X9 〜X0 の値に
対応した予測値8と、確率推定テーブル6を参照するた
めのステート5とを対にした予測テーブルが記憶されて
いる。参照画素X9 〜X0 の値であるコンテキスト3が
そのまま予測テーブルにアドレスとして入力され、予測
テーブルの1024個のエントリのいずれかが選択され
る。コンテキスト3により選択された予測テーブルのエ
ントリから予測値8およびステート5を取り出し、予測
値8を算術符号化部9へ入力し、また、ステート5を確
率推定テーブル6に入力する。図16は、予測部4に記
憶されている予測テーブルの一例の説明図である。図1
6に示した予測テーブルは、アドレスに対応して、予測
値とステートが対になって格納されている。なお、アド
レスは2進数で示しているが、これはコンテキストコン
テキスト3として入力される参照画素X9 〜X0 のそれ
ぞれの画素値に対応するものである。例えば、参照画素
0 の値のみが「1」で他の参照画素は「0」であれ
ば、アドレス「0000000001」が参照され、予
測値「1」とステート「2」が得られる。
The prediction unit 4 stores a prediction table in which a prediction value 8 corresponding to the values of the reference pixels X 9 to X 0 and a state 5 for referring to the probability estimation table 6 are paired. The context 3 that is the value of the reference pixels X 9 to X 0 is directly input as an address into the prediction table, and one of the 1024 entries in the prediction table is selected. The predicted value 8 and the state 5 are extracted from the entry of the prediction table selected by the context 3, the predicted value 8 is input to the arithmetic coding unit 9, and the state 5 is input to the probability estimation table 6. FIG. 16 is an explanatory diagram of an example of the prediction table stored in the prediction unit 4. FIG.
The prediction table shown in FIG. 6 stores a pair of a predicted value and a state corresponding to an address. Note that the address is indicated by a binary number, which corresponds to each pixel value of the reference pixels X 9 to X 0 input as the context 3. For example, if only the value of the reference pixel X 0 is “1” and the other reference pixels are “0”, the address “00000000001” is referred to, and the predicted value “1” and the state “2” are obtained.

【0013】確率推定テーブル6は、ステート5に対応
して、LPS発生時の領域幅LSZと、LPS発生時の
次のステート値であるNLPSおよびMPS発生時の次
のステート値であるNMPS、さらに正規化発生時に予
測値を書き換えるか否かを示すフラグであるSWが格納
されている。入力されたステート5に対応するLSZお
よびSW7を算術符号化部9に出力するとともに、NM
PS,NLPSを書き換えデータ11の一部として予測
部4へ送る。図17は、確率推定テーブル6の一例の説
明図である。図17では、ステート5の番号に対応し
て、LSZ、NMPS、NLPS、SWを対にして格納
している。例えばステートが「2」のとき、LSZとし
て「0x1114」、NLPSとして「16」、NMP
Sとして「3」、SWとして「0」が得られる。ここ
で、「0x」で始まる数値は16進数である。
The probability estimation table 6 corresponds to the state 5 and includes a region width LSZ when an LPS occurs, NLPS as a next state value when an LPS occurs, and NMPS as a next state value when an MPS occurs. SW, which is a flag indicating whether or not the predicted value is rewritten when the normalization occurs, is stored. The LSZ and SW7 corresponding to the input state 5 are output to the arithmetic coding unit 9, and NM
The PS and the NLPS are sent to the prediction unit 4 as a part of the rewrite data 11. FIG. 17 is an explanatory diagram of an example of the probability estimation table 6. In FIG. 17, LSZ, NMPS, NLPS, and SW are stored as a pair corresponding to the state 5 number. For example, when the state is “2”, the LSZ is “0x1114”, the NLPS is “16”, and the NMP
"3" is obtained as S and "0" is obtained as SW. Here, numerical values starting with “0x” are hexadecimal numbers.

【0014】算術符号化部9では、予測部4から入力さ
れる予測値8と画像データ1とを比較し、一致していれ
ば符号化するシンボルを「0」、すなわちMPSが発生
したものとし、不一致であれば符号化するシンボルを
「1」、すなわちLPSが発生したものとする。そして
確率推定テーブル6から入力されるLSZを用い、図1
3で概略説明したように算術符号化を行なって符号デー
タ10を出力する。LPSが発生した場合には、確率推
定テーブル6から入力されるSWが予測値の書き換えを
可能としている場合(例えばSWが「1」の場合)に限
り、予測値を反転した新予測値を書き換えデータ11の
一部として予測部4に送るとともに書き換え信号12を
送り、予測部4に記憶されている予測テーブルの予測値
を書き換える。
The arithmetic coding unit 9 compares the prediction value 8 input from the prediction unit 4 with the image data 1, and if the values match, it is assumed that the symbol to be coded is "0", that is, that MPS has occurred. If they do not match, it is assumed that the symbol to be encoded is "1", that is, LPS has occurred. Using the LSZ input from the probability estimation table 6, FIG.
The arithmetic coding is performed as described in 3 and the code data 10 is output. When the LPS occurs, the new predicted value obtained by inverting the predicted value is rewritten only when the SW input from the probability estimation table 6 enables the rewriting of the predicted value (for example, when the SW is “1”). The data is sent to the prediction unit 4 as a part of the data 11 and the rewrite signal 12 is sent to rewrite the prediction value of the prediction table stored in the prediction unit 4.

【0015】JBIGにおいては、算術符号化部9にお
いて、有効領域の有効桁を増やさないよう、有効領域は
つねに0.5以上1未満となるように調整されている。
この処理を正規化と呼ぶ。またLSZの値は必ず0.5
未満の値となるように確率推定テーブルを構成してお
く。これにより、LPS発生時には有効領域は0.5未
満となり、必ず正規化が発生する。さらに、MPS発生
時においても、新有効領域は、現有効領域から、LSZ
を減算して求めるため0.5未満となる可能性があり、
正規化が発生するケースがある。この正規化が発生した
場合に、予測部4に対して書き換え信号12を送る。予
測部4では、MPS発生時には確率推定テーブル6から
与えられるNMPSを、コンテキスト生成部2から与え
られているコンテキスト3のステートとして予測テーブ
ルに書き込む。また、LPS発生時には、確率推定テー
ブル6から与えられるNLPSをコンテキスト3のステ
ートとして予測テーブルに書き込む。このようにして予
測テーブルが更新された後、次の画像データ1について
の処理を開始する。
In the JBIG, the arithmetic coding unit 9 is adjusted so that the effective area is always 0.5 or more and less than 1 so as not to increase the effective digits of the effective area.
This process is called normalization. The value of LSZ is always 0.5
The probability estimation table is configured so as to be a value less than or equal to. As a result, the effective area becomes less than 0.5 when LPS occurs, and normalization always occurs. Further, even when the MPS occurs, the new effective area is set to the LSZ from the current effective area.
May be less than 0.5 because it is obtained by subtracting
There are cases where normalization occurs. When this normalization occurs, a rewrite signal 12 is sent to the prediction unit 4. The prediction unit 4 writes the NMPS given from the probability estimation table 6 to the prediction table as the state of the context 3 given from the context generation unit 2 when the MPS occurs. When an LPS occurs, the NLPS provided from the probability estimation table 6 is written to the prediction table as the state of the context 3. After the prediction table is updated in this way, the processing for the next image data 1 is started.

【0016】上述の予測部4と確率推定テーブル6を順
次書き換えてゆく学習型の予測/確率推定方式につい
て、具体例を用いながらさらに説明する。図18は、入
力される画像データの一具体例の説明図である。図18
では、図15に示すテンプレートの部分の画像データ1
のみを示している。図18に示すように、コンテキスト
9 〜X0 が「0000000011」のとき、注目画
素Pが1であった場合を考える。予測部4の予測テーブ
ルおよび確率推定テーブル6は、それぞれ図16、図1
7に示す内容が設定されているものとする。
A learning-type prediction / probability estimation method in which the above-described prediction unit 4 and probability estimation table 6 are sequentially rewritten will be further described using specific examples. FIG. 18 is an explanatory diagram of a specific example of input image data. FIG.
Now, the image data 1 of the template portion shown in FIG.
Only shows. As shown in FIG. 18, consider the case where the target pixel P is 1 when the contexts X 9 to X 0 are “00000000011”. The prediction table and the probability estimation table 6 of the prediction unit 4 are shown in FIG.
It is assumed that the content shown in FIG. 7 is set.

【0017】まず、コンテキスト「000000001
1」がコンテキスト3として予測部4に入力される。こ
の時、予測部4の予測テーブルのアドレス「00000
00011」には、図16に示すように、予測値「0」
とステート値「80」が格納されている。予測テーブル
から読み出されたステート値「80」は、確率推定テー
ブル6に入力される。次に確率推定テーブル6のステー
ト番号「80」が参照される。確率推定テーブル6には
図17に示す内容が設定されているので、そのステート
番号「80」に対応するLSZ値「0x5832」が読
み出され、算術符号化部9に出力される。
First, the context "000000001
"1" is input to the prediction unit 4 as the context 3. At this time, the address “00000” of the prediction table of the prediction unit 4
For example, as shown in FIG. 16, the predicted value “0”
And the state value “80” are stored. The state value “80” read from the prediction table is input to the probability estimation table 6. Next, the state number “80” of the probability estimation table 6 is referred to. Since the contents shown in FIG. 17 are set in the probability estimation table 6, the LSZ value “0x5832” corresponding to the state number “80” is read and output to the arithmetic coding unit 9.

【0018】このとき、注目画素Pの値は「1」である
が、予測部4の予測テーブルから読み出された予測値は
「0」であるため、LPSが発生した、ということにな
る。LPSが発生した場合、確率推定テーブル6から読
み出されたLSZ値に対応する領域が基本的に次の有効
領域となる。LSZは、0.5未満であるから、0.5
以上1未満になるように正規化が行なわれ、ステート番
号「80」のNLPSの値「80」が予測部4の予測テ
ーブルのアドレス「0000000011」のステート
値として上書きされる。また、確率推定テーブル6のス
テート番号「80」のSWが「1」であるから、予測値
は反転されて「1」となり、予測部4の予測テーブルの
アドレス「0000000011」の予測値として上書
きされる。図19は、書き換え後の予測部テーブルの一
具体例の説明図である。このようにして図19に示すよ
うに、予測部のアドレス「0000000011」の予
測値およびステート値が書き換えられる。この書き換え
られた後の予測部を用いて次の画像データ1についての
予測を行なうことになる。次に同じコンテキストが入力
された場合は、予測値が1となっている。
At this time, the value of the target pixel P is “1”, but the prediction value read from the prediction table of the prediction unit 4 is “0”, which means that LPS has occurred. When LPS has occurred, the area corresponding to the LSZ value read from the probability estimation table 6 is basically the next effective area. Since LSZ is less than 0.5, 0.5
Normalization is performed so as to be less than 1 and the NLPS value “80” of the state number “80” is overwritten as the state value of the address “00000000011” in the prediction table of the prediction unit 4. Further, since the SW of the state number “80” in the probability estimation table 6 is “1”, the predicted value is inverted to “1” and is overwritten as the predicted value of the address “00000000011” in the prediction table of the prediction unit 4. You. FIG. 19 is an explanatory diagram of a specific example of the prediction unit table after rewriting. In this way, as shown in FIG. 19, the prediction value and the state value of the address “00000000011” of the prediction unit are rewritten. The prediction of the next image data 1 is performed using the rewritten prediction unit. Next, when the same context is input, the predicted value is 1.

【0019】この例ではLPSが発生したが、MPSが
発生した場合には、正規化を行なったときには予測部4
の予測テーブルのステート値をNMPS「81」に書き
換える。書き換え後、次に同じコンテキスト3が入力さ
れた場合、ステート値が「81」であり、このときのL
SZは図17から「0x4d1c」となる。この値は、
ステート値「80」のときのLSZ「0x5832」よ
りも小さく、つまりLPSが発生する確率が小さいこと
を意味する。これは、前回の同じコンテキストの時の予
測が当たったため、次に同じコンテキストが入力された
場合、MPSが発生時の領域幅を広げておき、再度予測
が当たった場合に有効領域を広くとれるようにしたもの
であり、最終的な有効領域を増大させ、符号量を減少さ
せることができる。
Although LPS has occurred in this example, when MPS has occurred, the prediction unit 4 performs normalization.
Is rewritten to NMPS “81”. When the same context 3 is input next after rewriting, the state value is “81”,
The SZ is “0x4d1c” from FIG. This value is
It is smaller than the LSZ “0x5832” when the state value is “80”, which means that the probability that an LPS will occur is small. This is because the prediction at the same context last time was hit, so that the next time the same context is input, the area width at the time of occurrence of MPS is widened and the effective area is widened when the prediction is hit again. Thus, it is possible to increase the final effective area and reduce the code amount.

【0020】以上のようにして、確率推定テーブルにし
たがって予測部を順次書き換え、予測的中率を向上さ
せ、MPS発生数を増やすとともに、MPS/LPS発
生時の領域幅を制御して、符号化効率を向上させてい
る。
As described above, the prediction unit is sequentially rewritten according to the probability estimation table, the prediction accuracy is improved, the number of MPS occurrences is increased, and the region width at the time of MPS / LPS occurrence is controlled to perform coding. Improving efficiency.

【0021】また、復号時の処理も符号化時と同様、領
域分割を行ないながら実施される。符号化時と異なるの
は、符号化時は予測値と注目画素の比較を行ない、LP
S/MPSの領域を演算しながら求めるのに対し、復号
化時には、符号が、LPS/MPSのどちらの領域に入
っているかを演算で求め、次に周辺の復号済みの参照画
素から注目画素を逆予測しながら求める。
Also, the decoding process is performed while dividing the area, as in the encoding process. The difference from the encoding is that at the time of encoding, the prediction value is compared with the target pixel,
While the S / MPS area is calculated while being calculated, at the time of decoding, it is calculated by calculating which area of the LPS / MPS the code belongs to, and then the pixel of interest is determined from neighboring decoded reference pixels. Obtain while doing reverse prediction.

【0022】図20は、JBIGで採用されている予測
復号化方式の概略図である。図中、図14と同様の部分
には同じ符号を付して説明を省略する。21は算術復号
化部、22は逆予測部、23は逆予測値、24は書き換
えデータである。コンテキスト生成部2および逆予測部
22は、符号化時のコンテキスト生成部2および予測部
4とまったく同一に動作する。逆予測部22は符号化時
の予測部4と同一である。当然、確率推定テーブル6も
符号化時と同一のものが使用されなければならない。
FIG. 20 is a schematic diagram of a predictive decoding system employed in JBIG. In the figure, the same parts as those in FIG. 14 are denoted by the same reference numerals, and description thereof will be omitted. 21 is an arithmetic decoding unit, 22 is an inverse prediction unit, 23 is an inverse prediction value, and 24 is rewritten data. The context generation unit 2 and the inverse prediction unit 22 operate exactly the same as the context generation unit 2 and the prediction unit 4 at the time of encoding. The inverse prediction unit 22 is the same as the prediction unit 4 at the time of encoding. As a matter of course, the same probability estimation table 6 as that used in encoding must be used.

【0023】まず符号化時と同様に、復号化された画像
データ1の注目画素の周辺の参照画素の値によりコンテ
キストが生成され、逆予測部22、確率推定テーブル6
から、LSZと逆予測値23が算術復号化部21に出力
される。
First, as in the case of encoding, a context is generated from the values of reference pixels around the pixel of interest in the decoded image data 1, and the inverse prediction unit 22, the probability estimation table 6
, The LSZ and the inverse prediction value 23 are output to the arithmetic decoding unit 21.

【0024】次に、符号データ10は算術復号化部21
において、有効領域の比較が行なわれた後、逆予測値2
3を用いて画像データ1を出力する。図21は、算術復
号化部の基本動作の説明図である。まず、現有効領域か
ら確率推定テーブルより入力されたLSZ幅を減算し、 (有効領域−LSZ)を得る。この値を境にMPS領域
とLPS領域が分割される。次に入力された符号Cが、
先に求めた(有効領域−LSZ)の値より大きいか否か
を比較する。すなわち、 C>有効領域−LSZ の判定を行なう。この比較判定によって、注目画素がL
PSであるかMPSであるかが判定できるので、入力さ
れた逆予測値から、注目画素のレベルを求める。すなわ
ち、MPSであれば注目画素の値は逆予測値であり、L
PSであれば逆予測値を反転して注目画素の値とすれば
よい。以上の処理により、基本的に注目画素を復号でき
る。
Next, the code data 10 is supplied to the arithmetic decoding unit 21.
, After the comparison of the effective areas is performed, the inverse prediction value 2
3 is used to output image data 1. FIG. 21 is an explanatory diagram of the basic operation of the arithmetic decoding unit. First, the LSZ width input from the probability estimation table is subtracted from the current effective area to obtain (effective area−LSZ). The MPS area and the LPS area are divided based on this value. The next input code C is
A comparison is made as to whether the value is larger than the value of (effective area-LSZ) previously obtained. That is, C> effective area−LSZ is determined. As a result of this comparison, the pixel of interest is L
Since it can be determined whether the pixel is the PS or the MPS, the level of the target pixel is obtained from the input inverse prediction value. That is, in the case of MPS, the value of the pixel of interest is an inverse prediction value, and L
In the case of PS, the inverse prediction value may be inverted to be the value of the pixel of interest. With the above processing, the target pixel can be basically decoded.

【0025】ただし、次の画素の復号のために、ここか
らさらに、新有効領域の決定、符号−有効領域の減算等
の処理が必要となる。例えば図21に示した例では、符
号データCがLPS領域に存在するので、新たな有効領
域としてLPS領域を設定し、新たなLSZを設定して
上述の処理を繰り返し行なう。また、符号化時と同様に
して、予測部4に記憶されている予測テーブルの予測値
およびステート値の書き換えも行なわれる。
However, in order to decode the next pixel, further processing such as determination of a new effective area and subtraction of a sign-effective area is required. For example, in the example shown in FIG. 21, since the code data C exists in the LPS area, the LPS area is set as a new effective area, a new LSZ is set, and the above processing is repeated. Further, similarly to the encoding, the prediction value and the state value of the prediction table stored in the prediction unit 4 are also rewritten.

【0026】以上の処理により、JBIGにおいては高
能率な2値画像の符号化および符号データの復号が達成
される。JBIGは2値の画像を対象とした規格である
が、他の画像データに対する応用も検討されている。例
えば安田浩編,「マルチメディア符号化の国際標準」,
平成3年,丸善,p.80〜81には、算術符号化の手
法を多値情報源に対して適用することが示唆されてい
る。また、2値データの符号化手法である算術符号化を
多値情報源に適用するため、多値情報源を例えばレベル
プレーン化、ビットプレーン化等の手法によって2値表
現化して符号化を行なえばよいことが記載されている。
With the above processing, highly efficient encoding of binary images and decoding of encoded data are achieved in JBIG. JBIG is a standard for binary images, but application to other image data is also being studied. For example, Hiroshi Yasuda, "International Standard for Multimedia Coding",
1991, Maruzen, p. 80-81 suggest applying an arithmetic coding technique to a multi-valued information source. Further, in order to apply arithmetic coding, which is a coding method of binary data, to a multi-valued information source, the multi-valued information source may be represented by a binary representation using, for example, a level-plane or bit-plane conversion method. It states that what should be done is.

【0027】図22は、ビットプレーン展開の説明図で
ある。多値画像では、1画素あたり複数ビットによって
濃度を示している。ここで、各画素の濃度を表わすビッ
ト列の最上位ビットをMSB、最下位ビットをLSBと
して示している。ビットプレーン展開する際には、各画
素の同一位置の1ビットを取り出してそれぞれのプレー
ンを作成するとする。例えば各画素のMSBのみを取り
出すことによって、MSBのプレーンが作成される。作
成された各プレーンは各画素が1ビットのデータで構成
されており、2値画像と同様に扱うことができるので、
各プレーンごとに上述のJBIGを用いて符号化するこ
とができる。
FIG. 22 is an explanatory diagram of bit plane development. In a multi-valued image, the density is indicated by a plurality of bits per pixel. Here, the most significant bit of the bit string representing the density of each pixel is shown as MSB, and the least significant bit is shown as LSB. When developing a bit plane, it is assumed that one bit at the same position of each pixel is extracted and each plane is created. For example, an MSB plane is created by extracting only the MSB of each pixel. Each created plane is composed of 1-bit data for each pixel, and can be handled in the same way as a binary image.
Each plane can be encoded using the above-described JBIG.

【0028】通常、画像の隣接する各画素間の濃度には
それほど変化はないとみなすことができるので、この方
式によってMSBに近い高位のプレーンについては予測
が当たりやすくなり、符号量は少なくなる。しかし、低
位のプレーンでは小さな濃度変化によって値が変化する
ため、予測が当たりにくく、逆に符号量は多くなること
が知られている。これを解消するために、特開平6−2
61214号公報などで示されるように各プレーンごと
に異なる予測モデルを与えたり、ビットプレーン展開の
際にグレーコード変換を用いる方式なども知られてい
る。しかし、いずれにせよ、それぞれのプレーンで符号
が別々に生成されるため、これらのプレーンごとの符号
をそれぞれ管理する必要がある。また、復号時には、す
べてのプレーンを復号しないと各画素値が決定できない
ため、各プレーンごとに復号回路を必要としたり、ある
いは順次復号される画像をすべて蓄積しておくメモリが
必要となるという問題がある。
Normally, it can be considered that there is not much change in the density between adjacent pixels of an image. Therefore, this method makes it easy to predict a high-order plane close to the MSB and reduces the code amount. However, it is known that, since the value changes in a low-order plane due to a small change in density, it is difficult to predict and the code amount increases. To solve this, Japanese Patent Laid-Open Publication No. 6-2
As disclosed in Japanese Patent Application Laid-Open No. 61214 and the like, a method of giving a different prediction model to each plane, a method of using a gray code conversion when developing a bit plane, and the like are also known. However, in any case, since codes are generated separately in each plane, it is necessary to manage codes for each of these planes. Also, at the time of decoding, since each pixel value cannot be determined unless all planes are decoded, a decoding circuit is required for each plane, or a memory for storing all images to be sequentially decoded is required. There is.

【0029】図23は、レベルプレーン展開の説明図で
ある。レベルプレーン展開の場合には、各画素の濃度を
表わす複数のビット、すなわちMSBからLSBまでの
ビットをそのまま連結する。図23(B)には矩形によ
って多値画像の各画素を示しており、数字を記した画素
をそれぞれ画素0、画素1、画素2、...としてい
る。レベルプレーン展開したデータは図23(A)に示
すように、画素0のMSBからLSBまでのビットが並
び、続けて画素1のMSBからLSBまでのビットが、
さらに画素2のビットというように連続したデータとな
る。
FIG. 23 is an explanatory diagram of the level plane development. In the case of level plane development, a plurality of bits representing the density of each pixel, that is, bits from the MSB to the LSB are directly connected. FIG. 23B shows each pixel of the multi-valued image by a rectangle, and the pixels marked with numbers are respectively referred to as pixel 0, pixel 1, pixel 2,. . . And As shown in FIG. 23A, in the data obtained by level plane development, bits from MSB to LSB of pixel 0 are arranged, and bits from MSB to LSB of pixel 1 continue.
Further, continuous data such as bits of pixel 2 is obtained.

【0030】上述のJBIGに代表される学習型の予測
方式を使用する場合、予測値やステートを書き換えて最
適な状態に近づけるため、予測的中率が向上する利点が
ある。しかし、相関の弱い、異質のデータが連続して入
カされる場合、JBIGの規格書通りの予測方式によっ
て予測を行なうと相関性の低いデータが予測に使用され
てしまうため、予測外れが多くなり、符号量が増加する
ことがある。
In the case of using the learning type prediction method represented by the above-described JBIG, the prediction value and the state are rewritten so as to be close to the optimum state, so that there is an advantage that the predictive accuracy is improved. However, when heterogeneous data having a weak correlation is continuously input, if the prediction is performed according to the prediction method according to the JBIG standard, data with low correlation is used for the prediction. And the code amount may increase.

【0031】上述のようにレベルプレーン展開したデー
タを符号化する方式では、符号化処理/復号化処理は1
つの画像について1回で済み、また符号の管理も容易で
ある。しかし、レベルプレーン展開したデータでは、隣
接するビット間の相関は弱い。例えばビット間の相関を
重視する例えば図15に示すようなテンプレートを用い
て符号化処理を行なうことを考えると、同一画素中の濃
度を示す各ビットあるいは隣接する画素の高位のビット
と低位のビットという、相関の弱いビットを予測に使用
することになる。そのため、予測の的中率が低下し、予
測効率はビットプレーン展開の場合に比べて平均的に下
がるという問題があった。
As described above, in the method of encoding data that has undergone level plane expansion, the encoding / decoding processing is one
Only one image is required, and code management is easy. However, the correlation between adjacent bits is weak in the data obtained by level plane expansion. For example, considering that encoding processing is performed using a template as shown in FIG. 15 where importance is placed on the correlation between bits, for example, each bit indicating the density in the same pixel or the high-order bit and the low-order bit of an adjacent pixel That is, bits having low correlation are used for prediction. For this reason, there is a problem that the accuracy of prediction is reduced and the prediction efficiency is reduced on average as compared with the case of bit plane development.

【0032】図24は、レベルプレーン展開されたデー
タ列の一例の説明図である。図24では、各画素とも濃
度を3ビットで示している。例えば図15に示したテン
プレートを用いる場合を考え、画素1の1ビット目(M
SB)を注目画素とする。この注目画素に対して図15
の参照画素X0 ,X1 に対応する画素は、画素0の3ビ
ット目(LSB)の「0」、2ビット目の「1」であ
る。画素0の微妙な濃度の違いが画素1の大きな濃度変
化に影響を及ぼすことはなく、画素0の2ビット目、3
ビット目は、画素1の1ビット目とは相関が弱いと考え
られる。逆に、画素1の1ビット目を注目画素とした場
合に、相関が強いと考えられる画素0の1ビット目は予
測には使用されていない。このように相関が強いビット
を用いずに相関が弱いビットを予測に用いることになる
ため、予測的中率が低下し、符号量が増大する可能性が
ある。
FIG. 24 is an explanatory diagram of an example of a data string developed on a level plane. In FIG. 24, the density of each pixel is indicated by 3 bits. For example, considering the case where the template shown in FIG. 15 is used, the first bit (M
SB) is taken as the pixel of interest. FIG.
The pixel corresponding to the reference pixels X 0 and X 1 is “0” in the third bit (LSB) of the pixel 0 and “1” in the second bit. The slight difference in the density of the pixel 0 does not affect the large change in the density of the pixel 1.
The bit is considered to have a weak correlation with the first bit of the pixel 1. Conversely, when the first bit of pixel 1 is set as the target pixel, the first bit of pixel 0, which is considered to have a strong correlation, is not used for prediction. As described above, since bits having low correlation are used for prediction without using bits having high correlation, there is a possibility that the predictive accuracy is reduced and the code amount is increased.

【0033】この例のように1画素あたり3ビット(=
8階調)程度の画像であれば、各レベルのビット間にあ
る程度の相関があるという見方もできるが、複写機等の
画像処理で通常使用される解像度である1画素あたり8
ビット(=256階調)程度になると、低位レベルのビ
ット間の相関は弱くなり、予測効率は悪くなることが容
易に推測される。さらに、このように相関の弱いモデル
を使用することにより、参照画素が全て0などといった
符号化効率を上げられるはずのコンテキストに対しても
予測外れを引き起こし、確率推定状態が定常より悪い状
態に遷移させてしまうという問題もある。
As shown in this example, 3 bits per pixel (=
In the case of an image of about 8 gradations, it can be considered that there is a certain degree of correlation between bits of each level.
When the number of bits is about 256 (= 256 gradations), it is easily presumed that the correlation between the low-level bits becomes weak and the prediction efficiency becomes poor. Furthermore, by using a model with a weak correlation in this way, a prediction prediction state is shifted to a state where the probability estimation state is worse than a steady state, even in a context in which the coding efficiency is expected to be increased, such as when the reference pixels are all 0s. There is also the problem of letting them do it.

【0034】一方、属性データを含んだ画像データにつ
いても、JBIGによる符号化を行なうことが考えられ
る。図25は、従来の画像入出力装置において属性デー
タを伴って中間情報蓄積を行なう場合の一例を示すブロ
ック構成図である。図中、101は入力部、102は画
像処理部、103は画像符号化部、104は画像符号デ
ータ保持部、105は画像復号化部、106はTI分離
部、107はTIフラグ符号化部、108はTIフラグ
符号データ保持部、109はTIフラグ復号化部、11
0は出力部である。例えば複写機などにおいて、スキャ
ナ部で入力した画像等を出力部へ出力する場合、一般に
入力画像に対して濃度調整やフィルタ処理等の画像処理
を施している。これらの画像処理の処理精度を向上させ
るために、入力画像に対しテキストイメージ分離(以下
TI分離と呼ぶ)や、周波数帯域分離処理を施し、それ
ぞれの属性に合わせて異なる画像処理を施すことが行な
われている。例えばTI分離を行なう際には、もとの画
像データとともに、画像中の各画素がテキストイメージ
の部分なのかその他の例えば写真イメージ部分なのかを
示す属性データを付加する。属性データには上記以外
に、例えば文字原稿であれば、文字の輪郭部と輪郭以外
の箇所を示すものや、2値画像であれば、ディザ処理や
網点処理、誤差拡散処理等を分離するものなどがある。
On the other hand, it is conceivable to perform JBIG encoding on image data including attribute data. FIG. 25 is a block diagram showing an example of a case where intermediate information is stored with attribute data in a conventional image input / output device. In the figure, 101 is an input unit, 102 is an image processing unit, 103 is an image encoding unit, 104 is an image code data holding unit, 105 is an image decoding unit, 106 is a TI separation unit, 107 is a TI flag encoding unit, 108, a TI flag code data holding unit; 109, a TI flag decoding unit;
0 is an output unit. For example, in a copier or the like, when an image or the like input by a scanner unit is output to an output unit, image processing such as density adjustment and filter processing is generally performed on the input image. In order to improve the processing accuracy of these image processings, an input image is subjected to text image separation (hereinafter referred to as TI separation) or frequency band separation processing, and different image processing is performed according to each attribute. Have been. For example, when performing the TI separation, together with the original image data, attribute data indicating whether each pixel in the image is a text image portion or other, for example, a photographic image portion is added. In addition to the above, for example, in the case of a character document, attribute data indicating a contour portion of a character and a portion other than the contour, and in the case of a binary image, dither processing, halftone processing, error diffusion processing, etc. are separated. There are things.

【0035】図25に示した構成では、入力部101で
入力された画像データは、画像処理部102で入力部1
01に特有の処理や他の共通の画像処理などを行ない、
画像符号化部103において例えばJBIG等の手法を
用いて符号化し、符号データを画像符号データ保持部1
04に格納する。一方、入力部101で入力された同じ
画像データはTI分離部106においてTI分離処理が
行なわれ、それぞれの画素や複数の画素群ごとにTI分
離フラグが生成される。このTI分離フラグをTIフラ
グ符号化部107で符号化し、TIフラグ符号データ保
持部108に格納する。
In the configuration shown in FIG. 25, the image data input by the input unit 101 is transmitted to the input unit 1 by the image processing unit 102.
01 and other common image processing.
The image encoding unit 103 encodes the image data using a method such as JBIG, and stores the encoded data in the image encoded data holding unit 1.
04. On the other hand, the same image data input by the input unit 101 is subjected to TI separation processing in the TI separation unit 106, and a TI separation flag is generated for each pixel or a plurality of pixel groups. This TI separation flag is encoded by the TI flag encoding unit 107 and stored in the TI flag encoded data holding unit 108.

【0036】出力する場合には、画像符号データ保持部
104から画像符号データを取り出し、画像復号化部1
05で復号して画像データを出力部110へ渡す。一
方、TIフラグ符号データ保持部108から、対応する
TIフラグ符号データを取り出し、TIフラグ復号化部
109において復号してTI分離フラグを出力部110
へ渡す。出力部110では、TI分離フラグを参照しな
がら画像データに対して出力のための画像処理を施し、
画像を出力する。
When outputting, the image code data is extracted from the image code data holding unit 104 and
At 05, the image data is decoded and passed to the output unit 110. On the other hand, the corresponding TI flag code data is extracted from the TI flag code data holding unit 108 and decoded by the TI flag decoding unit 109 to output the TI separation flag to the output unit 110.
Pass to The output unit 110 performs image processing for output on the image data with reference to the TI separation flag,
Output an image.

【0037】このような装置においては、画像符号デー
タとTIフラグ符号データが別々に保存されるため、画
像符号データとTIフラグ符号データとの対応を管理し
ておく必要があった。このような管理を簡易化するた
め、画像データと属性データを1つのデータ列としてお
くことが考えられる。画像データと属性データを混在さ
せた場合、そのまま符号化すれば1回で符号化できると
ともに、符号データの管理は容易になる。
In such an apparatus, since the image code data and the TI flag code data are stored separately, it is necessary to manage the correspondence between the image code data and the TI flag code data. In order to simplify such management, it is conceivable to set the image data and the attribute data as one data string. When the image data and the attribute data are mixed, if the image data is encoded as it is, it can be encoded at one time, and the management of the encoded data becomes easy.

【0038】画像データとTI分離フラグなどの属性デ
ータを1つのデータ列にまとめる一つの方法として、す
べての画像データの後に属性データを続ける方法が考え
られる。しかしこの方法では、出力部110において出
力処理を行なう際には、画像データをすべて読み取った
後でなければ対応する属性データが得られないので、逐
次処理に不向きであるとともに、画像データを格納する
メモリ領域が必要となるため、得策ではない。
As one method of combining image data and attribute data such as a TI separation flag into one data string, a method of continuing attribute data after all image data is considered. However, according to this method, when performing the output processing in the output unit 110, the corresponding attribute data cannot be obtained until all the image data has been read. Therefore, this method is not suitable for the sequential processing and stores the image data. This is not a good idea because it requires a memory area.

【0039】画像データと属性データを1つのデータ列
にまとめる他の方法として、それぞれの画素単位もしく
は一定のブロック単位でもとの画像データに属性データ
を付加する方法がある。図26は、属性データが混在し
た画像データの一例の説明図である。図26(A)に
は、1ビットの画素データの前に、その画素の属性デー
タを付加した例を示している。ここで、属性データは3
ビットである。また、図26(B)には、8画素分のデ
ータの前に1ビットの属性データを付加した例を示して
いる。このようなデータ構造では、1画素あるいは8画
素ごとに属性データと対応づけることができるので、1
画素あるいは8画素等の単位ごとに処理を開始すること
ができ、また、これらのデータを格納するメモリ領域も
少なくて済む。
As another method of combining the image data and the attribute data into one data string, there is a method of adding the attribute data to the original image data in pixel units or fixed block units. FIG. 26 is an explanatory diagram of an example of image data in which attribute data is mixed. FIG. 26A shows an example in which attribute data of the pixel is added before 1-bit pixel data. Here, the attribute data is 3
Is a bit. FIG. 26B shows an example in which 1-bit attribute data is added before data of 8 pixels. In such a data structure, attribute data can be associated with each pixel or every eight pixels.
The processing can be started in units of pixels or 8 pixels, and the memory area for storing these data can be reduced.

【0040】しかし、このようなデータ構造のデータに
対して上述のようなJBIG等の方法で符号化すると、
符号量が多くなるという問題がある。例えば図26
(A)に示すデータ構造の場合に、図15に示したよう
なテンプレートを用いると、画素0を注目画素とした場
合の参照画素X0 ,X1 は属性データの2ビット目と3
ビット目となる。しかし、属性データは画素の値とはほ
とんど関係なく、その値が設定されるので、画素0の予
測に、画素0とは相関の弱い属性データが参照されてし
まうことになる。そのため、予測外れが多くなり、符号
量が増加してしまう。さらに、参照画素が全て0などの
効率を上げられるはずのコンテキストに対しても、予測
外れが多発することが予想され、確率推定状態が定常よ
り悪い状態に遷移させてしまう問題がある。
However, when data having such a data structure is encoded by the above-described method such as JBIG,
There is a problem that the code amount increases. For example, FIG.
In the case of the data structure shown in (A), if a template as shown in FIG. 15 is used, the reference pixels X 0 and X 1 when the pixel 0 is the target pixel are the second and third bits of the attribute data
This is a bit. However, the attribute data has almost no relation to the value of the pixel, and the value is set. Therefore, the attribute data having a weak correlation with the pixel 0 is referred to in the prediction of the pixel 0. For this reason, mispredictions increase, and the code amount increases. Further, even in a context where the efficiency of the reference pixels is all 0, etc., it is expected that many prediction errors occur, and there is a problem that the probability estimation state is shifted to a state worse than the steady state.

【0041】図26に示すように1つの画像中に異なる
属性を持つ画像を効率よく圧縮するために、例えば特開
平6−38048号公報には、属性信号によりテンプレ
ートや予測方式を切り替える方式が提案されている。し
かしこの文献では、属性データは圧縮せず、単に符号デ
ータ間に挿入されるため、属性信号を含めた全体の符号
量は大きくなるという問題があった。
In order to efficiently compress images having different attributes in one image as shown in FIG. 26, for example, Japanese Patent Application Laid-Open No. Hei 6-38048 proposes a method of switching between a template and a prediction method by an attribute signal. Have been. However, this document has a problem that the entire code amount including the attribute signal becomes large because the attribute data is not compressed but simply inserted between the code data.

【0042】[0042]

【発明が解決しようとする課題】本発明は、上述した事
情に鑑みてなされたもので、多値画像をレベルプレーン
展開したデータ列や、画像データとその属性データとが
混在するデータ列など、複数種類のデータが混在するデ
ータ列を効率よく符号化することのできる符号化方法及
び符号化装置を提供するとともに、そのような符号化方
法及び符号化装置で符号化された符号データを復号する
復号化方法及び復号化装置を提供することを目的とする
ものである。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned circumstances, and includes a data string obtained by expanding a multi-valued image into a level plane, a data string in which image data and its attribute data are mixed, and the like. Provided is an encoding method and an encoding device capable of efficiently encoding a data string in which a plurality of types of data are mixed, and decoding code data encoded by such an encoding method and an encoding device. It is an object of the present invention to provide a decoding method and a decoding device.

【0043】[0043]

【課題を解決するための手段】本発明の符号化方法は、
例えば画像の属性データと画像データの2種類のデータ
が混在するデータ列や、各画素が複数のレベルのデータ
からなる多値画像をレベルプレーン展開し各レベルを異
なる種類としたデータ列など、複数種類のデータが混在
するデータ列を符号化する際に、符号化の対象となる注
目データの種類に応じて出現済みの同種類の複数の参照
データを選択してコンテキストを生成する。例えばデー
タ列が画像データとその属性データとが混在するデータ
列の場合には、少なくとも注目データが画像データの場
合には出現済みの画像データの中から複数の参照データ
を選択する。画像データ同士の間では、互いに相関が強
いと考えられているので、選択された参照データは、そ
れぞれ注目データと強い相関を有すると考えられる。
SUMMARY OF THE INVENTION An encoding method according to the present invention comprises:
For example, a data string in which two types of data of image attribute data and image data are mixed, or a data string in which a multi-valued image in which each pixel is composed of a plurality of levels of data is subjected to level plane development and each level is a different type, such as When encoding a data string in which types of data are mixed, a plurality of pieces of reference data of the same type that have already appeared according to the type of target data to be encoded are selected to generate a context. For example, when the data sequence is a data sequence in which image data and its attribute data are mixed, at least when the data of interest is image data, a plurality of reference data are selected from the already-existing image data. Since it is considered that there is a strong correlation between the image data, the selected reference data is considered to have a strong correlation with the target data.

【0044】同様に、例えばデータ列が多値画像をレベ
ルプレーン展開し各レベルを異なる種類としたデータ列
の場合にも、注目データと同種類(すなわち同じレベ
ル)のデータを参照データとして選択する。多値画像で
は、ある注目画素とその周囲の画素との間の濃度変化は
小さいことが統計的に期待できる。そのため、各画素値
は多くの場合には近接した値を取ると考えてよく、各レ
ベルごとに見ると隣接した画素ではほとんど同じ値を取
ると考えられる。すなわち、ある画素のあるレベルを注
目データとしたとき、周囲の画素の注目データと同じレ
ベル(種類)のデータと注目データとは強い相関を有す
ると考えられる。
Similarly, for example, when the data sequence is a data sequence in which a multi-valued image is developed into a level plane and each level is of a different type, data of the same type (ie, the same level) as the target data is selected as reference data. . In a multi-valued image, it can be statistically expected that the density change between a certain pixel of interest and surrounding pixels is small. For this reason, each pixel value may be considered to have a close value in many cases, and it is considered that adjacent pixels have almost the same value when viewed at each level. That is, when a certain level of a certain pixel is set as attention data, it is considered that data of the same level (kind) as the attention data of surrounding pixels and the attention data have a strong correlation.

【0045】このように、複数種類のデータが混在する
データ列においては同種類のデータ間で強い相関を有す
ることに着目し、符号化の対象となる注目データの種類
に応じて出現済みの同種類の複数の参照データを選択す
ることによって、注目データと強い相関を有するデータ
を参照データとして選択し、コンテキストを生成するこ
とができる。一般に、強い相関を有する参照データから
注目データの値を予測した場合、その的中率が高いこと
が知られている。上述のように注目データと強い相関を
有するデータを参照データとして選択し、コンテキスト
を生成することによって、的中率の高い予測を行なうこ
とができる。予測符号化では、予測が的中した場合に符
号量が少なくなるように符号を構成しているので、予測
的中率を向上させることによって、符号量を減らすこと
ができ、効率よく符号化することができる。
As described above, in a data string in which a plurality of types of data coexist, attention is paid to the fact that there is a strong correlation between the same types of data. By selecting a plurality of types of reference data, data having a strong correlation with the target data can be selected as reference data, and a context can be generated. In general, it is known that when a value of attention data is predicted from reference data having a strong correlation, the hit rate is high. As described above, by selecting data having a strong correlation with the target data as reference data and generating a context, a prediction with a high hit rate can be performed. In the predictive coding, the code is configured so that the code amount is reduced when the prediction is correct. Therefore, the code amount can be reduced by improving the predictive accuracy, and the coding is efficiently performed. be able to.

【0046】さらに、それぞれの種類に応じた予測デー
タを用意し、注目データの種類に応じて切り換えて用い
ることができる。ある種類の注目データの予測の際に、
予測はずれによって予測データが書き換えられ、別の種
類の注目データの予測もはずれてしまうことがある。こ
のような場合には予測はずれによって符号量が増大する
要因となる。しかし、注目データの種類に応じて予測デ
ータを切り換えることにより、他の種類のデータに左右
されずに予測を行なうことができるので、その種類のデ
ータについては予測的中率を向上させることができ、全
体として符号量を減少させることができる。
Further, it is possible to prepare prediction data corresponding to each type, and switch between them according to the type of the data of interest. When predicting certain types of featured data,
The prediction data may be rewritten due to the mis-prediction, and the prediction of another type of target data may be incorrect. In such a case, misprediction causes an increase in the code amount. However, by switching the prediction data according to the type of the data of interest, the prediction can be performed without being influenced by other types of data. Therefore, the predictive accuracy can be improved for that type of data. , The code amount can be reduced as a whole.

【0047】なお、データ列が画像データとその属性デ
ータとが混在するデータ列の場合の属性データの間で
は、属性データが単なるコードであることを考えると、
相関が弱いことが考えられる。また、データ列が多値画
像をレベルプレーン展開し各レベルを異なる種類とした
データ列の場合の少なくとも最下位ビットに対応するレ
ベルを含む所定の種類のデータの間では、画像の微小な
濃度変化によって値が変化するため、相関は弱いことが
考えられる。このような相関が弱い種類のデータでは、
予測を行なっても的中率は低く、逆に予測データを乱し
て的中率の高いデータについても予測的中率を低下させ
てしまう恐れがある。そのため、相関が弱い種類のデー
タについては、ある決まった所定の状態を参照データと
して選択したり、予測データを別にして、他の予測デー
タを乱さないようにする。これによって、的中率の高い
データについては予測的中率を低下させずに予測し、符
号化できるので、全体とすれば符号化効率を向上させる
ことができる。
It should be noted that, among attribute data in the case where the data string is a data string in which image data and its attribute data are mixed, considering that the attribute data is merely a code,
The correlation may be weak. Further, in the case where the data sequence is a data sequence in which a multi-valued image is developed on a level plane and each level is of a different type, a slight density change of the image between predetermined types of data including at least the level corresponding to the least significant bit. It is considered that the correlation is weak because the value changes depending on the value. For these types of weakly correlated data,
Even if prediction is performed, the hit rate is low, and conversely, there is a possibility that predicted data may be disturbed and the predictive hit rate may be reduced even for data having a high hit rate. Therefore, for data of a type having a weak correlation, a certain predetermined state is selected as reference data, and other prediction data is not disturbed apart from prediction data. As a result, data having a high hit rate can be predicted and coded without lowering the hit rate, so that the coding efficiency can be improved as a whole.

【0048】本発明の符号化装置では、上述のように複
数種類のデータが混在するデータ列を符号化する際に、
符号化の対象となる注目データの種類に応じて出現済み
の同種類の複数の参照データを選択することによって予
測的中率を向上させ、効率のよい符号化を行なうことが
できることに鑑み、コンテキスト生成部で符号化の対象
となる注目データの種類に応じて出現済みの同種類の複
数の参照データを選択してコンテキストを生成する。コ
ンテキスト生成部で生成されたコンテキストから注目デ
ータの値を予測部で予測することによって、予測的中率
の高い予測値を出力することができる。このように予測
的中率の高い予測値を用い、符号化部で予測符号化す
る。上述のように、予測符号化では、予測が的中した場
合に符号量が少なくなるように符号を構成しているの
で、予測的中率を向上させることによって、符号量を減
らすことができ、符号量の少ない符号データを生成する
符号化装置を得ることができる。
In the encoding apparatus of the present invention, when encoding a data string in which a plurality of types of data are mixed as described above,
In view of the fact that it is possible to improve the predictive accuracy and perform efficient encoding by selecting a plurality of reference data of the same type that have already appeared according to the type of the target data to be encoded, The generation unit selects a plurality of pieces of reference data of the same type that have already appeared according to the type of target data to be encoded, and generates a context. The prediction unit predicts the value of the data of interest from the context generated by the context generation unit, so that a prediction value with a high predictive accuracy can be output. In this way, the coding unit performs predictive coding using the predicted value having a high predictive accuracy. As described above, in the predictive coding, the code is configured so that the code amount is reduced when the prediction is correct, so that the code amount can be reduced by improving the predictive accuracy. An encoding device that generates code data with a small code amount can be obtained.

【0049】また、上述の符号化方法及び符号化装置と
同様にして逆予測を行なうことによって、効率よく符号
化された符号データを復号することができる復号化方法
および復号化装置を得ることができる。
Also, by performing inverse prediction in the same manner as the above-described encoding method and encoding apparatus, it is possible to obtain a decoding method and a decoding apparatus capable of efficiently decoding encoded data. it can.

【0050】[0050]

【発明の実施の形態】図1は、本発明の第1の実施の形
態を示すブロック構成図である。図中、図14と同様の
部分には同じ符号を付して説明を省略する。31は入力
データ、32はコンテキスト生成部、33は符号化部、
41,42はラインメモリ、43はシフトレジスタ、4
4,45はテンプレート抽出部、46は固定コンテキス
ト部、47はコンテキスト選択部、48は制御部、49
は制御信号である。この例では、確率推定テーブル6と
算術符号化部9をまとめて符号化部31と示している。
コンテキスト生成部32は、符号化するデータに応じて
テンプレートを変更し、使用するテンプレートに従って
コンテキスト3を生成して予測部4に渡す。
FIG. 1 is a block diagram showing a first embodiment of the present invention. In the figure, the same parts as those in FIG. 14 are denoted by the same reference numerals, and description thereof will be omitted. 31 is input data, 32 is a context generation unit, 33 is an encoding unit,
41 and 42 are line memories, 43 is a shift register, 4
Reference numerals 4 and 45 denote a template extraction unit, 46 denotes a fixed context unit, 47 denotes a context selection unit, 48 denotes a control unit, and 49 denotes a control unit.
Is a control signal. In this example, the probability estimation table 6 and the arithmetic encoding unit 9 are collectively referred to as an encoding unit 31.
The context generation unit 32 changes the template according to the data to be encoded, generates a context 3 according to the template to be used, and passes the context 3 to the prediction unit 4.

【0051】コンテキスト生成部32の構成の一例を図
1(B)に示している。ラインメモリ41,42は、複
数ラインからなるテンプレートを生成するために前ライ
ンおよび前々ラインのデータを保持する。ラインメモリ
41には入力データ31が入力され、1ライン前のデー
タを出力する。ラインメモリ42は、ラインメモリ41
から出力される1ライン前のデータが入力され、さらに
もう1ライン分遅延させて2ライン前のデータを出力す
る。シフトレジスタ43には、入力データ31と、ライ
ンメモリ41から出力される1ライン前のデータと、ラ
インメモリ42から出力される2ライン前のデータが入
力され、符号化する注目データの周辺の参照データとな
りうるデータを保持する。もちろん、ラインメモリを増
減し、参照するライン数を増加あるいは減少させてもよ
い。
FIG. 1B shows an example of the configuration of the context generating section 32. The line memories 41 and 42 hold data of a previous line and a line before the previous line in order to generate a template including a plurality of lines. The input data 31 is input to the line memory 41, and the data of the previous line is output. The line memory 42 is a line memory 41
, The data of one line before is output, and the data of two lines before is output with a delay of another line. The shift register 43 receives the input data 31, the data of the previous line output from the line memory 41, and the data of the previous two lines output from the line memory 42, and references the surroundings of the target data to be encoded. Holds data that can be data. Of course, the number of line memories may be increased or decreased to increase or decrease the number of lines to be referred to.

【0052】テンプレート抽出部44,45は、シフト
レジスタ43に蓄えられたデータの任意の部分を抽出
し、予測用のコンテキストを生成する。テンプレート抽
出部44とテンプレート抽出部45では、それぞれ異な
るテンプレートが設定されており、設定されているテン
プレートに従ってコンテキストを生成する。固定コンテ
キスト部46では、入力データ31にかかわらず、常に
固定された所定のコンテキストを出力する。固定コンテ
キスト部46が出力するコンテキストとしては、なるべ
く、テンプレート抽出部44,45で生成される確率の
低いコンテキストとするとよい。これにより、固定コン
テキスト部46の出力が選択された際に予測部4内の予
測テーブルが書き変わっても、テンプレート抽出部4
4,45から出力されるコンテキストを用いた予測にな
るべく影響しないようにすることができる。
The template extracting units 44 and 45 extract an arbitrary part of the data stored in the shift register 43 and generate a prediction context. Different templates are set in the template extractor 44 and the template extractor 45, respectively, and a context is generated according to the set template. The fixed context section 46 always outputs a fixed predetermined context irrespective of the input data 31. The context output by the fixed context unit 46 is preferably a context having a low probability of being generated by the template extracting units 44 and 45. Thus, even if the prediction table in the prediction unit 4 is rewritten when the output of the fixed context unit 46 is selected, the template extraction unit 4
The prediction using the context output from 4, 45 can be minimized.

【0053】コンテキスト選択部47は、制御部48か
らの制御信号49に従って、テンプレート抽出部44,
45、固定コンテキスト部46の出力のうちのいずれか
を選択してコンテキスト3として出力する。なお、セレ
クタはテンプレート抽出部44,45や固定コンテキス
ト部46の前段に設けてもよい。制御部48は、入力デ
ータ31のデータフォーマットに従って、コンテキスト
選択部47に対して制御信号49を出力する。
The context selecting section 47 receives a template signal from the template extracting section 44 according to a control signal 49 from the control section 48.
45, one of the outputs of the fixed context section 46 is selected and output as the context 3; Note that the selector may be provided before the template extracting units 44 and 45 and the fixed context unit 46. The control unit 48 outputs a control signal 49 to the context selection unit 47 according to the data format of the input data 31.

【0054】この例では、テンプレート抽出部を2つ設
けた例を示したが、3つ以上であってもよい。また、固
定コンテキスト部46を2つ以上設けたり、あるいは設
けなくてもよい。あるいは、テンプレート抽出部を1つ
と固定コンテキスト部の組み合わせであってもよい。
In this example, an example in which two template extraction units are provided is shown, but three or more template extraction units may be provided. Further, two or more fixed context parts 46 may be provided or may not be provided. Alternatively, a combination of one template extraction unit and a fixed context unit may be used.

【0055】本発明の第1の実施の形態における動作の
一例を説明する。符号化の対象となる入力データ31
は、コンテキスト生成部32のラインメモリ41及びシ
フトレジスタ43、及び、算術符号化部9に入力され
る。コンテキスト生成部32のラインメモリ41では入
力データ31を1ライン遅延させ、さらにラインメモリ
42ではもう1ライン遅延させる。シフトレジスタ43
には、入力データ31と1ライン前の入力データと2ラ
イン前の入力データが入力される。シフトレジスタ43
は、入力データ31が送られてくるタイミングに同期し
てデータをシフトし、参照データとなりうる3ラインの
データを保持している。
An example of the operation according to the first embodiment of the present invention will be described. Input data 31 to be encoded
Is input to the line memory 41 and the shift register 43 of the context generation unit 32 and to the arithmetic coding unit 9. The line data 41 of the context generation unit 32 delays the input data 31 by one line, and the line memory 42 delays another line. Shift register 43
, Input data 31, input data one line before and input data two lines before are input. Shift register 43
Shifts the data in synchronization with the timing at which the input data 31 is sent, and holds three lines of data that can be reference data.

【0056】テンプレート抽出部44,45では、シフ
トレジスタ43に保持されているデータの中から、テン
プレートに従ってデータを取り出し、予測用のコンテキ
ストをそれぞれ生成する。また、固定コンテキスト部4
6からは、所定のコンテキストが出力されている。制御
部48は、入力データ31のデータフォーマットに従
い、符号化の対象である注目データの種類に応じて、な
るべく注目データと相関の強い参照データから構成され
るコンテキストを選択するように、制御信号49をコン
テキスト選択部47へ送る。コンテキスト選択部47
は、制御部48からの制御信号49に従って、テンプレ
ート抽出部44,45でそれぞれ生成されたコンテキス
ト、あるいは固定コンテキスト部46から出力される所
定のコンテキストのいずれかを選択し、コンテキスト3
として予測部4に出力される。
The template extracting sections 44 and 45 take out data from the data held in the shift register 43 in accordance with the template, and generate prediction contexts, respectively. In addition, fixed context part 4
6 outputs a predetermined context. The control unit 48 controls the control signal 49 according to the data format of the input data 31 so as to select a context composed of reference data having a strong correlation with the target data as much as possible according to the type of the target data to be encoded. To the context selector 47. Context selector 47
Selects one of the contexts generated by the template extraction units 44 and 45 or a predetermined context output from the fixed context unit 46 in accordance with the control signal 49 from the control unit 48, and
Is output to the prediction unit 4.

【0057】予測部4以降の動作は、従来と同様である
のでここでは説明を省略するが、上述のようにコンテキ
スト生成部32から出力されるコンテキスト3は、符号
化の対象である注目データと相関の強い参照データから
構成されているので、予測部4から出力される予測値は
入力データ31と一致する(予測が当たる)可能性が高
く、符号データ10の符号量を低減することができる。
The operation after the prediction unit 4 is the same as the conventional operation, and the description is omitted here. However, as described above, the context 3 output from the context generation unit 32 is the same as the target data to be encoded. Since the reference data is composed of reference data having a strong correlation, the prediction value output from the prediction unit 4 has a high possibility of matching (predicting) with the input data 31 and the code amount of the code data 10 can be reduced. .

【0058】次に、いくつかの入力データ31の具体例
をもとに、コンテキスト生成部32におけるコンテキス
トの生成についてさらに説明する。まず入力データ31
として画像データと属性データが混在するデータが入力
される場合について説明する。図2は、本発明の第1の
実施の形態において、各画素データに属性データが付加
された入力データのデータフォーマットの一例および使
用するテンプレートの一例の説明図、図3は、同じくコ
ンテキストの生成に用いられるデータの説明図である。
図2(A)に示す入力データ31のデータフォーマット
は、上述の図26(A)に示したものと同じである。こ
の例では、入力データ31は図2(A)に示したよう
に、1ビットの画素データdmnの前に、その画素の属性
を示す3ビットの属性データ(amn,bmn,cmn)が付
加されている。属性データは、例えばTI分離フラグ等
である。
Next, the generation of a context in the context generation unit 32 will be further described based on some specific examples of the input data 31. First, input data 31
The case where data in which image data and attribute data are mixed is input will be described. FIG. 2 is an explanatory diagram of an example of a data format of input data in which attribute data is added to each pixel data and an example of a template to be used in the first embodiment of the present invention, and FIG. FIG. 5 is an explanatory diagram of data used for (1).
The data format of the input data 31 shown in FIG. 2A is the same as that shown in FIG. 26A. In this example, as the input data 31 shown in FIG. 2 (A), 1 to the previous bit of the pixel data d mn, attribute data (a mn of 3 bits indicating the attribute of the pixel, b mn, c mn ) Is added. The attribute data is, for example, a TI separation flag.

【0059】図2(A)に示したようなデータフォーマ
ットの画像データと属性データが混在した入力データ3
1を効率よく予測するためには、図2(B)に示すよう
に、3bitおきのデータを参照するようなテンプレー
トを使用することが最も効率がよいと考えられる。図2
(B)において、Pが注目データであり、○印が参照デ
ータの位置を示している。図2(B)に○印で示す位置
のデータを参照し、コンテキストを生成することによっ
て、図15に示したコンテキストと同様に、10ビット
のコンテキストとなる。
Input data 3 in which image data and attribute data in a data format as shown in FIG.
In order to efficiently predict 1, as shown in FIG. 2B, it is considered to be most efficient to use a template that refers to data every three bits. FIG.
In (B), P is the data of interest, and ○ indicates the position of the reference data. By generating the context by referring to the data at the position indicated by the circle in FIG. 2B, the context becomes a 10-bit context as in the context shown in FIG.

【0060】図3には入力データの3行分の一部を示し
ており、各データには識別のために図2(A)と同様の
記号を付してある。いま、図3(A)において、符号化
対象の注目データである入力データ31として、画素デ
ータであるデータd33が入力されたとする。このとき、
図2(B)に示すテンプレートを適用すると、図3
(A)において○印を付したd12,d13,d14,d21
22,d23,d24,d25,d31,d32の各データが参照
される。これらのデータはすべて画素データであり、相
関が強いと考えられる。また、これらのデータは属性デ
ータが挿入される前の画像データにおいて、図15に示
したテンプレートにおけるX0 〜X9 の位置の画素デー
タそのものである。このように、入力データが画素デー
タの場合には、図2(B)に示したテンプレートを用い
ることによって、属性データが挿入される前と同様のコ
ンテキストを作成することができる。
FIG. 3 shows a part of three lines of input data. Each data is given the same symbol as in FIG. 2A for identification. Now, in FIG. 3 (A), the as input data 31 is a target data to be encoded, and data d 33 is inputted pixel data is the pixel data. At this time,
When the template shown in FIG. 2B is applied, FIG.
In (A), d 12 , d 13 , d 14 , d 21 ,
Each data d 22, d 23, d 24 , d 25, d 31, d 32 is referenced. These data are all pixel data and are considered to have a strong correlation. These data are the pixel data at positions X 0 to X 9 in the template shown in FIG. 15 in the image data before the attribute data is inserted. Thus, when the input data is pixel data, the same context as before the attribute data is inserted can be created by using the template shown in FIG.

【0061】次に、図3(B)において、入力データ3
1として次のデータa34が入力されたとする。このデー
タa34は3ビットの属性データのうちの最初のビットで
ある。この場合に図2(B)に示すテンプレートを適用
すると、図3(B)において○印を付したa13,a14
15,a22,a23,a24,a25,a26,a32,a33の各
データが参照される。これらのデータはすべて3ビット
の属性データのうちの最初のビットである。同様にし
て、入力データ31として属性データの2番目のビッ
ト、3番目のビットが入力された場合も、図2(B)に
示すテンプレートを適用することによって、すべて属性
データの2番目のビット、3番目のビットが参照され
る。属性データが例えばTI分離フラグの場合、ある領
域内ではTI分離フラグのビット列は同一であることが
多いので、同じビット位置のデータは同じである可能性
が高い。そのため、参照されたデータは相関が強いと考
えられる。このように、入力データが属性データの場合
にも、図2(B)に示したテンプレートを用いることに
よって、予測が的中しやすいコンテキストを作成するこ
とができる。
Next, in FIG.
It is assumed that the next data a34 is input as 1. This data a34 is the first bit of the 3-bit attribute data. In this case, when the template shown in FIG. 2 (B) is applied, a 13 , a 14 ,
Each data a 15, a 22, a 23 , a 24, a 25, a 26, a 32, a 33 is referred to. These data are all the first bits of the 3-bit attribute data. Similarly, when the second bit and the third bit of the attribute data are input as the input data 31, all the second bits of the attribute data can be obtained by applying the template shown in FIG. The third bit is referenced. When the attribute data is, for example, a TI separation flag, the bit string of the TI separation flag is often the same in a certain area, so that the data at the same bit position is likely to be the same. Therefore, the referenced data is considered to have a strong correlation. As described above, even when the input data is attribute data, by using the template shown in FIG. 2B, it is possible to create a context that is easily predicted.

【0062】このようにして、画像データと属性データ
が混在した図2(A)に示すようなデータフォーマット
のデータ列が入力される場合には、図2(B)に示すよ
うなテンプレートを用いることによって、符号化する注
目データが画素データの場合も属性データの場合も、注
目データと相関が強いデータを参照してコンテキストを
作成することができる。そのため、予測部4における予
測の的中率が向上し、符号データ10の符号量を低減す
ることができる。
As described above, when a data string having a data format as shown in FIG. 2A in which image data and attribute data are mixed is input, a template as shown in FIG. 2B is used. Thus, in both cases where the target data to be encoded is pixel data or attribute data, a context can be created by referring to data having a strong correlation with the target data. Therefore, the prediction accuracy of the prediction unit 4 is improved, and the code amount of the code data 10 can be reduced.

【0063】この例では、属性データも画素データも図
2(B)に示した同じテンプレートを用いることができ
る。このような場合には、コンテキスト選択部47は、
図2(B)に示したテンプレートを用いてコンテキスト
を作成するテンプレート抽出部のみを選択する。図2
(A)に示したデータフォーマットの入力データのみを
扱う場合には、図2(B)に示したテンプレートを用い
るテンプレート抽出部を1つ備え、他のテンプレート抽
出部、固定コンテキスト部46、コンテキスト選択部4
7、制御部48を設けずに構成してもよい。
In this example, the same template shown in FIG. 2B can be used for both attribute data and pixel data. In such a case, the context selector 47
Only the template extracting unit for creating a context using the template shown in FIG. 2B is selected. FIG.
When only the input data of the data format shown in FIG. 2A is handled, one template extraction unit using the template shown in FIG. 2B is provided, and another template extraction unit, fixed context unit 46, context selection Part 4
7. The configuration may be such that the control unit 48 is not provided.

【0064】図4は、本発明の第1の実施の形態におい
て、各画素データに属性データが付加された入力データ
のデータフォーマットの別の例および使用するテンプレ
ートの一例の説明図、図5は、同じくコンテキストの生
成に用いられるデータの説明図である。図4(A)に示
す入力データ31のデータフォーマットは、上述の図2
6(B)に示したものと同じである。この例では、入力
データ31は図4(A)に示したように、8画素ごとに
その先頭に1ビットの属性データamiが付加されてい
る。なお、画素データはdmnで示している。
FIG. 4 is a diagram for explaining another example of a data format of input data in which attribute data is added to each pixel data and an example of a template to be used in the first embodiment of the present invention. FIG. 7 is an explanatory diagram of data used for generating a context. The data format of the input data 31 shown in FIG.
This is the same as that shown in FIG. In this example, as shown in FIG. 4A, 1-bit attribute data ami is added to the head of each input data 31 for every eight pixels. The pixel data is indicated by dmn .

【0065】図4(A)に示したようなデータフォーマ
ットの画像データと属性データが混在した入力データ3
1を効率よく予測するためのテンプレートは、画素デー
タの位置ごとに異なってくる。基本的には図15に示し
たテンプレート、すなわち図5(D)に示したテンプレ
ートを用いることによって効率よく予測可能なコンテキ
ストが得られる。しかし、属性データの両側2ビットず
つの画素データについて、このテンプレートを用いる
と、参照データとして属性データが含まれてしまう。属
性データは画素データと相関が弱いので、属性データを
含めて参照し、コンテキストを生成すると予測的中率が
低下する恐れがある。そのため、画素データの位置に応
じて、図4(B)〜(F)に示すようなテンプレートを
切り換えて用いることによって、属性データを参照せず
にコンテキストを生成することができる。なお、図4
(B)〜(F)において、Pが注目データであり、○印
が参照データの位置を示している。
Input data 3 in which image data and attribute data in a data format as shown in FIG.
The template for efficiently predicting 1 differs for each position of the pixel data. Basically, a predictable context can be obtained efficiently by using the template shown in FIG. 15, that is, the template shown in FIG. However, when this template is used for pixel data of 2 bits each on both sides of the attribute data, the attribute data is included as reference data. Since the attribute data has a weak correlation with the pixel data, if the attribute data is referred to including the attribute data to generate the context, the predictive accuracy may be reduced. Therefore, by switching and using templates as shown in FIGS. 4B to 4F according to the position of the pixel data, a context can be generated without referring to the attribute data. FIG.
In (B) to (F), P is the data of interest, and a circle indicates the position of the reference data.

【0066】図5には入力データの3行分の一部を示し
ており、各データには識別のために図4(A)と同様の
記号を付してある。いま、図5(A)において、符号化
対象の注目データである入力データ31として、画素デ
ータであるデータd36が入力されたとする。このとき、
基本的なテンプレートである図4(D)に示すテンプレ
ートを適用しても、その中に属性データは含まれないの
で、図4(D)に示す基本的なテンプレートを用いて各
画素データを参照し、コンテキストを生成すればよい。
FIG. 5 shows a part of three lines of the input data. Each data is provided with the same symbol as in FIG. 4A for identification. Now, in FIG. 5A, it is assumed that data d 36 which is pixel data is input as input data 31 which is target data to be encoded. At this time,
Even if the basic template shown in FIG. 4D is applied, attribute data is not included in the template. Therefore, each pixel data is referred to using the basic template shown in FIG. 4D. Then, a context may be generated.

【0067】次に入力データ31として画素データd37
が入力される。今度は基本的なテンプレートである図4
(D)に示すテンプレートを適用すると、属性データa
22が含まれてしまう。そのため、この属性データa22
除くような、図4(E)に示すテンプレートを用いる。
これによって、参照データ中に属性データを含まず、画
素データのみを参照してコンテキストを生成することが
できる。
Next, pixel data d 37 is used as input data 31.
Is entered. Now a basic template, Figure 4
When the template shown in (D) is applied, attribute data a
22 will be included. Therefore, as excluding this attribute data a 22, using the template shown in FIG. 4 (E).
As a result, the context can be generated by referring to only the pixel data without including the attribute data in the reference data.

【0068】次に入力データ31として画素データd38
が入力された場合も同様であり、図4(D)に示す基本
的なテンプレートを適用すると属性データa12,a22
含まれてしまうので、図4(F)に示すテンプレートを
適用する。同様にして、画素データd39が入力された場
合には図4(B)に示すテンプレートを適用し、画素デ
ータd310 が入力された場合には図4(C)に示すテン
プレートを適用する。
Next, pixel data d 38 is used as input data 31.
Is input. If the basic template shown in FIG. 4D is applied, attribute data a 12 and a 22 are included, so the template shown in FIG. 4F is applied. Similarly, when the pixel data d 39 is input, the template shown in FIG. 4B is applied, and when the pixel data d 310 is input, the template shown in FIG. 4C is applied.

【0069】このように、画素位置に応じて適用するテ
ンプレートを変更することによって、注目データが画素
データの場合に属性データを参照せずに、相関の強い画
素データのみを参照してコンテキストを生成することが
できる。生成されたコンテキストを用いて予測を行なう
ことによって、属性データが混在していない場合と同様
の予測的中率で予測でき、全体の符号量を低減すること
ができる。
As described above, by changing the template to be applied according to the pixel position, when the target data is pixel data, the context is generated by referring only to the pixel data having a strong correlation without referring to the attribute data. can do. By performing prediction using the generated context, prediction can be performed with the same predictive accuracy as when attribute data is not mixed, and the overall code amount can be reduced.

【0070】入力データ31が属性データの場合には、
図2(B)に示したテンプレートと同様に、8データお
きに参照するテンプレートを用いることによって、属性
データのみを参照してコンテキストを生成することがで
きる。あるいは、固定コンテキスト部46の出力を選択
するように構成してもよい。例えばこの例よりもさらに
多数の画素、例えば1ないし数ラインに1ビットの属性
データが付加されたデータの場合には、属性データだけ
のテンプレートを生成することは不可能であるため、固
定コンテキスト部46が出力する固定のコンテキストを
選択するように構成するとよい。
When the input data 31 is attribute data,
Similarly to the template shown in FIG. 2B, by using a template that is referred to every eight data, a context can be generated by referring only to the attribute data. Alternatively, the output of the fixed context section 46 may be selected. For example, in the case of data in which one bit of attribute data is added to a larger number of pixels than in this example, for example, one or several lines, it is impossible to generate a template with only attribute data, and therefore, the fixed context part Preferably, a fixed context output by 46 is selected.

【0071】この例では、画素データについて図4
(B)〜(F)に示した5つのテンプレートを用いてい
る。また、属性データについてもテンプレートを用いる
場合には、さらにもう1つのテンプレートを用いる。そ
のため、各テンプレートに対応して、5ないし6個のテ
ンプレート抽出部を設け、入力データ31に応じてコン
テキスト選択部47によって切り換えればよい。なお、
属性データについてテンプレートを用いる場合には、固
定コンテキスト部46を設けなくてもよい。
In this example, the pixel data shown in FIG.
The five templates shown in (B) to (F) are used. When a template is used for attribute data, another template is used. Therefore, five or six template extraction units may be provided for each template, and switched by the context selection unit 47 according to the input data 31. In addition,
When a template is used for attribute data, the fixed context section 46 may not be provided.

【0072】次に、入力データ31として多値画像をレ
ベルプレーン展開したデータが入力される場合について
説明する。図6は、本発明の第1の実施の形態におい
て、レベルプレーン展開された入力データのデータフォ
ーマットの一例および使用するテンプレートの一例の説
明図、図7は、同じくコンテキストの生成に用いられる
データの説明図である。図6(A)に示す入力データ3
1のデータフォーマットは、基本的には上述の図24に
示したものと同じであり、この例では1画素あたり8ビ
ットで構成される例を示している。8ビットのうち、M
SBをレベル7とし、LSBをレベル0として、各ビッ
ト位置をレベルで呼ぶことにする。なお、多値画像デー
タは、グレーコード変換等がなされていない純粋な階調
データであるものとする。
Next, a case where data obtained by expanding a multi-valued image into a level plane as the input data 31 will be described. FIG. 6 is an explanatory diagram of an example of a data format of input data expanded in a level plane and an example of a template to be used in the first embodiment of the present invention. FIG. FIG. Input data 3 shown in FIG.
The data format of 1 is basically the same as that shown in FIG. 24 described above, and this example shows an example in which 8 bits per pixel. Of the 8 bits, M
Let SB be level 7 and LSB be level 0, and call each bit position by level. It is assumed that the multi-valued image data is pure gradation data that has not been subjected to gray code conversion or the like.

【0073】一般に写真画像などの低周波成分の多い多
値画像では、ある注目画素とその周囲の画素との間の濃
度の変化は小さいことが統計的に期待できる。そのた
め、各画素値は多くの場合には近接した値を取ると考え
てよい。画素値の変化が小さく、近接した値をとる場
合、多くの場合にはレベル0に近い下位の1ないし数ビ
ットの値が変化するのみで、レベル7を含む上位のビッ
トはほとんど変化しない。そのため、レベル7を含む上
位のビットでは、周囲の画素との間で相関が強いと考え
られる。すなわち、レベル7を含む上位のビットでは、
各画素の同一レベルを参照することによって、効率よく
予測を行なうことのできるコンテキストを作成すること
ができる。
Generally, in a multivalued image having many low frequency components such as a photographic image, it can be statistically expected that a change in density between a certain target pixel and surrounding pixels is small. Therefore, it can be considered that each pixel value takes a close value in many cases. When the change in pixel value is small and takes close values, in many cases only the value of the lower one or several bits near level 0 changes, and the upper bits including level 7 hardly change. Therefore, it is considered that the higher bits including the level 7 have a strong correlation with the surrounding pixels. That is, in the upper bits including level 7,
By referring to the same level of each pixel, a context in which prediction can be efficiently performed can be created.

【0074】そこで、図6(B)に示すように、7ビッ
トおきに参照データを設定したテンプレートを適用す
る。これによって、例えば図7(A)に示すように、注
目データがレベル7のデータである場合には、参照デー
タはすべてレベル7のデータとなる。同様に、注目デー
タがレベル6のデータである場合には、図7(B)に示
すように、参照データはすべてレベル6のデータとな
る。他のレベルについても同様に、同レベルのデータの
みを参照することができる。これによって、上位のデー
タについては、相関の強いデータを参照してコンテキス
トを作成できるので、予測的中率を高め、符号量を低減
することができる。
Therefore, as shown in FIG. 6B, a template in which reference data is set every seven bits is applied. Thus, as shown in FIG. 7A, for example, when the data of interest is data of level 7, the reference data is all data of level 7. Similarly, when the data of interest is level 6 data, all the reference data is level 6 data, as shown in FIG. 7B. Similarly, for other levels, only data of the same level can be referred to. Thus, for the upper data, a context can be created by referring to data having a strong correlation, so that the predictive accuracy can be increased and the code amount can be reduced.

【0075】しかし、画像全体として濃度変化は少ない
ものの、下位のビットでは微小な濃度変化でも値が変化
している。この例のように1画素あたり256階調(=
8ビット)の中間調画像では、実際に10階調未満の階
調変化がランダムに起こる。このように、下位のビット
における値の変化は、例えばレベル0のデータではほと
んどノイズと同様にランダムな値を取ると言っても過言
ではない。すなわち、下位のビットでは、周辺画素の同
じレベルのデータとの間の相関はあまり強くないと考え
られる。
However, although the density change is small in the entire image, the value changes in the lower bits even with a small density change. As in this example, 256 gradations per pixel (=
In an 8-bit halftone image, a gradation change of less than 10 gradations actually occurs at random. As described above, it is not an exaggeration to say that the change in the value of the lower bits takes a random value almost in the same manner as noise in data of level 0, for example. That is, it is considered that the correlation between the lower-order bits and the data of the same level of the peripheral pixels is not so strong.

【0076】このような相関の弱い下位のビットのデー
タに対して、例えば図6(B)に示したようなテンプレ
ートを適用し、下位の同じレベルのデータを参照して
も、効率のよい予測を行なうことはできない。また、他
の効率のよい予測テンプレートを作成することは困難で
ある。つまり、どのようなテンプレートを作成しても、
それほど予測効率に影響しないと考えられる。しかし、
レベル7を含む上位のビットのデータと同じように、図
6(B)に示したテンプレートを適用すると、ある場合
には下位のビットに対するコンテキストとして、上位の
ビットのデータにおいて頻繁に出現するコンテキストと
同じコンテキストが生成される場合があり、その場合に
予測外れを引き起こして上位のビットのデータの予測的
中率が低下する可能性がある。
For example, a template as shown in FIG. 6B is applied to such lower-order bit data having a weak correlation, and efficient prediction can be performed by referring to the same lower-order data. Cannot be done. It is also difficult to create another efficient prediction template. In other words, no matter what template you create,
It is thought that it does not significantly affect the prediction efficiency. But,
As in the case of the data of the high-order bit including the level 7, when the template shown in FIG. 6B is applied, in some cases, the context frequently appears in the data of the high-order bit as the context for the low-order bit. The same context may be generated, in which case the prediction may be distorted and the predictive accuracy of the data of the upper bit may be reduced.

【0077】例えば、濃度が薄いグレーレベルの中間調
データで、階調が連続して60〜90程度であるとする
と、レベル7はほとんど全て0となり、使用されるコン
テキストもすべて0である。この場合、レベル7の予測
においては予測が当たりつづけるため、JBIGの算術
符号化方式では、符号がほとんど発生しない。ところ
が、レベル0で同じテンプレートを使用した場合、偶
然、すべて0のコンテキストが発生し、しかも予測外れ
を引き起こすことは十分に考えられる。この場合、この
コンテキストに対する確率推定テーブル6のSTATE
は、LSZ領域を増やす方向に変更されるので、その後
すべて0のコンテキストで予測が当たったとしても、符
号量は予測が当たり続けた場合に比べ、格段に落ちてし
まう。
For example, assuming that the gray level is halftone data of about 60 to 90 continuously with light gray level halftone data, almost all levels 7 are 0 and all used contexts are 0. In this case, in the prediction at level 7, since the prediction continues, codes are hardly generated in the arithmetic coding method of JBIG. However, when the same template is used at level 0, it is quite possible that an all-zero context is accidentally generated, and furthermore, a prediction error is caused. In this case, STATE of the probability estimation table 6 for this context
Is changed in the direction of increasing the LSZ area, so that even if the prediction is successful in the context of all 0s thereafter, the code amount drops significantly compared to the case where the prediction continues.

【0078】そこで、下位のビットにおいてはコンテキ
ストを固定し、例えばJBIGのTP処理で使用される
ような、発生しにくいと考えられるテンプレートを固定
コンテキスト部46で発生し、これを用いるように構成
する。これにより、下位のビットのデータ自体の予測効
率はあまり上がらないが、他のレべルの予測に悪影響を
及ぼさないため、画像全体の符号量を低減させることが
できる。なお、固定コンテキスト部46で発生する固定
のコンテキストとしては、例えば図6(C)に示す各画
素位置の値を用いたものとすることができる。
Therefore, the context is fixed in the lower bits, and a template which is considered to be unlikely to be generated, for example, used in the JBIG TP process, is generated in the fixed context section 46 and used. . As a result, the prediction efficiency of the lower-order bit data itself does not increase so much, but does not adversely affect the prediction of other levels, so that the code amount of the entire image can be reduced. As the fixed context generated in the fixed context unit 46, for example, the value using each pixel position shown in FIG. 6C can be used.

【0079】各レベルにおいて図6(B)に示したテン
プレートを用いるか、あるいは例えば図6(C)に示す
ような固定のコンテキストを選択するかは任意である。
例えば、レベル7〜1までについては図6(B)に示し
たテンプレートを用い、レベル0については固定のコン
テキストを用いるようにすることができる。この場合、
図6(B)に示したテンプレートを用いたコンテキスト
の作成をテンプレート抽出部44で行ない、図6(C)
に示した固定のコンテキストを固定コンテキスト部46
から出力させ、入力データ31のレベルによって、レベ
ル7〜1の時にはテンプレート抽出部44の出力を選択
し、レベル0の時には固定コンテキスト部46の出力を
選択するように、コンテキスト選択部47を制御すれば
よい。この場合、テンプレート抽出部45は不要である
ので設けなくてもよい。もちろん、テンプレート抽出部
45で中位のビットに対する他のテンプレートを適用
し、例えばレベル0、7以外のレベルについては、テン
プレート抽出部45の出力をコンテキスト選択部47が
選択するように構成してもよい。
It is optional to use the template shown in FIG. 6B at each level, or to select a fixed context as shown in FIG. 6C, for example.
For example, the template shown in FIG. 6B can be used for levels 7 to 1, and a fixed context can be used for level 0. in this case,
Creation of a context using the template shown in FIG. 6B is performed by the template extracting unit 44, and FIG.
The fixed context shown in FIG.
The context selection unit 47 is controlled so that the output of the template extraction unit 44 is selected when the level is 7 to 1 and the output of the fixed context unit 46 is selected when the level is 0 according to the level of the input data 31. I just need. In this case, the template extracting section 45 is unnecessary and need not be provided. Of course, the template extraction unit 45 may apply another template for the middle-order bit, and for example, for levels other than levels 0 and 7, the context selection unit 47 may select the output of the template extraction unit 45. Good.

【0080】図8は、本発明の第2の実施の形態を示す
ブロック構成図である。図中、図1と同様の部分には同
じ符号を付して説明を省略する。34は予測部、51,
52は予測メモリ、53,54はセレクタ、55は制御
部である。この第2の実施の形態では、予測部34に複
数の予測メモリ51,52を設け、データの種類によっ
て使用する予測メモリを選択するようにした例を示して
いる。なお、コンテキスト生成部32は、ラインメモリ
41,42と、シフトレジスタ43と、テンプレート抽
出部44によって構成し、従来のコンテキスト生成部2
と同様の構成としているが、テンプレート抽出部44に
おいてコンテキストを生成する際に、入力データ31に
応じたテンプレートを用いている。
FIG. 8 is a block diagram showing a second embodiment of the present invention. In the figure, the same parts as those in FIG. 34 is a prediction unit, 51,
52 is a prediction memory, 53 and 54 are selectors, and 55 is a control unit. In the second embodiment, an example is shown in which a plurality of prediction memories 51 and 52 are provided in the prediction unit 34, and a prediction memory to be used is selected according to the type of data. The context generation unit 32 includes line memories 41 and 42, a shift register 43, and a template extraction unit 44.
However, when generating a context in the template extracting unit 44, a template corresponding to the input data 31 is used.

【0081】予測メモリ51,52には、それぞれ、例
えば図16に示したような予測テーブルが格納されてい
る。なお、予測テーブルに書き込まれている各コンテキ
ストに対応した予測値及びステートは、予測メモリ51
と予測メモリ52で異なっていてよい。また、予測メモ
リは3つ以上であってももちろんよい。
The prediction memories 51 and 52 store prediction tables, for example, as shown in FIG. The prediction value and state corresponding to each context written in the prediction table are stored in the prediction memory 51.
And the prediction memory 52 may be different. Also, the number of prediction memories may be three or more.

【0082】セレクタ53は、予測メモリ51または予
測メモリ52の出力のいずれかを選択し、予測値及びス
テートを出力する。セレクタ54は、予測テーブルに書
き戻す新予測値及びステートを、予測メモリ51あるい
は予測メモリ52のいずれかを選択して出力する。制御
部55は、符号化の対象である注目データの種類に応じ
てセレクタ53を制御し、予測メモリ51又は予測メモ
リ52の出力のいずれかを選択させる。また、符号化に
よって予測テーブルの変更を行なう際には、符号化を行
なった注目データの種類に応じてセレクタ54を制御
し、予測テーブルの変更を行なう予測メモリを選択させ
る。
The selector 53 selects either the output of the prediction memory 51 or the output of the prediction memory 52, and outputs a predicted value and a state. The selector 54 selects either the prediction memory 51 or the prediction memory 52 and outputs the new prediction value and state to be written back to the prediction table. The control unit 55 controls the selector 53 according to the type of the data of interest to be encoded, and selects either the prediction memory 51 or the output of the prediction memory 52. When the prediction table is changed by encoding, the selector 54 is controlled in accordance with the type of the coded data of interest to select a prediction memory in which the prediction table is changed.

【0083】本発明の第2の実施の形態における動作の
一例を説明する。まず、図2(A)に示したように、画
素データと属性データとが混在した入力データの場合に
ついて説明する。図2(A)に示したデータフォーマッ
トの入力データの場合には、上述のように、画素データ
及び属性データとも、図2(B)に示したテンプレート
を用いてコンテキストを生成することが可能であった。
この場合、同じテンプレートを用いるものの、画素デー
タから生成されるコンテキストと、属性データから生成
されるコンテキストでは、データの性質の違いから異な
るコンテキストとなることが予想される。しかし、例え
ばすべて同じ属性データが付されている場合でも、画素
データから生成されるコンテキストが属性データから生
成されるコンテキストと同じコンテキストとなり、しか
も予測がはずれると、次の属性データの予測もはずれる
可能性があり、このような予測はずれによって符号量は
格段に多くなってしまう。
An example of the operation according to the second embodiment of the present invention will be described. First, the case of input data in which pixel data and attribute data are mixed as shown in FIG. In the case of the input data of the data format shown in FIG. 2A, the context can be generated using the template shown in FIG. 2B for both the pixel data and the attribute data as described above. there were.
In this case, although the same template is used, it is expected that a context generated from the pixel data and a context generated from the attribute data will be different contexts due to a difference in data characteristics. However, for example, even when all of the attribute data is the same, the context generated from the pixel data becomes the same context as the context generated from the attribute data, and if the prediction is incorrect, the prediction of the next attribute data may also be incorrect. Therefore, the amount of code is remarkably increased due to such misprediction.

【0084】このような場合を回避するため、例えば注
目データが画素データの場合には予測メモリ51を用
い、注目データが属性データの場合には予測メモリ52
を用いて予測を行なうように、セレクタ53で予測結果
を切り換える。これによって、画素データから生成した
コンテキストと属性データから生成したコンテキストが
同じであっても、互いの予測値に影響せず、予測的中率
を向上させることができる。これによって符号量を低減
することができる。
In order to avoid such a case, for example, when the target data is pixel data, the prediction memory 51 is used, and when the target data is attribute data, the prediction memory 52 is used.
The prediction result is switched by the selector 53 so that the prediction is performed using. Thus, even when the context generated from the pixel data and the context generated from the attribute data are the same, the prediction accuracy can be improved without affecting the mutual predicted values. As a result, the code amount can be reduced.

【0085】別の例として、図6(A)に示したよう
に、多値画像をレベルプレーン展開したデータが入力さ
れる場合について説明する。この場合には、上述のよう
に図6(B)に示す7ビットおきのテンプレートを用い
ることによって、すべてのレベルについて各レベルごと
のデータを参照してコンテキストを生成することができ
る。また、この例のようにレベルプレーン展開された多
値画像データでは、上位のレベルでは予測が当たりやす
く、下位のレベルでは予測がはずれやすいことは先に述
べたとおりである。上述の第1の実施の形態では予測が
はずれやすい下位のレベルでは固定のコンテキストを用
いる例を示したが、この第2の実施の形態では、同じテ
ンプレートを用い、各レベルの予測の的中率に応じて予
測メモリを分けて使用する。すなわち、予測が当たりや
すい上位のレベル、例えばレベル7〜5については、例
えば予測メモリ51を使用し、予測が当たりにくい下位
のレベル、例えばレベル4〜0については、例えば予測
メモリ52を使用する。そして、制御部55において注
目データのレベルを管理し、セレクタ53,54で予測
メモリを選択する。これによって、予測が当たりにくい
下位のレベルの予測によって予測メモリ51内の予測テ
ーブルが書き変わることはないので、上位のレベルにつ
いては下位のレベルの影響を受けずに予測が当たりやす
い状態が保たれる。そのため、全体として符号量を低減
させることができる。
As another example, a case where data obtained by expanding a multi-valued image into a level plane as shown in FIG. 6A will be described. In this case, as described above, by using the template every seven bits shown in FIG. 6B, it is possible to generate a context by referring to the data for each level for all levels. Also, as described above, in the multi-valued image data developed in the level plane as in this example, the prediction is easily performed at the upper level, and the prediction is easily lost at the lower level, as described above. In the above-described first embodiment, an example is shown in which a fixed context is used at a lower level where prediction is likely to be lost. However, in the second embodiment, the same template is used, and the prediction accuracy of each level is used. The prediction memory is used separately according to. That is, for example, the prediction memory 51 is used for an upper level that is easy to predict, for example, levels 7 to 5, and the prediction memory 52 is used for a lower level that is difficult to be predicted, for example, levels 4 to 0. Then, the control unit 55 manages the level of the data of interest, and the selectors 53 and 54 select a prediction memory. As a result, the prediction table in the prediction memory 51 is not rewritten by the lower-level prediction that is difficult to predict, so that the upper level is easily influenced by the lower level without being affected by the lower level. It is. Therefore, the code amount can be reduced as a whole.

【0086】図9は、本発明の第2の実施の形態におけ
る第1の変形例を示すブロック構成図である。図中、図
1及び図8と同様の部分には同じ符号を付して説明を省
略する。56は予測メモリである。この変形例では、コ
ンテキスト生成部32に、上述の第1の実施の形態と同
様に複数のテンプレート抽出部44,45を設け、さら
に固定コンテキスト部46を設けた例を示している。も
ちろん、複数のテンプレート抽出部のみとしてもよい
し、テンプレート抽出部を3以上設けてもよい。さら
に、この例ではコンテキスト選択部47を設けずに、各
テンプレート抽出部44,45及び固定コンテキスト部
46に対応した予測メモリ51,52,56を設けてい
る。
FIG. 9 is a block diagram showing a first modification of the second embodiment of the present invention. In the figure, the same parts as those in FIGS. 1 and 8 are denoted by the same reference numerals, and description thereof will be omitted. 56 is a prediction memory. In this modification, an example is shown in which a plurality of template extracting units 44 and 45 are provided in the context generating unit 32 as in the first embodiment described above, and a fixed context unit 46 is further provided. Of course, only a plurality of template extracting units may be provided, or three or more template extracting units may be provided. Further, in this example, the prediction memories 51, 52, and 56 corresponding to the template extracting units 44, 45 and the fixed context unit 46 are provided without providing the context selecting unit 47.

【0087】このような構成によれば、各テンプレート
抽出部44,45および固定コンテキスト部46からそ
れぞれ出力されるコンテキストは、それぞれ対応する予
測メモリ51,52,56に入力され、予測値及びステ
ートが出力される。セレクタ53は、入力データ31の
種類に応じた予測メモリの出力を制御部55の制御に従
って選択する。これにより、入力データ31の種類に応
じた複数のテンプレートを用いてコンテキストを生成で
きるとともに、対応する予測メモリを用いることができ
る。そのため、各予測メモリの予測テーブルは、予測時
には他の種類のデータから生成したコンテキストに影響
されることなく、対応する種類のデータから生成したコ
ンテキストに対してのみ予測に用いられるので、予測的
中率が高くなり、全体の符号量を低減することができ
る。
According to such a configuration, the context output from each of the template extracting units 44 and 45 and the fixed context unit 46 is input to the corresponding prediction memories 51, 52 and 56, and the predicted value and the state are stored. Is output. The selector 53 selects the output of the prediction memory according to the type of the input data 31 according to the control of the control unit 55. Thus, a context can be generated using a plurality of templates corresponding to the type of the input data 31, and a corresponding prediction memory can be used. Therefore, the prediction table of each prediction memory is used for prediction only for the context generated from the corresponding type of data without being affected by the context generated from other types of data at the time of prediction. The rate is increased, and the overall code amount can be reduced.

【0088】このような構成を用いることにより、例え
ば図4(A)に示すように画像データと属性データが混
在したデータフォーマットの入力データや、多値画像を
レベルプレーン展開したデータに属性データが混在した
入力データなど、種々の異なる種類のデータが混在した
データ列に対応した効率のよい符号化を行なうことがで
きる。
By using such a configuration, for example, as shown in FIG. 4A, attribute data is converted into input data of a data format in which image data and attribute data are mixed, and data obtained by expanding a multi-valued image into a level plane. Efficient encoding corresponding to a data string in which various different types of data such as mixed input data are mixed can be performed.

【0089】図10は、本発明の第2の実施の形態にお
ける第2の変形例を示すブロック構成図である。図中の
符号は図8と同様である。この第2の変形例では、固定
予測値及び固定ステートをセレクタ53で選択可能に構
成した例を示している。例えば上述の第1の実施の形態
において、コンテキスト生成部32の固定コンテキスト
部46を選択する場合とは、予測的中率が低い場合であ
る。このような場合には予測値がいずれの値であっても
それほど予測的中率は向上せず、例えば予測テーブルを
更新してもほとんど効果は上がらない。逆に、予測テー
ブルの更新を行なわなくてもよく、すなわち所定の予測
値を常に出力しても、予測的中率はほとんど変わらな
い。そのため、この第2の変形例では、コンテキスト生
成部32で固定コンテキスト部46を設ける代わりに、
固定予測値及び固定ステートをセレクタ53で選択する
ように構成している。
FIG. 10 is a block diagram showing a second modification of the second embodiment of the present invention. Reference numerals in the figure are the same as those in FIG. The second modification shows an example in which the fixed prediction value and the fixed state can be selected by the selector 53. For example, in the above-described first embodiment, the case where the fixed context unit 46 of the context generating unit 32 is selected is a case where the predictive accuracy is low. In such a case, the predictive predictive value does not improve so much regardless of the predicted value. For example, even if the prediction table is updated, the effect is hardly increased. Conversely, it is not necessary to update the prediction table, that is, even if a predetermined prediction value is always output, the prediction accuracy rate hardly changes. Therefore, in the second modification, instead of providing the fixed context section 46 in the context generation section 32,
The fixed prediction value and the fixed state are selected by the selector 53.

【0090】固定予測値及び固定ステートを選択した場
合、符号化部33から新予測値などの書き換えデータが
返される場合があるが、その場合にも固定予測値や固定
ステートを変更する必要はない。この場合、書き換えデ
ータが予測メモリ51に書き込まれないようにセレクタ
54を制御すればよい。
When the fixed prediction value and the fixed state are selected, rewriting data such as a new prediction value may be returned from the encoding unit 33. In such a case, it is not necessary to change the fixed prediction value and the fixed state. . In this case, the selector 54 may be controlled so that the rewrite data is not written to the prediction memory 51.

【0091】図10に示した例では予測メモリが1つの
場合のみ示しているが、もちろん、複数であってよい。
また、第1の変形例と同様に、コンテキスト生成部32
内に複数のテンプレート抽出部を設けることもできる。
この場合、固定コンテキスト部46は不要である。
In the example shown in FIG. 10, only one prediction memory is shown, but a plurality of prediction memories may be used.
Further, similarly to the first modification, the context generation unit 32
It is also possible to provide a plurality of template extraction units in the server.
In this case, the fixed context section 46 is unnecessary.

【0092】以上、本発明の符号化方法及び符号化装置
の実施の形態を示したが、このようにして符号化された
符号データを復号する場合においても、同じ操作により
原データに復元することができる。
The embodiments of the encoding method and the encoding apparatus according to the present invention have been described above. Even when the encoded data thus encoded is decoded, the same operation can be used to restore the original data. Can be.

【0093】図11は、本発明の第3の実施の形態を示
すブロック構成図である。図中、図20と同様の部分に
は同じ符号を付して説明を省略する。61は出力デー
タ、62はコンテキスト生成部、63は復号部である。
この例では、確率推定テーブル6と算術復号化部21を
まとめて復号部63として示している。図11(B)に
コンテキスト生成部62の構成例を示しているが、この
構成は図1(B)に示したコンテキスト生成部32の構
成と同一である。ラインメモリ41及びシフトレジスタ
43に入力されるデータが出力データ61である点が異
なるのみである。
FIG. 11 is a block diagram showing a third embodiment of the present invention. In the figure, the same parts as those in FIG. 20 are denoted by the same reference numerals, and description thereof is omitted. 61 is output data, 62 is a context generation unit, and 63 is a decoding unit.
In this example, the probability estimation table 6 and the arithmetic decoding unit 21 are collectively shown as a decoding unit 63. FIG. 11B shows a configuration example of the context generation unit 62, and this configuration is the same as the configuration of the context generation unit 32 shown in FIG. 1B. The only difference is that data input to the line memory 41 and the shift register 43 is output data 61.

【0094】算術復号化部21で復号された出力データ
61は、ラインメモリ41およびシフトレジスタ43に
入力される。シフトレジスタ43には、ラインメモリ4
1で1ライン分遅延した出力データとラインメモリ41
および42で2ライン分遅延した出力データも入力され
る。テンプレート抽出部44,45は、それぞれ異なる
テンプレートを有しており、それぞれのテンプレートに
従ってシフトレジスタ43内のデータを参照し、それぞ
れコンテキストを生成して出力する。また、固定コンテ
キスト部46は所定のコンテキストを出力する。コンテ
キスト選択部47は、復号される対象である注目データ
の種類に応じた制御部48からの制御信号49に従っ
て、テンプレート抽出部44,45および固定コンテキ
スト部46の出力のいずれかを選択し、逆予測部22へ
出力する。
The output data 61 decoded by the arithmetic decoding unit 21 is input to the line memory 41 and the shift register 43. The shift register 43 has a line memory 4
The output data delayed by one line and the line memory 41
The output data delayed by two lines at steps 42 and 42 is also input. The template extracting units 44 and 45 have different templates, respectively, refer to the data in the shift register 43 according to each template, and generate and output a context. The fixed context section 46 outputs a predetermined context. The context selection unit 47 selects one of the outputs of the template extraction units 44 and 45 and the fixed context unit 46 according to a control signal 49 from the control unit 48 corresponding to the type of the target data to be decoded, and Output to the prediction unit 22.

【0095】なお、各テンプレート抽出部44,45が
使用するテンプレートは、符号化時に用いたものと同じ
テンプレートである。また、制御部48は、注目データ
の種類に応じ、符号化時と同じテンプレートが適用され
るテンプレート抽出部44,45あるいは固定コンテキ
スト部46が選択されるように制御する。
The template used by each of the template extracting units 44 and 45 is the same template used at the time of encoding. Further, the control unit 48 controls so that the template extraction units 44 and 45 or the fixed context unit 46 to which the same template as at the time of encoding is applied are selected according to the type of the data of interest.

【0096】例えば、図2(A)に示したように画像デ
ータと属性データが混在したデータフォーマットのデー
タを符号化した符号データに対しては、例えばテンプレ
ート抽出部44において図2(B)に示すテンプレート
を用いて復号済みの出力データからコンテキストを作成
して予測を行なう。また、図4(A)に示したようなデ
ータフォーマットのデータを符号化した符号データであ
れば、テンプレート抽出部を5ないし6個設け、それぞ
れが図4(B)〜(F)に示すテンプレート及び必要に
応じて属性データ用のテンプレートのいずれかを用いて
コンテキストを生成するように構成すればよい。さら
に、図6に示したような多値画像をレベルプレーン展開
したデータを符号化した符号データであれば、例えばテ
ンプレート抽出部44において図6(B)に示すテンプ
レートを用いてコンテキストを作成し、固定コンテキス
ト部46から図6(C)に示すコンテキストが出力され
るように構成すればよい。他のデータフォーマットの場
合にも、同様にして符号化時と対応したテンプレートの
使用あるいは固定コンテキストの選択が行なわれるよう
に構成すればよい。
For example, as shown in FIG. 2A, with respect to coded data obtained by coding data in a data format in which image data and attribute data are mixed, as shown in FIG. Using the template shown, a context is created from the decoded output data and prediction is performed. Further, if it is code data obtained by encoding data in the data format as shown in FIG. 4A, five or six template extracting units are provided, each of which is provided with a template extracting part as shown in FIGS. The context may be generated by using any of the attribute data templates as needed. Further, in the case of encoded data obtained by encoding data obtained by level-expanding a multi-valued image as shown in FIG. 6, for example, the template extracting unit 44 creates a context using the template shown in FIG. What is necessary is just to comprise so that the context shown in FIG.6 (C) may be output from the fixed context part 46. FIG. In the case of other data formats as well, it may be configured so that the use of a template or selection of a fixed context corresponding to the encoding is performed in the same manner.

【0097】コンテキスト生成部32から出力されるコ
ンテキストは逆予測部22に入力され、逆予測値が算術
復号化部21へ、また、ステートが確率推定テーブル6
へ出力される。確率推定テーブル6は、ステートをもと
にLSZ,SW等の情報を読み出して算術復号化部21
へ送り、算術復号化部21はこれらの情報と逆予測値か
ら符号データ10を復号し、出力データ61として出力
する。また、必要に応じて新逆予測値などの書き換えデ
ータ24および書き換え信号12を逆予測部22へ送
り、逆予測テーブルの書き換えを行なう。
The context output from the context generation unit 32 is input to the inverse prediction unit 22, the inverse prediction value is output to the arithmetic decoding unit 21, and the state is output to the probability estimation table 6.
Output to The probability estimation table 6 reads information such as LSZ and SW on the basis of the state and outputs the information to the arithmetic decoding unit 21.
The arithmetic decoding unit 21 decodes the code data 10 from the information and the inverse prediction value, and outputs the decoded data as output data 61. Further, if necessary, rewrite data 24 such as a new inverse prediction value and the rewrite signal 12 are sent to the inverse prediction unit 22 to rewrite the inverse prediction table.

【0098】このようにして符号化時と同様に予測を行
なって復号することにより、画像データと属性データが
混在したデータや、多値画像をレベルプレーン展開した
データ及びそのデータと属性データが混在したデータな
どが符号化された符号データについて、復号してもとの
データを復元することができる。
By performing prediction and decoding in the same manner as at the time of encoding, data in which image data and attribute data are mixed, data in which a multi-valued image is expanded into a level plane, and the data and attribute data are mixed. The original data can be restored by decoding the encoded data obtained by encoding the decoded data.

【0099】なお、復号の際にも、上述の第2の実施の
形態およびその第1、第2の変形例と同様の構成とする
ことができる。すなわち、図11(A)の逆予測部22
を図8や図10に示す予測部34と同様に構成したり、
コンテキスト生成部32及び逆予測部22を図9に示す
コンテキスト生成部32及び予測部34と同様に構成す
ることができる。
At the time of decoding, the same configuration as that of the above-described second embodiment and the first and second modified examples can be adopted. That is, the inverse prediction unit 22 in FIG.
Is configured in the same manner as the prediction unit 34 shown in FIG. 8 or FIG.
The context generation unit 32 and the inverse prediction unit 22 can be configured similarly to the context generation unit 32 and the prediction unit 34 shown in FIG.

【0100】図12は、本発明の応用例を示すブロック
構成図である。図中、図25と同様の部分には同じ符号
を付して説明を省略する。111は混合部、112は符
号化部、113は符号データ格納部、114は復号化
部、115は分離部である。入力部101から入力され
た画像データは、画像処理部102で処理されて混合部
111に入力されるとともに、TI分離部106でTI
分離処理が施されてTI分離フラグが混合部111に入
力される。混合部111では、例えば図2(A)や図4
(A)に示すような画像データとTI分離フラグが混在
したデータを作成して符号化部112に渡す。符号化部
112は、上述の本発明の第1又は第2の実施の形態で
示した構成及び方法によって、画像データとTI分離フ
ラグが混在したデータを符号化し、符号データ格納部1
13に格納する。このとき、符号化部112では、上述
のように画像データとTI分離フラグとで異なるテンプ
レートを用いたり、あるいはTI分離フラグについては
固定のコンテキストを選択したり、さらにはそれぞれ別
の予測テーブルを用いて予測処理を行なうことによっ
て、符号量を低減している。
FIG. 12 is a block diagram showing an application of the present invention. In the figure, the same parts as those in FIG. 111 is a mixing unit, 112 is an encoding unit, 113 is a code data storage unit, 114 is a decoding unit, and 115 is a separation unit. The image data input from the input unit 101 is processed by the image processing unit 102 and input to the mixing unit 111, and the TI data
The separation processing is performed, and the TI separation flag is input to the mixing unit 111. In the mixing unit 111, for example, FIG.
As shown in (A), data in which image data and a TI separation flag are mixed is created and passed to the encoding unit 112. The encoding unit 112 encodes the data in which the image data and the TI separation flag are mixed by the configuration and the method described in the above-described first or second embodiment of the present invention.
13 is stored. At this time, the encoding unit 112 uses a different template for the image data and the TI separation flag as described above, selects a fixed context for the TI separation flag, and uses a different prediction table for each. By performing the prediction processing in this way, the code amount is reduced.

【0101】出力時には、符号データ格納部113から
符号データを取り出し、復号化部114で復号して画像
データとTI分離フラグが混在したデータに戻し、分離
部15で画像データとTI分離フラグを分離して出力部
110に渡す。出力部110では、TI分離フラグを参
照しながら画像データに対して出力のための画像処理を
施して画像を形成する。
At the time of output, the code data is extracted from the code data storage unit 113, decoded by the decoding unit 114, and returned to the data in which the image data and the TI separation flag are mixed, and the separation unit 15 separates the image data and the TI separation flag. And passes it to the output unit 110. The output unit 110 forms an image by performing image processing for output on the image data while referring to the TI separation flag.

【0102】図12に示した構成では、画像データとT
I分離フラグを混合して符号化しているので、符号デー
タ格納部113に格納された符号データの管理が容易で
ある。また、1ないし数画素のデータごとにTI分離フ
ラグを挿入したデータを符号化しているので、復号化し
ながら出力部110で処理を行なうことができ、出力部
110のバッファの容量を削減できるとともに、高速な
出力処理が可能である。このような画像データとTI分
離フラグとを混在させたデータを符号化した場合、従来
では符号量が非常に多くなったが、本発明を用いること
によって効率よく符号化され、符号量を低減することが
できる。そのため、1つの画像あたりの符号データ格納
部113に占める容量を削減でき、符号データ格納部1
13の容量削減あるいは多量の画像の保持が可能とな
る。
In the configuration shown in FIG. 12, image data and T
Since the I separation flag is mixed and encoded, the management of the code data stored in the code data storage unit 113 is easy. In addition, since the data into which the TI separation flag is inserted is encoded for each data of one or several pixels, the output unit 110 can perform processing while decoding the data, and the buffer capacity of the output unit 110 can be reduced. High-speed output processing is possible. In the case of encoding data in which such image data and the TI separation flag are mixed, the amount of code has been extremely large in the related art. However, by using the present invention, the code is efficiently encoded and the amount of code is reduced. be able to. Therefore, the capacity of the code data storage unit 113 per image can be reduced, and the code data storage unit 1
13 or a large amount of images can be stored.

【0103】[0103]

【発明の効果】以上の説明から明らかなように、本発明
によれば、属性データと画像データが混在したデータ、
または、多値画像をレベルプレーン展開したデータ等、
複数種類のデータが混在するデータ列を符号化する場合
に、注目データの種類に応じて出現済みの同種類の複数
の参照データを選択してコンテキストを生成し、生成さ
れたコンテキストから注目データの値を予測し、該予測
した値と注目データの値をもとに予測符号化する。同じ
種類の周辺のデータは相関が強いと考えられ、相関が強
いデータを用いて予測を行なうと的中率がよいことを利
用し、参照データとして同種類の複数のデータを選択し
て的中率を向上させることができる。通常、予測符号化
では予測が的中する場合の符号データが少なくなるよう
に構成されているので、上述のように予測的中率を向上
させることによって符号量を減少させ、効率のよい符号
化を行なうことができる。
As apparent from the above description, according to the present invention, attribute data and image data are mixed,
Or, data obtained by expanding a multi-valued image to a level plane, etc.
When encoding a data string in which a plurality of types of data are mixed, a context is generated by selecting a plurality of reference data of the same type that has already appeared according to the type of the target data, and a context of the target data is generated from the generated context. A value is predicted, and prediction encoding is performed based on the predicted value and the value of the data of interest. The surrounding data of the same type is considered to have a strong correlation, and by making use of the fact that a prediction is performed using data with a strong correlation, the hit rate is good. Rate can be improved. Normally, since predictive coding is configured to reduce the amount of code data when a prediction is correct, the code amount is reduced by improving the predictive accuracy as described above, and efficient coding is performed. Can be performed.

【0104】また、予測効率が悪いデータの種類につい
ては所定の状態を参照データとして選択したり、別の予
測テーブルを使用するように構成することによって、予
測効率の悪いデータの予測によって予測効率のよいデー
タが影響を受けないようにし、予測効率のよいデータの
種類については符号量が増加しないように符号化するこ
とにより、全体の符号量を低減することができる。
Further, for a type of data having a low prediction efficiency, a predetermined state is selected as reference data, or another prediction table is used, so that the prediction efficiency of the data having a low prediction efficiency is reduced. By encoding good data so as not to be affected, and encoding the types of data with good prediction efficiency so that the code amount does not increase, the total code amount can be reduced.

【0105】このように、複数種類のデータが混在する
データ列を効率よく符号化できるので、それぞれの種類
ごとに別々に符号化する必要はなくなり、1つの符号デ
ータとして効率よく符号化することができるという効果
がある。
As described above, since a data sequence in which a plurality of types of data are mixed can be efficiently encoded, it is not necessary to separately encode each type, and it is possible to efficiently encode as one encoded data. There is an effect that can be.

【0106】また、上述のような符号化方法を実現する
符号化装置として、コンテキスト生成部を注目データの
種類に応じて出現済みの同種類の複数の参照データを選
択してコンテキストを生成するように構成したので、注
目データと相関の強い同種類のデータからなるコンテキ
ストを出力することができ、予測部でこのコンテキスト
を用いることによって予測的中率の高い予測値を出力で
きる。符号化部では予測値と注目データをもとに予測符
号化するが、予測値の予測的中率が高いことから少ない
符号量の符号データを生成することができる。また、予
測メモリを複数設けたり、固定コンテキスト部を設け、
予測的中率が悪いデータの種類については、固定コンテ
キスト部で所定の状態を参照データとして選択したり、
他の種類のデータとは別の予測メモリを使用するように
構成することができる。これによって、予測的中率の悪
い種類のデータの予測によって予測的中率のよい種類の
データが影響を受けないようにし、予測的中率のよい種
類のデータについては符号量が増加しないように符号化
することにより、全体の符号量を低減することができ
る。
Further, as an encoding apparatus for realizing the above-described encoding method, the context generation unit generates a context by selecting a plurality of reference data of the same type that have already appeared according to the type of the data of interest. , It is possible to output a context composed of the same type of data strongly correlated with the target data, and it is possible to output a predicted value with a high predictive accuracy by using this context in the prediction unit. The encoding unit performs predictive encoding based on the predicted value and the data of interest. However, since the predictive accuracy of the predicted value is high, it is possible to generate code data with a small code amount. Also, a plurality of prediction memories or a fixed context section is provided,
For a type of data having a poor predictive accuracy, a predetermined state is selected as reference data in the fixed context part,
It can be configured to use a different prediction memory from other types of data. By this, the type of data having a good predictive accuracy is not affected by the prediction of the type of data having a bad predictive accuracy, and the code amount is not increased for the type of data having a good predictive accuracy. By encoding, the entire code amount can be reduced.

【0107】また、上述の符号化方法及び符号化装置と
同様にして逆予測を行なうことによって、効率よく符号
化された符号データを復号することができる復号化方法
および復号化装置を得ることができる。
Also, by performing inverse prediction in the same manner as in the above-described encoding method and encoding apparatus, it is possible to obtain a decoding method and a decoding apparatus capable of efficiently decoding encoded data. it can.

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

【図1】 本発明の第1の実施の形態を示すブロック構
成図である。
FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】 本発明の第1の実施の形態において、各画素
データに属性データが付加された入力データのデータフ
ォーマットの一例および使用するテンプレートの一例の
説明図である。
FIG. 2 is an explanatory diagram of an example of a data format of input data in which attribute data is added to each pixel data and an example of a template to be used in the first embodiment of the present invention.

【図3】 本発明の第1の実施の形態において、各画素
データに属性データが付加された入力データの一例にお
けるコンテキストの生成に用いられるデータの説明図で
ある。
FIG. 3 is an explanatory diagram of data used for generating a context in an example of input data in which attribute data is added to each pixel data in the first embodiment of the present invention.

【図4】 本発明の第1の実施の形態において、各画素
データに属性データが付加された入力データのデータフ
ォーマットの別の例および使用するテンプレートの一例
の説明図である。
FIG. 4 is an explanatory diagram of another example of a data format of input data in which attribute data is added to each pixel data and an example of a template to be used in the first embodiment of the present invention.

【図5】 本発明の第1の実施の形態において、各画素
データに属性データが付加された入力データの別の例に
おけるコンテキストの生成に用いられるデータの別の例
の説明図である。
FIG. 5 is an explanatory diagram of another example of data used for generating a context in another example of input data in which attribute data is added to each pixel data in the first embodiment of the present invention.

【図6】 本発明の第1の実施の形態において、レベル
プレーン展開された入力データのデータフォーマットの
一例および使用するテンプレートの一例の説明図であ
る。
FIG. 6 is an explanatory diagram of an example of a data format of input data expanded in a level plane and an example of a template to be used in the first embodiment of the present invention.

【図7】 本発明の第1の実施の形態において、レベル
プレーン展開された入力データの一例におけるコンテキ
ストの生成に用いられるデータの説明図である。
FIG. 7 is an explanatory diagram of data used for generating a context in an example of input data that has been subjected to level plane development in the first embodiment of the present invention.

【図8】 本発明の第2の実施の形態を示すブロック構
成図である。
FIG. 8 is a block diagram showing a second embodiment of the present invention.

【図9】 本発明の第2の実施の形態における第1の変
形例を示すブロック構成図である。
FIG. 9 is a block diagram showing a first modification of the second embodiment of the present invention.

【図10】 本発明の第2の実施の形態における第2の
変形例を示すブロック構成図である。
FIG. 10 is a block diagram showing a second modification of the second embodiment of the present invention.

【図11】 本発明の第3の実施の形態を示すブロック
構成図である。
FIG. 11 is a block diagram showing a third embodiment of the present invention.

【図12】 本発明の応用例を示すブロック構成図であ
る。
FIG. 12 is a block diagram showing an application example of the present invention.

【図13】 算術符号化の概念図である。FIG. 13 is a conceptual diagram of arithmetic coding.

【図14】 JBIGで採用されている予測符号化方式
の概略図である。
FIG. 14 is a schematic diagram of a predictive coding method adopted in JBIG.

【図15】 JBIGで使用されるテンプレートの一例
の説明図である。
FIG. 15 is an explanatory diagram of an example of a template used in JBIG.

【図16】 予測部4に記憶されている予測テーブルの
一例の説明図である。
FIG. 16 is an explanatory diagram of an example of a prediction table stored in the prediction unit 4.

【図17】 確率推定テーブル6の一例の説明図であ
る。
FIG. 17 is an explanatory diagram of an example of the probability estimation table 6.

【図18】 入力される画像データの一具体例の説明図
である。
FIG. 18 is an explanatory diagram of a specific example of input image data.

【図19】 書き換え後の予測部テーブルの一具体例の
説明図である。
FIG. 19 is an explanatory diagram of a specific example of a prediction section table after rewriting.

【図20】 JBIGで採用されている予測復号化方式
の概略図である。
FIG. 20 is a schematic diagram of a predictive decoding method adopted in JBIG.

【図21】 算術復号化部の基本動作の説明図である。FIG. 21 is an explanatory diagram of a basic operation of the arithmetic decoding unit.

【図22】 ビットプレーン展開の説明図である。FIG. 22 is an explanatory diagram of bit plane development.

【図23】 レベルプレーン展開の説明図である。FIG. 23 is an explanatory diagram of level plane development.

【図24】 レベルプレーン展開されたデータ列の一例
の説明図である。
FIG. 24 is an explanatory diagram of an example of a data string that has undergone level plane development.

【図25】 従来の画像入出力装置において属性データ
を伴って中間情報蓄積を行なう場合の一例を示すブロッ
ク構成図である。
FIG. 25 is a block diagram showing an example of a case where intermediate information is stored with attribute data in a conventional image input / output device.

【図26】 属性データが混在した画像データの一例の
説明図である。
FIG. 26 is an explanatory diagram of an example of image data in which attribute data is mixed.

【符号の説明】[Explanation of symbols]

1…画像データ、2…コンテキスト生成部、3…コンテ
キスト、4…予測部、5…ステート、6…確率推定テー
ブル、7…LSZおよびSW、8…予測値、9…算術符
号化部、10…符号データ、11…書き換えデータ、1
2…書き換え信号、21…算術復号化部、22…逆予測
部、23…逆予測値、24…書き換えデータ、31…入
力データ、32…コンテキスト生成部、33…符号化
部、41,42…ラインメモリ、43…シフトレジス
タ、44,45…テンプレート抽出部、46…固定コン
テキスト部、47…コンテキスト選択部、48…制御
部、49…制御信号、34…予測部、51,52…予測
メモリ、53,54…セレクタ、55…制御部、56…
予測メモリ、61…出力データ、62…コンテキスト生
成部、63…復号部、101…入力部、102…画像処
理部、103…画像符号化部、104…画像符号データ
保持部、105…画像復号化部、106…TI分離部、
107…TIフラグ符号化部、108…TIフラグ符号
データ保持部、109…TIフラグ復号化部、110…
出力部、111…混合部、112…符号化部、113…
符号データ格納部、114…復号化部、115…分離
部。
DESCRIPTION OF SYMBOLS 1 ... Image data, 2 ... Context generation part, 3 ... Context, 4 ... Prediction part, 5 ... State, 6 ... Probability estimation table, 7 ... LSZ and SW, 8 ... Prediction value, 9 ... Arithmetic coding part, 10 ... Code data, 11 ... rewrite data, 1
2 rewrite signal, 21 arithmetic decoding unit, 22 inverse prediction unit, 23 inverse prediction value, 24 rewrite data, 31 input data, 32 context generation unit, 33 encoding unit, 41, 42 ... Line memory, 43 shift register, 44, 45 template extraction section, 46 fixed context section, 47 context selection section, 48 control section, 49 control signal, 34 prediction section, 51, 52 prediction memory, 53, 54 ... selector, 55 ... control unit, 56 ...
Prediction memory, 61 output data, 62 context generation unit, 63 decoding unit, 101 input unit, 102 image processing unit, 103 image coding unit, 104 image code data holding unit, 105 image decoding Section, 106 ... TI separation section,
107: TI flag encoding unit, 108: TI flag code data holding unit, 109: TI flag decoding unit, 110 ...
Output unit, 111: mixing unit, 112: encoding unit, 113 ...
Code data storage unit, 114: decoding unit, 115: separation unit.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H03M 7/36 H04N 1/417 H04N 7/32 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) H03M 7/36 H04N 1/417 H04N 7/32

Claims (11)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数種類のデータが混在するデータ列を
符号化する符号化方法において、符号化の対象となる注
目データの種類に応じて出現済みの同種類の複数の参照
データを選択してコンテキストを生成し、生成したコン
テキストから注目データの値を予測し、該予測した値と
注目データの値をもとに予測符号化することを特徴とす
る符号化方法。
In an encoding method for encoding a data string in which a plurality of types of data are mixed, a plurality of reference data of the same type that has appeared according to the type of target data to be encoded is selected. A coding method comprising: generating a context; predicting a value of data of interest from the generated context; and performing predictive coding based on the predicted value and the value of the data of interest.
【請求項2】 前記注目データの値を予測する際に、前
記注目データの種類に応じた予測用のデータを用いて予
測を行なうことを特徴とする請求項1に記載の符号化方
法。
2. The encoding method according to claim 1, wherein when predicting the value of the data of interest, the prediction is performed using data for prediction corresponding to the type of the data of interest.
【請求項3】 前記データ列は画像の属性データと画像
データの2種類のデータが混在するデータ列であること
を特徴とする請求項1または2に記載の符号化方法。
3. The encoding method according to claim 1, wherein the data sequence is a data sequence in which two types of data of image attribute data and image data are mixed.
【請求項4】 前記注目データが属性データの場合には
所定の状態を参照データとして選択し、前記注目データ
が画像データの場合には出現済みの画像データの中から
複数の参照データを選択することを特徴とする請求項3
に記載の符号化方法。
4. When the data of interest is attribute data, a predetermined state is selected as reference data, and when the data of interest is image data, a plurality of reference data are selected from already appearing image data. 4. The method according to claim 3, wherein
Encoding method.
【請求項5】 前記データ列は、各画素が複数のレベル
のデータからなる多値画像をレベルプレーン展開し各レ
ベルを異なる種類としたデータ列であることを特徴とす
る請求項1または2に記載の符号化方法。
5. The data sequence according to claim 1, wherein the data sequence is a data sequence in which a multi-level image in which each pixel is composed of a plurality of levels of data is developed into a level plane and each level is of a different type. Coding method as described.
【請求項6】 前記注目データの種類が少なくとも最下
位ビットに対応するレベルを含む所定の種類である場合
には所定の状態を参照データとして選択し、前記注目デ
ータの種類が前記所定の種類以外である場合には前記注
目データを含む注目画素の周辺に位置する複数の画素に
おける注目データと同種類のデータを参照データとして
選択することを特徴とする請求項5に記載の符号化方
法。
6. When the type of the data of interest is a predetermined type including at least a level corresponding to a least significant bit, a predetermined state is selected as reference data, and the type of the data of interest is other than the predetermined type. 6. The encoding method according to claim 5, wherein in the case of, the same type of data as the target data in a plurality of pixels located around the target pixel including the target data is selected as reference data.
【請求項7】 複数種類のデータが混在するデータ列を
符号化する符号化装置において、符号化の対象となる注
目データの種類に応じて出現済みの同種類の複数の参照
データを選択するコンテキスト生成部と、該コンテキス
ト生成部で選択された参照データの状態から注目データ
の値を予測して予測値を出力する予測部と、該予測部か
ら出力される予測値と注目データの値をもとに予測符号
化する符号化部を有することを特徴とする符号化装置。
7. An encoding apparatus for encoding a data string in which a plurality of types of data are mixed, wherein a context for selecting a plurality of reference data of the same type that has already appeared according to the type of target data to be encoded. A generation unit; a prediction unit that predicts a value of the data of interest from the state of the reference data selected by the context generation unit and outputs a predicted value; And a coding unit for performing predictive coding.
【請求項8】 前記予測部は、それぞれ別の予測用のデ
ータが格納された複数の予測メモリと、前記注目データ
の種類に応じて前記予測メモリを切り換える切換手段を
有することを特徴とする請求項7に記載の符号化装置。
8. The apparatus according to claim 1, wherein the prediction unit includes a plurality of prediction memories each storing different data for prediction, and switching means for switching the prediction memory according to a type of the data of interest. Item 8. The encoding device according to Item 7.
【請求項9】 前記コンテキスト生成部は、前記注目デ
ータが特定の種類の場合に所定の状態を参照データとし
て出力する固定コンテキスト部を含むことを特徴とする
請求項7または8に記載の符号化装置。
9. The encoding apparatus according to claim 7, wherein the context generation section includes a fixed context section that outputs a predetermined state as reference data when the target data is of a specific type. apparatus.
【請求項10】 複数種類のデータが混在するデータ列
を符号化した符号データを復号する復号化方法におい
て、次に予測復号される注目データの種類に応じて復号
済の同種類の複数の参照データを選択してコンテキスト
を生成し、生成したコンテキストから注目データの値を
逆予測し、該逆予測した値と注目データの値をもとに予
測復号することを特徴とする復号化方法。
10. A decoding method for decoding code data obtained by coding a data string in which a plurality of types of data are mixed, wherein a plurality of reference codes of the same type already decoded according to the type of target data to be predicted and decoded next. A decoding method comprising selecting data, generating a context, inversely predicting the value of the data of interest from the generated context, and performing predictive decoding based on the inversely predicted value and the value of the data of interest.
【請求項11】 複数種類のデータが混在するデータ列
を符号化した符号データを復号する復号化装置におい
て、符号データとその予測値から符号データを予測復号
する復号部と、該復号部で次に予測復号される注目デー
タの種類に応じて復号済みの同種類の複数の参照データ
を選択するコンテキスト生成部と、該コンテキスト生成
部で選択された複数の参照データの状態から注目データ
の値を予測して予測値を前記復号部へ出力する予測部を
有することを特徴とする復号化装置。
11. A decoding device for decoding code data obtained by coding a data sequence in which a plurality of types of data are mixed, a decoding unit for predictively decoding code data from the code data and its prediction value, A context generating unit that selects a plurality of reference data of the same type that has been decoded according to the type of the data of interest to be predicted and decoded; and A decoding device comprising: a prediction unit that predicts and outputs a prediction value to the decoding unit.
JP9617597A 1997-04-14 1997-04-14 Encoding method and encoding device, decoding method and decoding device Expired - Lifetime JP3235510B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9617597A JP3235510B2 (en) 1997-04-14 1997-04-14 Encoding method and encoding device, decoding method and decoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9617597A JP3235510B2 (en) 1997-04-14 1997-04-14 Encoding method and encoding device, decoding method and decoding device

Publications (2)

Publication Number Publication Date
JPH10290166A JPH10290166A (en) 1998-10-27
JP3235510B2 true JP3235510B2 (en) 2001-12-04

Family

ID=14157999

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9617597A Expired - Lifetime JP3235510B2 (en) 1997-04-14 1997-04-14 Encoding method and encoding device, decoding method and decoding device

Country Status (1)

Country Link
JP (1) JP3235510B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002354268A (en) * 2001-05-30 2002-12-06 Ricoh Co Ltd Image processor
KR100750165B1 (en) * 2006-02-22 2007-08-17 삼성전자주식회사 Cabac encoding method and apparatus using improved context model selection with better compression ratio, and cabac decoding method and apparatus

Also Published As

Publication number Publication date
JPH10290166A (en) 1998-10-27

Similar Documents

Publication Publication Date Title
JP3017379B2 (en) Encoding method, encoding device, decoding method, decoder, data compression device, and transition machine generation method
EP0777386B1 (en) Method and apparatus for encoding and decoding an image
US5032838A (en) Variable length code parallel decoding apparatus and method
JP2000115783A (en) Decoder and its method
US6445314B1 (en) System and method for the decoding of variable length codes
JPH0969951A (en) Encoding method and decoding method
JPH09135358A (en) Image encoding device using arithmetic code
JPH07240720A (en) Methods for channel modulation, error correction, state machine generation, coding and devices for channel modulation and error correction
US6026197A (en) Coding method and apparatus therefor
US6121905A (en) Method and apparatus for decoding JPEG symbols
JP2954438B2 (en) Encoding device
JP3201448B2 (en) Encoding / decoding device, encoding device, and decoding device
JP3235510B2 (en) Encoding method and encoding device, decoding method and decoding device
JP3406550B2 (en) Arithmetic encoding device and arithmetic decoding device
JP3871995B2 (en) Encoding device and decoding device
JPH07249995A (en) Data encoding device
JP2729165B2 (en) Image processing apparatus and processing method thereof
JP3384287B2 (en) Encoding device and decoding device
JP3123795B2 (en) Encoding device and decoding device using arithmetic code
JP3085118B2 (en) Data compression device
JPH1070730A (en) Image encoding and decoding device, and recording medium stored with their control program
JP2872334B2 (en) Color image encoding device
JP3141794B2 (en) Decryption device
JP3224127B2 (en) Image data conversion processor
JP3123791B2 (en) Encoding device and decoding device using arithmetic code

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070928

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080928

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090928

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100928

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110928

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120928

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120928

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130928

Year of fee payment: 12

EXPY Cancellation because of completion of term