JPH07236065A - Binary picture compression device - Google Patents

Binary picture compression device

Info

Publication number
JPH07236065A
JPH07236065A JP26252094A JP26252094A JPH07236065A JP H07236065 A JPH07236065 A JP H07236065A JP 26252094 A JP26252094 A JP 26252094A JP 26252094 A JP26252094 A JP 26252094A JP H07236065 A JPH07236065 A JP H07236065A
Authority
JP
Japan
Prior art keywords
pixel
bit
continuous
output
coincidence
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.)
Pending
Application number
JP26252094A
Other languages
Japanese (ja)
Inventor
Yoshiyasu Okamura
好容 岡村
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP26252094A priority Critical patent/JPH07236065A/en
Publication of JPH07236065A publication Critical patent/JPH07236065A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To provide a binary picture compression device capable of performing a high-speed processing by shortening the count time and the coincidence detection time of the picture elements of picture data to be encoded. CONSTITUTION:This device is provided with a picture element detection part 24 for inputting the picture data for prescribed bits and outputting the continuous picture element number of the same color picture elements, a burrel shifter 23 and a noncoincidence detection part 32 for detecting the continuous picture element number of a different picture element color from a position shifted for the bits of the continuous picture element number outputted from the picture element detection part 24 to a low-order side, counters 27 and 29 for counting the continuous picture element number of the different picture element color detected in the noncoincidence detection part 32, an adder 25 for adding the count value outputted from the counters 27 and 29 and the continuous picture element number outputted from the picture element detection part 24 for the same picture element color and code ROMs 30 and 31 for encoding the added result of the adder 25.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は例えばファクシミリの1
次元符号化等の二値画像圧縮装置に関するものである。
BACKGROUND OF THE INVENTION The present invention relates to, for example, a facsimile 1
The present invention relates to a binary image compression device such as dimensional encoding.

【0002】[0002]

【従来の技術】図10は従来のファクシミリの1次元符
号化時の二値画像圧縮装置を示す。1次元符号化は連続
する同一画素色の数を符号化するものである。即ち、画
像データが書き込まれた画像RAM1から1バイト(8
ビット)分の画像データが読み出されてフリップフロッ
プ(FF)2に出力される。このフリップフロップ2は
画像RAM1から入力された画像データが書き込まれて
保持される。このフリップフロップ2に保持された画像
データはシフトレジスタ3に出力さる。このシフトレジ
スタ3はフリップフロップ2から画像データが入力され
ると共にクロックパルスCLOCKが入力され、画像デ
ータを1ビットづつシフトし画素を1ビットづつ出力す
る。このシフトレジスタ3の出力は不一致検出部4に出
力される。この不一致検出部4は図11に示すように1
ビット前の画素色を記憶するフリップフロップ5と現在
の画素色とフリップフロップ5からの1ビット前の画素
色との一致を検出する恒等回路6より構成される。すな
わち恒等回路6の一方の入力にはシフトレジスタ3のM
SBビット信号が供給され、他方の入力にはフリップフ
ロップ5から出力された1ビット前の信号が供給され
る。したがって、恒等回路6の出力にはMSBビット信
号及び1ビット前の信号が一致しているときハイレベル
が出力される。これにより、現在対象となる画素色の連
続性を検出することができる。前記不一致検出部4の出
力信号はTC(ターミネータコード)カウンタ7の入力
端子enに出力される。このTCカウンタ7はクロック
パルスCLOCKが入力され、不一致検出部4から入力
された出力信号がハイレベルの間クロックパルスをカウ
ントすることにより同色画素の連続画素数を計数する。
前記TCカウンタ7の桁上がり出力端子CAはMC(メ
ークアップコード)カウンタ8の入力端子enに接続さ
れる。このMCカウンタ8にはTCカウンタ7同様クロ
ックパルスCLOCKが入力される。前記TCカウンタ
7の画素数の計数結果は符号ROM(ターミネータコー
ド)9に供給されると共に前記MCカウンタ8の画素数
の計数結果は符号ROM(メークアップコード)10に
供給される。前記符号ROM(ターミネータ)9には画
素数0〜63まで1づつ対応する符号が格納され、前記
符号ROM(メークアップ)10には画素数64〜17
28まで64づつ対応する符号が格納されている。しか
して、不一致検出部4に入力されるシフトレジスタ3の
MSBビット信号と1ビット前の信号とが不一致となる
と、不一致検出部4からローレベルが出力され、前記符
号ROM9,10はそれぞれ対応したカウンタ7,8か
ら入力された画素数の計数結果に該当する符号を出力す
る。
2. Description of the Related Art FIG. 10 shows a conventional binary image compression apparatus for one-dimensional encoding of a facsimile. The one-dimensional encoding encodes the number of consecutive same pixel colors. That is, 1 byte (8 bytes) from the image RAM 1 in which the image data is written.
The image data for (bit) is read and output to the flip-flop (FF) 2. The image data input from the image RAM 1 is written and held in the flip-flop 2. The image data held in the flip-flop 2 is output to the shift register 3. The shift register 3 receives the image data from the flip-flop 2 and the clock pulse CLOCK, shifts the image data bit by bit and outputs the pixels pixel by bit. The output of the shift register 3 is output to the mismatch detection section 4. As shown in FIG.
It is composed of a flip-flop 5 that stores the pixel color before the bit and an identity circuit 6 that detects a match between the current pixel color and the pixel color before the bit from the flip-flop 5. That is, M of the shift register 3 is connected to one input of the identity circuit 6.
The SB bit signal is supplied, and the signal one bit before, which is output from the flip-flop 5, is supplied to the other input. Therefore, a high level is output to the output of the identity circuit 6 when the MSB bit signal and the signal one bit before are in agreement. As a result, the continuity of the currently targeted pixel color can be detected. The output signal of the mismatch detection section 4 is output to the input terminal en of the TC (terminator code) counter 7. The TC counter 7 receives the clock pulse CLOCK and counts the clock pulses while the output signal input from the mismatch detection section 4 is at a high level, thereby counting the number of consecutive pixels of the same color.
The carry output terminal CA of the TC counter 7 is connected to the input terminal en of the MC (makeup code) counter 8. Like the TC counter 7, the clock pulse CLOCK is input to the MC counter 8. The counting result of the pixel number of the TC counter 7 is supplied to a code ROM (terminator code) 9, and the counting result of the pixel number of the MC counter 8 is supplied to a code ROM (makeup code) 10. The code ROM (terminator) 9 stores codes corresponding to the pixel numbers 0 to 63 one by one, and the code ROM (makeup) 10 stores the pixel numbers 64 to 17
Up to 28, 64 corresponding codes are stored. Then, when the MSB bit signal of the shift register 3 input to the mismatch detection unit 4 and the signal one bit before do not match, the mismatch detection unit 4 outputs a low level, and the code ROMs 9 and 10 correspond to each other. A code corresponding to the counting result of the number of pixels input from the counters 7 and 8 is output.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、このよ
うな従来の二値画像圧縮装置では、シフトレジスタにお
いて符号化を行なう画像データのビット数分、画素の一
致検出及びカウントを行なわなければならず(一致検出
を1ビットづつしていたため)、処理時間が長くなると
いう欠点があった。
However, in such a conventional binary image compression apparatus, it is necessary to perform pixel coincidence detection and counting by the number of bits of image data to be encoded in the shift register ( Since the coincidence detection is performed bit by bit), there is a drawback that the processing time becomes long.

【0004】本発明は上記の事情に鑑みてなされたもの
で、符号化を行なう画像データの画素の一致検出時間及
びカウント時間を短縮し、高速処理を可能にし得る二値
画像圧縮装置を提供することを目的とする。
The present invention has been made in view of the above circumstances, and provides a binary image compression apparatus capable of reducing the coincidence detection time and the count time of pixels of image data to be encoded and enabling high-speed processing. The purpose is to

【0005】[0005]

【課題を解決するための手段】上記目的を達成するため
に本発明は、所定ビットの画素データの前回画素との一
致を1ビット毎に検出する一致検出手段と、一致検出手
段の一致出力をカウントするカウント手段と、このカウ
ント手段のカウント値に対応して所定符号を出力する符
号化手段とを有する二値画像圧縮装置において、所定ビ
ットの画素データのうち連続する画素の連続画素数を検
出する連続画素検出手段と、この連続画素検出手段によ
り検出された連続画素数を前記カウント手段のカウント
値に加算する加算手段とを有することを特徴とするもの
である。
In order to achieve the above object, the present invention provides a coincidence detecting means for detecting a coincidence of pixel data of a predetermined bit with a previous pixel for each bit, and a coincidence output of the coincidence detecting means. In a binary image compression apparatus having a counting means for counting and an encoding means for outputting a predetermined code corresponding to the count value of the counting means, the number of continuous pixels of continuous pixels in the pixel data of predetermined bits is detected. It has a continuous pixel detecting means and an adding means for adding the number of continuous pixels detected by the continuous pixel detecting means to the count value of the counting means.

