JPH0541808A - Picture compression encoder - Google Patents

Picture compression encoder

Info

Publication number
JPH0541808A
JPH0541808A JP21793891A JP21793891A JPH0541808A JP H0541808 A JPH0541808 A JP H0541808A JP 21793891 A JP21793891 A JP 21793891A JP 21793891 A JP21793891 A JP 21793891A JP H0541808 A JPH0541808 A JP H0541808A
Authority
JP
Japan
Prior art keywords
run length
data
code
compression
encoding
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
JP21793891A
Other languages
Japanese (ja)
Other versions
JP3159483B2 (en
Inventor
Hirotaka Okuwaki
裕貴 奥脇
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

Landscapes

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

Abstract

PURPOSE:To realize the picture compression encoder in which the buffer capacity is saved and the picture and the circuit are simplified. CONSTITUTION:Scanner data of bit map form outputted from a picture scanner is given to a run length conversion circuit 1, in which the data is converted into run length data. An output of the run length conversion circuit 1 is sequentially stored in an FIFO memory 2. A CPU 4 reads a run length data stored in the FIFO memory 2 properly and stores the data to a DRAM buffer 5. A run length compression code conversion circuit 6 converts the run length data read sequentially from the DRAM buffer 5 into compression coding data such as MH, MR and MMR under the control of the CPU 4 and stores the result sequentially to the DRAM buffer 5. The compression coding data stored in the DRAM buffer 5 is sent to a host computer (not shown in figure) via an SCSI I/F7 under the control of the CPU 4.

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 coding apparatus for compressing bit map data output from a scanner at high speed in a facsimile machine or the like,
In particular, the present invention relates to an image compression encoding device suitable for high-speed encoding of large-capacity bitmap data.

【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 into MH (modifi).
A compression / expansion processor (hereinafter, referred to as CEP) is used to convert compression-encoded 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 differs depending on the density of the image, and is usually lower than the data output speed from the scanner. is there. Therefore, the conventional image compression encoding device is provided with an input buffer for temporarily storing the bitmap data from the scanner.

【0003】[0003]

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

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

【0005】[0005]

【課題を解決するための手段】本発明に係る画像圧縮符
号化装置は、スキャナから出力されるビットマップデー
タを順次ランレングスデータに変換するランレングス変
換手段と、このランレングス変換手段で変換されたラン
レングスデータを順次格納するバッファ回路と、このバ
ッファ回路を介して与えられるランレングスデータを順
次圧縮符号化するランレングス・圧縮符号変換手段とを
具備し、前記ランレングス・圧縮符号変換手段が、ラン
レングスデータを圧縮符号化パターンに変換するコード
変換テーブルと、与えられたランレングスデータ及び前
記コード変換テーブルの出力に基づいて前記コード変換
テーブルをアクセスするためのアドレスを生成するアド
レス発生手段とを備えたものであることを特徴とする。
An image compression coding apparatus according to the present invention comprises a run length conversion means for sequentially converting bit map data output from a scanner into run length data, and the run length conversion means. The run length / compression code conversion means for sequentially compressing and encoding the run length data given via the buffer circuit, and the run length / compression code conversion means. A code conversion table for converting the run length data into a compression coding pattern, and an address generating means for generating an address for accessing the code conversion table based on the given run length data and the output of the code conversion table. It is characterized by being equipped with.

【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, so that a large capacity buffer is required. There is nothing to do. Moreover, according to the present invention, since the data transfer inside the device is performed in units of run lengths, the data transfer frequency is lower than that in the case of transferring bitmap data. Therefore, by transferring the data in accordance with the processing capacity of the run length / compression code conversion means, the processing efficiency can be improved and high speed processing becomes possible.
Further, according to the present invention, the compression code can be directly obtained by the table lookup method without once converting the run-length data into the bitmap data, so that the run-length bitmap conversion processing becomes unnecessary, Also, the circuit of the conversion unit can be greatly simplified.

【0007】なお、ランレングス・圧縮符号変換手段と
してMH符号のコード変換テーブルを備えた場合、テー
ブルから出力される符号化パターンのランレングスをテ
ーブル出力として含ませておくようにすると、次にアク
セスすべきアドレスの生成が容易になる。
When a code conversion table for MH codes 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 the table output, the next access is made. It becomes easy to generate an address to be used.

【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 coding apparatus of a facsimile machine.

【0009】密着型ラインイメージセンサ等からなる画
像スキャナから出力されたビットマップ形式のスキャナ
データは、ランレングス変換回路1に逐次入力されてい
る。ランレングス変換回路1は、入力されたスキャナデ
ータをランレングスデータに変換する。このランレング
ス変換回路1の出力は、FIFO(First in First ou
t)メモリ2に順次格納されるようになっている。FI
FOメモリ2の出力側は、CPUバス3に接続されてい
る。
The scanner data in the bitmap format output from the image scanner including the contact type line image sensor is sequentially input to the run length conversion circuit 1. The run length conversion circuit 1 converts the input scanner data into run length data. The output of the run length conversion circuit 1 is a FIFO (First in First Out).
t) 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の制御のもとに図示しない
ホストコンピュータに伝送するようになっている。
The CPU bus 3 has a CPU 4 and a DR.
The AM buffer 5 is connected. The CPU 4 controls the entire apparatus, and appropriately reads the run length data stored in the FIFO memory 2 and sequentially stores it 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 outputs to the DRAM buffer 5. Store. The CPU bus 3 has a SCSI interface circuit 7
Are connected, and the compression-encoded data stored in the DRAM buffer 5 is transmitted 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 them. 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 code. The reference line data storage unit 22 is composed of an SRAM that stores reference lines when performing MR and MMR encoding. In addition, the data operation unit 23 operates the data output from the code conversion table 21 to generate 16-bit output data, and executes an operation 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, before describing 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 scanning lines is one-dimensionally coded. As shown in FIG. 3, the encoded data of one line consists of an EOL (End of line) code added to the beginning and a data code that follows it. RTC consisting of 6 consecutive EOL codes after the last line of one page
A code is added. The EOL code is a 12-bit code represented by "000000000001". Further, as shown in FIG. 3, when the code bit number of one line is shorter than a predetermined bit length T, the 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 coding 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, the line immediately before the currently encoded line is referred to and the positional relationship between the reference line and the changed pixel (pixel that changes from black to white or from white to black) is encoded. Turn into. That is, as shown in FIG. 7, a0, a0 ', a1, a2, b1, b2 are determined as follows.

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

