JPH01243188A - Contour detector - Google Patents

Contour detector

Info

Publication number
JPH01243188A
JPH01243188A JP63070492A JP7049288A JPH01243188A JP H01243188 A JPH01243188 A JP H01243188A JP 63070492 A JP63070492 A JP 63070492A JP 7049288 A JP7049288 A JP 7049288A JP H01243188 A JPH01243188 A JP H01243188A
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
JP63070492A
Other languages
Japanese (ja)
Inventor
Minoru Yamanaka
稔 山中
Keisuke Goto
啓介 後藤
Tetsuya Yasuda
哲也 安田
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 JP63070492A priority Critical patent/JPH01243188A/en
Publication of JPH01243188A publication Critical patent/JPH01243188A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To easily extract a contour by preparing a command string to contain each information of the connection relation between contour picture elements and the arrangement pattern of picture element data and preparing a table to systematize contour elements based on it. CONSTITUTION:A contour extracting extracting part 1 fetches binarized picture element data corresponding to the white and black obtained by raster-scanning a subject, the picture element data of longitudinal and lateral 2X2 picture elements are successively extracted along a scanning line, the command string for detecting the contour is prepared based on the picture element data, and it is outputted to a contour analyzing part 2 in a following stage. The contour analyzing part 2 updates the descriptions of a contour element table, a contour management table, and a contour connection table in a table storing part 3 based on the command string. Thus, the contour can be easily extracted.

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.

B1発明の概要 本発明は、被写体をラスタスキャンして得られた黒白に
対応する2値化画素データに基づき黒白の境界に相当す
る輪郭を検出する装置において、2画素×2画素の画素
データを順次に取り出し、■ライン前に取り出した画素
データに基づいて、例えばラスクスギャンY方向の輪郭
画素間の接続関係を求め、この関係及び画素データの配
列パターンの各情報を含むコマンド列を作成し、更にこ
れらコマンド列に基づいて、輪郭要素を系列化したテー
ブルを作成することによって、画像メモリの容量、ハー
ドウェア構成及び処理時間が画像サイズや解像度に影響
されることがなく、更に輪郭の取り出しを容易に行うこ
とができるようにしたものである。
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 extracted before line 1, for example, find the connection relationship between the contour pixels in the Y direction of the Lascus Gyan, create a command string containing information on this relationship and the arrangement pattern of the pixel data, and then By creating a table that serializes contour elements based on these command sequences, image memory capacity, hardware configuration, and processing time are not affected by image size or resolution, making contour extraction easier. It was designed so that it could be done.

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値画像データから対象物の輪郭画素を抽出
するための従来方式は、第25図に示すような動作を示
す。これは以下のような処理の流れで記述できる。
Among these, the conventional method for extracting contour pixels of an object from binary image data exhibits an operation as shown in FIG. 25. 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の輪郭の始
点となる点、例えば、点P1を探す。
(2) Next, search the memory M for a point, for example, point P1, which is the starting point of the contour of T to be detected.

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

D1発明が解決しようとする課題 このJ:うに、従来の輪郭画素抽出方式においては、1
画面分の2値画像データを記憶するための専用メモリを
必要とする。これは、入力する書類や図面のサイズが大
きくなればなるほど、また、高解像度にするほどメモリ
が大容量になる欠点を=4− 有する。
D1 Problem to be solved by the invention J: In the conventional contour pixel extraction method, 1
A dedicated memory is required to store binary image data for a screen. 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.

