JPS6074092A - Extracting circuit of contour shape information - Google Patents

Extracting circuit of contour shape information

Info

Publication number
JPS6074092A
JPS6074092A JP58182589A JP18258983A JPS6074092A JP S6074092 A JPS6074092 A JP S6074092A JP 58182589 A JP58182589 A JP 58182589A JP 18258983 A JP18258983 A JP 18258983A JP S6074092 A JPS6074092 A JP S6074092A
Authority
JP
Japan
Prior art keywords
circuit
code
area
memory
contour
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP58182589A
Other languages
Japanese (ja)
Other versions
JPH0148587B2 (en
Inventor
Norihisa Miki
徳久 三木
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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Hokushin Electric Corp
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 Yokogawa Hokushin Electric Corp filed Critical Yokogawa Hokushin Electric Corp
Priority to JP58182589A priority Critical patent/JPS6074092A/en
Publication of JPS6074092A publication Critical patent/JPS6074092A/en
Publication of JPH0148587B2 publication Critical patent/JPH0148587B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE:To speed up the extraction of contour shape information on a binary- code picture as an object of pattern recognition by storing every picture element of the contour shape information together with the number of a picture area, and rearranging storage contents by a rearrangement processing and generating chain codes which make one round of the contour. CONSTITUTION:A binary signal obtained by making a raster scan on picture elements of the binary image to be measured is inputted to the one-line memory 311 of a containment code generating circuit 31 and the lower line of a 2X2 mask circuit 312, and the signal is delayed by one line in the memory 311 and inputted to the upper line to constitute a mask pattern as to four picture elements, generating a code. A circuit 32 inputs the code from the circuit 31 and supplies it to a circuit 33, and the area number of every area of the object is determined to output the number of the frame of a mask pattern to a buffer circuit 341. A circuit 342 inputs the code from the circuit 32 to select an area number of the circuit 341 according to a specific rule, and outputs it to a memory 343. Codes in the memory 343 are converted into chain codes by the rearrangement processor 344.

Description

【発明の詳細な説明】 〔発明の属する技術分野〕 画像情報処理回路に関する。特に、パターン認識のため
の手段の一つの手段として適する二値画像の対象物の輪
郭形状情報を一次元情報に圧縮する回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical field to which the invention pertains] This invention relates to an image information processing circuit. In particular, the present invention relates to a circuit that compresses contour shape information of an object in a binary image into one-dimensional information, which is suitable as one of the means for pattern recognition.

〔従来技術の説明〕[Description of prior art]

画像計測において重要な対象物の輪郭形状の計測には第
1図に示す輪郭追跡法が多用される。この方法は2値画
像の対象物12の輪郭を時計回り13、または反時計回
りに追跡して対象物の輪郭を一周し、第2図に示すよう
な8方向のチェイン・コードまたは上下左右の4方向の
コードを用いて、追跡方向を逐次同定し、対象物の輪郭
に関する二次元情報を一次元情報に圧縮している。この
輪郭追跡を高速に行うためにはハードウェアに依存する
方法もあるが、回路が複雑になりそのような従来回路例
は少い。また、CPIJなどを用いて輪郭追跡法に伴う
方向判断を行うと、リアルタイム処理が難しく高速処理
に適しない欠点があった。
The contour tracking method shown in FIG. 1 is often used to measure the contour shape of an object, which is important in image measurement. This method traces the outline of the object 12 in the binary image clockwise 13 or counterclockwise, goes around the outline of the object, and creates an 8-direction chain code or up, down, left, and right directions as shown in Figure 2. Using four-directional codes, tracking directions are sequentially identified, and two-dimensional information about the outline of the object is compressed into one-dimensional information. There is a method that relies on hardware to perform this contour tracing at high speed, but the circuit becomes complicated and there are few examples of such conventional circuits. Further, when the direction judgment associated with the contour tracking method is performed using CPIJ or the like, there is a drawback that real-time processing is difficult and it is not suitable for high-speed processing.

〔発明の目的〕[Purpose of the invention]

本発明は、従来の輪郭追跡法に代る方法を用いて輪郭形
状の計測を行い、前述の画像高速処理に伴う輪郭追跡法
の欠点を除去する回路を提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide a circuit that measures a contour shape using an alternative method to the conventional contour tracing method and eliminates the disadvantages of the contour tracing method associated with high-speed image processing.

〔発明の要点〕[Key points of the invention]

本発明は、輪郭追跡法によるチェイン・コードの直接生
成に代り、まずラスター・スキャンによりコンティメン
ト・コードを発生し、このコードを加工して2個画像の
輪郭形状に対応するチェイン・コードを生成するもので
、 水平同期および垂直間1111にしたがって平面走査さ
れた2個画像が入力する入力端子と、この端子の信号が
表わす各画素に画像領域毎番号付けを行う回路と、上記
入力端子に入力する信号が表わす画面の隣接する4個の
画素についてコンティメント・コートを発止する回路と
、各画素毎に上記画@領域の番号およびその画素の上記
コンティメント・コードを一組として記憶する記憶回路
と、この記憶回路に接続されこの記憶回路の記憶内容の
アドレス並べ換えを行うプロセッサとを備え、このプロ
センサは、上記記憶回路の記1g内容の読出し順序が上
記画像領域の輪郭を一周するチェイン・コードと同等に
なるようにアドレス並べ換えを行うことを特徴とする。
Instead of directly generating a chain code using the contour tracking method, the present invention first generates a continuum code by raster scanning, and processes this code to generate a chain code corresponding to the contour shape of two images. It has an input terminal into which two images plane-scanned according to the horizontal synchronization and vertical spacing 1111 are input, a circuit that numbers each pixel represented by the signal of this terminal for each image area, and an input terminal to which the input terminal is input. a circuit that initiates a continuance coat for four adjacent pixels on the screen represented by the signal; and a memory that stores, for each pixel, the number of the pixel@area and the continuation code of that pixel as a set. circuit, and a processor connected to the memory circuit for rearranging the addresses of the memory contents of the memory circuit. It is characterized by rearranging the addresses so that they are equivalent to the code.

〔実施例による説明〕[Explanation based on examples]

本発明を図面に基づいて説明する。 The present invention will be explained based on the drawings.

