JP3124890B2 - Binary image coding device - Google Patents

Binary image coding device

Info

Publication number
JP3124890B2
JP3124890B2 JP06152182A JP15218294A JP3124890B2 JP 3124890 B2 JP3124890 B2 JP 3124890B2 JP 06152182 A JP06152182 A JP 06152182A JP 15218294 A JP15218294 A JP 15218294A JP 3124890 B2 JP3124890 B2 JP 3124890B2
Authority
JP
Japan
Prior art keywords
status
symbol
value
poor posture
probability
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 - Fee Related
Application number
JP06152182A
Other languages
Japanese (ja)
Other versions
JPH0818796A (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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP06152182A priority Critical patent/JP3124890B2/en
Publication of JPH0818796A publication Critical patent/JPH0818796A/en
Application granted granted Critical
Publication of JP3124890B2 publication Critical patent/JP3124890B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、二値画像符号化装置に
関し、特に画像通信機器であるファクシミリ装置、ソフ
トコピーファクシミリ装置及び画像ファイリング装置に
用いる二値画像符号化装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a binary image encoding apparatus, and more particularly to a binary image encoding apparatus used for a facsimile apparatus, a soft copy facsimile apparatus, and an image filing apparatus as image communication equipment.

【0002】[0002]

【従来の技術】従来、二値画像の符号化方式としてJB
IG方式が提案されている。JBIG方式は、モデルテ
ンプレートと呼ばれる画素を参照して予測符号化を行
う。モデルテンプレートには、最低解像度レイヤエンコ
ード用と、差分レイヤエンコード用との2種類がある。
JBIG方式の最低解像度レイヤエンコード用モデルテ
ンプレートは、図6(a)に示すように、3ラインを使
う場合と、図6(b)に示すように、2ラインを使う場
合があり、図中のCの位置にある画素が「0」あるいは
「1」の組み合わせからシンボル出現確率が推定される
符号化注目画素である。その周囲の画素がモデルテンプ
レートであり、各画素の「0」と「1」の組み合わせか
らシンボルの出現確率が求められる。
2. Description of the Related Art Conventionally, JB has been used as a binary image encoding method.
The IG method has been proposed. The JBIG method performs predictive coding with reference to a pixel called a model template. There are two types of model templates, one for minimum resolution layer encoding and one for differential layer encoding.
The model template for the lowest resolution layer encoding of the JBIG system may use three lines as shown in FIG. 6A or may use two lines as shown in FIG. 6B. The pixel at position C is the pixel of interest to be coded for which the symbol appearance probability is estimated from a combination of “0” or “1”. The surrounding pixels are model templates, and the appearance probability of the symbol is obtained from the combination of “0” and “1” of each pixel.

【0003】JBIG方式の差分レイヤエンコード用モ
デルテンプレートは、図7に示すように、二つのレイヤ
の画素の位置関係によって四つのフェーズがある。図中
のAの各四角は符号化注目画素のあるレイヤの画素を表
しており、図中のBの丸は一つ下の解像度レイヤの画素
を表しており、図中のCは符号化注目画素を表してい
る。
As shown in FIG. 7, the JBIG-based differential layer encoding model template has four phases depending on the positional relationship between the pixels of the two layers. Each square of A in the figure represents a pixel of a certain layer having a pixel of interest to be coded, a circle of B in the figure represents a pixel of the next lower resolution layer, and C in the figure represents a pixel of the encoding target. Represents a pixel.

【0004】次に、JBIG方式のエンコーダの動作を
図8のフローチャートに沿って説明する。
Next, the operation of the JBIG encoder will be described with reference to the flowchart of FIG.

【0005】まず初期化処理が行われる(ステップS
1)。それから符号化する画素の値PIX及びその周囲
の画素データの組み合わせであるコンテクストCXが読
み込まれる(ステップS2)。そして、画素値PIXの
符号化を行うENCODE処理が行われる(ステップS
3)。そして、ステップS2、S3の処理を画像データ
のストライプが終わるまで繰り返される(ステップS
4)。なお、ストライプはJBIG方式の画像データの
処理単位である。ストライプが終わった後に、レジスタ
の内容を全部はき出すFLUSH処理(ステップS5)
が行われ、符号化処理は終了する。
First, an initialization process is performed (step S
1). Then, a context CX, which is a combination of the value PIX of the pixel to be coded and the surrounding pixel data, is read (step S2). Then, an ENCODE process for encoding the pixel value PIX is performed (Step S).
3). Then, the processing of steps S2 and S3 is repeated until the stripe of the image data ends (step S2).
4). Note that a stripe is a processing unit of JBIG image data. FLUSH processing for removing the entire contents of the register after the stripe ends (step S5)
Is performed, and the encoding process ends.

【0006】上記フローで用いられるレジスタには、A
レジスタとCレジスタの2種類があり、Aレジスタには
確率幅を表すaビットがあり、Cレジスタには未完成の
符号が入れられるxビット及び完成した符号が8ビット
単位で入力されるbビットがある。
The registers used in the above flow include A
There are two types of registers, a register and a C register. The A register has a bit indicating the probability width. The C register has x bits for storing an unfinished code and b bits for inputting a completed code in 8-bit units. There is.

