JPH0762873B2 - Contour tracking device - Google Patents

Contour tracking device

Info

Publication number
JPH0762873B2
JPH0762873B2 JP59160841A JP16084184A JPH0762873B2 JP H0762873 B2 JPH0762873 B2 JP H0762873B2 JP 59160841 A JP59160841 A JP 59160841A JP 16084184 A JP16084184 A JP 16084184A JP H0762873 B2 JPH0762873 B2 JP H0762873B2
Authority
JP
Japan
Prior art keywords
pixel
contour
tracking
pixel data
pattern
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.)
Expired - Lifetime
Application number
JP59160841A
Other languages
Japanese (ja)
Other versions
JPS6136879A (en
Inventor
俊道 政木
敦司 久野
和彦 坂
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.)
Omron Corp
Original Assignee
Omron 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 Omron Corp filed Critical Omron Corp
Priority to JP59160841A priority Critical patent/JPH0762873B2/en
Publication of JPS6136879A publication Critical patent/JPS6136879A/en
Publication of JPH0762873B2 publication Critical patent/JPH0762873B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Character Discrimination (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 <発明の技術分野> 本発明は、文字、図形等の画像入力を白黒2値化して入
力パターンを求め、この入力パターンを標準パターンと
照合して、未知文字等を認識するパターン認識技術に関
連し、殊に本発明は、前記パターン照合の前処理段階等
において、入力パターンの輪郭を高速度で追跡する輪郭
追跡装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Technical Field of the Invention According to the present invention, an input pattern is obtained by binarizing an image input of characters, figures, etc. in black and white, and the input pattern is collated with a standard pattern to detect unknown characters and the like. The present invention relates to a pattern recognition technique for recognition, and more particularly, the present invention relates to a contour tracking device for tracking the contour of an input pattern at a high speed in the preprocessing stage of the pattern matching.

<発明の背景> 従来のこの種装置は、第13図に示す如く、文字、図形等
をCCD(Charged−Coupled Device)より成るカメラ51に
て画像化し、この画像入力を2値化回路52で白黒2値化
して入力パターンを求め、この入力パターンを画像メモ
リ53へ格納した後、画像メモリ53中の入力パターンにつ
き、輪郭追跡回路54を動作させて、輪郭線の追跡処理を
実行している。この輪郭追跡処理は、画像メモリ53上に
第14図に示すマスク55を設定してこれを所定方向(図
中、矢印で示す)へ走査し、各画素につきその画素デー
タSおよびその周囲4方向近傍の各画素の画素データS0
〜S3をチエツクし、そのデータ構成に基づき追跡開始点
Aを求めた後、入力パターンの輪郭黒画素を所定方向へ
順次追跡してゆく。
<Background of the Invention> As shown in FIG. 13, a conventional device of this type uses a camera 51 composed of a CCD (Charged-Coupled Device) to image characters, figures and the like, and a binarization circuit 52 inputs this image input. After black-and-white binarization to obtain an input pattern and store this input pattern in the image memory 53, the contour tracing circuit 54 is operated for the input pattern in the image memory 53 to perform contour line tracing processing. . In this contour tracking processing, a mask 55 shown in FIG. 14 is set on the image memory 53, and the mask 55 is scanned in a predetermined direction (indicated by an arrow in the drawing), and the pixel data S for each pixel and the surrounding four directions are set. Pixel data S 0 of each neighboring pixel
After checking S 3 to find the tracking start point A based on the data structure, the contour black pixels of the input pattern are sequentially tracked in a predetermined direction.

第15図は第14図のパターン部分56を拡大して示してあ
る。同図において、今輪郭黒画素B0からつぎの輪郭黒画
素Bが追跡された段階を想定すると、つぎに続く輪郭黒
画素は、まず追跡方向に対し左手90度に位置する画素B6
につきデータ内容がチエツクされ、これに続いて画素
B5,B4,B3の順で次々にデータ内容がチエツクされる。そ
の結果、黒画素データ「1」をもつ画素B3が検出される
と、これをつぎの輪郭黒画素と定め、更に同様の輪郭追
跡処理を繰返し実行するものである。従つて上記の例に
おいては、輪郭黒画素B3を検出するのに、合計4画素ア
クセスすることが必要となる。
FIG. 15 is an enlarged view of the pattern portion 56 shown in FIG. In the figure, assuming that the next contour black pixel B has been traced from the contour black pixel B 0 , the next contour black pixel is the pixel B 6 located 90 degrees to the left in the tracking direction.
The data content is checked per
The data contents are checked one after another in the order of B 5 , B 4 and B 3 . As a result, when the pixel B 3 having the black pixel data "1" is detected, this is defined as contour black pixels next, and executes repeatedly further similar contour tracing processing. Therefore, in the above example, in order to detect the contour black pixel B 3 , it is necessary to access a total of 4 pixels.

かくしてこの従来方式によれば、追跡開始点を検出する
のに、マスクの各走査位置毎に5画素アクセスし、更に
隣接する輪郭黒画素を検出するのに、平均4画素(最大
8画素、最小1画素)アクセスする必要があり、輪郭追
跡の処理時間が著しく長くなり、これがパターン認識効
率を低下させる原因となつている。
Thus, according to this conventional method, 5 pixels are accessed for each scanning position of the mask in order to detect the tracking start point, and 4 pixels in average (maximum 8 pixels, minimum in order to detect adjacent black contour pixels). One pixel) must be accessed, and the processing time for contour tracking becomes extremely long, which causes the pattern recognition efficiency to decrease.