第3図は実施例回路の構成を示すブロック構成図である
FIG. 3 is a block configuration diagram showing the configuration of the embodiment circuit.

まず、第3図に基づき本実施例回路の構成を説明する。First, the configuration of the circuit of this embodiment will be explained based on FIG.

この回路は、計測対象である二値画像をラスター・スキ
ャンを行って得られる「1」およびrOJの二値信号を
入力する画像信号久方端子30と、コンティメント・コ
ード発生回路31と、コントロール・ロジック回路32
と、領域番号骨は回路33と、チェイン・コード発生回
路34と、タイミング発生回路35とを備え、さらに、
コンティメント・コード発生回路31ば1水平走査周期
の遅延を与えるワンライン・メモリ311および2×2
マスク回路312とを備え、また、チェイン・コード発
生回路34は番号バッファ回路341、番号セレクタ回
路342、データ・メモリ343、並べ換えプロセッサ
344と、コンティメント・コード・カウンタ345と
を備えている。
This circuit consists of an image signal Kugata terminal 30 that inputs binary signals of "1" and rOJ obtained by raster scanning a binary image to be measured, a continuation code generation circuit 31, and a control circuit.・Logic circuit 32
The area number bone includes a circuit 33, a chain code generation circuit 34, and a timing generation circuit 35, and further includes:
Containment code generation circuit 31, one-line memory 311 providing a delay of one horizontal scanning period, and 2×2
The chain code generation circuit 34 also includes a number buffer circuit 341, a number selector circuit 342, a data memory 343, a rearrangement processor 344, and a continuation code counter 345.

次に、第3図に基づき本実施例回路の接続を説明する。Next, the connections of the circuit of this embodiment will be explained based on FIG.

端子30は図示されていない画像信号源に接続されてい
て、この画像信号をコンティメント・コード発生回路3
1に入力するように接続される。
The terminal 30 is connected to an image signal source (not shown), and this image signal is sent to the continuation code generation circuit 3.
1.

コンティメント・コード発生回路31の出力はコントロ
ール・ロジック回路32の人力に接続される。
The output of the continuation code generation circuit 31 is connected to the control logic circuit 32.

コントロール・ロジック回路32のコンティメント・コ
ード出力は領域番号骨は回路33の入力に接続され、ま
た、コントロール・ロジック回路32のコントロール信
号出力はチェイン・コード発生回路34の番号セレクタ
回路342の入力にも接続されている。さらに、コント
ロール・ロジック回路32のコンティメント・コード出
力はチェイン・コード発生回路34のデータ・メモリ3
43の大力に接続され、また、コントロール・ロジック
回路32のタイミング信号出力はチェイン・コード発生
回路34のコンティノント・コード・カウンタ345の
入力に接続されている。また、領域番号骨は回路33の
出力はチェイン・コード発生回路340番号バッファ回
路341の入力に接続されている。
The continuation code output of the control logic circuit 32 is connected to the input of the region number circuit 33, and the control signal output of the control logic circuit 32 is connected to the input of the number selector circuit 342 of the chain code generation circuit 34. is also connected. Further, the continuation code output of the control logic circuit 32 is sent to the data memory 3 of the chain code generation circuit 34.
43, and the timing signal output of the control logic circuit 32 is connected to the input of a continuous code counter 345 of the chain code generation circuit 34. Further, the output of the area number circuit 33 is connected to the input of a chain code generation circuit 340 and a number buffer circuit 341.

番号バッファ回路341の出力は番号セレクク回路34
2の入力に接続される。番号セレクク回路342からの
領域番号信号出力はデータ・メモリ343の入力に接続
され、また、コンティメント・コート・カウンタの出力
はアドレスとしてデータ・メモリ343に与えられるよ
うに接続される。データ・メモリ343の出力ば並べ換
えプロセッサ344の入力に接続される。
The output of the number buffer circuit 341 is sent to the number select circuit 34.
2 input. The area number signal output from number select circuit 342 is connected to the input of data memory 343, and the output of the continuation court counter is connected to be provided to data memory 343 as an address. The output of data memory 343 is connected to the input of reordering processor 344.

タイミング発生回路35の出力はチェイン・コード発注
回路のデータ・メモリ343および番号バッファ回路3
41の入力に接続される。
The output of the timing generation circuit 35 is sent to the data memory 343 of the chain code ordering circuit and the number buffer circuit 3.
41 input.

次に、本発明回路の動作の説明に先立って、この説明に
用いられる第3図から第13図までの図面および第1表
から第4表までの表の要点を説明する。
Next, prior to explaining the operation of the circuit of the present invention, the main points of the drawings from FIG. 3 to FIG. 13 and the tables from Tables 1 to 4 used for this explanation will be explained.

第3図は、前述のように本実施例回路の構成を示すブロ
ック構成図である。
FIG. 3 is a block configuration diagram showing the configuration of the circuit of this embodiment as described above.

第4図は、第3図の2×2マスク回路に入力する隣接す
る4個の画素により構成されるマスク・パターンの4つ
の枠の名称を示すもので、図の枠aと枠すとの1組をマ
スク・パターンの上ラインと言い、枠Cと枠dとの1組
をマスク・パターンの下ラインと言う。
Figure 4 shows the names of the four frames of the mask pattern composed of four adjacent pixels that are input to the 2x2 mask circuit in Figure 3. One set is called the upper line of the mask pattern, and one set of frame C and frame d is called the lower line of the mask pattern.

第5図は、画面50上の対象物の輪郭52と、対象物を
2個の領域に切断する線53とにより、画面50の領域
を3部分に分割した状態を示すもので、対象物領域の2
部分のそれぞれに「1」および「2」の領域番号を付し
、背景領域の部分にrOJの領域番号を付しである。
FIG. 5 shows a state in which the area of the screen 50 is divided into three parts by an outline 52 of the object on the screen 50 and a line 53 that cuts the object into two areas. 2
Region numbers "1" and "2" are assigned to each part, and the region number rOJ is assigned to the background region part.