【0006】また、本発明は、所定ビット数の画素デー
タを保持し、所定位置から1ビットづつシフトするシフ
ト手段と、このシフト手段から出力された1ビットの画
素データとこの画素データの1ビット前の画素データと
の一致を検出する一致検出手段と、この一致検出手段に
より検出された一致出力をカウントするカウント手段
と、このカウント手段のカウント値に対応して所定符号
を出力する符号化手段とを有する二値画像圧縮装置にお
いて、所定ビットの画素データのうち連続する画素の連
続画素数を検出する連続画素検出手段と、この連続画素
検出手段により検出された連続画素数を前記カウント手
段のカウント値に加算する加算手段とを有し、前記シフ
ト手段は、前記連続画素検出手段により検出された連続
画素数分前記画素データをシフトすることを特徴とする
ものである。
Further, according to the present invention, a shift means for holding pixel data of a predetermined number of bits and shifting it from a predetermined position by 1 bit, 1-bit pixel data output from the shift means, and 1 bit of this pixel data. A coincidence detecting means for detecting coincidence with the previous pixel data, a counting means for counting the coincidence output detected by the coincidence detecting means, and an encoding means for outputting a predetermined code corresponding to the count value of the counting means. In a binary image compression apparatus having :, a continuous pixel detecting means for detecting the number of continuous pixels of continuous pixels in pixel data of a predetermined bit; and the number of continuous pixels detected by the continuous pixel detecting means of the counting means. Adding means for adding to the count value, wherein the shift means is configured to add the pixel data for the number of continuous pixels detected by the continuous pixel detecting means. It is characterized in that to shift the data.

【0007】また、本発明は、所定ビット数の画素デー
タを保持し、所定位置から1ビットづつシフトするシフ
ト手段と、このシフト手段から出力された1ビットの画
素データとこの画素データの1ビット前の画素データと
の一致を検出する一致検出手段と、この一致検出手段に
より検出された一致出力をカウントするカウント手段
と、このカウント手段のカウント値に対応して所定符号
を出力する符号化手段とを有する二値画像圧縮装置にお
いて、所定ビットの画素データのうち1バイト以上連続
する画素の連続画素数を検出する連続画素検出手段と、
この連続画素検出手段により検出された連続画素数を前
記カウント手段のカウント値に加算する加算手段とを有
し、前記シフト手段は、前記連続画素検出手段により検
出された連続画素数分前記画素データをシフトすること
を特徴とするものである。
Further, according to the present invention, shift means for holding a predetermined number of bits of pixel data and shifting from a predetermined position by 1 bit, 1-bit pixel data output from the shift means, and 1-bit of this pixel data. A coincidence detecting means for detecting coincidence with the previous pixel data, a counting means for counting the coincidence output detected by the coincidence detecting means, and an encoding means for outputting a predetermined code corresponding to the count value of the counting means. A binary image compression apparatus including: and a continuous pixel detecting unit that detects the number of continuous pixels of 1 byte or more in a predetermined bit of pixel data,
An adding unit for adding the number of continuous pixels detected by the continuous pixel detecting unit to the count value of the counting unit, and the shift unit includes the pixel data for the number of continuous pixels detected by the continuous pixel detecting unit. It is characterized by shifting.

【0008】[0008]

【作用】本発明は、同色画素検出手段により、一度に所
定ビット数分の画素の一致検出を行ないカウンタに加算
するため、符号化を行なう画像データの画素の一致検出
及びカウント時間を短縮することができ、高速処理を可
能にすることができる。
According to the present invention, the same-color pixel detecting means detects the coincidence of pixels of a predetermined number of bits at a time and adds the coincidence to the counter. Therefore, the coincidence detection of the pixels of the image data to be encoded and the count time can be shortened. Therefore, high speed processing can be achieved.

【0009】[0009]

【実施例】以下図面を参照して本発明の実施例を詳細に
説明する。図1は本発明の一実施例を示す構成説明図で
ある。なお、本実施例では、便宜上白を「0」、黒を
「1」とするが、白を「1」、黒を「0」としてもかま
わない。即ち、画像データが書き込まれた画像RAM2
1から1バイト(8ビット)分の画像データが読み出さ
れてフリップフロップ(FF)22に出力される。この
フリップフロップ22は画像RAM21から入力された
画像データが書き込まれて保持される。このフリップフ
ロップ22に保持された画像データはバレルシフタ23
に出力さると共に画素検出部24に出力される。この画
素検出部24は図2に示すように、前記フリップフロッ
プ22の出力がセレクタ34に入力されると共にインバ
ータ35を介してセレクタ34に入力される。このセレ
クタ34には後述する不一致検出部32のフリップフロ
ップ5からの画素色記憶出力(1ビット前の画素)が供
給され、この1ビット前の画素の色が白「0」である場
合にはフリップフロップ22の出力がそのままプライオ
リティエンコーダ36に入力され、また1ビット前の画
素の色が黒「1」である場合にはフリップフロップ22
の出力をインバータ35により反転した反転信号がプラ
イオリティエンコーダ36に入力される。これにより、
1ビット前の画素より連続している画素は必ず「0」と
なる。しかして、図3のA〜Iに示すように、前記プラ
イオリティエンコーダ36のMSBビットからLSBビ
ットまでの画像データ1バイト(8ビット)分の入力
(「0」の連続性)に応じて、プライオリティエンコー
ダ36の出力には1ビット前からの連続画素数0〜8が
3ビットで出力され、このプライオリティエンコーダ3
6の出力がセレクタ26及び加算器25に出力される。
すなわち、図3に示すように、Aの場合は同色画素を1
ビットも検出せず異なる画素色を検出したことを意味し
てプライオリティエンコーダ36の出力は0となる。B
の場合は同色画素を1ビット検出した後に異なる画素色
を検出したことを意味してプライオリティエンコーダ3
6の出力は1となる。Cの場合は同色画素を2ビット連
続して検出した後に異なる画素色を検出したことを意味
してプライオリティエンコーダ36の出力は2となる。
Dの場合は同色画素を3ビット連続して検出した後に異
なる画素色を検出したことを意味してプライオリティエ
ンコーダ36の出力は3となる。Eの場合は同色画素を
4ビット連続して検出した後に異なる画素色を検出した
ことを意味してプライオリティエンコーダ36の出力は
4となる。Fの場合は同色画素を5ビット連続して検出
した後に異なる画素色を検出したことを意味してプライ
オリティエンコーダ36の出力は5となる。Gの場合は
同色画素を6ビット連続して検出した後に異なる画素色
を検出したことを意味してプライオリティエンコーダ3
6の出力は6となる。Hの場合は同色画素を7ビット連
続して検出した後に異なる画素色を検出したことを意味
してプライオリティエンコーダ36の出力は7となる。
Iの場合は同色画素を8ビット連続して検出した後に異
なる画素色を検出したことを意味してプライオリティエ
ンコーダ36の出力は8となる。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a configuration explanatory view showing an embodiment of the present invention. In this embodiment, white is "0" and black is "1" for convenience, but white may be "1" and black may be "0". That is, the image RAM 2 in which the image data is written
From 1 to 1 byte (8 bits) of image data is read and output to the flip-flop (FF) 22. Image data input from the image RAM 21 is written and held in the flip-flop 22. The image data held in the flip-flop 22 is the barrel shifter 23.
It is also output to the pixel detection unit 24. As shown in FIG. 2, in the pixel detection unit 24, the output of the flip-flop 22 is input to the selector 34 and the selector 34 via the inverter 35. The selector 34 is supplied with a pixel color storage output (pixel 1 bit before) from the flip-flop 5 of the mismatch detection section 32 described later, and when the color of the pixel 1 bit before is white “0”, The output of the flip-flop 22 is directly input to the priority encoder 36, and when the color of the pixel one bit before is black “1”, the flip-flop 22
An inverted signal obtained by inverting the output of 1 by the inverter 35 is input to the priority encoder 36. This allows
Pixels consecutive one pixel before are always "0". Then, as shown in FIGS. 3A to 3I, in accordance with the input of 1 byte (8 bits) of image data from the MSB bit to the LSB bit of the priority encoder 36 (continuity of "0"), the priority is set. At the output of the encoder 36, the number of consecutive pixels 0 to 8 from 1 bit before is output as 3 bits, and the priority encoder 3
The output of 6 is output to the selector 26 and the adder 25.
That is, as shown in FIG.
The output of the priority encoder 36 becomes 0, which means that a different pixel color is detected without detecting any bit. B
In the case of, the priority encoder 3 means that a different pixel color is detected after detecting 1 bit of the same color pixel.
The output of 6 becomes 1. In the case of C, the output of the priority encoder 36 is 2, which means that the same color pixel is continuously detected for 2 bits and then a different pixel color is detected.
In the case of D, the output of the priority encoder 36 is 3, which means that the same color pixel is continuously detected for 3 bits and then a different pixel color is detected. In the case of E, the output of the priority encoder 36 is 4, which means that the same color pixel is continuously detected for 4 bits and then the different pixel color is detected. In the case of F, the output of the priority encoder 36 is 5, which means that the same color pixel is continuously detected for 5 bits and then a different pixel color is detected. In the case of G, the priority encoder 3 means that the same color pixel is continuously detected for 6 bits and then a different pixel color is detected.
The output of 6 becomes 6. In the case of H, the output of the priority encoder 36 is 7, which means that the same color pixel is continuously detected for 7 bits and then a different pixel color is detected.
In the case of I, the output of the priority encoder 36 is 8, which means that the same color pixel is continuously detected for 8 bits and then a different pixel color is detected.