<発明の目的> 本発明は、入力パターンの輪郭追跡を高速化した輪郭追
跡装置を提供し、もつて輪郭追跡処理時間の短縮、更に
はパターン認識効率の向上をはかることを目的とする。
<Object of the Invention> An object of the present invention is to provide a contour tracking device which speeds up the contour tracking of an input pattern, thereby shortening the contour tracking processing time and further improving the pattern recognition efficiency.

<発明の構成および効果> 上記目的を達成するため、本発明の輪郭追跡装置では、
画像入力を白黒2値化して入力パターンを得る2値化手
段と、前記2値化手段で得られた入力パターンの各構成
画素につき近傍の画素との間で合法パターンを形成する
か否かを判別し、合法パターンを形成しない画素をノイ
ズとみなして白黒反転させることにより入力パターンよ
りノイズを除去するノイズ除去手段と、前記ノイズ除去
手段によるノイズ除去後の入力パターンを各構成画素に
つきその画素データおよびその周囲各方向近傍の各画素
の画素データを抽出する画素データ抽出手段と、前記画
素データ抽出手段で抽出された各構成画素の画素データ
およびその周囲各方向近傍の各画素の画素データに基づ
き入力パターンにおける輪郭画素を検出すると共に、前
記輪郭画素を中心に右回りまたは左回りの方向を見て行
って初めて出くわした入力パターンの構成画素をつぎの
輪郭画素として、この輪郭画素位置までの縦横各方向の
変位を求める変位生成手段と、各輪郭画素に対応して前
記変位生成手段で求められた縦横各方向の変位を順次格
納してつぎの輪郭画素への相対変位を各画素のデータと
して含む画像を生成する画像生成手段と、前記画像生成
手段により生成された画像の輪郭追跡開始点を検出する
追跡開始点検出手段と、前記追跡開始点検出手段で得ら
れた輪郭追跡開始点の画素位置とその画素について求め
られた前記相対変位とから隣接するつぎの輪郭画素位置
を算出し、以後次々と画素位置と前記相対変位とから隣
接するつぎの輪郭画素位置を算出して輪郭画素を追跡す
る輪郭追跡手段とを具備させている。
<Structure and Effect of the Invention> In order to achieve the above object, the contour tracking device of the present invention is
Whether to form a legal pattern between the binarizing means for binarizing the image input to obtain the input pattern and the neighboring pixels for each of the constituent pixels of the input pattern obtained by the binarizing means. Pixel data for each constituent pixel for which noise is removed from the input pattern by recognizing pixels that do not form a legal pattern as noise and inverting them in black and white to remove noise from the input pattern And pixel data extracting means for extracting pixel data of each pixel in the vicinity of each direction around the pixel data, and based on the pixel data of each constituent pixel extracted by the pixel data extracting means and the pixel data of each pixel in the vicinity of each direction around the pixel data. Only when the contour pixels in the input pattern are detected and the clockwise or counterclockwise direction is centered on the contour pixels, the contour pixels are encountered. Using the constituent pixels of the input pattern as the next contour pixel, the displacement generating means for obtaining the displacement in the vertical and horizontal directions to the contour pixel position, and the vertical and horizontal directions for the respective contour pixels obtained by the displacement generating means. Image generation means for sequentially storing displacements and generating an image including relative displacement to the next contour pixel as data of each pixel, and tracking start inspection for detecting a contour tracking start point of the image generated by the image generation means The next adjacent contour pixel position is calculated from the output means, the pixel position of the contour tracking start point obtained by the tracking start point detection means, and the relative displacement obtained for that pixel, and the pixel position is calculated one after another. Contour tracking means for tracking the contour pixel by calculating the position of the next adjacent contour pixel from the relative displacement is provided.

本発明によれば、画像生成手段で得られた画像につい
て、各画素の相対変位に関するデータをチェックするだ
けでつぎの輪郭画素位置を簡単に算出できるので、輪郭
画素を追跡するのにその都度1回アクセスすれば足り、
従来方式に比較して、輪郭追跡の処理時間を大幅に短縮
でき、パターン認識の効率向上に貢献する。またノイズ
除去手段により入力パターンよりノイズを除去した後、
ノイズ除去後の入力パターンについて以下の処理を行う
ようにしたから、変位の生成に際し、つぎの輪郭画素を
一意に定めることができる等、発明目的を達成した顕著
な効果を奏する。
According to the present invention, in the image obtained by the image generating means, the next contour pixel position can be easily calculated only by checking the data relating to the relative displacement of each pixel. You only need to access it twice.
Compared with the conventional method, the processing time of contour tracking can be shortened significantly, which contributes to the improvement of pattern recognition efficiency. Also, after removing the noise from the input pattern by the noise removing means,
Since the following processing is performed on the input pattern after noise removal, when the displacement is generated, the next contour pixel can be uniquely determined.

<実施例の説明> 第2図は、本発明にかかる輪郭追跡装置の全体概略構成
を示す。次中、CCDより成るカメラ1は、文字、図形等
を光学的に読み取つて画像入力を得る。2値化回路2は
画像入力信号を所定のスレシユホールドレベルに基づき
2値化し、白黒両画素より成る入力パターンを求める。
第1図(1)は2値化された入力パターン(図中、斜線
部分が黒画素を示す)を図解して示したものであり、こ
の入力パターンは縦横各256ビツトの画素にて構成され
ている。ノイズ除去回路3は、入力パターンに含まれる
ノイズ部分(第1図(1)中、符号n1,n2で示す)を除
去するための回路であり、その結果、第1図(2)に示
す如く、ノイズ除去(破線部)された滑らかな輪郭の入
力パターンを得る。変位生成回路4は、現輪郭黒画素か
らつぎの隣接する輪郭黒画素までの縦横各方向の変位を
生成するための回路であり、各輪郭黒画素に対応してそ
の変位を生成して、画像メモリ5に順次格納してゆく。
第1図(3)は、変位格納画素が連鎖的に連なつて形成
された複合連鎖記号化画像(Hibrid Sequence Marked I
mage;以下「HSM画像」という)をイメージとして図示し
たもので、図中、斜線部分が変位が格納された黒画素、
すなわち変位格納画素である。なお、同図の変位格納画
素で囲まれた白地部分は変位が格納されていない黒画素
である。上記の画像入力、2値化、ノイズ除去、変位の
生成、HSM画像の形成の一連の処理はビデオ信号レート
で実行され、しかる後に、輪郭追跡部6が前記HSM画像
を用いて、入力パターンの輪郭追跡処理を実行する。
<Description of Embodiments> FIG. 2 shows an overall schematic configuration of a contour tracking device according to the present invention. Next, the camera 1 including a CCD optically reads characters, figures and the like to obtain an image input. The binarization circuit 2 binarizes the image input signal on the basis of a predetermined threshold level to obtain an input pattern composed of both black and white pixels.
FIG. 1 (1) is a diagrammatic representation of a binarized input pattern (in the figure, the shaded areas indicate black pixels). This input pattern is composed of 256-bit pixels each in the vertical and horizontal directions. ing. The noise removing circuit 3 is a circuit for removing a noise portion (indicated by reference numerals n 1 and n 2 in FIG. 1 (1)) included in the input pattern. As shown, a noise-removed (broken line portion) input pattern having a smooth contour is obtained. The displacement generating circuit 4 is a circuit for generating displacements in the vertical and horizontal directions from the current contour black pixel to the next adjacent contour black pixel. The displacement generating circuit 4 generates the displacement corresponding to each contour black pixel to generate an image. The data is sequentially stored in the memory 5.
FIG. 1 (3) shows a composite sequence symbolized image (Hibrid Sequence Marked I) formed by connecting displacement storing pixels in a chain.
mage; hereinafter referred to as "HSM image") as an image. In the figure, the shaded area is the black pixel in which the displacement is stored,
That is, it is a displacement storage pixel. The white background portion surrounded by the displacement storing pixels in the figure is a black pixel in which the displacement is not stored. The above-mentioned image input, binarization, noise removal, displacement generation, and HSM image formation are performed at a video signal rate. After that, the contour tracking unit 6 uses the HSM image to input the input pattern. Performs contour tracking processing.

第3図および第4図は、上記ノイズ除去回路3および変
位生成回路4の詳細を示している。
FIGS. 3 and 4 show details of the noise removal circuit 3 and the displacement generation circuit 4.