【0007】次に、ENCODE処理を図9のフローチ
ャートに沿って説明する。
Next, the ENCODE process will be described with reference to the flowchart of FIG.

【0008】符号化注目画素の値PIXと優勢シンボル
MPSの値を比較して符号化注目画素が優勢シンボルM
PSか劣シンボルLPSかが判断される(ステップS
6)。符号化注目画素が劣シンボルLPSであると判
断された場合にはCODELPS処理が行われ(ステッ
プS7)、優勢シンボルMPSであると判断された場合
にはCODEMPS処理が行われる(ステップS8)。
The value of the pixel of interest PIX and the value of the dominant symbol MPS are compared to determine that the pixel of interest to be encoded is the dominant symbol M
Or PS or poor posture symbol LPS is determined (step S
6). When the coding target pixel is judged to be poor posture symbol LPS is CODELPS processing is performed (step S7), CODEMPS processing is performed when it is determined that the probable symbol MPS (step S8).

【0009】次に、劣シンボルを符号化するCODE
LPS処理を図10のフローチャートに沿って説明す
る。
[0009] Next, CODE to encode the degradation urging symbol
The LPS processing will be described with reference to the flowchart of FIG.

【0010】Aレジスタから劣シンボル出現確率LS
Zが引かれる(ステップS9)。そして、Aレジスタの
値と劣シンボル出現確率LSZとが比較され(ステッ
プS10)、Aレジスタの値がLSZの値以上の場合、
CレジスタにAレジスタの値が加算され、Aレジスタの
値をLSZの値にする(ステップS11)。それから、
MPSの値の反転を示すSWTCHの値が1と比較され
(ステップS12)、SWTCHの値が1の場合、MP
Sの値が反転される(ステップS13)。更に、ステー
タスSTがLPSの場合の次のステータスを示すNLP
Sの値に更新され、同時に正規化を行うRENORME
処理が行われる(ステップS14)。
[0010] poor posture symbol from the A register occurrence probability LS
Z is subtracted (step S9). Then, the value and poor posture symbol occurrence probability LSZ the A register are compared (step S10), and if the value of A register is less than the value of LSZ,
The value of the A register is added to the C register, and the value of the A register is set to the value of LSZ (step S11). then,
The value of SWTCH indicating the inversion of the value of MPS is compared with 1 (step S12). If the value of SWTCH is 1, MPT
The value of S is inverted (step S13). Furthermore, NLP indicating the next status when the status ST is LPS
RENORME updated to the value of S and performing normalization at the same time
The process is performed (Step S14).

【0011】次に、優勢シンボルを符号化するCODE
MPS処理を図11のフローチャートに沿って説明す
る。
Next, a CODE for encoding a dominant symbol
The MPS process will be described with reference to the flowchart of FIG.

【0012】Aレジスタから劣シンボル出現確率LS
Zが引かれる(ステップS15)。そして、Aレジスタ
の値と0x8000が比較され(ステップS16)、A
が0x8000以上ならば、CODEMPS処理は終了
する。また、Aが0x8000より小さい場合、AとL
SZとが比較され(ステップS17)、AがLSZより
小さければCレジスタにAレジスタの値が加えられ、A
レジスタの値をLSZにする(ステップS18)。そし
て、ステータスSTがMPSの場合の次のステータスを
示すNMPSの値に更新され、同時にRENORME処
理が行われる(ステップS19)。
[0012] poor posture symbol from the A register occurrence probability LS
Z is subtracted (step S15). Then, the value of the A register is compared with 0x8000 (step S16), and A
Is greater than or equal to 0x8000, the CODEMPS process ends. When A is smaller than 0x8000, A and L
SZ is compared (step S17). If A is smaller than LSZ, the value of the A register is added to the C register, and A
The value of the register is set to LSZ (step S18). Then, the status ST is updated to the value of the NMPS indicating the next status when the status is the MPS, and at the same time, the RENOME process is performed (step S19).

【0013】次に、正規化を行うRENORME処理を
図12のフローチャートに沿って説明する。
Next, a RENOME process for performing normalization will be described with reference to the flowchart of FIG.

【0014】Aレジスタ及びCレジスタが共に1ビット
左にシフトされる。これは、Aレジスタの値及びCレジ
スタの値を2倍にすることに相当する。同時に、カウン
ト値を示す変数CTから1が引かれる(ステップS2
0)。CTを0と比較し(ステップS21)CTが0な
らば、BYTEOUT処理が行われる(ステップS2
2)。それから、Aレジスタの値と0x8000の比較
が行われ(ステップS23)、Aが0x8000以上に
なるまでステップS20からステップS22までの処理
が繰り返される。
The A and C registers are both shifted one bit to the left. This corresponds to doubling the value of the A register and the value of the C register. At the same time, 1 is subtracted from the variable CT indicating the count value (step S2).
0). CT is compared with 0 (step S21). If CT is 0, BYTEOUT processing is performed (step S2).
2). Then, the value of the A register is compared with 0x8000 (step S23), and the processing from step S20 to step S22 is repeated until A becomes 0x8000 or more.

