JPH01273185A - Contour detector - Google Patents

Contour detector

Info

Publication number
JPH01273185A
JPH01273185A JP63102039A JP10203988A JPH01273185A JP H01273185 A JPH01273185 A JP H01273185A JP 63102039 A JP63102039 A JP 63102039A JP 10203988 A JP10203988 A JP 10203988A JP H01273185 A JPH01273185 A JP H01273185A
Authority
JP
Japan
Prior art keywords
contour
pixel
pixel data
connection
black
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
JP63102039A
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 JP63102039A priority Critical patent/JPH01273185A/en
Publication of JPH01273185A publication Critical patent/JPH01273185A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To reduce the capacity of a picture memory by extracting a point which becomes maximum from the viewpoint of a starting point, from a contour element table and a contour control table and storing an outline vector extracted the point which becomes the maximum distance between two extracted continuous points, into an external storage device. CONSTITUTION:A contour analyzing part 2 is composed of a macro processing part 31 to extract a point which becomes maximum viewed from the starting point out of respective points to constitute one contour picture element series with original picture data, a contour element table and a contour control table edited by an original picture editing part 42 and a micro processing part 32 to extract some from the relation with the threshold to set a point which becomes the maximum distance between two continuous points extracted by the processing and describes the contour vector of the point extracted by the processing into a contour vector series table 33 and stores the contour vector into an external storage device 34. Thus, the capacity of the picture memory can be reduced.

Description

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

B0発明の概要 本発明は、被写体をラスタスキャンして得られた黒白に
対応する2値化画素データに基づき黒白の境界に相当す
る輪郭を検出する装置において、2画素×2画素の画素
データを順次に取り出し、■ライン前に取り出した画素
データに基づいて、例えばラスタスキャンY方向の輪郭
画素間の接続関係を求め、この関係及び画素データの配
列パターンの各情報を含むコマンド列を作成し、ライン
上の白画素と黒画素の切換わり符号を輪郭要素に含めて
抽出し、この切換わり符号とそのXY座漂から黒ランの
始点座標と長さを画像データとしてテーブル化して原画
像を得、この原画像に基づいて、輪郭要素を輪郭ベクト
ル系列化したテーブルを作成し、作成された輪郭ベクト
ルを光ディスク等の外部記憶装置に記憶したことにより
、画像メモリの容量、ハードウェア構成及び処理時間が
画像サイズや解像度に影響されることがなく、更に輪郭
の取り出しを容易に行うことができるようにし、かつ、
画像情報を白画素、黒画素の集合として取扱うのに比べ
各部が処理する情報量及び処理時間が大幅に少なくなり
、しかも外部記憶での情報記憶量は情報圧縮されている
ため、大幅に増大するものである。
B0 Summary of the Invention The present invention provides an apparatus for detecting a contour corresponding to a black-and-white boundary based on binary pixel data corresponding to black and white obtained by raster scanning a subject, which detects pixel data of 2 pixels x 2 pixels. Sequentially, based on the pixel data extracted before line 1, find the connection relationship between contour pixels in the raster scan Y direction, create a command string containing this relationship and each piece of information about the pixel data arrangement pattern, The switching code between white pixels and black pixels on the line is included in the contour element and extracted, and the starting point coordinates and length of the black run are tabulated as image data from this switching code and its XY position drift to obtain the original image. Based on this original image, a table is created in which contour elements are organized into contour vector series, and the created contour vectors are stored in an external storage device such as an optical disk, thereby reducing the image memory capacity, hardware configuration, and processing time. is not affected by image size or resolution, and further allows easy extraction of contours, and
Compared to handling image information as a set of white pixels and black pixels, the amount of information and processing time processed by each part is significantly reduced, and the amount of information stored in external storage is significantly increased because the information is compressed. It is something.

C0従来の技術 文字や図形等のパターンを処理する場合、例えば、書類
や図面等の被写体をイメージスキャナ等の入力装置で操
作して得られる黒と白の2値画像データ(入カバターン
)に変換し、この2値画像データから対象物の輪郭画素
を抽出し、情報圧縮処理や対象物の認識処理を行ってい
る。
C0 Conventional technology When processing patterns such as characters and figures, for example, convert 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値画像データから対象物の輪郭画素を抽出
するための従来方式は、第32図に示すような動作を示
す。これは以下のような処理の流れで記述できる。
Among these, the conventional method for extracting contour pixels of an object from binary image data exhibits an operation as shown in FIG. 32. This can be described using the following process flow.

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

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

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

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

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

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

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

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

本発明はこのような課題を解決するためになされたもの
であり、画像メモリの容量、ハードウェア構成及び処理
時間が画像サイズや解像度に影響されることがなく、更
に輪郭の取り出しを容易に行うことができるようにする
とともに画像情報を白画素、黒画素の集合として取扱う
のに比べ各部が処理する情報量及び処理時間が大幅に少
なくな。
The present invention has been made to solve these problems, and is capable of easily extracting contours without being affected by image memory capacity, hardware configuration, or processing time, and image size or resolution. In addition, the amount of information and processing time processed by each section are significantly reduced compared to handling image information as a set of white pixels and black pixels.

る輪郭検出装置を提供することを目的とする。The object of the present invention is to provide a contour detection device.

E1課題を解決するための手段 第1図は本発明の構成を示す図であり、lは輪郭抽出部
である。この輪郭抽出部lは、第2図に示すように被写
体をラスタスキャンして得られた黒白に対応する2値化
画素データを取り込んで、縦+1!2画素×2画素の画
素データをスキャンラインに沿って順次に取り出し、こ
の画素データに基づいて輪郭検出用のコマンド列を作成
するとともにライン上の白画素と黒画素の切換わり符号
を輪郭要素に含めて抽出し、この切換わり符号とそのX
Y座標から黒ランの始点座標と長さを画像データとして
ランレングスベクトル系列テーブル41に記載し、この
画像データを原画像編集部42で原画像として編集する
。前記輪郭検出用として作成されたコマンド列は後段の
輪郭解析部2に出力する。輪郭解析部2は前記コマンド
列に基づいてテーブル格納部3内の輪郭要素テーブル、
輪郭管理テーブル及び輪郭接続テーブルの記載を更新す
る。また、輪郭解析部2は原画像編集部42で編集され
た原画像データ及び輪郭要素テーブルと輪郭管理テーブ
ルを使用して1輪郭画素系列を構成する各点のうち始点
からみて極大となる点を抽出する巨視的処理部31と、
この処理で抽出された連続する2点の間にある最大距離
となる点を設定したしきい値との関係からいくつか抽出
する微視的処理部32と、この処理により抽出された点
の輪郭ベクトルを輪郭ベクトル系列テーブル33に記載
し、この輪郭ベクトルを外部記憶装置34に記憶する。
Means for Solving Problem E1 FIG. 1 is a diagram showing the configuration of the present invention, and l 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 converts the pixel data of vertical + 1!2 pixels x 2 pixels into the scan line. Based on this pixel data, a command sequence for contour detection is created, and the switching code between white pixels and black pixels on the line is included in the contour element and extracted, and this switching code and its X
The starting point coordinates and length of the black run from the Y coordinate are written as image data in the run length vector series table 41, and this image data is edited as an original image by the original image editing section 42. The command string created for contour detection is output to the contour analysis section 2 at the subsequent stage. The contour analysis section 2 analyzes the contour element table in the table storage section 3 based on the command string,
Update the descriptions in the contour management table and contour connection table. In addition, the contour analysis section 2 uses the original image data edited by the original image editing section 42, the contour element table, and the contour management table to find the maximum point among the points constituting one contour pixel series when viewed from the starting point. A macroscopic processing unit 31 for extracting;
A microscopic processing unit 32 that extracts several points based on the relationship with a set threshold value of the point that is the maximum distance between two consecutive points extracted by this process, and the outline of the points extracted by this process. The vector is written in the contour vector series table 33, and this contour vector is stored in the external storage device 34.