ハードウェア構成の点からいえば、画像メモリは入力画
像の縦横サイズに比例して大きくなるため、場合によっ
て(Jメモリボードの追加を考慮した構成が必要となる
。例えば、AOサイズを対象とする画像メモリは、A4
ザイズの画像メモリに比べて、16倍もの容量を必要と
しており、A4ザイズのメモリボードが1枚で構成され
るときでもAOサイズは16枚も必要である。
In terms of hardware configuration, the image memory grows in proportion to the vertical and horizontal sizes of the input image, so in some cases it may be necessary to configure the configuration to take into account the addition of a J memory board. For example, when targeting AO size Image memory is A4
It requires 16 times the capacity as a size image memory, and even when it is configured with one A4 size memory board, 16 AO size memory boards are required.

次に、処理時間にも大きな影響がある。従来の方式では
、画像メモリに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 is capable of easily extracting contours without being affected by image memory capacity, hardware configuration, or processing time, and image size or resolution. An object of the present invention is to provide a contour detection device that can perform the following steps.

E2課題を解決するための手段 第1図は本発明の構成を示す図であり、I L1輪郭抽
出部である。この輪郭抽出部Iは、第2図に示すように
被写体をラスタスキャンして得られた黒白に対応する2
値化画素データを取り込んで、縦横2画素×2画素の画
素データをスギャンラインに沿って順次に取り出し、こ
の画素データに基づいて輪郭検出用のコマンド列を作成
して後段の輪郭解析部2に出力する。輪郭解析部2は前
記コマンド列に基づいてテーブル格納部3内の輪郭要素
テーブル、輪郭管理テーブル及び輪郭接続テーブルの記
載を更新する。
Means for Solving Problem E2 FIG. 1 is a diagram showing the configuration of the present invention, which is an IL1 contour extraction section. As shown in FIG. 2, this contour extraction unit I has two
The converted pixel data is taken in, pixel data of 2 pixels x 2 pixels in the vertical and horizontal directions are sequentially extracted along the scan line, a command string for contour detection is created based on this pixel data, and the command sequence for contour detection is created and sent to the subsequent contour analysis section 2. Output to. 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 string.

ここで輪郭要素とは互いに隣接した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 for describing the coordinates arranged in the direction, the code of the end-connected contour element whose front end or rear end exists at the coordinate, and the distinction between the front and rear ends of the end-connected end of the contour element in correspondence.

F1作用 輪郭抽出部Iより出ノJされるコマンド列は、そのとき
に取り出された2画素×2画素の画素データに係る画素
と輪郭要素との接続関係の情報、及び当該画素データの
黒白の配列パターンの情報を含む接続・パターンコード
と、当該画素データのX座標を示す座標コードとを組み
合イクせてなる。
The command sequence output from the F1 action contour extraction unit I 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 color of the pixel data. It is formed by combining a connection/pattern code containing information on the array pattern and a coordinate code indicating the X coordinate of the pixel data.

前記接続関係の一例を第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
座標より一つ前の座標Xn−+に位置する輪郭要素の後
端が接続されているという情報になる。なお第6図中O
印を有する枠は黒画素を示し、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 Xn-+ one position before the coordinate is connected. Note that O in Figure 6
A frame with a mark indicates a black pixel, and a frame without an O mark indicates a white pixel.

そして例えば第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 ``double connection information and information on the black and white array pattern within the large frame, and the command string includes this connection/pattern code. This is a combination of a pattern code and a coordinate code indicating the X coordinate of pixel P1. 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は輪郭
要素Cjの前方に位置するので、輪郭要素Cjの欄に係
る後方接続欄にCiを記入し、輪郭要素Cjの欄に係る
前方接続棚にCiを記入する。更に輪郭要素Cjの所属
する輪郭の番号をこの例ではSiを輪郭番号欄に記入す
る。輪郭要素の方向については例えば8連結の場合、第
8図に示すように上下、左右、斜めの方向に対応してa
1〜a8が規定され、また4連結の場合、上下、左右の
4方向が規定される。そして輪郭管理テーブルの輪郭番
号Siについて、先端の輪郭要素番号欄を01からCj
に更新すると共に、輪郭接続テーブルにお(Jる当該画
素データのX座標について、末接続の輪郭要素番号の前
方接続の欄を01からCjに更新する。ところで実際の
処理においては、輪郭要素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, since the contour element Cj is located in front of the contour element Cj, Ci is written in the rear connection column related to the column of the contour element Cj, and Ci is written in the front connection shelf related to the column of the contour element Cj. Furthermore, the number of the contour to which the contour element Cj belongs, Si 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.
1 to a8 are defined, and in the case of four connections, four directions, up, down, left and right, are defined. Then, for the contour number Si in the contour management table, change the tip contour element number column from 01 to Cj.
At the same time, the forward connection field of the last connected contour element number is updated from 01 to Cj for the X coordinate of the relevant pixel data in the contour connection table (J).By the way, in actual processing, the contour element Ci Since the shear element connected to the front connection shelf is specified by the contour connection table, the description of Cj of the front connection shelf in the contour element number Cj column of the contour element table is performed with reference to the contour connection table.

以」二において所属輪郭番号は、ラスタスキャンの進行
に伴って別々に発生した二つの輪郭が接続されて一つの
輪郭になった場合には一方が他方に統合されて同一にな
る。
In the following, when two contours generated separately as the raster scan progresses are connected to form one contour, the associated contour numbers become the same because one is integrated with the other.

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

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

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

そして第1O図1第1+図において、画素データ及び接
続フラグの項の交差する部分が空白であるということは
、このような画素データ及び接続フラグの組み合わせに
対しては輪郭解析部43にて処理を行う必要がないこと
を意味する。○が記入された組み合わせのときは、輪郭
解析部43にて処理を行う必要があり、その組み合わせ
に対応した接続・パターンコードが輪郭抽出部4.にて
発生ずる。×が記入された組み合わせについては、その
ような組み合わせが存在しないことを表わす。
In Figure 1O, Figure 1, Figure 1+, the intersection of the pixel data and connection flag terms is blank, which means that the outline analysis unit 43 processes such combinations of pixel data and connection flags. 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. A combination marked with a cross indicates that such a combination does not exist.

△が記入された組み合わせについては、ランレンゲの符
号化を実施するときのみ、その組み合わせに対応した接
続・パターンコードが発生ずる。なお第6図、第7図に
おいては、輪郭要素の発生方向(ベクトルの向き)を考
慮せずに描いているが、実際には輪郭要素を、物体(ま
たは黒画像部)の外縁に沿って右回りに向くように発生
させており、この発生の仕方に対応させて第1θ図及び
第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 caused to occur in a clockwise direction, and the establishment relationship diagrams shown in Fig. 1θ and Fig. 11 are created in correspondence with this manner of generation.

前記コマンド列はこのようにして得られた接続・パター
ンコードの他に読み出しレディコードや座標コード等が
含まれ、その−例を挙げると第14図のように表わされ
る。同図中A1は読み出しレディコードであり、画素デ
ータ及び接続フラグの組み合わせが第10図、第11図
の×、あるいは×及び△に相当するときにはコマンド列
を無効とするものである。A、は画素データのX座標、
A3゜A4は画素データの下側左右に並ぶ二つの画素の
黒、白を示すコードであり、ランレングス化を実施する
場合には、A3.A4が必要である。A5は1頁(全ラ
イン)の終わりを示すEOP (ENDOF  PAG
E)コード、A8はIラインの終わりを示すEOR(E
ND  OF’  ROW)コード、A7は接続・パタ
ーンコードである。
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. A1 in the figure is a read ready code, which invalidates the command sequence when the combination of pixel data and connection flag corresponds to ×, or × and Δ in FIGS. 10 and 11. A is the X coordinate of pixel data,
A3°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 when performing run length conversion, A3. A4 size is required. A5 is EOP (ENDOF PAG) indicating the end of one page (all lines).
E) code, A8 is EOR (E
ND OF' ROW) code, and 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.

画素データラッヂ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 converts the input data into data d of 2 pixels x 2 pixels, that is, 4 pixels adjacent to each other, as shown in FIG. -fetch and latch d3.

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

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

前方フラグメモリ106はX座標の数と同じ数のアドレ
スを持ち(例えば、X座標の数が512のとき、このメ
モリのアドレスの数も512)、画素データ内のある画
素に輪郭要素の前端が接続されかつその輪郭要素が他の
輪郭要素に接続されていないとき、その画素の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 also 512), and if the front end of a contour element is at a certain pixel in the pixel data, When connected and the contour element is not connected to other contour elements, data of logical rlJ is written to the address corresponding to the X coordinate of the pixel.

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

接続フラグラッチ102は、前方フラグメモリ106、
後方フラグメモリ107および後述する接続フラグ変更
回路+04の出力データを、輪郭画素の接続状態を示す
データとして保持する。
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 +04, which will be described later, is held as data indicating the connection state of contour pixels.

周辺判定回路109は、アドレス発生回路108が発生
するX及びY座標をもとに、処理の対象となる4つの画
素d。−d3が、画面の境界からはみ出しているか否か
を判定ずろ。画面の周囲から処理画素がはみ出している
場合には、所定の信号を画素データラッチ101および
接続フラグラッチ102に出力する。これらのラッチは
、この信号を受は取ると、画面の境界からはみ出した画
素=19− については、強制的に白画素(背景となる画素)とする
The peripheral determination circuit 109 selects four pixels d to be processed based on the X and Y coordinates generated by the address generation circuit 108. -Determine whether d3 extends beyond 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, the pixels (19-) that protrude from the boundaries of the screen are forcibly set as white pixels (background pixels).

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

接続フラグ変更回路104は、輪郭解析部42が上記コ
マンドに従って処理を実施した後、画素の接続状態が変
化するので、処理後の接続フラグを、画素データラッチ
101と接続フラグラッチ102の出力データとをもと
に求め、前方フラグメモ1月06、後方フラグメモ1月
07、並び1こ接続フラグラッチ102に出力する。
The connection flag change circuit 104 changes the connection state of the pixels after the contour analysis unit 42 executes the process according to the above command, so the connection flag after the process is changed from the output data of the pixel data latch 101 and the connection flag latch 102. The forward flag memo January 06 and backward flag memo January 07 are output to the connected 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から人力される
と、ラインメモ1月05からの画素データと共にこれら
を順次骨は取り、第12図に示すような2画素×2画素
、すなわち互1.)1こ隣接する4画素のデータd。〜
d3をう・ソチする。
When the pixel data sampled by raster scan is manually input from the signal line 5, the pixel data latch 101 sequentially extracts the pixel data along with the pixel data from the line memo January 05, and generates two pixels as shown in FIG. ×2 pixels, that is, 1. ) Data d of four adjacent pixels. ~
Play d3.

