JPH03127554A - Picture coder - Google Patents

Picture coder

Info

Publication number
JPH03127554A
JPH03127554A JP26695389A JP26695389A JPH03127554A JP H03127554 A JPH03127554 A JP H03127554A JP 26695389 A JP26695389 A JP 26695389A JP 26695389 A JP26695389 A JP 26695389A JP H03127554 A JPH03127554 A JP H03127554A
Authority
JP
Japan
Prior art keywords
signal
line
pixel
change
white
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
JP26695389A
Other languages
Japanese (ja)
Other versions
JP2697923B2 (en
Inventor
Yuji Ishikawa
祐司 石川
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP26695389A priority Critical patent/JP2697923B2/en
Publication of JPH03127554A publication Critical patent/JPH03127554A/en
Application granted granted Critical
Publication of JP2697923B2 publication Critical patent/JP2697923B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To attain high speed processing by applying 2 kinds of signals at change points from white to black level and from black to white level as to a reference line and a signal representing a change point as to a coding line to plural stages of F/F and comparing outputs of the FFs so as to decide the coding mode of an MR code. CONSTITUTION:An AND gate 103 forms a change point signal caused with logical 1 of a Q output of a 1-bit D flip-flop (D-F/F) 101 and an inverse of an input picture element signal R, that is, taken as logical 1 for only a change picture element from black to white picture element on a reference line and an AND gate 104 forms a change point signal caused with logical 0 of an inverse of Q output of the 1-bit D flip-flop (D-F/F) 101 and the input picture element signal R, that is, taken as logical 1 for only a change picture element from white to blank picture element. On the other hand, an exclusive OR gate 105 exclusively ORs a Q output of a (D-F/F) 102 and an input picture element signal C on a coding line to form a change point signal in which a change pictured element from white to black and from black to white level is taken as logical 1. Then the three change point signals as above are compared to determine the MR coding mode. Thus, the high speed processing is attained.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はファクシミリ装置や画像ファイル装置等に用い
られる画像信号の画像符号化装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an image encoding device for image signals used in facsimile machines, image file devices, and the like.

〔従来の技術〕[Conventional technology]

従来、ファクシミリ装置等において、画像信号にMR(
モディファイドREAD)符号化処理を行う場合、符号
化ラインの起点画素をa。とじ、a。
Conventionally, in facsimile machines etc., MR (MR) is applied to image signals.
Modified READ) When performing encoding processing, the starting pixel of the encoding line is a. Binding, a.

以後の最初の反対色への変化点をal、同様に参照ライ
ンにおいて、起点画素a。の直上の画素をす。
The first point of change to the opposite color thereafter is al, and similarly on the reference line, the starting pixel a. The pixel directly above the

とじ、以後の最初の反対色への変化点b1、bI以後の
a。と同一色への変化点をb2とする。そして、垂直、
水平、バスの3種の符号化モードを決定するために距離
aOaI+  bob、、bob2を計数したのち、こ
れらの計数結果を比較し、算術演算する古注がとられて
いた。
Binding, first change point b1 to the opposite color thereafter, a after bI. Let b2 be the point of change to the same color as . And vertically,
In order to determine the three types of encoding modes (horizontal and bus), distances aOaI+bob, , bob2 were counted, and then these counting results were compared and arithmetic operations were performed.

「発明が解決しようとしている課題3 以上のように、従来例ではMR符号の符号化モードを決
定するには複数のカウンタと、それらのカウント結果の
差分を求めるための比較器、又、次の符号化に備え、こ
れらのカウント結果をその符号モートに応じて加工し、
記憶するという複数の手順が必要となる為、これらの処
理はマイクロコンピュータを用いたプログラム制御によ
り行われていた。
``Problem to be Solved by the Invention 3 As described above, in the conventional example, in order to determine the encoding mode of the MR code, a plurality of counters, a comparator for calculating the difference between the count results, and the following In preparation for encoding, these count results are processed according to the code mode,
Since multiple steps of memorization are required, these processes were performed under program control using a microcomputer.

そして、l変化点の符号化モードの決定には少なくとも
数クロックを要し、変化点の発生頻度が高くなると、処
理速度もそれに応じて遅くなる欠点があった。
Furthermore, it takes at least several clocks to determine the encoding mode for l change points, and as the frequency of occurrence of change points increases, the processing speed also slows down accordingly.

〔課題を解決するための手段〕[Means to solve the problem]

本発明は以」二の点に鑑みてなされたもので、複雑な算
術演算等を行うことなく、高速に画像の符号化を行うこ
とを目的とし、詳しくは、参照ラインの画素の白から黒
への変化点を表わす第1信号及び黒から白への変化点を
表わす第2信号を伝達する第1伝達手段と、符号化ライ
ンの画素の色の変化点を表わす第3信号を伝達する第2
伝達手段と、符合化すべき画素位置を参照ラインの変化
点が通過したか否かを検出する検出手段と、符号化ライ
ンの同一色の画素の連続数を計数する計数手段と、符号
化の基点画素の色に応じて前記第1伝達手段により伝達
されている第1.第2信号の一方を選択する選択手段と
、前記検出手段の出力と前記選択手段の出力と前記第2
伝達手段により伝達される第3信号とにより符号化モー
ドを決定する決定手段とを有する画像符号化装置を提供
するものである。
The present invention has been made in view of the following two points, and aims to encode an image at high speed without performing complicated arithmetic operations. a first signal representing a change point from black to white and a second signal representing a change point from black to white; 2
a transmission means, a detection means for detecting whether a change point on a reference line has passed through a pixel position to be encoded, a counting means for counting the number of consecutive pixels of the same color on an encoding line, and a base point for encoding. The first . selection means for selecting one of the second signals, an output of the detection means, an output of the selection means and the second signal;
The present invention provides an image encoding device having a third signal transmitted by the transmitting means and a determining means for determining the encoding mode based on the third signal transmitted by the transmitting means.

〔実施例〕〔Example〕

以下、本発明を好ましい実施例を用いて説明する。 The present invention will be explained below using preferred embodiments.

まず、具体的な実施例構成の前に、ファクシミリ装置等
に用いられているモディファイドREAD(MR)符号
について簡単に説明を行う。
First, before discussing the specific configuration of the embodiment, a brief explanation will be given of the modified READ (MR) code used in facsimile machines and the like.

CCITTのMR符号に関する勧告T4において、2次
元符号化時の変化点が以下の如く定義される。
In CCITT's Recommendation T4 regarding MR codes, changing points during two-dimensional encoding are defined as follows.

a(、−符号化ラインの符号化起点画素a1−上記a。a(, - coding starting pixel a1 of the coding line - a above.

の右側の最初の変化点 a、 2−一上記a1の右側の最初の変化点す、−上記
a。より右で、aQと反対の色を持つ参照ライン上の最
初の変化点 b2−上記す、の右の参照ラインの最初の変化点この様
に定義されたa。、al、a2は符号化ライン上に有り
、又、同じ<b、及びb2は参照ライン上に有る。そし
て、これらのa。+  a l r  a 2のグルー
プとす、、b2のグループの相対位置(距離)により、
符号化モードを次の3つのモードのうちから一義的に選
択し、符号化するよう規定されている。
The first change point a on the right side of 2--The first change point on the right side of a1 above.-a above. The first change point on the reference line to the right and having the opposite color to aQ, b2 - the first change point on the reference line to the right of above, a thus defined. , al, a2 are on the encoding line, and the same <b, and b2 are on the reference line. And these a. + a l r a According to the relative position (distance) of the group 2 and the group b2,
It is specified that the encoding mode is uniquely selected from the following three modes and encoding is performed.

(+)バスモード(Pモード) b2がalより左にある時(発生コードは1種のみ) (2)垂直モード(Vモード) albl l≦3の時(発生コードは距離ごとに違う計
7種の発生コード) (3)水平モード(Hモード) 上記(1) (2) B外の時(ラン・レングス・コー
ド表に従う) 形式:H+M (a Oa 1) +M (a + a
 2)ここで、HはHモードを示すコード、M(a。
(+) Bus mode (P mode) When b2 is to the left of al (there is only one generation code) (2) Vertical mode (V mode) When albl l≦3 (a total of 7 generation codes differ depending on the distance) Seed occurrence code) (3) Horizontal mode (H mode) Above (1) (2) When outside B (according to the run length code table) Format: H + M (a Oa 1) +M (a + a
2) Here, H is a code indicating H mode, M(a.

a+)は白又は黒の1aoa、lのランレングス・コー
ド、M(ala2)は黒又は白のl a 1a 2のラ
ンレングス・コードである。
a+) is a run-length code of 1 aoa, 1 for white or black, and M(ala2) is a run-length code of 1 a 1 a 2 for black or white.

但し、上記(1)、  (2)、  (3)のうち2モ
一ド以上が同時に満たされた場合には、 (1) Pモード> (2) Vモード> (3) H
モードの順位で優先される。
However, if two or more of the above modes (1), (2), and (3) are satisfied at the same time, (1) P mode > (2) V mode > (3) H
Priority is given in order of mode.

第4図は本実施例の基本動作を説明する図である。FIG. 4 is a diagram explaining the basic operation of this embodiment.

第4図(a)は起点画素a。が白である場合の符号化を
例とし、実際の画素データの位置関係を示すものである
FIG. 4(a) shows the starting pixel a. This shows the actual positional relationship of pixel data, taking as an example the encoding when the pixel is white.

C,Rは変化画素信号であり、Cは符号化ラインにおけ
る変化画素を1で、その他画素をOで表わす符号化ライ
ンのデータであり、更にC1は符号化対象画素を示し、
coが1の場合符号化対象画素が変化点であることを表
わす。またRは、参照ラインにおける白から黒への変化
点の画素を1で、その他画素を0で表わす参照ラインの
データであり、更にR,はC1の直上の参照画素を示し
、Rn−3、Rn+3はそれぞれRnに対し左に3画素
、右に3画素離れていることを示す。
C and R are changed pixel signals, C is coding line data in which changed pixels in the coding line are represented by 1 and other pixels are represented by O, and C1 represents the pixel to be encoded,
When co is 1, it indicates that the pixel to be encoded is a change point. In addition, R is reference line data in which the pixel at the point of change from white to black on the reference line is represented by 1, and other pixels are represented by 0, and R, represents the reference pixel immediately above C1, and Rn-3, Rn+3 indicates that they are 3 pixels to the left and 3 pixels to the right of Rn, respectively.

又、RBIはR1が一担1になると1となるデータであ
り、その状態を保持するものとし、RtarはRn−3
より左側に1(即ち白から黒への変化点)が存在するこ
とを示すデータである。
Also, RBI is data that becomes 1 when R1 becomes 1, and this state is maintained, and Rtar is Rn-3.
This data indicates that 1 (that is, the point of change from white to black) exists on the left side.

一方、RB2はR1−3〜Rn+3とは逆に、参照ライ
ンにおいて、黒から白への変化点を1で表わすデータで
あり、Cnの直上に相当する画素を示すものとする。
On the other hand, contrary to R1-3 to Rn+3, RB2 is data that represents the point of change from black to white in the reference line with 1, and indicates a pixel immediately above Cn.

今、第4図(b)の状態にある参照ライン、符号化ライ
ンの上述の変化画素信号C及びRを走査ラインの左から
右にシフトしていくとすると、MR符号の水平、垂直、
バスの各モードはそれぞれ第4図(b)〜(h)に分類
される。このときRtarは変化点す、がCnに対し、
左3画素以上離れたところに存在したことを示し、又、
RBIは変化点b1がCnの直上をすでに通過したこと
を示すことになる。
Now, if we shift the above-mentioned change pixel signals C and R of the reference line and the encoded line in the state shown in FIG. 4(b) from the left to the right of the scanning line, the horizontal, vertical,
Each mode of the bus is classified into FIGS. 4(b) to 4(h). At this time, Rtar is a change point, but with respect to Cn,
Indicates that the object was located more than 3 pixels away from the left, and
RBI indicates that the change point b1 has already passed directly above Cn.

第4図(b)は垂直モードのV R(3)の場合である
FIG. 4(b) shows the case of VR(3) in vertical mode.

Rfar = O、Rn−3= 1であることから、R
n−3が変化点す、であると判定し、このときC,=1
、つまりalを検出したことになる。なお、図中*マー
クはその内容が0. 1いずれでもかまわないことを示
す。
Since Rfar = O, Rn-3 = 1, R
It is determined that n-3 is the change point S, and at this time C,=1
, that is, al has been detected. Note that the * mark in the diagram indicates that its content is 0. 1 Indicates that either one is acceptable.

同様にして第4図<c>はV R(2)、(d)はV 
L (2)、(e)はV t、 (3)をあられす。
Similarly, FIG. 4 <c> shows VR(2), and (d) shows V
L (2), (e) hail V t, (3).

第4図(f)は水平モードとなる第1の場合であり、変
化点す、がR1−3〜Rn+3にあられれる以前に、C
,=1つまりa、を検出した場合である。また、(g)
は水平モートとなる第2の場合であり、Rfar ””
 1 。
FIG. 4(f) shows the first case where the horizontal mode occurs, and before the change point S occurs at R1-3 to Rn+3,
,=1, that is, a is detected. Also, (g)
is the second case, which is a horizontal mote, and Rfar ""
1.

Cn二1、つまりalより3画素をこえた左側にblが
ある場合である。
This is the case where bl is located on the left side of Cn21, that is, more than three pixels from al.

第4図(h)はパスモードとなる場合てあり、RIn=
l、  Cr+=0.  RB2:I、つまりalを検
出する以前にす、、b2を検出したことを示す。
Fig. 4(h) shows the case where it becomes a pass mode, and RIn=
l, Cr+=0. RB2:I, that is, it indicates that before detecting al, b2 was detected.

第1図、第2図、第3図は以上に述べた基本動作を具体
化した回路の実施例である。なお、これらの図中の全て
のフリップフロップ及びカウンタは1ラインの開始毎に
リセットされ、また全てが共通のクロック信号により同
期して動作するものであり、回路図中では簡略化の為、
図示しない。
FIG. 1, FIG. 2, and FIG. 3 are examples of circuits embodying the basic operation described above. Note that all flip-flops and counters in these diagrams are reset at the start of each line, and all operate synchronously using a common clock signal.
Not shown.

第1図において、101. 102は1ビツトDフリツ
プフロツプ(以下F/Fと略記)、109. 1.10
111、.112は4ビツトD  F/F、115,1
16,117は2ビツトD  F/F、118〜122
はJ−K  F/F。
In FIG. 1, 101. 102 is a 1-bit D flip-flop (hereinafter abbreviated as F/F); 109. 1.10
111,. 112 is 4-bit D F/F, 115,1
16,117 are 2-bit D F/F, 118 to 122
is J-K F/F.

132、 133は2tolセレクタ(反転出力)、1
34は2tolセレクタ(非反転出力)である。
132, 133 are 2tol selectors (inverted output), 1
34 is a 2tol selector (non-inverted output).

また、入力信号Rは参照ラインの2値シリアル画素信号
、入力信号Cは符号化ラインの2値シリアル画素信号、
入力信号Aはlライン開始時から1となり、終端画素の
次からはOとなる1ラインの終了位置表示信号、入力信
号DETは符号モードが決定した時0となる信号である
In addition, the input signal R is a binary serial pixel signal of the reference line, the input signal C is a binary serial pixel signal of the encoding line,
The input signal A is a signal indicating the end position of one line, which becomes 1 from the start of the l line and becomes O from the end pixel onward.The input signal DET is a signal which becomes 0 when the code mode is determined.

出力信号C0LORは符号化起点画素a。の色を示す信
号、出力信号ENDは1ラインの終端まで符号化が終了
したことを示す信号、出力信号ENは第3図のランレン
グスカウンタのカウントを許可する信号、出力信号C1
清口〜清肩、酊tax Bl、 B2は第4図に示す各
画素信号に相当する信号である。
The output signal C0LOR is the encoding starting pixel a. Output signal END is a signal indicating that encoding has been completed up to the end of one line. Output signal EN is a signal that allows the run length counter in Fig. 3 to count. Output signal C1
Kiyokuchi to Kiyoshita, drunken tax Bl, and B2 are signals corresponding to each pixel signal shown in FIG. 4.

なお、2値の画素信号は白画素時01黒画素時lとする
Note that the binary pixel signal is 0 for a white pixel and 1 for a black pixel.

以下、動作を説明する。The operation will be explained below.

D−F/FIO1,,102はそれぞれ入力画素信号R
1Cに対し1画素前の状態を保持する。
D-F/FIO1, 102 are input pixel signals R, respectively.
The state of one pixel before 1C is maintained.

ANDゲート103はD−F/F1olのQ出力が1で
、入力画素信号Rの反転信号がIのとき、即ち、参照ラ
イン上における黒画素から白画素への変化画素のみを1
とし、また、ANDゲート104はDF/FIOIのq
出力がOて、入力画素信号Rが1のとき、即ち、参照ラ
イン上における白画素から黒画素への変化画素のみを1
とする変化点信号を作る。
When the Q output of D-F/F1ol is 1 and the inverted signal of the input pixel signal R is I, the AND gate 103 selects 1 only for pixels that change from black pixels to white pixels on the reference line.
And, AND gate 104 is q of DF/FIOI
When the output is O and the input pixel signal R is 1, that is, only the pixels that change from white pixels to black pixels on the reference line are set to 1.
Create a changing point signal.

一方、符号化ラインの画素は号については、排他的OR
ケ−1−105i:テD−F/F1.02 ノQ出力と
入力画素信号Cとの排他的ORをとることにより白から
黒、又黒から白への変化画素を1とする変化点信号を作
る。
On the other hand, for the pixels of the encoded line, exclusive OR
K-1-105i: Te D-F/F1.02 By taking the exclusive OR of the Q output and the input pixel signal C, a change point signal is obtained in which a pixel that changes from white to black or from black to white is set to 1. make.

次にORゲート106,107,108は1ラインの開
始時から1となり、終端画素以降Oとなる終了位置表示
信号Aにより入力画素信号にかかわりなく、終端画素以
降の変化点信号を強制的に1とする為のものである。こ
れによりMR符号化の規則である「終端画素の直後に仮
想変化点を置く」という条件を満たす。
Next, the OR gates 106, 107, and 108 are set to 1 from the start of one line and become O after the end pixel.The end position display signal A forces the change point signal after the end pixel to 1 regardless of the input pixel signal. This is for the purpose of This satisfies the MR encoding rule of "placing a virtual change point immediately after the end pixel."

以上の3つの変化点信号と、1ラインの有効画素範囲て
のみ1となる終了位置表示信号Aは、4ピツ) 11)
−F/F109〜112により順次伝達される。
The above three change point signals and the end position display signal A, which is 1 only in the effective pixel range of one line, are 4 pins) 11)
- Sequentially transmitted by F/Fs 109 to 112.

今、符号化対象画素をD−F/F112のQ3出力であ
るC1とすると、F/F109の出力Ql、Q2は参照
ライン上において、上記符号化対象画素Cnに対し、主
走査ライン上で3画素右に位置する画素の状態を示すこ
とになる。同様にF/FII0,111゜11、2の各
Ql、Q2出力は、それぞれ符号化対象画素の右側2画
素目、1画素目及び直上の参照ライン上の画素の状態を
示す。又、F/F112の出力Q4はランレングスカウ
ンタのカウントイネーブル信号となる。
Now, if the pixel to be encoded is C1 which is the Q3 output of the D-F/F 112, the outputs Ql and Q2 of the F/F 109 are 3 on the main scanning line with respect to the above pixel to be encoded Cn on the reference line. This indicates the state of the pixel located to the right of the pixel. Similarly, the Ql and Q2 outputs of F/FII0, 111°11, and 2 indicate the states of the second pixel, the first pixel, and the pixel on the reference line immediately above the pixel to be encoded, respectively, on the right side of the pixel to be encoded. Further, the output Q4 of the F/F 112 becomes a count enable signal for the run length counter.

一方、2ビツトのD−F/F115,116,117は
4ビットD−F/F112の出力Ql、Q2を順次伝達
するもので、符号化対象画素Crlに対し、参照ライン
における左側1画素目、2画素目、3画素目の画素の状
態を示す。これらのF/F115. 116. 117
の入力にあるANDゲート124〜129は、−旦符号
化モードが決定した際に、これらのF / F 115
 。
On the other hand, the 2-bit DF/Fs 115, 116, and 117 sequentially transmit the outputs Ql and Q2 of the 4-bit DF/F 112. The state of the second and third pixels is shown. These F/F115. 116. 117
AND gates 124 to 129 at the inputs of these F/Fs 115 when the encoding mode is determined.
.

116.117にある変化点情報を全てクリアする為の
ゲートである。
This is a gate to clear all the change point information in 116 and 117.

J’−K  F/F118,119は4ビットD−F/
F1]、1の出力Ql、Q2をJ入力とし、1符号化モ
ードの検出中に参照ラインの変化点b が符号化対象画
素位置を通過したか否か(4ビットD−F/F112に
入力したか否か)を検出するゲートである。
J'-K F/F118, 119 are 4-bit D-F/
F1], the outputs Ql and Q2 of 1 are used as J inputs, and the change point b of the reference line passes through the pixel position to be encoded during the detection of 1 encoding mode (input to 4 bit D-F/F112) This is a gate that detects whether the

J−KF/F120は4ビットD−F/F112の出力
Q3を入力とし、符号化起点画素a。の色を判別するも
のであり、信号Cnに変化点lが出現するごとに白/黒
(Q出力)を反転する。この色情報により、上記参照ラ
インの変化点情報に対し、白から黒への変化点情報か、
黒から白への変化点情報かのいずれを参照すべきか選択
する。
The J-KF/F 120 receives the output Q3 of the 4-bit DF/F 112 as an encoding starting pixel a. , and inverts white/black (Q output) every time a change point l appears in the signal Cn. Based on this color information, the change point information from white to black can be determined from the change point information of the above reference line.
Select whether to refer to the change point information from black to white.

J−に、 F / F ]、 21. 、 122はF
/F117の出力Ql。
J-, F/F], 21. , 122 is F
/F117 output Ql.

Q2を入力とし、注目画素に対応した変化点信号Cnに
対し4画素以上左側に変化点があったことを検出するゲ
ートである。従って、Cn”1となる以前、つまり符号
化ラインの変化点a、を検出する前に、当F/F121
の出力Qが0となると垂直モードの符号化はありえない
ことになる。
This is a gate that receives Q2 as an input and detects that there is a change point to the left of four or more pixels with respect to the change point signal Cn corresponding to the pixel of interest. Therefore, before Cn"1, that is, before detecting the change point a of the encoded line, the current F/F 121
When the output Q of becomes 0, vertical mode encoding is impossible.

132〜134は、上記F/F120の出力である色表
示信号COL ORにより、へ入力及びB入力に夫々印
加されている2種類の参照ライン信号のいずれかを選択
するセレクタ回路である。
132 to 134 are selector circuits that select one of the two types of reference line signals applied to the input and the B input, respectively, based on the color display signal COLOR output from the F/F 120.

ANDゲート135はF/Fillの出力Ql、  Q
2がいずれも1となったときに1出力を行う終了検出回
路である。即ち、通常は白から黒への変化と、黒から白
への変化が同時に発生することはなく、lラインの終了
時にのみORゲート106,107により両変化点信号
が共に1とされるので、当ANDゲート135の出力が
1になる。従って、これに基づいてlラインが終了する
ことを検出できる。J−KF/F136は他回路との同
期をとる為であり、Q出力=lとなることでEOLコー
ドを作成すべきであることを示す。又、反転出力Qは後
述する第3図のランレングスカウンタの最下位ビットの
りロード入力に接続される。これにより、ランレングス
のカウント値は通常の起点画素a。ごとに1からカウン
トを始めるが、例外として水平モードにおける第1のラ
ンで1ラインの終端に達した場合の第2のランを0とす
ることができる。
AND gate 135 outputs Ql and Q of F/Fill.
This is an end detection circuit that outputs 1 when both 2 become 1. That is, normally, the change from white to black and the change from black to white do not occur at the same time, and both change point signals are set to 1 by the OR gates 106 and 107 only at the end of the l line. The output of this AND gate 135 becomes 1. Therefore, based on this, it is possible to detect the end of the l line. The J-KF/F 136 is for synchronizing with other circuits, and the Q output=l indicates that an EOL code should be created. Further, the inverted output Q is connected to the least significant bit load input of a run length counter shown in FIG. 3, which will be described later. As a result, the run length count value is the normal starting pixel a. However, as an exception, if the first run in the horizontal mode reaches the end of one line, the second run can be set to 0.

以上のようにして、第4図に示す各信号に相当するもの
が当回路により得られる。
In the manner described above, signals corresponding to the signals shown in FIG. 4 are obtained by this circuit.

第2図は、上記第1図の回路により得られた変化点情報
Cn 、 Rn−3〜Rn+3 、 Rfy 、  B
 1 、  B 2を元に、M R符号の垂直vn1水
平H1バスPの各モードのいずれで符号化すべきかを決
定する回路である。
FIG. 2 shows change point information Cn, Rn-3 to Rn+3, Rfy, B obtained by the circuit shown in FIG.
This circuit determines which of the vertical VN1 and horizontal H1 bus P modes of the MR code should be encoded based on the MR code.

図中、201はプライオリティエンコーダであり、垂直
モードで符号化すべき場合に7つの垂直モードにいずれ
かを3ビツトコードで出力する。J −KF/F202
は水平モードを検出した場合、これにより符号化される
2つのランレングスが終了するまで他の符号化モードと
なることを禁止する為のものである。
In the figure, 201 is a priority encoder, which outputs one of the seven vertical modes as a 3-bit code when encoding is to be performed in the vertical mode. J-KF/F202
is for prohibiting other encoding modes until the two run lengths encoded by this are completed when the horizontal mode is detected.

垂直モードとなる条件は、変化点a、、b1の相対距離
が3画素以下であるので、これはRfar = L 。
The condition for vertical mode is that the relative distance between the change points a, b1 is 3 pixels or less, so Rfar = L.

Cn=1のとき、Rn−3〜Rn+3のいずれかがOと
なることに相当し、出力V2.V、、Voにそのモード
に相当するコードを出力する。203はr;及びCI+
がともに1であることを検出するためのNANDゲート
である。
When Cn=1, this corresponds to one of Rn-3 to Rn+3 being O, and the output V2. A code corresponding to the mode is output to V, , Vo. 203 is r; and CI+
This is a NAND gate for detecting that both are 1.

水平モードとなる条件は、変化点a1に対しblがその
左側4画素以上の場合と、右側4画素以上の場合の2つ
があるが、前者はr;二〇で、後者はlτfar = 
1 、  Rn−3〜Rn+3 = 1となるときに相
当し、ANDゲート204の出力が1となるとき水平モ
ードであると決定する。
There are two conditions for the horizontal mode: when bl is 4 or more pixels on the left side of the change point a1, and when bl is 4 pixels or more on the right side.The former is r; 20, and the latter is lτfar =
1, Rn-3 to Rn+3 = 1, and when the output of the AND gate 204 becomes 1, it is determined that the mode is the horizontal mode.

パスモードの場合は変化点alを検出しないまま変化点
す、、b2を検出した場合であり、当回路においてはC
n=0.B1=1.B2=1の条件が成立するときてあ
り、ANDゲート205の出力を1とすることでパスモ
ードであることを示す。
In the case of pass mode, the change point al is detected without detecting the change point al, b2 is detected, and in this circuit, C
n=0. B1=1. There are times when the condition B2=1 is satisfied, and setting the output of the AND gate 205 to 1 indicates the pass mode.

出力信号DETは何らかのモードが確定したことを示す
信号であり、符号化ラインの変化点は必らず何らかのモ
ードで符号化されるので、まずC1=1となる場合と、
パスモードが成立した場合のいずれかのとき、ORゲー
ト206の出力を1としてDET=1となる。信号DE
Tはモードが1つ確定するごとに第1図、第3図の回路
中の所定部分を初期化するへの信号である。
The output signal DET is a signal indicating that some mode has been determined, and since the changing point of the encoding line is always encoded in some mode, first, there is a case where C1=1, and a case where C1=1.
When the pass mode is established, the output of the OR gate 206 is set to 1, and DET=1. Signal DE
T is a signal for initializing a predetermined portion in the circuits of FIGS. 1 and 3 each time one mode is determined.

第3図は水平モードの符号化に用いるランレングスカウ
ンタの実施例である。
FIG. 3 is an example of a run length counter used for horizontal mode encoding.

301〜304は4ヒツトのバイナリ同期カウンタであ
り、信号1NiTは第1図のJ−K  F/F136の
q出力、信号DETは第2図のインバータ207の出力
、信号ENは第1図D−F/F112のQ4出力である
301 to 304 are 4-hit binary synchronous counters, the signal 1NiT is the q output of the JK F/F 136 in FIG. 1, the signal DET is the output of the inverter 207 in FIG. 2, and the signal EN is the D- in FIG. This is the Q4 output of F/F112.

以下、動作を説明する。The operation will be explained below.

まず、1ラインの符号化開始時、カウンタ30】〜30
41を前記第1図、第2図の全てのF/Fと共にリセッ
トされる。以後、符号化ラインの画素入力に対応したク
ロックCKをカウントし、1クロツクごとに1加算され
るが、入力信号ENにより1ラインの最初の画素が第1
図D−F/F112のQ3出力に出現するまでカウント
動作は禁止される。
First, at the start of encoding one line, the counter 30] to 30
41 is reset together with all the F/Fs shown in FIGS. 1 and 2. After that, the clock CK corresponding to the pixel input of the encoding line is counted, and 1 is added for each clock, but the input signal EN causes the first pixel of one line to be
The counting operation is inhibited until it appears at the Q3 output of the D-F/F112.

又、第2図の回路により符号化モードが決定するごとに
、入力信号DETにより当カウンタには初期値がロード
される。ロードされる初期値はすでにのべたとおり、信
号1NiTによりエラインの途中では】、lライン終端
後では0となる。
Further, each time the encoding mode is determined by the circuit shown in FIG. 2, an initial value is loaded into this counter by the input signal DET. As already mentioned, the initial value to be loaded is 1 in the middle of the line due to the signal 1NiT, and 0 after the end of the 1 line.

基本動作は以上のとおりであるが、ANDゲート305
により当実施例の16ビツトカウンタは、OA 3 F
 Hの次は1040Hと計数する。以後、下位12ビツ
トがA3FHとなった次は最下位4ビツトが1加算され
、下位12ビツトは040 Hに初期化される。
The basic operation is as described above, and the AND gate 305
Therefore, the 16-bit counter of this embodiment is OA 3 F
The next number after H is counted as 1040H. Thereafter, when the lower 12 bits become A3FH, the lowest 4 bits are incremented by 1, and the lower 12 bits are initialized to 040H.

このような構成にすることにより、CC1TT勧告T4
によるメークアップランレングスの最大値は2560画
素であり、これ以上の長さのランを表わすには2560
の拡張メークアップコードにつづけて、さらに他のメー
クアップコードを付加することが行なわれる。従って、
当カウンタの最下位6ビツト(カウンタ301のQ A
 −Q o 、カウンタ302のQA。
With this configuration, CC1TT Recommendation T4
The maximum value of the makeup run length is 2560 pixels, and to represent a run longer than this, 2560 pixels is required.
Following the extended makeup code, another makeup code is added. Therefore,
The lowest 6 bits of this counter (Q A of counter 301
−Q o , QA of counter 302;

QB)はターミネイトランレングスを表わし、中位6ビ
ツト(カウンタ302のQC,QD、カウンタ303の
Q^〜QD)は64から2560までのメークアップラ
ンレングスを表わし、最上位4ビツト(カウンタ304
のQへ〜QD)はメークア゛ンブランレングス2560
の回数を表わすことになる。
QB) represents the terminated run length, the middle 6 bits (QC, QD of counter 302, Q^~QD of counter 303) represent the makeup run length from 64 to 2560, and the most significant 4 bits (counter 304
Q to QD) is the makeup ensemble length 2560
It represents the number of times.

尚、このような構成でなく単なるバイナリカウンタでカ
ウントすると、カウント値をAOOHて割り算をしなけ
ればならな(なる。又、最上位4ビツトへの桁上げを9
3FHでなく、A3FI(とすることにより拡張メーク
アップRLが0以外のとき、メークアップRL部分が0
となることを防ぐことができる。
Note that if you count with a simple binary counter instead of this configuration, you will have to divide the count value by AOOH.
By setting A3FI (not 3FH), when extended makeup RL is other than 0, makeup RL part is 0.
This can be prevented.

第5図は、第1図、第2図、第3図に示す実施例におけ
る主要な信号のタイミングチャートである。
FIG. 5 is a timing chart of main signals in the embodiments shown in FIGS. 1, 2, and 3.

第5図中、CI(は回路中の全てのF/F及びカウンタ
を駆動するクロック、酊1は1ラインの開始ごとに1パ
ルスLowになるトリが信号で、これにより全てのF 
/ Iiカウンタはリセットされる。
In Figure 5, CI (is a clock that drives all F/Fs and counters in the circuit, and 1 is a signal that goes low with one pulse at each start of one line, which causes all F/Fs and counters to drive.
/Ii counter is reset.

R及びCは夫々黒画フ=l、白画素=0とする上記クロ
ックCKに同期したシリアルな参照ライン信号及び符号
化ライン信舅、Aは上記CLRによりlとなり、1ライ
ンの所定長さ以後Oとなる終端指示信号、Cnは符号化
対象となる符号化ラインの変化点信号、DETは符号化
モードが確定したことを示す出力信号、■2〜■oは垂
直モードである場合、lから7のコードでそれを示す出
力信号、Hは水平モートである場合1となる出力信号で
、H=1となったときカウンタ出力RLの値と、COL
 OR信号の出力が水平モード時の第1のランレングス
を示し、また第2のランレングスはDET=1.、V2
〜Vo、H,P=OのときのRT−の値で示される。
R and C are serial reference line signals and encoded line signals synchronized with the clock CK with black pixel = 1 and white pixel = 0, respectively, A is set to 1 by the above CLR, and after a predetermined length of one line. 0 is the termination instruction signal, Cn is the change point signal of the encoding line to be encoded, DET is the output signal indicating that the encoding mode has been determined, ■2 to ■o are the vertical mode, from l to The output signal indicates this with a code of 7, H is an output signal that becomes 1 when it is a horizontal mode, and when H = 1, the value of the counter output RL and COL
The output of the OR signal indicates the first run length in horizontal mode, and the second run length is DET=1. , V2
~Vo, H, is indicated by the value of RT- when P=O.

Pはバスモート時、lとなる出力信号、RLは第3図に
示すカウンタのカウント値、C0LORは起点画素a。
P is an output signal that becomes l during bus mode, RL is the count value of the counter shown in FIG. 3, and C0LOR is the starting pixel a.

の色を示す信号、E N Dは1ラインの符号化終了時
1とすることでEOL符号が必要であることを示す出力
信号である。
E N D is an output signal indicating that an EOL code is required by setting it to 1 at the end of encoding one line.

以下、順を追って説明する。The following is a step-by-step explanation.

まず、CLR信号により第3図示のランレングスカウン
タのカウンタRLはOに初期化される。符号化ラインの
最初の変化点である2画素目は変化点す、より左3画素
であるから、CK6において、DET=1.V 2〜V
 o=1となることでV L (3)を示す。この後、
カウンタRLは1に初期化されると共に、C0LORが
反転しlとなる。
First, the counter RL of the run length counter shown in the third diagram is initialized to O by the CLR signal. The second pixel, which is the first change point of the encoded line, is three pixels to the left of the change point, so at CK6, DET=1. V2~V
By setting o=1, V L (3) is indicated. After this,
The counter RL is initialized to 1, and C0LOR is inverted to 1.

次はCK 8において、DET=1.H=1.RL二2
COLOR=1となり、水平モードであり、第1のラン
I/・ングスは黒2であることを示す。これに続く第2
のランレングスはCK11において、D E T = 
1. 。
Next, at CK 8, DET=1. H=1. RL22
COLOR=1, indicating that the mode is horizontal and that the first run I/··ngs is black 2. The second following this
The run length of is D E T =
1. .

RL=3.C0LOR=Oとなることて白画素3となる
RL=3. Since C0LOR=O, it becomes white pixel 3.

CK 14ではDET=1.P=1となることでパスモ
ードを示す。
At CK 14, DET=1. P=1 indicates pass mode.

lラインの最後では終了信号AがOとなることにより、
変化点信号であるORゲート1.07. 1.06゜1
08の全ての出力が1となる。これは終端画素の次に仮
想変化点を置くことと等価であり、CK=tにおいて、
DET=1.■2〜Vo=4となることにより垂直モー
ドV。であることが示される。又、これと同時にEND
 信号も1となり、1ラインがこの符号で終了すること
を示す。
At the end of the l line, the end signal A becomes O, so
OR gate 1.07 which is a change point signal. 1.06゜1
All outputs of 08 become 1. This is equivalent to placing a virtual change point next to the end pixel, and at CK=t,
DET=1. ■Vertical mode V by setting 2 to Vo=4. It is shown that Also, at the same time, END
The signal also becomes 1, indicating that one line ends with this code.

前記実施例は、MR符号の2次元符号化時について述べ
たが、〜i M R符号化にも適用でき、また、参照ラ
インとして入力する画像データを0に固定し、■2〜o
、  H,Pの各信号出力を禁止することにより、1次
元符号化時にも応用できる。
The above embodiment has been described for two-dimensional encoding of MR code, but it can also be applied to ~i MR encoding, and if the image data input as a reference line is fixed to 0,
By inhibiting the output of each of the , H, and P signals, this method can also be applied to one-dimensional encoding.

又、符号化ラインの信号として参照ラインと同様に、白
から黒、黒から白それぞれの変化点を示す2種の信号を
用い、起点画素a。の色に応じて選択しても同様な効果
が得られる。又、このとき1ラインの終端の検出条件と
して符号化ライン側の2種の信号が共にlとなる条件を
用いることもできる。
Further, as with the reference line, two types of signals indicating the change points from white to black and from black to white are used as the signals of the encoded line, and the starting pixel a is determined. A similar effect can be obtained by selecting the color according to the color. Further, at this time, as a condition for detecting the end of one line, it is also possible to use a condition in which both of the two types of signals on the encoded line side are l.

1ラインの終端の検出方法としては、他に第1図のF/
F112の出力Q−1が1から0に変化した時とするこ
ともできる。
Another method for detecting the end of one line is the F/
It can also be set as the time when the output Q-1 of F112 changes from 1 to 0.

以上説明したとおり、参照ラインについては白から黒へ
の変化点、黒から白への変化点の2種の信号と、符号(
ヒラインについては変化点を表わす信号を複数段のF/
Fを伝達し、それらの出力を比較するだけで何らの算術
演算をすることなく、MR符号の符号化モードを決定で
きるので、非常に高速な処理が可能となる。
As explained above, the reference line has two types of signals: the point of change from white to black and the point of change from black to white, and the sign (
For the hill line, the signal representing the change point is transmitted through multiple stages of F/
The encoding mode of the MR code can be determined simply by transmitting F and comparing their outputs without performing any arithmetic operations, making it possible to perform extremely high-speed processing.

又、lラインの最終画素以降、前記3種の変化点信号を
全て1とすることにより、符号化に必要な仮想変化点が
設定できると共に、前記参照ラインの2種の変化点信号
が同時に1になる時がlラインの終端であることを表わ
すことになり、鎖車な方法で1ラインの終了条件を設定
できる。
Furthermore, by setting all of the three types of change point signals to 1 after the last pixel of the l line, a virtual change point necessary for encoding can be set, and the two types of change point signals of the reference line are set to 1 at the same time. This means that the end of the l line is reached when the line is reached, and the end condition for one line can be set using a chain wheel method.

又、前述のようなランレングスカウンタを構成すること
により、ランレングスが2560を超える場合、ランレ
ングス゛のカウント結果をいくつのメークアップランレ
ングスで組合わせるべきがの算術演算をする必要がない
Furthermore, by configuring the run length counter as described above, when the run length exceeds 2560, there is no need to perform an arithmetic operation on how many make-up run lengths should be used to combine the count results of the run lengths.

〔発明の効果〕〔Effect of the invention〕

以上説明した様に、本発明によると、参「過ラインの画
素の白から黒への変化点を表わす第1震号及び黒から白
への変化点を表わす第2信号を伝達する第1伝達手段と
、符号化ラインの画素の色の変化点を表わす第3信号を
伝達する第2伝達手段と、符合化すべき画素位置を参照
ラインの変化点が通過したか否かを検出する検出手段と
、符号化ラインの同一色の画素の連続数を計数する計数
手段と、符号化の基点画素の色に応して前記第1伝達手
段により伝達されている第1.第2信号の一方を選択す
る選択手段と、前記検出手段の出力と前記選択手段の出
力と前記第2伝達手段により伝達される第3信号とによ
り符号化モードを決定する決定手段とを有するので、複
雑な算術演算を行なうことなく高速な符号化が可能とな
る。
As explained above, according to the present invention, the first signal representing the change point from white to black of the pixels of the reference line and the second signal representing the change point from black to white are transmitted. means, second transmission means for transmitting a third signal representing a point of change in color of a pixel on the encoding line, and detection means for detecting whether or not the point of change on the reference line has passed through a pixel position to be encoded. , a counting means for counting the consecutive number of pixels of the same color in the encoding line, and selecting one of the first and second signals transmitted by the first transmitting means according to the color of the base pixel of encoding. and determining means for determining the encoding mode based on the output of the detection means, the output of the selection means, and the third signal transmitted by the second transmission means, so that complex arithmetic operations can be performed. This makes it possible to perform high-speed encoding without any problems.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は実施例の変化点信号を伝達する回路図、第2図
は上記第1図の変化点情報から符号モードを決定する回
路図、 第3図はランレングスをカウントするカウンタを示す図
、 第4図は本発明の概念を示す概略図、 第5図は上記実施例の第1図、第2図、第3図の回路に
より得られる信号のタイミングチャート図である。 103 104 05 106 、 107 。 1.09〜112 132〜134 135 ・・・・・・・・・・・・・・・・・・・・・
・・ANDゲート排他的ORゲート 108 ・・・・・・・・・・・・・・・・・・・・・
・・・・・ORケート115〜122 ・・・・・・・
フリツプフ口ツプセレクタ 〜ノ
Fig. 1 is a circuit diagram for transmitting the changing point signal of the embodiment, Fig. 2 is a circuit diagram for determining the code mode from the changing point information shown in Fig. 1, and Fig. 3 is a diagram showing a counter for counting the run length. , FIG. 4 is a schematic diagram showing the concept of the present invention, and FIG. 5 is a timing chart of signals obtained by the circuits of FIGS. 1, 2, and 3 of the above embodiment. 103 104 05 106, 107. 1.09~112 132~134 135 ・・・・・・・・・・・・・・・・・・・・・
・・AND gate exclusive OR gate 108 ・・・・・・・・・・・・・・・・・・・・
・・・・・・OR Kate 115-122 ・・・・・・・・・
Flippuff mouth selector~no

Claims (1)

【特許請求の範囲】 (1)参照ラインの画素の白から黒への変化点を表わす
第1信号及び黒から白への変化点を表わす第2信号を伝
達する第1伝達手段と、 符号化ラインの画素の色の変化点を表わす第3信号を伝
達する第2伝達手段と、 符合化すべき画素位置を参照ラインの変化点が通過した
か否かを検出する検出手段と、 符号化ラインの同一色の画素の連続数を計数する計数手
段と、 符号化の基点画素の色に応じて前記第1伝達手段により
伝達されている第1、第2信号の一方を選択する選択手
段と、 前記検出手段の出力と前記選択手段の出力と前記第2伝
達手段により伝達される第3信号とにより符号化モード
を決定する決定手段とを有することを特徴とする画像符
号化装置。(2)請求項第1項において、1ラインの終
了後、前記第1及び第2伝達手段に変化点を表わす第1
、第2、第3信号を入力することを特徴とする画像符号
化装置。 (3)請求項第2項において、前記第1伝達手段により
伝達される第1、第2信号が共に変化点を表わすときに
1ラインの終了と判定することを特徴とする画像符号化
装置。
[Scope of Claims] (1) A first transmission means for transmitting a first signal representing a point of change from white to black of a pixel on a reference line and a second signal representing a point of change from black to white; and encoding. a second transmission means for transmitting a third signal representing a color change point of a pixel on the line; a detection means for detecting whether a change point on the reference line passes through a pixel position to be encoded; a counting means for counting the number of consecutive pixels of the same color; a selection means for selecting one of the first and second signals transmitted by the first transmission means according to the color of the base pixel for encoding; An image encoding device characterized by comprising: determining means for determining an encoding mode based on the output of the detecting means, the output of the selecting means, and a third signal transmitted by the second transmitting means. (2) In claim 1, after the end of one line, the first and second transmitting means indicate a change point.
, a second signal, and a third signal. (3) The image encoding apparatus according to claim 2, wherein the end of one line is determined when both the first and second signals transmitted by the first transmitting means represent a changing point.
JP26695389A 1989-10-12 1989-10-12 Image coding device Expired - Fee Related JP2697923B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26695389A JP2697923B2 (en) 1989-10-12 1989-10-12 Image coding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26695389A JP2697923B2 (en) 1989-10-12 1989-10-12 Image coding device

Publications (2)

Publication Number Publication Date
JPH03127554A true JPH03127554A (en) 1991-05-30
JP2697923B2 JP2697923B2 (en) 1998-01-19

Family

ID=17437986

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26695389A Expired - Fee Related JP2697923B2 (en) 1989-10-12 1989-10-12 Image coding device

Country Status (1)

Country Link
JP (1) JP2697923B2 (en)

Also Published As

Publication number Publication date
JP2697923B2 (en) 1998-01-19

Similar Documents

Publication Publication Date Title
US4610027A (en) Method for converting a bit map of an image to a run length or run end representation
EP0503644B1 (en) Device for judging type of color of document
US4968135A (en) System for producing pixel image data from CCITT encoded pixel data
JPH04270568A (en) Data compression system in picture processing unit
GB2138604A (en) Data decoding
DE3711855C2 (en) Method and arrangement for reading the information of a bar code symbol
JPH03127554A (en) Picture coder
JP3178595B2 (en) Time measuring device
JPH04270569A (en) Data compression system for picture processor
JPH037317B2 (en)
CA2058363C (en) Method for decoding compressed images
US20050125567A1 (en) Method for monitoring an automation system
GB1570914A (en) Method and apparatus for bandwidth compression
JP2774489B2 (en) Image code decoding device
JPS61173582A (en) Change point detecting circuit
JPH0834545B2 (en) Image data coding device
JPH0654210A (en) Method and device for inverse conversion of pattern run length
SU1140265A1 (en) System for transmission and reception of facsimile signals
JPS6342471B2 (en)
JPH01155486A (en) Device for judging character photograph picture
JPH0351354B2 (en)
JPH04354474A (en) Run length detection circuit
JPS6226223B2 (en)
JPS5992674A (en) Encoding circuit
JPS63240270A (en) Change point detecting circuit

Legal Events

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