【0010】ここで、図3に示すように、プライオリテ
ィエンコーダ36の入力がIの場合はドキュメントイメ
ージ画像データにおいては出現率が高いのでほとんどの
場合は画像データを1ビットづつ一致検出する必要が全
くなく、加算器25において、TCカウンタ27から入
力された今までの連続画素数の計数結果にプライオリテ
ィエンコーダ36から入力された8を加算することによ
り、プライオリティエンコーダ36に書き込んだ画像デ
ータまでの連続画素数とすることができる。前記加算器
25から出力された連続画素数はTCカウンタ27のロ
ード端子LOADに入力され、TCカウンタ27の値が
書き換えられる。また加算器25の桁上がり出力CAは
オア回路28の一方の入力端子に入力される。この場
合、前記バレルシフタ23にロードした画素データはス
キャンの必要がないのでシフトはせず、次の1バイト
(8ビット)分の画素データの処理に移る。
Here, as shown in FIG. 3, when the input of the priority encoder 36 is I, the appearance rate is high in the document image image data. Therefore, in almost all cases, it is absolutely necessary to detect the coincidence of the image data bit by bit. In addition, the adder 25 adds 8 input from the priority encoder 36 to the counting result of the number of continuous pixels input from the TC counter 27 up to now, so that the continuous pixels up to the image data written in the priority encoder 36 are added. It can be a number. The number of continuous pixels output from the adder 25 is input to the load terminal LOAD of the TC counter 27, and the value of the TC counter 27 is rewritten. The carry output CA of the adder 25 is input to one input terminal of the OR circuit 28. In this case, since the pixel data loaded in the barrel shifter 23 does not need to be scanned, the pixel data is not shifted, and the processing for the next 1 byte (8 bits) of pixel data is started.

【0011】又、プライオリティエンコーダ36の入力
がA〜Hの場合は1バイト(8ビット)画素データ中に
1ビット前の画素色と反対色の画素色が検出されたこと
を意味するため、加算器25により、プライオリティエ
ンコーダ36の出力0〜7を、TCカウンタ27の出力
である今までの連続画素数の計数結果に加算し、この加
算結果を符号化の対象となる画素色の連続画素数として
TCカウンタ27にロードする。このTCカウンタ27
の桁上がり出力端子CAはオア回路28の他方の入力端
子に接続され、このオア回路28の出力端子はMCカウ
ンタ29の入力端子enに接続される。前記カウンタ2
7,29にはクロックパルスCLOCKが入力される。
前記TCカウンタ27にロードされた連続画素数は符号
ROM(ターミネータコード)30に供給されると共に
前記MCカウンタ29の連続画素数は符号ROM(メー
クアップコード)31に供給される。前記符号ROM
(ターミネータコード)30には画素数0〜63まで1
づつ符号が格納され、前記符号ROM(メークアップコ
ード)31には画素数64〜1728まで64づつ符号
が格納されている。しかして、前記符号ROM30,3
1はそれぞれ対応したカウンタ27,29から入力され
た連続画素数に該当する符号を出力する。次に、セレク
タ26を介して入力された連続画素数に基づきバレルシ
フタ23に保持されている1バイトの画素データを連続
画素数のビット分だけシフトした位置からLSB側のビ
ットに対し、1ビットづつの画素の一致検出シフトを行
なう。このバレルシフタ23にはフリップフロップ22
から画素検出部24と同じ画像データが入力されている
ため、画素検出部24で一致を検出できなかった残りの
画素が1ビットづつシフトされ不一致検出部32で一致
検出される。この不一致検出部32は図11に示すよう
に1ビット前の画素を記憶するフリップフロップ5と現
在の画素とフリップフロップ5からの1ビット前の画素
との一致を検出する恒等回路6より構成される。すなわ
ち恒等回路6の一方の入力にはバレルシフタ23のMS
Bビット信号が供給され、他方の入力にはフリップフロ
ップ5から出力された1ビット前の信号が供給される。
したがって、恒等回路6の出力にはMSBビット信号と
1ビット前の信号が一致しているときハイレベルが出力
される。したがって、この一致出力をカウントすること
により対象となる画素色の連続画素数を検出することが
できる。前記不一致検出部32の出力信号はセレクタ3
3を介してTCカウンタ27の入力端子enに出力され
る。前記セレクタ33はバレルシフタ23の1ビット毎
の一致検出時にTCカウンタ27のen信号を有効とす
るものである。このTCカウンタ27は不一致検出部3
2から入力された出力信号がハイレベルの間対象となる
画素色の連続画素数を計数する。前記TCカウンタ27
の連続画素数の計数結果は符号ROM(ターミネータコ
ード)30に供給されると共に前記MCカウンタ29の
連続画素数の計数結果は符号ROM(メークアップコー
ド)31に供給される。前記符号ROM(ターミネータ
コード)30には画素数0〜63まで1づつ対応する符
号が格納され、前記符号ROM(メークアップコード)
31には画素数64〜1728まで64づつ対応する符
号が格納されている。しかして、不一致検出部32に入
力されるバレルシフタ23のMSBビットと1ビット前
の信号とが不一致となると、不一致検出部32からロー
レベルが出力されて前記符号ROM30,31はそれぞ
れ対応したカウンタ27,29から入力された連続画素
数の計数結果に該当する符号を出力する。
Further, when the input of the priority encoder 36 is A to H, it means that the pixel color opposite to the pixel color one bit before is detected in the 1-byte (8-bit) pixel data. The output 0 to 7 of the priority encoder 36 is added to the counting result of the number of continuous pixels up to now which is the output of the TC counter 27 by the device 25, and the addition result is the number of continuous pixels of the pixel color to be encoded. Is loaded into the TC counter 27. This TC counter 27
The carry output terminal CA of is connected to the other input terminal of the OR circuit 28, and the output terminal of the OR circuit 28 is connected to the input terminal en of the MC counter 29. The counter 2
A clock pulse CLOCK is input to 7 and 29.
The number of continuous pixels loaded in the TC counter 27 is supplied to a code ROM (terminator code) 30, and the number of continuous pixels of the MC counter 29 is supplied to a code ROM (makeup code) 31. Code ROM
(Terminator code) 30 has 1 to 0 to 63 pixels
Codes are stored one by one, and the code ROM (makeup code) 31 stores 64 codes by the number of pixels 64 to 1728. Then, the code ROMs 30 and 3
1 outputs a code corresponding to the number of continuous pixels input from the corresponding counters 27 and 29. Next, based on the number of consecutive pixels input through the selector 26, the 1-byte pixel data held in the barrel shifter 23 is shifted by a bit corresponding to the number of consecutive pixels. The pixel coincidence detection shift is performed. This barrel shifter 23 has a flip-flop 22
Since the same image data as that of the pixel detection unit 24 is input, the remaining pixels for which the match cannot be detected by the pixel detection unit 24 are shifted by 1 bit and the mismatch detection unit 32 detects the match. As shown in FIG. 11, the non-coincidence detecting unit 32 is composed of a flip-flop 5 for storing a pixel of 1 bit before and an identity circuit 6 for detecting the coincidence of the current pixel and the pixel of 1 bit before from the flip-flop 5. To be done. That is, the MS of the barrel shifter 23 is connected to one input of the identity circuit 6.
The B-bit signal is supplied, and the signal one bit before, which is output from the flip-flop 5, is supplied to the other input.
Therefore, a high level is output to the output of the identity circuit 6 when the MSB bit signal and the signal one bit before match. Therefore, by counting this coincidence output, the number of continuous pixels of the target pixel color can be detected. The output signal of the mismatch detection section 32 is the selector 3
3 is output to the input terminal en of the TC counter 27. The selector 33 validates the en signal of the TC counter 27 when the bit shift of the barrel shifter 23 is detected. The TC counter 27 is used by the mismatch detection unit 3
While the output signal input from 2 is at the high level, the number of continuous pixels of the target pixel color is counted. The TC counter 27
The counting result of the number of continuous pixels of is supplied to a code ROM (terminator code) 30 and the counting result of the number of continuous pixels of the MC counter 29 is supplied to a code ROM (makeup code) 31. The code ROM (terminator code) 30 stores codes corresponding to the pixel numbers 0 to 63, one by one, and the code ROM (makeup code) is stored.
Reference numeral 31 stores a code corresponding to 64 pixel numbers 64 to 1728. When the MSB bit of the barrel shifter 23 input to the mismatch detection unit 32 and the signal one bit before do not match, the mismatch detection unit 32 outputs a low level and the code ROMs 30 and 31 respectively correspond to the corresponding counters 27. , 29 to output a code corresponding to the result of counting the number of continuous pixels.

