JP3159483B2 - Image compression coding device - Google Patents

Image compression coding device

Info

Publication number
JP3159483B2
JP3159483B2 JP21793891A JP21793891A JP3159483B2 JP 3159483 B2 JP3159483 B2 JP 3159483B2 JP 21793891 A JP21793891 A JP 21793891A JP 21793891 A JP21793891 A JP 21793891A JP 3159483 B2 JP3159483 B2 JP 3159483B2
Authority
JP
Japan
Prior art keywords
run
length
data
code
compression
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
JP21793891A
Other languages
Japanese (ja)
Other versions
JPH0541808A (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.)
Mutoh Industries Ltd
Original Assignee
Mutoh Industries Ltd
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 Mutoh Industries Ltd filed Critical Mutoh Industries Ltd
Priority to JP21793891A priority Critical patent/JP3159483B2/en
Publication of JPH0541808A publication Critical patent/JPH0541808A/en
Application granted granted Critical
Publication of JP3159483B2 publication Critical patent/JP3159483B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、例えばファクシミリ装
置等においてスキャナから出力されるビットマップデー
タを高速に圧縮符号化する画像圧縮符号化装置に関し、
特に、大容量ビットマップデータを高速符号化するのに
好適の画像圧縮符号化装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image compression encoding apparatus for compressing and encoding bitmap data output from a scanner in a facsimile apparatus at a high speed.
In particular, the present invention relates to an image compression encoding apparatus suitable for encoding large-capacity bitmap data at high speed.

【0002】[0002]

【従来の技術】従来から、ファクシミリ装置等において
は、スキャナからのビットマップデータをMH(modifi
ed Huffman code )、MR(modified READ code)等の
圧縮符号化データに変換するために、圧縮伸張プロセッ
サ(以下、CEPと呼ぶ)が使用されている。この場
合、スキャナからのビットマップデータは、一定速度で
入力されるが、CEPからの圧縮符号化データの出力速
度は、画像の濃度によって異なり、通常は、スキャナか
らのデータ出力速度よりも低速である。このため、従来
の画像圧縮符号化装置には、スキャナからのビットマッ
プデータを一旦格納するための入力バッファを設けるよ
うにしている。
2. Description of the Related Art Conventionally, in a facsimile apparatus or the like, bitmap data from a scanner is converted to MH (modifi
A compression / decompression processor (hereinafter, referred to as CEP) is used to convert the data into compressed coded data such as ed Huffman code) and MR (modified READ code). In this case, the bitmap data from the scanner is input at a constant speed, but the output speed of the compression-encoded data from the CEP varies depending on the density of the image, and is usually lower than the data output speed from the scanner. is there. For this reason, the conventional image compression encoding apparatus is provided with an input buffer for temporarily storing bitmap data from the scanner.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上述し
た従来の画像圧縮符号化装置では、例えばA0,A1サ
イズといった大容量のビットマップデータを圧縮符号化
する場合、入力バッファとして、30MBを超える大容
量のビットテマップメモリが必要になるという問題点が
ある。また、従来市販されているCEPは、入力データ
としてスキャナからの画像データを想定しているので、
CEPへの入力データの形態はビットマップデータでな
ければならない。このため、スキャナから入力されるビ
ットマップデータを一旦ランレングスデータに変換して
も、再度ランレングスデータからビットマップデータに
変換しなければならず、処理及び回路が複雑化するとい
う問題点がある。
However, in the above-described conventional image compression encoding apparatus, when compressing and encoding large-capacity bitmap data such as A0 and A1 sizes, for example, a large-capacity data exceeding 30 MB is used as an input buffer. However, there is a problem that a bit telemap memory is required. In addition, since CEPs conventionally marketed assume image data from a scanner as input data,
The format of the input data to the CEP must be bitmap data. For this reason, even if the bitmap data input from the scanner is once converted to the run-length data, it must be converted from the run-length data to the bitmap data again, resulting in a problem that the processing and the circuit become complicated. .

【0004】本発明はかかる問題点に鑑みてなされたも
のであって、バッファ容量の削減を図ることができると
共に、処理及び回路の簡単化を図ることができる画像圧
縮符号化装置を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and provides an image compression encoding apparatus capable of reducing a buffer capacity and simplifying a process and a circuit. With the goal.

【0005】[0005]

【課題を解決するための手段】本発明に係る画像圧縮符
号化装置は、スキャナから出力されるビットマップデー
タを順次ランレングスデータに変換するランレングス変
換手段と、このランレングス変換手段で変換されたラン
レングスデータを順次格納するバッファ回路と、このバ
ッファ回路を介して与えられるランレングスデータを順
次圧縮符号化するランレングス・圧縮符号変換手段とを
具備し、前記ランレングス・圧縮符号変換手段は、ラン
レングスデータを圧縮符号化パターンに変換するコード
変換テーブルと、与えられたランレングスデータに基づ
いて前記コード変換テーブルをアクセスするためのアド
レスを生成するアドレス発生手段とを備えたものであ
り、前記コード変換テーブルは、ランレングスデータを
モディファイド・ホフマン符号に変換するテーブルであ
り、その出力は、メークアップ符号とターミネイティン
グ符号とを識別する識別符号と、符号化ビット数と、符
号化パターンと、この符号化パターンに対応するランレ
ングスとにより構成され、前記アドレス発生手段は、前
記コード変換テーブルから出力される前記識別符号が前
記ターミネイティング符号を示すようになるまで、前記
与えられたランレングスデータから前記符号化パターン
に対応するランレングスを順次減算することによって前
記コード変換テーブルのアドレスを生成するものであ
ことを特徴とする。
According to the present invention, there is provided an image compression / encoding apparatus which converts bitmap data output from a scanner into run-length data sequentially, and a run-length converting means which converts the bitmap data into run-length data. A buffer circuit for sequentially storing the run-length data, and run-length / compression code conversion means for sequentially compression-encoding the run-length data given via the buffer circuit, wherein the run-length / compression code conversion means A code conversion table for converting run-length data into a compression-encoding pattern, and address generating means for generating an address for accessing the code conversion table based on the given run-length data.
And the code conversion table stores run-length data.
A table to convert to Modified Huffman code
The output is the makeup code and the terminating
Code, the number of coding bits, and the code
Coding pattern and the run layer corresponding to this coding pattern.
Address generating means,
The identification code output from the code conversion table is
The terminating code
From the given run-length data, the coding pattern
By sequentially subtracting the run lengths corresponding to
Characterized in der Rukoto which generates an address of the serial code conversion table.