【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 into "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 between a1 and a2 | a1
When a2 | is 3 or less, the vertical mode is set. In this case, according to the relative distance between a1 and a2, V 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 the relative distance is shown in parentheses.

【0018】水平モード 図7(c)に示すように、a1とa2の相対距離|a1
a2|が4以上のときには、水平モードとなる。この場
合、図8に示すように、「001 」にa0a2の長さをM
H符号化したものとa2b2の長さをMH符号化したも
のとを結合した値に符号化される。MR符号化では、一
次元符号化処理と二次元符号化処理とが混在するので、
EOL符号の直後にタグビットを設け、後続するデータ
が一次元符号化されたものであるか、二次元符号化され
たものであるかを識別するようにしている。
Horizontal mode As shown in FIG. 7 (c), the relative distance between a1 and a2 | a1
When a2 | is 4 or more, the horizontal mode is set. In this case, as shown in FIG. 8, the length of a0a2 is set to "001" by M.
It is encoded into a value obtained by combining the H-encoded one and the MH-encoded a2b2 length. In MR encoding, one-dimensional encoding processing and two-dimensional encoding processing coexist, so
A tag bit is provided immediately after the EOL code to identify whether the following 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 scanning lines are two-dimensionally coded. When encoding the first line, a virtual all-white line is set as a reference line. In the last line of one page, two EOL codes are consecutively added as RTC codes, and thereafter, an adjustment bit (0) is added so that the number of bits of code data for one page is in units of 8 bits. Add.

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

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

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

【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 conversion process from run length data RL to MH code. First, the 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 composed of a flag indicating white / black and a run length is calculated. .. When the run length data is composed of data indicating the positions of the start point and the end point, the start point position is subtracted from the end point position to calculate the run length (S3).

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