【0012】本実施例は、連続した同色画素数計数のた
めに、一度に複数の画素の一致検出をするプライオリテ
ィエンコーダとこの一致検出出力をカウンタに加算する
加算器を設けたので、画像データの一致検出時間及びカ
ウント時間を短縮できる利点があり、高速処理が可能で
あるのでファクシミリ、ドキュメントイメージ プロセ
ッサ等に利用することができる。
In this embodiment, in order to continuously count the number of pixels of the same color, a priority encoder for detecting the coincidence of a plurality of pixels at one time and an adder for adding the coincidence detection output to the counter are provided. It has the advantage that the match detection time and the count time can be shortened, and high-speed processing is possible, so it can be used for facsimiles, document image processors, and the like.

【0013】図4は本発明の他の実施例を示す構成説明
図である。即ち、スキャナを構成するCCD51により
送信原稿をスキャンすることによりディジタル信号の画
像データに変換して1バイト(ワード)分の画像データ
を保持するフリップフロップ52に出力する。このフリ
ップフロップ52には前記CCD51によりディジタル
信号に変換された画像データが書き込まれて保持され
る。このフリップフロップ52に保持された画像データ
は1バイトづつ1ページ(ブロック)分の画像データを
記憶する画像メモリ53に出力される。この画像メモリ
53は画像メモリアドレスカウンタ54からのアドレス
によりフリップフロップ52から入力された画像データ
が1バイトづつ書き込まれて記憶される。これと同時に
前記フリップフロップ52に保持された画像データは1
バイトづつフリップフロップ60に出力される。このフ
リップフロップ60はフリップフロップ52から入力さ
れた画像データが1バイト(8ビット)分づつ書き込ま
れて保持される。したがって、フリップフロップ60は
画像メモリ53に書き込む前アドレスの画像データを保
持することになるが1ラインの先頭では「000000
01」にイニシャライズされる。前記フリップフロップ
52及び60にそれぞれ保持された画像データはそれぞ
れ1バイト(8ビット)分づつ画像データ比較部61に
出力される。
FIG. 4 is a structural explanatory view showing another embodiment of the present invention. That is, the CCD 51 forming the scanner scans the transmission original to convert it into image data of a digital signal and outputs the image data to the flip-flop 52 which holds 1 byte (word) of image data. Image data converted into a digital signal by the CCD 51 is written and held in the flip-flop 52. The image data held in the flip-flop 52 is output to the image memory 53 that stores image data for one page (block) byte by byte. In the image memory 53, the image data input from the flip-flop 52 is written byte by byte and stored by the address from the image memory address counter 54. At the same time, the image data held in the flip-flop 52 is 1
It is output to the flip-flop 60 byte by byte. In the flip-flop 60, the image data input from the flip-flop 52 is written and held in units of 1 byte (8 bits). Therefore, the flip-flop 60 holds the image data of the address before writing to the image memory 53, but at the beginning of one line, "000000" is stored.
01 "is initialized. The image data held in each of the flip-flops 52 and 60 is output to the image data comparison unit 61 by 1 byte (8 bits).

【0014】この画像データ比較部61は図5に示すよ
うに、前記フリップフロップ52に保持された現在の画
像データが1バイト(8ビット)分づつ入力されるアン
ド回路611及びノア回路612、前記フリップフロッ
プ60に保持された前回の画像データが1バイト(8ビ
ット)分づつ入力されるアンド回路613及びノア回路
614、前記アンド回路611,613及びノア回路6
12,614の出力がインバータIV,アンド回路AN
D,オア回路OR及びフリップフロップFFを介して入
力されセレクタ64の端子aへの出力信号を出力するオ
ア回路615及びセレクタ64の端子bへの出力信号を
出力するオア回路616より構成される。尚、前記アン
ド回路ANDにはラインカウンタ72の出力信号CAが
入力される。 即ち、画像データ比較部61はフリップ
フロップ52の現アドレス画像データとフリップフロッ
プ60の前アドレス画像データを比較し、1バイト以上
同じ画素色が連続する場合の先頭バイトと最終バイトを
検出して、前アドレス選択信号と現アドレス選択信号を
セレクタ64の端子a,bに出力し、かつアドレスメモ
リ62へのライトイネ−ブル信号及びアドレスカウンタ
63のカウント信号を出力する。
As shown in FIG. 5, the image data comparing section 61 receives an AND circuit 611 and a NOR circuit 612 into which the current image data held in the flip-flop 52 is input by 1 byte (8 bits). The AND circuit 613 and the NOR circuit 614 into which the previous image data held in the flip-flop 60 is input by 1 byte (8 bits), the AND circuits 611 and 613 and the NOR circuit 6
The outputs of 12, 614 are the inverter IV and the AND circuit AN.
D, an OR circuit OR, and an OR circuit 615 that outputs an output signal to the terminal a of the selector 64 and an OR circuit 616 that outputs an output signal to the terminal b of the selector 64. The output signal CA of the line counter 72 is input to the AND circuit AND. That is, the image data comparison unit 61 compares the current address image data of the flip-flop 52 with the previous address image data of the flip-flop 60, detects the first byte and the last byte when the same pixel color continues for 1 byte or more, The previous address selection signal and the current address selection signal are output to the terminals a and b of the selector 64, and the write enable signal to the address memory 62 and the count signal of the address counter 63 are output.

【0015】具体的には、以下のケースの前アドレス選
択信号あるいは現アドレス選択信号(セレクタ64の端
子a,bの入力)が出力される。 (1) フリップフロップ60に保持された前アドレス
とフリップフロップ52に保持された現アドレスのデー
タが異なっており、かつ現アドレスのデータが全ビット
「1」(または「0」)のとき現アドレス選択信号を出
力し、また、前アドレスのデータと現アドレスのデータ
が異なっており、かつ前アドレスのデータが全ビット
「1」(または「0」)のとき前アドレス選択信号を出
力する。
Specifically, the previous address selection signal or the current address selection signal (input to the terminals a and b of the selector 64) in the following cases is output. (1) The current address when the previous address held in the flip-flop 60 and the data of the current address held in the flip-flop 52 are different and the data of the current address are all bits "1" (or "0") A selection signal is output, and when the data of the previous address and the data of the current address are different and the data of the previous address is all bits "1" (or "0"), the previous address selection signal is output.

【0016】(2) 前アドレスと現アドレスのデータ
が異なっており、かつ前アドレスと現アドレスのデータ
が全ビット「1」(または「0」)であるとき(前アド
レスが「1」のとき現アドレスは「0」であり、前アド
レスが「0」のとき現アドレスは「1」である)前アド
レス選択信号を出力すると共に、この次のタイミングで
現アドレス選択信号を出力する。なお、この選択信号が
出力されている間、アドレスのカウントは保持される。
(2) When the data of the previous address and the current address are different and the data of the previous address and the current address are all bits "1" (or "0") (when the previous address is "1") The current address is "0" and the current address is "1" when the previous address is "0". The previous address selection signal is output, and the current address selection signal is output at the next timing. The address count is held while the selection signal is output.

【0017】(3) ラインカウンタ72からのキャリ
ーCAが「1」(1ラインの最終バイト)かつ現アドレ
スが全ビット「1」(または「0」)かつ前アドレスが
全ビット「1」(または「0」)のとき現アドレス選択
信号を出力する。
(3) The carry CA from the line counter 72 is "1" (the last byte of one line), the current address is all bits "1" (or "0"), and the previous address is all bits "1" (or When "0"), the current address selection signal is output.

