Nothing Special   »   [go: up one dir, main page]

JP2793536B2 - Image data compression method - Google Patents

Image data compression method

Info

Publication number
JP2793536B2
JP2793536B2 JP30534095A JP30534095A JP2793536B2 JP 2793536 B2 JP2793536 B2 JP 2793536B2 JP 30534095 A JP30534095 A JP 30534095A JP 30534095 A JP30534095 A JP 30534095A JP 2793536 B2 JP2793536 B2 JP 2793536B2
Authority
JP
Japan
Prior art keywords
line
image data
data
memory
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP30534095A
Other languages
Japanese (ja)
Other versions
JPH09149264A (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.)
NIPPON DENKI AISHII MAIKON SHISUTEMU KK
Original Assignee
NIPPON DENKI AISHII MAIKON SHISUTEMU KK
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 NIPPON DENKI AISHII MAIKON SHISUTEMU KK filed Critical NIPPON DENKI AISHII MAIKON SHISUTEMU KK
Priority to JP30534095A priority Critical patent/JP2793536B2/en
Publication of JPH09149264A publication Critical patent/JPH09149264A/en
Application granted granted Critical
Publication of JP2793536B2 publication Critical patent/JP2793536B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は画像データの圧縮方
法に関し、特にファクシミリ装置用の画像データをIT
U−Tの勧告T.85によるJBIG(Joint B
i−lebelImage Group)を用いて圧縮
するデータ圧縮方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for compressing image data, and more particularly to a method for compressing image data for a facsimile
Recommendation T. U.T. 85 by JBIG (Joint B
The present invention relates to a data compression method for compressing data using an i-level image group.

【0002】[0002]

【従来の技術】ファクシミリ装置において、伝送する情
報量を圧縮し伝送時間を短縮するために一般のデータの
圧縮、伸長が行われている。この圧縮符号化方式とし
て、旧CCITTの勧告T.4にようG3ファクシミリ
の符号化(MH,MR方式)、勧告T.6によるG4フ
ァクシミリの符号化方式(MMR方式)といった従来の
符号化方式に加え、1995年8月にITU−Tより符
号化方式JBIG(ファクシミリ版)がT.85として
正式に勧告された。
2. Description of the Related Art In a facsimile apparatus, general data is compressed and decompressed in order to compress the amount of information to be transmitted and shorten the transmission time. As this compression encoding method, the recommendation T. G.3 facsimile coding (MH, MR system) as described in Recommendation T.4. In addition to the conventional coding method such as the G4 facsimile coding method (MMR method) by ITU-T, the coding method JBIG (facsimile version) was issued by the ITU-T in August 1995. It was officially recommended as 85.

【0003】従来のMH/MR/MMRでは、符号化処
理時に画素データから白あるいは黒の色の連続する画素
の長さであるランレングス値を求め、このランレングス
に対応した符号を符号化テーブルより求めている。これ
に対してJBIGでは符号化対象画素1画素の圧縮処理
において、前記符号化対象画素の周辺10画素を参照
し、符号化対象画素が白か黒かを予測し、予測が実際に
外れた場合のみ、算術符号化方式により符号化を行って
いる。
In the conventional MH / MR / MMR, a run length value, which is the length of a continuous pixel of white or black, is obtained from pixel data during encoding processing, and a code corresponding to the run length is encoded in an encoding table. I want more. On the other hand, in the compression processing of one pixel to be coded, JBIG refers to the ten pixels around the pixel to be coded, predicts whether the pixel to be coded is white or black, and if the prediction is actually incorrect. Only the coding is performed by the arithmetic coding method.

【0004】このJBIGは、MH/MR/MMRに比
べて圧縮率が高いものの、符号化処理そのものに要する
時間が長いため、通常ハードウェアで実現されている。
以下、このJBIGによる圧縮処理について図を用いて
説明する。
[0004] This JBIG has a higher compression ratio than MH / MR / MMR, but has a longer time required for the encoding process itself, and is usually realized by hardware.
Hereinafter, the compression processing by JBIG will be described with reference to the drawings.

【0005】図4はファクシミリ装置における圧縮処理
を行う従来の符号化装置の一例の要部を示すブロック図
である。この装置は、演算処理、データ処理、および各
部の制御処理等を行うCPU(中央処理演算装置)10
0と、送信時に読み取った原稿を2値画素データにした
ものを蓄える画像データメモリ400と、受信時に受信
したデータを符号として蓄える符号データメモリ500
と、JBIGによる符号化プログラム201と、および
画像データを符号データに変換するまたは符号データを
画像データに変換するための符号/復号化テーブル20
2が配置格納されるROM200と、符号化対象画素が
白か黒かを予測して当たる確率を高くするために参照さ
れる学習テーブル・メモリ300と、変換された結果で
ある符号データあるいは画像データをFIFO(ファー
ストインファーストアウト)管理されるFIFOメモリ
600とがバス700で接続されている。
FIG. 4 is a block diagram showing a main part of an example of a conventional encoding apparatus for performing a compression process in a facsimile apparatus. This apparatus has a CPU (central processing unit) 10 for performing arithmetic processing, data processing, control processing of each unit, and the like.
0, an image data memory 400 for storing binary pixel data of a document read at the time of transmission, and a code data memory 500 for storing data received at the time of reception as a code.
And an encoding program 201 by JBIG, and an encoding / decoding table 20 for converting image data into encoded data or converting encoded data into image data.
2, a learning table memory 300 for predicting whether a pixel to be coded is white or black and increasing the probability of hitting it, and code data or image data as a result of the conversion. (First-in first-out) and a FIFO memory 600 that is managed by a first-in first-out (FIFO).

【0006】図4の圧縮処理の手順を図5の流れ図、図
6の画像データのメモリ配置図を参照して説明する。ま
ず、スキャナ等で読み取った原稿データを2値画素デー
タに変換し、画像テータメモリ400に蓄える。この画
像データの圧縮処理は、原稿の左上から右下方向に向か
って順次処理される。
The procedure of the compression process shown in FIG. 4 will be described with reference to the flowchart of FIG. 5 and the memory arrangement diagram of the image data of FIG. First, original data read by a scanner or the like is converted into binary pixel data and stored in the image data memory 400. This image data compression processing is sequentially performed from the upper left to the lower right of the document.

【0007】この画像データ1ライン分の圧縮処理につ
いて図6を使って説明する。画像データL1は、符号化
対象ラインL11,その1つ前のラインL12,その2
つ前のラインL13等から構成され、これら各ラインL
11〜L13は、各メモリブロックB1〜B3に記憶さ
れることになる。JBIGには、汎用予測を行うか行わ
ないか(ステップS11)をJBIGフリーパラメータ
TPBONによって指定できる。ここで汎用予測とは、
符号化対象ライン(ラインL1)と符号化対象ラインの
1つ前のライン(ラインL12)とを比較して(ステッ
プS12)、これら2つのラインが同じかどうか判別す
る(ステップS13)。
The compression process for one line of image data will be described with reference to FIG. The image data L1 includes an encoding target line L11, a line L12 immediately before the encoding target line L11,
Each of the lines L13
11 to L13 are stored in the memory blocks B1 to B3. For the JBIG, whether to perform general-purpose prediction or not (step S11) can be designated by a JBIG free parameter TPBON. Here, general-purpose prediction is
The line to be encoded (line L1) and the line immediately before the line to be encoded (line L12) are compared (step S12), and it is determined whether these two lines are the same (step S13).

【0008】このステップS13の判別の結果、同じで
なかった場合は1ライン符号化処理(ステップS14)
を行い、同じである場合は符号化対象ラインL11を符
号化対象としない。従って、汎用予測を行うことで、符
号化対象ラインを減らし、その圧縮時間を短縮できる。
また、この汎用予測を行わない場合はそのまま1ライン
符号化処理(ステップS15)を行う。
If the result of determination in step S13 is not the same, one-line encoding processing (step S14)
And if they are the same, the encoding target line L11 is not set as the encoding target. Therefore, by performing general-purpose prediction, the number of lines to be encoded can be reduced, and the compression time can be reduced.
When the general-purpose prediction is not performed, the one-line encoding process (step S15) is performed as it is.

【0009】次に1ライン符号化処理S14(S15)
について、図7,8のデータ配置図および図9の流れ図
を使って説明する。ここでは、JBIGフリーパラメー
タLRLTWOがOFFの場合について説明する。JB
IGフリーパラメータLRLTWOは、符号化対象画素
を予測する際に参照する10画素の集まりで、このパラ
メータLRLTWOがOFFの場合、図7(a)に示す
様に、参照10画素が3ラインに渡っており、3ライン
・モデルテンプレートと呼ばれる。またパラメータLR
LTWOがONの場合、図8に示す様に、参照10画素
が2ラインに渡っており、2ライン・モデルテンプレー
トと呼ばれる。
Next, one-line encoding processing S14 (S15)
Will be described with reference to the data arrangement diagrams of FIGS. 7 and 8 and the flowchart of FIG. Here, the case where the JBIG free parameter LRLTWO is OFF will be described. JB
The IG-free parameter LRLTWO is a group of 10 pixels to be referred to when predicting a pixel to be encoded. When the parameter LRLTWO is OFF, as shown in FIG. 7A, the reference 10 pixels extend over 3 lines. And is called a three-line model template. Also, the parameter LR
When LTWO is ON, as shown in FIG. 8, the reference 10 pixels extend over two lines and are called a two-line model template.

【0010】まず符号化対象ラインL11の2つ前のラ
イン(ラインL13)よりブロック単位(ブロックB
3)で画素データを読み出す(ステップS21)。ここ
でブロック単位とは32画素とする。次に、符号化対象
ラインの1つ前のライン(ラインL12)よりブロック
単位(ブロックB2)で画像データを読み出す(ステッ
プS22)。更に、符号化対象ライン(ラインL11)
よりブロック単位(ブロックB1)で画像データを読み
出す(ステップS23)。3ライン分のメモリブロック
を読み出した後、3つのメモリブロックB3〜B1よ
り、図7(a)に示す画素位置で、参照10画素を取り
出し、そのコンテキストXを作成する(ステップS2
4)。
First, a block unit (block B) from the line (line L13) immediately before the line L11 to be encoded is described.
The pixel data is read out in 3) (step S21). Here, the block unit is 32 pixels. Next, image data is read out in blocks (block B2) from the line (line L12) immediately before the line to be encoded (step S22). Further, the encoding target line (line L11)
Image data is read out in block units (block B1) (step S23). After reading the memory blocks for three lines, the reference 10 pixels are extracted from the three memory blocks B3 to B1 at the pixel positions shown in FIG. 7A, and the context X is created (step S2).
4).