ここで輪郭要素とは互いに隣接した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. 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. The contour vector series table is used to record the code of the starting point coordinates for each contour vector series, as shown in FIG.

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

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

の座標をとっている。また同図(ロ)の大枠で囲まれた
画素データを取り込んだときには、この画素データのX
座標より一つ前の座標X n−1に位置する輪郭要素の
後端が接続されているという情報になる。なお第6図中
○印を有する枠は黒画素を示し、○印を有しない枠は白
画素を示している。
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-1 immediately before the coordinate is connected. Note that in FIG. 6, frames with ◯ marks indicate black pixels, and frames without ◯ marks indicate white pixels.

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

このようにして得たコマンド列が輪郭解析部2に取り込
まれると次のような処理が行われる。金弟7図の大枠の
画素データに関するコマンド列が取り込まれたとすると
、点線で示す輪郭要素Cjを輪郭要素テーブルに登録し
、その方向及び座標を記入すると共に、当該輪郭要素C
jの前後に夫々接続されている他の輪郭要素の番号を接
続要素番号欄に記入する。この場合輪郭要素Cjは輪郭
要素C4の前方に位置するので、輪郭要素Cjの欄に係
る後方接続側にCiを記入し、輪郭要素Cjの欄に係る
萌方接続欄にCiを記入する。更に輪郭要素Cjの所属
する輪郭の番号をこの例ではSiを輪郭番号欄に記入す
る。輪郭要素の方向については例えば8連結の場合、第
8図に示すように上下、左右、斜めの方向に対応してa
1〜a8が規定され、また4連結の場合、上下、左右の
4方向が規定される。そして輪郭管理テーブルの輪郭番
号Siについて、先端の輪郭要素番号欄をCiからCj
に更新すると共に、輪郭接続テーブルにおける当該画素
データのX座標について、末接続の輪郭要素番号の前方
接続の欄をCiからCjに更新する。ところで実際の処
理においては、輪郭要素Ciに接続されるべき要素は輪
郭接続テーブルにより明らかにされているため、輪郭要
素テーブルの輪郭要素番号Ci欄に係る前方接続側のC
jの記載は、輪郭接続テーブルを参照して行われる。以
上において所属輪郭番号は、ラスタスキャンの進行に伴
って別々に発生した二つの輪郭が接続されて一つの輪郭
になった場合には一方が他方に統合されて同一になる。
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 of Kintetsu 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 C4, Ci is written in the rear connection side of the column of the contour element Cj, and Ci is written in the rear connection column of 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 Ci to Cj.
At the same time, regarding the X coordinate of the pixel data in the contour connection table, the forward connection column of the last connected contour element number is updated from Ci to Cj. By the way, in actual processing, the elements to be connected to the contour element Ci are clarified by the contour connection table, so the C on the front connection side related to the contour element number Ci column of the contour element table
The description of j 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, one contour is integrated with the other and the associated contour numbers become the same.

上記のような処理において、輪郭要素の抽出時に白画素
から黒画素への切換わり及びその逆の切換わりを符号付
けしておき、この符号とXY座標から黒ランの始点座標
と長さを画像データとしてテーブル化し、白ランは黒ラ
ンのデータの存在しない部分としてそのデータ保存及び
画像再生には処理を行わないようにする。その後、!輪
郭画素系列を構成する各点のうち始点からみて極大とな
る点を抽出し、次に抽出された連続する2点の間にある
最大距離となる点を抽出する。このように抽出された輪
郭ベクトルをテーブルに格納する。
In the above process, when extracting contour elements, the switching from white pixels to black pixels and vice versa are coded, and the starting point coordinates and length of the black run are calculated from the code and the XY coordinates of the image. The data is tabulated, and the white run is treated as a part where no data exists for the black run, and no processing is performed for data storage or image reproduction. after that,! Among the points constituting the contour pixel series, the point that is the maximum when viewed from the starting point is extracted, 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.

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

なお、第9図において、11は主制御部、12は主メモ
リ、13は原画像編集部、14は2値画像入力処理部、
15はイメージスキャナー等からなる2値画像入力装置
、16は外部記憶装置となる光ディスク(CD−ROM
)書込装置である。
In FIG. 9, 11 is a main control section, 12 is a main memory, 13 is an original image editing section, 14 is a binary image input processing section,
15 is a binary image input device such as an image scanner, and 16 is an optical disk (CD-ROM) serving as an external storage device.
) is a writing device.

上記実施例において、CD−ROM書込装置16に書き
込む図面や文書は2値画像入力装置15から2値画像入
力処理部14に入力される。2値画像入力処理部14は
マルチプレクサをらち、2値画像を2値画像入力装置1
5側からとメインバス46側の両方から入力することが
できるようになっている。入力した2値画像は輪郭検出
装置4に送られ、輪郭検出部4.において輪郭検出し、
輪郭コマンドとして輪郭解析部43に送られろ。
In the embodiment described above, drawings and documents to be written to the CD-ROM writing device 16 are input from the binary image input device 15 to the binary image input processing section 14 . The binary image input processing unit 14 includes a multiplexer and outputs the binary image to the binary image input device 1.
It is possible to input from both the 5 side and the main bus 46 side. The input binary image is sent to the contour detection device 4, and the contour detection section 4. Detect the contour at
Send it to the contour analysis section 43 as a contour command.

輪郭解析部43は輪郭コマンドをらとにランレングス・
ベクトル系列化し、処理結果を主メモリ12へ転送する
。ランレングスベクトル系列は原画編集部13において
、表示および原画像修正を行ってCD−ROM書込装置
13に書き込む原画となる。編集した原画像はメインバ
ス48から2値画像入力処理部14へ送られ、さらに輪
郭検出装置4に送られる。
The contour analysis unit 43 calculates the run length and the contour command based on the contour command.
The processing result is converted into a vector series and transferred to the main memory 12. The run-length vector series is displayed and corrected in the original image editing section 13, and becomes an original image to be written to the CD-ROM writing device 13. The edited original image is sent from the main bus 48 to the binary image input processing section 14 and further sent to the contour detection device 4.