【0018】(4) ラインカウンタ72からのキャリ
ーCAが「1」かつ前アドレスのデータと現アドレスの
データが異なり、かつ現アドレスのデータが全ビット
「0」(または「1」)のとき、現アドレス選択信号を
出力すると共に、この次のタイミングで再度現アドレス
選択信号を出力する。なお、この選択信号が出力されて
いる間、アドレスのカウントは保持される。
(4) When the carry CA from the line counter 72 is "1", the data of the previous address and the data of the current address are different, and the data of the current address is all bits "0" (or "1"), The current address selection signal is output, and the current address selection signal is output again at the next timing. The address count is held while the selection signal is output.

【0019】1ラインのバイト数をキャリーとするライ
ンカウンタ72は画像メモリアドレスカウンタ54のア
ドレスカウントに同期して動作する。つまり、1ライン
内での画像データのアドレスを計数していることにな
る。前記ラインカウンタ72(=現アドレス)の出力及
びデクリメンタ73でラインカウンタ72から1を減じ
た値(=前アドレス)の出力はセレクタ64に供給され
る。
The line counter 72, which carries the number of bytes in one line, operates in synchronization with the address count of the image memory address counter 54. That is, the addresses of the image data within one line are counted. The output of the line counter 72 (= current address) and the output of the value (= previous address) obtained by subtracting 1 from the line counter 72 by the decrementer 73 are supplied to the selector 64.

【0020】図6はセレクタ64の回路例である。即
ち、画像データ比較部61からの1バイト以上同じ画素
色が連続する場合の先頭バイトと最終バイトの検出信号
はセレクタ64の端子a,bに供給される。セレクタ6
4の端子bに供給された最終バイトの検出信号はインバ
ータ81の入力端子に入力され、このインバータ81の
出力はノア回路82の一方の入力端子に入力される。セ
レクタ64の端子aに供給された先頭バイトの検出信号
はノア回路82の他方の入力端子に入力されると共にア
ンド回路83の一方の入力端子に入力される。ラインカ
ウンタ72の出力信号はアンド回路84の一方の入力端
子に入力され、デクリメンタ73の出力信号はアンド回
路83の他方の入力端子に入力される。前記ノア回路8
2の出力信号はアンド回路84の他方の入力端子に入力
される。前記アンド回路84の出力信号及びアンド回路
83の出力信号はそれぞれノア回路85の入力端子に入
力され、このノア回路85の出力信号がインバータ86
を介してセレクタ64の出力信号として抽出される。
FIG. 6 is a circuit example of the selector 64. That is, the detection signals of the first byte and the last byte when the same pixel color continues for one byte or more from the image data comparison unit 61 are supplied to the terminals a and b of the selector 64. Selector 6
The detection signal of the final byte supplied to the terminal b of No. 4 is input to the input terminal of the inverter 81, and the output of this inverter 81 is input to one input terminal of the NOR circuit 82. The detection signal of the leading byte supplied to the terminal a of the selector 64 is input to the other input terminal of the NOR circuit 82 and one input terminal of the AND circuit 83. The output signal of the line counter 72 is input to one input terminal of the AND circuit 84, and the output signal of the decrementer 73 is input to the other input terminal of the AND circuit 83. The NOR circuit 8
The output signal 2 is input to the other input terminal of the AND circuit 84. The output signal of the AND circuit 84 and the output signal of the AND circuit 83 are respectively input to the input terminals of the NOR circuit 85, and the output signal of the NOR circuit 85 is output to the inverter 86.
It is extracted as an output signal of the selector 64 via.

【0021】前記セレクタ64はアドレスメモリ62に
書き込む値をラインカウンタ72(=現アドレス)とす
るか、デクリメンタ73でラインカウンタ72から1を
減じた値(=前アドレス)とするかを切り換える。
The selector 64 switches the value written in the address memory 62 between the line counter 72 (= current address) and the decrementer 73 which is a value obtained by subtracting 1 from the line counter 72 (= previous address).

【0022】即ち、端子aに前アドレス選択信号が入力
されるとデクリメンタ73からのアドレスが選択されて
アドレスメモリ62に書き込まれると共に、アドレスカ
ウンタ63をカウントアップする。また、端子bに現ア
ドレス選択信号が入力されるとラインカウンタ72から
のアドレスが選択されてアドレスメモリ62に書き込ま
れると共に、アドレスカウンタ63をカウントアップす
る。
That is, when the previous address selection signal is input to the terminal a, the address from the decrementer 73 is selected and written in the address memory 62, and the address counter 63 is counted up. When the current address selection signal is input to the terminal b, the address from the line counter 72 is selected and written in the address memory 62, and the address counter 63 is counted up.

【0023】これにより、画像データで1バイト以上同
じ画素色が連続する場合に、その時の1ライン内での先
頭アドレスはアドレスメモリ62のnアドレスに、最終
アドレスはアドレスメモリ62のn+1アドレスに書き
込まれる。
As a result, when the same pixel color continues for 1 byte or more in the image data, the start address in one line at that time is written to the n address of the address memory 62, and the last address is written to the n + 1 address of the address memory 62. Be done.

【0024】また、アドレスメモリ62のデータのMS
Bビットには画像色が書き込まれる。図8(a)はアド
レスメモリ62のデータ構成を示す。即ち、アドレスメ
モリ62のデータは先頭アドレス、最終アドレス、画像
色より構成される。
Further, the MS of the data in the address memory 62
The image color is written in the B bit. FIG. 8A shows the data structure of the address memory 62. That is, the data in the address memory 62 is composed of the start address, the end address, and the image color.

【0025】例えば、図8(b)の様なkライン及びk
+1ラインの画像データが入力されるとする。まず、最
初にCCDからの1バイト分の画像データをフリップフ
ロップ52に書き込むと共に画像メモリ53にも書き込
む。次に、フリップフロップ52の現アドレス(0)の
データとフリップフロップ60の前アドレス(−1)の
データとを比較するが、前アドレス(−1)は存在しな
いためにそのままフリップフロップ52の画像データを
フリップフロップ60に書き込んで、各カウンタ54、
72をカウントアップする(カウントアップはデータが
更新される度に実行される)。
For example, k lines and k as shown in FIG.
It is assumed that +1 line of image data is input. First, 1 byte of image data from the CCD is first written in the flip-flop 52 and also in the image memory 53. Next, the data of the current address (0) of the flip-flop 52 and the data of the previous address (-1) of the flip-flop 60 are compared. However, since the previous address (-1) does not exist, the image of the flip-flop 52 remains as it is. Data is written in the flip-flop 60, and each counter 54,
Count up 72 (count up is performed each time the data is updated).

【0026】そして、次の1バイト分の画像データをフ
リップフロップ52に書き込むと共に画像メモリ53に
も書き込み、このようにしてフリップフロップ52およ
びフリップフロップ60の画像データを順次更新してい
く(以下同様)。ここで、現アドレス(1)のデータと
前アドレス(0)のデータを比較すると、前アドレスの
データと現アドレスのデータが異なり、現アドレスのデ
ータが全ビット「0」であるので、画像データ比較部6
1から現アドレス選択信号が出力され、セレクタ64で
ラインカウンタ72からのアドレス(1)を選択すると
共に、アドレスカウンタ63で示されているアドレスメ
モリ62のアドレスに先頭アドレスを書き込み(図8
(c)参照)、アドレスカウンタ63をカウントアップ
する。なお、この時画素色(「0」)がアドレスメモリ
62に記憶される。
Then, the next 1-byte image data is written in the flip-flop 52 and also in the image memory 53, and the image data in the flip-flop 52 and the flip-flop 60 are sequentially updated in this manner (hereinafter the same. ). Here, when comparing the data of the current address (1) and the data of the previous address (0), the data of the previous address and the data of the current address are different, and the data of the current address is all bits “0”. Comparison unit 6
The current address selection signal is output from 1, the selector 64 selects the address (1) from the line counter 72, and the head address is written to the address of the address memory 62 indicated by the address counter 63 (see FIG. 8).
(See (c)), the address counter 63 is incremented. At this time, the pixel color (“0”) is stored in the address memory 62.

【0027】次に、前アドレス(1)と現アドレス
(2)のデータを比較すると、前アドレスのデータも現
アドレスのデータも全ビットが「0」であるので、各カ
ウンタをカウントアップする。
Next, when the data of the previous address (1) and the data of the current address (2) are compared, since all the bits of the data of the previous address and the data of the current address are all "0", each counter is counted up.