ラインメモ!月05は、画素データラッチ101が出力
する画素データd1を取り込むことによって一行前の画
素データ、すなわちYアドレスが現在信号線5から入力
されている画素データd。
Line memo! In month 05, the pixel data d1 output by the pixel data latch 101 is fetched to obtain the pixel data of the previous row, that is, the pixel data d whose Y address is currently input from the signal line 5.

のYアドレスより1小さい行の画素データを一行分記憶
している。そして、信号線5から画素データd。、d+
が画素データラッチ101に順次入力されたとき、ライ
ンメモリ105は、アドレス発生回路+08が出力する
」1記アドレスデータをもとに、画素データd3.d3
を順次同ラッチに出力する。これにより、画素データラ
ッチ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 is transmitted from the signal line 5. ,d+
are sequentially input to the pixel data latch 101, the line memory 105 generates pixel data d3. based on the address data "1" output from the address generation circuit +08. d3
are sequentially output to the same latch. As a result, the pixel data latch 101 receives four adjacent pixel data d. -d3 can be latched.

接続フラグ変更回路104は、上記画素データdo−d
3と接続フラグラッチ102の出力データとをもとに、
4つの接続フラグデータを発生ずる。
The connection flag changing circuit 104 converts the pixel data do-d
3 and the output data of the connection flag latch 102,
Generates four connection flag data.