【0015】次に、BYTEOUT処理を図13のフロ
ーチャートに沿って説明する。
Next, the BYTEOUT processing will be described with reference to the flowchart of FIG.

【0016】変数TEMPの値がCレジスタを19ビッ
ト右にシフトした値にされる(ステップS24)。TE
MPと0xffとが比較される(ステップS25)。T
EMPが0xffより大きい場合、BUFFERに1が
たされ、BUFFERが出力される。また、変数SCの
回数0x00が出力されてSCが0にされる。そして、
BUFFERの値がTEMPと0xffのアンドをとっ
た値にされる(ステップS26)。一方、TEMPが0
xff以下の場合は、TEMPが0xffと比較され
(ステップS27)TEMP=0xffの場合は、SC
に1がたされる(ステップS28)。TEMPが0xf
fより小さい場合、BUFFERが出力され、SC回0
x00が出力された後、SCが0にされる。そして、B
UFFERの値がTEMPの値にされる(ステップS2
9)。TEMPの値によって場合分けした処理が終了し
た後、Cレジスタの値がCレジスタと0x7ffffと
のアンドをとった値にされて、CTが8にされる(ステ
ップS30)。
The value of the variable TEMP is set to a value obtained by shifting the C register right by 19 bits (step S24). TE
MP is compared with 0xff (step S25). T
If EMP is greater than 0xff, 1 is added to BUFFER and BUFFER is output. In addition, the number 0x00 of the variable SC is output, and SC is set to 0. And
The value of BUFFER is set to a value obtained by ANDing TEMP and 0xff (step S26). On the other hand, TEMP is 0
If not greater than xff, TEMP is compared with 0xff (step S27). If TEMP = 0xff, SC
Is incremented by 1 (step S28). TEMP is 0xf
If less than f, BUFFER is output and SC times 0
After x00 is output, SC is set to 0. And B
The value of UFFER is set to the value of TEMP (step S2).
9). After the processing classified according to the value of TEMP is completed, the value of the C register is set to the value obtained by ANDing the C register and 0x7ffff, and CT is set to 8 (step S30).

【0017】次に、初期化処理を図14のフローチャー
トに沿って説明する。
Next, the initialization process will be described with reference to the flowchart of FIG.

【0018】現在のストライプが、階層の最初のストラ
イプであるか又はリセットされたか判別し(ステップS
31)、いずれかの条件に合った場合、全てのCXに対
応するSTが0にされ、MPSの値が0に設定される
(ステップS32)。また、いずれの条件にも合わない
場合、ST及びMPSは前のストライプの最後の値に設
定される(ステップS33)。ステップS32又はステ
ップS33を行った後、SCが0にされ、Aレジスタの
値が0x10000にされ、Cレジスタの値が0にさ
れ、CTの値が11にされる(ステップS34)。
It is determined whether the current stripe is the first stripe in the hierarchy or has been reset (step S).
31), if any of the conditions is met, the STs corresponding to all the CXs are set to 0, and the value of the MPS is set to 0 (step S32). If neither condition is satisfied, ST and MPS are set to the last values of the previous stripe (step S33). After performing step S32 or step S33, SC is set to 0, the value of the A register is set to 0x10000, the value of the C register is set to 0, and the value of CT is set to 11 (step S34).

【0019】次に、FLUSH処理を図15のフローチ
ャートに沿って説明する。
Next, the FLUSH process will be described with reference to the flowchart of FIG.

【0020】CLEARBITS処理、FINALWR
ITES処理が行われ、ストライプ符号化データSCD
の最初のバイトが取り除かれ、必要な場合はSCDの最
後の0x00バイトがすべて取り除かれる(ステップS
35)。
CLEARBITS processing, FINALWR
The ITES process is performed, and the stripe encoded data SCD
Of the SCD and, if necessary, all the last 0x00 bytes of the SCD (step S
35).

【0021】次に、CLEARBITS処理を図16の
フローチャートに沿って説明する。TEMPの値が、A
レジスタから1を引きかつCレジスタの値を加えた値
と、0xffff0000とのアンドをとった値にされ
る(ステップS36)。そして、TEMPとCレジスタ
とが比較され(ステップS37)、TEMPがCレジス
タより小さい場合、Cレジスタの値が、TEMPと0x
8000との和にされる(ステップS38)。また、T
EMPがCレジスタ以上の場合、Cレジスタの値がTE
MPの値にされる(ステップS39)。
Next, the CLEARBITS process will be described with reference to the flowchart of FIG. When the value of TEMP is A
A value obtained by ANDing 0xffff0000 with a value obtained by subtracting 1 from the register and adding the value of the C register (step S36). Then, TEMP is compared with the C register (step S37). If TEMP is smaller than the C register, the value of the C register is TEMP and 0x.
8000 (step S38). Also, T
If EMP is greater than or equal to C register, the value of C register is TE
The value of MP is set (step S39).

【0022】次に、FINALWRITES処理を図1
7のフローチャートに沿って説明する。
Next, the FINALWRITES process is shown in FIG.
7 will be described along the flowchart.