第6図は、第5図に示す対象物の輪郭に沿うマスク・パ
ターンを示す図で、マスク・パターンの4個の画素の内
、斜線の施されている画素はラスター・スキヤーンにて
得られた「1」値の信号を示し、この信号は第5図にお
ける対象物領域にその画素が属することを示し、また、
空白の画素は「0」値の信号に対応し、背景領域にその
画素が属することを示す。なお、本図における対象物輪
郭線上の黒点はマスク・パターンの4つの画素の共通点
を示す。
FIG. 6 is a diagram showing a mask pattern that follows the outline of the object shown in FIG. 5. Among the four pixels of the mask pattern, the shaded pixels are obtained by raster scanning. This signal indicates that the pixel belongs to the object region in FIG. 5, and
A blank pixel corresponds to a "0" value signal, indicating that the pixel belongs to the background region. Note that the black dots on the object outline in this figure indicate the common points of the four pixels of the mask pattern.

第7図は、第6図に記入した矢印付き線Cにて定まる線
上に発生回路マスク・パターンを示す図である。ただし
、対象物の左側および右側にある背景のマスク・パター
ンは省略しである。
FIG. 7 is a diagram showing a generation circuit mask pattern on a line defined by the arrowed line C drawn in FIG. However, the background mask patterns on the left and right sides of the object are omitted.

第8図は、第5図に示す対象物の輪郭上のコンティメン
ト・コートを左下側コードおよび右上+1111コード
に分類して示したものである。
FIG. 8 shows the continuation coat on the outline of the object shown in FIG. 5, classified into a lower left code and an upper right +1111 code.

ここで、左下側コードとは、第12図に示すコンティメ
ント・コードCcのうち、左側コードである番号1.8
.9.11および13のコンテイメント・コードと番号
3のコンテイメント・コードの総称であり、右上側コー
ドとは、右側コードである番号2.4.6.7およびI
4と番号12のコンテイメント・コードの総称である。
Here, the lower left side code refers to number 1.8, which is the left side code, of the continuation code Cc shown in FIG.
.. 9.11 and 13 containment codes and the number 3 containment code, and the upper right code is the right code number 2.4.6.7 and I.
This is a general term for the containment chords numbered 4 and 12.

ただし、番号5および10のコンティメン1〜・コード
はそれぞれ番号1と4とのコンテイメント・コードおよ
び番号2と8のコンテイメント・コードとが結合したも
のとして取扱うこととする。図の対象物の輪郭上に短い
縦線で示した部分70上のコンテイメント・コードは第
3表の領域番号「1」の左下側コードに所属し、輪郭線
に沿って破線の付されて6)る部分8I上のコンテイメ
ント・コードは領域番号用」の右上側コードに所属し、
輪郭上に付した丸印で示した部分73および84上のコ
ンテイメント・コードは領域番号「2」の右上側コード
に所属し、輪郭上の×印で示した部分82上のコンテイ
メント・コートは領域番号「2」の左下側コートに所属
し、輪郭上の黒丸印で示した部分85上のコンテイメン
ト・コードは領域番号「2′」の左下側コー1’lこ所
属し、そして輪郭線に沿って実線の付されてG)る部分
86上のコンテイメント・コートは領域番号「2′」の
右上側コードに所属する。なお、図Gこおいて符号80
0および符号850で示される部分面はそれぞれ領域「
1」および「2」を示し、符号825および875の付
された円に囲まれた部分はそれぞUシェープの彎曲箇所
およびnシェープの彎曲箇所をそれぞれ示す。
However, the containment codes numbered 5 and 10 are treated as a combination of the containment codes numbered 1 and 4 and the containment codes numbered 2 and 8, respectively. The containment code on the part 70 indicated by a short vertical line on the outline of the object in the figure belongs to the lower left code of area number "1" in Table 3, and is marked with a broken line along the outline. 6) The containment code on part 8I belongs to the upper right side code of "For area number",
Containment codes on areas 73 and 84 marked with circles on the outline belong to the upper right code of area number "2", and containment codes on area 82 marked with an x on the outline belong to the upper right code of area number "2". belongs to the lower left court of area number "2", the containment code on the part 85 indicated by the black circle on the outline belongs to the lower left court of area number "2'", and the contour The containment coat on the portion 86 marked with a solid line (G) along the line belongs to the upper right code of area number "2'". In addition, in Figure G, the reference numeral 80
The partial surfaces indicated by 0 and 850 respectively correspond to the area "
1'' and ``2'', and the portions surrounded by circles labeled 825 and 875 respectively represent a U-shaped curved location and an N-shaped curved location.

第9図から第12図は第2表から第4表にコードが順次
変換する過程を示す論理流れ図であって、並べ換えプロ
セッサ344の動作を示す。ずなわら、データ・メモリ
343の記憶内容が画像対象の輪郭を一周するチェイン
・コードに変換される過程を示す。
9 to 12 are logic flow diagrams showing the process of sequentially converting codes from Table 2 to Table 4, and illustrate the operation of reordering processor 344. First, it shows the process in which the contents of the data memory 343 are converted into a chain code that goes around the outline of the image object.

第9図は第10および第11図の過程の大要とその順序
を示すものであり、第10図の過程において第2表から
第3表に示す変換が行われ、第11図の過程において第
3表から第4表の変換が行われる。
Figure 9 shows the summary and order of the processes in Figures 10 and 11. In the process in Figure 10, the conversions shown in Tables 2 to 3 are performed, and in the process in Figure 11, the conversions shown in Tables 2 to 3 are performed. Conversions from Table 3 to Table 4 are performed.

第12図は、マスク・パターンと、コンティメント・コ
ート’ Ccと、時計まわりのチェイン・コードCdと
の対応を示すもので、チェイン・コードには方向符号も
添記されている。
FIG. 12 shows the correspondence between the mask pattern, the continuation coat 'Cc, and the clockwise chain code Cd, and a direction code is also added to the chain code.

第13図は、彎曲点の左端のマスク・パターンと右61
Mのマスク・パターンとの組合せを示すもので、り凹点
ベアと言う。彎曲点には上に凸の場合と、下に凸の場合
と、上に凹(以下、Uシェープと言う。)の場合と、下
に凹(以下、「1シエープと言う。)の場合とがある。
Figure 13 shows the mask pattern on the left end of the curved point and the mask pattern on the right 61
This shows the combination with the M mask pattern and is called a recessed point bear. There are three types of curved points: upwardly convex, downwardly convex, upwardly concave (hereinafter referred to as U-shape), and downwardly concave (hereinafter referred to as ``1-shape''). There is.