輪郭検出装置4では輪郭検出部4!において輪郭を検出
し、輪郭コマンドとして輪郭解析部43へ送られる。こ
の輪郭解析部4.は輪郭コマンドをもとにして輪郭ベク
トル系列化を行い、処理結果を主メモリ12に転送する
。輪郭ベクトル系列はCD−ROM書込装置13によっ
て主メモリ12からCD−ROM書込装置装置側に転送
され、CD−ROM(光ディスク)が作成される。なお
、各装置、各処理部の動作は主制御部11によって管理
される。また、上記の処理過程をフローチャートで示す
と第27図のようになる。
In the contour detection device 4, the contour detection section 4! The contour is detected at , and sent to the contour analysis section 43 as a contour command. This contour analysis section 4. converts the contour vector into a series based on the contour command and transfers the processing result to the main memory 12. The contour vector series is transferred from the main memory 12 to the CD-ROM writing device side by the CD-ROM writing device 13, and a CD-ROM (optical disc) is created. Note that the operations of each device and each processing section are managed by the main control section 11. Further, the above processing process is shown in a flowchart as shown in FIG. 27.

次に、輪郭抽出部4.から発生するコマンド列の具体例
に関して述べる。第1O図及び第11図は、各々2画素
×2画素の画素データの黒白の配列パターンとこの画素
データに対する輪郭要素の接続関係との成立関係を示す
図であり、第10図は8連結、第11図は4連結の場合
に夫々相当する。これら図において左端の縦に並ぶ4コ
マの窓は第12図に示すように2画素×2画素の画素デ
ータ(dn〜di)を示し、rlJ、rOJが立ってい
る部分は夫々黒画素、白画素に相当する。また上端の横
に並ぶ4コマの窓は、第13図に示すように、上側左右
の2コマが夫々画素データのX座標Xn−1における前
方接続の輪郭要素の有無及びX座標x7における前方接
続の輪郭要素の有無を示し、下側左右の2コマが夫々画
素データのX座標X n−1における後方接続の輪郭要
素の有無及びX座標xnにおける後方接続の輪郭要素の
有無を示す接続フラグであり、rlJ、rOJは夫々接
続有り、接続無しを意味している。例えば第6図(イ)
の大枠で囲まれた画素領域における接続フラグは、(x
n、 Yn−1)の座標位置にて輪郭要素の前端が当該
画素領域に接続されているから、第1O図の接続フラグ
欄の左から5番目のように右上のコマのみが「l」の窓
で表わされる。
Next, the contour extraction section 4. A specific example of a command sequence generated from the following will be described. FIG. 1O and FIG. 11 are diagrams each showing the relationship between the black and white arrangement pattern of pixel data of 2 pixels x 2 pixels and the connection relationship of contour elements to this pixel data, and FIG. FIG. 11 corresponds to the case of four connections. In these figures, the four vertically arranged windows at the left end show pixel data (dn~di) of 2 pixels x 2 pixels as shown in Figure 12, and the parts where rlJ and rOJ stand are black pixels and white pixels, respectively. Corresponds to a pixel. In addition, as shown in FIG. 13, in the four-panel window arranged horizontally at the upper end, the upper left and right two frames indicate the presence or absence of the contour element of the forward connection at the X coordinate Xn-1 of the pixel data, and the forward connection at the X coordinate x7, respectively. The two frames on the bottom left and right are connection flags that indicate the presence or absence of a backwardly connected contour element at the X coordinate Xn-1 of the pixel data, and the presence or absence of a backwardly connected contour element at the X coordinate xn, respectively. Yes, rlJ and rOJ mean connected and not connected, respectively. For example, Figure 6 (a)
The connection flag in the pixel area surrounded by the large frame is (x
Since the front end of the outline element is connected to the relevant pixel area at the coordinate position of n, Yn-1), only the top right frame is connected to the "l" frame, as shown in the fifth from the left in the connection flag column in Figure 1O. represented by a window.

そして第10図、第11図において、画素データ及び接
続フラグの項の交差する部分が空白であるということは
、このような画素データ及び接続フラグの組み合わせに
対しては輪郭解析部43にて処理を行う必要がないこと
を意味する。○が記入された組み合わせのときは、輪郭
解析部43にて処理を行う必要があり、その組み合わせ
に対応した接続・パターンコードが輪郭抽出部4.にて
発生する。×が記入された組み合わせについては、その
ような組み合わせが存在しないことを表わす。
In FIGS. 10 and 11, 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図に
おいては、輪郭要素の発生方向(ベクトルの向き)を考
慮せずに描いているが、実際には輪郭要素を、物体(ま
たは黒画像部)の外縁に沿って右回りに向くように発生
させており、この発生の仕方に対応させて第1O図及び
第11図の成立関係図を作成している。
For combinations marked with a △, a connection/pattern code corresponding to the combination is generated only when encoding the run range. In Figures 6 and 7, the contour elements are drawn without considering the direction in which they occur (direction of the vector), but in reality the contour elements are drawn along the outer edge of the object (or black image area). It is generated in a clockwise direction, and the establishment relationship diagrams shown in FIGS. 1O and 11 are created in correspondence with this manner of generation.

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

A4は画素データの下側左右に並ぶ二つの画素の黒、白
を示すコードであり、ランレングス化を実施する場合に
は、A3+ A、が必要である。A5は1頁(全ライン
)の終わりを示すEOI’ (ENDOF  PAGE
)コード、Allはlラインの終わりを示すEOrt 
(END  OF  ROW)コード、A7は接続・パ
ターンコードである。
A4 is a code indicating the black and white of two pixels arranged on the left and right sides of the lower side of the pixel data, and A3+A is required when performing run length conversion. A5 is EOI' (ENDOF PAGE) indicating the end of one page (all lines).
) code, All is EOrt indicating the end of l line
(END OF ROW) code, A7 is the connection/pattern code.

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

画素データラッチ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座標を発生させる。こ
の回路は発生させた座標を後述するラインメモリ+05
、周辺判定回路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 the line memory +05, 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座標、すなわち上記画素デー
タラッチ101かラッチした画素データdt、d3の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 dt, d3 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のとき、このメ
モリのアドレスの数も5I2)、画素データ内のある画
素に輪郭要素の前端が接続されかつその輪郭要素が他の
輪郭要素に接続されていないとき、その画素のX座標に
対応するアドレスに論理「l」のデータを書き込む。
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 5I2), 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 any other contour element, data of logic "1" is written to the address corresponding to the X coordinate of the pixel.