【0028】次に、前アドレス(2)と現アドレス
(3)のデータを比較すると、前アドレスと現アドレス
とのデータが異なり、前アドレスのデータの全ビットが
「0」であるため、画像データ比較部61から前アドレ
ス選択信号が出力され、セレクタ64でデクリメンタ7
3からのアドレス(2)を選択すると共に、アドレスカ
ウンタ63で示されているアドレスメモリ62のアドレ
スに最終アドレスを書き込み(図8(c)参照)、アド
レスカウンタ63をカウントアップする。
Next, comparing the data at the previous address (2) and the data at the current address (3), the data at the previous address and the data at the current address are different, and all the bits of the data at the previous address are "0". The previous address selection signal is output from the data comparison section 61, and the decrementer 7 is selected by the selector 64.
The address (2) from 3 is selected, the final address is written to the address of the address memory 62 indicated by the address counter 63 (see FIG. 8C), and the address counter 63 is counted up.

【0029】この様に、順次カウントアップしていき、
アドレスメモリ62に順次先頭アドレス、最終アドレス
及び画素色が記憶される。そして、kラインのアドレス
(n−2)とアドレス(n−1)のデータは異なり、ア
ドレス(n−1)のデータが全ビット「1」であるの
で、先頭アドレスにn−1が記憶される。また、アドレ
ス(n−1)とアドレス(n)のデータは両方とも全ビ
ット「1」であるがアドレス(n)が最終アドレスであ
るので(キャリーCAが「1」であるので)、現アドレ
スであるnが最終アドレスに記憶される(図8(c)参
照)。
In this way, the count-up is sequentially performed,
The first address, the last address, and the pixel color are sequentially stored in the address memory 62. Then, since the data of the address (n-2) of the k line and the data of the address (n-1) are different and the data of the address (n-1) is all bits "1", n-1 is stored in the head address. It Further, both the data of the address (n-1) and the data of the address (n) are all bits "1", but since the address (n) is the final address (because the carry CA is "1"), the current address Is stored in the final address (see FIG. 8C).

【0030】また、k+1ラインの場合は、同様に図8
(d)に示されるように先頭アドレス、最終アドレス及
び画素色が記憶される。そして、画像メモリ53への画
像データの書き込みが終了すると、画像メモリ53から
1バイト(8ビット)分の画像データが読み出されてフ
リップフロップ(F/F)55に出力される。このフリ
ップフロップ55は画像メモリ53から入力された画像
データが書き込まれて保持される。前記フリップフロッ
プ55に保持された画像データはシフトレジスタ56に
出力される。このシフトレジスタ56は前記フリップフ
ロップ55から画像データが入力されると共にクロック
パルスCLOCKが入力され、画像データを1ビットづ
つシフトして最上位ビットの画素を1ビットづつ出力す
る。前記シフトレジスタ56の出力は符号化の対象とな
る画素色と異なる画素の検出を行なう不一致検出部に出
力される。この不一致検出部は1ビット前の画素色を記
憶するフリップフロップ571と、現在の画素色とフリ
ップフロップ571からの1ビット前の画素色との一致
を検出する恒等回路572とより構成される。すなわち
恒等回路572の一方の入力にはシフトレジスタ56の
MSBビット信号が供給され、他方の入力にはフリップ
フロップ571から出力された1ビット前の信号が供給
される。したがって、恒等回路572の出力にはMSB
ビット信号及び1ビット前の信号が一致しているときハ
イレベルが出力される。これにより、現在対象となる画
素色の連続性を検出することができる。前記恒等回路5
72の出力信号はTC(ターミネータコード)カウンタ
(6ビットカウンタ)581の入力端子enに出力され
る。このTCカウンタ581はクロックパルスCLOC
Kが入力され、前記恒等回路572から入力された出力
信号がハイレベルの間クロックパルスをカウントするこ
とにより同色画素の連続画素数を計数する。前記TCカ
ウンタ581の桁上がり出力端子CAはMC(メークア
ップコード)カウンタ(6ビットカウンタ)582の入
力端子enに接続される。このMCカウンタ582には
TCカウンタ581同様クロックパルスCLOCKが入
力され同色画素の連続画素数を計数する。
Similarly, in the case of k + 1 lines, FIG.
As shown in (d), the start address, the end address, and the pixel color are stored. Then, when the writing of the image data to the image memory 53 is completed, one byte (8 bits) of image data is read from the image memory 53 and output to the flip-flop (F / F) 55. The image data input from the image memory 53 is written and held in the flip-flop 55. The image data held in the flip-flop 55 is output to the shift register 56. The shift register 56 receives the image data from the flip-flop 55 and the clock pulse CLOCK, shifts the image data bit by bit, and outputs the most significant bit pixel bit by bit. The output of the shift register 56 is output to a mismatch detection section that detects pixels different from the pixel color to be encoded. This mismatch detection unit is composed of a flip-flop 571 that stores the pixel color of 1 bit before, and an identity circuit 572 that detects the match between the current pixel color and the pixel color of 1 bit before from the flip-flop 571. . That is, the MSB bit signal of the shift register 56 is supplied to one input of the identity circuit 572, and the 1-bit previous signal output from the flip-flop 571 is supplied to the other input. Therefore, the output of the identity circuit 572 is MSB
When the bit signal and the signal one bit before are in agreement, a high level is output. As a result, the continuity of the currently targeted pixel color can be detected. The identity circuit 5
The output signal of 72 is output to the input terminal en of the TC (terminator code) counter (6-bit counter) 581. This TC counter 581 has a clock pulse CLOC.
When K is input and the output signal input from the identity circuit 572 is at a high level, clock pulses are counted to count the number of consecutive pixels of the same color. The carry output terminal CA of the TC counter 581 is connected to the input terminal en of an MC (makeup code) counter (6-bit counter) 582. Like the TC counter 581, the clock pulse CLOCK is input to the MC counter 582 to count the number of consecutive pixels of the same color.