彎曲点ペアの間に介在するコンティメント・コード番号
3および12に対応するマスク・パターンの数によって
、彎曲点の名称は影響されない。
The names of the curve points are not affected by the number of mask patterns corresponding to continuance code numbers 3 and 12 that are interposed between the curve point pairs.

第1表は、チェイン・コード発生回路34の番号セレク
タ回路の判断基準を示すもので、コントロール・ロジッ
ク回路からのコンティメント・コードに対応して番号バ
ッファ回路341に一時記憶されている枠を選択する基
準であって、選択された枠内の領域番号がデータ・メモ
リ343に与えられる。
Table 1 shows the judgment criteria of the number selector circuit of the chain code generation circuit 34, and selects the frame temporarily stored in the number buffer circuit 341 corresponding to the continuation code from the control logic circuit. The area number within the selected frame is given to the data memory 343 as a reference for the selection.

第2表は、第6図の対象物の輪郭に沿うて生成されたマ
スク・パターンに基づき、データ・メモリ343に記憶
される領域番号およびコンティメント・コードを示す。
Table 2 shows the area numbers and continuation codes stored in data memory 343 based on the mask pattern generated along the contour of the object in FIG.

ただし、領域番号の行に示したX印は領域番号が番号セ
レクタ回路342に選択されない場合を示す。
However, the X mark shown in the area number row indicates a case where the area number is not selected by the number selector circuit 342.

第3表は、第8図に示す領域番号および左下側コートと
右上側コードとを組合せることにより作成されるテーブ
ルに、それぞれの組合わせに所属するコンティメント・
コードを第10図の論理流れ図に示す方法に従って処理
された状態を示す。
Table 3 is a table created by combining the area numbers shown in FIG. 8, the lower left coat, and the upper right code.
Figure 10 shows the code processed according to the method shown in the logic flow diagram of Figure 10;

第4表は、第3表に示すように分類されたデータを第1
1図の論理流れ図に示す処理を経て画像領域の輪郭を一
周するチェイン・コードに変換された状態を示す。コン
ティメント・コードも併記し、木表と第3表との関連を
明確にするとともに、データが圧縮された状態も示すも
のである。
Table 4 shows the data classified as shown in Table 3.
1 shows a state converted into a chain code that goes around the outline of an image area through the processing shown in the logic flowchart of FIG. 1. The continuation code is also shown to clarify the relationship between the tree table and the third table, and also to indicate the compressed state of the data.

第1表 次に、本発明の回路の動作につき説明する。第3図にて
、計測対象である二値画像の画素をラスター・スキャン
して得られる「1」および「0」の二値信号はコンティ
メント・コード発生回路3Iのワンライン・メモリ31
1および第4図に示す2×2マスク回路312の下ライ
ンに入力する。ワンライン・メモリ311はワン・ライ
ン分の遅延を与えられた信号を2×2マスク回路312
の上ラインに入力する。このようにして、二値画像上の
隣接する4個の画素についてのマスク・パターンが構成
されて、このコンティメント・コード発生回路31より
コンティメント・コードが出力される。このコンティメ
ント・コードの発生状態は第7図に示すように左から右
に向かって順次に生成される。
Table 1 Next, the operation of the circuit of the present invention will be explained. In FIG. 3, the binary signals of "1" and "0" obtained by raster scanning the pixels of the binary image to be measured are stored in the one-line memory 31 of the continuation code generation circuit 3I.
1 and the lower line of the 2×2 mask circuit 312 shown in FIG. The one-line memory 311 transfers the signal delayed by one line to the 2×2 mask circuit 312.
Enter it on the top line. In this way, a mask pattern for four adjacent pixels on the binary image is constructed, and a continuation code is output from the continuation code generation circuit 31. The continuance codes are generated sequentially from left to right as shown in FIG.

コントロール・ロジック回路32は、コンティメン1−
・コード発生回路31よりコンティメント・コードを入
力し、これを領域番号付は回路33およびチェイン・コ
ード発生回路34のデータ・メモリ343に与える。領
域番号付は回路33は入力したコンティメント・コード
に基づき対象物の領域ごとの領域番号を定める回路で、
マスク・パターンの枠aと枠すとの領域番号をチェイン
・コード発生回路340番号バッファ回路341に出力
する。番号バッファ回路341は領域番号の枠aと枠す
とを区別して一時記憶している。チェイン・コードQ生
回路34の番号セレクタ回路342ばコントロール・ロ
ジック回路からのコンティメント・コードを入力し、第
1表に示す規則に従って番号へソファ回路341の枠a
または枠すの領域番号を選択し、チェイン・コート発生
回路34のデータ・メモリ343に出力する。
The control logic circuit 32 includes the contimen 1-
- Input a continuation code from the code generation circuit 31 and apply it to the area numbered circuit 33 and the data memory 343 of the chain code generation circuit 34. The area numbering circuit 33 is a circuit that determines the area number for each area of the object based on the input continuation code.
The area numbers of frame a and frame a of the mask pattern are output to the chain code generation circuit 340 and the number buffer circuit 341. The number buffer circuit 341 temporarily stores the area numbers in frame a and frame 3 while distinguishing between them. The number selector circuit 342 of the chain code Q raw circuit 34 inputs the continuation code from the control logic circuit and selects the number in the frame a of the sofa circuit 341 according to the rules shown in Table 1.
Alternatively, the area number of the frame is selected and outputted to the data memory 343 of the chain code generation circuit 34.

一方、チェイン・コード発生回路34のコンティメント
・コード・カウンタ345は、コントロール・ロジック
回路32から与えられる輪郭上のマスク・パターンの検
出ごとに出力する信号により力つント・アンプされる。
On the other hand, the continuation code counter 345 of the chain code generation circuit 34 is amplified by a signal output from the control logic circuit 32 each time a mask pattern on the contour is detected.