【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 given 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). The code data CDA is, as shown in FIG. 13, an identification code I of a makeup code / terminating code.
And the number of coding bits e of the variable length coding pattern, the coding pattern C, and the run length d shown 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 as shown in FIG. 15, for example. The coding pattern C is set in the shift register 41, and the coding bit number e is set in the counter 42. Since the MH conversion code is a variable length code, in order to unify the number of bits at the time of code output, data is packed in the shift register 43 while shifting the coding pattern set in the shift register 41 bit by bit ( S16) When 16-bit data is stored in the shift register 43 (when the output dc of the counter 44 reaches 16), the MH data code is written in 16-bit units in the DRAM buffer 5 (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, in the process of this shift operation, when the number of encoded bits e becomes 0 (S9), the identification code I of the make-up code and the terminating code is determined (S1).
0). If the identification code I indicates a terminating code, the next run length data RL is read (S2), and the same processing is executed for that run length data (S3 to S10). When the identification code I indicates a make-up code, the subtracter 45 subtracts the run length d obtained this time from the given run length data RL or the run length d obtained by the immediately preceding code read. Then, 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 of FIG. 14 and is used for generation of the next address. This has the advantage of facilitating the generation of the address to be accessed next. This process is repeated until the identification code I shows 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 (S).
11, S12). After processing one page, RT
A C code is generated (S13). By 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 FIG. 17 and FIG. 18 show run length data RL to MH.
It is a flowchart which shows the conversion process to a code. First,
It is determined whether the run length data is one-dimensionally encoded or two-dimensionally encoded based on whether or not it is the data of the first line (S21). At the same time, the data of the line to be referenced is written in the reference line data storage unit 22 composed of 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 above-mentioned MH encoding processing is executed (S23).
~ 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 coding (S22), "0" is added as a tag bit immediately after the EOL code in the EOL coding process (S41). Then, the reference line data 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, the run length / two-dimensional code conversion processing 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 processing. First, the pixels a0, a1, and a on the reference line and the encoding line that should be noted
The pass mode, the vertical mode, and the horizontal mode are discriminated from the mutual positional relationship between 2, 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). Similar to the MH encoding, the MR conversion code is also a variable length code. Therefore, in order to unify the number of bits at the time of output to 16 bits, the data is shifted (S71) and the MR code is written to the DRAM buffer 5 by 16 bits. (S64, S65). On the other hand, if the number of encoded bits e becomes 0 in the process of this shift operation,
If the current mode is not the horizontal mode, the run length / two-dimensional encoding conversion process is terminated (S66, S6).
7). When 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-).
S75). Similar MH encoding processing 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, the RTC code is generated (S47). With the above operation, the run length data RL can be MR-coded.

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

【0034】このようにして、DRAMバッファ5に格
納された圧縮符号化データは、CPU4により逐次読み
出され、SCSIインタフェース7を介してホストコン
ピュータ等に転送される。
In this way, the compression encoded data stored in the DRAM buffer 5 is sequentially read by the CPU 4 and transferred to the 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 run-length conversion circuit 1 temporarily compresses the bitmap data supplied from the scanner into run-length data, and then performs the subsequent processing. 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 compressed code data, it does not require a large capacity. Therefore, it is possible to sufficiently deal with A0 and A1 size drawings. Moreover, in this device, since data is transferred in run length units, the frequency of data transfer is lower than that in the case of transferring bitmap data. Therefore, the load on the CPU 4 is also significantly reduced.

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

【0037】なお、本発明は上述した実施例に限定され
るものではない。上記実施例では、変換された圧縮符号
データをDRAMバッファ5に書き込むようにしたが、
ランレングス・圧縮符号変換回路6から出力される圧縮
符号データをFIFOバッファに格納したり、インタフ
ェース回路を介して外部に順次出力するようにしてもよ
い。
The present invention is not limited to the above embodiment. In the above embodiment, the converted compressed code data is written in the DRAM buffer 5, but
The compressed code data output from the run length / compressed code conversion circuit 6 may be stored in the FIFO buffer or may be sequentially output to the outside via the 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. No need for large buffers. Moreover, according to the present invention, since buffering is performed in units of run lengths, the data transfer frequency is lower than that in the case of transferring bitmap data. Therefore, data can be transferred according to the processing capability of the run length / compression code conversion means, the processing efficiency is improved, and high-speed processing is possible.

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

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

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

【図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 an MH encoding method.

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

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

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

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

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

【図9】 スキャナからの画像データの一例を示す図で
ある。
FIG. 9 is a diagram showing 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 a run length calculated from the same run length data.

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

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

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

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

【図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 the 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 the run lengths in FIGS. 17 and 19.
It is a flow chart which shows the details of two-dimensional code conversion processing.