【0023】Cレジスタの値がCTの値だけ左へシフト
される(ステップS40)。Cレジスタと0x7fff
fffとが比較され(ステップS41)、Cレジスタの
値が0x7ffffffより大きい場合、BUFFER
に1をたしたものが出力され、SC回0x00が出力さ
れる(ステップS42)。Cレジスタの値が0x7ff
ffff以下の場合、BUFFERが出力され、SC回
0xffが出力される(ステップS43)。ステップS
42又はステップS43を行った後、Cレジスタを19
ビット右にシフトしたものと0xffとのアンドが出力
され、Cレジスタを11ビット右にシフトしたものと0
xffとのアンドが出力される(ステップS44)。
The value of the C register is shifted to the left by the value of CT (step S40). C register and 0x7fff
ffff (step S41), and when the value of the C register is larger than 0x7ffffff, BUFFER
Is output, and SC times 0x00 are output (step S42). The value of the C register is 0x7ff
If it is less than ffff, BUFFER is output and 0xff is output SC times (step S43). Step S
42 or after performing step S43, the C register is set to 19
The AND of 0xff and the bit shifted right are output, and the C register shifted to the right by 11 bits and 0 are output.
An AND with xff is output (step S44).

【0024】なお、確率推定テーブルは、図18a及び
図18bに示すように、各ステータスSTの値に対応す
る劣シンボル出現確率LSZ、LPSが出現したとき
の次のSTの値NLPS、MPSが出現したときの次の
STの値NMPS、及びMPSが反転するか否かを示す
SWTCHの値を示している。JBIG方式及びQMコ
ーダは、丸善株式会社から発行されている「マルチメデ
ィア符号化の国際標準」P48〜P82に記載されてい
る。
[0024] Incidentally, the probability estimation table, as shown in FIGS. 18a and FIG. 18b, poor posture symbol occurrence probability LSZ corresponding to the value of each status ST, the value of the next ST when LPS appeared NLPS, MPS is It shows the value NMPS of the next ST when it appears, and the value of SWTCH indicating whether the MPS is inverted. The JBIG system and the QM coder are described in “International Standards for Multimedia Coding” published by Maruzen Co., Ltd., P48 to P82.

【0025】[0025]

【発明が解決しようとする課題】従来の符号化技術は以
上のように構成されているので、劣シンボル出現後の
正規化処理はシフト量が多いために処理時間がかかり、
符号化処理の高速化を図れないという問題点があった。
Since INVENTION Problems to be Solved conventional encoding technique is constructed as described above, the normalization process after the appearance poor posture symbol takes processing time for the shift amount is large,
There was a problem that the encoding process could not be speeded up.

【0026】本発明は、上記のような課題を解消するた
めになされたもので、劣シンボル出現時の正規化処理
の時間を短縮して符号化処理を高速化できる二値画像符
号化装置を提供することを目的とする。
[0026] The present invention has been made to solve the above problems, speed can binary image coding apparatus coding processing by shortening the normalization processing time at the time of poor posture symbol appearing The purpose is to provide.

【0027】[0027]

【課題を解決するための手段】本発明によれば、前述の
目的は、二値画像データをロスレス符号化する二値画像
符号化装置であって、符号化する注目画素の周囲の複数
画素を所定のテンプレートを用いて参照し、テンプレー
ト内の複数画素のそれぞれに対応する二値化データの組
み合わせで表されるコンテスクトを算出する画像参照手
段と、前記画像参照手段より算出されるコンテクストに
対応するメモリアドレスに格納されているステータスを
出力するステータス出力手段と、前記ステータスから劣
シンボル出現確率及び優勢シンボルを推定して出力す
る推定手段と、前記ステータスから劣シンボル正規化
時シフト数を算出する算出手段と、前記劣シンボル出
現確率を用いて二値画像データに対応した符号系列を出
力する際に、劣シンボル出現後の正規化処理を優勢シ
ンボル出現後の正規化処理と分けて、前記劣シンボル
正規化時シフト数を用いて行う算術符号生成手段とを具
備する請求項1の二値画像符号化装置によって達成され
る。
According to the present invention, an object of the present invention is to provide a binary image coding apparatus for losslessly coding binary image data, wherein a plurality of pixels around a pixel of interest to be coded are encoded. An image reference unit that refers to a predetermined template and calculates a context represented by a combination of binarized data corresponding to each of a plurality of pixels in the template, and a context corresponding to the context calculated by the image reference unit. Status output means for outputting the status stored in the memory address;
And estimation means for outputting the estimated energized symbol appearing probability and MPS, a calculating means for calculating the number of shifts during poor posture symbols normalized by said status, corresponding to the binary image data using the degradation biasing symbol appearance probability when outputting the code sequence, separately normalizing treatment after emergence inferior bias symbols and normalization process after superior symbol occurrence, and the arithmetic code generation means carried out using a number of time shift the poor posture symbols normalized It is accomplished by a two negative image encoding apparatus according to claim 1, comprising.

【0028】前記推定手段は、前記ステータスに対応す
る前記劣シンボル出現確率及び優勢シンボル推定デー
タが記載された確率推定テーブルを具備するとよい。
[0028] The estimation means may comprise a probability estimation table in which the poor posture symbol appearing probability and probable symbol estimation data have been described corresponding to the status.

