JPH0818796A - Encoding device for binary image - Google Patents

Encoding device for binary image

Info

Publication number
JPH0818796A
JPH0818796A JP6152182A JP15218294A JPH0818796A JP H0818796 A JPH0818796 A JP H0818796A JP 6152182 A JP6152182 A JP 6152182A JP 15218294 A JP15218294 A JP 15218294A JP H0818796 A JPH0818796 A JP H0818796A
Authority
JP
Japan
Prior art keywords
symbol
status
appearance
value
register
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.)
Granted
Application number
JP6152182A
Other languages
Japanese (ja)
Other versions
JP3124890B2 (en
Inventor
Hironori Takeda
裕紀 武田
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)

Abstract

PURPOSE:To shorten time required for normalizing processing at the appearance of an inferior symbol and to improve encoding processing speed by executing normalizing processing based upon the number of shifts at the time of normalizing the inferior symbol separatively from normalizing processing to be executed after the appearance of the inferior symbol. CONSTITUTION:A image referring means 1 refers to plural picture elements around a noticed element to be encoded by the use of a template 2 and calculates a context expressed by the combination of binary data corresponding to picture elements in the template 2. A status output means 4 outputs status from a memory 3 correspondingly to the context calculated by the means 1 and an estimation means 5 estimates the probability of inferior symbol appearance and a superior symbol based upon the status. A calculation means 6 calculates the number of shifts from the status at the time of normalizing the inferior symbol and an arithmetic code generating means 7 executes normalizing processing by using the number of shifts at the time of normalizing the inferior symbol separatively from normalizing processing after the appearance of the inferior symbol.

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 coding device, and more particularly to a binary image coding device used in a facsimile device, a soft copy facsimile device and an image filing device which are image communication devices.

【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 coding method.
The IG method has been proposed. The JBIG method performs predictive coding with reference to pixels called model templates. There are two types of model templates, one for lowest resolution layer encoding and one for difference layer encoding.
The model template for the lowest resolution layer encoding of the JBIG method may use 3 lines as shown in FIG. 6 (a) or 2 lines as shown in FIG. 6 (b). The pixel at the position of C is the coded pixel of interest for which the symbol appearance probability is estimated from the combination of "0" or "1". Pixels around it are model templates, and the symbol appearance probability 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 method differential layer encoding model template has four phases depending on the positional relationship of pixels in two layers. Each square in A in the figure represents a pixel in a layer in which the pixel of interest for encoding is present, a circle in B in the figure represents a pixel in the resolution layer one level below, and C in the figure represents an attention in encoding. 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, initialization processing is performed (step S
1). Then, the context CX which is a combination of the pixel value PIX to be encoded and the pixel data around it is read (step S2). Then, ENCODE processing for encoding the pixel value PIX is performed (step S
3). Then, the processes of steps S2 and S3 are repeated until the stripe of the image data ends (step S
4). The stripe is a processing unit of JBIG image data. FLUSH processing for stripping all register contents after the stripe is finished (step S5)
Then, the encoding process ends.

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

【0007】次に、ENCODE処理を図9のフローチ
ャートに沿って説明する。
Next, the ENCODE processing 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 PIX of the coded pixel of interest and the value of the dominant symbol MPS are compared to determine that the coded pixel of interest is the dominant symbol M.
It is determined whether it is PS or recessive symbol LPS (step S
6). If it is determined that the coded pixel of interest is the recessive symbol LPS, CODELPS processing is performed (step S7), and if it is determined that it is the dominant symbol MPS, CODEMPS processing is performed (step S8).

【0009】次に、劣性シンボルを符号化するCODE
LPS処理を図10のフローチャートに沿って説明す
る。
Next, a CODE for coding the recessive symbol
The LPS process 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)。
Recessive symbol appearance probability LS from A register
Z is subtracted (step S9). Then, the value of the A register is compared with the recessive symbol appearance probability LSZ (step S10), and when the value of the A register is equal to or larger 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), and if the value of SWTCH is 1, MP
The value of S is inverted (step S13). Furthermore, an NLP indicating the next status when the status ST is LPS.
RENORME updated to the value of S and normalizing at the same time
Processing is performed (step S14).