【0006】[0006]

【作用】本発明によれば、スキャナから供給されたビッ
トマップデータをランレングス変換手段で一旦ランレン
グスデータに圧縮したうえで、その後の処理を行なうよ
うにしているから、大容量のバッファを必要とすること
がない。しかも、本発明によれば、ランレングス単位で
装置内部のデータ転送が行なわれるので、データの転送
頻度がビットマップデータを転送する場合に比べて少な
い。このため、ランレングス・圧縮符号変換手段の処理
能力に合わせてデータの転送を行なうことにより、処理
効率の向上を図ることができ、高速処理が可能になる。
また、本発明によれば、ランレングスデータから一旦ビ
ットマップデータに変換することなくテーブルルックア
ップ方式により、圧縮符号を直接求めることができるの
で、ランレングス・ビットマップ変換処理が不要にな
り、処理及び変換部の回路を大幅に簡略化することがで
きる。
According to the present invention, the bitmap data supplied from the scanner is once compressed into run-length data by the run-length conversion means, and the subsequent processing is performed. Therefore, a large-capacity buffer is required. And never. In addition, according to the present invention, since data transfer within the device is performed in units of run length, the frequency of data transfer is lower than in the case of transferring bitmap data. Therefore, by transferring data in accordance with the processing capacity of the run-length / compression code conversion means, processing efficiency can be improved and high-speed processing can be performed.
Further, according to the present invention, since a compression code can be directly obtained by a table look-up method without first converting run-length data to bitmap data, run-length / bitmap conversion processing becomes unnecessary. In addition, the circuit of the conversion unit can be greatly simplified.

【0007】なお、ランレングス・圧縮符号変換手段と
してMH符号のコード変換テーブルを備えた場合、テー
ブルから出力される符号化パターンのランレングスをテ
ーブル出力として含ませておくようにすると、次にアク
セスすべきアドレスの生成が容易になる。
When a code conversion table of the MH code is provided as the run length / compression code conversion means, if the run length of the coding pattern output from the table is included as a table output, the next access is performed. The generation of the address to be performed becomes easy.

【0008】[0008]

【実施例】以下、添付の図面を参照しながら、本発明の
実施例について説明する。第1図は、本発明をファクシ
ミリ装置の画像圧縮符号化装置に適用した実施例を示す
ブロック図である。
Embodiments of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a block diagram showing an embodiment in which the present invention is applied to an image compression encoding apparatus of a facsimile apparatus.

【0009】密着型ラインイメージセンサ等からなる画
像スキャナから出力されたビットマップ形式のスキャナ
データは、ランレングス変換回路1に逐次入力されてい
る。ランレングス変換回路1は、入力されたスキャナデ
ータをランレングスデータに変換する。このランレング
ス変換回路1の出力は、FIFO(First in First ou
t)メモリ2に順次格納されるようになっている。FI
FOメモリ2の出力側は、CPUバス3に接続されてい
る。
Scanner data in a bitmap format output from an image scanner including a contact type line image sensor and the like is sequentially input to a run length conversion circuit 1. The run-length conversion circuit 1 converts input scanner data into run-length data. The output of the run length conversion circuit 1 is a FIFO (First in First ou
t) The data is sequentially stored in the memory 2. FI
The output side of the FO memory 2 is connected to the CPU bus 3.

【0010】このCPUバス3には、CPU4及びDR
AMバッファ5が接続されている。CPU4は、この装
置全体の制御を司るもので、FIFOメモリ2に格納さ
れたランレングスデータを適宜リードして、DRAMバ
ッファ6に順次格納する。また、CPUバス3には、ラ
ンレングス・圧縮符号変換回路6が接続されている。ラ
ンレングス・圧縮符号変換回路6は、CPU4の制御の
もとにDRAMバッファ5から順次読み出されたランレ
ングスデータをMH、MR及びMMR等の圧縮符号化デ
ータに変換し、DRAMバッファ5に順次格納する。ま
た、CPUバス3には、SCSIインタフェース回路7
が接続されており、DRAMバッファ5に格納された圧
縮符号化データを、CPU4の制御のもとに図示しない
ホストコンピュータに伝送するようになっている。
[0010] The CPU bus 3 includes a CPU 4 and a DR.
The AM buffer 5 is connected. The CPU 4 controls the overall operation of the apparatus, reads the run-length data stored in the FIFO memory 2 as appropriate, and sequentially stores the read run-length data in the DRAM buffer 6. A run length / compression code conversion circuit 6 is connected to the CPU bus 3. The run-length / compression code conversion circuit 6 converts the run-length data sequentially read from the DRAM buffer 5 under the control of the CPU 4 into compression-coded data such as MH, MR, and MMR, and sequentially stores the data in the DRAM buffer 5. Store. The CPU bus 3 has a SCSI interface circuit 7
Is connected, and transmits the compressed and coded data stored in the DRAM buffer 5 to a host computer (not shown) under the control of the CPU 4.

【0011】ランレングス・圧縮符号変換回路6は、図
2に示すように、コード変換テーブル21、参照ライン
データ記憶部22、データ演算回路23及びアドレス発
生部24並びにこれらを相互に接続する内部アドレスバ
ス25及び内部データバス26から構成されている。コ
ード変換テーブル21は、ランレングスデータをMH符
号に変換するためのテーブルである。参照ラインデータ
記憶部22は、MR,MMR符号化を行う際の参照ライ
ンを記憶するSRAMにより構成されている。また、デ
ータ演算部23は、コード変換テーブル21から出力さ
れたデータを操作して16ビットの出力データを生成し
たり、アドレス生成に必要な演算等を実行する。また、
アドレス発生部24は、コード変換テーブル21に与え
るアドレスを生成する。
As shown in FIG. 2, the run-length / compression code conversion circuit 6 includes a code conversion table 21, a reference line data storage unit 22, a data operation circuit 23, an address generation unit 24, and an internal address for interconnecting these. It comprises a bus 25 and an internal data bus 26. The code conversion table 21 is a table for converting run-length data into MH codes. The reference line data storage unit 22 is configured by an SRAM that stores a reference line when performing MR and MMR encoding. In addition, the data operation unit 23 operates data output from the code conversion table 21 to generate 16-bit output data, and performs operations necessary for address generation. Also,
The address generator 24 generates an address to be given to the code conversion table 21.

【0012】次に、このシステムの動作について説明す
る。まず、システムの動作説明に先立ち、ランレングス
データから生成されるMH,MR,MMR符号の概要に
ついて説明する。
Next, the operation of this system will be described. First, prior to a description of the operation of the system, an outline of MH, MR, and MMR codes generated from run-length data will be described.

【0013】(1)MH符号 MH符号化方式では、全走査ラインのデータが一次元符
号化される。図3に示すように、1ラインの符号化デー
タは、先頭に付加されるEOL(End ofline)符号とそ
の後に続くデータ符号とからなる。1ページの最終ライ
ンの後には、6つの連続するEOL符号からなるRTC
符号が付加される。EOL符号は、「000000000001」で
示される12ビットのコードである。また、図3にも示
すように、1つのラインの符号ビット数が予め定められ
たビット長Tよりも短い場合には、最小符号ビット数の
条件を満たすために、データ符号の後にフィルビット
(可変長の0)が付加される。データ符号は、白又は黒
のランレングスを表す可変長符号にて構成される。デー
タ符号は、ランレングスが63以下である場合には、図
4に示す1つのターミネイティング符号のみによって表
現され、ランレングスが64以上の場合には、図5及び
図6に示す1又は複数のメークアップ符号と1つのター
ミネイティング符号との結合によって表現される。
(1) MH Code In the MH coding method, data of all scan lines is one-dimensionally coded. As shown in FIG. 3, the encoded data of one line is composed of an EOL (End of Line) code added to the head and a data code following the EOL (End of Line) code. After the last line of one page, an RTC consisting of six consecutive EOL codes
A sign is added. The EOL code is a 12-bit code represented by “000000000001”. Also, as shown in FIG. 3, when the number of code bits in one line is shorter than a predetermined bit length T, a fill bit ( Variable length 0) is added. The data code is composed of a variable length code representing a white or black run length. When the run length is 63 or less, the data code is represented by only one terminating code shown in FIG. 4, and when the run length is 64 or more, one or a plurality of data codes shown in FIGS. It is represented by a combination of a make-up code and one terminating code.

【0014】(2)MR符号 MR符号化方式では、1本の走査ラインを一次元符号化
したのちに、2乃至4本の連続した走査ラインを二次元
符号化する。二次元符号化処理では、現在符号化してい
る符号化ラインの直前のラインを参照し、参照ラインと
符号化ラインの変化画素(黒から白又は白から黒に変化
する画素)の位置関係を符号化する。即ち、図7に示す
ように、a0,a0′,a1,a2,b1,b2を次の
ように決定する。
(2) MR Code In the MR encoding method, one scanning line is one-dimensionally encoded, and then two to four continuous scanning lines are two-dimensionally encoded. In the two-dimensional encoding process, a line immediately before an encoding line currently being encoded is referred to, and a positional relationship between a reference line and a changed pixel (a pixel that changes from black to white or white to black) of the encoding line is encoded. Become That is, as shown in FIG. 7, a0, a0 ', a1, a2, b1, and b2 are determined as follows.

【0015】 a0 ;符号化ライン上の起点となる画素 a0′;次の符号化処理の際にa0となる画素 a1 ;参照ライン上でa0より右にあるa0と反対色
の最初の変化画素 a2 ;符号化ライン上でa0より右にある最初の変化
画素 b1 ;参照ライン上でa1より右にある最初の変化画
素 b2 ;符号化ライン上でa2より右にある最初の変化
画素 これらの位置関係によって次の3つのモードを設定す
る。
A0; a pixel which becomes a starting point on the coding line a0 '; a pixel which becomes a0 in the next coding process a1; a first changed pixel having a color opposite to a0 on the reference line to the right of a0, a2 The first changed pixel b1 to the right of a0 on the coding line; the first changed pixel b2 to the right of a1 on the reference line; the first changed pixel to the right of a2 on the coding line; Sets the following three modes.

【0016】パスモード 図7(a)に示すように、a2がb1の右側にある場合
にはパスモードとなる。この場合、図8に示すように、
「0001」に符号化される。
Pass Mode As shown in FIG. 7A, when a2 is on the right side of b1, the pass mode is set. In this case, as shown in FIG.
It is encoded as "0001".

【0017】垂直モード 図7(b)に示すように、a1とa2の相対距離|a1
a2|が3以下の場合には、垂直モードとなる。この場
合、a1,a2の相対距離により、図8に示すV
(0),VR(1),VR(2),VR(3),VL
(1),VL(2),VL(3)の7つの符号に符号化
される。VR(n)はa2がa1の右側に、VL(n)
はa2がa1の左側にあることを意味し、括弧の中は相
対距離を示している。
Vertical mode As shown in FIG. 7B, the relative distance | a1 between a1 and a2
When a2 | is 3 or less, the mode is the vertical mode. In this case, V1 shown in FIG.
(0), VR (1), VR (2), VR (3), VL
It is encoded into seven codes of (1), VL (2), and VL (3). In VR (n), a2 is on the right side of a1 and VL (n)
Means that a2 is on the left side of a1, and parentheses indicate relative distances.

【0018】水平モード 図7(c)に示すように、a1とa2の相対距離|a1
a2|が4以上のときには、水平モードとなる。この場
合、図8に示すように、「001 」にa0a2の長さをM
H符号化したものとa2b2の長さをMH符号化したも
のとを結合した値に符号化される。MR符号化では、一
次元符号化処理と二次元符号化処理とが混在するので、
EOL符号の直後にタグビットを設け、後続するデータ
が一次元符号化されたものであるか、二次元符号化され
たものであるかを識別するようにしている。
Horizontal mode As shown in FIG. 7C, the relative distance | a1 between a1 and a2
When a2 | is 4 or more, the horizontal mode is set. In this case, as shown in FIG. 8, the length of a0a2 is
It is coded to a value obtained by combining the H-coded data and the MH-coded data of the length of a2b2. In MR encoding, one-dimensional encoding and two-dimensional encoding are mixed, so
A tag bit is provided immediately after the EOL code to identify whether the subsequent data is one-dimensionally encoded or two-dimensionally encoded.

【0019】(3)MMR符号 MMR符号化方式では、全ての走査ラインを二次元符号
化する。最初のラインを符号化する場合には、参照ライ
ンとして仮想的な全白ラインを設定する。1ページの最
終ラインでは、RTC符号として、EOL符号を連続し
て2個付加し、その後に1ページ分の符号データのビッ
ト数が8ビット単位となるように、調整用のビット
(0)を付加する。
(3) MMR Code In the MMR coding method, all scan lines are two-dimensionally coded. When encoding the first line, a virtual all-white line is set as a reference line. On the last line of one page, two EOL codes are successively added as RTC codes, and then an adjustment bit (0) is added so that the number of bits of code data for one page is in 8-bit units. Add.

【0020】次に本システムの動作について説明する。
図1において図示しない画像スキャナから出力されたビ
ットマップ形式のスキャナデータは、ランレングス変換
回路1により、例えば32ビットのランレングスデータ
RLに変換される。ランレングスデータRLの形態とし
ては、始点位置及びラン長からなる形式と始点位置及び
終点位置からなる形式等がある。例えば、図9に示すよ
うなビットマップデータの場合、前者の形態は図10
(a)の形態、後者の形態は図10(b)の形態となる
が、いずれの形態であってもよい。
Next, the operation of the present system will be described.
Scanner data in a bitmap format output from an image scanner not shown in FIG. 1 is converted by a run-length conversion circuit 1 into, for example, 32-bit run-length data RL. Examples of the form of the run-length data RL include a form including a start point position and a run length, and a form including a start point position and an end point position. For example, in the case of bitmap data as shown in FIG.
The form shown in FIG. 10A is the form shown in FIG. 10B, and the latter form may be any form.

【0021】ランレングス変換回路1の出力は、順次F
IFOメモリ2に格納される。FIFOメモリ2に所定
量のランレングスデータRLが格納されると、FIFO
メモリ2から例えばハーフ・フル・ステータス信号等が
出力されるので、CPU4はこのようなステータス信号
を見て、FIFOメモリ2からランレングスデータRL
を読み出してDRAMバッファ5に格納する。
The output of the run length conversion circuit 1 is
It is stored in the IFO memory 2. When a predetermined amount of run-length data RL is stored in the FIFO memory 2, the FIFO
For example, a half-full status signal or the like is output from the memory 2, and the CPU 4 sees such a status signal and reads the run-length data RL from the FIFO memory 2.
Is read and stored in the DRAM buffer 5.

【0022】次に、ランレングス・圧縮符号変換回路6
は、DRAMバッファ5に格納されたランレングスデー
タRLを順次読み出して、MH,MR,MMRのいずれ
か一つの符号化処理を行なう。
Next, the run length / compression code conversion circuit 6
Sequentially reads the run-length data RL stored in the DRAM buffer 5 and performs any one of MH, MR, and MMR encoding processing.

【0023】(1)ランレングス→MH符号化 図16は、ランレングスデータRLからMH符号への変
換処理を示すフローチャートである。先ず、EOL符号
処理により、EOL符号を生成する(S1)。続いて、
ランレングスデータRLをDRAMバッファ5からリー
ドし(S2)、図11に示すように、白/黒を示すフラ
グとランレングスとからなるランレングスデータを算出
する。。ランレングスデータが始点と終点の位置を示す
データで構成されている場合には、終点位置から始点位
置を差し引いてランレングスを算出する(S3)。
(1) Run Length → MH Coding FIG. 16 is a flowchart showing a process of converting the run length data RL to the MH code. First, an EOL code is generated by the EOL code processing (S1). continue,
The run-length data RL is read from the DRAM buffer 5 (S2), and as shown in FIG. 11, run-length data including a flag indicating white / black and a run length is calculated. . If the run length data is composed of data indicating the positions of the start point and the end point, the run length is calculated by subtracting the start point position from the end point position (S3).

【0024】次に、得られたランレングスデータからコ
ード変換テーブル21をアクセスするためのアドレスを
アドレス発生部24で生成する(S4)。アドレスは、
例えば図12に示すように、コード変換テーブル21の
RL・MH変換コードが格納されている領域を示す固定
番地と、白/黒の判別フラグと、下位アドレスYとによ
り構成される。即ち、アドレス発生部24では、図14
に示すように、符号化しようとしているランレングスと
2560とを比較回路31で比較して、ランレングスが
2560を超える場合には、選択回路32で2560を
選択し、ランレングスが2560以下の場合には、選択
回路32でランレングスデータRLを選択する。その選
択結果Yと固定番地と白黒の判別フラグとがアドレス構
成回路33によって合成されてアドレスADRが生成さ
れる。
Next, an address for accessing the code conversion table 21 is generated by the address generator 24 from the obtained run-length data (S4). The address is
For example, as shown in FIG. 12, the code conversion table 21 includes a fixed address indicating an area in which the RL / MH conversion code is stored, a white / black discrimination flag, and a lower address Y. That is, in the address generation unit 24, FIG.
As shown in (2), the run length to be encoded is compared with 2560 by a comparison circuit 31. If the run length exceeds 2560, 2560 is selected by the selection circuit 32 and the run length is 2560 or less. , The selection circuit 32 selects the run-length data RL. The address ADR is generated by combining the selection result Y, the fixed address, and the black / white determination flag by the address configuration circuit 33.

【0025】アドレス発生部24で生成されたアドレス
ADRは、内部アドレスバス25を介してコード変換テ
ーブル21に与えられる。これによりコード変換テーブ
ル21からコードデータCDAが読み出される(S
5)。コードデータCDAは、図13に示すように、メ
ークアップ符号/ターミネイティング符号の識別符号I
と、可変長符号化パターンの符号化ビット数eと、符号
化パターンCと、符号化パターンCで示されるランの長
さdとから構成される。
The address ADR generated by the address generator 24 is provided to the code conversion table 21 via the internal address bus 25. As a result, the code data CDA is read from the code conversion table 21 (S
5). As shown in FIG. 13, the code data CDA has an identification code I of a makeup code / terminating code.
, A coding length e of the variable length coding pattern, a coding pattern C, and a run length d indicated by the coding pattern C.

【0026】コード変換テーブル21から読み出された
コードデータCDAは、内部データバス26を介してデ
ータ演算回路23に入力される。データ演算回路23
は、例えば図15に示すように構成されている。符号化
パターンCはシフトレジスタ41にセットされ、符号化
ビット数eはカウンタ42にセットされる。MH変換コ
ードは、可変長コードであるから、コード出力時のビッ
ト数を統一するため、シフトレジスタ41にセットされ
た符号化パターンを1ビットずつシフトしながらシフト
レジスタ43にデータを詰めていき(S6)、シフトレ
ジスタ43に16ビットのデータが貯まったら(カウン
タ44の出力dcが16になったら)、16ビットずつ
MHデータ符号をDRAMバッファ5に書き込む(S
7,S8)。
The code data CDA read from the code conversion table 21 is input to the data operation circuit 23 via the internal data bus 26. Data operation circuit 23
Is configured, for example, as shown in FIG. The coding pattern C is set in the shift register 41, and the coding bit number e is set in the counter. Since the MH conversion code is a variable-length code, data is packed in the shift register 43 while shifting the encoding pattern set in the shift register 41 bit by bit in order to unify the number of bits at the time of code output. S6) When 16-bit data is accumulated in the shift register 43 (when the output dc of the counter 44 becomes 16), the MH data code is written into the DRAM buffer 5 in 16-bit units (S6).
7, S8).

【0027】一方、このシフト動作の過程で、符号化ビ
ット数eが0になったら(S9)、メークアップ符号と
ターミネイティング符号の識別符号Iを判定する(S1
0)。識別符号Iがターミネイティング符号を示してい
る場合には、次のランレングスデータRLをリードして
(S2)、そのランレングスデータについて同様の処理
を実行する(S3〜S10)。また、識別符号Iがメー
クアップ符号を示している場合には、与えられたランレ
ングスデータRL又は直前のコードリードによって得ら
れたランレングスdから今回得られたランレングスdを
減算器45で減算し、これを次の符号化すべきランレン
グスdとして出力する(S3)。このランレングスdも
図14の比較回路31に供給されて、次のアドレスの生
成に供される。これにより、次にアクセスすべきアドレ
スの生成が容易になるという利点がある。この処理は識
別符号Iがターミネイティング符号を示すようになるま
で繰り返される。
On the other hand, if the number of coded bits e becomes 0 in the course of this shift operation (S9), the identification code I of the makeup code and the terminating code is determined (S1).
0). If the identification code I indicates the terminating code, the next run-length data RL is read (S2), and the same processing is executed for the run-length data (S3 to S10). When the identification code I indicates a make-up code, the run length d obtained this time is subtracted by the subtractor 45 from the given run length data RL or the run length d obtained by the immediately preceding code read. This is output as the run length d to be encoded next (S3). This run length d is also supplied to the comparison circuit 31 in FIG. 14 and is used for generating the next address. Thereby, there is an advantage that generation of an address to be accessed next becomes easy. This process is repeated until the identification code I indicates the terminating code.

【0028】1ライン分の処理が終了したら、次のライ
ンについてステップS1〜S10の処理を実行する(S
11,S12)。1ページ分の処理が終了したら、RT
C符号を発生させる(S13)。以上の操作により、ラ
ンレングスデータRLを一次元符号化することができ
る。
When the processing for one line is completed, the processing of steps S1 to S10 is executed for the next line (S10).
11, S12). When processing for one page is completed, RT
A C code is generated (S13). Through the above operation, the run-length data RL can be one-dimensionally encoded.

【0029】(2)ランレングス→MR符号化 図17及び図18は、ランレングスデータRLからMH
符号への変換処理を示すフローチャートである。先ず、
1ライン目のデータであるかどうかに基づき、ランレン
グスデータを一次元符号化するか二次元符号化するかを
判別する(S21)。また、このとき同時に、参照すべ
きラインのデータをSRAMからなる参照ラインデータ
記憶部22に書き込んでおく。
(2) Run Length → MR Coding FIGS. 17 and 18 show the case where the run length data RL to MH
It is a flowchart which shows the conversion process to a code. First,
Whether the run-length data is one-dimensionally encoded or two-dimensionally encoded is determined based on whether the data is the data of the first line (S21). At this time, the data of the line to be referred to is simultaneously written in the reference line data storage unit 22 composed of the SRAM.

【0030】一次元符号化する場合には(S22)、前
述したMH符号化処理と同様の処理を実行する(S23
〜S33)。このとき、EOL符号処理(S23)で
は、EOL符号の直後にタグビットとして「1」を付加
する。二次元符号化する場合には(S22)、EOL符
号処理(S41)においてEOL符号の直後にタグビッ
トとして「0」を付加する。続いて参照ラインデータ記
憶部22から参照ラインのデータをリードし(S4
2)、DRAMバッファ5から変換すべき符号化ライン
のランレングスデータRLをリードする(S43)。そ
して、ランレングス・二次元符号変換処理を実行する
(S44)。
When performing one-dimensional encoding (S22), the same processing as the MH encoding processing described above is executed (S23).
To S33). At this time, in the EOL code processing (S23), “1” is added as a tag bit immediately after the EOL code. When performing two-dimensional encoding (S22), “0” is added as a tag bit immediately after the EOL code in the EOL code processing (S41). Subsequently, the data of the reference line is read from the reference line data storage unit 22 (S4).
2) Read the run-length data RL of the encoding line to be converted from the DRAM buffer 5 (S43). Then, a run-length / two-dimensional code conversion process is executed (S44).

【0031】図20は、ランレングス・二次元符号変換
処理の詳細を示すフローチャートである。先ず、参照ラ
インと符号化ラインの着目すべき画素a0,a1,a
2,b1,b2の相互の位置関係から、パスモード、垂
直モード及び水平モードの判別処理を行なう(S6
1)。この判別結果に基づき、データ演算回路23では
図8に示す二次元符号コードを図15に示すシフトレジ
スタ41にセットする(S62)。MH符号化と同様
に、MR変換コードも可変長コードであるから、出力時
のビット数を16ビットに統一するため、データをシフ
トし(S71)、16ビットずつMR符号をDRAMバ
ッファ5に書き込む(S64,S65)。一方、このシ
フト動作の過程で、符号化ビット数eが0になったら、
現在のモードが水平モードでない場合には、ランレング
ス・二次元符号化変換処理を終了する(S66,S6
7)。現在のモードが水平モードである場合には、デー
タ演算回路23においてa0,a1間のランレングスを
算出し、前述したMH符号化処理を実行する(S68〜
S75)。a1,a2間のランレングスについても同様
のMH符号化処理を実行する(S77)。
FIG. 20 is a flowchart showing details of the run-length / two-dimensional code conversion process. First, noticeable pixels a0, a1, a of the reference line and the encoding line
The pass mode, the vertical mode, and the horizontal mode are discriminated from the mutual positional relationship between S2, b1, and b2 (S6).
1). Based on this determination result, the data operation circuit 23 sets the two-dimensional code shown in FIG. 8 in the shift register 41 shown in FIG. 15 (S62). Like the MH encoding, the MR conversion code is also a variable length code, so that the data is shifted (S71) and the MR code is written to the DRAM buffer 5 by 16 bits in order to unify the number of bits at output to 16 bits. (S64, S65). On the other hand, if the number of encoded bits e becomes 0 in the course of this shift operation,
If the current mode is not the horizontal mode, the run-length / two-dimensional encoding conversion process ends (S66, S6).
7). If the current mode is the horizontal mode, the data arithmetic circuit 23 calculates the run length between a0 and a1, and executes the MH encoding process described above (S68 to S68).
S75). The same MH encoding process is executed for the run length between a1 and a2 (S77).

【0032】1ライン分の処理が終了したら、次のライ
ンについてステップS42〜S44の処理を実行する
(S45)。1ページ分の処理が終了したら、RTC符
号を発生させる(S47)。以上の操作により、ランレ
ングスデータRLをMR符号化することができる。
When the processing for one line is completed, the processing of steps S42 to S44 is executed for the next line (S45). When the processing for one page is completed, an RTC code is generated (S47). Through the above operation, the run-length data RL can be MR-encoded.

【0033】(3)ランレングス→MMR符号化 図19は、ランレングスデータRLからMMR符号への
変換処理を示すフローチャートである。MMR符号化の
場合、MR符号化処理における二次元変換処理の部分の
みが行なわれるので(S51〜S58)、その詳細につ
いては割愛する。
(3) Run Length → MMR Encoding FIG. 19 is a flowchart showing a process of converting the run length data RL into the MMR code. In the case of the MMR encoding, only the part of the two-dimensional conversion processing in the MR encoding processing is performed (S51 to S58), and thus the details thereof are omitted.

【0034】このようにして、DRAMバッファ5に格
納された圧縮符号化データは、CPU4により逐次読み
出され、SCSIインタフェース7を介してホストコン
ピュータ等に転送される。
The compression encoded data stored in the DRAM buffer 5 is sequentially read out by the CPU 4 and transferred to a host computer or the like via the SCSI interface 7.

【0035】このように、本実施例の装置によれば、ス
キャナから供給されたビットマップデータをランレング
ス変換回路1で一旦ランレングスデータに圧縮したうえ
で、その後の処理を行なうようにしているから、FIF
Oバッファ2として大容量のものを必要とせず、また、
DRAMバッファ5もランレングスデータ及び圧縮符号
データを格納するだけのものであるから、大きな容量を
必要としない。このため、A0,A1サイズの図面に対
しても十分に対処可能である。しかも、本装置では、ラ
ンレングス単位でデータが転送されるので、データの転
送頻度がビットマップデータを転送する場合に比べて少
ない。このため、CPU4の負担も大幅に軽減されるこ
とになる。
As described above, according to the apparatus of this embodiment, the bitmap data supplied from the scanner is once compressed into run-length data by the run-length conversion circuit 1, and then the subsequent processing is performed. From, FIF
It does not require a large-capacity O-buffer 2 and
Since the DRAM buffer 5 also only stores run-length data and compression code data, a large capacity is not required. Therefore, it is possible to sufficiently cope with A0 and A1 size drawings. Moreover, in the present apparatus, since data is transferred in run-length units, the data transfer frequency is lower than in the case of transferring bitmap data. For this reason, the load on the CPU 4 is greatly reduced.

【0036】また、本実施例の装置によれば、ランレン
グスデータから直接MH,MR,MMR符号に変換する
ようにしているので、ビットマップデータでしか受け付
けない従来の圧縮伸長プロセッサを使用する場合に比
べ、変換処理が一段省け、処理が簡単になるとともに回
路構成が簡単になる。
Further, according to the apparatus of this embodiment, since the run-length data is directly converted into MH, MR, and MMR codes, a conventional compression / decompression processor which accepts only bitmap data is used. In comparison with the above, the conversion process can be omitted by one step, the process can be simplified, and the circuit configuration can be simplified.

【0037】なお、本発明は上述した実施例に限定され
るものではない。上記実施例では、変換された圧縮符号
データをDRAMバッファ5に書き込むようにしたが、
ランレングス・圧縮符号変換回路6から出力される圧縮
符号データをFIFOバッファに格納したり、インタフ
ェース回路を介して外部に順次出力するようにしてもよ
い。
The present invention is not limited to the embodiment described above. In the above embodiment, the converted compressed code data is written to the DRAM buffer 5.
The compression code data output from the run-length / compression code conversion circuit 6 may be stored in a FIFO buffer, or may be sequentially output to the outside via an interface circuit.

【0038】[0038]

【発明の効果】以上述べたように、本発明によれば、ス
キャナから供給されたビットマップデータをランレング
スデータに圧縮したうえで、バッファリングし、その後
の処理を行なうようにしているから、大容量のバッファ
を必要とすることがない。しかも、本発明によれば、ラ
ンレングス単位でバッファリングが行なわれるので、デ
ータの転送頻度がビットマップデータを転送する場合に
比べて少ない。このため、ランレングス・圧縮符号変換
手段の処理能力に合わせてデータの転送を行なうことが
でき、処理効率が向上して高速処理が可能になる。
As described above, according to the present invention, the bitmap data supplied from the scanner is compressed into run-length data, buffered, and the subsequent processing is performed. There is no need for a large buffer. Moreover, according to the present invention, the buffering is performed in units of run length, so that the data transfer frequency is lower than in the case of transferring bitmap data. For this reason, data can be transferred in accordance with the processing capacity of the run-length / compression code conversion means, and the processing efficiency is improved to enable high-speed processing.

【0039】また、本発明によれば、ランレングスデー
タから一旦ビットマップデータに変換することなくテー
ブルルックアップ方式により、圧縮符号を直接求めるこ
とができるので、ランレングス・ビットマップ変換処理
が不要になり、処理及び変換部の回路を大幅に簡略化す
ることができる。
Further, according to the present invention, the compression code can be directly obtained by the table look-up method without temporarily converting the run-length data into bitmap data, so that the run-length / bitmap conversion processing is unnecessary. Therefore, the circuit of the processing and conversion unit can be greatly simplified.

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

【図1】 本発明をファクシミリ装置の画像圧縮符号化
装置に適用した実施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment in which the present invention is applied to an image compression encoding apparatus of a facsimile apparatus.

【図2】 同装置におけるランレングス・圧縮符号変換
回路の更に詳細な構成を示すブロック図である。
FIG. 2 is a block diagram showing a more detailed configuration of a run-length / compression code conversion circuit in the device.

【図3】 MH符号化方式のデータフォーマットを示す
図である。
FIG. 3 is a diagram showing a data format of the MH encoding method.

【図4】 MH符号化方式におけるターミネイティング
符号を示す図である。
FIG. 4 is a diagram showing a terminating code in the MH encoding method.

【図5】 MH符号化方式におけるメークアップ符号を
示す図である。
FIG. 5 is a diagram illustrating a make-up code in the MH coding method.

【図6】 MH符号化方式におけるメークアップ符号を
示す図である。
FIG. 6 is a diagram showing a make-up code in the MH coding method.

【図7】 MR符号化方式における3つのモードを説明
するための図である。
FIG. 7 is a diagram for explaining three modes in the MR encoding method.

【図8】 MR符号化方式における変換コードを示す図
である。
FIG. 8 is a diagram showing a conversion code in the MR encoding method.

【図9】 スキャナからの画像データの一例を示す図で
ある。
FIG. 9 is a diagram illustrating an example of image data from a scanner.

【図10】 同画像データから変換されたランレングス
データを示す図である。
FIG. 10 is a diagram showing run-length data converted from the image data.

【図11】 同ランレングスデータから算出されたラン
レングスを示す図である。
FIG. 11 is a diagram showing run lengths calculated from the run length data.

【図12】 図2のアドレス発生部で生成されるアドレ
スのフォーマットを示す図である。
FIG. 12 is a diagram showing a format of an address generated by an address generator of FIG. 2;

【図13】 図2のコード変換テーブルから出力される
コードデータのフォーマットを示す図である。
FIG. 13 is a diagram showing a format of code data output from the code conversion table of FIG. 2;

【図14】 同アドレス発生部の要部構成を示すブロッ
ク図である。
FIG. 14 is a block diagram showing a main configuration of the address generation unit.

【図15】 図2のデータ演算回路の一部の構成を示す
ブロック図である。
FIG. 15 is a block diagram showing a configuration of a part of the data operation circuit of FIG. 2;

【図16】 ランレングス・MH符号変換手順を示すフ
ローチャートである。
FIG. 16 is a flowchart showing a run-length / MH code conversion procedure.

【図17】 ランレングス・MR符号変換手順の前半を
示すフローチャートである。
FIG. 17 is a flowchart showing the first half of a run-length / MR code conversion procedure.

【図18】 ランレングス・MR符号変換手順の後半を
示すフローチャートである。
FIG. 18 is a flowchart showing the latter half of the run-length / MR code conversion procedure.

【図19】 ランレングス・MMR符号変換手順を示す
フローチャートである。
FIG. 19 is a flowchart showing a run-length / MMR code conversion procedure.

【図20】 図17及び図19におけるランレングス・
二次元符号変換処理の詳細を示すフローチャートであ
る。
FIG. 20 shows run lengths in FIGS. 17 and 19;
It is a flowchart which shows the detail of a two-dimensional code conversion process.

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

