JP2513365B2 - Contour tracking method - Google Patents

Contour tracking method

Info

Publication number
JP2513365B2
JP2513365B2 JP5009571A JP957193A JP2513365B2 JP 2513365 B2 JP2513365 B2 JP 2513365B2 JP 5009571 A JP5009571 A JP 5009571A JP 957193 A JP957193 A JP 957193A JP 2513365 B2 JP2513365 B2 JP 2513365B2
Authority
JP
Japan
Prior art keywords
boundary
contour
pixel
tracking
pixels
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 - Fee Related
Application number
JP5009571A
Other languages
Japanese (ja)
Other versions
JPH06223183A (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.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP5009571A priority Critical patent/JP2513365B2/en
Publication of JPH06223183A publication Critical patent/JPH06223183A/en
Application granted granted Critical
Publication of JP2513365B2 publication Critical patent/JP2513365B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は文字、図形等の2値化さ
れた2次元パターンの輪郭の検出および追跡をし、輪郭
線データを得るための輪郭追跡方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a contour tracking method for detecting and tracking the contour of a binarized two-dimensional pattern such as characters and figures and obtaining contour line data.

【0002】[0002]

【従来の技術】文字、図形等の2次元パターンの輪郭を
検出し追跡する方法としては、例えば特公昭58-47063号
公報に示されている輪郭追跡方法が提案されている。こ
の方法は、予め2次元パターンの4倍のワークメモリを
用意し、元のパターンを走査し、ある規則に従ってワー
クメモリにデータを書き込んだ後に輪郭画素を追跡する
方法であり、それまでの方法に比べ、線幅が1画素の閉
曲線についても外側の輪郭と内側の輪郭が完全に追跡可
能になるという特徴を持つ。ただし、この方法では輪郭
画素の追跡を行っているから、得られた輪郭データから
画像の拡大再生を行ったとき、線幅が1の部分は何倍に
拡大しても線幅が1のままであるなど、元画像と相似な
図形を得ることができないという欠点がある。この点を
改善するために特願平3-135492号の画像データ圧縮方式
が提案されている。この画像データ圧縮方式における輪
郭追跡方法では、2次元パターンに対し、縦方向、横方
向とも、1画素ずつ大きいワークメモリを用意し、そこ
に特殊な変換画像を作成した後、変換画像に対し輪郭画
素の追跡を行うようにしており、特殊な変換を行うこと
で、追跡された輪郭線データは、元の2次元パターンの
on画素とoff画素の境界線を追跡したのと同じ結果が得
られるようになっている。ただし、この方法を実際に使
用するには、1画素幅のoff画素部分が特殊な変換によ
りつぶれてしまうことがあるため、まず元の2次元パタ
ーンを縦横とも2倍に拡大した後特殊な変換を行うこと
になる。
2. Description of the Related Art As a method for detecting and tracking the contour of a two-dimensional pattern such as characters and figures, for example, the contour tracking method disclosed in Japanese Patent Publication No. 58-47063 has been proposed. This method prepares a work memory four times as large as the two-dimensional pattern in advance, scans the original pattern, writes the data in the work memory according to a certain rule, and then tracks the contour pixels. In comparison, the feature is that the outer contour and the inner contour can be completely traced even for a closed curve having a line width of 1 pixel. However, in this method, since the contour pixels are tracked, when the image is enlarged and reproduced from the obtained contour data, the line width of the portion having the line width of 1 remains 1 regardless of the magnification. However, there is a drawback that a figure similar to the original image cannot be obtained. In order to improve this point, the image data compression method of Japanese Patent Application No. 3-135492 has been proposed. In the contour tracking method in this image data compression method, a work memory that is larger by one pixel in the vertical and horizontal directions for a two-dimensional pattern is prepared, and a special converted image is created in the work memory. Pixels are tracked, and by performing a special conversion, the tracked contour line data is the original two-dimensional pattern.
The same result as when tracing the boundary line between the on pixel and the off pixel is obtained. However, in order to actually use this method, the off pixel part of 1 pixel width may be crushed by a special conversion. Therefore, first, the original two-dimensional pattern is doubled vertically and horizontally, and then the special conversion is performed. Will be done.

【0003】[0003]

【発明が解決しようとする課題】しかし、上述の方法で
は、輪郭追跡を開始する前に、2次元パターンより大き
なワークメモリを用意しなければならないこと、また、
用意したワークメモリに2次元パターンを走査して得ら
れる特殊なデータを書き込まなければならないことや、
輪郭の追跡では、現在の輪郭画素から次の輪郭画素を検
索する必要があるといった欠点がある。
However, in the above method, the work memory larger than the two-dimensional pattern must be prepared before the contour tracking is started, and
It is necessary to write special data obtained by scanning the two-dimensional pattern in the prepared work memory,
Contour tracking has the drawback that it is necessary to retrieve the next contour pixel from the current contour pixel.

【0004】本発明の目的は、上記欠点を取り除き、少
ないワークメモリで高速にon画素とoff画素の境界を追
跡することができる輪郭追跡方法を提供することにあ
る。
An object of the present invention is to eliminate the above-mentioned drawbacks and to provide a contour tracing method capable of tracing the boundary between on pixels and off pixels at high speed with a small work memory.

【0005】[0005]

【課題を解決するための手段】本発明は、下記、又
はの手段により上記課題を解決する。
The present invention solves the above problems by the following or means.

【0006】画素のon及びoffで表現された文
字、図形等の2値化2次元パターンを受け、該パターン
におけるonの画素とoffの画素の境界を輪郭として
追跡する輪郭追跡方法であって、画素メモリに記憶され
た2次元パターンのある隣接する画素間の境界が輪郭で
あるとき、予め決められた追跡方向で前記境界のすぐ前
方に位置する2つの画素のon又はoffの情報を画像
メモリから読み出し、前記2つの画素のon及びoff
の組み合わせによって、次の追跡すべき境界を判断する
ようにした輪郭追跡方法であって、特に以下の点を特徴
とする。
A contour tracking method for receiving a binary two-dimensional pattern of a character, a figure, etc. expressed by on and off of pixels and tracing a boundary between on pixels and off pixels in the pattern as a contour, When the boundary between adjacent pixels having a two-dimensional pattern stored in the pixel memory is a contour, the on or off information of two pixels located immediately in front of the boundary in a predetermined tracking direction is stored in the image memory. Read from the above, and turn on and off the two pixels
It is a contour tracking method that determines the boundary to be tracked next by the combination of.
And

【0007】 前記2次元パターンの各画素の4つの
境界の中で予め決められた方向の境界に対応する2値の
記憶手段を設け、前記境界が輪郭として追跡されたとき
には追跡された境界に対応する前記記憶手段に追跡済み
のマークを書き込むようにしたことを特徴とするに記
載の輪郭追跡方法。
Binary storage means corresponding to a boundary in a predetermined direction among the four boundaries of each pixel of the two-dimensional pattern is provided, and when the boundary is traced as a contour, it corresponds to the traced boundary. The contour tracking method described in (1) above, wherein a tracked mark is written in the storage means.

【0008】輪郭追跡を開始する境界は、前記2次元
パターンの各画素をラスタスキャンし、on画素とof
f画素の境界を検出し、この境界に対応する前記記憶手
段の情報を読み出し、前記情報と追跡済みマークとを比
較して一致しないとき、該境界から輪郭の追跡を開始す
るようにしたことを特徴とする に記載の輪郭追跡方
法。
The boundary for starting contour tracing is the two-dimensional boundary.
Raster scan each pixel of the pattern, and
The boundary of f pixels is detected, and the memory hand corresponding to this boundary is detected.
Read the information on the column and compare the information with the tracked marks.
If they do not match, the contour tracing is started from the boundary.
It is characterized by doing Contour tracking method described in
Law.

【0009】[0009]

【実施例】次に本発明について図面を参照して説明す
る。図1は本発明の実施例における処理の手順を示す流
れ図である。ステップ101における処理は、2値の2
次元パターン(以下、入力画像という)の各画素に対応
する2値の記憶手段(以下、マーク記憶メモリという)
を用意し初期化する初期設定処理である。ステップ10
2では入力画像が格納されているメモリについてラスタ
スキャンをする。このラスタスキャンでは、図3に示す
座標系に対し、左から右、および上から下の走査をす
る。ステップ103では輪郭追跡を開始する境界を決定
する。ステップ104では輪郭追跡を実行し、得られた
輪郭データを記憶する。ステップ101におけるマーク
記憶メモリの初期化では、各画素をすべてoffにする。
The present invention will be described below with reference to the drawings. FIG. 1 is a flow chart showing the procedure of processing in the embodiment of the present invention. The process in step 101 is binary 2
Binary storage means (hereinafter referred to as mark storage memory) corresponding to each pixel of a three-dimensional pattern (hereinafter referred to as input image)
Is an initialization process for preparing and initializing. Step 10
At 2, raster scanning is performed on the memory in which the input image is stored. In this raster scan, the coordinate system shown in FIG. 3 is scanned from left to right and from top to bottom. In step 103, a boundary for starting contour tracing is determined. In step 104, contour tracing is executed and the obtained contour data is stored. In the initialization of the mark storage memory in step 101, all the pixels are turned off.

【0010】入力画像の座標系は図3に示す如くであ
る。各画素の4つの境界は、図3(a)に示すようにあ
るon画素301を例に取って説明すると、上境界30
2、左境界303、下境界304、および右境界305
でなる。図2は図1におけるステップ104で行われる
処理の一例を示す流れ図である。ここでは、まず、図1
のステップ103で検出された輪郭追跡開始境界を輪郭
開始境界として記憶し(図2の201)、輪郭追跡開始
境界を現在の境界として登録する(図2の202)。次
に、現在の境界を輪郭データとして輪郭データ記憶メモ
リに記憶する(図2の203)。そして、現在の境界が
左境界であるかどうかを調べ(図2の204)、もし左
境界であればマーク記憶メモリの対応する画素に追跡済
みのマークを書き込む(図2の205)。続いて、輪郭
追跡ルールに従って次の境界を決定する(図2の20
6)。ここで、次の境界が輪郭開始境界と一致するかど
うかを調べ(図2の207)、もし一致すれば処理を終
了し、一致しない場合は、次の境界を現在の境界として
登録し図2のステップ203に戻るという処理を行う。
The coordinate system of the input image is as shown in FIG. The four boundaries of each pixel will be described by taking an on pixel 301 as shown in FIG.
2, left boundary 303, lower boundary 304, and right boundary 305
It becomes. FIG. 2 is a flow chart showing an example of the processing performed in step 104 in FIG. Here, first,
The contour tracking start boundary detected in step 103 is stored as the contour starting boundary (201 in FIG. 2), and the contour tracking starting boundary is registered as the current boundary ( 202 in FIG. 2). Next, the current boundary is stored as contour data in the contour data storage memory (203 in FIG. 2). Then, it is checked whether the current boundary is the left boundary (204 in FIG. 2), and if it is the left boundary, the tracked mark is written in the corresponding pixel of the mark storage memory (205 in FIG. 2). Then, the next boundary is determined according to the contour tracking rule (20 in FIG. 2).
6). Here, it is checked whether or not the next boundary matches the contour start boundary (207 in FIG. 2). If they match, the process ends. If they do not match, the next boundary is registered as the current boundary and The process of returning to step 203 is performed.