【0011】次に、優勢シンボルを符号化するCODE
MPS処理を図11のフローチャートに沿って説明す
る。
Next, the CODE for encoding the 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)。
Recessive symbol appearance probability LS from A register
Z is subtracted (step S15). Then, the value of the A register is compared with 0x8000 (step S16), and A
Is 0x8000 or more, the CODEMPS process ends. When A is smaller than 0x8000, A and L
SZ is compared (step S17), and 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, when the status ST is MPS, the value is updated to the value of NMPS indicating the next status, and at the same time, the RENORME process is performed (step S19).

【0013】次に、正規化を行うRENORME処理を
図12のフローチャートに沿って説明する。
Next, the RENORME process for normalizing 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までの処理
が繰り返される。
Both the A register and the C register are 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). When CT is compared with 0 (step S21) and 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 process 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 to the right by 19 bits (step S24). TE
MP and 0xff are compared (step S25). T
When EMP is larger than 0xff, BUFFER is incremented by 1 and BUFFER is output. Further, the number 0x00 of the variable SC is output and SC is set to 0. And
The value of BUFFER is set to the value obtained by ANDing TEMP and 0xff (step S26). On the other hand, TEMP is 0
If it is less than or equal to xff, TEMP is compared with 0xff (step S27). If TEMP = 0xff, SC
Is incremented by 1 (step S28). TEMP is 0xf
If smaller 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 ends, 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)。
Determine 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, ST corresponding to all CXs is set to 0, and the value of MPS is set to 0 (step S32). If neither condition is met, ST and MPS are set to the last value 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
ITES processing is performed and stripe encoded data SCD
The first byte 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. The value of TEMP is A
The value obtained by subtracting 1 from the register and adding the value of the C register and the AND of 0xffff0000 are set (step S36). Then, TEMP is compared with the C register (step S37). When TEMP is smaller than the C register, the value of the C register is TEMP and 0x.
The sum is set to 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.
A description will be given according to the flowchart of FIG.

【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
fff is compared (step S41), and if the value of the C register is larger than 0x7ffffff, BUFFER
1 is output, and 0x00 SC times is output (step S42). Value of C register is 0x7ff
When it is less than or equal to ffff, BUFFER is output and 0xff is output SC times (step S43). Step S
42 or step S43, the C register is set to 19
An AND of 0xff that is shifted to the right by the bit is output, and 0 when the C register is shifted to the right by 11 bits.
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に記載されてい
る。
In the probability estimation table, as shown in FIGS. 18a and 18b, the next ST values NLPS and MPS appear when the recessive symbol appearance probabilities LSZ and LPS corresponding to the respective status ST values appear. It shows the value STMP of the next ST and the value of SWTCH indicating whether or not the MPS is inverted. The JBIG method and the QM coder are described in "International Standards for Multimedia Coding" P48 to P82 published by Maruzen Co., Ltd.

【0025】[0025]

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

【0026】本発明は、上記のような課題を解消するた
めになされたもので、劣性シンボル出現時の正規化処理
の時間を短縮して符号化処理を高速化できる二値画像符
号化装置を提供することを目的とする。
The present invention has been made in order to solve the above problems, and provides a binary image coding apparatus capable of shortening the time of the normalization process when a recessive symbol appears and speeding up the coding process. The purpose is to provide.

【0027】[0027]