この際に、番号0および15のコンティメント・コード
は輪郭上の点を表わさないので、データ・メモリ343
にこれらのコードが格納されないようにコンティメン1
−・コード・カウンタのアドレス信号が制御される。こ
のコンティメント・コード・カウンタ345の出力信号
にアドレスされて、データ・メモリ343にはコントロ
ール・ロジック回路32の出力であるコンティメント・
コードと番号セレクタ回路342の出力であるマスク・
パターンの枠aまたば枠すの領域番号とが記憶される。
At this time, since the continuation codes numbered 0 and 15 do not represent points on the contour, they are stored in the data memory 343.
To prevent these codes from being stored in Contime 1
- The address signal of the code counter is controlled. Addressed by the output signal of the continuation code counter 345, the data memory 343 stores the continuation code which is the output of the control logic circuit 32.
The mask signal which is the output of the code and number selector circuit 342
The frame a of the pattern or the area number of the frame is stored.

この記憶の状態は第2表に示されている。例を挙げて説
明すると、第6図に示す対象物の輪郭上の05でのマス
ク・パターンはコンティメント・コードI2に対応し、
第1表に示すように枠aと枠すの選択は行われない。ま
た、輪郭上のflでのマスク・パターンはコンテイメン
ト・コード9に対応し、第2表に示すように枠aが選択
されこの枠aの領域は「2」である。1画面を走査した
後、データ・メモリ343に記憶されている領域番号お
よびコンティメント・コードは並べ換えプロセッサ34
4により読み出される。
The state of this memory is shown in Table 2. To explain with an example, the mask pattern at 05 on the outline of the object shown in FIG. 6 corresponds to the continuation code I2,
As shown in Table 1, the selection between frame a and frame a is not made. Further, the mask pattern at fl on the outline corresponds to containment code 9, and as shown in Table 2, frame a is selected and the area of this frame a is "2". After scanning one screen, the area number and continuation code stored in the data memory 343 are transferred to the reordering processor 34.
4.

次に、並べ換えプロセッサ344の動作を説明する。Next, the operation of the reordering processor 344 will be explained.

まず、第9図に示すように、並べ換え過程は大別すると
コンティメント・コードを領域番号ごとに左下側コード
と右上側コードとに分類される第一の過程と、コンティ
メント・コートが時計まわりに並べかえられ、チェイン
・コードに変換される第二の過程とからなる。
First, as shown in Figure 9, the rearranging process can be roughly divided into the first process, in which the continuance codes are classified into the lower left code and the upper right code by area number, and the first process, in which the contiment codes are sorted clockwise. and a second process in which the codes are rearranged into chain codes and converted into chain codes.

まず、第一の過程を第10図に基づき詳細に説明すると
、並べ換えプロセンサ344はデータ・メモリ343に
格納されているコンティメント・コードを読み込み、こ
れを、各領域番号ごとに左下側コードと右上側コードと
に分ける。
First, the first process will be explained in detail based on FIG. Separate into side code.