【0029】さらに、前記ステータスに対応する前記劣
シンボル正規化時シフト数が前記確率推定テーブルに
記載されており、前記算出手段は、前記確率推定テーブ
ルを用いるとよい。
Further, the inferiority corresponding to the status
The number of shifts at the time of the symbol symbol normalization is described in the probability estimation table, and the calculation means may use the probability estimation table.

【0030】[0030]

【作用】請求項1に記載の二値画像符号化装置において
は、画像参照手段により符号化する注目画素の周囲の複
数画素をテンプレートを用いて参照してテンプレート内
の複数画素のそれぞれに対応する二値化データの組み合
わせで表されるコンテクストが算出され、ステータス出
力手段により画像参照手段により算出されるコンテクス
トに対応するメモリアドレスに格納されているステータ
スが出力され、推定手段によりステータスから劣シン
ボル出現確率及び優勢シンボルが推定されて出力され、
算出手段によりステータスから劣シンボル正規化時シ
フト数が算出され、算術符号生成手段により劣シンボ
ル出現確率を用いて二値画像データに対応した符号系列
を出力する際に、劣シンボル出現後の正規化処理を優
勢シンボル出現後の正規化処理と分けて、劣シンボル
正規化時シフト数を用いた正規化処理が行われる。これ
により、劣シンボル出現時の正規化処理に要する時間
を短縮できる。
In the binary image coding apparatus according to the first aspect, a plurality of pixels around the target pixel to be coded by the image reference means are referenced using a template to correspond to each of the plurality of pixels in the template. binary context represented by a combination of data is calculated, the status is output stored in the memory address corresponding to a context that is calculated by the image reference unit by status output unit, poor posture thin from the status by the estimation means <br/> The bol appearance probability and the dominant symbol are estimated and output,
Status shift number when poor posture symbol normalization is calculated from the calculation means, when outputting code sequence corresponding to the binary image data using a poor posture symbol <br/> Le probability by arithmetic code generation means, the poor posture symbol appearing normalization process after separately from the normalization processing after MPS occurrence, normalization processing using the number of shifts during poor posture symbol normalization is performed. Thus, it is possible to shorten the time required for the normalization process when degradation biasing symbol appearing.

【0031】請求項2の二値画像符号化装置において
は、推定手段が、ステータスに対応する劣シンボル出
現確率及び優勢シンボル推定データが記載された確率推
定テーブルを具備していることにより、劣シンボル出
現確率及び優勢シンボルを容易に推定し得る。
[0031] In the two negative image encoding apparatus according to claim 2, estimating means, by poor posture symbol appearing probability and MPS estimation data corresponding to the status is provided with a probability estimation table described, the poor posture symbol appearing probability and MPS readily estimated.

【0032】請求項3の二値画像符号化装置において
は、ステータスに対応する劣シンボル正規化時シフト
数が確定推定テーブルに記載されており、算出手段が確
率推定テーブルを用いることにより、劣シンボル正規
化時シフト数を容易に求め得る。
[0032] In the two negative image encoding apparatus according to claim 3, the number of shifts during poor posture symbols normalized corresponding to the status is described to defined estimation table, by the calculation means uses a probability estimation table, when poor posture symbol normalization may seek shift number easily.

【0033】[0033]

【実施例】以下、本発明の二値画像符号化装置の実施例
を図を参照しながら説明する。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an embodiment of a binary image encoding apparatus according to the present invention.

【0034】本実施例の二値画像符号化装置は、図1に
示すように、二値画像データの符号化する注目画素の周
囲の複数画素をテンプレート2を用いて参照してテンプ
レート2内の複数画素の各ビットの組み合わせで表され
るコンテクスト100を算出する画像参照手段1と、画
像参照手段1により算出されるコンテクスト100に対
応するメモリアドレス3に格納されているステータス1
01を出力するステータス出力手段4と、ステータス出
力手段4より出力されるステータス101から劣シン
ボル出現確率及び優勢シンボルを推定して出力する推定
手段5と、ステータス101から劣シンボル正規化時
シフト数を算出する算出手段6と、推定手段5より出力
される劣シンボル出現確率を用いて二値画像データに
対応した符号系列を出力する際に、劣シンボル出現後
の正規化処理を通常の処理と分けて算出手段6から出力
される劣シンボル正規化時シフト数を用いた正規化処
理を行う算術符号生成手段7とを具備する。なお、推定
手段5は確率推定テーブルを具備している。
As shown in FIG. 1, the binary image encoding apparatus according to the present embodiment refers to a plurality of pixels around a pixel of interest to be encoded of binary image data using the template 2, and Image reference means 1 for calculating context 100 represented by a combination of each bit of a plurality of pixels, and status 1 stored in memory address 3 corresponding to context 100 calculated by image reference means 1
01 and status output means 4 for outputting an estimation means 5 and outputting the estimated poor posture thin <br/> Bol probability and MPS from the status 101 to be output from the status output unit 4, poor posture from the status 101 a calculating means 6 for calculating the number of shifts at the symbol normalization, when outputting code sequence corresponding to the binary image data using a poor posture symbol occurrence probability output from estimation means 5, after the appearance poor posture symbol comprising the arithmetic code generating means 7 performs normalization processing using the number of shifts during poor posture symbols normalized output from the calculation means 6 is divided normalization processing to the normal processing. The estimating means 5 includes a probability estimating table.

【0035】次に、本実施例の動作について説明する。Next, the operation of this embodiment will be described.

【0036】本実施例では、エンコーダの動作及びEN
CODE処理については上述した従来例と同様であるの
で説明を省略する。
In this embodiment, the operation of the encoder and EN
The CODE processing is the same as in the above-described conventional example, and a description thereof will be omitted.

【0037】まず、CODELPS処理を図2のフロー
チャートに沿って説明する。
First, the CODELPS process will be described with reference to the flowchart of FIG.

【0038】初めにフラグRが0にされる(ステップS
51)。Aレジスタから劣シンボル出現確率LSZが
引かれる(ステップS52)。そして、Aレジスタの値
と劣シンボル出現確率LSZとが比較され(ステップ
S53)、Aレジスタの値がLSZ以上の場合、Cレジ
スタにAレジスタの値が加算され、Aレジスタの値がL
SZとされ(ステップS54)、フラグRが1にされる
(ステップS55)。それから、SWTCHの値を1と
比較し(ステップS56)、SWTCHが1でない場合
はMPSの値が反転される(ステップS57)。そし
て、フラグRの値が1と比較され(ステップS58)、
フラグRが1の場合はステータスSTが、LPSが出現
した場合のステータスに更新されると同時にLSZRE
NORME処理が行われる(ステップS59)。フラグ
Rが0の場合は、ステータスSTが、LPSが出現した
場合のステータスに更新されると同時にRENORME
処理が行われる(ステップS60)。
First, the flag R is set to 0 (step S
51). Poor posture symbol appearance probability LSZ is subtracted from the A register (step S52). Then, the value and poor posture symbol occurrence probability LSZ the A register are compared (step S53), if the value of A register is more LSZ, the value of A register is added to the C register, the value of the A register is L
SZ is set (step S54), and the flag R is set to 1 (step S55). Then, the value of SWTCH is compared with 1 (step S56). If SWTCH is not 1, the value of MPS is inverted (step S57). Then, the value of the flag R is compared with 1 (step S58),
When the flag R is 1, the status ST is updated to the status when the LPS appears, and at the same time, the LSZRE is updated.
A NORME process is performed (Step S59). When the flag R is 0, the status ST is updated to the status when the LPS has appeared, and at the same time, the status ST is updated.
The processing is performed (Step S60).

【0039】次に、CODEMPS処理を図3のフロー
チャートに沿って説明する。
Next, the CODEMPS process will be described with reference to the flowchart of FIG.

【0040】フラグRが0にされ(ステップS61)、
Aレジスタから劣シンボル出現確率LSZが引かれる
(ステップS62)。Aレジスタの値と0x8000と
が比較され(ステップS63)、Aレジスタの値が0x
8000以上ならば、CODEMPS処理は終了する。
また、Aレジスタの値が0x8000より小さい場合、
AとLSZとが比較され(ステップS64)、AがLS
Zより小さければCレジスタにAレジスタの値が加えら
れ、Aレジスタの値がLSZにされ(ステップS6
5)、フラグRが1にされる(ステップS66)。次
に、フラグRが1と比較され(ステップS67)、フラ
グRが1でない場合、ステータスが出現シンボルがMP
Sの場合のステータスに更新されると同時にRENOR
ME処理が行われる(ステップS68)。フラグRが1
の場合、ステータスが出現シンボルがMPSの場合のス
テータスに更新されると同時にLSZRENORME処
理が行われる(ステップS69)。
The flag R is set to 0 (step S61),
Poor posture symbol appearance probability LSZ is subtracted from the A register (step S62). The value of the A register is compared with 0x8000 (step S63), and the value of the A register is 0x
If it is 8000 or more, the CODEMPS process ends.
When the value of the A register is smaller than 0x8000,
A and LSZ are compared (step S64), and A
If it is smaller than Z, the value of the A register is added to the C register, and the value of the A register is set to LSZ (step S6).
5) The flag R is set to 1 (step S66). Next, the flag R is compared with 1 (step S67).
RENOOR at the same time as status is updated to S
An ME process is performed (Step S68). Flag R is 1
In the case of, the status is updated to the status when the appearance symbol is MPS, and at the same time, the LSZRENORME process is performed (step S69).

【0041】次に、LSZRENORME処理を図4の
フローチャートに沿って説明する。最初にCTとSHF
Tの比較が行われる(ステップS70)。CTがSHF
T以下ならば、AレジスタがCTビットだけ左にシフト
され、CレジスタがCTビット左へシフトされ、SHF
TからCTが引かれ、CTが0にされ(ステップS7
1)た後、BYTEOUT処理が行われる(ステップS
72)。それから、CTからSHFTが引かれ(ステッ
プS73)、AレジスタがSHFTビット左へシフトさ
れると共にCレジスタがSHFTビット左へシフトされ
る。
Next, the LSZRENORME process will be described with reference to the flowchart of FIG. First CT and SHF
T is compared (step S70). CT is SHF
If T or less, the A register is shifted left by the CT bit, the C register is shifted left by the CT bit, and SHF
CT is subtracted from T, and CT is set to 0 (step S7).
After 1), BYTEOUT processing is performed (step S).
72). Then, the SHFT is subtracted from CT (step S73), and the A register is shifted left by the SHFT bit and the C register is shifted left by the SHFT bit.