【0011】ここで、輪郭追跡のルールについて図4を
用いて説明する。入力画像のある境界401が輪郭とし
て追跡されたとき(以下、現在の輪郭あるいは現在の境
界という)、予め決められた方向(ここではon画素が常
に左になる方向)に従って、前記境界401のすぐ前方
の2つの画素、つまり左前方の画素411と右前方の画
素412のonとoffの組み合わせを調べる(図4
(a))。そして、以下に示すルールに従って、次に輪
郭として追跡すべき境界を決定する。
The contour tracking rule will be described with reference to FIG. When a certain boundary 401 of the input image is traced as a contour (hereinafter referred to as a current contour or a current boundary), the boundary 401 is immediately followed according to a predetermined direction (here, the on pixel is always left). The on / off combination of the two front pixels, that is, the left front pixel 411 and the right front pixel 412 is examined (see FIG. 4).
(A)). Then, according to the rule shown below, the boundary to be traced next as the contour is determined.

【0012】・左前方の画素411、右前方の画素41
2がともにonである時(図4(b))は、現在の境界に
対し右方向につながる境界402を次の輪郭とする。
A left front pixel 411 and a right front pixel 41
When both 2 are on (FIG. 4B), the boundary 402 connected to the right of the current boundary is set as the next contour.

【0013】・左前方の画素411、右前方の画素41
2がともにoffである時(図4(c))は、現在の境界
に対し左方向につながる境界403を次の輪郭とする。
A left front pixel 411 and a right front pixel 41
When both 2 are off (FIG. 4C), the boundary 403 connected to the left of the current boundary is set as the next contour.