ノイズ除去回路3は、3段に直列接続された夫々256ビ
ツトのシフトレジスタ7,8,9と、各シフトレジスタ7,8,9
の所定3ビツトの画素データ(N1,N2,N3)(N0,N8,N4
(N7,N6,N5)によつてアドレス指定されるノイズ除去テ
ーブルが格納されたテーブルメモリ10とから構成されて
いる。このノイズ除去テーブルは、中心画素データN8
よびその周囲8方向近傍の画素データN0〜N7(以下、
「周囲画素データ」という)が所定の合法パターンを形
成するか否か、或いはそれ以外のパターン(例えば違法
パターン)を形成するか否かを判別して、中心画素デー
タN8がノイズか否かを識別するためのものである。そし
て中心画素データN8がノイズであるとき、その黒画素デ
ータ「1」を消去すべくテーブルメモリ10より白画素デ
ータ「0」が出力される。尚前記の合法パターンは、中
心画素データN8が黒画素データ「1」であり且つ3個の
周囲画素データN0,N1,N2,またはN2,N3,N4,またはN4,N5,
N6,またはN6,N7,N0が黒画素データ「1」である場合の
パターン構成をいい、また違法パターンは、中心画素デ
ータN8が黒画素データ「1」であつて、周囲画素データ
N0〜N7が前記合法パターンにおけるデータ構成をとらな
い場合のパターン構成をいう。
The noise elimination circuit 3 includes 256-bit shift registers 7, 8 and 9 connected in series in three stages and each shift register 7, 8, 9
3 bit pixel data (N 1 , N 2 , N 3 ) (N 0 , N 8 , N 4 )
And a table memory 10 storing a noise removal table addressed by (N 7 , N 6 , N 5 ). This noise removal table is based on the central pixel data N 8 and the pixel data N 0 to N 7 in the surrounding eight directions (hereinafter,
Whether or not the central pixel data N 8 is noise is determined by determining whether or not "surrounding pixel data" forms a predetermined legal pattern, or forms a pattern other than that (for example, an illegal pattern). Is for identifying. When the central pixel data N 8 is noise, the table pixel 10 outputs white pixel data “0” to erase the black pixel data “1”. In the legal pattern described above, the central pixel data N 8 is black pixel data “1” and three peripheral pixel data N 0 , N 1 , N 2 , or N 2 , N 3 , N 4 , or N 4 , N 5 ,
N 6 or N 6, N 7, N 0 is good pattern configuration in the case of a black pixel data "1", also illegal pattern, the center pixel data N 8 black pixel data "1" Der connexion, ambient Pixel data
The pattern configuration when N 0 to N 7 do not take the data configuration in the legal pattern.

第5図は上記ノイズ除去回路3によるノイズ除去動作の
流れをフローチヤートとして示したものであり、まずス
テツプ31において、シフトレジスタ7,8,9に入力パター
ンの3行に亘る構成画素データがセツトされ、つぎのス
テツプ32で各シフトレジスタの所定ビツトの画素データ
N0〜N8がテーブルメモリ10に入力される。そしてもし中
心画素データN8が白画素データ「0」のとき、ステツプ
33が“NO"であり、テーブルメモリ10から白画素データ
「0」が出力される(ステツプ34)。一方中心画素デー
タN8が黒画素データ「1」のとき、ステツプ33が“YES"
となり、つぎのステツプ35において、中心画素データN8
およびその周囲画素データN0〜N7が合法パターンを構成
するか否かが判別される。その結果、合法パターンであ
るとの判定(ステツプ36が“YES")により、テーブルメ
モリ10から黒画素データ「1」が出力される(ステツプ
37)。一方ステツプ36の「合法パターンか」の判定が
“NO"のとき、テーブルメモリ10からノイズ除去用の白
画素データ「0」が出力される(ステツプ38)。かくて
ステツプ38におけるテーブルメモリ10の出力によつて画
素データが変換され、これにより入力パターンに含まれ
るノイズの除去が実行される(ステツプ39)。尚ステツ
プ31〜39の処理フローは、シフトレジスタ7,8,9のシフ
ト動作と共に、入力パターンの全画素データにつき実行
される。
FIG. 5 is a flow chart showing the flow of the noise removing operation by the noise removing circuit 3. First, in step 31, the shift register 7, 8 and 9 is set to set pixel data of three rows of the input pattern. Then, in the next step 32, pixel data of a predetermined bit of each shift register
N 0 to N 8 are input to the table memory 10. If the central pixel data N 8 is white pixel data “0”, the step
33 is "NO", and white pixel data "0" is output from the table memory 10 (step 34). On the other hand, when the central pixel data N 8 is black pixel data “1”, step 33 is “YES”.
Then, in the next step 35, the central pixel data N 8
And it is determined whether or not the surrounding pixel data N 0 to N 7 form a legal pattern. As a result, when it is determined that the pattern is legal (step 36 is "YES"), black pixel data "1" is output from the table memory 10 (step
37). On the other hand, when the determination of "is it a legal pattern" in step 36 is "NO", the white pixel data "0" for noise removal is output from the table memory 10 (step 38). Thus, the pixel data is converted by the output of the table memory 10 in step 38, and thereby the noise contained in the input pattern is removed (step 39). The processing flow of steps 31 to 39 is executed for all pixel data of the input pattern together with the shift operation of the shift registers 7, 8 and 9.

つぎに変位生成回路4は、上記ノイズ除去回路3と同様
の構成の3段のシフトレジスタ11,12,13と、各シフトレ
ジスタ11,12,13の所定3ビツトの画素データ(D1,D2,
D3)(D0,D8,D4)(D7,D6,D5)によつてアドレス指定さ
れる隣接変位生成テーブルが格納されたテーブルメモリ
14とから構成されている。この隣接変位生成テーブル
は、中心画素データD8および周囲画素データD0〜D7のパ
ターン構成に応じて、第6図に示すデータ構成の8ビツ
トデータを出力する。この8ビツトデータは、前記の中
心画素データD8が黒画素データか否か(第7ビツト
目)、輪郭点であるか否か(第6ビツト目)、輪郭点追
跡済か否か(第5ビツト目)、つぎの輪郭点位置までの
変位dI,dJがどれ程か(第0〜3ビツト目)を示してい
る。上記のうち、変位dIは、第7図に示す如く、ある輪
郭黒画素(図中、*印で示す)に対する画像空間上での
横方向の変位(−1〜+1)を示し、また変位dJは、あ
る輪郭黒画素に対する画像空間上での縦方向の変位(−
1〜+1)を示したものであるが、この場合、その画素
が輪郭黒画素以外のときは変位を示す第0〜3ビツト目
のデータは無視される。また第8図および第9図に示す
ような、両隣りの周囲画素データが白画素データ「0」
であるヒゲ状の黒画素a,bについては、これを無視して
変位dI,dJが生成されている。
Next, the displacement generation circuit 4 has three stages of shift registers 11, 12 and 13 having the same configuration as the noise removal circuit 3 and predetermined 3 bit pixel data (D 1 , D 1) of each shift register 11, 12, 13. 2 ,
D 3) (D 0, D 8, D 4) ( table memory adjacent displacement generated table is stored in which D 7, D 6, D 5 ) to be Yotsute addressed
It is composed of 14 and. The adjacent displacement generation table outputs 8-bit data having the data structure shown in FIG. 6 according to the pattern structure of the central pixel data D 8 and the surrounding pixel data D 0 to D 7 . The 8-bit data is whether or not the central pixel data D 8 is black pixel data (7th bit), whether or not it is a contour point (6th bit), and whether or not contour point tracking has been completed ( (5th bit), the displacements d I and d J to the next contour point position are shown (0th to 3rd bits). Of the above, the displacement d I indicates a lateral displacement (-1 to +1) in the image space with respect to a certain contour black pixel (indicated by * in the figure) as shown in FIG. d J is the vertical displacement in the image space with respect to a certain contour black pixel (−
1 to +1), in this case, if the pixel is other than the contour black pixel, the 0th to 3rd bit data indicating the displacement are ignored. Further, as shown in FIGS. 8 and 9, the neighboring pixel data on both sides are white pixel data “0”.
For the mustache-shaped black pixels a and b, the displacements d I and d J are generated by ignoring them.

尚、中心の画素が輪郭黒画素であるための必要十分条件
は、中心画素データD8が黒画素データ「1」であり且つ
周囲画素データD0,D2,D4,D6のいずれもが白画素データ
「0」若しくは黒画素データ「1」でない場合をいい、
従つて前記テーブルメモリ14の出力データの第6ビツト
目は、画素データD0〜D8がこの条件を充足するか否かに
よつてそのデータ内容が設定される。
The necessary and sufficient condition for the central pixel to be a contour black pixel is that the central pixel data D 8 is black pixel data “1” and all of the surrounding pixel data D 0 , D 2 , D 4 , D 6 are present. Is not white pixel data “0” or black pixel data “1”,
Therefore, the sixth bit of the output data of the table memory 14 has its data content set depending on whether or not the pixel data D 0 to D 8 satisfy this condition.

上記テーブルメモリ14の出力データは、画像メモリ5に
順次格納され、その結果、画像メモリ5には第1図
(3)に示すイメージのHSM画像が生成される。このHSM
画像は、黒画素データの対象領域を右(または左)に見
ながら入力パターンの輪郭線を追跡するとき、つぎの境
界黒画素位置を規定する変位dI,dJを各輪郭黒画素位置
に対応させてデータ設定したものであり、前記輪郭追跡
部6は画像メモリ5中のHSM画像を走査して追跡開始点
を検出した後、変位dI,dJを手がかりに輪郭線の追跡を
実行する。
The output data of the table memory 14 is sequentially stored in the image memory 5, and as a result, an HSM image of the image shown in FIG. 1 (3) is generated in the image memory 5. This HSM
When the contour of the input pattern is traced while looking at the target area of black pixel data to the right (or left), the displacements d I and d J that define the next boundary black pixel position are set to each contour black pixel position. The contour tracing unit 6 scans the HSM image in the image memory 5 to detect the tracing start point, and then traces the contour line using the displacements d I and d J as clues. To do.

前記の第15図により説明した従来の輪郭追跡のアルゴリ
ズムから明らかなように、つぎに追跡すべき輪郭黒画素
は現在着目している輪郭黒画素を中心として設定された
3画素×3画素の局所領域内の2値パターンの形状によ
り特定することができる。第15図に示す例では、黒画素
を右手に見て追跡するため、現在の着目画素を中心に右
回りの方向を見て行って初めて出くわした黒画素をつぎ
の輪郭黒画素としている。すなわち黒画素を右側に見て
追跡するか、左側に見て追跡するかを決めておきさえす
れば、着目している輪郭黒画素を中心にもつ3画素×3
画素の局所領域内の2値パターンの形状によりつぎに追
跡すべき輪郭黒画素は一意に定まるのである。そしてそ
の輪郭黒画素はこの局所領域内の中心画素を除くどれか
ひとつの画素である。従ってつぎの輪郭黒画素の現在の
着目画素に対する相対変位を3画素×3画素の局所領域
内で求め、その相対変位をつぎの輪郭黒画素を示すもの
として格納することができる。ただしノイズの影響で3
画素×3画素の局所領域内の2値パターンが合法パター
ンにならない場合には、例外的につぎの輪郭黒画素が存
在しない場合や一意に決まらない場合もあり得るが、輪
郭追跡処理の前にノイズ除去を行っているので、このよ
うな例外が発生することもない。
As is apparent from the conventional contour tracing algorithm described with reference to FIG. 15, the contour black pixel to be traced next is a local pixel of 3 pixels × 3 pixels set around the contour black pixel currently being focused on. It can be specified by the shape of the binary pattern in the area. In the example shown in FIG. 15, the black pixel is tracked with the right hand. Therefore, the black pixel which is first encountered in the clockwise direction around the current pixel of interest is set as the next contour black pixel. That is, if it is determined whether the black pixel should be tracked by looking to the right side or the left side, 3 pixels x 3 centered on the contour black pixel of interest.
The contour black pixel to be traced next is uniquely determined by the shape of the binary pattern in the local area of the pixel. The contour black pixel is any one pixel except the central pixel in the local area. Therefore, the relative displacement of the next contour black pixel with respect to the current pixel of interest can be obtained within the local area of 3 pixels × 3 pixels, and the relative displacement can be stored as the next contour black pixel. However, due to noise, 3
When the binary pattern in the local area of pixels × 3 pixels does not become a legal pattern, there may be an exception that the next contour black pixel does not exist or it may not be uniquely determined. Since noise is removed, such an exception does not occur.

第10図および第11図は輪郭追跡部6の回路構成例を示
し、第12図はその輪郭追跡動作を示す。図示例の輪郭追
跡部6は、プログラムを格納するためのROM(Read Only
Memory)15と、入力パターンの輪郭追跡結果を格納す
るためのRAM(Random Access Memory)16と、HSM画像の
輪郭追跡開始点を検出するための追跡開始点検出回路17
と、隣接する追跡点を検出するための隣接追跡点検出回
路18と、前記プログラムに基づきRAM16に対するデータ
の読み書きを行ないつつ各回路動作を一連に制御してHS
M画像を輪郭追跡処理を実行するCPU(Central Processi
ng Unit)19とから構成される。また前記隣接追跡点検
出回路18は、画像メモリ5における輪郭追跡開始点アド
レスSADRまたは現追跡点アドレスTADRを選択するための
セレクタ20と、セレクタ20の選択出力をセツトするため
のレジスタ21と、レジスタ21の設定内容に変位dI,dJ
アドレス加算してつぎの追跡点アドレスTADRを算出する
加算回路22とを含む。
10 and 11 show an example of the circuit configuration of the contour tracking section 6, and FIG. 12 shows the contour tracking operation. The contour tracking unit 6 in the illustrated example is a ROM (Read Only) for storing a program.
Memory) 15, a RAM (Random Access Memory) 16 for storing the contour tracking result of the input pattern, and a tracking start point detection circuit 17 for detecting the contour tracking start point of the HSM image.
And an adjacent tracking point detection circuit 18 for detecting an adjacent tracking point, and reading / writing data from / to the RAM 16 based on the program while controlling each circuit operation in series.
CPU (Central Processi) that executes contour tracking processing for M images
ng Unit) 19 and. The adjacent tracking point detection circuit 18 includes a selector 20 for selecting the contour tracking start point address SADR or the current tracking point address TADR in the image memory 5, a register 21 for setting the selection output of the selector 20, and a register. And an adder circuit 22 for adding the displacements d I and d J to the set contents of 21 to calculate the next tracking point address TADR.

然して、第12図のフローチヤートにおいて、まずCPU19
は輪郭追跡開始点検出アドレスADRを初期化した後、つ
ぎに追跡開始点検出回路17によつて画像メモリ5の走査
を開始して、HSM画像の輪郭追跡開始点アドレスSADRを
検出する(ステツプ41,42)。そしてステツプ43で画像
メモリ5の全面が走査されたか否かをチエツクし、この
場合、その判定は“NO"となるから、ステツプ44へ進
み、隣接追跡点検出回路18がHSM画像の変位dI,dJを参照
してつぎの隣接追跡点アドレスTADRを検出する。そして
つぎのステツプ45では、HSM画像の対応画素データの追
跡済フラグを「1」にセツトした後、前記隣接追跡点ア
ドレスTADRをRAM16へ格納する。つぎのステツプ47で
は、この隣接追跡点アドレスTADRが追跡開始点アドレス
SADRと一致するか否かを判定しており、“NO"の判定で
ステツプ44へ戻り、同様の隣接追跡点アドレスTADRの検
出処理が繰返し実行される。かくてステツプ47の判定が
“YES"となつたとき、ステツプ48へ進み、輪郭追跡開始
点アドレスSADRに1加算した値を追跡開始点検出アドレ
スADRとして、つぎの輪郭追跡開始点の検出動作へ移行
する(ステツプ42)。
However, in the flow chart shown in FIG.
After initializing the contour tracking start point detection address ADR, the tracking start point detection circuit 17 then starts scanning the image memory 5 to detect the contour tracking start point address SADR of the HSM image (step 41). , 42). Then, in step 43, it is checked whether or not the entire surface of the image memory 5 has been scanned. In this case, since the determination is "NO", the process proceeds to step 44, where the adjacent tracking point detection circuit 18 shifts the displacement d I of the HSM image. , d J to detect the next adjacent tracking point address TADR. Then, in the next step 45, the tracking completion flag of the corresponding pixel data of the HSM image is set to "1", and then the adjacent tracking point address TADR is stored in the RAM 16. In the next step 47, this adjacent tracking point address TADR is the tracking start point address.
It is determined whether or not it matches the SADR, and if "NO" is determined, the process returns to step 44, and similar detection processing of the adjacent tracking point address TADR is repeatedly executed. Thus, when the determination in step 47 is "YES", the flow proceeds to step 48, and the value obtained by adding 1 to the contour tracking start point address SADR is set as the tracking start point detection address ADR, and the next contour tracking start point detection operation is performed. Transfer (step 42).

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