【0042】図5の確率推定テーブルに示すように、従
来例に比べてシフト量が少なく、正規化処理に要する時
間を短縮できる。
As shown in the probability estimation table of FIG. 5, the shift amount is smaller than in the conventional example, and the time required for the normalization processing can be reduced.

【0043】[0043]

【発明の効果】請求項1の二値画像符号化装置によれ
ば、劣シンボル出現後の正規化処理を優勢シンボル出
現後の正規化処理と分けて、劣シンボル正規化時シフ
ト数を用いた正規化処理が行われるように構成したの
で、劣シンボル出現時の正規化処理に要する時間を短
縮でき、符号化処理速度を向上することができる。
Effects of the Invention According to the binary image encoding apparatus according to claim 1, separately normalizing treatment after emergence inferior bias symbols and normalization process after superior symbol occurrences, the number of time shifts poor posture symbols normalized since the normalization processing using is configured to be performed, thus reducing the time to normalization during poor posture symbol appearing, it is possible to improve the coding processing speed.

【0044】請求項2の二値画像符号化装置において
は、劣シンボル出現確率及び優勢シンボルを容易に推
定し得る。
[0044] In the two negative image encoding apparatus according to claim 2 can readily estimate the degradation biasing symbol appearing probability and MPS.

【0045】請求項3の二値画像符号化装置において
は、劣シンボル正規化時シフト数を容易に求め得る。
[0045] In the two negative image encoding apparatus according to claim 3 can easily obtained the number of time shifts poor posture symbol normalization.

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

【図1】本発明の二値画像符号化装置の構成を示すブロ
ック図である。
FIG. 1 is a block diagram illustrating a configuration of a binary image encoding device according to the present invention.

【図2】本実施例のCODELPS処理を示すフローチ
ャートである。
FIG. 2 is a flowchart illustrating a CODELPS process according to the present embodiment.

【図3】本実施例のCODEMPS処理を示すフローチ
ャートである。
FIG. 3 is a flowchart illustrating CODEMPS processing of the present embodiment.

【図4】本実施例のLSZRENORME処理を示すフ
ローチャートである。
FIG. 4 is a flowchart illustrating an LSZRENORME process according to the present embodiment.

【図5a】本実施例の確率推定テーブルの一部を示す図
である。
FIG. 5A is a diagram illustrating a part of a probability estimation table according to the present embodiment.

【図5b】本実施例の確率推定テーブルの他の一部を示
す図である。
FIG. 5B is a diagram showing another part of the probability estimation table of the embodiment.

【図6】最低解像度レイヤモデルテンプレートを示す図
である。
FIG. 6 is a diagram showing a lowest resolution layer model template.

【図7】差分レイヤモデルテンプレートを示す図であ
る。
FIG. 7 is a diagram showing a difference layer model template.

【図8】JBIG方式のエンコーダの動作を示すフロー
チャートである。
FIG. 8 is a flowchart showing the operation of a JBIG encoder.

【図9】ENCODE処理を示すフローチャートであ
る。
FIG. 9 is a flowchart showing an ENCODE process.

【図10】従来のCODELPS処理を示すフローチャ
ートである。
FIG. 10 is a flowchart showing a conventional CODELPS process.

【図11】従来のCODEMPS処理を示すのフローチ
ャートである。
FIG. 11 is a flowchart showing a conventional CODEMPS process.

【図12】RENORME処理を示すフローチャートで
ある。
FIG. 12 is a flowchart illustrating a RENOMEME process.

【図13】BYTEOUT処理を示すフローチャートで
ある。
FIG. 13 is a flowchart showing BYTEOUT processing.

【図14】INITENC処理を示すフローチャートで
ある。
FIG. 14 is a flowchart showing an INITENC process.

【図15】FLUSH処理を示すフローチャートであ
る。
FIG. 15 is a flowchart showing FLUSH processing.

【図16】CLEARBITS処理を示すフローチャー
トである。
FIG. 16 is a flowchart showing CLEARBITS processing.

【図17】FINALWRITES処理を示すフローチ
ャートである。
FIG. 17 is a flowchart showing a FINALWRITES process.

【図18a】従来の確率テーブルの一部を示す図であ
る。
FIG. 18a is a diagram showing a part of a conventional probability table.

【図18b】従来の確率テーブルの他の一部を示す図で
ある。
FIG. 18b is a diagram showing another part of the conventional probability table.

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