【0014】・左前方の画素411がon、右前方の画素
412がoffである時(図4(d))は、現在の境界に
対しその進行方向にある境界404を次の輪郭とする。
When the pixel 411 on the left front side is on and the pixel 412 on the right front side is off (FIG. 4 (d)), the boundary 404 in the traveling direction with respect to the current boundary is taken as the next contour.

【0015】・左前方の画素411がoff、右前方の画
素412がonである時(図4(e))は、特別な判定方
法によって現在の境界に対し右方向につながる境界40
2あるいは現在の境界に対し左方向につながる境界40
3のどちらかを次の輪郭とする。ただし、前記特別な判
定方法として、ここでは常に右方向につながる境界40
2を次の輪郭とする。なお、特別な判定方法としては、
現在の境界の付近の画素のon,offの状態や、追跡境界の
状態を用いて、右方向につながる境界を選択する場合
と、左方向ににつながる境界を選択する場合を判断する
ようにしても良い。輪郭の多重追跡を防止するための追
跡済みマークの記憶方式について説明する。上記輪郭追
跡処理において、追跡された輪郭が図5(a)に示すよ
うにon画素301の左境界303である時には、マーク
記憶メモリの対応する画素501をonにするものとす
る。
When the pixel 411 on the left front side is off and the pixel 412 on the right front side is on (FIG. 4 (e)), the boundary 40 connected to the right side with respect to the current boundary is determined by a special determination method.
2 or a boundary 40 connected to the left of the current boundary
Either of 3 is set as the next contour. However, as the special determination method, here, the boundary 40 that is always connected in the right direction is used.
Let 2 be the next contour. In addition, as a special judgment method,
Use the on / off state of pixels near the current border and the state of the tracking border to determine when to select the border connecting to the right and when to select the border connecting to the left. Is also good. A method of storing a tracked mark for preventing multiple contour tracking will be described. In the contour tracing process, when the traced contour is the left boundary 303 of the on pixel 301 as shown in FIG. 5A, the corresponding pixel 501 in the mark storage memory is turned on.

【0016】輪郭追跡開始境界の条件について説明す
る。入力画像の各画素を左から右、上から下に走査し、
以下の条件を満たす境界を輪郭追跡開始境界とする。
The condition of the contour tracking start boundary will be described. Scan each pixel of the input image from left to right, top to bottom,
A boundary satisfying the following conditions is set as a contour tracking start boundary.

【0017】・X軸方向に連続する2つの画素がoff,on
の順番となっている。
Two consecutive pixels in the X-axis direction are off and on
It is the order of.

【0018】・上記入力画像のon画素に対応するマーク
記憶メモリの画素がoffである。
The pixel of the mark storage memory corresponding to the on pixel of the input image is off.

【0019】簡単のため、 入力画像の各画素の値 F(x,y) マーク記憶メモリの各画素の値 G(x,y) ただし、0≦x≦Xmax、0≦y≦Ymax(入力画像の大
きさ) とすると、上記条件は次のように書ける。
For simplicity, the value F (x, y) of each pixel of the input image is the value G (x, y) of each pixel of the mark storage memory, where 0 ≦ x ≦ Xmax, 0 ≦ y ≦ Ymax (input image Then, the above condition can be written as follows.

【0020】 ・F(x-1,y)=off and F(x,y)=on and G(x,y)=off 入力画像をX軸方向に走査し、off,onの順に連続してい
る画素の境界を検出することは、そのon画素の左境界が
検出されたことになる。また、このon画素に対応するマ
ーク記憶メモリの画素には、前記on画素の左境界が輪郭
として追跡されたかどうかがマークされている。従っ
て、上述の条件により輪郭追跡開始境界が検出できる。
ただし、入力画像の左端では F(-1,y) の値が必要とな
るがこれは常にoffであるとする。さて、輪郭追跡終了
は、輪郭追跡中に輪郭追跡開始境界が再び検出されたと
きである。なお図3〜7において、●がon画素を表すと
する。以上の各動作を基に、図6(a)に示す例の図を
用いて、本発明の実施例を説明する。まず、入力画像と
同じ大きさのマーク記憶メモリを用意し、すべての画素
をoffにしておく(図1の101)。この時のマーク記
憶メモリの状態を図7(a)に示す。そして、図6
(a)の入力画像を左から右、上から下に走査して(図
1の102)、輪郭追跡開始境界であるかどうかを判断
する(図1の103)。そこで、まず図6(b)の境界
601が検出され、輪郭追跡処理に移る(図1の10
4)。ここでは、最初に境界601が輪郭追跡開始境界
であること記憶する(図2の201)。次に輪郭開始境
界を現在の境界とし(図2の202)、現在の境界を輪
郭データとして記憶する(図2の203)。そして、現
在の境界が左境界かどうかを調べる(図2の204)。
境界601は左境界であるので、マーク記憶メモリの対
応する画素(図7(b)の701)をonにする(図2の
205)。輪郭追跡ルールに従って、現在の境界601
の進行方向のすぐ前の左右にある画素を調べ、左前方の
画素がon、右前方の画素がoffであることから次の境界
602が決定される(図2の206)。続いて、境界6
02が輪郭開始境界601か動かを調べ、境界602と
輪郭開始境界601は一致しないので(図2の20
7)、境界602を現在の境界として登録し(図2の2
08)、図2の203に戻る。このようにして、図2の
203〜208の動作を繰り返し、現在の境界が図6
(b)の603である時、図2輪郭追跡ルールに従って
次の境界601が決定した時、図2の207で次の境界
と輪郭開始境界が一致するので、輪郭追跡処理(図1の
104)を終了する。このとき、輪郭データ記憶メモリ
に記憶されている輪郭データの内容を図示すると、図6
(c)に示すような輪郭691が得られている。また、
マーク記憶メモリは図7(c)のようになっている。続
いて図1の102に戻り入力画像の走査を再開するが、
次の輪郭開始境界として検出されるのは境界611であ
る。図1の104の境界輪郭の追跡を実行し、追跡が終
了したときの輪郭データ記憶メモリの内容を図示したも
のを図6(d)に示す。新たに輪郭692が得られてい
るのが分かる。また、マーク記憶メモリの状態は図7
(d)のようになっている。さらに図1の102、10
3によって入力画像の走査と輪郭追跡開始境界の検出が
続けられ、次に検出される輪郭追跡開始境界は図6
(b)の621となる。そして、図1の104の輪郭追
跡処理が終了したときの、輪郭データ記憶メモリに記憶
されている内容を図示したものを図6(e)に示す。新
たに輪郭693が検出されたのが分かる。また、マーク
記憶メモリの状態を図7(e)に示す。さらに、図1の
102、103で入力画像の走査と輪郭追跡開始境界の
検出が行われるが、追跡されていない輪郭は残っていな
いので、走査範囲が入力画像を越えた時点で図1の10
2により走査終了となり、輪郭追跡処理全体が終了す
る。
F (x-1, y) = off and F (x, y) = on and G (x, y) = off The input image is scanned in the X-axis direction and is continuously turned off and on. Detecting the boundary of the existing pixel means that the left boundary of the on pixel is detected. Further, the pixel of the mark storage memory corresponding to this on pixel is marked whether or not the left boundary of the on pixel is traced as an outline. Therefore, the contour tracking start boundary can be detected under the above conditions.
However, the left edge of the input image requires a value of F (-1, y), which is always off. Now, the contour tracking end is when the contour tracking start boundary is detected again during the contour tracking. 3 to 7, it is assumed that the black circle represents an on pixel. Based on each operation described above, an embodiment of the present invention will be described with reference to the example diagram shown in FIG. First, a mark storage memory having the same size as the input image is prepared and all pixels are turned off (101 in FIG. 1). The state of the mark storage memory at this time is shown in FIG. And FIG.
The input image of (a) is scanned from left to right and from top to bottom (102 in FIG. 1), and it is determined whether or not it is a contour tracking start boundary (103 in FIG. 1). Therefore, the boundary 601 of FIG. 6B is first detected, and the contour tracking process is started (10 in FIG. 1).
4). Here, first, it is stored that the boundary 601 is the contour tracking start boundary (201 in FIG. 2). Next, the contour start boundary is set as the current boundary (202 in FIG. 2), and the current boundary is stored as the contour data (203 in FIG. 2). Then, it is checked whether the current boundary is the left boundary (204 in FIG. 2).
Since the boundary 601 is the left boundary, the corresponding pixel (701 in FIG. 7B) of the mark storage memory is turned on (205 in FIG. 2). The current boundary 601 according to the contour tracking rule
The pixels on the left and right immediately before the traveling direction of are checked, and the pixel on the left front is on and the pixel on the right front is off, so the next boundary 602 is determined (206 in FIG. 2). Then, boundary 6
02 checks the contour start boundary 601 or the movement, and the boundary 602 and the contour start boundary 601 do not match (see 20 in FIG. 2).
7), the boundary 602 is registered as the current boundary (2 in FIG. 2).
08), and return to 203 in FIG. In this way, the operations 203 to 208 in FIG. 2 are repeated, and the current boundary is changed to that in FIG.
In the case of 603 in (b), when the next boundary 601 is determined according to the contour tracking rule in FIG. 2, the next boundary and the contour start boundary match in 207 in FIG. 2, so the contour tracking processing (104 in FIG. 1). To finish. At this time, the contents of the contour data stored in the contour data storage memory are shown in FIG.
A contour 691 as shown in (c) is obtained. Also,
The mark storage memory is as shown in FIG. Then, returning to 102 in FIG. 1, the scanning of the input image is restarted.
The boundary 611 is detected as the next contour start boundary. FIG. 6D shows the contents of the contour data storage memory when the boundary contour tracing of 104 in FIG. 1 is executed and the tracing is completed. It can be seen that the contour 692 is newly obtained. The state of the mark storage memory is shown in FIG.
It looks like (d). Further, 102 and 10 in FIG.
3 continues scanning the input image and detecting the contour tracking start boundary, and the contour tracking start boundary detected next is shown in FIG.
It becomes 621 of (b). FIG. 6E shows the contents stored in the contour data storage memory when the contour tracking processing of 104 in FIG. 1 is completed. It can be seen that the contour 693 is newly detected. The state of the mark storage memory is shown in FIG. Further, the scanning of the input image and the detection of the boundary for starting contour tracking are performed in 102 and 103 of FIG.
The scanning is ended by 2, and the entire contour tracking processing is ended.

【0021】なお、以上に実施例を挙げ本発明を具体的
に説明したが、本発明はこの実施例に限定されるもので
はない。例えば、輪郭追跡方向については、on画素が常
に右になる方向としても良いし、また、入力画像の走査
方法は、右から左、上から下、または、下から上、左か
ら右、あるいは下から上、右から左であっても差支えな
い。その輪郭追跡方向、入力画像の走査方法、輪郭の多
重追跡を防ぐための追跡済みマークの書き込み方、輪郭
追跡開始境界の条件、追跡ルールには密接な関係がある
から、変更した条件に合わせて、輪郭の多重追跡を防ぐ
ための追跡済みマークの書き込み方、輪郭追跡開始境界
の条件、追跡ルールを変更すれば良い。
Although the present invention has been specifically described with reference to the embodiment, the present invention is not limited to this embodiment. For example, the contour tracking direction may be such that the on pixel is always on the right, and the scanning method of the input image is right to left, top to bottom, or bottom to top, left to right, or bottom. From top to right, right to left. The contour tracking direction, the scanning method of the input image, the method of writing the tracked mark to prevent the multiple tracking of the contour, the condition of the boundary for starting the contour tracking, and the tracking rule are closely related, so according to the changed condition It suffices to change the method of writing the tracked mark for preventing the multiple tracking of the contour, the condition of the contour tracking start boundary, and the tracking rule.

【0022】[0022]

【発明の効果】以上に述べたように、本発明では、2次
元パターンのon画素とoff画素の境界を輪郭として追跡
するようにしたから、得られた輪郭データをもとに画像
の拡大再生を行っても、元の2次元パターンと相似な画
像が再生される。また、作業メモリとしては、輪郭の多
重追跡を避けるため追跡済みのマークを書き込むための
メモリ、つまり、元の2次元パターンの各画素のあらか
じめ決められた方向の境界に対応する2値の記憶手段だ
けが必要である。そこで、その作業の所要容量は、元の
2次元パターンと同じである。このように、本発明を採
用することにより少ない作業メモリで輪郭追跡の実行が
可能となる。さらに、輪郭追跡の前処理として2次元パ
ターンを走査し、その結果を元にしたマーク記憶メモリ
への書き込みが不必要である。また、輪郭追跡では、現
在の追跡境界に対し、予め決められた方向のすぐ前方に
ある2つの画素のon,offのパターンによって次の追跡す
べき境界を見つけることができることから、高速な処理
が可能となる。
As described above, according to the present invention, the boundary between the on-pixels and the off-pixels of the two-dimensional pattern is traced as the contour. Therefore, the enlarged reproduction of the image is performed based on the obtained contour data. Even if is performed, an image similar to the original two-dimensional pattern is reproduced. The working memory is a memory for writing a tracked mark in order to avoid multiple contour tracking, that is, a binary storage means corresponding to the boundary of each pixel of the original two-dimensional pattern in a predetermined direction. Only needed. Therefore, the required capacity of the work is the same as the original two-dimensional pattern. As described above, by adopting the present invention, contour tracking can be executed with a small working memory. Further, it is not necessary to scan the two-dimensional pattern as a pre-process for contour tracing and write it in the mark storage memory based on the result. Further, in contour tracking, since a boundary to be tracked next can be found by an on / off pattern of two pixels immediately in front of a predetermined direction with respect to the current tracking boundary, high-speed processing is possible. It will be possible.

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

【図1】本発明の一実施例における処理の手順を示す流
れ図である。
FIG. 1 is a flowchart showing a processing procedure in an embodiment of the present invention.

【図2】図1のステップ104の詳細を示す流れ図であ
る。
FIG. 2 is a flowchart showing details of step 104 in FIG.

【図3】図1の実施例における入力画像の座標系と画素
の境界を示す図である。
FIG. 3 is a diagram showing a coordinate system of an input image and boundaries of pixels in the embodiment of FIG.

【図4】図1の実施例における輪郭追跡のルールを示す
図である。
FIG. 4 is a diagram showing a rule of contour tracking in the embodiment of FIG.

【図5】図1の実施例における追跡済みマークの記憶方
式を示す図である。
5 is a diagram showing a storage system of a tracked mark in the embodiment of FIG.

【図6】図1の実施例における入力画像の輪郭追跡方法
を例示する図である。
FIG. 6 is a diagram illustrating a contour tracking method for an input image in the embodiment of FIG.

【図7】図6の輪郭追跡に対応するマーク記憶メモリの
内容を示す図である。
7 is a diagram showing the contents of a mark storage memory corresponding to the contour tracking of FIG.

【符号の説明】[Explanation of symbols]

301…入力画像のon画素 302…画素301に対する上境界 303…画素301に対する左境界 304…画素301に対する下境界 305…画素301に対する右境界 401…現在の境界 402…現在の境界に対し右方向につながる次の境界 403…現在の境界に対し左方向につながる次の境界 404…現在の境界に対し進行方向につながる次の境界 411…現在の境界のすぐ左前方の画素 412…現在の境界のすぐ右前方の画素 501…マーク記憶メモリ上の画素 601、611、621…輪郭追跡開始境界 691、692、693…輪郭データ記憶メモリに記憶
された輪郭を図示した輪郭 701…追跡済みマーク
301 ... Input image on pixel 302 ... Pixel 301 upper boundary 303 ... Pixel 301 left boundary 304 ... Pixel 301 lower boundary 305 ... Pixel 301 right boundary 401 ... Current boundary 402 ... Right boundary with respect to current boundary Next boundary connected 403 ... Next boundary connected to the left side of the current boundary 404 ... Next boundary connected to the current boundary in the traveling direction 411 ... Pixel immediately left of the current boundary 412 ... Immediately of the current boundary Right front pixel 501 ... Pixel on mark storage memory 601, 611, 621 ... Contour tracking start boundary 691, 692, 693 ... Contour showing the contour stored in the contour data storage memory 701 ... Tracked mark

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 画素のon及びoffで表現された文
字、図形等の2値化2次元パターンを受け、該パターン
におけるonの画素とoffの画素の境界を輪郭として
追跡する輪郭追跡方法であって、画素メモリに記憶され
た2次元パターンのある隣接する画素間の境界が輪郭で
あるとき、予め決められた追跡方向で前記境界のすぐ前
方に位置する2つの画素のon又はoffの情報を画像
メモリから読み出し、前記2つの画素のon及びoff
の組み合わせによって、次の追跡すべき境界を判断する
ようにし、前記2次元パターンの各画素の4つの境界の
中で予め決められた方向の境界に対応する2値の記憶手
段を設け、前記境界が輪郭として追跡されたときには追
跡された境界に対応する前記記憶手段に追跡済みのマー
クを書き込むようにしたことを特徴とする輪郭追跡方
法。
1. A contour tracking method for receiving a binary two-dimensional pattern of a character, a figure, or the like represented by on and off of a pixel and tracing the boundary between the on pixel and the off pixel in the pattern as a contour. Then, when the boundary between adjacent pixels having a two-dimensional pattern stored in the pixel memory is a contour, information on or off of two pixels located immediately in front of the boundary in a predetermined tracking direction is provided. Read from the image memory and turn on and off the two pixels
Of the four boundaries of each pixel of the two-dimensional pattern by determining the boundary to be tracked next .
Binary memorizer corresponding to the boundary of a predetermined direction in
A step is provided so that when the boundary is traced as a contour, it is added.
A tracked marker in the storage means corresponding to the traced boundary.
A contour tracking method characterized in that the contour is written .
【請求項2】 輪郭追跡を開始する境界は、前記2次元
パターンの各画素をラスタスキャンし、on画素とof
f画素の境界を検出し、この境界に対応する前記記憶手
段の情報を読み出し、前記情報と追跡済みマークとを比
較して一致しないとき、該境界から輪郭の追跡を開始す
るようにしたことを特徴とする請求項に記載の輪郭追
跡方法。
2. A boundary for starting contour tracking is raster scan of each pixel of the two-dimensional pattern, and an on pixel and of
The boundary of f pixels is detected, the information in the storage means corresponding to this boundary is read out, and when the information and the tracked mark are compared and the two do not match, the contour tracking is started from the boundary. The contour tracking method according to claim 1, which is characterized in that:
JP5009571A 1993-01-22 1993-01-22 Contour tracking method Expired - Fee Related JP2513365B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5009571A JP2513365B2 (en) 1993-01-22 1993-01-22 Contour tracking method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5009571A JP2513365B2 (en) 1993-01-22 1993-01-22 Contour tracking method

Publications (2)

Publication Number Publication Date
JPH06223183A JPH06223183A (en) 1994-08-12
JP2513365B2 true JP2513365B2 (en) 1996-07-03

Family

ID=11723993

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5009571A Expired - Fee Related JP2513365B2 (en) 1993-01-22 1993-01-22 Contour tracking method

Country Status (1)

Country Link
JP (1) JP2513365B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006031245A (en) * 2004-07-14 2006-02-02 Japan Science & Technology Agency Image processing method and image processor by profile tracking of digital image
JP4807879B2 (en) * 2006-06-21 2011-11-02 株式会社バンダイナムコゲームス Image recognition apparatus, method, program, and information recording medium for extracting at least one recognition target image from input image data

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5847063A (en) * 1981-09-14 1983-03-18 Nitto Electric Ind Co Ltd Powder paint composition
JP2962556B2 (en) * 1989-07-04 1999-10-12 松下電器産業株式会社 Boundary tracking method

Also Published As

Publication number Publication date
JPH06223183A (en) 1994-08-12

Similar Documents

Publication Publication Date Title
JP2986383B2 (en) Method and apparatus for correcting skew for line scan images
US6654495B1 (en) Method and apparatus for removing ruled lines
JP4535584B2 (en) Digital image processing method
JP2513365B2 (en) Contour tracking method
JP3887843B2 (en) Method and apparatus for detecting and correcting vertical and horizontal lines of digitized image
JP3733686B2 (en) Image processing method and apparatus
JP3927171B2 (en) Noise removing apparatus and method, program, and recording medium
JP2846486B2 (en) Image input device
JPH10320557A (en) Telop character display frame detection method and device therefor
JPH0335372A (en) Image deciding device
CN102148918A (en) Image processing apparatus, image forming apparatus and image processing method
JPH0223904B2 (en)
JPS5922994B2 (en) Contour tracking device in character recognition device
JP2773127B2 (en) Image editing method
JPH0535872A (en) Contour tracing system for binary image
JP4442977B2 (en) Character recognition device, character image interpolation method, and recording medium recording character image interpolation program
JP3190794B2 (en) Character segmentation device
JPS59128677A (en) Optical character reader
JP2789835B2 (en) Table frame detection method and device
JPH0310144B2 (en)
JP2762691B2 (en) Embroidery data processing device
JP2910295B2 (en) Contour information extraction device
JP2962613B2 (en) Pattern filling method
JPH08221518A (en) Optical character reader
JP2785269B2 (en) Noise removal device

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19950912

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19960312

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080430

Year of fee payment: 12

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090430

Year of fee payment: 13

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100430

Year of fee payment: 14

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110430

Year of fee payment: 15

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120430

Year of fee payment: 16

LAPS Cancellation because of no payment of annual fees