【課題を解決するための手段】本発明によれば、前述の
目的は、二値画像データをロスレス符号化する二値画像
符号化装置であって、符号化する注目画素の周囲の複数
画素を所定のテンプレートを用いて参照し、テンプレー
ト内の複数画素のそれぞれに対応する二値化データの組
み合わせで表されるコンテクストを算出する画像参照手
段と、前記画像参照手段より算出されるコンテクストに
対応するメモリアドレスに格納されているステータスを
出力するステータス出力手段と、前記ステータスから劣
性シンボル出現確率及び優勢シンボルを推定して出力す
る推定手段と、前記ステータスから劣性シンボル正規化
時シフト数を算出する算出手段と、前記劣性シンボル出
現確率を用いて二値画像データに対応した符号系列を出
力する際に、劣性シンボル出現後の正規化処理を優勢シ
ンボル出現後の正規化処理と分けて、前記劣性シンボル
正規化時シフト数を用いて行う算術符号生成手段とを具
備する請求項1の二値化画像符号化装置によって達成さ
れる。
According to the present invention, the above-mentioned object is a binary image coding apparatus for losslessly coding binary image data, wherein a plurality of pixels around a target pixel to be coded are encoded. Corresponding to an image reference unit for calculating a context represented by a combination of binarized data corresponding to each of a plurality of pixels in the template with reference to a predetermined template, and a context calculated by the image reference unit Status output means for outputting the status stored in the memory address, estimation means for estimating and outputting the recessive symbol appearance probability and dominant symbol from the status, and calculation for calculating the recessive symbol normalization shift number from the status Means and a recessive symbol when outputting a code sequence corresponding to binary image data using the recessive symbol appearance probability. The binarized image coding according to claim 1, further comprising: an arithmetic code generation unit that divides the normalization process after the appearance of the symbol from the normalization process after the appearance of the dominant symbol and uses the recessive symbol normalization shift number. Achieved by the device.

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

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

【0030】[0030]

【作用】請求項1に記載の二値画像符号化装置において
は、画像参照手段により符号化する注目画素の周囲の複
数画素をテンプレートを用いて参照してテンプレート内
の複数画素のそれぞれに対応する二値化データの組み合
わせで表されるコンテクストが算出され、ステータス出
力手段により画像参照手段により算出されるコンテクス
トに対応するメモリアドレスに格納されているステータ
スが出力され、推定手段によりステータスから劣性シン
ボル出現確率及び優勢シンボルが推定されて出力され、
算出手段によりステータスから劣性シンボル正規化時シ
フト数が算出され、算術符号生成手段により劣性シンボ
ル出現確率を用いて二値画像データに対応した符号系列
を出力する際に、劣性シンボル出現後の正規化処理を優
勢シンボル出現後の正規化処理と分けて、劣性シンボル
正規化時シフト数を用いた正規化処理が行われる。これ
により、劣性シンボル出現時の正規化処理に要する時間
を短縮できる。
In the binary image coding apparatus according to the present invention, a plurality of pixels around the pixel of interest to be coded by the image reference means are referred to by using a template and correspond to each of the plurality of pixels in the template. The context represented by a combination of binarized data is calculated, the status output means outputs the status stored in the memory address corresponding to the context calculated by the image reference means, and the estimation means outputs the recessive symbol from the status. Probability and dominant symbols are estimated and output,
The calculating unit calculates the recessive symbol normalization shift number from the status, and when the arithmetic code generating unit outputs the code sequence corresponding to the binary image data using the recessive symbol appearance probability, normalization after the appearance of the recessive symbol is performed. The process is separated from the normalization process after the appearance of the dominant symbol, and the normalization process using the recessive symbol normalization shift number is performed. As a result, the time required for the normalization process when the recessive symbol appears can be shortened.

【0031】請求項2の二値化画像符号化装置において
は、推定手段が、ステータスに対応する劣性シンボル出
現確率及び優勢シンボル推定データが記載された確率推
定テーブルを具備していることにより、劣性シンボル出
現確率及び優勢シンボルを容易に推定し得る。
In the binarized image encoding device according to the second aspect of the present invention, the estimating means includes the probability estimation table in which the recessive symbol appearance probability and the dominant symbol estimation data corresponding to the status are described. The probability of symbol appearance and the dominant symbol can be easily estimated.