1 画像参照手段 2 テンプレート 3 ステータス出力手段 4 メモリ 5 推定手段 6 算出手段 7 算術符号生成手段 1 Image reference means 2 Template 3 Status output means 4 Memory 5 Estimation means 6 Calculation means 7 Arithmetic code generation means

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 二値画像データをロスレス符号化する二
値画像符号化装置であって、符号化する注目画素の周囲
の複数画素を所定のテンプレートを用いて参照し、テン
プレート内の複数画素のそれぞれに対応する二値化デー
タの組み合わせで表されるコンテクストを算出する画像
参照手段と、前記画像参照手段より算出されるコンテク
ストに対応するメモリアドレスに格納されているステー
タスを出力するステータス出力手段と、前記ステータス
から劣シンボル出現確率及び優勢シンボルを推定して
出力する推定手段と、前記ステータスから劣シンボル
正規化時シフト数を算出する算出手段と、前記劣シン
ボル出現確率を用いて二値画像データに対応した符号系
列を出力する際に、劣シンボル出現後の正規化処理を
優勢シンボル出現後の正規化処理と分けて、前記劣
ンボル正規化時シフト数を用いて行う算術符号生成手段
とを具備する二値画像符号化装置。
1. A binary image coding apparatus for losslessly coding binary image data, wherein a plurality of pixels around a pixel of interest to be coded are referred to using a predetermined template, and a plurality of pixels in the template are referred to. Image reference means for calculating a context represented by a combination of binary data corresponding thereto, and status output means for outputting a status stored at a memory address corresponding to the context calculated by the image reference means; and estimation means for outputting the estimated degradation biasing symbol appearing probability and MPS from the status, and calculating means for calculating the number of shifts during poor posture symbols normalized by said status, the poor posture thin <br/> Bol appearance when outputting the code sequence corresponding to the binary image data using the probability, exits superior symbol normalization process after the appearance poor posture symbol After separately from normalization processing, the poor posture shea <br/> binary image encoding apparatus with an arithmetic code generation means for performing with symbol normalized when the number of shifts.
【請求項2】 前記推定手段は、前記ステータスに対応
する前記劣シンボル出現確率及び優勢シンボル推定デ
ータが記載された確率推定テーブルを具備する請求項1
に記載の二値画像符号化装置。
Wherein said estimating means, according to claim 1 having a probability estimation table in which the poor posture symbol appearing probability and probable symbol estimation data have been described corresponding to the status
2. The binary image encoding device according to 1.
【請求項3】 前記ステータスに対応する前記劣シン
ボル正規化時シフト数が前記確率推定テーブルに記載さ
れており、前記算出手段は、前記確率推定テーブルを用
いる請求項2に記載の二値画像符号化装置。
Wherein the poor posture thin <br/> Bol normalized time shift numbers corresponding to the status is described in the probability estimation table, said calculating means to claim 2 using the probability estimation table A binary image encoding device according to claim 1.
JP06152182A 1994-07-04 1994-07-04 Binary image coding device Expired - Fee Related JP3124890B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP06152182A JP3124890B2 (en) 1994-07-04 1994-07-04 Binary image coding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP06152182A JP3124890B2 (en) 1994-07-04 1994-07-04 Binary image coding device

Publications (2)

Publication Number Publication Date
JPH0818796A JPH0818796A (en) 1996-01-19
JP3124890B2 true JP3124890B2 (en) 2001-01-15

Family

ID=15534854

Family Applications (1)

Application Number Title Priority Date Filing Date
JP06152182A Expired - Fee Related JP3124890B2 (en) 1994-07-04 1994-07-04 Binary image coding device

Country Status (1)

Country Link
JP (1) JP3124890B2 (en)

Also Published As

Publication number Publication date
JPH0818796A (en) 1996-01-19

Similar Documents

Publication Publication Date Title
US6351569B1 (en) Coding method, decoding method, coding device and decoding device
JP2000115783A (en) Decoder and its method
JP3684128B2 (en) Arithmetic encoding / decoding method and arithmetic encoding / decoding device
US20020006225A1 (en) Encoding apparatus, decoding apparatus, encoding/decoding apparatus, encoding method and decoding method
JP3124890B2 (en) Binary image coding device
JP3787389B2 (en) Image processing apparatus and method, and storage medium storing the method
JP3095947B2 (en) Image coding device
JP3185769B2 (en) Image signal processing device
JP3146109B2 (en) Binary image coding device
US6101523A (en) Method and apparatus for controlling calculation error
JP3209396B2 (en) Image data compression method and apparatus
FI84682C (en) FOERFARANDE OCH ANORDNING FOER PREDIKTERANDE KODNING.
JP2891818B2 (en) Encoding device
JP2003198858A (en) Encoder and decoder
JPH07249995A (en) Data encoding device
JP3078692B2 (en) Arithmetic encoder
JP2729165B2 (en) Image processing apparatus and processing method thereof
JP3223118B2 (en) Image encoding device, image decoding device, and image encoding / decoding device
JP3084187B2 (en) Binary image encoding device and binary image decoding device
JP2831573B2 (en) Pseudo halftone image processing system
JP3073323B2 (en) Binary image encoding method
JPH11177828A (en) Image processing method and device therefor
JP3427651B2 (en) Arithmetic coding apparatus and flash processing method thereof
JP3698797B2 (en) Arithmetic encoder / decoder
JP3048578B2 (en) Encoding and decoding device

Legal Events

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

Free format text: PAYMENT UNTIL: 20071027

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20081027

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20081027

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20091027

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20091027

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20101027

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20111027

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees