JPS60263276A - Shape tracking system - Google Patents
Shape tracking systemInfo
- Publication number
- JPS60263276A JPS60263276A JP59120140A JP12014084A JPS60263276A JP S60263276 A JPS60263276 A JP S60263276A JP 59120140 A JP59120140 A JP 59120140A JP 12014084 A JP12014084 A JP 12014084A JP S60263276 A JPS60263276 A JP S60263276A
- Authority
- JP
- Japan
- Prior art keywords
- contour
- tracking
- point
- character
- dimensional
- 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
Links
- 238000000034 method Methods 0.000 claims description 17
- 238000010586 diagram Methods 0.000 description 10
- 238000001514 detection method Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 239000004575 stone Substances 0.000 description 1
Landscapes
- Image Analysis (AREA)
Abstract
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明は、文字や図形などの二次元パターンの認識を行
うための輪郭追跡方式に関する。DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a contour tracking method for recognizing two-dimensional patterns such as characters and figures.
(従来技術)
従来、この種の方式にはフライングスポットスキャナを
使用して紙面上に書かれた文字や図形の輪郭を追跡する
方式が採用されていた。この方式を用いて装置を構成し
た場合には、高価格で大形のフライングスポットスキャ
ナを利用するため、装置が高価格で大形化していた。(Prior Art) Conventionally, this type of method uses a flying spot scanner to track the contours of characters and figures written on paper. When an apparatus is constructed using this method, an expensive and large-sized flying spot scanner is used, resulting in an expensive and large-sized apparatus.
また、2値図形の輪郭を追跡する方式も従来から提案さ
れているが、従来の方式では1画素よシ成る線幅によっ
てループ図形の内側の輪郭を追跡できなかったシ、ある
いは図形そのものではなく輪郭線に注目していたために
8画素分の輪郭線を追跡するのに4画素分の記憶エレメ
ントに拡大して追跡するという複雑で時間のかかる追跡
方法を採用しなければならなかった。Additionally, methods for tracing the outline of a binary figure have been proposed in the past, but with the conventional method, it was not possible to trace the inner contour of the loop figure due to the line width of one pixel, or the line width of the figure itself was not traced. Because the focus was on the contour line, a complicated and time-consuming tracing method had to be adopted in order to trace the contour line of 8 pixels by expanding it into a storage element of 4 pixels.
一方、上記において文字や図形に含まれるループ部の検
出や複数のブロフクから成る図形の検出は、輪郭の追跡
とは異なる手段により行う必要があった。On the other hand, in the above method, detection of a loop included in a character or figure or detection of a figure consisting of a plurality of blocks has to be performed by means different from tracing the outline.
次に、これらの問題点を図面を参照して詳細に説明する
。Next, these problems will be explained in detail with reference to the drawings.
従来技術による形状追跡方式を第1図〜第5図によシ説
明する。A shape tracking method according to the prior art will be explained with reference to FIGS. 1 to 5.
第1図は線幅が1画素の2値化されたループの図形の二
次元パターンの実例であシ、第1図にお′ いて論理も
1〃は図形部、論理%ONは背景部を表わす。Figure 1 is an example of a two-dimensional pattern of a binarized loop figure with a line width of 1 pixel. represent.
第2図はfZ1図と等価な追跡すべき輪郭線を表わして
おり、第2図における嘱aIは外側の輪郭線を表わし、
%b1は内側の輪郭線を表わし、斜線部は図形部を表わ
している。第1図は線幅が1画素であるようなループ図
形を表わしているので、論理%11の画素のうちのある
ものは外側の輪郭点と内側の輪郭点とを兼ねてい石。Figure 2 represents the contour line to be traced equivalent to the fZ1 diagram, and 嘱aI in Figure 2 represents the outer contour line,
%b1 represents the inner contour line, and the shaded area represents the graphic area. Since Figure 1 represents a loop figure with a line width of 1 pixel, some of the pixels of logical %11 serve as outer contour points and inner contour points.
第8図は、第1図の図形を記憶した記憶装置の状態を示
し、記憶エレメントには第1図の各画素に対応して11
Nまたは%OIの値が記憶されている。したがって、第
8図は第2図において示された輪郭が記憶されている。FIG. 8 shows the state of the storage device that stores the figure in FIG.
The value of N or %OI is stored. Therefore, in FIG. 8, the contour shown in FIG. 2 is stored.
また、この記憶装置にはサイズmxnの二次元パターン
に対して(m+ 2 ) X (n + 2 )個の画
素が備えである。第8図において1clは外側輪郭にお
けゐ最初の追跡点(始点)を示す記号であシ、鴬dlは
第2番目の追跡点を示す記号である。Further, this storage device is provided with (m+2) x (n+2) pixels for a two-dimensional pattern of size mxn. In FIG. 8, 1cl is a symbol indicating the first tracking point (starting point) on the outer contour, and dl is a symbol indicating the second tracking point.
第4図は、第2図における外側の輪郭を追跡した後の記
憶装置の状態を示し、追跡完了時の各輪郭点に対応する
記憶エレメントの内容1−4% 1 Nから亀21に置
換されて−る。FIG. 4 shows the state of the storage device after tracing the outer contour in FIG. Teru.
第6図は、追跡中の輪郭点から次の輪郭点を捜す順序の
一例を示す図である。第5図において、本は追跡中の輪
郭点の位置である。直前に追跡した輪郭点が番号8の位
置にあると仮定した時、番号1〜7は番号8を基準にし
て反時計方向に付けられている。そこで、番号1〜8の
順に各画素に対応する記憶エレメントの値を調べる。FIG. 6 is a diagram showing an example of the order in which the next contour point is searched from the contour point being tracked. In FIG. 5, the book is the location of the contour point being tracked. Assuming that the contour point tracked immediately before is located at number 8, numbers 1 to 7 are assigned in a counterclockwise direction with reference to number 8. Therefore, the values of the storage elements corresponding to each pixel are checked in the order of numbers 1 to 8.
輪郭追跡は次のように行われる。Contour tracking is performed as follows.
第8図に示す記憶装置の状態において、第1図の左上隅
の画素に対応する記憶エレメントから順次、右に向って
次々に各画素に対応する記憶エレメントの値を調べてゆ
き、記憶エレメントの内容が最初にz6Nから%11に
変化する位置の画素を始点(第8図C点)として、第5
図に示すような順序に従って記憶エレメントの内容が%
Olではない点を捜し、その記憶エレメントの画素に追
跡点を移すと共に、追跡済みの画素に対応する記憶エレ
メントの内容を−IIから%2〃に置換する。In the state of the storage device shown in FIG. 8, the values of the storage elements corresponding to each pixel are checked one after another, starting from the storage element corresponding to the pixel in the upper left corner of FIG. With the pixel at the position where the content first changes from z6N to %11 as the starting point (point C in Figure 8),
The contents of the storage elements are % according to the order shown in the figure.
Search for a point that is not Ol, move the tracking point to the pixel of that storage element, and replace the contents of the storage element corresponding to the tracked pixel from -II with %2.
これを繰シ返して追跡点が始点に戻れば追跡は終了する
。When this process is repeated and the tracking point returns to the starting point, the tracking ends.
次に、外側の輪郭を追跡した後の第4図の記憶ゑ
装置の状態に対応して、第2における1blに従って内
側の輪郭追跡を開始する。しかし、この場合には、記憶
エレメントの内容が%Olから亀1に変化する点が検出
されず、内側の輪郭追跡は不可能である。Next, in accordance with the state of the storage device shown in FIG. 4 after tracing the outer contour, inner contour tracing is started according to 1bl in the second step. However, in this case, the point where the content of the storage element changes from %Ol to Kame1 is not detected, and inner contour tracing is impossible.
このように、従来の輪郭追跡方式でFi第1図に示すよ
うな、線幅が1画素のループ図形において、内側の輪郭
を追跡できないという欠点があった。As described above, the conventional contour tracing method has the disadvantage that it is not possible to trace the inner contour of a loop figure with a line width of one pixel, as shown in FIG. 1.
さらに、従来技術による輪郭追跡では、輪郭を追跡すゐ
ことのみを目的としていたので、図形または文字の形状
を追跡する場合には、一つの輪郭の追跡結果を図形また
は文字の内部に含まれたループ部の輪郭追跡に利用でき
ず、改めて別の手段によってループ部の有無を検出しな
ければならないという欠点があった。Furthermore, in contour tracking according to the conventional technology, the purpose was only to track the contour, so when tracing the shape of a figure or character, the tracing result of one contour is used to track the shape of a figure or character. This method has the disadvantage that it cannot be used to trace the outline of a loop portion, and the presence or absence of a loop portion must be detected by another means.
C発明の目的)
本発明の目的は、追跡した輪郭点に図形または文字を表
わす符号を付加し、図形または文字の形状に無関係な輪
郭追跡とは異なる二次元領域の頴次走査を実施すること
によって上記欠点を除去し、輪郭点の位置情報ばかりで
はなく、符号化された部分と未だ追跡されていない図形
または文字のノくターンとの位置関係により、この領域
の内部で図形または文字を構成する未追跡の独立線素を
成すブロックの有無、および既に追跡が終了した図形ま
たは文字の内部に存在するループ部の有無を検出するこ
とができるように構成して実現したことを特徴とする形
状追跡方式を提供することにある0(発明の構成)
本発明による形状追跡方式は複数の手段から成立つもの
である。C) An object of the present invention is to add a code representing a figure or a character to the traced contour point, and perform a two-dimensional area scanning which is different from contour tracing which is unrelated to the shape of the figure or character. This eliminates the above drawbacks and constructs a figure or character within this area based not only on the positional information of the contour points but also on the positional relationship between the encoded part and the notation of the figure or character that has not yet been tracked. A shape characterized in that it is configured and realized so that it is possible to detect the presence or absence of a block forming an untraced independent line element, and the presence or absence of a loop portion that exists inside a figure or character that has already been traced. 0 (Arrangement of the Invention) The shape tracking method according to the present invention is comprised of a plurality of means.
第1の手段は二次元の一定領域内に存在する二次元図形
または文字の輪郭を追跡するに際して、一定値域内の二
次図形または文字の形状に無関係に二次元領域全域を順
次走査し、二次元図形または文字の輪郭の始点を検出し
た箇所から輪郭追跡を開始し、追跡した輪郭点の位置情
報を得るため’ (04゜工あ、。The first means, when tracing the outline of a two-dimensional figure or character existing within a certain two-dimensional area, sequentially scans the entire two-dimensional area regardless of the shape of the secondary figure or character within a certain value range. To start contour tracking from the point where the starting point of the contour of a dimensional figure or character is detected, and to obtain position information of the traced contour point.
第2の手段は輪郭点の左もしくは右における線素の有無
に着目してそれぞれ異なる数値を用いて輪郭点を順次符
号化し、符号化の過程において外側輪郭の追跡結果から
ブロックを検出し、検出済みのブロックも含めてさらに
全面走査を続行するためのものである。The second method focuses on the presence or absence of a line element on the left or right side of a contour point, sequentially encodes the contour points using different numerical values, and detects blocks from the tracing results of the outer contour in the encoding process. This is to continue scanning the entire area, including the blocks that have already been scanned.
第8の手段は全面走査の続行において外側輪郭が追跡済
みであるブロックの内部に未追跡情報が存在する場合に
は、未追跡情報を検出してループの存在を検出し、内側
輪郭を追跡して符号化するためのものである。The eighth means is to detect the untracked information to detect the existence of a loop and trace the inner contour if untracked information exists inside a block whose outer contour has been tracked in the continuation of full-surface scanning. It is used for encoding.
第4の手段は全面走査の続行において他の種類のブロッ
クを検出した場合には、これを外側輪郭として追跡して
符号化するだめのものである。The fourth means is to track and encode blocks as outer contours when other types of blocks are detected during the continuation of full-surface scanning.
本発明は上記手段によシ未追跡の部分がなくなるまで追
跡を繰り返して実行することにより、一定値域内の二次
元図形または文字のループ部を検出し、ブロック数情報
を得るように構成したものである。The present invention is configured to detect loop parts of two-dimensional figures or characters within a certain value range and obtain block number information by repeating tracking until there are no untracked parts by the above means. It is.
(実施例) 次に、本発明について図面を参照して詳細に説明する。(Example) Next, the present invention will be explained in detail with reference to the drawings.
第6図は、第3図に示す外側輪郭の追跡に対応し、本発
明によって外側輪郭を追跡した後の記憶エレメントの状
態を示す図である。第6図において、% 61は外側輪
郭追跡の始点を示す記号である。第7図は、第6図にお
いて本発明によって内側輪郭を追跡した後の記憶エレメ
ントの状態を示す図である。第7図において、SS f
IIは内側輪郭の追跡の始点を示す記号である。第8
図および第9図は、本発明により追跡を実行する順序、
記号、およびその記号に対応した値を示す図である。第
8図において(a)は追跡の順序、(b)はその記号を
表わし、第9図はその記号に対応した値を示したもので
ある。第10図は、本発明による追跡の概略を示すフロ
ーチャートである。FIG. 6 corresponds to the tracking of the outer contour shown in FIG. 3 and shows the state of the storage element after the outer contour has been tracked according to the invention. In FIG. 6, %61 is a symbol indicating the starting point of outer contour tracking. FIG. 7 shows the state of the storage element after the inner contour has been tracked according to the invention in FIG. In FIG. 7, SS f
II is a symbol indicating the starting point of tracing the inner contour. 8th
9 and 9 illustrate the order in which tracking is performed according to the invention,
FIG. 3 is a diagram showing symbols and values corresponding to the symbols. In FIG. 8, (a) shows the tracking order, (b) shows the symbol thereof, and FIG. 9 shows the value corresponding to the symbol. FIG. 10 is a flowchart outlining tracking according to the present invention.
第6図は、第2図における一a〃に対し外側輪郭を追跡
した後の記憶装置の状態を示している。FIG. 6 shows the state of the storage device after tracing the outer contour with respect to 1a in FIG.
すなわち、1画素左の画素に対応する記憶エレメントの
値が\\0#であるならノー1、追跡完了時の記憶エレ
メントの値は追跡中の画素に対応する記憶エレメントの
値、すなわち気2Nが該当する値11Nに加算されて$
8#に置換され、1画素右の画素に対応する記憶エレメ
ントの値が101であるならば、追跡中の画素に対応す
る記憶エレメントの値は気4〃が該当する値%1#に加
算されても5Nに置換されている。In other words, if the value of the memory element corresponding to the pixel one pixel to the left is \\0#, No 1, and the value of the memory element when tracking is completed is the value of the memory element corresponding to the pixel being tracked, that is, the value of 2N is Added to the corresponding value 11N and $
8#, and if the value of the storage element corresponding to the pixel one pixel to the right is 101, the value of the storage element corresponding to the pixel being tracked is added to the corresponding value %1#. However, it has been replaced with 5N.
第7図において気f〃を含む列は第6図の記憶装置の状
態に対応して第2図における%bIを表わし、内側の輪
郭を追跡した後の記憶装置の状態を示す。したがって、
1画素左の画素に対応する記憶エレメントの値が%0#
であるならば、追跡時の記憶エレメントの値は追跡中の
画素に対応する記憶エレメントの値に12〃が加算され
て一7Nに置換され、1画素右の画素に対応する記憶エ
レメントの値が%0〃であるならば、追跡中の画素に対
応する記憶エレメントの値には%5Nに一2〃が加算さ
れて一7〃に置換される。In FIG. 7, the column containing qf represents the %bI in FIG. 2 corresponding to the state of the storage device in FIG. 6, and shows the state of the storage device after tracing the inner contour. therefore,
The value of the storage element corresponding to the pixel one pixel to the left is %0#
If so, the value of the storage element during tracking is replaced by 12 by adding 12 to the value of the storage element corresponding to the pixel being tracked, and the value of the storage element corresponding to the pixel one pixel to the right becomes %0〃, the value of the storage element corresponding to the pixel being tracked is replaced with 12〃 by adding 12〃 to %5N.
第8図(a)は追跡中の輪郭点から次の輪郭点を捜す順
序の一例を示している。第8図(a)における*は追跡
中の輪郭点の位置であシ、直前に追跡した輪郭点を番号
8としたものである。例えば、図示したように左上の位
置が番号8であり、番号1〜7は番号8を基準として反
時計方向に付けられている。番号1〜8の順に各画素に
対する記憶エレメントの値を調べる。FIG. 8(a) shows an example of the order in which the next contour point is searched from the contour point being tracked. In FIG. 8(a), * indicates the position of the contour point being tracked, and the contour point tracked immediately before is numbered 8. For example, as shown in the figure, the upper left position is number 8, and numbers 1 to 7 are assigned counterclockwise with reference to number 8. Examine the value of the storage element for each pixel in the order of numbers 1-8.
第9図は、第8図における追跡中の各点に対応して該当
する画素の記憶エレメントの値乃βO〃である時に、追
跡中の画素に対応する記憶エレメントの値に加算される
べき値を示した図である。FIG. 9 shows the value to be added to the value of the storage element corresponding to the pixel being tracked when the value of the storage element of the corresponding pixel corresponding to each point in FIG. 8 is βO〃. FIG.
すなわち、*で示された追跡中の画素を中心に1画素左
の画素に対応する記憶エレメントの値力μ0〃であるな
らば、番号】に対応する値%21がその追跡中の画素に
対応する記憶エレメントの値に加算される。一方、1画
素右の画素に対応すゐ記憶エレメントの値が一〇〃であ
るならば、番号5に対応する値気4#が、その追跡中の
画素に対応する記憶エレメントの値に加算されることを
意味している。このような加算基準を採用して追跡!
点を符号化する。In other words, if the value of the storage element corresponding to the pixel one pixel to the left of the pixel being tracked indicated by * is μ0, then the value %21 corresponding to the number ] corresponds to the pixel being tracked. is added to the value of the storage element. On the other hand, if the value of the storage element corresponding to the pixel one pixel to the right is 10, then the value 4# corresponding to number 5 is added to the value of the storage element corresponding to the pixel being tracked. It means that Track by adopting such addition criteria!
Encode points.
次に、輪郭追跡の始点の検出について説明する。Next, detection of the starting point of contour tracking will be described.
第8図において左上隅の画素から右に向って順次、画素
に対応する記憶エレメントの値を調べる。In FIG. 8, values of storage elements corresponding to pixels are sequentially checked from the pixel at the upper left corner toward the right.
途中で値が気O〃から気1#、あるいは気oIから%5
Nに変化する点が存在していれば、その画素が輪郭追跡
の始点である。On the way, the value changes from Qi O〃 to Qi 1#, or from Qi oI to %5
If there is a point that changes to N, that pixel is the starting point for contour tracking.
輪郭の追跡は次のようにして行う。Contour tracking is performed as follows.
第8図において、始点を検出するには、第8図の順序に
従って始点を中心に反時計方向に調べてゆき、最初に蟻
1Nが存在している点を見出し、これを輪郭点として位
置情報を座標より抽出する。In Fig. 8, to detect the starting point, search counterclockwise around the starting point according to the order shown in Fig. 8, first find the point where the ant 1N is present, and use this as a contour point to obtain positional information. Extract from the coordinates.
気 1 lが検出されるまで、第8図(b)の各記号に
対応した第9図に示す値を、追跡点の画素に対応する記
憶エレメントの値に順次に加算してゆく。The values shown in FIG. 9 corresponding to each symbol in FIG. 8(b) are sequentially added to the value of the storage element corresponding to the pixel of the tracking point until qi 1 l is detected.
次の輪郭点が検出されたならば、その画素を次の追跡点
として@8図(a)のような順序で調べてゆく。ここで
始点以降の追跡点については、直前の追跡点の番号に続
く次の位置力・ら調ぺ始める。When the next contour point is detected, that pixel is treated as the next tracking point and examined in the order shown in Figure 8 (a). Here, for the tracking points after the starting point, the next positional force following the number of the immediately preceding tracking point is started.
fHJ、tば、第8図のパターンでは始点(第3図(C
))からみて直前の輪郭点が記号Hの位置にあるものと
して記号Aの位置から調査を始める。第2番目の追跡点
(第3図(d))は、始点からみて記号Bの位置にある
。ここで、記号Aの位置の画素に対応する記憶エレメン
トの値は一0〃であるから、加算基準に従って記号Aに
対応する値、すなわち気2〃を加算し、始点に対応した
画素での記憶エンメントの値は気8Iとなる。次に、第
2番目の追跡点からみて始点は記号Fの位置にあるため
、記号Gの位置から反時計方向に調べ始める。順次調べ
ると、第3番目の追跡点は第2番目の追跡点、からみて
記号りの位置にあるため、第2番目の追跡点に対応する
記憶エレメントの値は記号Gに対応する値−0〃と、記
号Hに対応する値%0〃と。fHJ, t, in the pattern of Figure 8, the starting point (Figure 3 (C
)) Assuming that the previous contour point is at the position of symbol H, the investigation starts from the position of symbol A. The second tracking point (FIG. 3(d)) is located at the position of symbol B as seen from the starting point. Here, since the value of the storage element corresponding to the pixel at the position of symbol A is 10, the value corresponding to symbol A, that is, 2, is added according to the addition standard, and the memory at the pixel corresponding to the starting point is Enment's value is Qi 8I. Next, since the starting point is at the position of symbol F when viewed from the second tracking point, the search starts from the position of symbol G in a counterclockwise direction. When examined sequentially, the third tracking point is at the position of the symbol from the second tracking point, so the value of the storage element corresponding to the second tracking point is the value corresponding to the symbol G - 0 〃, and the value %0 corresponding to the symbol H.
記号Aに対応する値へ2fと、記号Bに対応す石仏NO
#と、記号Cに対応する値気0〃とが加算されたものと
なυ、結果は%8〃となる。次に、第8番目の追跡点か
らみて第2番目の追跡点は記号Hの位置にあるため、記
号Aの位置から反時計方向に調べ始める。このようにし
て追跡を繰シ返して実行し、追跡点が始点に戻った時点
で記号Hに対応する値が加算された場合には、追跡は終
了する。ここで、ブロックが一つ検出されたことになっ
て再び走査が開始される。このとき、%0#から%1N
への変化点を検出したならば、他に独立したブロックが
存在することになる。この実施例では、1ブロツクに1
ループが対応した図形を取シ扱っているので、次は内側
輪郭の追跡を行う。2f to the value corresponding to symbol A and stone Buddha NO. corresponding to symbol B
# and the value 0〃 corresponding to the symbol C are added υ, and the result is %8〃. Next, since the second tracking point is located at the position of symbol H when viewed from the eighth tracking point, the search starts from the position of symbol A in a counterclockwise direction. In this way, tracking is repeatedly executed, and if the value corresponding to the symbol H is added when the tracking point returns to the starting point, the tracking ends. At this point, one block has been detected and scanning is started again. At this time, from %0# to %1N
If a change point is detected, it means that another independent block exists. In this example, 1 block has 1
Since the loop is handling the corresponding figure, next we will trace the inner contour.
ここで、外側の輪郭を追跡した後の第6図の記憶装置の
状態において、内側の輪郭の追跡を行うことにする。今
度は、外側の輪郭追跡の終了点から右へ向って内側の輪
郭追跡の始点を検出するため、順次画素に対応する記憶
エレメントの値を調べてゆく。ここで %Q#から気1
〃、あるいは%Olから%5Iに変化する点があれば、
輪郭を追跡した図形の内部にループ部が存在し、この点
を内側のループ部の輪郭追跡の始点とする。Here, in the state of the storage device shown in FIG. 6 after tracing the outer contour, the inner contour will be traced. This time, in order to detect the starting point of inner contour tracing from the end point of outer contour tracing to the right, values of storage elements corresponding to pixels are sequentially checked. Here %Q# to Qi 1
〃, or if there is a point that changes from %Ol to %5I,
A loop portion exists inside the figure whose contour has been traced, and this point is taken as the starting point for tracing the contour of the inner loop portion.
内側のループ部の輪郭の追跡は、外側の輪郭部の追跡と
同様の方法によって行う。第8図において記号Hに対応
する画素の記憶エレメントの値から順次、第8図に示す
順序に従って反時計方向に調べ始め、画素の記憶エレメ
ントが%O〃以外の値を有する点が見付かるまで翫0〃
の記号に対応する画素の記憶エレメントの値を加算して
ゆく。The contour of the inner loop portion is tracked in the same manner as the outer contour portion. In FIG. 8, starting from the value of the storage element of the pixel corresponding to the symbol H, the search begins counterclockwise in the order shown in FIG. 8 until a point is found where the storage element of the pixel has a value other than %O. 0〃
The values of the storage elements of the pixels corresponding to the symbols are added.
第6図において、始点からみて第2番目の追跡点は記号
Bの位置にある。したがって、始点の画素に対応した記
憶エレメントの値はすでに外側輪郭の追跡の結果として
置換された値、すなわち、気51に対して記号Aに対応
する値、すなわち%2gを加算して得られた値となり、
結果的に覧7gとなる。第2番目の追跡点からみて始点
は記号Fの位置にあるため、記号Gの位置から始めてそ
の画素に対応する記憶エレメントの値を詞ぺる。第8番
目の追跡点は記号Aの位置にあるため、記号Gに対応す
る値、すなわち%ONと、記号Hに対応する値、すなわ
ち−Olとを記号Aに対応する値に加算して亀5Nとな
る。第2番目の追跡点は、第3番目の追跡点からみて記
号Eの位置にある。In FIG. 6, the second tracking point is located at symbol B when viewed from the starting point. Therefore, the value of the storage element corresponding to the pixel at the starting point is already obtained by adding the value corresponding to the symbol A, i.e. %2g, to the value replaced as a result of tracing the outer contour, i.e. 51. becomes the value,
The result is 7g. Since the starting point is at the position of the symbol F when viewed from the second tracking point, the value of the storage element corresponding to that pixel is written starting from the position of the symbol G. Since the eighth tracking point is at the position of the symbol A, the value corresponding to the symbol G, i.e. %ON, and the value corresponding to the symbol H, i.e. -Ol are added to the value corresponding to the symbol A to calculate the result. It becomes 5N. The second tracking point is located at symbol E as viewed from the third tracking point.
したがって、記号Fの位置からその画素に対応する記憶
エレメントの値を調べ始める。このようにして、追跡を
繰り返して実行し2、追跡点が始点に戻った時点で記号
Hに対応する画素の記憶エレメントの値が加算されたな
らば、追跡は終了すゐ。Therefore, starting from the position of symbol F, the value of the storage element corresponding to that pixel is examined. In this way, tracing is repeatedly executed 2, and when the value of the storage element of the pixel corresponding to the symbol H is added when the tracing point returns to the starting point, the tracing ends.
ここでループ数は1となる。なお、この追跡方法では、
m X n画素の二次元パターンに対して(m+ 2
) X (n + 2 )の記憶エレメントがあシ、座
標(i、j)(i=1.2.=・m+2:j=1.2.
・・・n+2)の記憶番地に対して座標(1・、+)+
(t+1)+(m+2+j)+(iyn+2)に対応す
る記憶ニレメン)Uすべて%Olとする。すなわち、m
Xnの二次元パターンのまわシの1画素はすべて論理%
O〃とする。また、追跡点を中心に8連結の8×3画素
において反時計方向に調べ、始点において記号Aの位置
から調べたならば終了点において必ず記号Hの位置まで
調べる。Here, the number of loops is 1. In addition, with this tracking method,
For a two-dimensional pattern of m×n pixels, (m+2
) X (n + 2) storage element is empty, coordinates (i, j) (i=1.2.=・m+2:j=1.2.
Coordinates (1.,+)+ for the memory address of ...n+2)
(t+1)+(m+2+j)+(iyn+2) (memory element)U are all %Ol. That is, m
Every pixel in the two-dimensional pattern of Xn is logical%
O〃. Furthermore, the search is performed in a counterclockwise direction in 8 connected 8×3 pixels around the tracking point, and if the search starts from the position of symbol A at the starting point, it is always checked up to the position of symbol H at the end point.
(発明の効果)
以上説明したように本発明において(d:、追跡した輪
郭点に図形または文字を表わす符号を付加し、図形また
は文字の形状に無関係な輪郭追跡とは異なる二次元領域
の順次走査を実施することにより、複雑な図形、おるい
は1画素の線幅のループ図形に対して外側輪郭はもとよ
り、内側輪郭も含めて簡単な動作で追跡することができ
るという効果がある。(Effects of the Invention) As explained above, in the present invention (d), a code representing a figure or a character is added to the traced contour point, and a two-dimensional region is sequentially By performing scanning, there is an effect that not only the outer contour but also the inner contour of a complex figure or a loop figure with a line width of one pixel can be traced with a simple operation.
さらに、輪郭点の位置情報だけではなくループの検出、
およびブロックの検出のような認識分野における特徴抽
出にも利用できるので、簡単な装置で輪郭の追跡を完全
に、すばやく行うことができる安価な形状追跡方式を形
成できるという効果もある。Furthermore, we can detect not only the position information of contour points but also loops.
It can also be used for feature extraction in the field of recognition such as block detection, so it has the effect of forming an inexpensive shape tracking method that can completely and quickly track contours with a simple device.
上記においてブロックの検出は文字や図形のブロック数
を調べることであシ、ブロック数は外側輪郭の数に等し
い。In the above, blocks are detected by checking the number of blocks of characters or figures, and the number of blocks is equal to the number of outer contours.
第1図は1画素の線幅を有するループ図形図でsb、文
字や図形などの2値化された二次元)くターンの実例を
示す図である。
第2図は、第1図において追跡すべき輪郭線を示す図で
ある。
第3図は、数値に置換して書込まれた記憶エレメントの
状態を示す図である。
第4図は、外側輪郭追跡終了後の記憶エレメントの状態
を示す図である。
第6図は、従来技術による追跡の順序を示す図である。
第6図は、本発明にニジ外側輪郭を追跡した後の記憶エ
レメントの状態を示す図である。
第7図は、本発明によシ内側輪郭を追跡した後の記憶エ
レメントの状態を示す図である。
第8図ならびに第9図は、本発明による追跡の順序、4
1号、および記号の対応値を示す図である。
第10図は、本発明による追跡の流れを示すフローチャ
ートである。
a、b・・・・・輪郭線
特許出願人 日本電気株式会社
代理人 弁理士 井ノ ロ 壽FIG. 1 is a loop figure diagram having a line width of one pixel, and is a diagram showing an example of a two-dimensional (2D) turn in which characters, figures, etc. are binarized. FIG. 2 is a diagram showing the contour line to be traced in FIG. 1. FIG. 3 is a diagram showing the state of a storage element in which numerical values have been replaced and written. FIG. 4 is a diagram showing the state of the storage element after the outer contour tracking is completed. FIG. 6 is a diagram showing the order of tracking according to the prior art. FIG. 6 is a diagram illustrating the state of the storage element after tracking the rainbow outer contour according to the present invention. FIG. 7 shows the state of the storage element after tracking the inner contour according to the invention. 8 and 9 illustrate the order of tracking according to the invention, 4
1 and the corresponding values of symbols. FIG. 10 is a flowchart showing the flow of tracking according to the present invention. a, b...Contour line patent applicant Hisashi Inoro, agent for NEC Corporation, patent attorney
Claims (1)
の輪郭を追跡するに際して、前記一定値域内の二次図形
または文字の形状に無関係に二次元領域全域を順次走査
し、前記二次元図形または文字の輪郭の始点を検出した
箇所から輪郭追跡を開始し、追跡した輪郭点の位置情報
を得るだめの第1の手段と、前記輪郭点の左もしくは右
における線素の有無に着目してそれぞれ異なる数値を用
いて前記輪郭点を順次符号化し、前記符号化の過程にお
いて外側輪郭の追跡結果からブロックを検出し、検出済
みのブロックも含めてさらに全面走査を続行するための
第2の手段と、前記全面走査の続行において前記外側輪
郭が追跡済みであるブロックの内部に未追跡情報が存在
する場合には前記未追跡情報を検出してループの存在を
検出し、新たに内側輪郭?追跡して符号化するための第
8の手段と、前記全面走査の続行において他の種類のブ
ロックを検出した場合には、これを前記外側輪郭として
追跡して符号化するための第4の手段とを具備し、前記
未追跡の部分がなくなるまで前記追跡を繰り返して実行
することによシ前記一定領域内の前記二次元図形または
文字のループ部を検出し、ブロック数情報を得るように
構成したことを特徴とする形状追跡方式。When tracing the outline of a two-dimensional figure or character existing within a certain two-dimensional area, the entire two-dimensional area is sequentially scanned regardless of the shape of the secondary figure or character within the certain value range, and the outline of the two-dimensional figure or character is traced. Alternatively, a first means for obtaining positional information of the traced contour point by starting contour tracing from a point where the starting point of the contour of a character is detected, and focusing on the presence or absence of a line element on the left or right side of the contour point. A second means for sequentially encoding the contour points using different numerical values, detecting blocks from the tracking results of the outer contour in the encoding process, and further continuing the entire surface scan including the detected blocks. Then, in the continuation of the entire surface scan, if untracked information exists inside a block in which the outer contour has been tracked, the untracked information is detected to detect the existence of a loop, and a new inner contour is detected. eighth means for tracking and encoding, and if another type of block is detected in the continuation of said full-surface scanning, fourth means for tracking and encoding it as said outer contour; and configured to detect a loop part of the two-dimensional figure or character within the certain area and obtain block number information by repeatedly performing the tracking until the untracked part disappears. This shape tracking method is characterized by:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP59120140A JPS60263276A (en) | 1984-06-12 | 1984-06-12 | Shape tracking system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP59120140A JPS60263276A (en) | 1984-06-12 | 1984-06-12 | Shape tracking system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS60263276A true JPS60263276A (en) | 1985-12-26 |
| JPH057751B2 JPH057751B2 (en) | 1993-01-29 |
Family
ID=14778954
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP59120140A Granted JPS60263276A (en) | 1984-06-12 | 1984-06-12 | Shape tracking system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS60263276A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6175485A (en) * | 1984-09-20 | 1986-04-17 | Omron Tateisi Electronics Co | Image processor |
-
1984
- 1984-06-12 JP JP59120140A patent/JPS60263276A/en active Granted
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6175485A (en) * | 1984-09-20 | 1986-04-17 | Omron Tateisi Electronics Co | Image processor |
Also Published As
| Publication number | Publication date |
|---|---|
| JPH057751B2 (en) | 1993-01-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2938338B2 (en) | 2D code | |
| EP1456811B1 (en) | Reconstruction of virtual raster | |
| US5515455A (en) | System for recognizing handwritten words of cursive script | |
| JPH07141463A (en) | Detection of mechanically printed amount of money in binary-coded image | |
| US6947596B2 (en) | Character recognition method, program and recording medium | |
| JP3936436B2 (en) | Table recognition method | |
| US4769849A (en) | Method and apparatus for separating overlapping patterns | |
| JPS60263276A (en) | Shape tracking system | |
| JP4793868B2 (en) | Writing medium, writing information detection device, writing information detection method, program, and recording medium | |
| JPH04255080A (en) | image input device | |
| Lehal et al. | A complete OCR system for Gurmukhi script | |
| JPH09185726A (en) | Ruled line removing method | |
| JPH08272980A (en) | Closed area extracting device | |
| EP0580152A2 (en) | Method and apparatus for segmenting and classifying unconstrained handwritten characters | |
| JPH02125381A (en) | Image signal processing device | |
| JP3162451B2 (en) | Preprocessing method for character recognition | |
| JPH08212292A (en) | Frame recognition device | |
| JPH0535872A (en) | Contour tracing system for binary image | |
| JP3037504B2 (en) | Image processing method and apparatus | |
| JPS6324482A (en) | Hole extraction method | |
| JPS5846476A (en) | Detecting circuit for black area peak | |
| JPH0421911B2 (en) | ||
| JPS60239884A (en) | recognition device | |
| JPH04260980A (en) | Device for recognizing graphic | |
| JPH07107689B2 (en) | Image signal processor |