【0011】ここでコンテキストXとは参照周辺10画
素を1次元化したものである。このコンテキストXを使
って1画素符号化処理(ステップS25)が行われる。
具体的には、コンテキストを使い、符号化対象画素が白
か黒か予測を立てる。この予測の当たり外れをシボル系
列と見なし、シンボル系列を算術符号化により圧縮を行
う。同時にコンテキストの値毎に予測の当たり外れの確
率を算出し、学習テーブル・メモリに保持する。学習テ
ーブルを用いることで予測が当たる確率を高め、圧縮符
号データを小さくすることができる。
Here, the context X is a one-dimensional representation of 10 pixels around the reference. One-pixel encoding processing (step S25) is performed using the context X.
Specifically, the context is used to predict whether the encoding target pixel is white or black. The prediction error is regarded as a symbol sequence, and the symbol sequence is compressed by arithmetic coding. At the same time, the probability of prediction hit or miss is calculated for each context value and stored in the learning table memory. By using the learning table, it is possible to increase the probability that the prediction is successful and to reduce the size of the compressed code data.

【0012】その1画素符号化処理後、ブロック単位分
の画素について圧縮が終了したかどうか判別し(ステッ
プS26)、未終了の場合はメモリブロックB3〜B1
を1ビット・シフトし(ステップS27〜29)、コン
テキスト作成処理(ステップS24)の前へ戻る。この
1ビット・シフト処理によって、図7(b)に示すよう
に次の符号化対象画素を圧縮するための参照10画素位
置を確定できる。ブロック単位分の処理が終了した場合
は、1ライン符号化処理の先頭に戻り、1ライン分の符
号化処理が終了したかどうか判別する(ステップS2
0)。以上の処理を原稿のライン数分繰り返すことで圧
縮処理を行っている。
After the one-pixel encoding process, it is determined whether or not the compression has been completed for the pixels of the block unit (step S26). If the compression has not been completed, the memory blocks B3 to B1 are determined.
Is shifted by one bit (steps S27 to S29), and the process returns to the context creation processing (step S24). By this one-bit shift processing, as shown in FIG. 7B, the reference 10 pixel position for compressing the next encoding target pixel can be determined. When the processing for the block unit is completed, the process returns to the beginning of the one-line encoding processing, and it is determined whether the encoding processing for one line is completed (step S2).
0). The compression process is performed by repeating the above process for the number of lines of the document.

【0013】[0013]

【発明が解決しようとする課題】上述した従来の圧縮方
法の第1の問題点は、その圧縮時間がMH/MR/MM
Rによる圧縮処理に比べ長い点にある。その理由は、J
BIGによる画像データの圧縮処理は、基本的には1画
素単位で行われること、および汎用予測が当たった場
合、即ち隣接する2ラインが同じだった場合でも、隣接
する2ラインの次のラインを符号化する際に汎用予測結
果を参照せずに無条件に3ライン分のメモリブロックを
読み出していることによる。
A first problem of the above-mentioned conventional compression method is that the compression time is MH / MR / MM.
This method is longer than the compression processing using R. The reason is J
The compression processing of image data by the BIG is basically performed in units of one pixel, and when general-purpose prediction is performed, that is, even when two adjacent lines are the same, the next line of the two adjacent lines is copied. This is because the memory block for three lines is unconditionally read without referring to the general-purpose prediction result when encoding.

【0014】また第2の問題点は、符号化対象ライン、
符号化対象ラインの1つ前のライン、および符号化対象
ラインの2つ前のライン、計3ライン分の画像データ
を、符号化対象ラインの圧縮処理が終了するまで、無条
件に保存する必要がありメモリ効率が悪い。その理由
は、コンテキスト作成処理において3ライン分のメモリ
ブロックを無条件に参照していることによる。
The second problem is that the line to be coded is
It is necessary to unconditionally store image data for a total of three lines, one line before the line to be encoded and two lines before the line to be encoded, until the compression processing of the line to be encoded is completed. There is poor memory efficiency. The reason is that the memory block for three lines is unconditionally referred to in the context creation processing.

【0015】本発明の目的は、これら2つの問題点を解
決し、特にJBIGによる2値画像データ圧縮処理をソ
フトウェアにより実現した画像データ圧縮方法を提供す
ることにある。
An object of the present invention is to solve these two problems, and in particular, to provide an image data compression method in which binary image data compression processing by JBIG is realized by software.

【0016】[0016]

【課題を解決するための手段】本発明の構成は、画像メ
モリより画像データをライン毎にブロック単位で読出
し、そのブロック単位の画像データのパターン毎にコン
テキストを作成して前記画像データの符号化対象画素の
周辺画素を参照して2値画素データの圧縮を行う画像デ
ータ圧縮方法において、前記コンテキスト作成処理は、
前記ブロック単位の画像データがオール白かオール白以
外かを判別し、これがオール白の場合、コンテキスト作
成対象データとしないようにしたことを特徴とする。
According to the structure of the present invention, image data is read from an image memory in units of blocks for each line, and a context is created for each pattern of the image data in units of blocks to encode the image data. In an image data compression method for compressing binary pixel data with reference to peripheral pixels of a target pixel, the context creation processing includes:
It is characterized in that it is determined whether the image data in the block unit is all white or other than all white, and if this is all white, it is not set as context creation target data.

【0017】また、本発明において、画像メモリより画
像データを読出す場合に、この画像メモリの符号化対象
ラインの2つ前のラインのデータと1つ前のラインのデ
ータとを比較し、これらが一致した場合に前記2ライン
の画像データの内一方のラインのみ画像データとして読
み出し、他方のラインの画像データは読み出さないよう
にすることもでき、さらに符号化対象ラインの2つ前の
ラインのデータと1つ前のラインのデータとを比較し、
これらが一致していなければ、画像メモリより画像デー
タをライン毎にブロック単位で読み出し、そのブロック
単位の画像データのパターン毎にコンテキスト作成処理
を行い、前記ブロック単位の画像データがオール白かオ
ール白以外かを判別し、これがオール白の場合にコンテ
キスト作成対象データとしないようにすることもでき
る。
In the present invention, when image data is read from the image memory, the data of the line two lines before the line to be coded in the image memory and the data of the line immediately before the line to be coded are read.
Comparing the chromatography data, it reads as image data only one line of image data of the two lines if they match, it is also possible to not read the image data of the other line, further coded Two lines before the line
Compare the data of the line with the data of the previous line ,
If they do not match, the image data is read from the image memory in units of blocks for each line, and context creation processing is performed for each pattern of the image data in units of blocks, and the image data in units of blocks is all white or all white. It is also possible to determine whether the data is other than the context creation target data when this is all white.

【0018】本発明によれば、画像メモリより画像デー
タをライン毎にブロック単位で読み出し、パターン毎に
コンテキストを作成する処理において、オール白かオー
ル白以外かを判別することにより、3ライン・モデルテ
ンプレートの場合は8パターンに別れる。ここで、オー
ル白のラインについては、コンテキスト作成対象データ
としないことによって、メモリブロックのマスク処理や
シフト処理を省くことができるため、その分だけ圧縮処
理時間を短縮できる。
According to the present invention, in the process of reading out image data from the image memory in units of blocks for each line and creating a context for each pattern, it is determined whether the image data is all white or other than all white. In the case of a template, it is divided into eight patterns. Here, since the all white lines are not used as context creation target data, mask processing and shift processing of a memory block can be omitted, and the compression processing time can be shortened accordingly.

【0019】また、符号化対象ラインの2つ前のライン
のデータと1つ前のラインのデータとを比較し、同じで
あれば符号化対象ラインを符号化対象から除外するとい
う画像データ圧縮方法において、そのコンテキスト作成
処理が、前記除外方法により符号化対象ラインの2つ前
のラインのデータと1つ前のラインのデータの一致/不
一致の判別判断結果を参照し、一致した場合に2ライン
の画像データの内一方のラインのみ画像データ読み出
し、他方のラインの画像データは読み出さないことで、
圧縮処理時間が短縮し、一方のラインの画像データの内
容を保持する必要がなくなるため、メモリ効率も向上さ
せることができる。
Also, a line two lines before the line to be encoded
Is compared with the data of the previous line, and if they are the same, the encoding target line is excluded from the encoding target. Two lines before
With reference to the determination result of the match / mismatch between the data of the line and the data of the previous line, if they match, only one of the two lines of image data is read out, and the image data of the other line is read out. By not reading,
Since the compression processing time is shortened and it is not necessary to hold the content of the image data of one line, the memory efficiency can be improved.

【0020】[0020]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して説明する。図1は本発明の第1の実施
の形態を説明するブロック構成図、図2はその符号化処
理手順を示す流れ図である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram for explaining a first embodiment of the present invention, and FIG. 2 is a flowchart showing an encoding processing procedure.

【0021】図1のように、本実施形態は、演算処理、
データ処理、および各部の制御処理等を行うCPU(中
央処理演算装置)100Aと、送信時に読み取った原稿
を2値画素データにしたものを蓄える符号データメモリ
500と、JBIGによる符号化プログラム201A
と、および画像データを符号データに変換するまたは符
号データを画像データに変換するための符号/復号化テ
ーブル202が配置格納されるROM200Aと、符号
化対象画素が白か黒かを予測して当たる確率を高くする
ために参照される学習テーブル・メモリ300と、変換
された結果である符号データあるいは画像データをFI
FO(ファーストインファーストアウト)管理されるF
IFOメモリ600とがバス700で接続されている。
As shown in FIG. 1, this embodiment employs arithmetic processing,
CPU (central processing unit) 100A that performs data processing and control processing of each unit, a code data memory 500 that stores binary image data of a document read at the time of transmission, and an encoding program 201A by JBIG
And a ROM 200A in which a coding / decoding table 202 for converting image data into code data or converting code data into image data is arranged and stored, and predicting whether the pixel to be coded is white or black. A learning table memory 300 referred to in order to increase the probability and code data or image data as a result of the conversion are stored in the FI
F managed by FO (first in first out)
The IFO memory 600 is connected by a bus 700.