この分類は次に述べる方法に従う。すなわち、領域番号
が選択されない場合は、上に凸の形状を示す玲凹点ペア
が現われたときには、それらのコンティメント・コート
は新しい領域番号に属すると判断する。上に凸の形状を
示す彎曲点ベアが現われない場合は、コンティメント・
コードが番号8であれば、それ以後のコンテイメント・
コードを順に關べ、最初に現われるコンティメント・コ
ード番号13の属する領域番号をもって、その所属する
領域番号とする。コンティメント・コードが番号4また
は番号12であれば、これにより前のコンティメント・
コードを順に調べ、最初に現われるコンティメント・コ
ード番号14の属する領域番号をもってその所属する領
域番号とする。また、Uシェープの形状の彎曲点ペアが
現われた時は、後に統合するため、両端のマスク・パタ
ーンに対応する番号14と13のコンティメント・コー
ドを記1、シシ、また、「1シエープの形状の彎曲点ペ
アが現われた時は、ここでこの彎曲点ペアが1組増えた
と判断し、また、画面の同一行に現われる同一領域のコ
ンティメント・コードの内、最初の左(111コードと
最後の右側コードをペアとして、これらの間に現われる
四面点ペアは別の領域番号に属するものと判断する。第
8図に示した例の場合、輪廓上の黒丸印で示した部分8
5上のコンティメント・コードは領域番号12′」の左
下側コードに所属し、輪廓線に沿って実線の付されてい
る86上のコンティメント・コードは領域番号「2′」
の右上側コードに所属するものと判断する。
This classification follows the method described below. That is, when no region number is selected, when a pair of concave and concave points that exhibit an upwardly convex shape appears, it is determined that those continuance coats belong to a new region number. If a curved point bear with an upwardly convex shape does not appear, the continuation
If the code is number 8, subsequent containment
The codes are read in order, and the area number to which the first continuation code number 13 belongs is determined as the area number to which it belongs. If the continuance code is number 4 or number 12, this
The codes are checked in order, and the area number to which the first continuation code number 14 belongs is determined as the area number to which it belongs. Also, when a U-shaped curved point pair appears, write the continuation codes numbered 14 and 13 corresponding to the mask patterns at both ends for later integration. When a curved point pair of a shape appears, it is determined that the number of curved point pairs has increased by one, and the first left (111 code and The last right-hand code is considered as a pair, and the four-sided point pairs that appear between these are judged to belong to another area number.In the example shown in Figure 8, the part 8 indicated by the black circle on the circle
The continuation code above 5 belongs to the lower left code of area number 12', and the continuation code above 86, which is marked with a solid line along the contour line, belongs to area number 2'.
It is judged that it belongs to the upper right side code.

第8図に示した例の場合、+*廓85上黒丸印で示した
部分85上のコンティメント・コードは領域番号「2′
」の左下側コードに所属し、輪廓線に沿って実線の付さ
れている86上のコンティメント・コートは領域番号「
2′」の右側コードに所属するものと判断する。
In the case of the example shown in FIG. 8, the continuation code on the part 85 indicated by the black circle above the +
The continuance court above 86, which belongs to the lower left code of `` and is marked with a solid line along the demarcation line, has area number ``
It is determined that it belongs to the right-hand code of "2'".

このようにして、第2表のコンティメント・コードは、
上記の判断により第3表に示すテーブル上に分類される
In this way, the continuation code in Table 2 is
Based on the above judgment, the items are classified into the table shown in Table 3.

次に、第二の過程を第11図に基づき説明すると、Uシ
ェープの彎曲点およびnシェープの彎曲点を示すコンテ
ィメント・コードが出現するまでは、領域番号最小のテ
ーブルの右側コードを順にチェイン・コードに変換する
。次に、Uシェープの彎曲点を示すコンティメント・コ
ードが出現すれば、このUシェーブの彎曲点ベアの左側
コードを逆に並べ換えてチェイン・コードに変換し、さ
らに、このUシェーブの彎曲点ベアの相手の右側コート
をチェイン・コードに変換した後ひきつづき、領域番号
最小のテーブルの右側コードを順にチェイン・コードに
変換し続ける。
Next, to explain the second process based on FIG. 11, the codes on the right side of the table with the smallest area number are chained in order until a continuation code indicating a U-shape curvature point and an N-shape curvature point appears.・Convert to code. Next, when a continuation code indicating a bending point of the U shape appears, the left side code of the bending point bear of this U shape is reversely rearranged and converted into a chain code. After converting the opponent's right court into a chain code, continue converting the right side code of the table with the smallest area number into a chain code in order.

次に、「1シエープの彎曲点を示すコンティメント・コ
ードが出現すれば、この自シェープの彎曲点ペアの右側
コードを順次チェイン・コードに変換し、さらに、この
nシェープベアをなす彎曲点ペアの相手の左側コードを
逆に並べ換えてチェイン・コードに変換した後ひきつづ
き、右側コードの変換が終了するまで領域番号最小のテ
ーブルの右側コードを順にチェイン・コードに変換し続
ける。この右側コートの変換の終了後に左側コードを逆
順に並べ換えてチェイン・コードに変換してこの過程は
終了する。
Next, if a continuation code indicating a curved point of the 1-shape appears, the right-hand code of the curved point pair of this own shape is sequentially converted to a chain code, and then the curved point pair of this n-shape bear is After rearranging the opponent's left-hand code and converting it into a chain code, continue converting the right-hand code of the table with the smallest area number into a chain code in order until the conversion of the right-hand code is completed. After the process is finished, the left-hand code is rearranged in reverse order and converted into a chain code.

第3表に示すテーブル上のコンテイメント・コート−は
、このような並べ換えの結果、第4表に示すテーブル上
のチェイン・コードに変換される。
As a result of such rearrangement, the containment code on the table shown in Table 3 is converted into the chain code on the table shown in Table 4.

次に、コンテイメント・コードをデータ・メモリ343
に記憶する時に、左下側か右上側かの情報も同時に記憶
させ、並べ換えプロセツサ344の負担を軽減して並べ
換え過程を高速化することもできる。
Next, the containment code is stored in the data memory 343.
When storing information on the lower left side or the upper right side, it is also possible to simultaneously store information on the lower left side or the upper right side, thereby reducing the load on the rearrangement processor 344 and speeding up the rearrangement process.

〔利用形態〕[Usage form]

(1)二値画像の再生および輪郭点座標の計算第14図
に示すXY座標データ・メモリ32を第3図に示す回路
に付加することにより、画像再生および座標計算を行う
ことができる。すなわち、このXY座標データ・メモリ
は、コントロール・ロジック回路より上の凸の彎曲点ペ
アが現われた時に、番号8のコンティメント・コードを
示す輪郭上の点の座標を記憶する回路である。この座標
の示す点は対象物の輪郭を一周するチェイン・コードを
作成する際の始点を示すもので、この点の座標とチェイ
ン・コードとを用いて、もとの二値画像が再生できる。
(1) Binary image reproduction and contour point coordinate calculation By adding the XY coordinate data memory 32 shown in FIG. 14 to the circuit shown in FIG. 3, image reproduction and coordinate calculation can be performed. That is, this XY coordinate data memory is a circuit that stores the coordinates of a point on the contour indicating the continuation code number 8 when a convex curved point pair above the control logic circuit appears. The point indicated by these coordinates indicates the starting point for creating a chain code that goes around the outline of the object, and the original binary image can be reproduced using the coordinates of this point and the chain code.

また、各輪郭点の座標の計算も行うことができる。It is also possible to calculate the coordinates of each contour point.

(2)極座標方式による輪郭形状の表現第15図および
第16図に基づき説明する。
(2) Expression of contour shape using polar coordinate system This will be explained based on FIGS. 15 and 16.

第15図は対象物の輪郭130と対象物上の定点131
例えば重心の座標(Xc、Yc)および始点132の座
標(、Xo 、Yo )および定点131を原点とし、
定点131と始点132とを結ぶ線を極座標の基準線と
し、対象物の輪郭上を極座標を示ずベクトル135が移
動してゆく状態を示すものである。
Figure 15 shows the outline 130 of the object and a fixed point 131 on the object.
For example, with the coordinates of the center of gravity (Xc, Yc), the coordinates of the starting point 132 (, Xo, Yo), and the fixed point 131 as the origin,
A line connecting a fixed point 131 and a starting point 132 is used as a reference line for polar coordinates, and this shows a state in which a vector 135 moves along the outline of an object without showing polar coordinates.

第16図の横軸は輪郭点の順序番号または基準線となず
ベクトル1♀5の偏移角134を示し、縦軸はへクトル
135の長さずなわち重心135から輪郭130上の点
までの距p3IIを示す。図は始点132を原点として
画かれている。
The horizontal axis in FIG. 16 indicates the sequence number of the contour point or the reference line and the deviation angle 134 of the vector 1♀5, and the vertical axis indicates the length of the hector 135, that is, the point on the contour 130 from the center of gravity 135. The distance p3II is shown. The figure is drawn with the starting point 132 as the origin.

この方法によっても輪郭形状情報を表現することができ
るが、このときにチェイン・コードを利用すると、定点
からの輪郭上の点との距離R4の計算を容易に行うこと
ができる。
Contour shape information can also be expressed using this method, but if a chain code is used at this time, the distance R4 from a fixed point to a point on the contour can be easily calculated.

すなわち、任意の輪郭上の点の座標を(Xl。That is, the coordinates of a point on any contour are (Xl.

Yi)とし、始点と定点間の距離をRoとすればRO’
 −(Xo Xc)’ + (Yo −Yc) 2 でまり、以下、隣接する輪郭上の点の座標の変化は、そ
れぞれ下記のようにチェイン・コードに対応する。すな
わら、 X座標の「+1」の変化は番号l、2.8のチェイン・
コードの出現に対応し、したがっ°ζRi 2 − (
lマ 、−1) 2 +2 (Xi −Xc) +1 Xi標の「−1」の変化は、番号5.4.6のチェイン
・コードの出現に対応し、したがってRi 2= (R
1−1) 2 +2 (−Xi−Xc)+I Y座標の「+1」の変化は、番号3.4.12のチェイ
ン・コードの出現に対応し、したがってR42−(RH
−x ) 2 +2 (Yi −Yc) +1 また、Y座標の1−1」の変化ば、番号7.8.6のチ
ェイン・コードの出現に対応し、したがって Ri 2− (RH−1) 2 +2 (−Yi −Yc) +1 により、輪郭上の点と定点との距離をめることができる
Yi), and if the distance between the starting point and the fixed point is Ro, then RO'
−(Xo In other words, a change of "+1" in the X coordinate is the chain number l, 2.8.
Corresponding to the occurrence of the code, therefore °ζRi 2 − (
l ma , -1) 2 +2 (Xi -
1-1) 2 +2 (-Xi-Xc)+I A change of "+1" in the Y coordinate corresponds to the appearance of the chain code number 3.4.12, thus R42-(RH
-x ) 2 +2 (Yi -Yc) +1 Also, a change of 1-1'' in the Y coordinate corresponds to the appearance of the chain code numbered 7.8.6, thus Ri 2- (RH-1) 2 +2 (-Yi -Yc) +1 allows the distance between the point on the contour and the fixed point to be set.

(3)面積および周長の計算 対象物の面積の算出は、上記(1)の方法によりまる輪
郭点の座標に基づき、その輪郭点が右側コードに属する
か左側コードにIiするかを判別し、右側コードに属す
るときは加算し、左側コードに属するときは減算を行っ
て輪郭を一周することにより行うことができる。この場
合、座標は始点を原点とする座標であってもよい。
(3) Calculation of area and circumference Calculation of the area of the object is based on the coordinates of the contour point determined by the method (1) above, and it is determined whether the contour point belongs to the right-hand code or the left-hand code. This can be done by going around the contour by adding when it belongs to the right-hand code and subtracting when it belongs to the left-hand code. In this case, the coordinates may be coordinates with the starting point as the origin.

また、周長の算出は、−行のラスター・スキャンにて得
られる一連のマスク・パターンにて、コンティメント・
コードが番号1.2.4.7.8.11.13.14の
場合「JV2」として計測し、コンティメント・コード
が番号3.6.9.12の場合「1」として計測するこ
とによって行うことができる。
In addition, the circumference can be calculated using a series of mask patterns obtained by raster scanning the - line.
If the code is number 1.2.4.7.8.11.13.14, it will be measured as "JV2" and if the continuation code is number 3.6.9.12, it will be measured as "1". It can be carried out.

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

本発明は、ラスター・スキャンにより二値画像の輪郭形
状に対応するチェイン・コードが生成できるので、従来
の輪郭追跡法による輪郭形状計測に比べて簡単なハード
ウェアにてリアルタイム処理を行うことができる。
Since the present invention can generate a chain code corresponding to the contour shape of a binary image by raster scanning, real-time processing can be performed with simpler hardware than contour shape measurement using the conventional contour tracking method. .

また、二値画像を一次元データに変換しているのでデー
タ圧縮が行われ、したがって信号の伝送および記憶に便
利である。
Also, since the binary image is converted into one-dimensional data, data compression is performed, and therefore it is convenient for signal transmission and storage.

さらに、対象物の形状情報として面積、周長のばかに、
外周の凹凸情報も得られ、パターン認識のときの外形形
状の識別に便利である。
Furthermore, as shape information of the object, we can use
Information on the unevenness of the outer periphery can also be obtained, which is useful for identifying the outer shape during pattern recognition.

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

第1図は輪郭追跡法を説明する構成図。 第2図はチェイン・コードを説明する図。 第3図は本発明の実施例回路の構成を示すブロック構成
図。 第4図は2×2マスク・パターンの枠名称の説明図。 第5図は画像の領域番号を示す説明図。 第6図は輪郭のコンティメント・コード発生状態を示す
図。 第7図は特定のラスター走査によるコンティメント・コ
ードの発生状態を示す図。 第8図は輪郭の領域番号を示す説明図。 第9図〜第11図は並べ換えプロセッサの動作を説明す
る論理流れ図。 第12図は信号の対照図。 第13図は彎曲点ペアの説明図。 第14図はXYli標デー少データリと人出力の接続を
示す圓。 第15図および第16図は極座標方式による輪郭形状表
現の説明図。 11・・・走査線、12.130・・・対象物輪郭、3
0・・・画像信号入力端子、31・・・コンティメント
・コード発生回路、32・・・コントロール・ロジック
回路、33・・・領域番号付は回路、34・・・チェイ
ン・コード発生回路、35・・・タイミング発生回路、
50・・・画面、52・・・対象物の輪郭、53・・・
対象物領域切断線、90・・・座標データメモリ、91
・・・X座標信号入力端子、92・・・Y座標信号入力
端子、131・・・定点、132・・・始点、133・
・・領域番号上の任意点、134・・・偏位角、135
・・・極IJE I票ベクトル、311・・・ワンライ
ン・メモリ、312・・・2×2マスク回路、341・
・・番号バッファ回路、342・・・番号セレクク回路
、343・・・データ・メモリ、344・・・並べ換え
プロセッサ、345・・・コンティメント・コード・カ
ウンタ。 特許出願人 横河北辰電機株式会社 代理人 弁理士 井 出 直 孝  20 第 3 図 M 4 ’2 箔 5 図 篤 7 図 兜 8 図 yl 9 図 M2O口 第1111fi ¥EJ12霞 箔 13図
FIG. 1 is a block diagram illustrating the contour tracking method. FIG. 2 is a diagram explaining a chain code. FIG. 3 is a block configuration diagram showing the configuration of a circuit according to an embodiment of the present invention. FIG. 4 is an explanatory diagram of frame names of a 2×2 mask pattern. FIG. 5 is an explanatory diagram showing area numbers of images. FIG. 6 is a diagram showing the state of generation of contour continuance codes. FIG. 7 is a diagram showing how continuance codes are generated by a specific raster scan. FIG. 8 is an explanatory diagram showing area numbers of contours. 9-11 are logic flow diagrams illustrating the operation of the reordering processor. FIG. 12 is a comparison diagram of signals. FIG. 13 is an explanatory diagram of curved point pairs. FIG. 14 is a circle showing the connection between XYli standard data and human output. FIG. 15 and FIG. 16 are explanatory diagrams of contour shape expression using the polar coordinate system. 11...Scanning line, 12.130...Object outline, 3
0... Image signal input terminal, 31... Containment code generation circuit, 32... Control logic circuit, 33... Area numbered circuits, 34... Chain code generation circuit, 35 ...timing generation circuit,
50... Screen, 52... Outline of object, 53...
Object area cutting line, 90...Coordinate data memory, 91
...X coordinate signal input terminal, 92...Y coordinate signal input terminal, 131...Fixed point, 132...Starting point, 133...
...Arbitrary point on area number, 134...Deflection angle, 135
... Extreme IJE I vote vector, 311... One line memory, 312... 2x2 mask circuit, 341...
... Number buffer circuit, 342 ... Number select circuit, 343 ... Data memory, 344 ... Reorder processor, 345 ... Continuation code counter. Patent Applicant Yokogawa Hokushin Electric Co., Ltd. Agent Patent Attorney Naotaka Ide 20 No. 3 Figure M 4 '2 Foil 5 Atsushi Zu 7 Kabuto 8 Figure yl 9 Figure M2O Exit No. 1111fi ¥EJ12 Kasumi Foil Figure 13

Claims (1)

【特許請求の範囲】[Claims] (1)水平同期および垂直同期にしたがって平面走査さ
れた2値画像が入力する入力端子と、この端子の信号が
表わす各画素に画素領域毎の番号付けを行う回路と、 上記入力端子に入力する信号が表わす画面の隣接する4
個の画素についてコンテイメント・コードを発生する回
路と、 各画素毎に上記画素領域の番号およびその画素の上記コ
ンテイメント・コードを一組として記憶する記憶回路と
、 この記憶回路に接続されこの記憶回路の記憶内容のアド
レス並べ換えを行うブロモ・ノサとを備え、 このプロセッサは、上記記憶回路の記憶内容の読出し順
序が上記画像領域の輪郭を一周するチェイン・コードと
同等になるようにアドレス並べ換えを行うことを特徴と
する輪郭形状情報抽出回路。
(1) An input terminal into which a binary image plane-scanned according to horizontal synchronization and vertical synchronization is input, and a circuit that numbers each pixel represented by the signal of this terminal for each pixel area; Adjacent 4 of the screen represented by the signal
a circuit that generates a containment code for each pixel; a memory circuit that stores the pixel area number and the containment code of that pixel as a set for each pixel; The processor rearranges the addresses of the memory contents of the circuit so that the readout order of the memory contents of the memory circuit is equivalent to a chain code that goes around the outline of the image area. A contour shape information extraction circuit characterized by:
JP58182589A 1983-09-30 1983-09-30 Extracting circuit of contour shape information Granted JPS6074092A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58182589A JPS6074092A (en) 1983-09-30 1983-09-30 Extracting circuit of contour shape information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58182589A JPS6074092A (en) 1983-09-30 1983-09-30 Extracting circuit of contour shape information

Publications (2)

Publication Number Publication Date
JPS6074092A true JPS6074092A (en) 1985-04-26
JPH0148587B2 JPH0148587B2 (en) 1989-10-19

Family

ID=16120930

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58182589A Granted JPS6074092A (en) 1983-09-30 1983-09-30 Extracting circuit of contour shape information

Country Status (1)

Country Link
JP (1) JPS6074092A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62145384A (en) * 1985-12-20 1987-06-29 Dainippon Printing Co Ltd Outline sampling method
JPS63204376A (en) * 1987-02-20 1988-08-24 Hitachi Ltd Contour tracing method
JPH0535872A (en) * 1991-07-31 1993-02-12 Victor Co Of Japan Ltd Contour tracing system for binary image

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62145384A (en) * 1985-12-20 1987-06-29 Dainippon Printing Co Ltd Outline sampling method
JPS63204376A (en) * 1987-02-20 1988-08-24 Hitachi Ltd Contour tracing method
JPH0535872A (en) * 1991-07-31 1993-02-12 Victor Co Of Japan Ltd Contour tracing system for binary image

Also Published As

Publication number Publication date
JPH0148587B2 (en) 1989-10-19

Similar Documents

Publication Publication Date Title
US4817187A (en) Apparatus and method for vectorization of incoming scanned image data
US5222158A (en) Pattern recognition apparatus
JPS6074092A (en) Extracting circuit of contour shape information
JP2702408B2 (en) Image conversion system
US4926266A (en) Method of decoding in run representation
JP2676116B2 (en) Image data processing method and apparatus
JPS6074093A (en) Extracting circuit of contour shape information
JP2993007B2 (en) Image area identification device
JP2862498B2 (en) Image processing method
JPH03269773A (en) Picture element/vector converter and converting method
JP2839578B2 (en) Image data input processing device
JP2917461B2 (en) Pattern recognition device
EP0428624A4 (en) Intelligent scan image processor
KR930004645B1 (en) Apparatus for encoding image signal
JPS61125293A (en) Mosaic coding device
JPH01180069A (en) Device for extracting image feature
JPH01245366A (en) Labeling processing system
JPH02159690A (en) Device for deciding character/pattern area
JPS6085677A (en) Picture position converter
JPS6269387A (en) Method for extracting contour line of picture
JPS6086683A (en) Logical filter for processing of multilevel picture data
JPS6361383A (en) Painting-out graphic drawing method
JPH03268088A (en) General evaluation circuit
JPH04113478A (en) Contour picture element extracting system
JPH01219961A (en) Coordinate transforming method for image