【符号の説明】[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 ...
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 ..

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 スキャナから出力されるビットマップデ
ータを順次ランレングスデータに変換するランレングス
変換手段と、このランレングス変換手段で変換されたラ
ンレングスデータを順次格納するバッファ回路と、この
バッファ回路を介して与えられるランレングスデータを
順次圧縮符号化するランレングス・圧縮符号変換手段と
を具備し、前記ランレングス・圧縮符号変換手段は、ラ
ンレングスデータを圧縮符号化パターンに変換するコー
ド変換テーブルと、与えられたランレングスデータ及び
前記コード変換テーブルの出力に基づいて前記コード変
換テーブルをアクセスするためのアドレスを生成するア
ドレス発生手段とを備えたものであることを特徴とする
画像圧縮符号化装置。
1. A run length conversion means for sequentially converting bit map data output from a scanner into run length data, a buffer circuit for sequentially storing the run length data converted by the run length conversion means, and this buffer circuit. Run length / compression code conversion means for sequentially compressing and encoding run length data given via the run length / compression code conversion means, wherein the run length / compression code conversion means converts the run length data into a compression encoding pattern. And an address generating means for generating an address for accessing the code conversion table based on given run length data and the output of the code conversion table. apparatus.
【請求項2】 前記コード変換テーブルは、ランレング
スデータをモディファイド・ホフマン符号に変換するテ
ーブルであり、その出力は、メークアップ符号とターミ
ネイティング符号とを識別する識別符号と、符号化ビッ
ト数と、符号化パターンと、この符号化パターンに対応
するランレングスとにより構成され、前記アドレス発生
手段は、前記コード変換テーブルから出力される前記識
別符号が前記ターミネイティング符号を示すようになる
まで、前記与えられたランレングスデータから前記符号
化パターンに対応するランレングスを順次減算すること
によって前記コード変換テーブルのアドレスを生成する
ものであることを特徴とする請求項1記載の画像圧縮符
号化装置。
2. The code conversion table is a table for converting run-length data into a modified Hoffman code, and an output thereof is an identification code for identifying a makeup code and a terminating code, and a coded bit number. , An encoding pattern and a run length corresponding to the encoding pattern, and the address generating means stores the identification code until the identification code output from the code conversion table indicates the terminating code. 2. The image compression encoding apparatus according to claim 1, wherein the run length corresponding to the encoding pattern is sequentially subtracted from the given run length data to generate the address of the code conversion table.
【請求項3】 前記バッファ回路に格納されたランレン
グスデータを順次記憶するメモリを更に備えたことを特
徴とする請求項1又は2記載の画像圧縮符号化装置。
3. The image compression encoding apparatus according to claim 1, further comprising a memory that sequentially stores the run length data stored in the buffer circuit.
【請求項4】 前記メモリは、前記ランレングス・圧縮
符号変換手段で変換された圧縮符号データが順次格納さ
れるものであることを特徴とする請求項3記載の画像圧
縮符号化装置。
4. The image compression encoding apparatus according to claim 3, wherein the memory sequentially stores the compression encoded data converted by the run length / compression encoding conversion means.
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 true JPH0541808A (en) 1993-02-19
JP3159483B2 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7847965B2 (en) 2005-06-30 2010-12-07 Sharp Kabushiki Kaisha Image forming apparatus and confidential data transmitting method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7847965B2 (en) 2005-06-30 2010-12-07 Sharp Kabushiki Kaisha Image forming apparatus and confidential data transmitting method

Also Published As

Publication number Publication date
JP3159483B2 (en) 2001-04-23

Similar Documents

Publication Publication Date Title
US5402248A (en) Image encoding apparatus and method
US5309528A (en) Image digitizer including pixel engine
US7336302B2 (en) Frame memory device and method with subsampling and read-out of stored signals at lower resolution than that of received image signals
US5579412A (en) Image processing apparatus
US5008949A (en) Image processing system
JP3159483B2 (en) Image compression coding device
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
JPH0541809A (en) Picture compression coding decoding device
EP0558292B1 (en) Compression/expansion circuit
JP2984332B2 (en) Image processing device
JPH04322384A (en) Method and device for storing picture data
JPS6339186B2 (en)
JP2792994B2 (en) Line variable coding device
JP2566905B2 (en) Image transmission method
JP3053191B2 (en) Image compression coding device
JP3230551B2 (en) Image processing apparatus and method
JPH0487472A (en) Picture processing unit
JPH0494267A (en) Mr decoder
JPS62144282A (en) Picture processor
JPH10224617A (en) Image processing unit
JPH02135871A (en) Facsimile equipment
JPH04192674A (en) Image restoring device
JPS6051072A (en) Picture processing method

Legal Events

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