JPH01251182A - Contour detector - Google Patents

Contour detector

Info

Publication number
JPH01251182A
JPH01251182A JP63078684A JP7868488A JPH01251182A JP H01251182 A JPH01251182 A JP H01251182A JP 63078684 A JP63078684 A JP 63078684A JP 7868488 A JP7868488 A JP 7868488A JP H01251182 A JPH01251182 A JP H01251182A
Authority
JP
Japan
Prior art keywords
contour
connection
pixel data
pixels
pixel
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
JP63078684A
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 JP63078684A priority Critical patent/JPH01251182A/en
Publication of JPH01251182A publication Critical patent/JPH01251182A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To prevent the capacity of an image memory, the constitution of hardware and processing time from the influence of the size of an image or resolution and simultaneously and to reduce a noise component by making a table showing a coordinate and connecting relation based on a command column obtained from a contour extraction part and obtaining a data column having a meaning by making a contour element as a line or a graphic. CONSTITUTION:When the command column concerning to image data in the thick frame of a figure is fetched by a command column analysis part 2, the contour element Cj shown by a dotted line is registered to the contour element table, the direction and the coordinate of it are written and simultaneously, the numbers of the other contour elements which are respectively connected before and after the concerned contour element Cj are written in a connection element number column. In this case, since the contour element Cj is positioned at the front of the contour element Ci, it is written in a front connection column concerning to the column of the contour element Cj. Besides, the contour number Si is written in a contour number column. As for the direction of the contour element, (a1-a8) is specified corresponding with a top and bottom, a right and left and an oblique direction like the figure in case of 8 coupling and the four directions of a top and bottom and a right and left are specified in case of 4 coupling.

Description

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

B1発明の概要 本発明は、被写体をラスタスキャンして得られた黒白に
対応する2値化画素データに基づき黒白の境界に相当す
る輪郭を検出する装置において、2画素×2画素の画素
データを順次に取り出し、1ライン前に取り出した画素
データに基づいて、例えばラスタスキャンY方向の輪郭
画素間の接続関係を求め、この関係及び画素データの配
列パターンの各情報を含むコマンド列を作成し、史にこ
れらコマンド列に基づいて、輸郭要素を系列化したテー
ブルを作成するとともに輪郭ベクトルテーブルからショ
ート輪郭ベクトルを除去することによって、画像メモリ
の容量、ハードウェア構成及び処理時間が画像サイズや
解像度に影響されることがなく、更に輪郭の取り出しを
容易に行うことができるようにしかつ、短いベクトルを
除去してノイズ成分を少なくして装置の性能の向−Lを
図ったものである。
B1 Summary of the Invention The present invention is 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, find the connection relationship between the contour pixels in the raster scan Y direction, create a command string containing this relationship and each piece of information about the arrangement pattern of the pixel data, In addition, based on these command sequences, a table in which contour elements are serialized is created, and short contour vectors are removed from the contour vector table, thereby reducing image memory capacity, hardware configuration, and processing time. The present invention aims to improve the performance of the apparatus by eliminating short vectors, reducing noise components, and eliminating short vectors.

C従来の技術 文字や図形等のパターンを処理する場合、例えば、書類
や図面等の被写体をイメージスキャナ等の人力装置で操
作して得られる黒と白の2値画像データ(人カバターン
)に変換し、この2値画像データから対象物の輪郭画素
を抽出し、情報圧縮処理や対象物の認識処理を行ってい
る。
C 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 (human cover pattern) obtained by operating a human-powered 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値画像データから対象物の輪郭画素を抽出
するための従来方式は、第29図に示すような動作を示
す。これは以下のような処理の流れで記述できる。
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値画像データをすべて、専用1画像メモリM
に記憶する。
■First, store all binary image data in a dedicated single image memory M.
to be memorized.

■次に、このメモリ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.

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

1)1発明が解決しようとする課題 このように、従来の輪郭画素抽出方式においては、1画
面分の2値画像データを記憶するための専用メモリを必
要とする。これは、人力するn類や図面のサイズが大き
くなればなるほど、また、高解像度にするほどメモリが
大容量になる欠点をイfする。
1) 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 takes into account the disadvantage that the larger the size of the manual drawings and drawings, and the higher the resolution, the larger the memory capacity.

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

例えば、へ〇サイズを対象とする画像メモリは、A4サ
イズの画像メモリに比べて、16倍もの容1賃を必跨と
しており、Δ4サイズのメモリボードか1枚で構成され
るときでもAOサイズは16枚も必要である。
For example, an image memory for 〇 size requires 16 times the capacity compared to an A4 size image memory, and even when it is composed of a Δ4 size memory board or one AO size requires as many as 16 sheets.

次に、処理時間にも大きな影響がある。従来の方式では
、画像メモリに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.

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

本発明はこのような課題を解決するためになされたもの
であり、画像メモリの容ii1、ハードウェア構成及び
処理時間が画像サイズや解像度に影響されることがなく
、更に輪郭の取り出しを容易に行うことができるように
するとともに短いベクトルを除去してノイズ成分を少な
く装置の性能の向−■−を図る輪郭検出装置を提供する
ことを目的とする。
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 easier to extract contours. It is an object of the present invention to provide a contour detecting device that can perform the following steps, remove short vectors, reduce noise components, and improve the performance of the device.

161課題を解決するための手段 第1図は本発明の構成を示す図であり、1は輪郭抽出部
である。この輪郭抽出部lは、第2図に示すように被写
体をラスタスキャンして得られた黒白に対応する2値化
画素データを取り込んで、縦横2画素×2画素の画素デ
ータをスキャンラインに沿って順次に取り出し、この画
素データに基づいて輪郭検出用のコマンド列を作成して
後段の輪郭解析部2に出力する。輪郭解析部2は前記コ
マンド列に基づいてテーブル格納部3内の輸郭要素テー
ブル、輪郭管理テーブル及び輪郭接続テーブルの記載を
更新する。また、輪郭解析部2は輸郭要素テーブルと輪
郭管理テーブルを使用して1輪郭画素系列を構成する各
点のうち始点からみて極大となる点を抽出する巨視的処
理部31と、こからいくつか抽出する微視的処理部32
と、この処理部により抽出された点の輪郭ベクトルを輪
郭ベクトル系列テーブル33に記載し、この輪郭ベクト
ルのうち短い(ショート)ベクトルをショートベクトル
除去部34で除去し、その記載を更新する。
161 Means for Solving the 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 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 in the contour element table, contour management table, and contour connection table in the table storage section 3 based on the command sequence. The contour analysis section 2 also includes a macroscopic processing section 31 that uses the contour element table and the contour management table to extract the maximum point from the starting point among the points constituting one contour pixel series, and a macroscopic processing section 31 that extracts the maximum point from the starting point. microscopic processing unit 32 that extracts
Then, the contour vector of the point extracted by this processing section is written in the contour vector series table 33, and the short vector among these contour vectors is removed by the short vector removal section 34, and the description is updated.