【0031】この時、アドレスメモリ62のアドレスn
をフリップフロップ65に入力して保持すると共にアド
レスメモリ62のアドレスn+1をフリップフロップ6
5に入力して保持する(アドレスメモリ62のデータの
MSBは画素色を示すビットである。)。前記フリップ
フロップ65のMSBを除く値及び画像メモリアドレス
カウンタ54の値はコンパレータ67に入力され、この
コンパレータ67はフリップフロップ65のMSBを除
く値と画像メモリアドレスカウンタ54の値を比較して
一致し、かつフリップフロップ65のMSBとフリップ
フロップ571の値が一致していた場合にシフトレジス
タ56の画素スキャン及びカウンタ581,582のイ
ンクリメント動作を中断する。その後、前記フリップフ
ロップ65の値及びフリップフロップ66の値がそれぞ
れ減算器68に入力され、この減算器68はフリップフ
ロップ66の値からフリップフロップ65の値を減じた
値をインクリメンタ71に出力する。このインクリメン
タ71は減算器68からの入力値に+1をインクリメン
トして算出した連続する同一画素バイト数を加算器69
に出力する。この加算器69はインクリメンタ71の出
力値を3ビット左にシフトした値(バイト数をビットに
変換するために3ビット左にシフトしている)と前記カ
ウンタ581,582から入力された計数値を加算す
る。すなわち、フリップフロップ66の値が2(10)、フ
リップフロップ65の値が0(10)であった場合、減算器
68の出力値は2(10)−0(10)=2(10)となり、この2
(10)がインクリメンタ71で+1(10)をインクリメント
することにより3(10)となり、この3(10)が加算すべき
バイト数となる。図7に示すように、加算器69でイン
クリメンタ71の出力を11ビット(MSB)〜3ビッ
トを結線し、2ビット〜0ビット(LSB)はGND
(接地)に固定することにより、加算すべきビット数2
(10)を実現する。前記加算器69の加算値を前記カウ
ンタ581,582に出力する。この場合、連続する1
バイト以上の同一画素色の画像データが検出された場合
には、シフトレジスタ56の1ビットずつの画素スキャ
ン動作を中断し、連続する同一画素数をカウンタ58
1,582の計数値に加算する。したがって、同一画素
色が連続している間のシフトレジスタ56の1ビットず
つの画素スキャン動作を省略することになる。次に、前
記フリップフロップ66の値はインクリメンタ70に出
力され、このインクリメンタ70はフリップフロップ6
6の出力値に1を加算した値を画像メモリアドレスカウ
ンタ54に出力する。この画像メモリアドレスカウンタ
54はインクリメンタ70からの出力値が入力されて画
像メモリ53から画像データを読出し、シフトレジスタ
56の1ビットずつの画素スキャン動作を再開し、符号
化の対象となる画素色が検出された時にシフトレジスタ
56の1ビットずつのスキャン動作を終了し、カウンタ
581,582で計数した最終的な画素数の計数値に対
応する符号を符号ROM591,592より得る。
At this time, the address n of the address memory 62
Is input to the flip-flop 65 to be held and the address n + 1 of the address memory 62 is input to the flip-flop 6
5 and holds it (the MSB of the data in the address memory 62 is a bit indicating the pixel color). The value excluding the MSB of the flip-flop 65 and the value of the image memory address counter 54 are input to the comparator 67, and the comparator 67 compares the value excluding the MSB of the flip-flop 65 with the value of the image memory address counter 54 and matches them. If the MSB of the flip-flop 65 and the value of the flip-flop 571 match, the pixel scan of the shift register 56 and the increment operation of the counters 581 and 582 are suspended. Thereafter, the value of the flip-flop 65 and the value of the flip-flop 66 are respectively input to the subtractor 68, and the subtractor 68 outputs the value obtained by subtracting the value of the flip-flop 65 from the value of the flip-flop 66 to the incrementer 71. . The incrementer 71 increments the input value from the subtractor 68 by +1 and calculates the number of consecutive identical pixel bytes calculated by the adder 69.
Output to. This adder 69 shifts the output value of the incrementer 71 to the left by 3 bits (shifts to the left by 3 bits to convert the number of bytes into bits) and the count value input from the counters 581 and 582. Is added. That is, when the value of the flip-flop 66 is 2 (10) and the value of the flip-flop 65 is 0 (10) , the output value of the subtractor 68 is 2 (10) -0 (10) = 2 (10) . , This 2
(10) becomes 3 (10) by incrementing +1 (10) by the incrementer 71, and this 3 (10) becomes the number of bytes to be added. As shown in FIG. 7, the adder 69 connects the output of the incrementer 71 to 11 bits (MSB) to 3 bits, and 2 bits to 0 bit (LSB) is GND.
The number of bits to be added is 2 by fixing to (ground)
4 (10) is achieved. The added value of the adder 69 is output to the counters 581 and 582. In this case, consecutive 1
When image data of the same pixel color of bytes or more is detected, the pixel scanning operation of the shift register 56 bit by bit is interrupted and the number of consecutive identical pixels is counted by the counter 58.
Add to the count value of 1,582. Therefore, the pixel scanning operation for each bit of the shift register 56 while the same pixel color continues is omitted. Next, the value of the flip-flop 66 is output to the incrementer 70, and the incrementer 70 outputs the value of the flip-flop 6.
A value obtained by adding 1 to the output value of 6 is output to the image memory address counter 54. The image memory address counter 54 receives the output value from the incrementer 70, reads the image data from the image memory 53, restarts the pixel scanning operation of the shift register 56 bit by bit, and encodes the pixel color to be encoded. When 1 is detected, the scan operation of the shift register 56 bit by bit is ended, and the code corresponding to the final count value of the number of pixels counted by the counters 581 and 582 is obtained from the code ROMs 591 and 592.

【0032】尚、画素データの1ラインの先頭にて、画
像メモリアドレスカウンタ54の値をフリップフロップ
65のMSBを除く値をコンパレータ67にて比較し、
一致した場合でかつ、フリップフロップ65のMSBが
1であった場合には、画素データの1ラインの先頭が黒
画素で始まるために白0ランレングスの符号を出力す
る。
At the beginning of one line of pixel data, the value of the image memory address counter 54 is compared by the comparator 67 with the value excluding the MSB of the flip-flop 65,
If they match and the MSB of the flip-flop 65 is 1, the start of one line of pixel data starts with a black pixel, and therefore a code of white 0 run length is output.

【0033】又、画像メモリアドレスカウンタ54の値
とフリップフロップ65のMSBを除く値をコンパレー
タ67にて比較し、一致した場合でかつ、フリップフロ
ップ65のMSBとフリップフロップ571の値が恒等
回路573により一致しなかった場合には前バイトの最
終ビットで画素スキャンを終了することになるので、画
素数の係数値に該当する符号を符号ROM591,59
2より得る。
Further, the value of the image memory address counter 54 and the value excluding the MSB of the flip-flop 65 are compared by the comparator 67, and when they match, the MSB of the flip-flop 65 and the value of the flip-flop 571 are the identity circuit. If they do not match according to 573, the pixel scan ends with the last bit of the previous byte, so the code corresponding to the coefficient value of the number of pixels is code ROMs 591, 59.
Get from 2.

【0034】図9は本実施例に係る二値画像圧縮装置を
ファクシミリに用いたシステム応用例であり、ファクシ
ミリ送信するときは、スキャナ41により送信原稿をス
キャンした画像データを、システム・バスを介して画像
メモリ42に書き込む。この画像メモリ42に書き込れ
た画像データは読み出されシステム・バスを介して符号
化器43により符号化されて通信インタフェース48に
より相手ファクシミリに送信される。ファクシミリ受信
するときは、通信インタフェース48により受信された
画像データをシステム・バスを介して復号化器44によ
り復号化し、プリンタ45によりプリントされて出力さ
れる。これらの動作はメインメモリROM46からのプ
ログラムを用いてCPU(中央処理装置)47により行
なわれる。尚、ファクシミリの構成は種々のものが考え
られる。例えばバスの構成をシステムと画像に分けた
り、画像メモリとメインメモリを共有したり、ディスプ
レイを設けたりする等である。
FIG. 9 is a system application example in which the binary image compression apparatus according to the present embodiment is used in a facsimile. When transmitting by facsimile, the image data obtained by scanning the transmission original by the scanner 41 is transmitted via the system bus. The image memory 42. The image data written in the image memory 42 is read out, encoded by the encoder 43 via the system bus, and transmitted to the partner facsimile by the communication interface 48. When receiving by facsimile, the image data received by the communication interface 48 is decoded by the decoder 44 via the system bus, printed by the printer 45, and output. These operations are performed by a CPU (central processing unit) 47 using a program from the main memory ROM 46. Various configurations of the facsimile are conceivable. For example, the bus configuration may be divided into a system and an image, an image memory and a main memory may be shared, and a display may be provided.

【0035】[0035]

【発明の効果】以上述べたように本発明によれば、同色
画素検出手段により、所定ビット数分の画素の一致検出
を一度に行うことにより、対象となる画素色の連続画素
数を検出するため、符号化を行なう画像データの画素の
一致検出時間及びカウント時間を短縮することができ、
高速処理を可能にすることができる。
As described above, according to the present invention, the number of consecutive pixels of the target pixel color is detected by performing the coincidence detection of the pixels of the predetermined number of bits at once by the same color pixel detection means. Therefore, it is possible to shorten the coincidence detection time and the count time of the pixels of the image data to be encoded,
High speed processing can be enabled.

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

【図1】本発明の一実施例を示す構成説明図である。FIG. 1 is a structural explanatory view showing an embodiment of the present invention.

【図2】図1の画素検出部の一例を示す構成説明図であ
る。
FIG. 2 is a configuration explanatory view showing an example of a pixel detection unit in FIG.

【図3】図1の画素検出部の入力及び出力の一例を示す
説明図である。
FIG. 3 is an explanatory diagram showing an example of input and output of the pixel detection unit of FIG.

【図4】本発明の他の実施例を示す構成説明図である。FIG. 4 is a structural explanatory view showing another embodiment of the present invention.

【図5】図4の画像データ比較部の一例を示す回路図で
ある。
5 is a circuit diagram showing an example of an image data comparison unit in FIG.

【図6】図4のセレクタの一例を示す回路図である。6 is a circuit diagram showing an example of a selector shown in FIG.

【図7】図4の加算器の動作を説明するための説明図で
ある。
FIG. 7 is an explanatory diagram for explaining the operation of the adder in FIG.

【図8】図4のアドレスメモリの動作を説明するための
説明図である。
FIG. 8 is an explanatory diagram for explaining the operation of the address memory in FIG.

【図9】本発明を用いたシステム応用例を示す構成説明
図である。
FIG. 9 is a configuration explanatory view showing a system application example using the present invention.

【図10】従来の二値画像圧縮装置を示す構成説明図で
ある。
FIG. 10 is a structural explanatory view showing a conventional binary image compression device.

【図11】不一致検出部の一例を示す構成説明図であ
る。
FIG. 11 is an explanatory diagram of a configuration showing an example of a mismatch detection unit.

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