4つのデータの内、二つは第13図に示す接続フラグの
上側2コマに相当する前方接続フラグデータ、他の二つ
は下側2コマに相当する後方接続フラグデータである。
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座標は大きい。そして、空白のも
のはフラグデータの一23= 値が「0」、1が書き込まれているものは値が11」で
あることを示す。
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 value indicates that the value of the flag data is "0", and a value of 1 indicates that the value is "11".

具体的に説明すると、画素elには輪郭要素Caの後端
が接続されているのでこの画素のX座標の後方接続フラ
グデータTlはIllとなっている。逆に、画素e2に
は輪郭要素cbの前端が接続されているのでそのX座標
の前方接続フラグデータR2は「1」となっている。同
様に、画素e3に対応する後方接続フラグデータT4は
rlJ、画素e4に対応する後方接続フラグデータR4
もrlJとなっている。その他のフラグデータは、対応
する画素に輪郭要素が接続されていないので、すべて「
0」となっている。
Specifically, since the rear end of the outline element Ca is connected to the pixel el, the rear connection flag data Tl of the X coordinate of this pixel is Ill. 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, the backward connection flag data T4 corresponding to pixel e3 is rlJ, and the backward connection flag data R4 corresponding to pixel e4
It is also rlJ. All other flag data are "
0".

これら前方及び後方接続フラグデータは、それぞれ前方
フラグメモリ106及び後方フラグメモリ107の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 the backward flag memory 107, 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を10」とし、前方接続フ
ラグデータR3を「1」とする。後方接続フラグデータ
については、輪郭要素の後端が単独で存在しない状態が
継続されているので変更は行わない。
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 changing circuit 104 sets the forward connection flag data R2 to 10''. , the forward connection flag data R3 is set to "1". 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は上記変更処理後のフラグデ
ータr(2,T2を前方フラグメモリ106及び後方フ
ラグメモリ107の所定のアドレスに記憶させ、変更処
理後のフラグデータR3,T3を接続フラグラッチ10
2に出力してラッチさせ、次の処理に備える。
The connection flag change circuit 104 stores the flag data r(2, T2 after the change process in predetermined addresses of the front flag memory 106 and the rear flag memory 107, and stores the flag data R3, T3 after the change process in the connection flag latch 10.
2 and latches it in preparation for the next process.

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

更にコマンド発生回路103は読み出しレディコ   
   ′−ドを信号線6に出力し、例えばランレングス
化を実施しない場合、接続・パターンコードが第1θ図
、第11図の○印に相当するものであるときには、読み
出しレディコードを「I」とし、△印またはX印に相当
するものであるときには「0」とする。また周辺判定回
路109には信号線9を通じて1頁の終わりを示ずEO
P信号及び1ラインの終わりを示すFOR信号が入力さ
れ、この結果ここから信号線6にEOPコード及びEO
Rコードが出力される。こうして信号線6には、アドレ
ス発生回路108よりの画素データのX座標を示す座標
コードと共にEOPコード及びFORコードが与えられ
、これらコードが輪郭解析部43に与えられる。
Furthermore, the command generation circuit 103 is a read ready command.
'- code is output to the signal line 6 and, for example, when run-length conversion is not performed, and the connection/pattern code corresponds to the circle mark in Figures 1θ and 11, the read ready code is set to ``I''. If it corresponds to a △ mark or an X mark, it is set as "0". Additionally, the peripheral determination circuit 109 is sent via the signal line 9 to indicate the end of one page.
A P signal and a FOR signal indicating the end of one line are input, and as a result, an EOP code and an EO signal are sent to signal line 6 from here.
R code is output. In this way, the signal line 6 is supplied with an EOP code and a FOR code as well as a coordinate code indicating the X coordinate of the pixel data from the address generation circuit 108, and these codes are supplied to the contour analysis section 43.

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

第1’1図に示す組み合わせに応じて読み出しレディコ
ードを発生させれば孤立画素をノイズとして除去できる
利点がある。即ち孤立画素に対して発生ずる画素データ
のパターンは第17図(イ)〜(ニ)の」;うに4種類
あるが、この場合この画素に対しては輪郭要素の接続は
存在しないので、続み出しレディコードは「0」となり
、従って輪郭解析部43では処理が行われていないから
である。
Generating a read ready code according to the combination shown in FIG. 1'1 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 17 (a) to (d), but in this case, there is no connection of contour elements to this pixel, so the following This is because the protrusion ready code is "0" and therefore no processing is being performed in the contour analysis section 43.

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

ここで輪郭解析部43で行われる処理を第19図〜第2
3図を参照しながら説明する。先ず第19図に示すよう
にYアドレスをOとした後コマンド列を取り込み、この
コマンド列の中にEOPの指示がされている場合には処
理を終了し、指示がされていない場合にはFORの指示
がされているか否かを判断する。FORの指示がされて
いる場合にはYアドレスを一つ加算してコマンド列を取
り込み、指示がされていない場合には内部メモリ43内
に格納されている各テーブル(第3図〜第5図参照)を
更新する。
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 O, a command string is fetched, and if an EOP instruction is included in this command string, the process is terminated, and if there is no instruction, a FOR is executed. Determine whether or not the instructions have been given. If a FOR instruction is given, the Y address is added by one and the command string is fetched; if a FOR instruction is not given, each table stored in the internal memory 43 (Figs. 3 to 5) is read. Reference).

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

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

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

ST3・・既に発生している二つの輪郭要素の端部が2
画素×2画素の画像データの中に存在するか否かの判断
を行う。
ST3...The ends of the two contour elements that have already occurred are 2
It is determined whether or not it exists in the pixel×2 pixel image data.

次いで第20図中の処理1〜3の内容について述べると
、処理lでは第21図に示すようにステップST、〜S
T、が実行される。各ステップS T +〜ST、は以
下の通りである。
Next, to describe the contents of processes 1 to 3 in FIG. 20, in process 1, steps ST to S are performed as shown in FIG.
T is executed. Each step ST + to ST is as follows.

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

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

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

ST、・・第5図に示す輪郭接続テーブルの前方接続及
び後方接続の該当する欄に夫々Ciを書き込む。
ST, . . . Write Ci in the corresponding columns of the forward connection and backward 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 eが実行される。各ステップST、〜STs
は以下の通りである。
~S Te is executed. Each step ST, ~STs
is as follows.

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

ST2・・・輪郭接続テーブルの該当欄から接続先の輪
郭要素番号Cjを求め、当該欄をN0NEに書き換える
ST2: Obtain the contour element number Cj of the connection destination from the corresponding column of the contour connection table, and rewrite the column to N0NE.

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

S T 4・・・輪郭要素テーブルのC4番目の方向、
座標の欄に該当する事項を、前方接続及び後方接続の欄
の該当する方にCjを、他方にN0NEを、所属輪郭番
号欄にSk      ゛を夫々書き込む。
S T 4... C4th direction of the contour element table,
Write the applicable items 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.

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

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

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

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

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

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

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

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

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

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

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

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

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

第1図は本発明のハードウェア構成を示すブロツク図、
第2図はラスタスキャンの様子を示す説明図、第3図は
輪郭要素テーブルを示す説明図、第4図は輪郭管理テー
ブルを示す説明図、第5図は輪郭接続テーブルを示す説
明図、第6図(イ)。 (ロ)は、各々画素データと輪郭要素との関係を示す説
明図、第7図は輪郭要素間の接続状態を示す説明図、第
8図は輪郭要素の方向を示す説明図、第9図は本発明の
ハードウェア構成を示す構成図、第10図及び第11図
は画素データと接続関係との成立関係を示す説明図、第
12図は画素データを示す説明図、第13図は接続フラ
グを示す説明図、第14図はコマンド列を示す説明図、
第15図は輪郭抽出部を示す回路図、第16図及び第1
7図は各々接続フラグデータの説明図、第18図は孤立
画素のパターンを示すパターン図、第19図は輪郭解析
部の全体処理を示すフローチャート、第20図はテーブ
ル更新処理を示すフローチャート、第21図〜第23図
は夫々処理1〜3を示すフローチャート、第24図はテ
ーブル更新処理と画素データの位置との関係を示す説明
図、第25図は従来の輪郭画素抽出態様を示す説明図で
ある。 ■、4.・・・輪郭抽出部、2.43・輪郭解析部、3
・・テーブル格納部、4・・・輪郭検出装置、44・・
・内部メモリ。 第1図 本発明の構成図 1−・−輪郭抽出部 2− 輪郭解析部 3− テーブル格納部 第2図 ラスタスキャンの説明図 =40− 第3図 輪郭要素テーブルの説明図 輪郭管理テーブルの説明図 輪郭番号 先端の輪郭要素番号 終端の輪郭要素番号5
oCo         C+o。 SI       C200C300 第16図 接続フラグデータの説明図 第17図 接続フラグデータの説明図 第18図 孤立画素のパターン説明図 (イ)             (ロ)(ハ)   
         (ニ)第20図 更新処理のフローチャート 第21図     第22図 処理1のフローチャート      処理2のフローチ
ャート第23図 処理3のフローチャート 第24図
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 11 are explanatory diagrams showing the established relationship between pixel data and connection relationships, FIG. 12 is an explanatory diagram showing pixel data, and FIG. 13 is an explanatory diagram showing connections. 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 updating processing and the position of pixel data, and FIG. 25 is an explanatory diagram showing a conventional contour pixel extraction mode. It is. ■、4. ...Contour extraction section, 2.43・Contour analysis section, 3
...Table storage section, 4...Contour detection device, 44...
・Internal memory. Fig. 1 Configuration diagram of the present invention 1 - - Contour extraction section 2 - Contour analysis section 3 - Table storage section Fig. 2 Explanation of raster scan = 40 - Fig. 3 Explanation of contour element table Explanation of contour management table Figure contour number Top contour element number End contour element number 5
oCo C+o. SI C200C300 Figure 16: Explanation diagram of connection flag data Figure 17: Explanation diagram of connection flag data Figure 18: Illustration diagram of isolated pixel pattern (a) (b) (c)
(d) Fig. 20: Flowchart of update processing Fig. 21: Fig. 22: Flowchart of processing 1 Fig. 23: Flowchart of processing 2 Fig. 24: Flowchart of processing 3

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 the code of the terminal connection contour element where the front end or the rear end is located and the distinction between the front and rear ends of the terminal connection end of the contour element in correspondence; Contour analysis that updates the description of each table in the table storage unit based on the command string from the contour extraction unit, and refers to the contour connection table to update the code of the other contour elements in the contour element table. 1. A contour detection device comprising: a.
JP63070492A 1988-03-24 1988-03-24 Contour detector Pending JPH01243188A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63070492A JPH01243188A (en) 1988-03-24 1988-03-24 Contour detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63070492A JPH01243188A (en) 1988-03-24 1988-03-24 Contour detector

Publications (1)

Publication Number Publication Date
JPH01243188A true JPH01243188A (en) 1989-09-27

Family

ID=13433071

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63070492A Pending JPH01243188A (en) 1988-03-24 1988-03-24 Contour detector

Country Status (1)

Country Link
JP (1) JPH01243188A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0552791A2 (en) * 1992-01-24 1993-07-28 Canon Kabushiki Kaisha Apparatus and method for extracting outline data and encoding image data using the outline data
EP0589702A3 (en) * 1992-09-24 1994-09-07 Canon Kk Image processing method and apparatus
EP0680016A2 (en) * 1994-04-25 1995-11-02 Microsoft Corporation System and method for compressing images

Citations (1)

* 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

Patent Citations (1)

* 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

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0552791A2 (en) * 1992-01-24 1993-07-28 Canon Kabushiki Kaisha Apparatus and method for extracting outline data and encoding image data using the outline data
EP0552791A3 (en) * 1992-01-24 1994-04-13 Canon Kk
EP0589702A3 (en) * 1992-09-24 1994-09-07 Canon Kk Image processing method and apparatus
US5828794A (en) * 1992-09-24 1998-10-27 Canon Kabushiki Kaisha Image processing method and apparatus for enlarging and reducing image data
US6111994A (en) * 1992-09-24 2000-08-29 Canon Kabushiki Kaisha Outline extraction using partial image processing
EP0680016A2 (en) * 1994-04-25 1995-11-02 Microsoft Corporation System and method for compressing images
EP0680016A3 (en) * 1994-04-25 1996-02-28 Microsoft Corp System and method for compressing images.

Similar Documents

Publication Publication Date Title
JP2597006B2 (en) Rectangular coordinate extraction method
JPS6357831B2 (en)
JPH01243188A (en) Contour detector
JPH01277976A (en) Image processor
JPH01273186A (en) Contour detector
JPH01251183A (en) Contour detector
JPH01251182A (en) Contour detector
JPH01273185A (en) Contour detector
JPH01244583A (en) Contour detector
JPH01244582A (en) Contour detector
JP3072721B2 (en) Image processing method and apparatus, storage medium for storing image processing program
JPH0264782A (en) Outline detecting device
JP2878278B2 (en) Image processing method
JPH01251181A (en) Contour detector
JP2679098B2 (en) Encoding processing device for contour detection image
JPH01243187A (en) Picture processor
JPS6292080A (en) Pattern recognizing device
JP3037504B2 (en) Image processing method and apparatus
JP2861105B2 (en) Spoke register generation circuit
JP2600804B2 (en) Digital image boundary line tracking method
JP2634905B2 (en) How to paint shapes
JP2800205B2 (en) Image processing device
JP2954218B2 (en) Image processing method and apparatus
JPH11242716A (en) Image processing method and storage medium
JPH11232381A (en) Character reader