【0032】請求項3の二値化画像符号化装置において
は、ステータスに対応する劣性シンボル正規化時シフト
数が確率推定テーブルに記載されており、算出手段が確
率推定テーブルを用いることにより、劣性シンボル正規
化時シフト数を容易に求め得る。
In the binarized image encoding device of the third aspect, the recessive symbol normalization shift number corresponding to the status is described in the probability estimation table, and the inferiority is inferior by the calculation means using the probability estimation table. The number of shifts at the time of symbol normalization can be easily obtained.

【0033】[0033]

【実施例】以下、本発明の二値画像符号化装置の実施例
を図を参照しながら説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a binary image coding apparatus of the present invention will be described below with reference to the drawings.

【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 coding apparatus according to the present embodiment refers to a plurality of pixels around a pixel of interest to be coded in the binary image data by using the template 2 and refers to the inside of the template 2. An image reference unit 1 for calculating a context 100 represented by a combination of bits of a plurality of pixels, and a status 1 stored in a memory address 3 corresponding to the context 100 calculated by the image reference unit 1.
The status output means 4 for outputting 01, the estimation means 5 for estimating and outputting the recessive symbol appearance probability and the dominant symbol from the status 101 output from the status output means 4, and the recessive symbol normalization shift number from the status 101 When outputting the code sequence corresponding to the binary image data using the calculating means 6 for calculating and the recessive symbol appearance probability output from the estimating means 5, the normalization processing after the appearance of the recessive symbol is separated from the normal processing. And an arithmetic code generation means 7 for performing a normalization process using the recessive symbol normalization shift number output from the calculation means 6. The estimating means 5 has a probability estimation table.

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

【0036】本実施例では、エンコーダの動作及びEN
CODE処理については上述した従来例と同様であるの
で説明を省略する。
In this embodiment, the operation of the encoder and the EN
The CODE processing is the same as that of the conventional example described above, and therefore its explanation is 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). The recessive symbol appearance probability LSZ is subtracted from the A register (step S52). Then, the value of the A register and the recessive symbol appearance probability LSZ are compared (step S53), and if the value of the A register is LSZ or more, the value of the A register is added to the C register and 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), and 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 LPS appears, and at the same time LSZRE is set.
NORME processing is performed (step S59). If the flag R is 0, the status ST is updated to the status when the LPS appears, and at the same time RENORME
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),
The recessive 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 register A is smaller than 0x8000,
A and LSZ are compared (step S64), and A is LS
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), and when the flag R is not 1, the status appears in the symbol MP.
When the status is updated to S, RENOR
ME processing 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 CT bits to the left, the C register is shifted CT bits to the left, and SHF is set.
CT is subtracted from T, and CT is set to 0 (step S7
After 1), BYTEOUT processing is performed (step S).
72). Then, SHFT is subtracted from CT (step S73), the A register is shifted to the SHFT bit left and the C register is shifted to the SHFT bit left.

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

【0043】[0043]

【発明の効果】請求項1の二値画像符号化装置によれ
ば、劣性シンボル出現後の正規化処理を優勢シンボル出
現後の正規化処理と分けて、劣性シンボル正規化時シフ
ト数を用いた正規化処理が行われるように構成したの
で、劣性シンボル出現時の正規化処理に要する時間を短
縮でき、符号化処理速度を向上することができる。
According to the binary image coding apparatus of the first aspect, the normalization process after the appearance of the recessive symbol is separated from the normalization process after the appearance of the dominant symbol, and the recessive symbol normalization shift number is used. Since the normalization processing is performed, the time required for the normalization processing when the recessive symbol appears can be shortened and the encoding processing speed can be improved.