第1図はHSM画像の生成過程を説明するための図、第2
図は輪郭追跡装置の全体概略構成を示すブロツク図、第
3図はノイズ除去回路および変位生成回路を詳細に示し
た輪郭追跡装置のブロツク図、第4図はノイズ除去回路
および変位生成回路における画素データの流れを示す説
明図、第5図はノイズ除去回路によるノイズ除去動作の
流れを示すフローチヤート、第6図は変位生成回路のテ
ーブルメモリの出力データ構成を説明するための図、第
7図は変位を説明するための図、第8図および第9図は
ヒゲ状黒画素をもつパターンについての変位生成動作を
説明するための図、第10図および第11図は輪郭追跡部の
回路構成例を示すブロツク図、第12図は輪郭追跡処理動
作を示すフローチヤート、第13図は従来例の全体構成を
示すブロツク図、第14図および第15図は従来例の輪郭追
跡処理動作を説明するための図である。 1……カメラ、2……2値化回路、4……変位生成回
路、5……画像メモリ、6……輪郭追跡部
FIG. 1 is a diagram for explaining the HSM image generation process, and FIG.
FIG. 4 is a block diagram showing the overall schematic configuration of the contour tracking device, FIG. 3 is a block diagram of the contour tracking device showing the noise removal circuit and displacement generation circuit in detail, and FIG. 4 is a pixel in the noise removal circuit and displacement generation circuit. FIG. 5 is an explanatory diagram showing the flow of data, FIG. 5 is a flow chart showing the flow of noise removal operation by the noise removal circuit, and FIG. 6 is a diagram for explaining the output data configuration of the table memory of the displacement generation circuit, FIG. Are diagrams for explaining the displacement, FIGS. 8 and 9 are diagrams for explaining the displacement generating operation for a pattern having a mustache-shaped black pixel, and FIGS. 10 and 11 are circuit configurations of the contour tracking section. Block diagram showing an example, FIG. 12 is a flow chart showing the contour tracking processing operation, FIG. 13 is a block diagram showing the entire configuration of the conventional example, and FIGS. 14 and 15 are explanations of the contour tracking processing operation of the conventional example. Do It is a diagram of the eye. 1 ... Camera, 2 ... Binarization circuit, 4 ... Displacement generation circuit, 5 ... Image memory, 6 ... Contour tracking unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 坂 和彦 京都府京都市右京区花園土堂町10番地 立 石電機株式会社内 (56)参考文献 特開 昭57−101987(JP,A) 特開 昭58−80968(JP,A) 特開 昭57−78590(JP,A) 特開 昭55−82380(JP,A) 特開 昭55−95188(JP,A) 特開 昭58−37774(JP,A) 特開 昭56−21278(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Kazuhiko Saka, Kazuhiko Saka, Tateishi Electric Co., Ltd., No. 10, Hanazono Dodo-cho, Ukyo-ku, Kyoto City, Kyoto Prefecture (56) Reference JP-A-57-101987 (JP, A) JP-A-SHO 58-80968 (JP, A) JP 57-78590 (JP, A) JP 55-82380 (JP, A) JP 55-95188 (JP, A) JP 58-37774 (JP, A) JP-A-56-21278 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】画像入力を白黒2値化して入力パターンを
得る2値化手段と、 前記2値化手段で得られた入力パターンの各構成画素に
つき近傍の画素との間で合法パターンを形成するか否か
を判別し、合法パターンを形成しない画素をノイズとみ
なして白黒反転させることにより入力パターンよりノイ
ズを除去するノイズ除去手段と、 前記ノイズ除去手段によるノイズ除去後の入力パターン
の各構成画素につきその画素データおよびその周囲各方
向近傍の各画素の画素データを抽出する画素データ抽出
手段と、 前記画素データ抽出手段で抽出された各構成画素の画素
データおよびその周囲各方向近傍の各画素の画素データ
に基づき入力パターンにおける輪郭画素を検出すると共
に、前記輪郭画素を中心に右回りまたは左回りの方向を
見て行って初めて出くわした入力パターンの構成画素を
つぎの輪郭画素として、この輪郭画素位置までの縦横各
方向の変位を求める変位生成手段と、 各輪郭画素に対応して前記変位生成手段で求められた縦
横各方向の変位を順次格納してつぎの輪郭画素への相対
変位を各画素のデータとして含む画像を生成する画像生
成手段と、 前記画像生成手段により生成された画像の輪郭追跡開始
点を検出する追跡開始点検出手段と、 前記追跡開始点検出手段で得られた輪郭追跡開始点の画
素位置とその画素について求められた前記相対変位とか
ら隣接するつぎの輪郭画素位置を算出し、以後次々と画
素位置と前記相対変位とから隣接するつぎの輪郭画素位
置を算出して輪郭画素を追跡する輪郭追跡手段とを備え
て成る輪郭追跡装置。
1. A legal pattern is formed between a binarizing means for binarizing an image input into black and white to obtain an input pattern, and a neighboring pixel for each constituent pixel of the input pattern obtained by the binarizing means. Noise removal means for removing noise from the input pattern by observing pixels that do not form a legal pattern as noise and inverting them in black and white, and each configuration of the input pattern after noise removal by the noise removal means. Pixel data extraction means for extracting the pixel data of each pixel and the pixel data of each pixel in the vicinity of each direction around the pixel, and pixel data of each constituent pixel extracted by the pixel data extraction means and each pixel in the vicinity of each direction in the periphery The contour pixel in the input pattern is detected based on the pixel data of and the clockwise or counterclockwise direction is centered on the contour pixel. Using the constituent pixels of the input pattern encountered for the first time as the next contour pixel, displacement generating means for obtaining the displacement in each of the vertical and horizontal directions to this contour pixel position, and the vertical and horizontal directions obtained by the displacement generating means corresponding to each contour pixel. Image generation means for sequentially storing displacements in directions and generating an image including relative displacement to the next contour pixel as data of each pixel; tracking for detecting a contour tracking start point of the image generated by the image generation means Starting point detecting means, the pixel position of the contour tracking starting point obtained by the tracking starting point detecting means and the relative displacement determined for the pixel, the next adjacent contour pixel position is calculated, and thereafter the pixels are successively calculated. A contour tracking device comprising: a contour tracking means for tracking the contour pixel by calculating the next adjacent contour pixel position from the position and the relative displacement.
JP59160841A 1984-07-30 1984-07-30 Contour tracking device Expired - Lifetime JPH0762873B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59160841A JPH0762873B2 (en) 1984-07-30 1984-07-30 Contour tracking device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59160841A JPH0762873B2 (en) 1984-07-30 1984-07-30 Contour tracking device

Publications (2)

Publication Number Publication Date
JPS6136879A JPS6136879A (en) 1986-02-21
JPH0762873B2 true JPH0762873B2 (en) 1995-07-05

Family

ID=15723561

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59160841A Expired - Lifetime JPH0762873B2 (en) 1984-07-30 1984-07-30 Contour tracking device

Country Status (1)

Country Link
JP (1) JPH0762873B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5582380A (en) * 1978-12-19 1980-06-21 Nec Corp Pattern processing unit

Also Published As

Publication number Publication date
JPS6136879A (en) 1986-02-21

Similar Documents

Publication Publication Date Title
JPH0546591B2 (en)
JP2001043313A (en) Character segmenting method
JPH0130180B2 (en)
JP2506071B2 (en) Contour tracking device
JPH0762873B2 (en) Contour tracking device
JP2846486B2 (en) Image input device
JP3415700B2 (en) Closed area extraction device
JP2894111B2 (en) Comprehensive judgment method of recognition result in optical type character recognition device
JP3020293B2 (en) Attribute determination method
JP3756660B2 (en) Image recognition method, apparatus and recording medium
JPH0812695B2 (en) Area extraction device
JP3272381B2 (en) Region boundary point extraction method
JP3022856B1 (en) License plate position extraction method
JPS6136880A (en) Contour tracking device
JP2985981B2 (en) Binary image feature extraction method and image processing system using the same
JP2646642B2 (en) Image inside / outside area judgment system
JPS581277A (en) Character characteristic pickup system
JP5453193B2 (en) Tilt detection device, imaging device and method
JPH067389B2 (en) Image processing device
JP2522511B2 (en) Image contour tracking unit
JP3025365B2 (en) Image binarization processing device
JPS6136877A (en) Noise eliminator of picture pattern
JPH04152479A (en) Image inspecting system
JPH0652355A (en) Character segmenting and character recognizing device
JPH06131459A (en) Detection of outline