一方、後方フラグメモリ107も座標と同じ数のアドレ
スを持つが、このメモリには、ある画素に輪郭要素の後
端が接続されかつその輪郭要素が他の輪郭要素に接続さ
れていないとき、その画素のX座標に対応するアドレス
に論理rlJのデータが書き込まれる。
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, Logical rlJ data is written to the address corresponding to the X coordinate of the pixel.

接続フラグラッチ102は、前方フラグメモリ!06、
後方フラグメモリ107および後述する接続フラグ変更
回路104の出力データを、輪郭画素の接続状態を示す
データとして保持する。
The connection flag latch 102 is the front flag memory! 06,
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つの画
素d。−d3が、画面の境界からはみ出しているか否か
を判定する。画面の周囲から処理画素かはみ出している
場合には、所定の信号を画素データラッチlotおよび
接続フラグラッチ102に出力する。これらのラッチは
、この信号を受は取ると、画面の境界からはみ出した画
素については、強制的に白画素(背景となる画素)とす
る。
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 protrudes from the boundaries of the screen. If the pixel to be processed protrudes from the periphery of the screen, a predetermined signal is output to the pixel data latch lot and the connection flag latch 102. When these latches receive this signal, pixels that protrude from the boundaries of the screen are forced to become white pixels (background pixels).

コマンド発生回路103は画素データラッチ101が出
力する4つの画素データ及び接続フラグラッチ102が
出力するフラグデータをもとに輪郭追跡を行うための所
定のコマンドを輪郭解析部43に対して発生する。コマ
ンド発生回路103はこのとき、処理を実施する必要が
あるか否かを示す読み出しレディ信号を信号線6を通じ
て、また前記接続・パターンコードを信号線7を通じて
輪郭解析部43に送る。
The command generation circuit 103 generates a predetermined command to the contour analysis unit 43 to perform contour tracking 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は、輪郭解析部4゜が上記コ
マンドに従って処理を実施した後、画素の接続状態が変
化するので、処理後の接続フラグを、画素データラッチ
101と接続フラグラッチ102の出力データとをもと
に求め、前方フラグメモリ106、後方フラグメモリ1
07、並びに接続フラグラッチ102に出力する。
The connection flag changing circuit 104 changes the connection state of the pixels after the contour analysis unit 4° executes the process according to the above command, so the connection flag after the process is changed to the output data of the pixel data latch 101 and the connection flag latch 102. The forward flag memory 106 and the backward flag memory 1 are calculated based on
07 and the connection flag latch 102.

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

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

ラインメモリ105は、画素データラッチ101が出力
する画素データd、を取り込むことによって一行前の画
素データ、すなわちYアドレスが現在信号線5から入力
されている画素データd0のYアドレスより1小さい行
の画素データを一行分記憶している。そして、信号線5
から画素データd。、d、が画素データラッチ101に
順次入力されたとき、ラインメモリ105は、アドレス
発生回路108が出力する上記アドレスデータをもとに
、画素データdt、d3を順次同ラッチに出力する。こ
れにより、画素データラッチ101は隣接する4つの画
素データd0〜d、をラッチすることができる。
The line memory 105 captures the pixel data d output by the pixel data latch 101 to generate the pixel data of the previous row, that is, the row whose Y address is one smaller than the Y address of the pixel data d0 currently input from the signal line 5. Stores one row of pixel data. And signal line 5
pixel data d. , d, are sequentially input to the pixel data latch 101, the line memory 105 sequentially outputs pixel data dt, d3 to the same latch based on the address data output from the address generation circuit 108. Thereby, the pixel data latch 101 can latch four adjacent pixel data d0 to d.

接続フラグ変更回路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座標は大きい。そして、空白のも
のはフラグデータの値が「0」、■が書き込まれている
ものは値が「1」であることを示す。
On the other hand, R shown on the screen P represents forward connection flag data of each X coordinate, and T represents backward connection flag data of each X coordinate. Each piece of data is drawn in the order of coordinates, and the right side has a larger X coordinate. A blank value indicates that the value of the flag data is "0", and a value written with ■ indicates that the value is "1".

具体的に説明すると、画素e−1には輪郭要素Caの後
端が接続されているのでこの画素のX座標の後方接続フ
ラグデータTlはrNとなっている。逆に、画素e2に
は輪郭要素cbの前端が接続されているのでそのX座標
の前方接続フラグデータR2はNjとなっている。同様
に、画素e3に対応する後方接続フラグデータT4はr
lJ、画素e4に対応する前方接続フラグデータR4も
rlJとなっている。その他のフラグデータは、対応す
る画素に輪郭要素が接続されていないので、すべて10
」となっている。
Specifically, since the rear end of the contour element Ca is connected to the pixel e-1, the rear connection flag data Tl of the X coordinate of this pixel is rN. 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 Nj. Similarly, backward connection flag data T4 corresponding to pixel e3 is r
lJ, the forward connection flag data R4 corresponding to pixel e4 is also rlJ. Other flag data are all 10 because no outline element is connected to the corresponding pixel.
”.

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

第16図中太線で囲まれた4つの画素が処理の対象とな
っているとき、前方フラグメモリ106及び後方フラグ
メモリ107はそれぞれ、左側の処理対象画素のX座標
に対応する接続フラグデータR2,T2を出力する。一
方、接続フラグ変更回路+04は、右側の処理対象画素
の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 changing circuit +04 outputs connection flag data R3, T3 corresponding to the X coordinate of the pixel to be processed 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
。−d、を受は取り、輪郭要素追跡処理後のフラグデー
タを求める。すなわち、追跡処理によって、画素e2に
は、第17図に示すように、輪郭要素cbに次の輪郭要
素Ccが接続されるので、接続フラグ変更回路104は
、前方接続フラグデータR2を「0」とし、前方接続フ
ラグデータR3をrlJとする。後方接続フラグデータ
については、輪郭要素の後端が単独で存在しない状態が
継続されているので変更は行わない。
The connection flag changing circuit 104 inputs the 4-bit connection flag data and the pixel data d from the pixel data latch 101.
. -d is taken, and the flag data after contour element tracking processing is obtained. That is, as shown in FIG. 17, the next contour element Cc is connected to the contour element cb in the pixel e2 through the tracking process, so the connection flag change circuit 104 sets the forward connection flag data R2 to "0". and forward connection flag data R3 is set to rlJ. The rear connection flag data is not changed because the rear end of the contour element continues to be in a state where it does not exist independently.

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

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

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

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

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

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