1…ランレングス変換回路、2…FIFOメモリ、3…
CPUバス、4…CPU、5…DRAMバッファ、6…
ランレングス・圧縮符号変換回路、7…SCSIインタ
フェース、21…コード変換テーブル、22…参照ライ
ンデータ記憶部、23…データ演算回路、24…アドレ
ス発生部、25…内部アドレスバス、26…内部データ
バス。
1. Run length conversion circuit 2. FIFO memory 3.
CPU bus, 4 CPU, 5 DRAM buffer, 6 CPU
Run length / compression code conversion circuit, 7 SCSI interface, 21 code conversion table, 22 reference line data storage unit, 23 data operation circuit, 24 address generation unit, 25 internal address bus, 26 internal data bus .

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/41 - 1/419 G06T 9/00 H03M 7/46 - 7/48 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) H04N 1/41-1/419 G06T 9/00 H03M 7/46-7/48

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 スキャナから出力されるビットマップデ
ータを順次ランレングスデータに変換するランレングス
変換手段と、 このランレングス変換手段で変換されたランレングスデ
ータを順次格納するバッファ回路と、 このバッファ回路を介して与えられるランレングスデー
タを順次圧縮符号化するランレングス・圧縮符号変換手
段とを具備し、 前記ランレングス・圧縮符号変換手段は、 ランレングスデータを圧縮符号化パターンに変換するコ
ード変換テーブルと、 与えられたランレングスデータに基づいて前記コード変
換テーブルをアクセスするためのアドレスを生成するア
ドレス発生手段とを備えたものであり、 前記コード変換テーブルは、ランレングスデータをモデ
ィファイド・ホフマン符号に変換するテーブルであり、
その出力は、メークアップ符号とターミネイティング符
号とを識別する識別符号と、符号化ビット数と、符号化
パターンと、この符号化パターンに対応するランレング
スとにより構成され、 前記アドレス発生手段は、前記コード変換テーブルから
出力される前記識別符号が前記ターミネイティング符号
を示すようになるまで、前記与えられたランレングスデ
ータから前記符号化パターンに対応するランレングスを
順次減算することによって前記コード変換テーブルのア
ドレスを生成するものであ ることを特徴とする画像圧縮
符号化装置。
1. A run-length converting means for sequentially converting bitmap data output from a scanner into run-length data; a buffer circuit for sequentially storing the run-length data converted by the run-length converting means; Run-length / compression code conversion means for sequentially compressing and encoding run-length data given via the CPU, wherein the run-length / compression code conversion means converts the run-length data into a compression coding pattern. If, der that and an address generating means for generating an address for accessing said code conversion table on the basis of the run given length data is, the code conversion table, the run-length data model
Is a table to be converted into a modified Huffman code,
Its output is the makeup code and the terminating code.
Code, the number of coded bits,
The pattern and the run length corresponding to this encoded pattern
And the address generating means is configured to read the address from the code conversion table.
The output identification code is the terminating code.
Until it shows the run-length
The run length corresponding to the coding pattern from the data
By sequentially subtracting, the code conversion table
Image compression coding apparatus according to claim der Rukoto thereby generating a dress.
【請求項2】 前記バッファ回路に格納されたランレン
グスデータを順次記憶するメモリを更に備えたことを特
徴とする請求項1記載の画像圧縮符号化装置。
2. A method according to claim 1 Symbol placement picture compression encoding apparatus and further comprising a memory for sequentially storing the run length data stored in the buffer circuit.
【請求項3】 前記メモリは、前記ランレングス・圧縮
符号変換手段で変換された圧縮データが順次格納される
ものであることを特徴とする請求項記載の画像圧縮符
号化装置。
3. The image compression encoding apparatus according to claim 2 , wherein said memory stores compressed data converted by said run-length / compression code conversion means sequentially.
JP21793891A 1991-08-02 1991-08-02 Image compression coding device Expired - Fee Related JP3159483B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21793891A JP3159483B2 (en) 1991-08-02 1991-08-02 Image compression coding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21793891A JP3159483B2 (en) 1991-08-02 1991-08-02 Image compression coding device

Publications (2)

Publication Number Publication Date
JPH0541808A JPH0541808A (en) 1993-02-19
JP3159483B2 true JP3159483B2 (en) 2001-04-23

Family

ID=16712063

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21793891A Expired - Fee Related JP3159483B2 (en) 1991-08-02 1991-08-02 Image compression coding device

Country Status (1)

Country Link
JP (1) JP3159483B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4223027B2 (en) 2005-06-30 2009-02-12 シャープ株式会社 Image forming apparatus and secret data transmission method

Also Published As

Publication number Publication date
JPH0541808A (en) 1993-02-19

Similar Documents

Publication Publication Date Title
US5309528A (en) Image digitizer including pixel engine
KR100475041B1 (en) Image information high-speed compressing method and real-time moving picture transferring method using the same
US7336302B2 (en) Frame memory device and method with subsampling and read-out of stored signals at lower resolution than that of received image signals
JPH1188700A (en) Coding method of color image signal, and decoding method and color image processor thereof
US6661452B1 (en) Digital camera capable of decreasing a required memory capacity
JP3159483B2 (en) Image compression coding device
JPH10210399A (en) Memory address calculation device and method for block scanning and raster scanning
US5008949A (en) Image processing system
US5159443A (en) Image signal encoding/decoding apparatus and system
JP3218220B2 (en) Image information compression method and image information compression system
US5485535A (en) Data processing system comprising a plurality of data processing apparatus conducting data communications through a bus line
JP2776284B2 (en) Image coding device
JPH10341437A (en) Image processing method and device therefor
JP2984332B2 (en) Image processing device
EP0558292B1 (en) Compression/expansion circuit
JP2663922B2 (en) Video encoding device
JPH0541809A (en) Picture compression coding decoding device
JP2000322566A (en) Image display device and its controlling method
JP2839578B2 (en) Image data input processing device
JPS6339186B2 (en)
JP2841452B2 (en) Image transmission apparatus and image transmission method
JP3233480B2 (en) Image compression / expansion circuit device
JP2821452B2 (en) Color image processing method
JP3075935B2 (en) Still image coding method
JP2792994B2 (en) Line variable coding device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees