JPH01273186A - Contour detector - Google Patents

Contour detector

Info

Publication number
JPH01273186A
JPH01273186A JP63102040A JP10204088A JPH01273186A JP H01273186 A JPH01273186 A JP H01273186A JP 63102040 A JP63102040 A JP 63102040A JP 10204088 A JP10204088 A JP 10204088A JP H01273186 A JPH01273186 A JP H01273186A
Authority
JP
Japan
Prior art keywords
contour
pixels
connection
pixel
pixel data
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
JP63102040A
Other languages
Japanese (ja)
Inventor
Tetsuya Yasuda
哲也 安田
Minoru Yamanaka
稔 山中
Keisuke Goto
啓介 後藤
Hitoshi Kogori
古郡 仁
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing 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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP63102040A priority Critical patent/JPH01273186A/en
Publication of JPH01273186A publication Critical patent/JPH01273186A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To reduce the capacity of an image memory by removing contour picture elements whose total number is smaller than a threshold value from a contour picture element sequence when the total number of the picture elements is smaller than the threshold value. CONSTITUTION:For example, when a command sequence regarding picture element data is inputted, contour elements shown by a dotted line are registered in a contour element table, their directions and coordinates are written, and the numbers of other contour elements which are connected before and after the contour elements Cj are written in a connection element number field. Then when the command sequence is inputted to a contour analysis part 2 and processed, the total number of contour picture elements in the picture element sequence is found and compared with the threshold value. Further, a short picture element sequence in the contour picture element sequence is removed as meaningless according to the comparison result. Consequently, the capacity of the image memory is reduced.

Description

【発明の詳細な説明】 A、産業上の利用分野 本発明は2値画像の輪郭を検出する装置に関するもので
ある。
DETAILED DESCRIPTION OF THE INVENTION A. Field of Industrial Application The present invention relates to a device for detecting the outline of a binary image.

B0発明の概要 本発明は、被写体をラスタスキャンして得られた黒白に
対応する2値化画素データに基づき黒白の境界に相当す
る輪郭を検出する装置において、2画素×2画素の画素
データを順次に取り出し、lライン前に取り出した画素
データに基づいて、例えばラスタスキャンY方向の輪郭
画素間の接続関係を求め、この関係及び画素データの配
列パターンの各情報を含むコマンド列を作成し、更にこ
れらコマンド列に基づいて、輪郭要素を系列化したテー
ブルを作成し、そのテーブルから画素系列内の輪郭画素
の総数を得て、しきい値と比較することによって、画像
メモリの容量、ハードウェア構成及び処理時間が画像サ
イズや解像度に影響されることがなく、更に輪郭の取り
出しを容易に行うことができるようにするとともに画素
系列のうち短い画素系列を除去してノイズ成分を少なく
し、装置自体の性能を向上させるようにしたものである
B0 Summary of the Invention The present invention provides an apparatus for detecting a contour corresponding to a black-and-white boundary based on binary pixel data corresponding to black and white obtained by raster scanning a subject, which detects pixel data of 2 pixels x 2 pixels. Based on the pixel data taken out one line before, for example, the connection relationship between contour pixels in the raster scan Y direction is determined, and a command string containing information on this relationship and the arrangement pattern of the pixel data is created, Furthermore, based on these command sequences, a table is created in which the contour elements are serialized, the total number of contour pixels in the pixel series is obtained from the table, and the total number of contour pixels in the pixel series is obtained, and the total number of contour pixels in the pixel series is obtained and compared with a threshold value. The configuration and processing time are not affected by the image size or resolution, and the outline can be extracted easily. Short pixel sequences are removed from the pixel sequence to reduce noise components, and the device This is to improve its own performance.

C1従来の技術 文字や図形等のパターンを処理する場合、例えば、書類
や図面等の被写体をイメージスキャナ等の入力装置で操
作して得られる黒と白の2値画像データ(入カバターン
)に変換し、この2値画像データから対象物の輪郭画素
を抽出し、情報圧縮処理や対象物の認識処理を行ってい
る。
C1 Conventional technology When processing patterns such as characters and figures, for example, converting objects such as documents and drawings into black and white binary image data (input pattern) obtained by operating them with an input device such as an image scanner. Then, contour pixels of the object are extracted from this binary image data, and information compression processing and object recognition processing are performed.

このうち、2値画像データから対象物の輪郭画素を抽出
するための従来方式は、第26図に示すような動作を示
す。これは以下のような処理の流れで記述できる。
Among these, the conventional method for extracting contour pixels of an object from binary image data exhibits an operation as shown in FIG. This can be described using the following process flow.

■まず、2値画像データをすべて、専用画像メモリMに
記憶する。
(1) First, all binary image data is stored in the dedicated image memory M.

■次に、このメモリMから検出対象となるTの輪郭の始
点となる点、例えば、点P、を探す。
(2) Next, from this memory M, a point, for example, point P, which is the starting point of the contour of T to be detected is searched.

■この点PIに隣接する点を順次追跡抽出して対象物T
の輪郭画素を抽出する。
■Sequentially track and extract the points adjacent to this point PI and
Extract the contour pixels of.

D0発明が解決しようとする課題 このように、従来の輪郭画素抽出方式においては、1画
面分の2値画像データを記憶するための専用メモリを必
要とする。これは、入力する書類や図面のサイズが大き
くなればなるほど、また、高解像度にするほどメモリが
大容量になる欠点を有する。
D0 Problems to be Solved by the Invention As described above, the conventional contour pixel extraction method requires a dedicated memory for storing one screen's worth of binary image data. This has the disadvantage that the larger the size of the input document or drawing, or the higher the resolution, the larger the memory capacity.

ハードウェア構成の点からいえば、画像メモリは入力画
像の縦横サイズに比例して大きくなるため、場合によっ
てはメモリボードの追加を考慮した構成が必要となる。
In terms of hardware configuration, since the image memory increases in proportion to the vertical and horizontal sizes of the input image, a configuration that takes into account the addition of a memory board may be necessary in some cases.

例えば、AOサイズを対象とする画像メモリは、A4サ
イズの画像メモリに比べて、16倍もの容量を必要とし
ており、A4サイズのメモリボードが1枚で構成される
ときでもAOサイズは16枚も必要である。
For example, an image memory for AO size requires 16 times the capacity than an A4 size image memory, and even when an A4 size memory board is configured with one, AO size requires 16 times more capacity than an A4 size image memory. is necessary.

次に、処理時間にも大きな影響がある。従来の方式では
、画像メモリに1画面分が記憶されるまでの待ち時間が
必要であり、また、輪郭を抽出するためには、逐次追跡
をソフトウェアで行う必要があり、これらも対象の画像
のサイズや解像度に比例して、処理時間に影響を与える
ことになる。
Next, processing time also has a significant impact. Conventional methods require waiting time until one screen's worth is stored in the image memory, and in order to extract the contour, it is necessary to perform sequential tracking using software, which also depends on the image of the target image. The processing time will be affected in proportion to the size and resolution.

以上をまとめると、従来の輪郭抽出方式では、単に画像
サイズを大きくしたり、解像度を高くするだけで、ハー
ドウェア構成、処理時間等に影響する欠点があり、さら
には、製品外観や価格などにも影響を及ぼす要因となっ
ていた。
To summarize the above, with conventional contour extraction methods, simply increasing the image size or increasing the resolution has drawbacks that affect hardware configuration, processing time, etc., and also has the disadvantage of affecting product appearance, price, etc. was also an influential factor.

本発明はこのような課題を解決するためになされたもの
であり、画像メモリの容積、ハードウェア構成及び処理
時間が画像サイズや解像度に影響されることがなく、更
に輪郭の取り出しを容易に行うことができるようにする
とともに、ノイズ成分を少なくし、装置自体の性能を向
上させる輪郭検出装置を提供することを目的とする。
The present invention has been made to solve these problems, and it is not affected by the image memory capacity, hardware configuration, or processing time, and it also makes it easy to extract contours. It is an object of the present invention to provide a contour detection device that can reduce noise components and improve the performance of the device itself.

E6課題を解決するための手段 第1図は本発明の構成を示す図であり、1は輪郭抽出部
である。この輪郭抽出部lは、第2図に示すように被写
体をラスタスキャンして得られた黒白に対応する2値化
画素データを取り込んで、縦vi2画素×2画素の画素
データをスキャンラインに沿って順次に取り出し、この
画素データに基づいて輪郭検出用のコマンド列を作成し
て後段の輪郭解析部2に出力する。輪郭解析部2は前記
コマンド列に基づいてテーブル格納部3内の輪郭要素テ
ーブル、輪郭管理テiプル及び輪郭接続テーブルの記載
を更新するとともに輪郭画素系列の短い画素系列を除去
部31を用いて除去し、輪郭管理テーブルからその画素
系列に位置する符号を削除する。
E6 Means for Solving Problems FIG. 1 is a diagram showing the configuration of the present invention, and 1 is a contour extraction section. As shown in Fig. 2, this contour extraction unit 1 takes in binarized pixel data corresponding to black and white obtained by raster scanning the subject, and extracts pixel data of vertical vi 2 pixels x 2 pixels along the scan line. Based on this pixel data, a command sequence for contour detection is created and output to the contour analysis section 2 at the subsequent stage. The contour analysis section 2 updates the descriptions of the contour element table, the contour management table i, and the contour connection table in the table storage section 3 based on the command string, and removes short pixel sequences of the contour pixel sequence using the removal section 31. Then, the code located in that pixel series is deleted from the contour management table.

ここで輪郭要素とは互いに隣接した2個の黒画素を結ぶ
ベクトルに相当するものであり、これを結合することに
よって輪郭が構成される。そして輪郭要素テーブルとは
、第3図に示すように輪郭要素とこれら輪郭要素群より
なる輪郭とに対して各々固有の符号を付すと共に、輪郭
要素毎に、その座標及び方向と輪郭要素が所属する輪郭
の符号と輪郭要素の前後に夫々接続されている他の輪郭
要素の符号とを記載するためのものである。また輪郭管
理テーブルとは第4図に示すように輪郭毎に先端及び終
端に位置する輪郭要素の符号を記載するためのものであ
り、輪郭接続テーブルとは、第5図に示すようにラスタ
スキャン方向に並ぶ座標とその座標に前端または後端が
存在する未接続の輪郭要素の符号とその輪郭要素の未接
続端の前後端の区別とを対応させて記載するためのもの
である。
Here, the contour element corresponds to a vector connecting two adjacent black pixels, and the contour is constructed by connecting these. As shown in Fig. 3, the contour element table is a table in which a unique code is attached to each contour element and a contour made up of a group of these contour elements, and for each contour element, its coordinates, direction, and the contour element to which it belongs are assigned. This is to describe the code of the contour element and the code of other contour elements connected before and after the contour element, respectively. The contour management table is for recording the codes of contour elements located at the tip and end of each contour, as shown in FIG. This is to describe the coordinates arranged in the direction, the code of an unconnected contour element whose front end or rear end exists at the coordinate, and the distinction between the front and rear ends of the unconnected end of the contour element in correspondence with each other.

F9作用 輪郭抽出部lより出力されるコマンド列は、そのときに
取り出された2画素×2画素の画素データに係る画素と
輪郭要素との接続関係の情報、及び当該画素データの黒
白の配列パターンの情報を含む接続・パターンコードと
、当該画素データのX座標を示す座標コードとを組み合
わせてなる。
The command string output from the F9 action contour extraction unit l includes information on the connection relationship between pixels and contour elements related to the 2 pixel x 2 pixel pixel data extracted at that time, and the black and white arrangement pattern of the pixel data. A connection/pattern code including information on the pixel data and a coordinate code indicating the X coordinate of the pixel data are combined.

前記接続関係の一例を第6図に示すと、同図(イ)の大
枠で囲まれた2画素×2画素の画素データを取り込んだ
ときには、この画素データのX座標Xnに位置する輪郭
要素の前端が接続されているという情報になる。この例
では、画素データの座標としては、紙面に向かって右下
に位置する画素P。
An example of the connection relationship is shown in FIG. 6. When the pixel data of 2 pixels x 2 pixels surrounded by the large frame in FIG. This information indicates that the front end is connected. In this example, the coordinates of the pixel data are a pixel P located at the lower right when facing the page.

の座標をとっている。また同図(ロ)の大枠で囲まれた
画素データを取り込んだときには、この画素データのX
座標より一つ前の座標X I’l−1に位置する輪郭要
素の後端が接続されているという情報になる。なお第6
図中○印を有する枠は黒画素を示し、O印を有しない枠
は白画素を示している。
The coordinates are taken. Also, when the pixel data surrounded by the large frame in the same figure (b) is imported, the
This is information that the rear end of the contour element located at the coordinate XI'l-1, which is one position before the coordinate, is connected. Furthermore, the 6th
In the figure, frames with O marks indicate black pixels, and frames without O marks indicate white pixels.

そして例えば第6図(イ)の大枠に着目すると、この場
合の接続・パターンコードは、上述の接続情報と大枠内
の黒白の配列パターンの情報とを含み、コマンド列は、
この接続・パターンコードと画素P1のX座標を示す座
標コードとの組み合わせとなる。なおこの座標コードに
ついては輪郭解析部2側にて、コマンド列の取り込みの
タイミングに同期して発生させろことらできる。
For example, if we focus on the large frame in FIG. 6(a), the connection/pattern code in this case includes the above-mentioned connection information and information on the black and white array pattern within the large frame, and the command string is as follows:
This connection/pattern code is a combination of the coordinate code indicating the X coordinate of the pixel P1. Note that this coordinate code can be generated on the contour analysis section 2 side in synchronization with the timing of fetching the command sequence.

このようにして得たコマンド列が輪郭解析部2に取り込
まれると次のような処理が行われる。金策7図の大枠の
画素データに関するコマンド列が取り込まれたとすると
、点線で示す輪郭要素Cjを輪郭要素テーブルに登録し
、その方向及び座標を記入すると共に、当該輪郭要素C
jの前後に夫々接続されている他の輪郭要素の番号を接
続要素番号欄に記入する。この場合輪郭要素Cjは輪郭
要素Ciの前方に位置するので、輪郭要素Cjの欄に係
る後方接続欄にC4を記入し、輪郭要素Cjの欄に係る
前方接続樋にCiを記入する。更に輪郭要素Cjの所属
する輪郭の番号をこの例ではStを輪郭番号欄に記入す
る。輪郭要素の方向については例えば8連結の場合、第
8図に示すように上下、左右、斜めの方向に対応してa
、−a。
When the command string obtained in this way is taken into the contour analysis section 2, the following processing is performed. Assuming that a command string related to the pixel data of the general frame in Fig. 7 is imported, the contour element Cj shown by the dotted line is registered in the contour element table, its direction and coordinates are entered, and the contour element Cj is
Enter the numbers of other contour elements connected before and after j in the connected element number column. In this case, the contour element Cj is located in front of the contour element Ci, so C4 is entered in the rear connection column related to the column of the contour element Cj, and Ci is entered in the front connection gutter related to the column of the contour element Cj. Furthermore, the number of the contour to which the contour element Cj belongs, St in this example, is entered in the contour number column. Regarding the direction of the contour elements, for example, in the case of 8 connections, as shown in FIG.
,-a.

が規定され、また4連結の場合、上下、左右の4方向が
規定される。そして輪郭管理テーブルの輪郭番号Stに
ついて、先端の輪郭要素番号欄をC4からCjに更新す
ると共に、輪郭接続テーブルにおける当該画素データの
X座標について、未接続の輪郭要素番号の前方接続の欄
をCiからCjに更新する。ところで実際の処理におい
ては、輪郭要素C4に接続されるべき輪郭要素は輪郭接
続テーブルにより明らかにされているため、輪郭要素テ
ーブルの輪郭要素番号Ci欄に係る前方接続樋のCjの
記載は、輪郭接続テーブルを参照して行われる。以上に
おいて所属輪郭番号は、ラスタスキャンの進行に伴って
別々に発生した二つの輪郭が接続されて一つの輪郭にな
った場合には一方が他方に統合されて同一になる。
is defined, and in the case of four connections, four directions, up, down, left and right, are defined. Then, regarding the contour number St in the contour management table, the tip contour element number column is updated from C4 to Cj, and regarding the X coordinate of the pixel data in the contour connection table, the forward connection column of the unconnected contour element number is updated to Ci. Update from Cj to Cj. By the way, in actual processing, the contour element to be connected to the contour element C4 is clarified by the contour connection table, so the description of Cj of the front connection gutter related to the contour element number Ci column of the contour element table is This is done by referring to the connection table. In the above, when two contours generated separately as the raster scan progresses are connected to form one contour, one contour is integrated with the other and the associated contour numbers become the same.

上記のようにコマンド列が輪°郭解折部2に取り込まれ
て処理される際に、さらに画素系列内の輪郭画素の総数
を求めてしきい値と比較される。この比較結果から輪郭
画素系列の短い画素系列を意味のないデータとして除去
する。
As described above, when the command sequence is taken into the contour analysis unit 2 and processed, the total number of contour pixels in the pixel series is further determined and compared with a threshold value. From this comparison result, short pixel sequences of the contour pixel sequence are removed as meaningless data.

G、実施例 本発明の実施例では、第9図に示すように内部バス41
に輪郭抽出部42、輪郭解析部43及びテーブル格納部
としての内部メモリ44を結合して、各部間の情報の受
は渡しを内部バス4Iを通じて行うように構成し、更に
内部バス4.をバスインターフェイス4.を介してメイ
ンバス46に結合し、これにより輪郭検出装置4で得ら
れた情報を外部機器に与えるように構成している。
G. Embodiment In an embodiment of the present invention, an internal bus 41 as shown in FIG.
The contour extraction section 42, the contour analysis section 43, and the internal memory 44 as a table storage section are connected to the contour extraction section 42, the contour analysis section 43, and an internal memory 44 as a table storage section, and information is exchanged between each section through an internal bus 4I. The bus interface 4. The contour detecting device 4 is connected to the main bus 46 via the contour detecting device 4, thereby providing information obtained by the contour detecting device 4 to external equipment.

次に輪郭抽出部4.から発生するコマンド列の具体例に
関して述べる。第1θ図及び第11図は、各々2画素×
2画素の画素データの黒白の配列パターンとこの画素デ
ータに対する輪郭要素の接続関係との成立関係を示す図
であり、第1O図は8連結、第11図は4連結の場合に
夫々相当する。
Next, outline extraction section 4. A specific example of a command sequence generated from the following will be described. Fig. 1θ and Fig. 11 each have 2 pixels ×
FIG. 10 is a diagram showing the relationship between the black and white arrangement pattern of pixel data of two pixels and the connection relationship of outline elements to this pixel data; FIG. 1O corresponds to the case of 8-connection, and FIG. 11 corresponds to the case of 4-connection.

これら図において左端の縦に並ぶ4コマの窓は第12図
に示すように2画素×2画素の画素データ(d、−d、
)を示し、「N、rOJが立っている部分は夫々黒画素
、白画素に相当する。また上端の横に並ぶ4コマの窓は
、第13図に示すように、上側左右の2コマが夫々画素
データのX座標X n−1における前方接続の輪郭要素
の有無及びX座標X。における前方接続の輪郭要素の有
無を示し、下側左右の2コマが夫々画素データのX座標
Xn−1における後方接続の輪郭要素の有無及びX座標
x1における後方接続の輪郭要素の有無を示す接続フラ
グであり、Ill、rOJは夫々接続有り、接続無しを
意味している。例えば第6図(イ)の大枠で囲まれた画
素領域における接続フラグは、(x、、y、、)の座標
位置にて輪郭要素の前端が当該画素領域に接続されてい
るから、第10図の接続フラグ欄の左から5番目のよう
に右上のコマのみがrlJの窓で表わされる。
In these figures, the four vertically arranged windows at the left end are pixel data of 2 pixels x 2 pixels (d, -d,
), and the parts where "N and rOJ stand correspond to black pixels and white pixels, respectively. Also, as shown in Fig. The presence or absence of a forward connection contour element at the X coordinate Xn-1 of pixel data and the presence or absence of a forward connection contour element at the It is a connection flag indicating the presence or absence of a backward connection contour element at the X coordinate x1 and the presence or absence of a backward connection contour element at the X coordinate x1, and Ill and rOJ mean connection and no connection, respectively.For example, FIG. Since the front end of the outline element is connected to the pixel area at the coordinate position (x,, y, ,), the connection flag in the pixel area surrounded by the large frame is shown on the left side of the connection flag column in Figure 10. Only the top right frame, such as the fifth frame, is represented by the rlJ window.

そして第1O図、第11図において、画素データ及び接
続フラグの項の交差する部分が空白であるということは
、このような画素データ及び接続フラグの組み合わせに
対しては輪郭解析部4.にて処理を行う必要がないこと
を意味する。Oが記入された組み合わせのときは、輪郭
解析部43にて処理を行う必要があり、その組み合わせ
に対応した接続・パターンコードが輪郭抽出部4tにて
発生する。×が記入された組み合わせについては、その
ような組み合わせが存在しないことを表わす。
In FIGS. 1O and 11, the intersection of the pixel data and connection flag terms is blank, which means that the contour analysis unit 4. This means that there is no need to perform any processing. When the combination is marked with O, it is necessary to perform processing in the contour analysis section 43, and a connection/pattern code corresponding to the combination is generated in the contour extraction section 4t. A combination marked with a cross indicates that such a combination does not exist.

△が記入された組み合わけについては、ランレンゲの符
号化を実施するときのみ、その組み合わせに対応した接
続・パターンコードが発生する。なお第6図、第7図に
おいては、輪郭要素の発生方向(ベクトルの向き)を考
慮せずに描いているが、実際には輪郭要素を、物体(ま
たは黒画像部)の外縁に沿って右回りに向くように発生
させており、この発生の仕方に対応させて第1O図及び
第11図、の成立関係図を作成している。
For combinations marked with a △, a connection/pattern code corresponding to the combination is generated only when encoding the run range. In Figures 6 and 7, the contour elements are drawn without considering the direction in which they occur (direction of the vector), but in reality the contour elements are drawn along the outer edge of the object (or black image area). It is generated in a clockwise direction, and the relationship diagrams shown in FIG. 1O and FIG. 11 are created corresponding to this manner of generation.

前記コマンド列はこのようにして得られた接続・パター
ンコードの他に読み出しレディコードや座標コード等が
含まれ、その−例を挙げると第14図のように表わされ
る。同図中AIは読み出しレディコードであり、画素デ
ータ及び接続フラグの組み合わせが第1O図、第11図
の×、あるいはX及び△に相当するときにはコマンド列
を無効とするものである。A、は画素データのX座標、
A、。
In addition to the connection/pattern code obtained in this manner, the command string includes a read ready code, a coordinate code, etc., and an example thereof is shown in FIG. 14. In the figure, AI is a read ready code, which invalidates the command sequence when the combination of pixel data and connection flag corresponds to x, or X and Δ in FIGS. 1O and 11. A is the X coordinate of pixel data,
A.

A4は画素データの下側左右に並ぶ二つの画素の黒、白
を示すコードであり、ランレングス化を実施する場合に
は、A a 、 A−が必要である。A。
A4 is a code indicating black and white of two pixels arranged on the left and right sides of the lower side of the pixel data, and A a and A- are required when performing run length conversion. A.

は1頁、(全ライン)の終わりを示すEOP (END
OF  PAGE)コード、A6はlラインの終わりを
示すEOR(END  OF  ROW)コード、A、
は接続・パターンコードである。
is 1 page, EOP (END) indicates the end of (all lines)
OF PAGE) code, A6 is the EOR (END OF ROW) code indicating the end of l line, A,
is the connection/pattern code.

次いで輪郭抽出部4.の具体的構成例を第15図を参照
しながら説明する。
Next, the contour extraction section 4. A specific example of the configuration will be described with reference to FIG.

画素データラッチ101には信号線5及び後述するライ
ンメモリ105から画素データが入力される。このラッ
チはこれら人力されたデータから、第12図に示すよう
な2画素×2画素、すなわち互いに隣接する4画素のデ
ータd。−d3を取り込み、ラッチする。
Pixel data is input to the pixel data latch 101 from the signal line 5 and a line memory 105, which will be described later. This latch generates data d of 2 pixels x 2 pixels, that is, 4 pixels adjacent to each other, from these manually input data as shown in FIG. -fetch and latch d3.

アドレス発生回路108は、第2図に示したラスタスキ
ャンの進行に応じてX座標及びX座標を発生させる。こ
の回路は発生させた座標を後述するラインメモリ105
、周辺判定回路+09、並びに前方フラグメモリ106
に与えると共に、信号線8を通じて輪郭解析部43にコ
マンド列の一部として送出する。
The address generation circuit 108 generates the X coordinate and the X coordinate in accordance with the progress of the raster scan shown in FIG. This circuit stores the generated coordinates in a line memory 105, which will be described later.
, peripheral determination circuit +09, and front flag memory 106
It is also sent to the contour analysis unit 43 via the signal line 8 as part of the command sequence.

ラインメモリ105はアドレス発生回路108が発生さ
せたX座標より1小さいX座標、すなわち上記画素デー
タラッチ101がラッチした画素データdz、daのX
座標の画素データを画素データラッチ101の出力から
取り込み、順次記憶する。
The line memory 105 stores the X coordinate that is one smaller than the X coordinate generated by the address generation circuit 108, that is, the
Pixel data of coordinates is taken in from the output of the pixel data latch 101 and stored sequentially.

前方フラグメモリ106はX座標の数と同じ数のアドレ
スを持ち(例えば、X座標の数が512のとき、このメ
モリのアドレスの数6512)、画素データ内のある画
素に輪郭要素の前端が接続されかつその輪郭要素が他の
輪郭要素に接続されていないとき、その画素のX座標に
対応するアドレスに論理rlJのデータを書き込む。
The front flag memory 106 has the same number of addresses as the number of X coordinates (for example, when the number of X coordinates is 512, the number of addresses in this memory is 6512), and the front end of the contour element is connected to a certain pixel in the pixel data. and when the contour element is not connected to any other contour element, data of logical rlJ is written to the address corresponding to the X coordinate of the pixel.

一方、後方フラグメモリl047も座標と同じ数のアド
レスを持つが、この・メモリには、ある画素に輪郭要素
の後端が接続されかつその輪郭要素が他の輪郭要素に接
続されていないとき、その画素のX座標に対応するアド
レスに論理rNのデータが書き込まれる。
On the other hand, the rear flag memory 1047 also has the same number of addresses as the coordinates, but this memory contains the following information: When the rear end of a contour element is connected to a certain pixel and that contour element is not connected to any other contour element, Logical rN data is written to the address corresponding to the X coordinate of that pixel.

接続フラグラッチ102は、前方フラグメモリ106、
後方フラグメモリ107および後述する接続フラグ変更
回路104の出力データを、輪郭画素の接続状態を示す
データとして保持する。
The connection flag latch 102 has a forward flag memory 106,
Output data from the rear flag memory 107 and a connection flag change circuit 104, which will be described later, is held as data indicating the connection state of contour pixels.

周辺判定回路109は、アドレス発生回路I08が発生
するX及びX座標をらとに、処理の対象となる4つの画
素d。−d3が、画面の境界からはみ出しているか否か
を判定する。画面の周囲から処理画素がはみ出している
場合には、所定の信号を画素データラッチ101および
接続フラグラッチ102に出力する。これらのラッチは
、この信号を受は取ると、画面の境界からはみ出した画
素については、強制的に白画素(背景となる画素)とす
る。
The peripheral determination circuit 109 selects four pixels d to be processed based on the X and X coordinates generated by the address generation circuit I08. Determine whether -d3 protrudes from the boundaries of the screen. If the pixel to be processed protrudes from the periphery of the screen, a predetermined signal is output to the pixel data latch 101 and the connection flag latch 102. When these latches receive this signal, pixels that protrude from the boundaries of the screen are forced to become white pixels (background pixels).

コマンド発生回路103は画素データラッチlO1が出
力する4つの画素データ及び接続フラグラッチ102が
出力するフラグデータをもとに輪郭追跡を行うための所
定のコマンドを輪郭解析部4、に対して発生する。コマ
ンド発生回路+03はこのとき、処理を実施する必要が
あるか否かを示す読み出しレディ信号を信号線6を通じ
て、また前記接続・パターンコードを信号線7を通じて
輪郭解析部4.に送る。
The command generation circuit 103 generates a predetermined command to the contour analysis unit 4 to perform contour tracing based on the four pixel data output from the pixel data latch 1O1 and the flag data output from the connection flag latch 102. At this time, the command generation circuit +03 sends a read ready signal indicating whether or not processing is necessary through the signal line 6, and sends the connection/pattern code through the signal line 7 to the contour analysis unit 4. send to

接続フラグ変更回路104は、輪郭解析部4゜が上記コ
マンドに従って処理を実施した後、画素の接続状態が変
化するので、処理後の接続フラグを、画素データラッチ
101と接続フラグラッチ102の出力データとをもと
に求め、前方フラグメモリ106、後方フラグメモリ1
07、並びに接続フラグラッチ102に出力する。
The connection flag changing circuit 104 changes the connection state of the pixels after the contour analysis unit 4° executes the process according to the above command, so the connection flag after the process is changed to the output data of the pixel data latch 101 and the connection flag latch 102. The forward flag memory 106 and the backward flag memory 1 are calculated based on
07 and the connection flag latch 102.

次に第15図に示す回路の動作を説明する。アドレス発
生回路108は、ラスタスキャンの進行に従って、最も
新しくサンプリングされ、信号線5から入力された画素
データに対応するX及びYアドレスを発生させ、出力す
る。
Next, the operation of the circuit shown in FIG. 15 will be explained. The address generation circuit 108 generates and outputs X and Y addresses corresponding to the most recently sampled pixel data input from the signal line 5 as the raster scan progresses.

画素データラッチ101は、ラスタスキャンによってサ
ンプリングされた画素データが信号線5から入力される
と、ラインメモリ105からの画素データと共にこれら
を順次受は取り、第12図に示すような2画素×2画素
、すなわち互いに隣接する4画素のデータd。−d、を
ラッチする。
When pixel data sampled by raster scanning is input from the signal line 5, the pixel data latch 101 sequentially receives them together with the pixel data from the line memory 105, and collects the pixel data as shown in FIG. Data d of pixels, that is, four pixels adjacent to each other. -d, is latched.

ラインメモリ105は、画素データラッヂ+01が出力
する画素データd1を取り込むことによって一行前の画
素データ、すなわちYアドレスが現在信号線5から入力
されている画素データd。
The line memory 105 takes in the pixel data d1 output by the pixel data ludge +01, thereby generating the pixel data of the previous row, that is, the pixel data d whose Y address is currently being input from the signal line 5.

のYアドレスより1小さい行の画素データを一行分記憶
している。そして、信号線5から画素データd。、d+
か画素データラッチ101に順次入力されたとき、ライ
ンメモリ105は、アドレス発生回路108が出力する
上記アドレスデータをもとに、画素データdt、dzを
順次同ラッチに出力する。これにより、画素データラッ
チ101は隣接する4つの画素データd。−d、をラッ
チすることができる。
One row of pixel data that is one row smaller than the Y address of is stored. Then, pixel data d is transmitted from the signal line 5. ,d+
When the pixel data dt and dz are sequentially input to the pixel data latch 101, the line memory 105 sequentially outputs the pixel data dt and dz to the same latch based on the address data output from the address generation circuit 108. As a result, the pixel data latch 101 receives four adjacent pixel data d. -d, can be latched.

接続フラグ変更回路104は、上記画素データd0〜d
、と接続フラグラッチ102の出力データとをもとに、
4つの接続フラグデータを発生する。4つのデータの内
、二つは第13図に示す接続フラグの上側2コマに相当
する前方接続フラグデータ、他の二つは下側2コマに相
当する後方接続フラグデータである。
The connection flag changing circuit 104 converts the pixel data d0 to d
, and the output data of the connection flag latch 102,
Generates four connection flag data. Of the four pieces of data, two are forward connection flag data corresponding to the upper two frames of the connection flag shown in FIG. 13, and the other two are backward connection flag data corresponding to the lower two frames.

接続フラグデータ及びその発生について第16図を用い
て詳しく説明する。画面Pには例として二つの画像A、
Bが示されており、これらの画像は○が書き込まれた画
素によってそれぞれ構成されている。図中、太線で囲ん
だ4つの画像が現在、輪郭追跡処理の対象となっている
画素である。
Connection flag data and its generation will be explained in detail using FIG. 16. For example, there are two images A on screen P,
B is shown, and these images are each composed of pixels marked with a circle. In the figure, the four images surrounded by thick lines are the pixels currently targeted for contour tracking processing.

一方、画面Pの上に示したRは各X座標の前方接続フラ
グデータ、Tは各X座標の後方接続フラグデータをそれ
ぞれ表わしている。各データは座標の順に描かれており
、右のものほどそのX座標は大きい。そして、空白のも
のはフラグデータの値が「0」、■か書き込まれている
ものは値が「1」であることを示す。
On the other hand, R shown on the screen P represents forward connection flag data of each X coordinate, and T represents backward connection flag data of each X coordinate. Each piece of data is drawn in the order of coordinates, and the right side has a larger X coordinate. A blank field indicates that the value of the flag data is "0", and a blank field indicates that the flag data value is "1".

具体的に説明すると、画素elには輪郭要素Caの後端
が接続されているのでこの画素のX座標の後方接続フラ
グデータT1は「1」となっている。逆に、画素e2に
は輪郭要素cbの面端が接続されているのでそのX座標
の前方接続フラグデータR2はrlJとなっている。同
様に、画素e3に対応する後方接続フラグデータT4は
rlJ、画素e4に対応する前方接続フラグデータR4
ら「1」となっている。その他のフラグデータは・、対
応する画素に輪郭要素が接続されていないので、すべて
「0」となっている。
Specifically, since the rear end of the contour element Ca is connected to the pixel el, the rear connection flag data T1 of the X coordinate of this pixel is "1". Conversely, since the surface edge of the contour element cb is connected to the pixel e2, the forward connection flag data R2 at its X coordinate is rlJ. Similarly, backward connection flag data T4 corresponding to pixel e3 is rlJ, and forward connection flag data R4 corresponding to pixel e4.
It is "1". All other flag data are "0" because no outline element is connected to the corresponding pixel.

これら前方及び後方接続フラグデータは、それぞれ前方
フラグメモリ106及び後方フラグメモリ+07のX座
標に対応する所定のアドレスに、後述のように接続フラ
グ変更回路104によって書き込まれる。
These forward and backward connection flag data are written to predetermined addresses corresponding to the X coordinates of the forward flag memory 106 and backward flag memory +07, respectively, by the connection flag change circuit 104 as described later.

第16図中太線で囲まれた4つの画素が処理の対象とな
っているとき、前方フラグメモリ106及び後方フラグ
メモリ107はそれぞれ、左側の処理対象画素のX座標
に対応する接続フラグデータR2,T2を出力する。一
方、接続フラグ変更回路104は、右側の処理対象画素
のX座標に対応する接続フラグデータR3,T3を出力
する。
When the four pixels surrounded by thick lines in FIG. 16 are the targets of processing, the front flag memory 106 and the rear flag memory 107 respectively store connection flag data R2, Output T2. On the other hand, the connection flag change circuit 104 outputs connection flag data R3, T3 corresponding to the X coordinate of the processing target pixel on the right side.

接続フラグラッチ102はこれらをラッチし、コマンド
発生回路103と接続フラグ変更回路104とに出力す
る。
Connection flag latch 102 latches these and outputs them to command generation circuit 103 and connection flag change circuit 104.

接続フラグ変更回路104は上記4ビツトの接続フラグ
データ及び画素データラッチ101からの画素データd
。−d3を受は取り、輪郭要素追跡処理後のフラグデー
タを求める。すなわち、追跡処理によって、画素e2に
は、第17図に示すように、輪郭要素cbに次の輪郭要
素Ccが接続されるので、接続フラグ変更回路104は
、前方接続フラグデータR2を「0」とし、前方接続フ
ラグデータR3をrlJとする。後方接続フラグデータ
については、輪郭要素の後端が単独で存在しない状態が
継続されているので変更は行わない。
The connection flag changing circuit 104 inputs the 4-bit connection flag data and the pixel data d from the pixel data latch 101.
. -d3 is accepted and the flag data after contour element tracking processing is obtained. That is, as shown in FIG. 17, the next contour element Cc is connected to the contour element cb in the pixel e2 through the tracking process, so the connection flag change circuit 104 sets the forward connection flag data R2 to "0". and forward connection flag data R3 is set to rlJ. The rear connection flag data is not changed because the rear end of the contour element continues to be in a state where it does not exist independently.

接続フラグ変更回路104は上記変更処理後のフラグデ
ータR2,T2を前方フラグメモリ106及び後方フラ
グメモリ107の所定のアドレスに記憶さけ、変更処理
後のフラグデータR3,T3を接続フラグラッチ102
に出力してラッチさせ、次の処理に備える。
The connection flag change circuit 104 stores the flag data R2, T2 after the above-mentioned change processing in the predetermined addresses of the front flag memory 106 and the rear flag memory 107, and stores the flag data R3, T3 after the change processing into the connection flag latch 102.
It is output to and latched in preparation for the next processing.

そしてコマンド発生回路103では、画素データラッヂ
101からの画素データd0〜d3及び接続フラグラッ
チ102からの4ビツトのフラグデータをもとに、接続
・パターンコードを発生すると共に、2画素×2画素の
画素データのうち下側二つのデータd。、dl も出力
し、これらコードが信号線7を介して輪郭解析部43に
与えられる。更にコマンド発生回路103は読み出しレ
ディコードを信号線6に出力し、例えばランレングス化
を実施しない場合、接続・パターンコードが第1θ図、
第11図のO印に相当するものであるときには、読み出
しレディコードをrlJとし、△印またはX印に相当す
るものであるときには「0」とする。また周辺判定回路
109には信号線9を通じて1頁の終わりを示すEOP
信号及びIラインの終わりを示すFOR信号が人力され
、この結果ここから信号線6にEOPコード及びFOR
コードが出力される。こうして信号線6には、アドレス
発生回路108よりの画素データのX座標を示す座標コ
ードと共にEOPコード及びFORコードが与えられ、
これらコードが輪郭解析部4、に与えられる。
Then, the command generation circuit 103 generates a connection/pattern code based on the pixel data d0 to d3 from the pixel data latch 101 and the 4-bit flag data from the connection flag latch 102, and also generates pixel data of 2 pixels x 2 pixels. The lower two data d. , dl are also output, and these codes are given to the contour analysis section 43 via the signal line 7. Furthermore, the command generation circuit 103 outputs a read ready code to the signal line 6. For example, if run length conversion is not performed, the connection/pattern code is as shown in FIG.
When it corresponds to the O mark in FIG. 11, the read ready code is set to rlJ, and when it corresponds to the Δ mark or the X mark, it is set to "0". Additionally, an EOP signal indicating the end of one page is sent to the peripheral determination circuit 109 via the signal line 9.
A FOR signal indicating the end of the signal and I line is input manually, and as a result, an EOP code and a FOR signal are sent from there to signal line 6.
The code will be output. In this way, the signal line 6 is given the coordinate code indicating the X coordinate of the pixel data from the address generation circuit 108, as well as the EOP code and the FOR code.
These codes are given to the contour analysis section 4.

以上において、上述実施例のように第10図。In the above, as in the above embodiment, FIG.

第11図に示す組み合わせに応じて読み出しレディコー
ドを発生させれば孤立画素をノイズとして除去できる利
点がある。即ち孤立画素に対して発生する画素データの
パターンは第18図(イ)〜(ニ)のように4種類ある
が、この場合この画素に対しては輪郭要素の接続は存在
しないので、読み出しレディコードは「0」となり、従
って輪郭解析部4.では処理が行われていないからであ
る。
Generating read ready codes according to the combinations shown in FIG. 11 has the advantage that isolated pixels can be removed as noise. In other words, there are four types of pixel data patterns generated for an isolated pixel, as shown in FIGS. The code becomes "0", so the contour analysis section 4. This is because no processing is being performed.

ただしランレングス化を実施する場合には第18図(イ
)、(ロ)のパターンのときに読み出しレディコードは
「1」となるが、輪郭追跡処理とは無関係である。
However, when performing run-length conversion, the read ready code becomes "1" for the patterns shown in FIGS.

ここで輪郭解析部4.で行われる処理を第19図〜第2
3図を参照しながら説明する。先ず第19図に示すよう
にYアドレスを0とした後コマンド列を取り込み、この
コマンド列の中にEOPの指示がされている場合には処
理を終了し、指示がされていない場合にはFORの指示
がされているか否かを判断する。EC)Rの指示がされ
ている場合にはYアドレスを一つ加算してコマンド列を
取り込み、指示がされていない場合には内部メモリ43
内に格納されている各テーブル(第3図〜第5図参照)
を更新する。
Here, contour analysis section 4. The processing performed in Figures 19 to 2
This will be explained with reference to FIG. First, as shown in Figure 19, after setting the Y address to 0, a command string is fetched, and if the EOP instruction is included in this command string, the process is terminated, and if there is no instruction, the FOR Determine whether or not the instructions have been given. If EC)R is instructed, add one Y address and take in the command string; if not instructed, internal memory 43
Each table stored in (see Figures 3 to 5)
Update.

各テーブルの更新のフローは第20図に示すようであり
、同図中のステップST、−s’rsは以下の通りであ
る。
The flow of updating each table is shown in FIG. 20, and steps ST and -s'rs in the figure are as follows.

S T l・・・輪郭要素が単独で新たに発生している
か否かの判断を行う。
S T l . . . It is determined whether or not a single contour element has newly occurred.

ST、・・・輪郭要素が発生すると同時に既に存在して
いる輪郭要素と接続されるか否かの判断を行う。
ST, . . . When a contour element is generated, it is determined whether or not it is connected to an already existing contour element.

S T s・・・既に発生している二つの輪郭要素の端
部が2画素×2画素の画像データの中に存在するか否か
の判断を行う。
S T s: It is determined whether the edges of two contour elements that have already been generated exist in the 2 pixel x 2 pixel image data.

次いで第20図中の処理l〜3の内容について述べると
、処理lでは第2.1図に示すようにステップST、〜
ST、が実行される。各ステップST。
Next, the contents of processes 1 to 3 in FIG. 20 will be described. In process 1, as shown in FIG. 2.1, steps ST, -
ST is executed. Each step ST.

〜ST、は以下の通りである。~ST, is as follows.

ST、・・・第3図に示す輪郭要素テーブル及び第4図
に示す輪郭管理テーブルにて輪郭要素番号Ciと輪郭番
号Stとを新たに確保する。
ST, . . . new contour element numbers Ci and contour numbers St are secured in the contour element table shown in FIG. 3 and the contour management table shown in FIG. 4.

ST、・・・輪郭要素テーブルのCi番目の方向、座標
の欄に該当事項を、接続要素番号の前方接続及び後方接
続の両側にN0NE (該当するものがないことを示すコード)を、所属輪郭
番号の欄にStを夫々書き込む。
ST,...Enter the applicable information in the Ci-th direction and coordinate column of the contour element table, N0NE (code indicating that there is no applicable item) on both sides of the forward connection and backward connection of the connected element number, and the belonging contour. Write St in each number column.

ST3・・・輪郭管理テーブルのSt番目の先端の輪郭
要素番号及び終端の輪郭要素番号の両側にCIを書き込
む。
ST3...Write CI on both sides of the St-th leading edge contour element number and end edge contour element number of the contour management table.

S T 4・・・第5図に示す輪郭接続テーブルの前方
接続及び後方接続の該当する欄に夫々Ciを書き込む。
S T 4...Write Ci in the corresponding columns of the front connection and rear connection of the contour connection table shown in FIG. 5, respectively.

処理2では第22図に示すようにステップST。In process 2, as shown in FIG. 22, step ST is performed.

〜S T sが実行される。各ステップST、〜ST。~STs is executed. Each step ST, ~ST.

は以下の通りである。is as follows.

ST1・・輪郭要素テーブルにて輪郭要素番号Ciを新
たに確保する。
ST1: A new contour element number Ci is secured in the contour element table.

S T t・・・輪郭接続テーブルの該出側から接続先
の輪郭要素番号Cjを求め、当該側をN0NEに書き換
える。
S T t...Determine the contour element number Cj of the connection destination from the output side of the contour connection table, and rewrite the side to N0NE.

ST3・・・輪郭要素テーブルのCj番目の前方接続及
び後方接続の欄の該当する方にCiを書き込むと共に所
属輪郭番号の欄から Cjが属する輪郭番号Skを求める。
ST3: Write Ci in the corresponding column of the Cj-th forward connection and backward connection of the contour element table, and find the contour number Sk to which Cj belongs from the column of belonging contour number.

’ST、・・・輪郭要素テーブルのCi番目の方向、座
標の欄に該当する事項を、前方接続及び後方接続の欄の
該当する方にCjを、他方にN0NEを、所属輪郭番号
欄にSkを夫々書き込む。
'ST, ... Enter the information corresponding to the Ci-th direction and coordinate column of the contour element table, Cj in the corresponding one of the forward connection and backward connection columns, N0NE in the other, and Sk in the belonging contour number column. Write each.

S T 5・・・輪郭管理テーブルのSk番目の先端の
輪郭要素番号及び終端の輪郭要素番号の欄のうち該当す
る方をCiに書き換える。
S T 5: Rewrite the corresponding one of the Sk-th tip contour element number and end contour element number columns of the contour management table to Ci.

ST、・・・輪郭接続テーブルの該当する欄にCiを書
き込む。
ST,...Write Ci in the corresponding column of the contour connection table.

処理3では、第23図に示すようにステップST、〜S
T6が実行される。各ステップST、〜STsは以下の
通りである。
In process 3, as shown in FIG.
T6 is executed. Each step ST, to STs is as follows.

ST、・・・輪郭接続テーブルの該出側から接続の対象
となる二つの輪郭要素Ci、Cjを求め、当該側をN0
NEに書き換える。
ST, ... Obtain two contour elements Ci and Cj to be connected from the output side of the contour connection table, and set the relevant side to N0.
Rewrite to NE.

S T t・・・輪郭要素テーブルのCi番目の前方接
続及び後方接続の両様のうち該当する方にCjを書き込
むと共に所属輪郭番号の欄からCiが所属する輪郭番号
Skを求める。
S T t...Cj is written in the Ci-th forward connection and backward connection of the contour element table, whichever is applicable, and the contour number Sk to which Ci belongs is obtained from the column of belonging contour number.

STs・・・輪郭要素テーブルのCj番目の前方接続及
び後方接続の両様のうち該当する方にC1を書き込むと
共に所属輪郭番号の欄からCjが所属する輪郭番号SQ
を求める。
STs...Write C1 in the applicable one of the Cj-th forward connection and backward connection in the contour element table, and also write the contour number SQ to which Cj belongs from the belonging contour number column
seek.

ST、・・・SkとSQとが同じ番号か否か判断する。ST... Determines whether Sk and SQ are the same number.

STs・・・輪郭管理テーブルのSk番目の先端の輪郭
要素番号及び終端の輪郭要素番号のうち接続の対象とな
っていない方の輪郭要素番号Cmを求め、Sk番目の各
欄を N0NEに書き換える。
STs: Obtain the contour element number Cm which is not the connection target among the Sk-th tip contour element number and the end contour element number of the contour management table, and rewrite each Sk-th column to N0NE.

STe・・・輪郭管理テーブルのS12番目の先端の輪
郭要素番号及び終端の輪郭要素番号のうち接続の対象と
なっている端部側の欄をCmに書き換える。
STe: Of the S12th tip contour element number and end contour element number of the contour management table, the column on the end side to be connected is rewritten to Cm.

第24図は上記の処理i〜3と2画素×2画素の画素デ
ータの取り出し位置との関係を示す図であり、同図中数
字は輪郭要素の番号、点線の四角形は画素データ、黒点
は黒画素を夫々示す。画素データD、に対して生成され
たコマンド列の処理は処理1に該当し、画素データD、
に対して生成されたコマンド列の処理は処理2に該当す
る。また画素データD3.D、に対して生成されたコマ
ンド列は夫々処理3におけるSkとS12が等しい場合
及び異なる場合に相当する。
FIG. 24 is a diagram showing the relationship between the above-mentioned processes i to 3 and the extraction position of 2 pixels x 2 pixels pixel data, in which the numbers are the numbers of contour elements, the dotted rectangles are pixel data, and the black dots are Each black pixel is shown. The processing of the command string generated for the pixel data D, corresponds to processing 1, and the processing of the command string generated for the pixel data D,
The processing of the command string generated for this corresponds to processing 2. Also, pixel data D3. The command strings generated for D correspond to the cases in which Sk and S12 are equal and different in process 3, respectively.

上述のような処理を行った後、次に輪郭画素系列の短い
系列の除去を行う。この処理のフローチャートを第25
図に示す。第25図において、ステップS T +は画
素系列内の輪郭画素の総数Nを求める。求めた総数Nは
ステップS T 2でしきい値N+hと比較される。ス
テップST3はpJ > N Ihかを判断するステッ
プで、このステップS T 3でYESなら処理は終了
する。また、ステップST3でNOならステップS T
 4に進み、輪郭画素系列の短い系列を意味のないデー
タ(雑音)として輪郭画素系列から除去する。このとき
、第4図のテーブルから短い画素系列の情報を削除する
After performing the above-described processing, next the short series of contour pixel series is removed. The flowchart of this process is shown in the 25th section.
As shown in the figure. In FIG. 25, step S T + determines the total number N of contour pixels in the pixel sequence. The determined total number N is compared with a threshold value N+h in step S T 2. Step ST3 is a step for determining whether pJ > N Ih, and if YES in step ST3, the process ends. Also, if NO in step ST3, step ST
Proceeding to step 4, short sequences of the contour pixel sequence are removed from the contour pixel sequence as meaningless data (noise). At this time, information on short pixel sequences is deleted from the table shown in FIG.

H9発明の効果 本発明によれば、2画素×2画素の画素データに係る画
素と輪郭要素との接続関係、及びその画素データの黒白
の配列パターンを知ることにより輪郭要素の配列状態を
認識しており、前記接続関係についてはlライン前に取
り出した画素データに基づいて作成できるから、従来の
ように1画面分の画像データを記憶する方式に比べて大
幅に画像メモリを節約することができる。ここにライン
メモリは、一般的な16画素/ZXの分解能においてA
Oサイズでも長尺方向で約19000ビツトであり、た
かだか数キロバイトもあればA4からAOサイズまでを
カバーできることになり、その程度のメモリを持つこと
で画像サイズや解像度に影響されないハードウェア回路
を実現できる。
H9 Effects of the Invention According to the present invention, the arrangement state of outline elements can be recognized by knowing the connection relationship between pixels and outline elements related to 2 pixels x 2 pixels of pixel data, and the black and white arrangement pattern of the pixel data. Since the connection relationship can be created based on the pixel data taken out one line before, the image memory can be saved significantly compared to the conventional method of storing image data for one screen. . Here, the line memory has a typical resolution of 16 pixels/ZX.
Even O size is about 19,000 bits in the long direction, and with a few kilobytes at most, it can cover everything from A4 to AO size, and by having that much memory, it is possible to create a hardware circuit that is not affected by image size or resolution. can.

またlラインのスキャニング時間を単位として処理を行
うため、1画面の入力時間とほぼ等しい時間(最大lラ
イ2分の遅延時間)に輪郭を抽出できるため、従来方式
の処理時間に比べ大幅な高速処理が可能となった。
In addition, since processing is performed in units of 1-line scanning time, contours can be extracted in approximately the same time as the input time for one screen (maximum delay time of 2 minutes), which is significantly faster than the processing time of conventional methods. processing is now possible.

更に輪郭抽出部からのコマンド列に基づいて、輪郭要素
毎に座標や、他の輪郭要素の接続関係等を記載したテー
ブル、及び輪郭の前後端に位置する輪郭要素を記載した
テーブルを作成し、これにより輪郭要素を線や図形とし
て意味を持つデータ列を得ているため、輪郭の取り出し
を系列単位に(輪郭をなす一つの閉じた線毎に)容易に
行うことができる。この他、輪郭画素系列のうち、短い
画素系列を除去することにより、意味ないノイズ成分が
少なくなり、装置自体の性能か向上するようになる。
Furthermore, based on the command string from the contour extraction unit, a table is created in which the coordinates of each contour element, connection relationships with other contour elements, etc. are described, and a table in which contour elements located at the front and rear ends of the contour are described, As a result, data strings that have meaning as outline elements as lines or figures are obtained, so that outlines can be easily extracted in series units (for each closed line forming the outline). In addition, by removing short pixel sequences from the outline pixel sequence, meaningless noise components are reduced and the performance of the apparatus itself is improved.

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

第1図は本発明のハードウェア構成を示すブロック図、
第2図はラスタスキャンの様子を示す説明図、第3図は
輪郭要素テーブルを示す説明図、第4図は輪郭管理テー
ブルを示す説明図、第5図は輪郭接続テーブルを示す説
明図、第6図(イ)。 (ロ)は、各々画素データと輪郭要素との関係を示す説
明図、第7図は輪郭要素間の接続状態を示す説明図、第
8図は輪郭要素の方向を示す説明図、第9図は本発明の
ハードウェア構成を示す構成図、第10図及び第1t図
は画素データと接続関係との成立関係を示す説明図、第
12図は画素データを示す説明図、第13図は接続フラ
グを示す説明図、第14図はコマンド列を示す説明図、
第15図は輪郭抽出部を示す回路図、第16図及び第1
7図は各々接続フラグデータの説明図、第18図は孤立
画素のパターンを示すパターン図、第19図は輪郭解析
部の全体処理を示すフローチャート、第20図はテーブ
ル更新処理を示すフローチャート、第21図〜第23図
は夫々処理1〜3を示すフローチャート、第24図はテ
ーブル更新処理と画素データの位置との関係を示す説明
図、第25図は輪郭画素系列の短い画素系列の除去のフ
ローチャート、第26図は従来の輪郭画素抽出態様を示
す説明図である。 ■、4.・・・輪郭抽出部、2.43・・・輪郭解析部
、3・・・テーブル格納部、4・・・輪郭検出装置、4
4・・・内部メモリ、31・・・短い画素系列除去部。 第1図 本発明の楕或図 1−一一輪郭抽出部 2−・・輪郭解析部 3・・−テーブル格納部 31−・−短い画素系列除去部 第2図 ラスタスキャンの説明図 第3図 輪郭要素テーブルの説明図 第4図 第5図 輪郭接続テーブル 第6図 面素データと輪郭要素との関係国 (イ)                 (ロ)Xn
−I  Xn            Xn−IXn第
9図 実施例の構を図 4−−一輪郭検出装置 41−m−内部バス 42−一一輪郭抽出部 43−一一輪郭解折部 44−−一内部メモリ 45−・−バスインターフェイス 46−−−メインバス 第10図 面素データと接続関係との成立関係図 第12図      第13図 面素データの説明図          接続フラグの
説明図コマンド死の説明図 第11図 面素データと接続間係との成立関係図 第15図 輪郭抽出部の回路図 第16図 接続フラグデータの説明面 第17図 接続フラグデータの説明図 第18図 孤立画素のパターン説明図 (イ)             (ロ)(ハ)   
        (ニ) 第19図 輪郭解析部の全体処理のフローチャート第20図 更新処理のフローチャート 第21図     第22図 処理1のフローチャート       処理2のフロー
チャート第23図 処理3のフローチャート 第24図 更新処理と両案データの位置との関係図D+ 第25図 の除去のフローチャート
FIG. 1 is a block diagram showing the hardware configuration of the present invention,
FIG. 2 is an explanatory diagram showing the state of raster scanning, FIG. 3 is an explanatory diagram showing the contour element table, FIG. 4 is an explanatory diagram showing the contour management table, FIG. 5 is an explanatory diagram showing the contour connection table, Figure 6 (a). (b) is an explanatory diagram showing the relationship between pixel data and contour elements, FIG. 7 is an explanatory diagram showing the connection state between contour elements, FIG. 8 is an explanatory diagram showing the direction of contour elements, and FIG. is a configuration diagram showing the hardware configuration of the present invention, FIGS. 10 and 1t are explanatory diagrams showing established relationships between pixel data and connection relationships, FIG. An explanatory diagram showing flags, FIG. 14 is an explanatory diagram showing a command string,
Figure 15 is a circuit diagram showing the contour extraction section, Figure 16 and Figure 1.
7 is an explanatory diagram of connection flag data, FIG. 18 is a pattern diagram showing a pattern of isolated pixels, FIG. 19 is a flowchart showing the overall processing of the contour analysis section, FIG. 20 is a flowchart showing table updating processing, and FIG. 21 to 23 are flowcharts showing processes 1 to 3, respectively. FIG. 24 is an explanatory diagram showing the relationship between table update processing and the position of pixel data. FIG. The flowchart in FIG. 26 is an explanatory diagram showing a conventional outline pixel extraction mode. ■, 4. ... Contour extraction section, 2.43 ... Contour analysis section, 3 ... Table storage section, 4 ... Contour detection device, 4
4... Internal memory, 31... Short pixel sequence removal unit. Fig. 1 Ellipse of the present invention Fig. 1-11 Contour extraction unit 2 - Contour analysis unit 3 - Table storage unit 31 - Short pixel sequence removal unit Fig. 2 Illustration of raster scan Fig. 3 Explanatory diagram of contour element table Figure 4 Figure 5 Contour connection table Figure 6 Relationship between pixel data and contour elements Countries (a) (b) Xn
-I Xn --- Bus interface 46 --- Main bus No. 10 Diagram showing the establishment of the connection relationship between the pixel data and the connection relationship. Fig. 15: Circuit diagram of the contour extraction unit Fig. 16: Explanation of the connection flag data Fig. 17: Explanation of the connection flag data Fig. 18: Illustration of the pattern of isolated pixels )(c)
(D) Figure 19: Flowchart of overall processing of the contour analysis section Figure 20: Flowchart of update processing Figure 21 Figure 22: Flowchart of process 1 Figure 23: Flowchart of process 2 Figure 24: Flowchart of process 3 Figure 24: Update processing and both options Relation diagram with data position D+ Figure 25 Removal flowchart

Claims (1)

【特許請求の範囲】[Claims] (1)被写体をラスタスキャンして得られた黒白に対応
する2値化画素データに基づき、黒白の境界に相当する
輪郭を検出する装置において、縦横2画素×2画素の画
素データをスキャンラインに沿って順次に取り出し、互
いに隣接した2個の黒画素を結ぶベクトルに相当する輪
郭要素と当該画素データに係る画素との接続関係を、1
ライン前にて取り出した画素データに基づいて作成する
と共に、前記接続関係の情報と当該画素データの黒白の
配列パターンの情報とを含むコマンド列を作成して出力
する輪郭抽出部と、 前記輪郭要素とこれら輪郭要素群よりなる輪郭とに対し
て各々固有の符号を付すと共に、輪郭要素毎に、その座
標及び方向と輪郭要素が所属する輪郭の符号と輪郭要素
の前後に夫々接続されている他の輪郭要素の符号とを記
載するための輪郭要素テーブルと、輪郭毎に先端及び終
端に位置する輪郭要素の符号を記載するための輪郭管理
テーブルと、ラスタスキャン方向に並ぶX座標とその座
標に前端または後端が位置する未接続の輪郭要素の符号
とその輪郭要素の未接続端の前後端の区別とを対応させ
て記載するための輪郭接続テーブルとを格納するための
テーブル格納部と、 前記輪郭抽出部よりのコマンド列に基づいて前記テーブ
ル格納部内の各テーブルの記載を更新すると共に、輪郭
要素テーブルの前記他の輪郭要素の符号の更新について
は輪郭接続テーブルを参照して行い、且つ輪郭画素系列
内の輪郭画素の総数を求め、該総数としきい値とを比較
し、しきい値よりも輪郭画素の総数が小さいときに輪郭
画素系列から除去する処理を行う輪郭解析部とを設けて
なることを特徴とする輪郭検出装置。
(1) In a device that detects the contour corresponding to the boundary between black and white based on binary pixel data corresponding to black and white obtained by raster scanning the subject, pixel data of 2 pixels x 2 pixels horizontally and vertically is converted into a scan line. The connection relationship between the contour element corresponding to the vector connecting two adjacent black pixels and the pixel related to the pixel data is calculated as 1.
an outline extraction unit that creates and outputs a command string based on pixel data extracted before a line, and that also includes information on the connection relationship and information on a black and white arrangement pattern of the pixel data; and the outline element. A unique code is attached to each contour consisting of a group of contour elements, and each contour element is connected to its coordinates and direction, the code of the contour to which the contour element belongs, and the front and rear of the contour element. A contour element table for recording the codes of contour elements located at the tip and end of each contour, a contour management table for recording the codes of the contour elements located at the tip and end of each contour, and the X coordinates aligned in the raster scan direction a table storage unit for storing a contour connection table for describing a code of an unconnected contour element in which a front end or a rear end is located and a distinction between the front and rear ends of the unconnected end of the contour element in correspondence; updating the description of each table in the table storage section based on a command string from the contour extraction section, and updating the codes of the other contour elements in the contour element table with reference to the contour connection table; A contour analysis unit is provided which calculates the total number of contour pixels in the contour pixel series, compares the total number with a threshold value, and performs processing to remove the contour pixels from the contour pixel series when the total number of contour pixels is smaller than the threshold value. A contour detection device characterized by a contour detection device.
JP63102040A 1988-04-25 1988-04-25 Contour detector Pending JPH01273186A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63102040A JPH01273186A (en) 1988-04-25 1988-04-25 Contour detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63102040A JPH01273186A (en) 1988-04-25 1988-04-25 Contour detector

Publications (1)

Publication Number Publication Date
JPH01273186A true JPH01273186A (en) 1989-11-01

Family

ID=14316659

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63102040A Pending JPH01273186A (en) 1988-04-25 1988-04-25 Contour detector

Country Status (1)

Country Link
JP (1) JPH01273186A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6055475A (en) * 1983-09-06 1985-03-30 Matsushita Electric Ind Co Ltd Extracting device of boundary line
JPS62198992A (en) * 1986-02-26 1987-09-02 Nec Corp Noise decision system for character recognizing device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6055475A (en) * 1983-09-06 1985-03-30 Matsushita Electric Ind Co Ltd Extracting device of boundary line
JPS62198992A (en) * 1986-02-26 1987-09-02 Nec Corp Noise decision system for character recognizing device

Similar Documents

Publication Publication Date Title
JP2940496B2 (en) Pattern matching encoding apparatus and method
EP0687991B1 (en) Information processing method and apparatus and computer readable memory medium
CN110111243B (en) Method and device for beautifying handwriting fonts by using AI technology
JPH01273186A (en) Contour detector
JPH01243188A (en) Contour detector
JPH01277976A (en) Image processor
CN109409370B (en) Remote desktop character recognition method and device
JPH01251182A (en) Contour detector
JPH01251183A (en) Contour detector
JPH01251181A (en) Contour detector
JPH01273185A (en) Contour detector
JPH01244583A (en) Contour detector
JP2878278B2 (en) Image processing method
JPH0264782A (en) Outline detecting device
JP2703559B2 (en) Character recognition support device
JPS6214277A (en) Picture processing system
JP3444726B2 (en) Character processor
JP2679098B2 (en) Encoding processing device for contour detection image
JPH01244582A (en) Contour detector
JPH01243187A (en) Picture processor
JPH01251180A (en) Contour detector
JP2954218B2 (en) Image processing method and apparatus
JPH10187884A (en) Character recognizing device and recording medium
JP2000172780A (en) Document registering device and figure recognition device
JPH11232381A (en) Character reader