ここで輸郭要素とは互いに隣接した2個の黒画素を結ぶ
ベクトルに相当するものであり、これを結合することに
よって輪郭が構成される。そして輸郭要素テーブルとは
、第3図に示すように輸郭要素とこれら輸郭要素群より
なる輪郭とに対して各々固有の符号を付すと共に、輸郭
要素毎に、その座標及び方向と輸郭要素が所属する輪郭
の符号と輸郭要素の前後に夫々接続されている他の輸郭
要素の符号とを記載するためのものである。また輪郭管
理テーブルとは第4図に示すように輪郭毎に先端及・び
終端に位置する輸郭要素の符号を記載するためのもので
あり、輪郭接続テーブルとは、第5図に示すようにラス
タスキャン方向に並ぶ座標とその座標に前端または後端
が存在する未接続の輸郭要素の符号とその輸郭要素の末
接続端の前後端の区別とを対応させて記載するためのも
のである。また、輪郭ベクトルテーブルとは第26図に
示すように輪郭ベクトル系列毎に始点座標の符号を記載
するためのものである。
Here, the contour element corresponds to a vector connecting two adjacent black pixels, and the contour is constructed by connecting these elements. As shown in Figure 3, the contour element table is a contour element 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 its coordinates and direction are indicated for each contour element. This is for describing the code of the contour to which the contour element belongs and the codes of other contour elements connected before and after the contour element, respectively. The contour management table is used to record the codes of contour elements located at the tip and end of each contour, as shown in Figure 4, and the contour connection table is used to record the codes of contour elements located at the tip and end of each contour, as shown in Figure 5. Coordinates arranged in the raster scan direction, codes of unconnected contour elements whose front or rear ends exist at those coordinates, and the distinction between the front and rear ends of the terminal connection ends of the contour elements are described in correspondence. It is. The contour vector table is used to record the code of the starting point coordinates for each contour vector series, as shown in FIG.

F4作用 輪郭抽出部lより出力されるコマンド列は、そのときに
取り出された2画素×2画素の画素データに係る画素と
輸郭要素との接続関係の情報、及び当該画素データの黒
白の配列パターンの情報を含む接続・パターンコードと
、″j当該画素データX座標を示す座標コードとを組み
合わせてなる。
The command string output from the F4 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 of the pixel data. It is a combination of a connection/pattern code containing pattern information and a coordinate code indicating the X coordinate of the pixel data "j".

前記接続関係の一例を第6図に示すと、同図(イ)の大
枠で囲まれた2画素×2画素の画素データを取り込んだ
ときには、この画素データのX座標x、。
An example of the connection relationship is shown in FIG. 6. When pixel data of 2 pixels x 2 pixels surrounded by the large frame in FIG.

に位置する輸郭要素の前端が接続されているという情報
になる。この例では、画素データの座標としては、紙面
に向かって右丁に位置する画素1)1の座標をとってい
る。また1・11図(ロ)の大枠で囲まれた画素データ
を取り込んだときには、この画素データのX座標より一
つ前の座標X n −1に位置する輸郭要素の後端が接
続されているという情報になる。なお第6図中O印を有
する枠は黒画素を示し、○印を有しない枠は白画素を示
している。
This information indicates that the front end of the contour element located at is connected. In this example, the coordinates of pixel data are the coordinates of pixel 1) 1 located on the right-hand side when facing the page. In addition, when the pixel data surrounded by the large frame in Figure 1.11 (b) is imported, the rear end of the contour element located at the coordinate X n -1 before the X coordinate of this pixel data is connected. This will give you information that there is. In FIG. 6, frames with O marks indicate black pixels, and frames without O marks indicate white pixels.

そして例えば第6図(イ)の大枠に管口すると、この場
合の接続・パターンフードは、上述の接続情報と大枠内
の黒白の配列パターンの情報とを含み、コマンド列は、
この接続・パターンコードと画素1)、のX座標を示す
座標コードとの組み合わせとなる。なおこの座標コード
については輪郭解析部2側にて、コマンド列の取り込み
のタイミングに同期して発生させることもできる。
For example, if the main frame in FIG. 6(a) is entered, the connection/pattern hood 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 combined with a coordinate code indicating the X coordinate of pixel 1). Note that this coordinate code can also 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の欄に係
る後方接続欄にCiを記入し、輸郭要素Cjの欄に係る
前方接続欄に01を記入する。史に輸郭要素Cjの所属
する輪郭の番号をこの例ではSiを輪郭番号欄に記入す
る。輸郭要素の方向については例えば8連結の場合、第
8図に示すようにl−下、左右、斜めの方向に対応して
a1〜a8が規定され、また4連結の場合、上下、左右
の4方向が規定される。そして輪郭管理テーブルの輪郭
重りSiについて、先端の輸郭要素番号欄をC1からC
jに更新すると共に、輪郭接続テーブルにおける当該画
素データのX座標について、未接続の輸郭要素番号の前
方接続の欄をCiからCjl、:更新する。ところで実
際の処理においては、輸郭要素Ciに接続されるべき輸
郭要素は輪郭接続テーブルにより明らかにされているた
め、輸郭要素テーブルの輸郭要素番号Cj欄に係る前方
接続欄のCjの記載は、輪郭接続テーブルを参照して行
われる。以上において所属輪郭番号は、ラスタスキャン
の進行に伴って別々に発生した二つの輪郭が接続されて
一つの輪郭になった場合には−方か他方に統合されて同
一になる。
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 large frame in Figure 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 enter Ci in the rear connection column for the column for the contour element Cj, and enter 01 in the front connection column for the column for the contour element Cj. do. In this example, Si, which is the number of the contour to which the contour element Cj belongs, is entered in the contour number field. Regarding the directions of the contour elements, for example, in the case of 8 connections, a1 to a8 are defined corresponding to the l-down, left/right, and diagonal directions, as shown in Figure 8, and in the case of 4 connections, the directions are defined in the upper, lower, left, and right directions. Four directions are defined. Then, for the contour weight Si in the contour management table, change the contour element number column at the tip from C1 to C.
At the same time, 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 from Ci to Cjl::. By the way, in actual processing, since the contour element to be connected to the contour element Ci is clarified by the contour connection table, Cj in the front connection column related to the contour element number Cj column in the contour element table is The description is made with reference to the contour connection table. In the above, when two contours generated separately as the raster scan progresses are connected to form one contour, the associated contour numbers are integrated into one contour and become the same.

−に、?L!のような処理において、1輪郭画素系列を
構成する各点のうち始点からみて極大となる点を抽出し
、次に抽出された連続する2点の間にある最大距離とな
る点を抽出する。このように抽出された輪郭ベクトルを
テーブルに格納する。この格納された輪郭ベクトルのう
ちンヨートベクトルを除去する。
- To,? L! In the process described above, the point that is the maximum when viewed from the starting point is extracted from each point constituting one contour pixel series, and then the point that is the maximum distance between the two consecutive extracted points is extracted. The contour vectors extracted in this way are stored in a table. The Nyoto vector is removed from the stored contour vectors.

G、実施例 本発明の実施例では、第9図に示すように内部バス4.
に輪郭抽出部43、輪郭解析部43及びテーブル格納部
としての内部メモリ44を結合して、各部間の情報の受
は渡しを内部バス4.を通じて行うように構成し、更に
内部バス41をバスインターフェイス4.を介してメイ
ンバス46に結合し、これにより輪郭検出装置4で得ら
れた情報を外部機器に与えるように構成している。
G. Embodiment In an embodiment of the present invention, an internal bus 4.
A contour extraction section 43, a contour analysis section 43, and an internal memory 44 serving as a table storage section are connected to the contour extraction section 43, a contour analysis section 43, and an internal memory 44 as a table storage section. Further, the internal bus 41 is configured to be connected to a 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.から発生するコマンド列の具体例
に関して述べる。第10図及び第1+図は、各々2画素
×2画素の画素データの黒白の配列パターンとこの画素
データに対する輸郭要素の接続関係との成立関係を示す
図であり、第1O図は8連結、第11図は4連結の場合
に夫々相当する。これら図において左端の縦に並ぶ4コ
マの窓は第12図に示すように2画素×2画素の画素デ
ータ(d、−d3)を示し、NJ、rOJが立っている
部分は夫々黒画素、白画素に相当する。また上端の横に
並ぶ4コマの窓は、第13図に示すように、上側左右の
2コマが夫々画素データのX座LM X n−1におけ
る前方接続の輸郭要素の有無及びX座標X1、における
前方接続の輪郭・要素の自゛無を、示し、下側左右の2
コマか夫々画素データのX座標X n −1における後
方接続の輸郭要素のイ1−無及びX座標X 11におけ
る後方接続の輸郭要素の有無を示す接続フラグであり、
I’ll、I’OJは夫々接続有り、接続無しを意味し
ている。例えば第6図(イ)の大枠で囲まれた画素領域
における接続フラグは、(xll、Y、、、)の座標位
置にて輸郭要素の前端か当該画素領域に接続されている
から、第1O図の接続フラグ欄の左から5番[−1のよ
うに右上のコマのみがrlJの窓で表わされる。
Next, the contour extraction section 4. A specific example of a command sequence generated from the following will be described. Fig. 10 and Fig. 1+ are diagrams showing the relationship between the black and white arrangement pattern of pixel data of 2 pixels x 2 pixels and the connection relation of the contour elements to this pixel data, and Fig. 1O shows the 8-connected , and FIG. 11 correspond to the case of four connections. In these figures, the four vertically arranged windows at the left end indicate pixel data (d, -d3) of 2 pixels x 2 pixels as shown in Fig. 12, and the parts where NJ and rOJ stand are black pixels, respectively. Corresponds to a white pixel. In addition, as shown in FIG. 13, the four-panel window arranged horizontally at the top end has two frames on the left and right of the upper side, respectively, indicating the presence or absence of a forward-connected contour element at the X-locus LM X n-1 of pixel data, and the , shows the absence of the contour/element of the forward connection in , and the lower left and right two
A connection flag indicating the presence or absence of a backwardly connected contour element at the X coordinate X n -1 of pixel data of each frame and the presence or absence of a backwardly connected contour element at the X coordinate X11,
I'll and I'OJ mean connected and not connected, respectively. For example, the connection flag in the pixel area surrounded by the large frame in FIG. Only the top right frame, such as number 5 [-1, from the left in the connection flag column in Figure 1O, is represented by the rlJ window.

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

△が記入された組み合わせについては、ランレンゲの符
号化を実施するときのみ、その組み合わせに対応した接
続・パターンコードが発生する。なお第6図、第7図に
おいては、輸郭要素の発生方向(ベクトルの向き)を考
慮せずに描いているが、実際には輸郭要素を、物体(ま
たは黒画像部)の外縁に沿って右回りに向(ように発生
させており、この発生の仕方に対応させて第1O図及び
第1I図の成立関係図を作成している。
For combinations marked with a △, a connection/pattern code corresponding to the combination is generated only when encoding the run range. Note that 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 at the outer edge of the object (or black image area). 1O and 1I are created corresponding to this way of generation.

前記コマンド列はこのようにして得られた接続・パター
ンフードの他に読み出しレディコードや座標コード等が
含まれ、その−例゛を挙げると第14図のように表わさ
れる。同図中へ、は読み出しレディコードであり、画素
データ及び接続フラグの組み合わせが第1O図、第11
図のX、あるいはX及び△に相当するときにはコマンド
列を無効とするものである。A、は画素データのX座標
、A3゜A、は画素データの下側左右に並ぶ二つの画素
の黒、白を示すコードであり、ランレングス化を実施す
る場合には、A1.Δ、が必要である。A、は1頁(全
ライン)の終わりを示すEOI)(ENDOF  PA
GE)コード、A、はlラインの終わりを示すFOR(
END  OF  ROW)コード、A7は接続・パタ
ーンコードである。
The command string includes the connection/pattern hood obtained in this manner, a read ready code, a coordinate code, etc., and is expressed as shown in FIG. 14, for example. In the same figure, is the read ready code, and the combination of pixel data and connection flag is shown in Figures 1O and 11.
When it corresponds to X or X and Δ in the figure, the command string is invalidated. A is the X coordinate of the pixel data, A3°A is a code indicating the black and white of the two pixels lined up on the left and right at the bottom of the pixel data, and when performing run length conversion, A1. Δ is required. A indicates the end of one page (all lines) (EOI) (ENDOF PA
GE) code, A, is FOR(
END OF ROW) code, A7 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.

画素データラッチ!01には信号線5及び後述するライ
ンメモリ105から画素データが人力される。このラッ
チはこれら人力されたデータから、第12図に示すよう
な2画素×2画素、すなわちI′i、いに隣接する4画
素のデータd0〜d、を取り込み、ラッチする。
Pixel data latch! 01 receives pixel data manually from the signal line 5 and a line memory 105, which will be described later. This latch takes in and latches 2 pixels by 2 pixels as shown in FIG. 12, ie, I'i, and data d0 to d of four adjacent pixels from these manually input data.

アドレス発生回路108は、第2図に示したラスタスキ
ャンの進行に応じてX座標及びY座標を発生させる。こ
の回路は発生させた座標を後述するラインメモリ105
.周辺判定回路109、並びに前方フラグメモリ106
に与えると共に、信号線8を通じて輪郭解析部4.にコ
マンド列1の一部として送出する。
Address generation circuit 108 generates X and Y coordinates 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 109 and forward flag memory 106
and the contour analysis unit 4 through the signal line 8. as part of command sequence 1.

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

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

一方、後方フラグメモリ107も座標と同じ数のアドレ
スを持つが、このメモリには、ある画素に輸郭要素の後
端が接続されかつその輸郭要素が他の輸郭要素に接続さ
れていないとき、その画素のX座標に対応するアドレス
に論理「l」のデータが、IFき込まれる。
On the other hand, the backward flag memory 107 also has the same number of addresses as the coordinates, but this memory contains information about cases where 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. At this time, logical "l" data is written into 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は、アドレス発生回路108が発生
するX及びY座標をもとに、処理の対象となる4つの画
素d0〜d、が、画面の境界からはみ出しているか否か
を判定する。画面の周囲から処理画素がはみ出している
場合には、所定の信号を画素データラフチ101および
接続フラグラッチ102に出力する。これらのラッチは
、この信リを受は取ると、画面の境界からはみ出した画
素については、強制的に白画素(背景となる画素)とす
る。
The periphery determination circuit 109 determines whether or not the four pixels d0 to d to be processed protrude from the boundaries of the screen, based on the X and Y coordinates generated by the address generation circuit 108. If the pixel to be processed protrudes from the periphery of the screen, a predetermined signal is output to the pixel data raffle 101 and the connection flag latch 102. When these latches accept this message, the pixels that protrude from the boundaries of the screen are forcibly set as white pixels (background pixels).

コマンド発生回路103は画素データラ、チ101が出
力する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 tracking based on the four pixel data output from the pixel data controller 101 and the flag data output from the connection flag lunch 102. do. 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 to the contour analysis unit 4 through the signal line 7. send to

接続フラグ変更回路104は、輪郭解析部4゜が」二記
コマンドに従って処理を実施した後、画素の接続状態が
変化するので、処理後の接続フラグを、画素データラッ
チ+01と接続フラグラッチ+02の出力データとをも
とに求め、前方フラグメモリ106、後方フラグメモリ
107、推びに接続フラグラッチ!02に出力する。
The connection flag change circuit 104 changes the connection state of the pixels after the contour analysis unit 4 executes the process according to the command ``2'', so the connection flag after the process is output from the pixel data latch +01 and the connection flag latch +02. Based on the data, connect the front flag memory 106, the rear flag memory 107, and the flag latch! Output to 02.

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

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

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

のYアドレスより1小さい行の画素データを一行分記憶
している。そして、信号線5から画素データd、、d、
が画素データラッチ101に順次人力されたとき、ライ
ンメモリ+05は、アドレス発生回路108が出力する
上記アドレスデータをもとに、画素データd、、d、を
順次同ラッチに出力する。これにより、画素データラッ
チ101は隣接する4つの画素データd。−d3をラッ
チすることができる。
One row of pixel data that is one row smaller than the Y address of is stored. Then, pixel data d, d,
are sequentially input to the pixel data latch 101, the line memory +05 sequentially outputs pixel data d, , d, 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. -d3 can be latched.

接続フラグ変更回路+04は、上記画素データd、−d
3と接続フラグランチ+02の出力データとをもとに、
4つの接続フラグデータを発生する。
The connection flag changing circuit +04 inputs the above pixel data d, -d
Based on 3 and the output data of connection flag launch +02,
Generates four connection flag data.

4つのデータの内、二つは第13図に示す接続フラグの
L側2コマに相当する前方接続フラグデータ、他の二つ
は下側2コマに相当する後方接続フラグデータである。
Of the four pieces of data, two are forward connection flag data corresponding to the L side 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座標は大きい。そして、空白のも
のはフラグデータの値がrOJ、1が書き込まれている
ものは値が「1」であることを示す。  ゛ 具体的に説明すると、画素elには輸郭要素Caの後端
が接続されているのでこの画素のX座標の後方接続フラ
グデータTlはNJとなっている。逆に、画素e2には
輸郭要素cbの前端が接続されているのでそのX座標の
前方接続フラグデータR2は「1」となっている。同様
に、画素e3に対応する後方接続フラグデータT4はI
N、画素e4に対応する前方接続フラグデータR4も1
−1」となっている。その他のフラグデータは、対応す
る画素に輸郭要素が接続されていないので、すべて「0
」となっている。
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 rOJ, and a field in which 1 is written indicates that the value is "1". Specifically, since the rear end of the contour element Ca is connected to the pixel el, the rear connection flag data Tl of the X coordinate of this pixel is NJ. Conversely, since the front end of the contour element cb is connected to the pixel e2, the forward connection flag data R2 at its X coordinate is "1". Similarly, backward connection flag data T4 corresponding to pixel e3 is I
N, forward connection flag data R4 corresponding to pixel e4 is also 1
-1". Other flag data are all "0" because no contour 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と接続フラグ変更回路lO4とに出力す
る。
Connection flag latch 102 latches these and outputs them to command generation circuit 103 and connection flag change circuit IO4.

接続フラグ変更回路104は上記4ビツトの接続フラグ
データ及び画素データラッチ101からの画素データd
0〜d、を受は取り、輸郭要素追跡処理後のフラグデー
タを求める。すなわち、追跡処理によって、画素e2に
は、第17図に示すように、輸郭要素cbに次の輪郭要
gCcが接続されるので、接続フラグ変更回路104は
、前方接続フラグデータR2を「0」とし、前方接続フ
ラグデータ【く3を「l」とする。後方接続フラグデー
タについては、輸郭要素の後端が単独で存在しない状態
が継続されているので変更は行わない。
The connection flag changing circuit 104 inputs the 4-bit connection flag data and the pixel data d from the pixel data latch 101.
0 to d are taken, and flag data after contour element tracking processing is obtained. That is, as shown in FIG. 17, the next contour element gCc is connected to the contour element cb in the pixel e2 through the tracking process, so the connection flag change circuit 104 changes the front connection flag data R2 to "0". ”, and the forward connection flag data [3] is set to “l”. 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の所定のアドレスに記憶させ、変更処理
後のフラグデータ+<a、′r3を接続フラグラッチ1
02に出力してラッチさせ、次の処理に備える。
The connection flag change circuit 104 stores the flag data R2, T2 after the above change processing in the predetermined addresses of the front flag memory 106 and the rear flag memory 107, and stores the flag data +<a,'r3 after the change processing into the connection flag latch. 1
It is output to 02 and latched in preparation for the next process.

そしてコマンド発生回路103では、画素データラ、7
チ101からの画素データd0〜d、及び接続フラグラ
ッチ102からの4ビツトのフラグデータをもとに、接
続・パターンコードを発生すると共に、2画素×2画素
の画素データのうち下側二つのデータd、、d、も出力
し、これらコードが信号線7を介して輪郭解析部4.に
与えられる。
Then, in the command generation circuit 103, the pixel data line, 7
A connection/pattern code is generated based on pixel data d0 to d from the chip 101 and 4-bit flag data from the connection flag latch 102, and the lower two data of the 2 pixels x 2 pixels pixel data are generated. d, , d are also output, and these codes are sent via the signal line 7 to the contour analysis section 4. given to.

更にコマンド発生回路103は読み出しレディコードを
信号線6に出力し、例えばランレングス化を実施しない
場合、接続・パターンコードが第1O図、第11図の○
印に相当するものであるときには、読み出しレディコー
ドをrNとし、△印またはX印に相当するものであると
きにはrOJとする。また周辺判定回路109には信号
線9を通じて1頁の終わりを示すE 01)信号及び1
ラインの終わりを示すF OR信号が入力され、この結
果ここから信号線6にEOPフード及びl’: ORコ
ードが出力される。こうして信号線6には、アドレス発
生回路108よりの画素データのX座標を示す座標コー
ドと共にEOPコード及びEORコードが与えられ、こ
れらフードが輪郭解析部43に与えられる。
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 set to ○ in Figures 1O and 11.
When the read ready code corresponds to a mark, the read ready code is set to rN, and when it corresponds to a Δ mark or an X mark, the read ready code is set to rOJ. Further, the peripheral determination circuit 109 receives an E01) signal indicating the end of one page through a signal line 9, and an E01) signal indicating the end of one page.
A FOR signal indicating the end of the line is input, and as a result, an EOP food and l': OR code is output from there to the signal line 6. In this way, the EOP code and the EOR code are given to the signal line 6 along with the coordinate code indicating the X coordinate of the pixel data from the address generation circuit 108, and these hoods are given to the contour analysis section 43.

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