ここで輪郭解析部43で行われる処理を第19図〜第2
3図を参照しながら説明する。先ず第19図に示すよう
にYアドレスを0とした後コマンド列を取り込み、この
コマンド列の中にEOPの指示がされている場合には処
理を終了し、指示がされていない場合にはFORの指示
がされているか否かを判断する。FORの指示がされて
いる場合にはYアドレスを一つ加算してコマンド列を取
り込み、指示がされていない場合には内部メモリ43内
に格納されている各テーブル(第3図〜第5図及び第2
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 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 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. and second
(see Figure 5).

各テーブルの更新のフローは第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.

S T +・・・輪郭要素が単独で新たに発生している
か否かの判断を行う。
S T + . . . 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.

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

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

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

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

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

S T 3・・・輪郭管理テーブルのSi番目の先端の
輪郭要素番号及び終端の輪郭要素番号の両開にCiを書
き込む。
S T 3...Write Ci in both openings of the Si-th tip contour element number and the end contour element number of the contour management table.

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

処理2では第22図に示すようにステップSTl〜ST
、が実行される。各ステップST、−5T@は以下の通
りである。
In process 2, steps STl to ST are performed as shown in FIG.
, is executed. Each step ST, -5T@ is as follows.

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

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

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

ST4・・・輪郭要素テーブルのCi番目の方向、座標
の欄に該当する事項を、前方接続及び後方接続の欄の該
当する方にC3を、他方にN0NEを、所属輪郭番号欄
にsHを夫々書き込む。
ST4...In the Ci-th direction and coordinate column of the contour element table, set C3 in the corresponding front connection and backward connection columns, N0NE in the other column, and sH in the belonging contour number column. Write.

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

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

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

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

S T t・・・輪郭要素テーブルのC4番目の前方接
続及び後方接続の両開のうち該当する方にCjを書き込
むと共に所属輪郭番号の欄からCiが所属する輪郭番号
Skを求める。
S T t...Writes Cj in the applicable one of the C4th front connection and rear connection double opening in the contour element table, and finds the contour number Sk to which Ci belongs from the column of belonging contour number.

STs・・・輪郭要素テーブルのCj番目の前方接続及
び後方接続の両開のうち該当する方にCiを書き込むと
共に所属輪郭番号の欄からCjが所属する輪郭番号S(
を求める。
STs...Ci is written in the applicable one of the Cj-th front connection and rear connection double opening in the contour element table, and the contour number S (to which Cj belongs) is written from the column of belonging contour number.
seek.

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

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

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

第24図は上記の処理1〜3と2画素×2画素の画素デ
ータの取り出し位置との関係を示す図であり、同図中数
字は輪郭要素の番号、点線の四角形は画素データ、黒点
は黒画素を夫々示す。画素データD1に対して生成され
たコマンド列の処理は処理lに該当し、画素データD、
に対して生成されたコマンド列の処理は処理2に該当す
る。また画素データD3.D4に対して生成されたコマ
ンド列は夫々処理3におけるSkとSaが等しい場合及
び異なる場合に相当する。
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. The processing of the command string generated for the pixel data D1 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. Also, pixel data D3. The command sequence generated for D4 corresponds to the case where Sk and Sa are equal and different in process 3, respectively.

以下、ランレン゛ゲスベクトル系列化処理について述べ
る。
The run range vector series processing will be described below.

第29図は処理コードフォーマットを示し、従来のもの
に輪郭画素状態符号(切換わり符号)eQとelを付加
している。この符号e0とe、は夫々1ビツトにされ、
白画素を論理“0”、黒画素を論理“1”に割り当てる
。例えば、第30図に示すラスタスキャンとの関係を示
すように、Y座標Yh−+のラインではX座標x n−
tとX n−+の境界及びX、とX petの境界で輪
郭が存在し、Y座標Y。
FIG. 29 shows a processing code format, in which contour pixel state codes (switching codes) eQ and el are added to the conventional one. The codes e0 and e are each set to 1 bit,
White pixels are assigned logic "0" and black pixels are assigned logic "1". For example, as shown in the relationship with the raster scan shown in FIG. 30, for a line with Y coordinate Yh-+,
A contour exists at the boundary between t and X n-+ and the boundary between X and X pet, and the Y coordinate is Y.

のラインではX。−1とxllの境界及びX、とX、や
、の境界で輪郭が存在し、夫々の境界の前後1ビットの
黒白によってe。とelの“l”、“0”が決められる
X on the line. There are contours at the boundaries between -1 and xll and at the boundaries between X, and and “l” and “0” of el are determined.

このような符号el、e(、はコマンド発生回路103
による処理コード生成時にデータdo、d+の“0.1
′又は′l、0”の識別によって同時生成されるし、X
座標に同期がなされて出力される。
Such codes el, e(, are the command generation circuit 103
“0.1 of data do, d+ when generating processing code by
' or 'l, 0'', and X
The coordinates are synchronized and output.

また、符号el+60は輪郭位置に相当することから、
該符号e1.eoを含む処理コードは輪郭解析部43に
取り込まれる。
Also, since the code el+60 corresponds to the contour position,
The code e1. The processing code including eo is taken into the contour analysis section 43.

輪郭解析部43は、処理コードの符号el+e。The contour analysis unit 43 uses the code el+e of the processing code.

とX座標データから第28図に示す手順によって符号化
処理を行い、画像データとしてテーブル保存する。この
符号化処理を以下に詳細に説明する。
An encoding process is performed from the and X coordinate data according to the procedure shown in FIG. 28, and the result is saved in a table as image data. This encoding process will be explained in detail below.

まず、輪郭解析部43は、処理コードとX座標データに
なる輪郭コマンド入力の読み取りに際してYアドレス(
Y座標)をY=Oに設定しくSl)、被写体の当該ペー
ジの第1ラインを設定しておく。次に、輪郭コマンド人
力を読み取りレディの立つタイミングで取り込み(S2
)、信号EOPビットが“1”か“0”かの判定を行う
(S3)。
First, the contour analysis unit 43 reads the contour command input, which becomes the processing code and the X coordinate data, at the Y address (
Set the Y coordinate (Sl) to Y=O, and set the first line of the page of the subject. Next, read the contour command manually and import it at the ready timing (S2
), it is determined whether the signal EOP bit is "1" or "0" (S3).

この判定は被写体画像の1ページの終わりか否かをチエ
ツクし、EOP=“1″のときには当該ベージの符号化
終了を行う。
In this determination, it is checked whether or not it is the end of one page of the subject image, and when EOP="1", the encoding of the page is finished.

ステップS3において、EOP=“0”になるとき、信
号EORビットが“l”か“O”かの判定を行う(S4
)。この判定は画像の1ライン(ROW)の終わりか否
かをチエツクし、FOR=“l”のときには当該ライン
の符号化終了としてYアドレスの+1加算を行い(S5
)、ステップS2に戻って次のラインからの輪郭コマン
ド取゛ り出しに入る。ステップS4において、FOR
=“0”のとき、符号e I + e Gについて判定
を行う(S6)。
In step S3, when EOP=“0”, it is determined whether the signal EOR bit is “l” or “O” (S4
). This judgment is made by checking whether it is the end of one line (ROW) of the image, and when FOR="l", the Y address is incremented by +1 to indicate the end of encoding of the line (S5
), the process returns to step S2 and starts extracting the contour command from the next line. In step S4, FOR
="0", a determination is made regarding the code e I + e G (S6).

この判定は、e、=“O”かつQ、=“1”をチエツク
し、この条件成立では黒ランの始まりになり、このとき
のX座標データから1ラインのに番目の黒ラン始点座標
XBS(K)を求め(S7)、ステップS4に戻る。
This judgment is made by checking e, = "O" and Q, = "1", and if this condition is met, it is the beginning of a black run, and from the X coordinate data at this time, the black run starting point coordinate XBS of the second line is (K) is obtained (S7), and the process returns to step S4.

ステップS6で条件不成立のとき、このときは黒ラン又
は白ランの途中らしくは黒ランの終点にあり、符号e。
If the condition is not satisfied in step S6, then it is likely to be in the middle of a black run or a white run, and is at the end of the black run, and the code is e.

=“l”かっe、−“0”をチエツクしくS8)、この
チエツクで条件不成立のときには黒ラン又は白ランの途
中にあってステップS4に戻る。
= "l" or -"0"(S8); if the condition is not satisfied in this check, the process is in the middle of a black run or a white run, and the process returns to step S4.

ステップS8で条件が成立するとき、このときは黒ラン
の終点(白ランの始点)にあり、このときのX座標デー
タからに番目の黒ラン終点座標XB、(K)を求める(
S9)。この黒ラン終点床tlxa、(K)とその前に
ステップS7で求めておいた黒ラン始点座標XBS(K
)から黒ランの長さL (=XB、(K)−XBS(K
))を求め、この長さデータLを黒ラン始点塵wxBs
(K)と対応づけてメモリ44に記憶しく5IO)、再
びステップS4に戻って黒ランの始点座標と長さの検出
記憶を行うという処理を繰り返し、この処理をページ終
了まで行う。
When the condition is satisfied in step S8, it is at the end point of the black run (starting point of the white run), and the coordinates XB, (K) of the end point of the black run are calculated from the X coordinate data at this time (
S9). This black run end point floor tlxa, (K) and the black run start point coordinate XBS (K
) to the length of black run L (=XB, (K)-XBS(K
)), and calculate this length data L as the black run starting point dust wxBs
(K) in the memory 44), and returns to step S4 again to repeat the process of detecting and storing the starting point coordinates and length of the black run, and repeating this process until the end of the page.

このような処理により、各ラインについて黒ランの始点
座標とその長さを黒ランの存在する個数分だけ順次記憶
し、これをメモリ44のテーブルデータとしておく。第
31図はメモリ44に格納する画像データテーブルを示
し、ライン番号(Y座標)と黒ラン始点X座標とその長
さしを夫々対応づけて記憶する。
Through such processing, the starting point coordinates and lengths of black runs for each line are sequentially stored as many as the number of black runs, and this is stored as table data in the memory 44. FIG. 31 shows an image data table stored in the memory 44, in which the line number (Y coordinate), the X coordinate of the black run starting point, and its length are stored in association with each other.

このデータからの被写体再生はラスタスキャン方式によ
るXY座標位置で夫々黒ラン始点で長さしの連続黒画素
表示又は印刷によって実現される。
Reproduction of the object from this data is realized by displaying or printing continuous black pixels for a length at each black run starting point at the XY coordinate position using a raster scan method.

次に輪郭ベクトル系列化処理について述べる。Next, the contour vector series processing will be described.

第2.5図は巨視的処理部3!の説明図で、この第25
図において、ある画像Aについての輪郭系列Po(Xo
、Yo)、P+(X+、YI)−Pt(X+。
Figure 2.5 shows the macroscopic processing unit 3! In this explanatory diagram, this 25th
In the figure, the contour series Po(Xo
, Yo), P+(X+, YI)-Pt(X+.

y、)−p、(xn、 Yn)[ただしP、は輪郭追跡
の始点とする)が与えられたとき、下記条件1を満たす
ような点Piを直線近似点として全抽出する。
y, )-p, (xn, Yn) [where P is the starting point of contour tracing], all points Pi that satisfy the following condition 1 are extracted as straight line approximation points.

[(+’+−+≦1″+)n(t″+>l″+−+)n
 (+”+≧I”th)コ・・・条件l ただし、itIはPoとPtの距離の2乗((1)式に
示す) 、l”thはしきい値の2乗である。
[(+'+-+≦1''+)n(t''+>l''+-+)n
(+"+≧I"th) Condition l However, itI is the square of the distance between Po and Pt (shown in equation (1)), and l"th is the square of the threshold value.

1”L= (X t  X (1)+(vt−vo)”
−(t)第26図1は微視的処理部32の説明図で、こ
の第26図aにおいて、ある画像Aについての輪郭系列
点P、、p、、・・・PtI、Pa・・・Pkから直線
近似点Qo (=Pa)+ Q++ Qt・・・q+(
=P+)。
1”L= (X t X (1)+(vt-vo)”
-(t) FIG. 26 1 is an explanatory diagram of the microscopic processing unit 32. In this FIG. 26 a, contour series points P, , p, . . . PtI, Pa . From Pk to straight line approximation point Qo (=Pa) + Q++ Qt...q+(
=P+).

Q**+ (=p J) 、・・・qnc=Po)を以
下の手順により求める。現在抽出された直線近似点のう
ち連続する2点(第26図すに示す)、Q l+ Q 
le+(最初はqoと巨視的処理部31で得られたq+
)の間の点Pについて次に示す条件2を満たすような点
をq、□として抽出(Q IIIをq、1に変える処理
を含む)して同様の処理を繰り返す。そして条件2を満
たすような点がなければQ l”l+ Q 142間に
ついて同様の処理を繰り返す。この処理を全ての点Pが
満足しな(なるまで繰り返す。
Q**+ (=p J),...qnc=Po) is determined by the following procedure. Two consecutive points among the currently extracted straight line approximation points (shown in Figure 26), Q l + Q
le+ (initially qo and q+ obtained by the macroscopic processing unit 31
), a point that satisfies condition 2 shown below is extracted as q, □ (including the process of changing Q III to q, 1), and the same process is repeated. If there is no point that satisfies condition 2, the same process is repeated for Q l"l + Q 142. This process is repeated until all points P are satisfied.

ldl″、。8≧−di’、hl  ・・・条件まただ
し、d l、、、 :各d1の最大値d l”aax=
iax [・=、  d l’J、−コd1:線分q 
l、 q 、0.から各P点までの距離dlth:線分
qt、q□、1の大きさによって変わるしきい値でd 
1th=α・しで与えられる。
ldl'',.8≧-di', hl...Conditions are met, dl,...: Maximum value of each d1 dl''aax=
iax [・=, d l'J, -ko d1: line segment q
l, q, 0. Distance dlth from to each P point: d with a threshold value that changes depending on the size of the line segment qt, q□,
It is given by 1th=α・shi.

なお、αは係数で第26図Cに示す例で、例えば、αは
第26図Cのなるように値をテーブル化すればよい。ま
た、α=I、2・・・といった定数で持てば単純にLに
比例したしきい値となる。
Note that α is a coefficient and is an example shown in FIG. 26C. For example, α may be tabulated as shown in FIG. 26C. Furthermore, if α is a constant such as I, 2, etc., the threshold value is simply proportional to L.

次にdlの求め方について第26図dを用いて述べる。Next, how to obtain dl will be described using FIG. 26d.

一−−→ −一→  −−一→ −−→(Q+Q+++
’ q+PJ)=lQtQ+*口IQIPJIcO8θ
J=(xmxυ(YJ  Yi)+(Yh  YI)(
XJ  XoここでX kX ’t = d X h 
、 Y J  Y t = d Y J 。
1−−→ −1→ −−1→ −−→(Q+Q+++
'q+PJ)=lQtQ+*mouthIQIPJIcO8θ
J=(xmxυ(YJ Yi)+(Yh YI)(
XJ Xo where X kX 't = d X h
, Y J Y t = d Y J .

Y −Y r = d Y k、  X J  X l
= d X Jとおくと上記式は次のようになる。
Y −Y r = d Y k, X J X l
If we set = d X J, the above formula becomes as follows.

、’、l q肩べ1!。。eθ。,’,l qshoulderbe1! . . eθ.

=(dXhXdY、++dYhXdXa)”/ l q
tq+−+l ”−−→  。
=(dXhXdY, ++dYhXdXa)”/ l q
tq+−+l ”−−→.

dN= l  QtP、+lSI+104dlj”=1
31”sin”θJ = +7テl ” 131 ”c
os”θ。
dN=lQtP,+lSI+104dlj"=1
31"sin"θJ = +7tel"131"c
os"θ.

−一−→                     
  −〉=l Q IPJI” (d Xhx d Y
J+ d YhX d XJ)”/I Q r Q t
−11’= d XJ”d YJ’−(d XkXd 
Y4”d Yhxd XJ)’/d Xh”+d Y−
上記から三角関数や平方根計算が省略できる。
-1-→
−〉=l Q IPJI” (d Xhx d Y
J+ d YhX d XJ)”/I Q r Q t
-11'= d XJ"d YJ'-(d XkXd
Y4"d Yhxd XJ)'/d Xh"+d Y-
Trigonometric functions and square root calculations can be omitted from the above.

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

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

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

この他、本発明では画像情報を白画素、黒画素の集合と
して取扱うのに比べ各部が処理する情報量及び処理時間
が大幅に少なくなるのは画素集合ではなく輪郭ベクトル
集合で記憶するから情報圧縮されるためである。しかも
外部記憶での情報記憶量は情報圧縮されているため、大
幅に増大する。
In addition, in the present invention, compared to handling image information as a set of white pixels and black pixels, the amount of information and processing time processed by each section are significantly reduced because it is stored as a set of outline vectors rather than a set of pixels, so information is compressed. This is to be done. Moreover, the amount of information stored in the external storage increases significantly because the information is compressed.

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

第1図は本発明のハードウェア構成を示すブロック図、
第2図はラスタスキャンの様子を示す説明図、第3図は
輪郭要素テーブルを示す説明図、第4図は輪郭管理テー
ブルを示す説明図、第5図は輪郭接続テーブルを示す説
明図、第6図(イ)。 (ロ)は、各々画素データと輪郭要素との関係を示す説
明図、第7図は輪郭要素間の接続状態を示す説明図、第
8図は輪郭要素の方向を示す説明図、第9図は本発明の
ハードウェア構成を示す構成図、第1θ図及び第2図は
画素データと接続関係との成立関係を示す説明図、第1
2図は画素データを示す説明図、第13図は接続フラグ
を示す説明図、第14図はコマンド列を示す説明図、第
15図は輪郭抽出部を示す回路図、第16図及び第17
図は各々接続フラグデータの説明図、第18図は孤立画
素のパターンを示すパターン図、第19図は輪郭解析部
の全体処理を示すフローチャート、第20図はテーブル
更新処理を示すフローチャート、第21図〜第23図は
夫々処理1〜3を示すフローチャート、第24図はテー
ブル更新処理と画素データの位置との関係を示す説明図
、第25図は輪郭ベクトル系列テーブルを示す説明図、
第26図a = dは巨視的及び微視的処理の説明図、
第27図は第9図の本発明の実施例の処理を述べるフロ
ーチャート、第28図は符号化処理フローチャート、第
29図は処理コードフォーマット、第30図はラスタス
キャンと符号el+eQの関係を示す図、第31図は符
号要素テーブル、第32図は従来の輪郭画素抽出態様を
示す説明図である。 l、4.・・・輪郭抽出部、2,4.・・・輪郭解析部
、3・・・テーブル格納部、4・・・輪郭検出装置、4
4・・・内部メモリ、31・・・巨視的処理部、32・
・・微視的処理部、33・・・輪郭ベクトル系列テーブ
ル、41・・・ランレングスベクトル系列テーブル、4
2・・・原画像編集部。 第1図 本発明の構成図 第3図 輪郭要素テーブルのI!明図 第4図 第5図 輪郭接続テーブル 第6図 面素データと輪郭要素との文係図 (イ)                (ロ)l−為
            Xni 島第9図 4・・・輪郭検出装置      I+・主制御部41
 ・・内部バス        12・・主メモリ46
・・・メインバス            (光ディス
ク)第10図 画素データと接続関係との成立関係図 −ニニ= ニ]] 第12図      第13図 面素データの説明図          接続フラグの
説明図コマンド列の説明図 第11図 面素データと接12間係との成立関係図第15図 輪郭抽出部の回路図 第16図 接続フラグデータの説明図 接続フラグデータの説明図 第18図 孤立画素のパターン説明図 (イ)              (ロ)(ハ)  
         (ニ) 第19図 輪郭解析部の全体処理のフローチャート第20図 更新処理のフローチャート 第21図     第22図 処理1のフローチャート       処理2のフロー
チャート第23図 処理3のフローチャート 第24図 更新処理と画素データの位置との関係図第25図 輪郭ベクトル系列テーブル 第: 巨視的及び微宅 (a) (C) 1的処理の説明図 (b) P) (d) P+(X+、Yす 第27図 第29図 処理コードフォーマット ラスタスキャンと符号e”+、eoの関係を示す図xa
           XnJ   Xn−1xn  
      xp    XP+I         
   Xll!eo   (’l       eg 
  e+第32図 従来の輪郭画素抽出態様図
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. 1 is a configuration diagram showing the hardware configuration of the present invention, FIG. 1 θ and FIG.
Fig. 2 is an explanatory diagram showing pixel data, Fig. 13 is an explanatory diagram showing connection flags, Fig. 14 is an explanatory diagram showing a command string, Fig. 15 is a circuit diagram showing an outline extraction section, and Figs. 16 and 17.
18 is a pattern diagram showing an isolated pixel pattern, FIG. 19 is a flowchart showing the overall processing of the contour analysis section, FIG. 20 is a flowchart showing table update processing, and FIG. 23 are flowcharts showing processes 1 to 3, respectively, FIG. 24 is an explanatory diagram showing the relationship between the table update process and the position of pixel data, and FIG. 25 is an explanatory diagram showing the contour vector series table.
Figure 26 a = d is an explanatory diagram of macroscopic and microscopic processing;
FIG. 27 is a flowchart describing the processing of the embodiment of the present invention in FIG. 9, FIG. 28 is a flowchart of encoding processing, FIG. 29 is a processing code format, and FIG. 30 is a diagram showing the relationship between raster scan and code el+eQ. , FIG. 31 is a code element table, and FIG. 32 is an explanatory diagram showing a conventional outline pixel extraction mode. l, 4. ...contour extraction section, 2, 4. ... 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 sequence table, 41 . . . Run length vector sequence table, 4
2...Original image editing department. Fig. 1: Configuration diagram of the present invention Fig. 3: I! of contour element table Figure 4 Figure 5 Contour connection table Figure 6 Relationship diagram between pixel data and contour elements (a) (b) l-for 41
・Internal bus 12 ・Main memory 46
...Main bus (optical disk) Fig. 10 Diagram of the establishment of pixel data and connection relationships - Nini = ni]] Fig. 12 Fig. 13 An explanatory diagram of pixel data An explanatory diagram of connection flags An explanatory diagram of command strings No. 11 15. Circuit diagram of contour extraction unit. 16. Explanation of connection flag data. 18. Illustration of isolated pixel pattern (A). b) (c)
(d) Fig. 19: Flowchart of overall processing of the contour analysis section Fig. 20: Flowchart of update processing Fig. 21 Fig. 22: Flowchart of processing 1 Fig. 23: Flowchart of processing 2 Fig. 23: Flowchart of processing 3 Fig. 24: Update processing and pixel data Figure 25: Contour vector series table: Macroscopic and microscopic (a) (C) Explanatory diagram of 1-dimensional processing (b) P) (d) P+(X+,YS) Figure 27 Figure 29 Diagram xa showing the relationship between processing code format raster scan and codes e''+ and eo
XnJ Xn-1xn
xp XP+I
Xll! eo ('l eg
e+Figure 32 Conventional contour pixel extraction mode diagram

Claims (1)

【特許請求の範囲】[Claims] (1)被写体をラスタスキャンして得られた黒白に対応
する2値化画素データに基づき、黒白の境界に相当する
輪郭を検出する装置において、縦横2画素×2画素の画
素データをスキャンラインに沿って順次に取り出し、互
いに隣接した2個の黒画素を結ぶベクトルに相当する輪
郭要素と当該画素データに係る画素との接続関係を、1
ライン前にて取り出した画素データに基づいて作成する
と共に、前記接続関係の情報と当該画素データの黒白の
配列パターンの情報とを含むコマンド列を作成して出力
するとともに前記輪郭要素の抽出に白画素と黒画素の切
換わり符号(e_0,e_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 calculated as 1.
A command string is created and output based on the pixel data extracted before the line, and also creates 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 extraction unit that generates a switching code (e_0, e_1) between a pixel and a black pixel, and assigns a unique code to each of the contour elements and a contour made up of a group of these contour elements, and assigns a unique code to each contour element. A contour element table for recording the coordinates and directions, 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, and a contour located at the tip and end of each contour. A contour management table for recording element codes, X coordinates aligned in the raster scan direction, codes of end-connected contour elements whose front or rear ends are located at those coordinates, and front and rear ends of the end-connected ends of the contour elements. a table storage section for storing a contour connection table for describing the contours in correspondence with each other; and updating the description of each table in the table storage section based on the command string from the contour extraction The codes of the other contour elements in the element table are updated by referring to the contour connection table, and the start and end point coordinates of the black run are calculated from the switching code and the coordinates on the line, and the start point coordinates of the black run are determined. and the length as image data to obtain the original image, and from the contour element table and the contour management table, extract the maximum point from the starting point among the points constituting one contour pixel series, and A contour analysis section that stores in a storage section a contour vector obtained by extracting a point that is the maximum distance between two consecutive points, and an external storage device that transfers and stores the contour vector stored by this contour analysis section. A contour detection device comprising:
JP63102039A 1988-04-25 1988-04-25 Contour detector Pending JPH01273185A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63102039A JPH01273185A (en) 1988-04-25 1988-04-25 Contour detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63102039A JPH01273185A (en) 1988-04-25 1988-04-25 Contour detector

Publications (1)

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

Family

ID=14316630

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JPH01273185A (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
JPS6097482A (en) * 1983-10-31 1985-05-31 Meidensha Electric Mfg Co Ltd Pattern recognizing device
JPS6232584A (en) * 1985-08-05 1987-02-12 Nippon Telegr & Teleph Corp <Ntt> Method for extracting contour shape feature

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
JPS6097482A (en) * 1983-10-31 1985-05-31 Meidensha Electric Mfg Co Ltd Pattern recognizing device
JPS6232584A (en) * 1985-08-05 1987-02-12 Nippon Telegr & Teleph Corp <Ntt> Method for extracting contour shape feature

Similar Documents

Publication Publication Date Title
JPH01273185A (en) Contour detector
JPH01277976A (en) Image processor
JPH01243188A (en) Contour detector
JPH01251181A (en) Contour detector
JPS63305478A (en) Pattern information restoring device
JPH01273186A (en) Contour detector
JP3072721B2 (en) Image processing method and apparatus, storage medium for storing image processing program
JPH0264782A (en) Outline detecting device
JPH01251183A (en) Contour detector
JPH01251182A (en) Contour detector
JPH11187231A (en) Image retrieving device and image retrieval method
JPH01244582A (en) Contour detector
JPH01251180A (en) Contour detector
JP2679098B2 (en) Encoding processing device for contour detection image
JP2882742B2 (en) Image data display device
JPH03287297A (en) Character generating circuit
JPH01244583A (en) Contour detector
JP2821002B2 (en) Character processing device and character processing method
JP2954218B2 (en) Image processing method and apparatus
JPS6292080A (en) Pattern recognizing device
JP2853321B2 (en) Binary image information synthesis method
JPH0132547B2 (en)
JP3037504B2 (en) Image processing method and apparatus
JPH01243187A (en) Picture processor
JPS59730A (en) Asynchronous hard copy system of display screen