【0044】請求項2の二値化画像符号化装置において
は、劣性シンボル出現確率及び優勢シンボルを容易に推
定し得る。
In the binarized image coding device according to the second aspect, the recessive symbol appearance probability and the dominant symbol can be easily estimated.

【0045】請求項3の二値化画像符号化装置において
は、劣性シンボル正規化時シフト数を容易に求め得る。
In the binarized image coding device according to the third aspect, the number of shifts at the time of recessive symbol normalization can be easily obtained.

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

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

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

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

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

【図5a】本実施例の確率推定テーブルの一部を示す図
である。
FIG. 5a is a diagram showing 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 according to the present 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 ENCODE processing.

【図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 showing RENORME processing.

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

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

【図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 FINALWRITES processing.

【図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 Estimating means 6 Calculating means 7 Arithmetic code generating means

Claims (3)

【特許請求の範囲】[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 referenced using a predetermined template, and a plurality of pixels in the template are Image reference means for calculating the context represented by a combination of binary data corresponding to each, and status output means for outputting the status stored in the memory address corresponding to the context calculated by the image reference means, , Estimating means for estimating and outputting a recessive symbol appearance probability and a dominant symbol from the status, calculating means for calculating a recessive symbol normalization shift number from the status, and binary image data using the recessive symbol appearance probability When outputting the code sequence corresponding to, the normalization process after the appearance of the recessive symbol is performed after the appearance of the dominant symbol. A binary image coding apparatus, which is provided separately from the normalization processing of 1. and an arithmetic code generating means for performing using the recessive symbol normalization shift number.
【請求項2】 前記推定手段は、前記ステータスに対応
する前記劣性シンボル出現確率及び優勢シンボル推定デ
ータが記載された確率推定テーブルを具備する請求項1
に記載の二値画像符号化装置。
2. The estimation means comprises a probability estimation table in which the recessive symbol appearance probability and dominant symbol estimation data corresponding to the status are described.
2. The binary image encoding device according to.
【請求項3】 前記ステータスに対応する前記劣性シン
ボル正規化時シフト数が前記確率推定テーブルに記載さ
れており、前記算出手段は、前記確率推定テーブルを用
いる請求項2に記載の二値画像符号化装置。
3. The binary image code according to claim 2, wherein the recessive symbol normalization shift number corresponding to the status is described in the probability estimation table, and the calculating unit uses the probability estimation table. Device.
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 true JPH0818796A (en) 1996-01-19
JP3124890B2 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
JP3124890B2 (en) 2001-01-15

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
US6373408B1 (en) Encoding apparatus, decoding apparatus, encoding/decoding apparatus, encoding method and decoding method
JP3124890B2 (en) Binary image coding device
JP3185769B2 (en) Image signal processing device
JP3146109B2 (en) Binary image coding device
JPH104551A (en) Image processing unit, method for the unit and storage medium storing the method
JP3095947B2 (en) Image coding device
JP3209396B2 (en) Image data compression method and apparatus
JP3078692B2 (en) Arithmetic encoder
JP2891818B2 (en) Encoding device
JP2003198858A (en) Encoder and decoder
JP3235510B2 (en) Encoding method and encoding device, decoding method and decoding device
JP3084187B2 (en) Binary image encoding device and binary image decoding device
JP2729165B2 (en) Image processing apparatus and processing method thereof
JP3073323B2 (en) Binary image encoding method
FI84682C (en) FOERFARANDE OCH ANORDNING FOER PREDIKTERANDE KODNING.
JP2000330470A (en) Power arithmetic unit, power residue arithmetic unit, elliptic power multiplication point arithmetic unit and method and recording medium therefor
JP4110558B2 (en) Encoding device, decoding device, encoding method, and decoding method
JPH10173545A (en) Arithmetic encoding device and flash processing method
JP3484900B2 (en) Image data encoding device
JP2599375B2 (en) Vector quantization method
JP3811727B2 (en) Image encoding / decoding method and apparatus thereof
JP2877451B2 (en) Image coding method

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