第11図に示す組み合わせに応じて読み出しレディコー
ドを発生させれば孤立画素をノイズとして除去できる利
点がある。即ち孤立画素に対して発生する画素データの
パターンは第18図(イ)〜(ニ)のように4種類ある
が、この場合この画素に対しては輸郭要素の接続は存在
しないので、読み出しレディコードは[−〇」となり、
従って輪郭解析部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 Figure 18 (a) to (d), but in this case, there is no connection of contour elements to this pixel, so reading The ready code is [-〇],
Therefore, the contour analysis section 4. This is because no processing is being performed.

g ただしランレングス化を実施する場合には第事!図(イ
)、(ロ)のパターンのときに読み出しレディコードは
「l」となるが、輪郭追跡処理とは無関係である。
g However, when implementing run-length conversion, the first thing is important! In the case of the patterns shown in FIGS. (a) and (b), the read ready code is "l", but this has nothing to do with the contour tracking process.

ここで輪郭解析部43で行われる処理を第19図〜第2
3図を参照しながら説明する。先ず第19図に示すよう
にYアドレスを0とした後コマンド列を取り込み、この
コマンド列の中にEOPの指示がされている場合には処
理を終了し、指示がされていない場合にはFORの指示
がされているか否かを判断する。FORの指示がされて
いる場合にはYアドレスを一つ加算してコマンド列を取
り込み、指示がされていない場合には内部メモリ/lJ
内に格納されている各テーブル(第3図〜第5図及び第
26図参照)を更新する。
Here, the processing performed by the contour analysis section 43 is shown in FIGS. 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 FOR is instructed, add one Y address and take in the command string, if not instructed, internal memory/lJ
Each table (see FIG. 3 to FIG. 5 and FIG. 26) stored in the server is updated.

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

ST1・・・輸郭要素が単独で新たに発生しているか否
かの判断を行う。
ST1: 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′「3・・・既に発生している二つの輸郭要素の端部
が2画素×2画素の画像データの中に存在するか否かの
判断を行う。
S'"3... It is determined whether the ends of the two contour elements that have already occurred exist in the 2 pixel x 2 pixel image data.

次イで120図中の処理1〜3の内容5こついて述べる
と、処理1では第21図に示すようにステップS ′F
、〜s′r、が実行される。各ステップsT1〜ST、
は以下の通りである。
Next, I will explain the details of processes 1 to 3 in Figure 120. In process 1, as shown in Figure 21, step S'F
, ~s'r, are executed. Each step sT1 to ST,
is as follows.

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

ST、・・・輸郭要素テーブルのCi番[1の方向、座
標の欄に該当事項を、接続要素番号の前方接続及び後方
接続の両様にN0NEζ(該当するものがないことを示
すコード)を、所属輪郭番号の欄にS:を夫々:呼き込
む。
ST, ... Enter the relevant information in the direction and coordinate column of Ci number [1] of the extension element table, and enter N0NEζ (a code indicating that there is no applicable item) in both the forward connection and backward connection of the connection element number. , S: is called into the field of belonging contour number, respectively.

ST、・・輪郭管理テーブルのSi番目の先端の輸郭要
素番号1及び終端の輸郭要素番号の両様にCiを3き込
む。
ST: Enter 3 Ci into both the contour element number 1 at the Si-th tip and the contour element number at the end of the Si-th contour management table.

S ′r、・・・第5図に示す輪郭接続テーブルの前方
接続及び後方接続の該当する欄に夫々C1を+’Fき込
む。
S'r, . . . Input C1 +'F into the corresponding columns of the front connection and the 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′r6が実行される。各ステップs ’r 、〜S
Tsは以ドの通りである。
~S'r6 is executed. Each step s'r, ~S
Ts is as follows.

ST1・・・輸郭要素テーブルにて輸郭要素量すC1を
新たに確保する。
ST1: Newly secure the contour element quantity C1 in the contour element table.

S′r、・・・輪郭接続テーブルの該当欄から接続先の
輸郭要素番号Cjを求め、当該欄をN0NHに占き換え
る。
S'r... Find the contour element number Cj of the connection destination from the corresponding column of the contour connection table, and change the column to N0NH.

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

ST4・・・輸郭要素テーブルのCi番1[1の方向、
座標の欄に該当する事項を、前方接続及び後方接続の欄
の該当する方にCjを、他方にN0NEを、所属輪郭番
号欄にSkを夫々書き込む。
ST4...Ci number 1 [direction of 1,
Write the corresponding item in the coordinate column, Cj in the forward connection and backward connection columns, N0NE in the other column, and Sk in the belonging contour number column.

s ′r 、909輪郭輪郭接続テーブルk番目の先端
の輸郭要素番号及び終端の輸郭要素番号の欄のうち該当
する方をCiに7+き換える。
s'r, 909 Contour Contour Connection Table The corresponding one of the columns of the k-th tip contour element number and the end contour element number is changed to Ci by 7+.

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

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

ST、・・・輪郭接続テーブルの該当欄から接続の対象
となる二つの輸郭要素Ci、Cjを求め、′!1該欄を
N0NEに、!Fき換える。
ST,... Find two contour elements Ci and Cj to be connected from the relevant columns of the contour connection table, '! 1 Set the column to N0NE! Change F.

S′「、・・・輸郭要素テーブルのCi番11の前方接
続及び後方接続の両様のうち該当する方にC3を古き込
むと共に所属輪郭番号の欄からCiが所属する輪郭番号
Skを求める。
S' . . . Insert C3 into the appropriate one of the forward connection and backward connection of Ci number 11 in the contour element table, and find the contour number Sk to which Ci belongs from the column of belonging contour number.

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

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

S′「、・・・輪郭管理テーブルのSk番口の先端の輸
郭要素番号及び終端の輸郭要素番号のうち接続の対象と
なっていない方の輪郭要素番号Cmを求め、s ka 
[1の各欄をN0NIシに書き換える。
S'",... Find the contour element number Cm of the tip contour element number and the end contour element number of the Sk number in the contour management table, whichever is not the target of connection, and s ka
[Rewrite each column of 1 to N0NI.

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

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

次に第25図に示す輪郭ベクトルテーブルを使用してシ
ョートベクトルを除去するト段について述べる。
Next, a step for removing short vectors using the contour vector table shown in FIG. 25 will be described.

第26図はショートベクトルの除去手段を説明するフロ
ーチャートで、ステップST、で第25図に示す輪郭ベ
クトルテーブルから輪郭ベクトルの外接四角形(第27
図に示す)(X、。l  Yarn)、(X−ax、Y
 man)の算出を行う。次にステップST。
FIG. 26 is a flowchart illustrating short vector removal means. In step ST, a circumscribed rectangle (the 27th
) (X, .l Yarn), (X-ax, Y
man) is calculated. Next step ST.

でd X =Xaan  Xa+to +d Y =y
max−yainとしきい値DX、h、DY、hとを比
較する。ステップST、はステップST、の比較判断部
で、このステップST3で(d X > D X l 
l、) U (d y > D Y lh)を判断し、
YESならステップST、で輪郭ベクトルとして外接四
角形という情報を作成する。この情報の1例を第28図
に外接四角形情報テーブルとして示す。前記ステップS
TJでNOなら第25図に示す輪郭ベクトルテーブルか
らステップST、で同一系列のベクトルを削除して雑音
(ノイズ)を除去する。
d X = Xaan Xa+to +d Y = y
Compare max-yain and threshold values DX, h, DY, h. Step ST is a comparison/judgment section of step ST, and in step ST3, (d X > D
l,) Determine U (d y > D Y lh),
If YES, in step ST, information on a circumscribed rectangle is created as a contour vector. An example of this information is shown in FIG. 28 as a circumscribed rectangle information table. Said step S
If NO in TJ, then in step ST, vectors of the same series are deleted from the contour vector table shown in FIG. 25 to remove noise.

第27図は輪郭ベクトルの外接四角形を示す説明図で、
第27図において、X ma*+  X sl Ill
  Y mjz+y、Inは次のようになる。
FIG. 27 is an explanatory diagram showing the circumscribed rectangle of the contour vector,
In FIG. 27, X ma*+ X sl Ill
Y mjz+y, In is as follows.

X aax= m a X  (”・+  X ++ 
 ”’)X m r +、=m i n (・、  x
 ++ −・−)y、4、=max(・・+yl+ ・
・・)y+m1n= m i n (・・・、y6.・
・)d X = X waax−−−X +m1ndy
−y、、1、−yln (d X<I)X、1.) n (d y<I)Y、、
、)(11シ、I) X 、、、、  D Y ++、
ニしきい値である。
X aax= m a X (”・+ X ++
”')X m r +, = min (・, x
++ −・−)y, 4, =max(・・+yl+ ・
・・) y+m1n= min (・・・, y6.・
・)dX=Xwaax---X+m1ndy
-y,,1,-yln (dX<I)X,1. ) n (d y<I)Y,,
, ) (11shi, I) X ,,,, D Y ++,
There are two thresholds.

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

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

史に輪郭抽出部からのコマンド列に基づいて、輸郭要素
fIjに座標や、他の輸郭要素の接続関係等を記載した
テーブル、及び輪郭の前後端に位置する輸郭要素を記載
したテーブルを作成し、これにより輸郭要素を線や図形
として意味を持つデータ列を得ているため、輪郭の取り
出しを系列単位に(輪郭をなす−っの閉じた線hjに)
容易に行うことができる。この他、輪郭ベクトル系列の
うち、短い輪郭ベクトル系列を除去できるため、ノイズ
成分が少なくなり、装置自体の性能向−Lを図ることが
できる。また、外接四角形情報が副次的に得られるため
、文字切り出し処理を行う場合に有効な活用を図ること
ができる。
Based on the command string from the contour extraction unit, a table that describes the coordinates of the contour element fIj, connection relationships with other contour elements, etc., and a table that describes the contour elements located at the front and rear ends of the contour. By creating a data string that has meaning as a contour element as a line or figure, extract the contour in series units (into a closed line hj that forms the contour)
It can be done easily. In addition, since short contour vector sequences can be removed from among the contour vector sequences, noise components are reduced, and the performance of the apparatus itself can be improved -L. Further, since the circumscribed rectangle information is obtained as a secondary information, it can be effectively utilized when character segmentation processing is performed.

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

第1図は本発明のハードウェア構成を示すブロック図、
第2図はラスタスキャンの様子を示す説明図、第3図は
輸郭要素テーブルを示す説明図、第4図は輪郭管理テー
ブルを示す説明図、第5図は輪郭接続テーブルを示す説
明図、第6図(イ)。 (ロ)は、各々画素データと輸郭要素との関係を示す説
明図、第7図は輸郭要素間の接続状態を示す説明図、第
8図は輸郭要素の方向を示す説明図、第9図は本発明の
ハードウェア構成を示す構成図、第1O図及び第11図
は画素データと接続関係との成q関係を示す説明図、第
12図は画素データを示す説明図、第13図は接続フラ
グを示す説明図、第14図はコマンド列を示す説明図、
第15図は輪郭抽出部を示す回路図、第16図及び第1
7図は各々接続フラグデータの説明図、第18図は孤)
1画素のパターンを示すパターン図、第19図は輪郭解
析部の全体処理を示すフローチャート、フローチャート
、第24図はテーブル更新処理と画素データの位置との
関係を示す説明図、第25図は輪郭ベクトル系列テーブ
ルを示す説明図、第26図はショートベクトル除去手段
のフローチャート、第27図は外接四角形の説明図、第
28図は外接四角形情報テーブルを示す説明図、第29
図は従来の輪郭画素抽出態様を示す説明図である。 1.4.・・・輪郭抽出部、2,43・・・輪郭解析部
、3・・・テーブル格納部、4・・・輪郭検出装置、4
4・・・内部メモリ。31・・・巨視的処理部、32・
・・微視的処理部、33・・・輪郭ベクトル系列テーブ
ル、34・・・輪郭ベクトル除去部。 第1図 本発明の構成図 第3図 輸郭要素テーブルの説明図 輪郭管理テーブルの説明図 第5図 輪郭接続テーブル 第6図 面素データと輸郭要素との関係図 (イ)                 (ロ)Xn
−I  Xn             Xn−1Xn
接続状態の説明図          輸郭要素の方向
説明図第9図 実施例の構成図 4−−輪郭検出装置 41−−−・内部バス 42−・輪郭抽出部 43−−−一輪郭解析部 44−・−白部メモリ 45−・−バスインターフェイス 46−・−メインバス 第10図 面素データと接続関係との成立間系図 IO+ 田 川 8i 日 田 第11図 面素データと接続関係との攻立関系図 第12図      第13図 面素データの説明図          接続フラグの
説明図コマンド列の説明図 第15図 輪郭抽出部の回B図 第16図 接続フラグデータの説明図 第17図 接続フラグデータの説明図 第18図 孤立画素のパターン説明図 (イ)             (ロ)(ハ)   
        (ニ) 第19図 輪郭解析部の全体処理のフローチャート第2o図 更新処理のフローチャート 第21図     第22図 処理1のフローチャート      処理2のフローチ
ャート第23図 処理3のフローチャート 第24図 更新処理と画素データの位置との関係図第25図 輪郭ベクトル系列テーブル 第26図 ノッートベクトル除去手段のフローチャート第28図 外接号吟形忰報テーブル 第29図 従来の輪郭画素抽出態様図
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 a contour element table, FIG. 4 is an explanatory diagram showing a contour management table, FIG. 5 is an explanatory diagram showing a 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, FIG. 9 is a configuration diagram showing the hardware configuration of the present invention, FIGS. Fig. 13 is an explanatory diagram showing connection flags, Fig. 14 is an explanatory diagram showing command strings,
Figure 15 is a circuit diagram showing the contour extraction section, Figure 16 and Figure 1.
Figure 7 is an explanatory diagram of each connection flag data, Figure 18 is an illustration)
A pattern diagram showing a pattern of one pixel, FIG. 19 is a flowchart showing the overall processing of the contour analysis section, FIG. 24 is an explanatory diagram showing the relationship between table updating processing and the position of pixel data, and FIG. 25 is a contour 26 is an explanatory diagram showing a vector series table, FIG. 26 is a flowchart of short vector removal means, FIG. 27 is an explanatory diagram of a circumscribed rectangle, FIG. 28 is an explanatory diagram showing a circumscribed rectangle information table, and FIG.
The figure is an explanatory diagram showing a conventional outline pixel extraction mode. 1.4. ... Contour extraction section, 2, 43 ... Contour analysis section, 3 ... Table storage section, 4 ... Contour detection device, 4
4...Internal memory. 31... Macroscopic processing unit, 32.
. . . Microscopic processing unit, 33 . . . Contour vector series table, 34 . . . Contour vector removal unit. Figure 1: Configuration diagram of the present invention Figure 3: Explanation of contour element table Explanation of contour management table Figure 5: Contour connection table Figure 6: Relationship diagram between element data and contour elements (a) (b) Xn
-I Xn Xn-1Xn
An explanatory diagram of the connection state An explanatory diagram of the direction of contour elements FIG. 9 A configuration diagram of the embodiment - White part memory 45 - - Bus interface 46 - - Main bus 10th drawing Genealogical diagram between establishment of element data and connection relationship IO + Tagawa 8i Hita 11th drawing Genealogical diagram of offensive relationship between element data and connection relationship Figure 12 13. Explanatory diagram of element data. 15. Diagram of connection flag. Explanatory diagram of command string. Pixel pattern explanatory diagram (a) (b) (c)
(d) Figure 19: Flowchart of overall processing of the contour analysis section Figure 2o: Flowchart of update processing Figure 21 Figure 22: Flowchart of process 1 Figure 23: Flowchart of process 2 Figure 23: Flowchart of process 3 Figure 24: Update processing and pixel data Fig. 25: Contour vector series table Fig. 26: Flowchart of note vector removal means Fig. 28: Circumscribed symbol gingata information table Fig. 29: Conventional outline pixel extraction method

Claims (1)

【特許請求の範囲】[Claims] (1)被写体をラスタスキャンして得られた黒白に対応
する2値化画素データに基づき、黒白の境界に相当する
輪郭を検出する装置において、縦横2画素×2画素の画
素データをスキャンラインに沿って順次に取り出し、互
いに隣接した2個の黒画素を結ぶベクトルに相当する輸
郭要素と当該画素データに係る画素との接続関係を、1
ライン前にて取り出した画素データに基づいて作成する
と共に、前記接続関係の情報と当該画素データの黒白の
配列パターンの情報とを含むコマンド列を作成して出力
する輸郭抽出部と、 輪郭の符号と輪郭要素の前後に夫々接続されている他の
輪郭要素の符号とを記載するための輪郭要素テーブルと
、輪郭毎に先端及び終端に位置する輪郭要素の符号を記
載するための輪郭管理テーブルと、ラスタスキャン方向
に並ぶX座標とその座標に前端または後端が位置する未
接続の輪郭要素の符号とその輪郭要素の未接続端の前後
端の区別とを対応させて記載するための輸郭接続テーブ
ルとを格納するためのテーブル格納部と、 前記輪郭抽出部よりのコマンド列に基づいて前記テーブ
ル格納部内の各テーブルの記載を更新すると共に、輸郭
要素テーブルの前記他の輸郭要素の符号の更新について
は輸郭接続テーブルを参照して行い、かつ前記輸郭要素
テーブルと輸郭管理テーブルから1輪郭画素系列を構成
する各点のうち始点からみて極大となる点を抽出すると
ともに、抽出された連続する2点の間にある最大距離と
なる点を抽出した輸郭ベクトルを格納部に格納し、この
格納された輪郭ベクトルのうちショート輪郭ベクトルを
除去する輪郭解析部とを設けてなることを特徴とする輪
郭検出装置。
(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 expressed as 1
a contour extraction unit that generates a command string based on the pixel data extracted before the line, and generates and outputs a command string including information on the connection relationship and information on the black and white arrangement pattern of the pixel data; A contour element table for recording the code and the codes of other contour elements connected before and after the contour element, and a contour management table for recording the codes of the contour elements located at the tip and end of each contour. and an import for writing the X coordinates aligned in the raster scan direction, the code of an unconnected contour element whose front end or rear end is located at that coordinate, and the distinction between the front and rear ends of the unconnected end of the contour element. a table storage unit for storing a contour connection table; and a table storage unit for storing a contour connection table; and updating the description of each table in the table storage unit based on a command string from the contour extraction unit, and updating the description of each table in the contour connection table, and The code of is updated by referring to the contour connection table, and the point that is the maximum when viewed from the starting point is extracted from the contour element table and contour management table among the points constituting one contour pixel series. , a contour analysis section is provided which stores contour vectors extracted from points having the maximum distance between two consecutive extracted points in a storage section, and removes short contour vectors from among the stored contour vectors. A contour detection device characterized by a contour detection device.
JP63078684A 1988-03-31 1988-03-31 Contour detector Pending JPH01251182A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63078684A JPH01251182A (en) 1988-03-31 1988-03-31 Contour detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63078684A JPH01251182A (en) 1988-03-31 1988-03-31 Contour detector

Publications (1)

Publication Number Publication Date
JPH01251182A true JPH01251182A (en) 1989-10-06

Family

ID=13668699

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63078684A Pending JPH01251182A (en) 1988-03-31 1988-03-31 Contour detector

Country Status (1)

Country Link
JP (1) JPH01251182A (en)

Citations (3)

* 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
JPS6232584A (en) * 1985-08-05 1987-02-12 Nippon Telegr & Teleph Corp <Ntt> Method for extracting contour shape feature
JPS62198992A (en) * 1986-02-26 1987-09-02 Nec Corp Noise decision system for character recognizing device

Patent Citations (3)

* 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
JPS6232584A (en) * 1985-08-05 1987-02-12 Nippon Telegr & Teleph Corp <Ntt> Method for extracting contour shape feature
JPS62198992A (en) * 1986-02-26 1987-09-02 Nec Corp Noise decision system for character recognizing device

Similar Documents

Publication Publication Date Title
CN110111243B (en) Method and device for beautifying handwriting fonts by using AI technology
JPH01251182A (en) Contour detector
JPH01243188A (en) Contour detector
JPH01277976A (en) Image processor
JPH01273186A (en) Contour detector
JPH01244583A (en) Contour detector
JPH01251183A (en) Contour detector
JPH01273185A (en) Contour detector
JPH01251181A (en) Contour detector
JPH0264782A (en) Outline detecting device
JPH01244582A (en) Contour detector
WO1987004545A1 (en) Figure pick-up system
US5307454A (en) Apparatus for extracting local image from original image
CN116600176B (en) Stroke order audio/video generation method and device, computer equipment and storage medium
JP2679098B2 (en) Encoding processing device for contour detection image
JP3013442B2 (en) Automatic drawing input device
JPH10134144A (en) Recognition method for drawing
JP2861105B2 (en) Spoke register generation circuit
JPH01251180A (en) Contour detector
JPS6410872B2 (en)
JPH01243187A (en) Picture processor
JPH0146912B2 (en)
JP2814735B2 (en) Binary image input interface for automatic drawing input device
JP2785269B2 (en) Noise removal device
JPS59730A (en) Asynchronous hard copy system of display screen