21…画像RAM、22…フリップフロップ、23…バ
レルシフタ、24…画素検出部、25…加算器、26…
セレクタ、27…カウンタ、28…オア回路、29…カ
ウンタ、30…符号ROM(タミネータ)、31…符号
ROM(メークアップ)、32…不一致検出部、33…
セレクタ、34…セレクタ、35…インバータ、36…
プライオリティエンコーダ、41…スキャナ、42…画
像メモリ、43…符号化器、44…復号化器、45…プ
リンタ、46…メインメモリROM、47…CPU、4
8…通信インタフェース。
21 ... Image RAM, 22 ... Flip-flop, 23 ... Barrel shifter, 24 ... Pixel detector, 25 ... Adder, 26 ...
Selector, 27 ... Counter, 28 ... OR circuit, 29 ... Counter, 30 ... Code ROM (terminator), 31 ... Code ROM (makeup), 32 ... Mismatch detection section, 33 ...
Selector, 34 ... selector, 35 ... inverter, 36 ...
Priority encoder, 41 ... Scanner, 42 ... Image memory, 43 ... Encoder, 44 ... Decoder, 45 ... Printer, 46 ... Main memory ROM, 47 ... CPU, 4
8 ... Communication interface.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 所定ビットの画素データの前回画素との
一致を1ビット毎に検出する一致検出手段と、 一致検出手段の一致出力をカウントするカウント手段
と、 このカウント手段のカウント値に対応して所定符号を出
力する符号化手段とを有する二値画像圧縮装置におい
て、 所定ビットの画素データのうち連続する画素の連続画素
数を検出する連続画素検出手段と、 この連続画素検出手段により検出された連続画素数を前
記カウント手段のカウント値に加算する加算手段とを有
することを特徴とする二値画像圧縮装置。
1. A coincidence detecting means for detecting coincidence of pixel data of a predetermined bit with a previous pixel for each bit, a counting means for counting coincidence output of the coincidence detecting means, and a count value of the counting means. In a binary image compression apparatus having a coding means for outputting a predetermined code, a continuous pixel detecting means for detecting the number of continuous pixels of continuous pixels in the pixel data of predetermined bits, and the continuous pixel detecting means for detecting the continuous pixel number. A binary image compression apparatus, further comprising: an addition unit that adds the number of continuous pixels to the count value of the counting unit.
【請求項2】 所定ビット数の画素データを保持し、所
定位置から1ビットづつシフトするシフト手段と、 このシフト手段から出力された1ビットの画素データと
この画素データの1ビット前の画素データとの一致を検
出する一致検出手段と、 この一致検出手段により検出された一致出力をカウント
するカウント手段と、 このカウント手段のカウント値に対応して所定符号を出
力する符号化手段とを有する二値画像圧縮装置におい
て、 所定ビットの画素データのうち連続する画素の連続画素
数を検出する連続画素検出手段と、 この連続画素検出手段により検出された連続画素数を前
記カウント手段のカウント値に加算する加算手段とを有
し、 前記シフト手段は、前記連続画素検出手段により検出さ
れた連続画素数分前記画素データをシフトすることを特
徴とする二値画像圧縮装置。
2. A shift means which holds a predetermined number of bits of pixel data and shifts by 1 bit from a predetermined position, 1-bit pixel data output from this shift means, and pixel data 1 bit before this pixel data. A coincidence detecting means for detecting a coincidence with the coincidence detecting means, a counting means for counting the coincidence output detected by the coincidence detecting means, and an encoding means for outputting a predetermined code corresponding to the count value of the counting means. In the value image compression apparatus, continuous pixel detection means for detecting the number of continuous pixels of continuous pixels of pixel data of predetermined bits, and the number of continuous pixels detected by the continuous pixel detection means is added to the count value of the counting means. And a shift unit that shifts the pixel data by the number of consecutive pixels detected by the consecutive pixel detecting unit. A binary image compression apparatus characterized by:
【請求項3】 所定ビット数の画素データを保持し、所
定位置から1ビットづつシフトするシフト手段と、 このシフト手段から出力された1ビットの画素データと
この画素データの1ビット前の画素データとの一致を検
出する一致検出手段と、 この一致検出手段により検出された一致出力をカウント
するカウント手段と、 このカウント手段のカウント値に対応して所定符号を出
力する符号化手段とを有する二値画像圧縮装置におい
て、 所定ビットの画素データのうち1バイト以上連続する画
素の連続画素数を検出する連続画素検出手段と、 この連続画素検出手段により検出された連続画素数を前
記カウント手段のカウント値に加算する加算手段とを有
し、 前記シフト手段は、前記連続画素検出手段により検出さ
れた連続画素数分前記画素データをシフトすることを特
徴とする二値画像圧縮装置。
3. A shift means for holding a predetermined number of bits of pixel data and shifting from a predetermined position by 1 bit, 1-bit pixel data output from the shift means, and pixel data 1 bit before this pixel data. A coincidence detecting means for detecting a coincidence with the coincidence detecting means, a counting means for counting the coincidence output detected by the coincidence detecting means, and an encoding means for outputting a predetermined code corresponding to the count value of the counting means. In the value image compression device, a continuous pixel detecting means for detecting the number of continuous pixels of pixels of which one byte or more is continuous in the pixel data of a predetermined bit, and the number of continuous pixels detected by the continuous pixel detecting means is counted by the counting means. Adding means for adding the value to the value, and the shift means is configured to add the pixel data for the number of consecutive pixels detected by the consecutive pixel detecting means. A binary image compression apparatus characterized by shifting data.
JP26252094A 1993-12-27 1994-10-26 Binary picture compression device Pending JPH07236065A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26252094A JPH07236065A (en) 1993-12-27 1994-10-26 Binary picture compression device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP33195293 1993-12-27
JP5-331952 1993-12-27
JP26252094A JPH07236065A (en) 1993-12-27 1994-10-26 Binary picture compression device

Publications (1)

Publication Number Publication Date
JPH07236065A true JPH07236065A (en) 1995-09-05

Family

ID=26545580

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26252094A Pending JPH07236065A (en) 1993-12-27 1994-10-26 Binary picture compression device

Country Status (1)

Country Link
JP (1) JPH07236065A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002354267A (en) * 2001-05-25 2002-12-06 Matsushita Electric Ind Co Ltd Image encoder, its method and storage medium
US6915017B2 (en) 2001-04-24 2005-07-05 Ricoh Company, Ltd. Image compression apparatus, image expansion apparatus, image forming apparatus, image compression method, image expansion method and storage medium
US7079691B2 (en) 2000-10-31 2006-07-18 Ricoh Company, Ltd. Method of and apparatus for encoding, method of and apparatus for decoding, and image forming apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7079691B2 (en) 2000-10-31 2006-07-18 Ricoh Company, Ltd. Method of and apparatus for encoding, method of and apparatus for decoding, and image forming apparatus
US7359557B2 (en) 2000-10-31 2008-04-15 Ricoh Company, Ltd. Method of and apparatus for encoding, method of and apparatus for decoding, and image forming apparatus
US6915017B2 (en) 2001-04-24 2005-07-05 Ricoh Company, Ltd. Image compression apparatus, image expansion apparatus, image forming apparatus, image compression method, image expansion method and storage medium
US7483586B2 (en) 2001-04-24 2009-01-27 Ricoh Company, Ltd. Image compression apparatus, image expansion apparatus, image forming apparatus, image compression method, image expansion method and storage medium
JP2002354267A (en) * 2001-05-25 2002-12-06 Matsushita Electric Ind Co Ltd Image encoder, its method and storage medium

Similar Documents

Publication Publication Date Title
US4800441A (en) Binary data compression and expansion processing apparatus
US4597016A (en) Encoding/decoding system
US4688100A (en) Video data encoding/decoding apparatus
JPS6223504B2 (en)
KR910000742B1 (en) Binary data compression and expansion processing apparatus
JPS60140981A (en) Method and device for decoding digital coded word of coded word system
US4918540A (en) System for encoding or decoding analog video signals
US3984833A (en) Apparatus for encoding extended run-length codes
JPH0460391B2 (en)
JPH07236065A (en) Binary picture compression device
JPH088647B2 (en) Run-length coding method and apparatus
US5452092A (en) Changing pixel detector for coding of image data
JPH04270569A (en) Data compression system for picture processor
JP2833743B2 (en) MH code decoder
JP2602401B2 (en) Image signal correction circuit
GB2269507A (en) Coding a video signal to facilitate aspect ratio conversion
JP3108243B2 (en) Encoding and decoding device
JPS6097777A (en) Facsimile equipment
KR900008807B1 (en) Picture segment changing circuit
JP2586143B2 (en) MH expansion circuit
JP3076363B2 (en) Encoding / decoding device
JPS59156073A (en) Data decoding device
JPS6252986B2 (en)
JPH053186B2 (en)
JPH05207303A (en) Encoding device