【0022】本発明の特徴となるCPU100Aは、内
部に符号化対象ラインよりブロック単位で画像データA
を読み出したデータを保持するレジスタ103と、符号
化対象ラインの1つ前のラインよりブロック単位で画像
データBを読み出したデータを保持するレジスタ104
と、符号化対象ラインの2つ前のラインよりブロック単
位で画像データCを読み出したデータを保持するレジス
タ105と、コンテキストの内容を保持するレジスタ1
02と、汎用予測結果を保持するレジスタ101を持
つ。このCPU100Aは、次に述べるJBIGによる
符号化プログラム201Aを実行する。
The CPU 100A, which is a feature of the present invention, internally stores image data A in units of blocks from a line to be encoded.
And a register 104 for holding data obtained by reading image data B in block units from the line immediately before the encoding target line.
And a register 105 for holding data obtained by reading image data C in block units from a line two lines before the line to be encoded, and a register 1 for holding context contents
02 and a register 101 for holding a general-purpose prediction result. The CPU 100A executes a JBIG encoding program 201A described below.

【0023】次に、本実施形態のJBIGによる符号化
プログラム201Aの手順を図2の流れ図を参照して説
明する。ここでは、従来例と同様に、JBIGフリーパ
ラメータLRLTWOがOFFの場合について説明す
る。まず符号化対象ラインの2つ前のライン(ラインL
13)よりブロック単位(ブロックB3)で画像データ
を読み出す(ステップS21)。このブロック単位も3
2画素とする。次に、符号化対象ラインの1つ前のライ
ン(ラインL12)よりブロック単位(B2)で画像デ
ータを読み出す(ステップS22)。更に、符号化対象
ライン(ラインL1)よりブロック単位(ブロックB
1)で画像データを読み出す(ステップS23)。
Next, the procedure of the JBIG encoding program 201A of this embodiment will be described with reference to the flowchart of FIG. Here, similarly to the conventional example, a case where the JBIG free parameter LRLTWO is OFF will be described. First, the line immediately before the line to be encoded (line L
13) The image data is read out in block units (block B3) (step S21). This block unit is also 3
Two pixels. Next, image data is read out in blocks (B2) from the line (line L12) immediately before the line to be encoded (step S22). Further, the encoding target line (line L1) is used in block units (block B).
The image data is read in 1) (step S23).

【0024】ここで読み出した3つのメモリブロックB
3〜B1がオール白かどうか判別し(ステップS3
0)、この判別結果がオール白でない場合、従来通り
に、3つのメモリブロックB3〜B1より図7(a)に
示す画素位置で、参照10画素を取り出し、そのコンテ
キストXを作成する(ステップS24)。ここで、コン
テキストとは参照周辺10画素を1次元化したものであ
る。このコンテキストXを使って1画素符号化処理(ス
テップS25)が行われる。
The three memory blocks B read here
It is determined whether 3-B1 is all white (step S3).
0), if the result of this determination is not all white, the reference 10 pixels are extracted from the three memory blocks B3 to B1 at the pixel positions shown in FIG. 7A and the context X is created as in the conventional case (step S24). ). Here, the context is a one-dimensional representation of 10 pixels around the reference. One-pixel encoding processing (step S25) is performed using the context X.

【0025】具体的には、このコンテキストを使い、符
号化対象画素が白か黒の予測を立てる。この予測の当た
り外れをシンボル系列と見なし、そのシンボル系列を算
術符号化により圧縮を行う。同時にコンテキストの値毎
に予測の当たり外れの確率を算出し、学習テーブル・メ
モリに保持する。この学習テーブルを用いることで予測
が当たる確率を高め、圧縮符号データを小さくすること
ができる。
Specifically, the context is used to predict whether the pixel to be encoded is white or black. The prediction error is regarded as a symbol sequence, and the symbol sequence is compressed by arithmetic coding. At the same time, the probability of prediction hit or miss is calculated for each context value and stored in the learning table memory. By using this learning table, it is possible to increase the probability that the prediction is successful and to reduce the size of the compressed code data.

【0026】その1画素符号化処理(S25)の後、ブ
ロック単位分の画素について圧縮が終了したかどうか判
別し(ステップS26)、未終了の場合は前記メモリブ
ロックB3〜B1を1ビットシフトし(ステップS27
〜29)、コンテキスト作成処理(ステップS24)の
前へ戻る。この1ビット・シフト処理によって、図7
(b)に示すように次の符号化対象画素を圧縮するため
の参照10画素位置を確定できる。ブロック単位分の処
理が終了した場合は、1ライン符号化処理の先頭に戻
り、1ライン分の符号化処理が終了したかどうか判別す
る(ステップS20)。
After the one-pixel encoding process (S25), it is determined whether or not the compression has been completed for the pixels of the block unit (step S26). If not completed, the memory blocks B3 to B1 are shifted by one bit. (Step S27
To 29), and return to the context creation processing (step S24). By this one-bit shift processing, FIG.
As shown in (b), the reference 10 pixel position for compressing the next encoding target pixel can be determined. When the processing for the block unit is completed, the process returns to the top of the one-line encoding processing, and it is determined whether the encoding processing for one line is completed (step S20).

【0027】また、ステップS30で、その読み出した
3つのメモリ・ブロックB3〜B1がオール白だった場
合、ブロック処理が終了(ステップS32)するまで、
コンテキスト作成処理は一切行わず、1画素符号化処理
(ステップS31)のみ行う。この理由は、3つのメモ
リ・ブロックB〜B1がオール白の場合は、ブロック単
位処理中、コンテキストは0のまま不変であるためであ
る。また、その1画素符号化処理(ステップS32)後
に、メモリブロックB3〜B1の1ビット・シフトする
必要もない。これにより、3つのメモリ・ブロックB3
〜B1がオール白である場合が多い画像、即ちファクシ
ミリで取り扱うことが多い文書画像の様に、白目勝ちの
画像の圧縮処理に対して、コンテキスト作成処理回数を
大幅に減らすことが出来る。また、3つのメモリ・ブロ
ックがオール白以外の場合でも、例えば、符号化対象ラ
イン(ラインL11)のメモリ・ブロックB1が白で、
他の2つのメモリ・ブロックが白でない場合等、3つの
メモリ・ブロックのパターン毎に、専用のコンテキスト
作成処理を行うことにより、更なる圧縮処理速度の向上
が可能となる。
Further, in step S30, the read
If the three memory blocks B3 to B1 are all white, the block processing ends until the block processing ends (step S32).
No context creation processing is performed, and only one-pixel encoding processing (step S31) is performed. The reason for this is that when the three memory blocks B to B1 are all white, the context remains unchanged at 0 during the block unit processing. Further, there is no need to shift the memory blocks B3 to B1 by 1 bit after the one-pixel encoding process (step S32). Thereby, three memory blocks B3
As in the case of an image in which .about.B1 is all white, that is, a document image which is often handled by facsimile, the number of times of context creation processing can be greatly reduced with respect to the compression processing of an image that wins with white eyes. Even when the three memory blocks are not all white, for example, the memory block B1 of the encoding target line (line L11) is white,
For example, when the other two memory blocks are not white, by performing a dedicated context creation process for each of the three memory block patterns, the compression processing speed can be further improved.

【0028】次に、本発明の第二実施の形態のJBIG
による符号化プログラム201Aの手順を図3の流れ図
を参照して説明する。ここでは、従来例同様、JBIG
フリーパラメータLRLTWOがOFFの場合について
説明する。まず符号化対象ラインの2つ前のライン(ラ
インL13)と、符号化対象ラインの1つ前のライン
(ラインL12)の比較結果を参照する(ステップS4
0)。尚、この比較参照結果は、CPU100A内のレ
ジスタ汎用予測判定結果101に保存されている。この
判定結果を参照して2つのラインが同一かどうかを判定
し(ステップS41)、それが同一ラインでなければ従
来例と同様にステップS20からステップS29まで
を、1ライン分処理を行う。その判定の結果、符号化対
象ラインの2つ前のライン(ラインL13)と、符号化
対象ラインの1つ前のライン(ラインL12)が同じだ
った場合、符号化対象ラインの1つ前のライン(ライン
L12)よりブロック単位(ブロックB2)で画像デー
タを読み出し(ステップS22A)、更に、符号化対象
ライン(ラインL11)よりブロック単位(ブロックB
1)で画像データを読み出す(ステップS23A)。
Next, the JBIG according to the second embodiment of the present invention will be described.
Will be described with reference to the flowchart of FIG. Here, as in the conventional example, JBIG
The case where the free parameter LRLTWO is OFF will be described. First, a comparison result between the line immediately before the encoding target line (line L13) and the line immediately before the encoding target line (line L12) is referred to (step S4).
0). Note that this comparison reference result is stored in the register general-purpose prediction determination result 101 in the CPU 100A. With reference to this determination result, it is determined whether the two lines are the same (step S41). If they are not the same line, the processes from step S20 to step S29 are performed for one line as in the conventional example. As a result of the determination, if the line (line L13) immediately before the line to be encoded is the same as the line (line L12) immediately before the line to be encoded, the line before the line to be encoded is the same. line (line L12) reads the image data in from the blocks (block B2) (step S22A), further encoding target line (line L11) from each block (block B
The image data is read in 1) (step S23A).

【0029】符号化対象ラインの2つ前のライン(ライ
ンL13)については、ブロック単位での画像データの
読み出しを行なわず、既にステップS22Aで読み出し
た前記符号化対象ラインの1つ前のライン(ラインL1
2)のブロック単位の画像データを参照することで、併
せて符号化対象ラインより読み出したメモリブロック
(ブロックB1)より、コンテキストを作成する(ステ
ップS42)。このコンテキストを使って1画素符号化
処理(ステップS25A)が行われる。
With respect to the line (line L13) two lines before the line to be coded, image data is not read out in block units, and the line (line L13) immediately before the line to be coded already read out in step S22A is read. Line L1
The context is created from the memory block (block B1) read out from the encoding target line by referring to the image data in block unit of 2) (step S42). One-pixel encoding processing (step S25A) is performed using this context.

【0030】この1画素符号化処理後、ブロック単位分
の画素について圧縮が終了したかどうか判別し(ステッ
プS26A)、未終了の場合は前記メモリブロックB
2,B1を1ビット・シフトし(ステップS28A,2
9A)、そのコンテキスト作成処理(ステップS42)
の前へ戻る。この1ビット・シフト処理によって、図7
(b)に示すように次の符号化対象画素を圧縮するため
の参照10画素位置を確定できる。
After the one-pixel encoding process, it is determined whether or not the compression has been completed for the pixels in the block unit (step S26A).
2 and B1 are shifted by one bit (steps S28A, 2
9A), the context creation processing (step S42)
Return to before. By this one-bit shift processing, FIG.
As shown in (b), the reference 10 pixel position for compressing the next encoding target pixel can be determined.

【0031】ここで、符号化対象ラインの2つ前のライ
ン(ラインL13)のメモリブロックについては、その
1ビット・シフト処理を行う必要がない。また、符号化
対象ラインの2つ前のライン(ラインL13)と、符号
化対象ラインの1つ前のライン(ラインL12)とは同
じなので、符号化対象ラインの2つ前のライン(ライン
L13)は、画像データメモリ400に保存の必要はな
く、フリーなメモリ領域として解放できる。このブロッ
ク単位分の処理が終了した場合は、1ライン符号化処理
の先頭に戻り、1ライン分の符号化処理が終了したかど
うか判別する(ステップS20A)。汎用予測結果を参
照することで、画像データの読み出し回数を減らし、ま
た、メモリ効率を高めることが可能になる。
Here, it is not necessary to perform the one-bit shift process on the memory block of the line (line L13) two lines before the line to be encoded. Further, the line (line L13) immediately before the line to be encoded and the line (line L12) immediately before the line to be encoded are the same, so the line (line L13) immediately before the line to be encoded is the same. ) Need not be stored in the image data memory 400 and can be released as a free memory area. When the processing for the block unit is completed, the process returns to the top of the one-line encoding processing, and it is determined whether the encoding processing for one line is completed (step S20A). By referring to the general-purpose prediction result, the number of times of reading image data can be reduced, and the memory efficiency can be increased.

【0032】[0032]

【発明の効果】以上説明したように、本発明によれば、
符号化対象画素の周辺画素を参照する2画像データ圧縮
方法または、符号化対象ラインと符号化対象ラインの1
つ前のラインを比較し、同じであれば前記符号化対象ラ
インを符号化対象から除外しているので、符号化処理速
度を向上させることができる。これは、コンテキスト作
成処理回数の削減と画像メモリ読み出し回数の削減によ
るものである。
As described above, according to the present invention,
A two-image data compression method that refers to the peripheral pixels of the encoding target pixel, or one of the encoding target line and the encoding target line
The previous line is compared, and if they are the same, the encoding target line is excluded from the encoding target, so that the encoding processing speed can be improved. This is due to a reduction in the number of context creation processes and a reduction in the number of times image memory is read.

【0033】また、本発明によれば、符号化対象ライン
と符号化対象ラインの1つ前のラインを比較し、同じで
あれば前記符号化対象ラインを符号化対象から除外し、
汎用予測結果利用による不要画像メモリの解放を行って
いるので、メモリ効率の向上を図ることができる。
According to the present invention, the line to be coded is compared with the line immediately before the line to be coded, and if they are the same, the line to be coded is excluded from the lines to be coded.
Since the unnecessary image memory is released by using the general-purpose prediction result, the memory efficiency can be improved.

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

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

【図2】図1の符号化手順を示す流れ図である。FIG. 2 is a flowchart showing an encoding procedure of FIG. 1;

【図3】本発明の第二の実施の形態の符号化手順を示す
流れ図である。
FIG. 3 is a flowchart showing an encoding procedure according to the second embodiment of the present invention.

【図4】従来例の画像データ圧縮を実施する部分の要部
を示すブロック図である。
FIG. 4 is a block diagram showing a main part of a portion for performing image data compression in a conventional example.

【図5】従来の符号化対象ラインと符号化対象ラインの
1つ前のラインを比較し、同じであれば前記符号化対象
ランインを符号化対象から除外する手段を持つ2値画像
データ圧縮方法の全体流れ図である。
FIG. 5 shows a conventional binary image data compression method having means for comparing a line to be coded with a line immediately before the line to be coded and, if they are the same, excluding the run-in to be coded from the lines to be coded. 3 is an overall flowchart of FIG.

【図6】符号化対象画像データ、ライン、およびメモリ
・ブロックの関係を説明するデータ配置図である。
FIG. 6 is a data arrangement diagram for explaining the relationship between encoding target image data, lines, and memory blocks.

【図7】符号化対象ラインのメモリ・ブロックおよび3
ライン・モデル・テンプレートおよびコンテキストの関
係を説明するデータ配置図である。
FIG. 7 shows a memory block of a line to be coded and 3
FIG. 8 is a data arrangement diagram for explaining a relationship between a line model template and a context.

【図8】符号化対象ラインのメモリ・ブロックおよび2
ライン・モデル・テンプレートの関係を説明するデータ
配置図である。
FIG. 8 shows a memory block of a line to be coded and 2
FIG. 9 is a data arrangement diagram illustrating a relationship between line models and templates.

【図9】従来例の符号化手順を示す流れ図である。FIG. 9 is a flowchart showing a conventional encoding procedure.

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

100,100A CPU 101 汎用予測結果用レジスタ 102 コンテキスト用レジスタ 103〜105 メモリブロック用レジスタ 200,200A プログラム、テーブル用ROM 201,201A JBIG符号化プログラム 202 符号/復号化テーブル 300 学習テーブル・メモリ 400 画像データ・メモリ 500 符号データ・メモリ 600 FIFOメモリ 700 バス L1 画像データ L11 符号化対象ライン L12 符号化対象ラインの1つ前のライン L13 符号化対象ラインの2つ前のライン B1,B4 符号化対象ラインのメモリブロック B2,B5 符号化対象ラインの1つ前のラインのメ
モリブロック B3,B6 符号化対象ラインの2つ前のラインのメ
モリブロック
100, 100A CPU 101 General-purpose prediction result register 102 Context register 103-105 Memory block register 200, 200A Program and table ROM 201, 201A JBIG coding program 202 Coding / decoding table 300 Learning table memory 400 Image data Memory 500 code data memory 600 FIFO memory 700 bus L1 image data L11 line to be encoded L12 line immediately before the line to be encoded L13 line immediately before the line to be encoded B1, B4 line to be encoded Memory block B2, B5 Memory block of the line immediately before the line to be encoded B3, B6 Memory block of the line before the line to be encoded

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 画像メモリより画像データをライン毎に
ブロック単位で読出し、そのブロック単位の画像データ
のパターン毎にコンテキストを作成して前記画像データ
の符号化対象画素の周辺画素を参照して2値画素データ
の圧縮を行う画像データ圧縮方法において、前記コンテ
キスト作成処理は、前記ブロック単位の画像データがオ
ール白かオール白以外かを判別し、これがオール白の場
合、コンテキスト作成対象データとしないようにしたこ
とを特徴とする画像データ圧縮方法。
An image data is read out from an image memory in units of blocks for each line, a context is created for each pattern of the image data in units of blocks, and reference is made to pixels surrounding the pixel to be encoded of the image data. In the image data compression method of compressing the value pixel data, the context creation processing determines whether the image data in the block unit is all white or other than all white. A method for compressing image data, comprising:
【請求項2】 画像メモリより画像データを読出す場合
に、この画像メモリの符号化対象ラインの2つ前のライ
ンのデータと1つ前のラインのデータとを比較し、これ
らが一致した場合に前記2ラインの画像データの内一方
のラインのみ画像データとして読み出し、他方のライン
の画像データは読み出さないようにしたことを特徴とす
る画像データ圧縮方法。
2. When image data is read from an image memory, a line immediately before an encoding target line of the image memory is read.
The data of one line is compared with the data of the previous line, and when they match, only one of the two lines of image data is read as image data , and the image data of the other line is not read. An image data compression method, characterized in that:
【請求項3】 符号化対象ラインの2つ前のラインのデ
ータと1つ前のラインのデータとを比較し、これらが一
致していなければ、画像メモリより画像データをライン
毎にブロック単位で読み出し、そのブロック単位の画像
データのパターン毎にコンテキスト作成処理を行い、前
記ブロック単位の画像データがオール白かオール白以外
かを判別し、これがオール白の場合にコンテキスト作成
対象データとしないようにする請求項2記載の画像デー
タ圧縮方法。
3. The data of a line two lines before the line to be encoded.
The data is compared with the data of the immediately preceding line, and if they do not match, the image data is read from the image memory in units of blocks for each line, and the context creation processing is performed for each pattern of image data in units of blocks. 3. The image data compression method according to claim 2, further comprising: determining whether the image data in the block unit is all white or other than all white.
JP30534095A 1995-11-24 1995-11-24 Image data compression method Expired - Fee Related JP2793536B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30534095A JP2793536B2 (en) 1995-11-24 1995-11-24 Image data compression method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30534095A JP2793536B2 (en) 1995-11-24 1995-11-24 Image data compression method

Publications (2)

Publication Number Publication Date
JPH09149264A JPH09149264A (en) 1997-06-06
JP2793536B2 true JP2793536B2 (en) 1998-09-03

Family

ID=17943939

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30534095A Expired - Fee Related JP2793536B2 (en) 1995-11-24 1995-11-24 Image data compression method

Country Status (1)

Country Link
JP (1) JP2793536B2 (en)

Also Published As

Publication number Publication date
JPH09149264A (en) 1997-06-06

Similar Documents

Publication Publication Date Title
JPH02290371A (en) Method of compacting image having pattern frequency and method and system for determining pattern frequency of image
JP3819482B2 (en) Adaptive contour coding method
JP2919384B2 (en) Arithmetic encoding / decoding system by JBIG
JPH11122498A (en) Picture processor
JPH07264417A (en) Image coding method
JP2793536B2 (en) Image data compression method
JPH04282780A (en) Hierarchical coding system for false gradation image
JP3491274B2 (en) Remote scan line coding method
JP3317954B2 (en) Image data compression method, JBIG coding processing method and apparatus
US6339659B1 (en) Fractal coding/decoding of picture data using memory capacity information
JP3563838B2 (en) Image encoding / decoding device
JPH06121174A (en) Encoding / decoding device
JP3227237B2 (en) Encoding device
JP3382298B2 (en) Image processing device
JP3213200B2 (en) Decoding device and method
JPH1098620A (en) Picture processor
JP3080937B2 (en) JBIG encoding method and recording medium recording JBIG program
JP2003134346A (en) Coding/decoding method an apparatus thereof
JP4526069B2 (en) Image information arithmetic coding apparatus and image information arithmetic decoding apparatus
JP2506794B2 (en) Decryption processing method
JP3948581B2 (en) Image coding method
JPH089167A (en) Image coding and decoding method and image coder and decoder
JP3546720B2 (en) Encoding device and method, decoding device and method, and recording medium
JPH08272978A (en) Image encoding method
JP3263218B2 (en) Image information data compression and playback device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980526

LAPS Cancellation because of no payment of annual fees