JP2804347B2 - Image thinning method - Google Patents

Image thinning method

Info

Publication number
JP2804347B2
JP2804347B2 JP2147395A JP14739590A JP2804347B2 JP 2804347 B2 JP2804347 B2 JP 2804347B2 JP 2147395 A JP2147395 A JP 2147395A JP 14739590 A JP14739590 A JP 14739590A JP 2804347 B2 JP2804347 B2 JP 2804347B2
Authority
JP
Japan
Prior art keywords
thinning
processing
tracking
image
point
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
JP2147395A
Other languages
Japanese (ja)
Other versions
JPH0440575A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2147395A priority Critical patent/JP2804347B2/en
Publication of JPH0440575A publication Critical patent/JPH0440575A/en
Application granted granted Critical
Publication of JP2804347B2 publication Critical patent/JP2804347B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 〔概 要〕 画像の輪郭を追跡して逐次型の細線化処理を行う画像
の細線化方式に関し、 逐次型細線化処理において最も時間の掛かる追跡処理
を不要にして、全体の逐次型細線化処理を高速化するこ
とを目的とし、 画像の輪郭を追跡して逐次型の細線化処理を行う画像
の細線化方式において、画像を、細線化処理が未終了の
画像部分と細線化処理済みの細線画像部分に分割し、細
線化処理が未終了の画像部分についてのみ、その画像の
輪郭を追跡しながら細線化処理を行い、細線化処理を行
った残りの画像部分について、次の細線化処理のための
追跡を行う領域を再設定するように構成する。
DETAILED DESCRIPTION OF THE INVENTION [Summary] The present invention relates to a thinning method for an image in which an outline of an image is tracked and a sequential thinning process is performed. In order to speed up the entire sequential thinning process, in the image thinning method in which the contour of the image is traced and the sequential thinning process is performed, the image is processed in an image portion where the thinning process is not completed. The thinning process is divided into thin line image portions that have already been thinned, and only the image portion that has not been thinned is subjected to thinning processing while tracking the outline of the image, and the remaining image portion that has been thinned is processed. , An area to be tracked for the next thinning process is reset.

〔産業上の利用分野〕[Industrial applications]

本発明は、画像の輪郭を追跡して逐次型の細線化を行
う画像の細線化方式に関する。
The present invention relates to an image thinning method for performing successive thinning by tracking the outline of an image.

〔従来の技術〕[Conventional technology]

細線化処理は、画像処理において一般的に用いられて
いる手法であり、与えられた画像データから、その線幅
を縮めていくことにより、幅が1画素の中心線を抽出す
る処理である。この細線化処理は、例えば図面入力装置
において、入力された図形等の画像の面のイメージデー
タをCADデータに変換する際にも用いられる。
The thinning process is a method generally used in image processing, and is a process of extracting a center line having a width of one pixel by reducing the line width from given image data. This thinning process is also used when, for example, a drawing input device converts image data of an input image such as a figure into CAD data.

画像の細線化処理は、図形等の画像を1画素ずつ細め
ていく処理を繰り返すことで行われるが、この1画素を
細める処理は、例えば、3×3のマスクを利用した演算
で行われる。細線化処理に対応した3×3のマスクを予
め作成しておくことで、線幅が2画素以上のところを順
次削る処理が実現できる。
The image thinning process is performed by repeating a process of thinning an image such as a figure one pixel at a time, and the process of thinning one pixel is performed, for example, by an operation using a 3 × 3 mask. By preparing a 3 × 3 mask corresponding to the thinning processing in advance, it is possible to realize a processing of sequentially cutting off a portion having a line width of 2 pixels or more.

すなわち、画像全体について、このマスク演算を1回
行うことで、画像中の線幅が1画素だけ細められる。こ
の処理を細められる画素が無くなるまで、画面全体に繰
り返し行うことで、イメージデータの細線化処理が行わ
れる。
That is, by performing this mask operation once for the entire image, the line width in the image is reduced by one pixel. This processing is repeatedly performed on the entire screen until there are no pixels to be reduced, thereby performing the thinning processing of the image data.

この細線化処理の代表的なものとして、第11図(a)
に示す並列型の細線化処理と、同図(b)に示す逐次型
の細線化処理の二つがある。
FIG. 11 (a) shows a typical example of the thinning processing.
(B) and a sequential thinning process shown in FIG.

並列型の細線化処理は、第11図(a)に示すように、
前述の細線化の方法そのままに、画面全体についてマス
ク演算を行う方法である。この並列型の細線化処理は、
次に示す逐次型の細線化処理と比較して演算量は多い
が、処理が単純であるため、ハードウェア化に適してい
る。
In the parallel type thinning processing, as shown in FIG.
This is a method of performing a mask operation on the entire screen while keeping the thinning method as described above. This parallel thinning process
Although the amount of calculation is larger than that of the following sequential thinning processing, the processing is simple, so that it is suitable for hardware implementation.

一方、逐次型の細線化処理は、並列型のように画面全
体についてマスク演算を行うのではなく、図形のような
画像のあるところのみを削って行く処理である。
On the other hand, the sequential thinning process is a process in which a mask operation is not performed on the entire screen as in the parallel type, but only a portion of an image such as a figure is cut.

すなわち、第11図(b)に示すように、画像の輪郭を
追跡していきながらマスク演算を行い、画像の輪郭画素
を1画素ずつ削っていく手法であり、図形の輪郭を1周
するごとに、線幅が1画素分細められて行く。
In other words, as shown in FIG. 11 (b), this is a method of performing a mask operation while tracing the outline of an image and cutting out the outline pixels of the image one by one. Next, the line width is reduced by one pixel.

この逐次型細線化処理は、並列型に比較して処理が複
雑であるが、演算量が比較的少ないため、汎用プロセッ
サ上で実行するのに適している。画像の細線化処理自体
は、並列型の細線化処理でも逐次型の細線化処理でも、
ほぼ同一の結果が得られるが、ハードウェアのコストを
軽減するためには、汎用プロセッサを使用する手法の方
が望ましい。
The sequential thinning processing is more complicated than the parallel processing, but has a relatively small amount of calculation, and thus is suitable for execution on a general-purpose processor. The image thinning process itself can be performed in either a parallel thinning process or a sequential thinning process.
Almost the same results can be obtained, but in order to reduce hardware cost, a method using a general-purpose processor is preferable.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

並列型細線化処理は、処理が単純であるため、ハード
ウェア化することにより細線化処理を高速化することが
可能である。
Since the parallel thinning process is simple, it is possible to speed up the thinning process by implementing hardware.

しかし、画像の細線化処理自体は、前述のように並列
型の細線化処理でも逐次型の細線化処理でもほぼ同一の
結果が得られるが、ハードウェアのコストを軽減するた
めには、汎用プロセッサを使用する逐次型細線化処理の
方が有利である。
However, as described above, almost the same result can be obtained by the parallel thinning processing and the sequential thinning processing as described above, but in order to reduce hardware costs, a general-purpose processor is required. Is more advantageous in the sequential thinning process.

しかしながら、逐次型細線化処理は一般に処理が複雑
であり、特に輪郭の追跡処理に時間が掛かるため、ハー
ドウェアで実現された並列型細線化処理に比較して、そ
の細線化処理速度が一般に遅いという不都合があった。
However, the sequential thinning processing is generally complicated in processing, and in particular, it takes time to trace the contour. Therefore, the thinning processing speed is generally slower than the parallel thinning processing realized by hardware. There was an inconvenience.

本発明は、逐次型細線化処理において最も時間の掛か
る追跡処理を不要にし、細線化処理が未終了の画像部分
のみを追跡して細線化処理を行うことにより、逐次型細
線化処理を高速化するように改良した画像の細線化方式
を提供することを目的とする。
The present invention eliminates the need for the most time-consuming tracking processing in the sequential thinning processing, and speeds up the sequential thinning processing by tracking only the image portion for which the thinning processing has not been completed and performing the thinning processing. It is an object of the present invention to provide an image thinning method which is improved so as to perform the above.

〔課題を解決するための手段〕[Means for solving the problem]

前述の課題を解決するために本発明が採用した手段
を、第1図を参照して説明する。第1図は、本発明の原
理説明図である。
Means adopted by the present invention to solve the above-mentioned problem will be described with reference to FIG. FIG. 1 is a diagram illustrating the principle of the present invention.

第1図(a)及び(b)は本発明の逐次型細線化処理
を示し、同図(c)は従来の逐次型細線化処理を示す。
1 (a) and 1 (b) show a sequential thinning process according to the present invention, and FIG. 1 (c) shows a conventional sequential thinning process.

第1図において、P10及びP20とP11及びP21は細線化処
理の対象となる各画像を示し、L0,L10及びL20,L11及びL
21は、各画像を逐次型細線化処理する際の追跡経路を示
し、C0,C10及びC11は細線化済みの細線画像を示す。
In FIG. 1, P 10 and P 20 and P 11 and P 21 represents the images to be thinning process, L 0, L 10 and L 20, L 11 and L
Reference numeral 21 denotes a tracking path when each image is subjected to sequential thinning processing, and C 0 , C 10, and C 11 indicate thin line images which have been thinned.

また、SS10及びSS11は画像P10及びP11の追跡開始点を
示し、SE10及びSE11は画像P10及びP11の追跡終了点を示
し、SS20及びSS21は画像P20及びP21の追跡開始点を示
し、SE20及びSE21は画像P20及びP21の追跡終了点を示
す。
Also, SS 10 and SS 11 indicate the tracking start points of the images P 10 and P 11 , SE 10 and SE 11 indicate the tracking end points of the images P 10 and P 11 , and SS 20 and SS 21 indicate the images P 20 and shows the tracking start point of the P 21, SE 20 and SE 21 shows the track end point of the image P 20 and P 21.

本発明は、第1図(a)及び(b)に示す逐次型細線
化処理を行うために、次のように構成される。すなわ
ち、 画像の輪郭を追跡して逐次型の細線化処理を行う画像
の細線化方式において、 (a) 画像を、細線化処理が未終了の画像部分と細線
化処理済みの細線画像部分に分割し、 (b) 細線化処理が未終了の画像部分についてのみ、
その画像の輪郭を追跡しながら細線化処理を行い、 (c) 細線化処理を行った残りの画像部分について、
次の細線化処理のための追跡を行う領域を再設定する、 ように構成される。
The present invention is configured as follows to perform the sequential thinning processing shown in FIGS. 1 (a) and 1 (b). That is, in an image thinning method in which an outline of an image is tracked and a sequential thinning process is performed, (a) the image is divided into an image portion where the thinning process has not been completed and a thin line image portion which has been thinned (B) Only for the image portion for which the thinning process has not been completed,
A thinning process is performed while tracing the outline of the image. (C) For the remaining image portion subjected to the thinning process,
The tracking area for the next thinning process is reset.

〔作 用〕(Operation)

本発明の動作を、第1図(a)及び(b)を参照して
説明する。
The operation of the present invention will be described with reference to FIGS. 1 (a) and 1 (b).

先ず、処理対象となる各画像を、細線化処理が未終了
の画像P10及びP20と細線化処理済みの細線画像C10に分
割する。
First, each image to be processed, thinning processing is divided into the image P 10 and P 20 and thinning the processed thin line image C 10 unterminated.

次に細線化処理が未終了の画像の一つ(P10とする)
を選択し、この画像P10について、その輪郭を追跡しな
がら細線化処理を行う。具体的には、処理開始点SS10
り処理終了点SE10に至るまで、追跡経路L10に沿って追
跡しながら、画像P10について1回目の逐次型細線化処
理を行う。
One then thinning processing is not completed image (and P 10)
Select for the image P 10, it performs the thinning process while tracking the outline. Specifically, until the process end point SE 10 from the processing start point SS 10, while tracking along the track path L 10, the image P 10 of first the sequential thinning processing.

これにより、画像P10の輪郭部分が1画素分細められ
て、第1図(b)に示すように、画像P11が形成され
る。
Accordingly, the contour portion of the image P 10 is being narrowed one pixel, as shown in Fig. 1 (b), the image P 11 is formed.

次いで、この細線化を行った残りの画像P11につい
て、次の細線化処理のための追跡を行う領域を再設定す
る。具体的には、画像P11の処理開始点SS11及び処理終
了点SE11が再設定される。
Then, for the remaining images P 11 subjected to this thinning, resetting the region to track for subsequent thinning process. Specifically, the processing start point SS 11 and the processing end point SE 11 of the image P 11 is reset.

同様に、次の細線化処理対象となる画像(P20)をサ
ーチし、画像P10について、その輪郭を追跡しながら、
1回目の逐次型細線化処理を行う。具体的には、処理開
始点SS20より処理終了点SE20に至るまで、追跡経路L20
に沿って追跡しながら、画像P20について、1回目の逐
次型細線化処理を行う。
Similarly, the image (P 20 ) to be subjected to the next thinning processing is searched, and the contour of the image P 10 is tracked,
The first sequential thinning processing is performed. Specifically, from the processing start point SS 20 to the processing end point SE 20 , the tracking route L 20
While tracking along, the image P 20, performs first successive thinning processing.

これにより、画像P20の輪郭部分が1画素分細められ
て、第1図(b)に示すように、画像P21が形成され
る。
Accordingly, the contour portion of the image P 20 is being narrowed one pixel, as shown in Fig. 1 (b), the image P 21 is formed.

次いで、この細線化を行った残りの画像P21につい
て、次の細線化処理のための追跡を行う領域を再設定す
る。具体的には、画像P21の処理開始点SS21及び処理終
了点SE21が再設定される。
Then, for the remaining images P 21 subjected to this thinning, resetting the region to track for subsequent thinning process. Specifically, the processing start point SS 21 and the processing end point SE 21 of the image P 21 is reset.

本発明の場合は、細線化処理が終了した細線画像C10
については、追跡処理は行われない。
In the case of the present invention, the thin line image C 10 after the thinning process has been completed.
Is not tracked.

同様にして、画像P11及びP21について第2回目の逐次
型細線化処理を実行し、細線化を行った残りの画像部分
について、次の細線化処理のための追跡を行う領域を再
設定する。この場合も、細線化処理が終了した細線画像
C11については、追跡処理は行わない。
Similarly, run the images P 11 and P 21 the second round of sequential thinning processing for the remainder of the image portion subjected to thinning, resetting the region to track for subsequent thinning process I do. Also in this case, the thin line image after the thinning process is completed
For C 11 is the tracking process is not performed.

以下同様にして、各画像部分についてのみ逐次型細線
化処理を実行し、細線化処理を行った残りの画像部分に
ついて次の細線化処理のための追跡を行う領域を再設定
する処理を繰り返して、各画像がすべて細線化されたと
きに細線化処理を終了する。
In the same manner, the sequential thinning process is executed only for each image portion, and the process of resetting an area to be tracked for the next thinning process for the remaining image portions subjected to the thinning process is repeated. When all the images have been thinned, the thinning processing ends.

第1図(c)は、従来の逐次型細線化処理を、本発明
の逐次型細線化処理と対比するために示したものであ
る。従来の逐次型細線化処理は、画像P10、細線画像C0
及び画像P20を追跡経路L0に沿って一週しながら細線化
処理を実行していくことを繰り返しながら、各画像をす
べて細線化処理して行く。
FIG. 1C shows a conventional sequential thinning process for comparison with the sequential thinning process of the present invention. In the conventional sequential thinning processing, the image P 10 , the thin line image C 0
And repeating that they would perform the thinning processing while the image P 20 to week along track path L 0, go to process all thinning each image.

逐次型細線化処理では、輪郭の追跡処理が最も時間の
掛かる処理であるが、従来の逐次型細線化処理では、細
線化済みの細線画像C0についても毎回追跡処理を行うた
めに、全体の細線化処理速度を向上させることが困難で
あった。
In sequential thinning process, although the tracking process of the contour is the most time-consuming process, in the conventional sequential thinning process, in order to perform each tracking processing for fine line image C 0 thinning already, whole It has been difficult to improve the thinning processing speed.

これに対して、本発明は細線化が未終了の画像部分に
ついてのみ、その画像の輪郭を追跡しながら細線化処理
を行い、細線化処理が終わった細線画像部分については
追跡処理を行わないようにしたので処理量が低減され、
従来の逐次型細線化処理に比べて、その処理速度を向上
させることができる。
On the other hand, according to the present invention, the thinning process is performed only on the image portion that has not been thinned while tracking the outline of the image, and the tracking process is not performed on the thin line image portion that has been thinned. To reduce the amount of processing,
The processing speed can be improved as compared with the conventional sequential thinning processing.

〔実施例〕〔Example〕

本発明の一実施例を、第2図〜第10図を参照して説明
する。第2図は本発明の一実施例の実施システムの説明
図、第3図は同実施例に使用される細線化処理済み検出
マスクパターンの説明図、第4図は同実施例に使用され
る輪郭点テーブルの説明図、第5図は同実施例の全体の
処理の流れを示すフローチャート、第6図は同実施例の
閉ループ時の処理フローチャート、第7図は同実施例の
閉ループ時の処理の説明図。第8図は同実施例の非閉ル
ープ時の処理フローチャート、第9図は同実施例の非閉
ループ時の処理の説明図、第10図は同実施例のオーバー
フロー時の処理の説明図である。
One embodiment of the present invention will be described with reference to FIGS. FIG. 2 is an explanatory view of a system for implementing an embodiment of the present invention, FIG. 3 is an explanatory view of a thinned detection mask pattern used in the embodiment, and FIG. 4 is used in the embodiment. FIG. 5 is a flowchart showing the overall processing flow of the embodiment, FIG. 6 is a processing flowchart at the time of a closed loop of the embodiment, and FIG. 7 is a processing flow at the time of a closed loop of the embodiment. FIG. FIG. 8 is a flowchart of a process in the non-closed loop of the embodiment, FIG. 9 is an explanatory diagram of a process in the non-closed loop of the embodiment, and FIG. 10 is an explanatory diagram of a process in an overflow of the embodiment.

(A)実施システムの構成 第2図において、11は画像メモリであり、細線化処理
対象となる各画像のイメージデータ及び細線化処理結果
の細線画像データが格納される。
(A) Configuration of Implementation System In FIG. 2, reference numeral 11 denotes an image memory, which stores image data of each image to be subjected to thinning processing and thin line image data as a result of the thinning processing.

12はマスクテーブルであり、細線化処理を行う際に使
用されるマスク演算用の各種マスクパターンのデータが
格納される。細線化処理用のマスクパターンとして、例
えば3×3の画像が与えられたときに、中心の1画素を
白画素とすべきか黒画素とすべきかを判定するためのす
べてのパターンが格納される。
Reference numeral 12 denotes a mask table, which stores data of various mask patterns for mask calculation used when performing the thinning processing. As a mask pattern for thinning processing, for example, when a 3 × 3 image is given, all patterns for determining whether a central pixel should be a white pixel or a black pixel are stored.

また、マスクテーブル12には、中心画像が細線化処理
済みの画像であるか否かを判別するため情報も格納され
ている。
The mask table 12 also stores information for determining whether or not the center image has been subjected to the thinning processing.

第3図(a)〜(c)は、この情報として、中心画素
が細線化処理済みであることを判別する3×3の各種マ
スクパターンの例を示したものである。これらのマスク
パターンは線幅が1の画像を検出するパターンであり、
これにより、中心画素が細線化処理済みであることを容
易に判別することができる。
FIGS. 3A to 3C show, as this information, examples of 3 × 3 various mask patterns for determining that the center pixel has been thinned. These mask patterns are patterns for detecting an image having a line width of 1,
This makes it easy to determine that the center pixel has been subjected to the thinning processing.

13は輪郭点テーブルであり、細線化処理を行う領域の
追跡開始点及び追跡終了点のデータが格納される。
Reference numeral 13 denotes a contour point table, which stores data of a tracking start point and a tracking end point of an area to be thinned.

第4図は輪郭点テーブル13の構成の1例を示したもの
であり、同図(a)の131,132等は、各画像について作
成された各輪郭点テーブルを示す。
FIG. 4 shows an example of the configuration of the contour point table 13. Reference numerals 131 and 132 in FIG. 4A denote each contour point table created for each image.

同図(b)は同図(a)の各輪郭点テーブル131,132
等の内容を示したものである。追跡開始点領域には、追
跡を開始する点の座標(Xs,Ys)及び追跡を開始する方
向(Ds)が格納され、追跡終了領域には、追跡を終了す
る点の座標(Xe,Ye)及び追跡を開始する方向(De)が
格納される。同図(c)に示す追跡開始点及び同図
(d)に示す追跡終了点については、実施例の動作の項
で説明する。
FIG. 13B shows the respective contour point tables 131 and 132 of FIG.
And the like. The tracking start point area stores the coordinates (Xs, Ys) of the point at which tracking starts and the direction (Ds) at which tracking starts, and the tracking end area stores the coordinates (Xe, Ye) of the point at which tracking ends. And the direction (De) to start tracking are stored. The tracking start point shown in FIG. 3C and the tracking end point shown in FIG. 3D will be described in the section of the operation of the embodiment.

14はマイクロプロセッサ(以下、MPUで示す)であ
り、画像メモリ11、マスクテーブル12及び輪郭点テーブ
ル13を用いて、追跡開始点から追跡終了点まで細線化処
理等、細線化処理全体を制御実行する。
Reference numeral 14 denotes a microprocessor (hereinafter, referred to as an MPU), which controls and executes the entire thinning process such as the thinning process from the tracking start point to the tracking end point using the image memory 11, the mask table 12, and the contour point table 13. I do.

15は制御メモリであり、MPU14の行う逐次型細線化処
理の制御プログラムが格納され、また、細線化処理の実
行の有無を指示する細線化処理フラグ(THINNED)を格
納する細線化処理フラグ領域151、スタートフラグ(sta
rtflg)を格納するスタートフラグ領域152及び細線化処
理を行うときの作業領域(図示せず)も設けられてい
る。
Reference numeral 15 denotes a control memory which stores a control program for the sequential thinning process performed by the MPU 14 and a thinning process flag area 151 which stores a thinning process flag (THINNED) for instructing execution of the thinning process. , Start flag (sta
rtflg), and a work area (not shown) for performing the thinning process.

スタートフラグ(startflg)は、追跡開始点及び追跡
終了点のサーチ中の有無を指示するフラグであり、次の
ような意味を持っている。
The start flag (startflg) is a flag that indicates whether or not the search for the tracking start point and the tracking end point is being performed, and has the following meaning.

startflg=1:追跡開始点のサーチ中、まだ候補点(細線
化点)は見つかっていない。
startflg = 1: During the search for the tracking start point, no candidate point (thinning point) has been found yet.

=2:追跡開始点のサーチ中、候補点は見つかっ
ている。
= 2: Candidate points are found during the search for the tracking start point.

=−1:追跡終了点のサーチ中。 = -1: Searching for tracking end point.

(B)実施例の動作 本発明の一実施例の逐次型細線化処理を第4図〜第10
図を参照し、細線化処理の全体の流れ、閉ループ時の処
理、非閉ループ時の処理等に分けて説明する。
(B) Operation of the embodiment FIGS. 4 to 10 show the sequential thinning processing according to the embodiment of the present invention.
With reference to the drawings, the overall flow of thinning processing, processing in a closed loop, processing in a non-closed loop, and the like will be described separately.

(B1)細線化処理の全体の流れ 細線化処理全体の流れを、第5図を参照し、その処理
順序に従って説明する。なお、以下の各処理は、特に言
及しない限り、すべてMPU14によって行われるものであ
る。
(B1) Overall Flow of Thinning Processing The overall flow of thinning processing will be described with reference to FIG. 5 and in the order of processing. The following processes are all performed by the MPU 14 unless otherwise specified.

処理S1 処理S1では、輪郭点テーブル13を初期設定する処理が
行われ、画像メモリ11中の全画像を操作して、すべての
輪郭について、追跡処理の開始点となる点が求められ、
その画像の輪郭点テーブルの追跡開始点領域に登録され
る。この追跡開始点は、走査している画像の輪郭線上の
任意の1点でよい。
Process S 1 In process S 1 , a process of initializing the contour point table 13 is performed, all images in the image memory 11 are operated, and for all contours, a point serving as a start point of the tracking process is obtained.
It is registered in the tracking start point area of the contour point table of the image. This tracking start point may be any one point on the contour line of the image being scanned.

処理S2 THINNEDフラグが「0」にリセットされて、細線化処
理が実行されていないことが指示される。このTHINNED
フラグは、次に説明する処理S3のDO文の処理ループのな
かで1度でも細線化処理が実行されれば、「1」がセッ
トされ、1度も細線化処理が実行されなければ、「0」
がセットされる。
Process S 2 The THINNED flag is reset to “0” to indicate that the thinning process has not been executed. THINNED
Flag, if thinning process at least once among the processing loop of DO statement processing S 3 described below is executed, "1" is set, if once even thinning process is performed, "0"
Is set.

細線化処理が1度も実行されなければ、「すべての輪
郭点テーブルが細線化処理が終了した」ということであ
るので、細線化処理は終了する。
If the thinning process has not been executed at all, it means that "all the outline point tables have completed the thinning process", and the thinning process ends.

処理S3(DO文) 以下の処理が終わるまで、複数ある輪郭点テーブルの
その始め(輪郭点テーブル131)から終わりまで、一つ
ずつ輪郭点テーブルを取り出す処理を行う。
Process S 3 (DO sentence) Until the following process is completed, a process of extracting the contour point tables one by one from the beginning (contour point table 131) to the end of a plurality of contour point tables is performed.

処理S4(IF文) 処理S3で取り出された輪郭点テーブルの画像が細線化
処理済みであるか、それともまだ細線化処理が可能か否
かが判別される。
Process S 4 (IF sentence) It is determined whether the image of the contour point table extracted in process S 3 has been subjected to the thinning process, or whether the thinning process is still possible.

細線化処理済みであれば、細線化処理は不要であるの
で、細線化処理をスキップして処理S4のDO文の先頭に戻
る。
If the thinning process has been, since the thinning process is not required, back to the top of the DO statement of processing S 4 to skip the thinning process.

細線化処理が可能の場合は、IF文の下に書かれている
S5以下の処理が行われる。
If thinning is possible, it is written below the IF statement
S 5 the following process is performed.

処理S5 細線化処理が可能の場合は(処理S4でYES)、細線化
処理フラグ(THINNEDフラグ)151が「1」にセットさ
れ、細線化処理の実行が指示される。
For processable S 5 thinning process (YES in the process S 4), thinning processing flag (THINNED flag) 151 is set to "1", execution of the thinning processing is instructed.

処理S6 更に、その輪郭点テーブルの画像の細線化処理が、閉
ループの場合の細線化処理であるか否かが判別される。
Processing S 6 further thinning processing of image of the contour point table, whether the thinning process in the case of the closed loop is determined.

処理S7 閉ループの場合の細線化処理である場合は(処理S6
YES)、閉ループ時の細線化処理が実行される。細線化
処理では、各画像の輪郭を追跡しながら、1画素の細線
化処理が行われる。
Processing S 7 If the processing is a thinning processing in the case of a closed loop (in processing S 6
YES), the thinning processing at the time of the closed loop is executed. In the thinning processing, thinning processing of one pixel is performed while tracking the outline of each image.

この閉ループ時の細線化処理については、次の(B2)
項で詳細に説明する。
The thinning processing at the time of this closed loop is described in the following (B2)
This is explained in detail in the section.

処理S8 閉ループでない場合の細線化処理である場合は(処理
S6でELSE)、非閉ループ時の細線化処理が実行される。
この非閉ループ時の細線化処理については、次の(B3)
項で詳細に説明する。
Processing S 8 If the processing is not a closed loop and the processing is thinning (processing
In S 6 ELSE), thinning processing at the time of non-closed loop is executed.
Regarding the thinning processing at the time of the closed loop, the following (B3)
This is explained in detail in the section.

処理S9 THINNEDフラグが「1」、すなわち細線化処理が1回
実行されたか否かが判別される。
Process S 9 It is determined whether the THINNED flag is “1”, that is, whether or not the thinning process has been performed once.

処理S10 細線化処理が1回実行されたときは(処理S9でYE
S)、その画像の輪郭点テーブルに、細線化処理によっ
て新たに作成された輪郭点テーブルが追加登録される。
なお、この画像の輪郭点テーブルに、細線化処理によっ
て新たに作成された輪郭点テーブルを追加登録する処理
については、次の閉ループ時及び非閉ループ時の処理の
項で詳述する。
When the process S 10 thinning process has been performed once YE in (process S 9
S), a contour point table newly created by the thinning process is additionally registered in the contour point table of the image.
The process of additionally registering the contour point table newly created by the thinning process in the contour point table of this image will be described in detail in the next section on closed loop and non-closed loop.

以上の処理が終わると、THINNEDフラグが「1」で
あって1度でも細線化処理が実行されていれば、まだ細
線化処理できる可能性があるので、ループ(Loop)にジ
ャンプして再び処理S2に戻り、前述のS2〜S10の各処理
が繰り返えされる。
When the above processing is completed, if the THINNED flag is “1” and the thinning processing has been performed at least once, there is a possibility that the thinning processing can still be performed. Therefore, the processing jumps to a loop (Loop) and the processing is performed again. returning to S 2, the processing of S 2 to S 10 described above are repeated Kaee.

これにより、1回の細線化処理が終わる毎に各画像の
輪郭は1画素分ずつ細められて行き、各画像が細線化さ
れるまで、前述の処理S3のDO文のループを回り続ける。
Thus, once the outline of each image for each thinning process ends went been narrowed by one pixel, to each image are thinned, continues around the loop of DO statements of the aforementioned process S 3.

なお、処理S4のIF文の処理の所で説明したように、細
線化処理の終わった細線画像部分はスキップされて、細
線化処理は行われない。
As explained at the process of IF statement processing S 4, finished fine line image portions of the thinning processing is skipped, the thinning processing is not performed.

各画像についての細線化処理が終了すると、処理S9
においてTHINNEDフラグが「0」の状態を保持されるの
で、各画像の細線化処理がすべて終了したことが検知さ
れて細線化処理が終了する。
When the thinning processing for each image is completed, processing S 9
Since the state of the THINNED flag is maintained at "0" in step (3), it is detected that the thinning processing of each image has been completed, and the thinning processing ends.

次に、閉ループ時及び非閉ループ時(閉ループでない
時)の処理について説明する。閉ループ時及び非閉ルー
プ時の処理の説明に先立って、先ず追跡開始点及び追跡
終了点のサーチ処理を、第4図(c)及び(d)を参照
して説明する。
Next, processing in a closed loop and a non-closed loop (when not a closed loop) will be described. Prior to the description of the processing at the time of the closed loop and the non-closed loop, the search processing of the tracking start point and the tracking end point will be described first with reference to FIGS. 4 (c) and 4 (d).

追跡開始点とは、第4図(c)に示すように、細線化
処理された画素(●で示す)から、細線化処理されてい
ない画素(○で示す)を追跡したときの、境界部分の細
線化処理済みの画素(@で示す)である。
The tracking start point is, as shown in FIG. 4 (c), a boundary portion when a pixel (not shown) which has not been thinned is tracked from a pixel which has been thinned (shown by ●). Is a pixel (indicated by の) after the thinning process.

追跡終了点とは、逆に第4図(d)に示すように、細
線化処理されていない画素から、細線化処理済みの画素
を追跡したときの、境界部分の細線化処理済みの画素
(◎で示す)である。
On the contrary, as shown in FIG. 4 (d), the tracking end point is defined as a pixel which has been subjected to thinning processing at a boundary portion when a thinned pixel has been tracked from a non-thinned pixel.示 す).

以上の追跡開始点及び追跡終了点は閉ループでない場
合での追跡開始点及び追跡終了点として使用される。閉
ループの場合は、追跡開始点及び追跡終了点が画像輪郭
線上の任意の一点であって、両者は共通しているので、
追跡開始点の座標点と一致する追跡点が追跡終了点とな
る。
The above-mentioned tracking start point and tracking end point are used as the tracking start point and tracking end point when the loop is not closed. In the case of a closed loop, the tracking start point and the tracking end point are arbitrary points on the image outline, and both are common.
A tracking point that matches the coordinate point of the tracking start point is the tracking end point.

追跡開始点及び追跡終了点を見つけることは、前記の
ようなパターンを、画像の輪郭を追跡しながら探し出す
ことに他ならない。第6図〜第9図に示す閉ループ時及
び非閉ループ時の細線化処理における追跡処理は、すべ
てこのパターンを探し出すための処理を示したものであ
る。
Finding the tracking start point and the tracking end point is nothing but searching for such a pattern while tracking the outline of the image. The tracking processing in the thinning processing at the time of the closed loop and at the time of the non-closed loop shown in FIG. 6 to FIG. 9 all shows processing for searching for this pattern.

具体的には、追跡開始点は、次の条(a)及び(b)
に示す条件1及び条件2のANDが成立したときの画素と
して求められる。
Specifically, the tracking start point is determined by the following Articles (a) and (b)
Are obtained as pixels when the AND of the conditions 1 and 2 shown in FIG.

(a)条件1:現在の画素が細線化処理済みの点である。(A) Condition 1: The current pixel has been subjected to the thinning processing.

(b)条件2:startflg=2(現在追跡している点の前の
点は、細線化処理済みの点である)。
(B) Condition 2: startflg = 2 (the point before the currently tracked point is a point already subjected to thinning processing).

一方、追跡終了点は、次の条(c)及び(d)に示す
条件3及び条件4のANDが成立したときの画素として求
められる。
On the other hand, the tracking end point is obtained as a pixel when the AND of the conditions 3 and 4 shown in the following Articles (c) and (d) is satisfied.

(c)条件1:現在の画素が細線化処理済みの点である。(C) Condition 1: The current pixel has been subjected to the thinning processing.

(d)条件2:startflg=−1(現在追跡している点の前
の点は、細線化処理されていない点である)。
(D) Condition 2: startflg = −1 (the point before the currently tracked point is a point that has not been thinned).

この追跡開始点及び追跡終了点検出方法は、閉ループ
時及び非閉ループ時の処理において同じである。非閉ル
ープの場合は前記方法により、最初に追跡開始点の探索
が行われる。これに対して、閉ループの場合には最初に
追跡開始点を探索するため、追跡開始点よりも先に追跡
終了点が検出されることになる。
The tracking start point and tracking end point detection method is the same in the processing at the time of the closed loop and at the time of the non-closed loop. In the case of a non-closed loop, a search for a tracking start point is first performed by the above method. On the other hand, in the case of a closed loop, since the tracking start point is searched first, the tracking end point is detected earlier than the tracking start point.

(B2)閉ループ時の処理 閉ループ時の処理は、第7図に示す(1)〜(5)の
順番で行われ、(1)〜(5)の処理は第6図の処理フ
ローチャートに示す手順に従って行われる。以下、第6
図及び第7図を参照して、閉ループ時の細線化処理及び
輪郭点テーブル13の作成/更新処理を第7図の処理順に
従って説明する。
(B2) Processing at the time of the closed loop The processing at the time of the closed loop is performed in the order of (1) to (5) shown in FIG. 7, and the processing of (1) to (5) is the procedure shown in the processing flowchart of FIG. It is performed according to. Hereinafter, the sixth
With reference to FIG. 7 and FIG. 7, the thinning processing at the time of the closed loop and the creation / update processing of the contour point table 13 will be described in accordance with the processing order of FIG.

なお、以下の各処理は、特に言及しない限りすべてMP
U14によって行われるものである。
The following processes are all MP
This is done by U14.

(1) 処理(1) 第7図の処理(1)は、第6図の処理フローチャート
に示す次の手順に従って行われる。
(1) Processing (1) The processing (1) in FIG. 7 is performed according to the following procedure shown in the processing flowchart in FIG.

なお、前述の初期化処理により、各画像の輪郭点テー
ブルには、追跡開始点が登録されているものとする。
It is assumed that the tracking start point has been registered in the contour point table of each image by the above-described initialization processing.

また、初期状態での細線化処理は、通常の逐次型細線
化処理と同様に各画像の輪郭を1周分追跡する必要があ
るために、輪郭点テーブルには、追跡開始点の情報のみ
を登録し、追跡終了点はゼロクリアすることで、1周分
の追跡を行うテーブルであることが示されるものとす
る。
In the thinning process in the initial state, it is necessary to trace the outline of each image for one round, as in the ordinary sequential thinning process. Therefore, only the information of the tracking start point is stored in the outline point table. By registering and clearing the tracking end point to zero, it is indicated that the table is a table for tracking one round.

輪郭点テーブル13を参照して、一つの図形の輪郭点
テーブルを取り出す。いま、第7図(1)に示す一連の
図形画像P10、細線画像C10及び画像P20からなる一連の
図形であり、その輪郭点テーブルは、第7図(a)に示
すテーブル131であるとする。輪郭点テーブル131には、
画像P10の追跡開始点STの座標(X0,Y0)及び追跡の方向
(d0)が格納されている。また、追跡終了点の各データ
はオール零にリクヤされていて、閉ループ処理であるこ
とを示している。
With reference to the contour point table 13, a contour point table of one figure is extracted. Now, it is a series of figures composed of a series of figure images P 10 , thin line images C 10 and images P 20 shown in FIG. 7A, and the outline point table is a table 131 shown in FIG. 7A. Suppose there is. In the contour point table 131,
Tracking start point ST of the coordinates of the image P 10 (X 0, Y 0 ) and the direction of tracking (d 0) is stored. Further, each data at the tracking end point has been requested to be all zero, indicating that the data is a closed loop process.

追跡終了点をサーチするために、startflgを「−1」
にセットする(第6図の処理S1を参照、以下、第6図の
処理Siを単に処理Siで示す)。
To search for the tracking end point, set startflg to "-1"
Is set to (see process S 1 in FIG. 6, hereinafter, simply indicated by process Si processing Si of FIG. 6).

なお、startflgは、前述のように、次のような内容を
持つフラグである。
Note that startflg is a flag having the following contents as described above.

startflg=1:追跡開始点のサーチ中、まだ候補点(細線
化点)は見つかっていない。
startflg = 1: During the search for the tracking start point, no candidate point (thinning point) has been found yet.

=2:追跡開始点のサーチ中、候補点は見つかっ
ている。
= 2: Candidate points are found during the search for the tracking start point.

=−1:追跡終了点のサーチ中。 = -1: Searching for tracking end point.

追跡開始点STと追跡終了点の座標及び方向とも一致
するまで、すなわち追跡終了点の座標点及び追跡方向が
X0,Y0及びd0になるまで、以下の各処理が行われる(処
理S2)。先ず、現在注目している画素は細線化処理済み
か否かが判別される(処理S3)。
Until the coordinates and directions of the tracking start point ST and the tracking end point also match, that is, the coordinate points and the tracking direction of the tracking end point
The following processes are performed until X 0 , Y 0, and d 0 (process S 2 ). First, it is determined whether or not the currently focused pixel has been subjected to the thinning processing (processing S 3 ).

現在注目している画素は細線化処理済みではないの
で(第6図ELSE)、処理S11が行われ、startflgが
「2」、すなわち追跡開始点のサーチが終了か否かが判
別される。
Pixels that are currently of interest is not a thinning-treated (FIG. 6 ELSE), the process S 11 is performed, Startflg is "2", i.e. the search of the tracking starting point whether the end is determined.

追跡開始点のサーチはみ終了であるので、S14の細
線化処理が行われる。処理S14では、MPU14が、マスクテ
ーブル12及び輪郭点テーブル131を使用し、方向doの経
路に沿って追跡を開始し、追跡開始点STから始まる画像
P10の最初の1画素を細線化する。
Since the search of the tracing starting point is the observed completion, thinning processing of S 14 is performed. In the process S14, the MPU 14 starts tracking along the route in the direction do using the mask table 12 and the contour point table 131, and starts the image starting from the tracking start point ST.
Thinning the first one pixel of the P 10.

画像P10の最初の1画素の細線化処理が終了する
と、処理S2に戻り、前述の〜の処理が繰り返され、
画像P10の次の1画素の細線化処理が行われる。以下同
様にして、方向doの輪郭線に沿って画像P10に対する細
線化処理が繰り返し実行される。
When the first 1 pixel thinning processing of image P 10 is completed, the process returns to S 2, is repeated Work with the foregoing,
Thinning processing of the next 1 pixel of the image P 10 is performed. Hereinafter similarly, thinning processing on the image P 10 along the contour line direction do is repeatedly executed.

(2) 処理(2) 第7図の処理(1)は、第6図の処理フローチャート
に示す次の手順に従って行われる。なお、各手順の番号
は、前述の処理(1)の続き番号で示される。
(2) Process (2) The process (1) in FIG. 7 is performed according to the following procedure shown in the process flowchart in FIG. The number of each procedure is indicated by a continuation number of the above-described process (1).

細線化処理を実行して行き、座標点がXm,Ymの画素
に到達すると、処理S3において、現在注目している画素
が細線化処理済みであることが検出される。この検出処
理は、第3図で説明した細線化処理済み検出用のマスク
パターンを用いて行われる。
Continue to perform the thinning processing, the coordinate point Xm, reaches the pixel of Ym, in the process S 3, the pixel currently focused is detected to be a thinning processed. This detection processing is performed using the mask pattern for detection of the completion of the thinning processing described with reference to FIG.

細線化処理済みの画素が検出されたときは(処理S3
でYES)、startflgが「1」、すなわち追跡開始点のサ
ーチ中であるか否かが判別される(処理S4)。追跡終了
点のサーチ中であるので、次の処理S6が行われる。
When a thinned pixel is detected (processing S 3
In YES), startflg is "1", i.e. whether it is during the search of the tracking start point is determined (process S 4). Since it is in search of the tracking termination point, the next process S 6 is carried out.

処理S6では、startflgが「−1」、すなわち追跡終
了点のサーチ中であるか否かが判別される。追跡終了点
のサーチ中であるのでYESと判別されて、次の処理S7
行われる。
In process S 6, startflg is "-1", ie, whether it is during the search of the tracking end point is determined. Since it is in search of the tracking end point is determined YES, and the next process S 7 is performed.

処理S7では、既に追跡開始点が登録されている輪郭
点テーブルの有無が判別される。追跡開始点が登録され
ている輪郭点テーブルは無いので、ELSEと判別され、次
の処理S9が行われる。
In process S 7, whether the contour point table that is already registered tracking start point is determined. Since contour point table tracking start point is registered not, it is determined that ELSE, the next process S 9 is performed.

処理S9では、第7図(2)に示すように新たに輪郭
点テーブル132が作成され、健在の画素点のX,Y座標及び
方向、すなわち座標Xm:Ym及び方向dmが追跡終了点とし
て格納される。なお、輪郭点テーブル132の追跡開始点
の「−」印は、その座標及び方向に関するデータでない
ことを示す情報である。
In step S 9, the newly contour point table 132 as shown in FIG. 7 (2) is created, X of alive pixel point, Y-coordinate and direction, i.e. the coordinate Xm: Ym and direction dm is the track end point Is stored. Note that the “−” mark of the tracking start point in the contour point table 132 is information indicating that the data is not data relating to the coordinates and the direction.

処理S9の追跡終了点登録処理が終ると、次の処理S
10に移ってstartflgを「1」に更新し、次の画像の追跡
開始点のサーチ中で、まだ候補点(細線化点)は見つか
っていないことを指示する。
When tracking endpoint registration processing S 9 is completed, the next process S
In step 10 , the startflg is updated to "1" to indicate that no candidate point (thinning point) has been found during the search for the tracking start point of the next image.

処理S3に戻り、マスクテーブル12にある細線化処理
済み検出用マスクを利用して、現在注目している画素が
細線化済みか否かが判別される。
The process returns to S 3, by using the thinning processed detection mask in the mask table 12, the pixel that is currently of interest is whether the thinning already or not.

細線化処理済みであるので、YESと判別されて次のS
5の処理が行われ、startflgが「2」すなわち追跡開始
点のサーチ中で、候補点が見つかっていることが指示さ
れる。
Since the thinning processing has been completed, YES is determined and the next S
The process of 5 is performed, and the startflg is "2", that is, it is instructed that the candidate point is found during the search for the tracking start point.

以下前述の処理S3〜S5の処理が繰り返され、細線画
像C10に沿って追跡が行われる。
The following treatment of the aforementioned processes S 3 to S 5 is repeated, the tracking is performed along the fine line image C 10.

画像P20の追跡開始点(座標Xn,Yn)に到達すると、
現在注目している画素が細線化処理済みではないので、
処理S3においてELSEと判別され、ステップS11の処理が
行われる。
Tracking start point of the image P 20 (coordinates Xn, Yn) is reached, the
Since the current pixel of interest has not been thinned,
In process S 3 is judged ELSE, the process of step S 11 is performed.

処理S11では、startflgが「2」であるか否か、す
なわち追跡開始点のサーチが終了か否かが判別される。
In the process S 11, whether startflg is "2", i.e. the search of the tracking starting point whether the end is determined.

startflgは「2」であるので、次の処理S12が行わ
れ、第7図(3)に示すように、新たに輪郭点テーブル
133が一つ作成され、その追跡開始点に現在の画素点の
直前の画素点のX,Y座標、すなわちXn-1、Yn-1及び追跡
方向dn-1が、新規に登録される。
Since startflg is "2", the following S 12 is performed, as shown in FIG. 7 (3), a new contour point table
133 is created, and the X and Y coordinates of the pixel point immediately before the current pixel point, that is, Xn -1 and Yn -1 and the tracking direction dn -1 are newly registered at the tracking start point.

追跡開始点の登録処理が終わると処理S13が行わ
れ、startflgが「−1」、すなわち追跡終了点のサーチ
中であることが指示される。
A registration process of the tracking starting point and ending process S 13 is performed, Startflg is "-1", ie it is indicated is in the search of the tracking termination point.

(4) 処理(4) 処理(4)は、画像P20についての細線化処理及び輪
郭点テーブルの作成/更新処理である。
(4) processing (4) processing (4) is a creation / update process of the thinning processing and contour point table for the image P 20.

画像P20について、第7図(4)に示すように細線
化処理を行いつつその追跡終了点をサーチする処理
(4)が実行される。
The image P 20, the process of searching the tracking termination point while performing the thinning process, as shown in FIG. 7 (4) (4) is executed.

この処理(4)は、前述の処理(1)で説明した同図
(1)における画像P10の追跡終了点をサーチする処理
と同様にして行われるので、その詳細な説明は省略し、
要点について説明する。
The process (4) Since carried out in the same manner as the process of searching the tracking termination point of the image P 10 in FIG. (1) described in the above processing (1), the detailed description is omitted,
The point will be described.

画像P20の輪郭線に沿って処理S14の細線化処理が実
行され、画像P20の追跡終了点(Xk,Yk及び追跡方向dk)
を通って再び細線画像C10の最初の画素に入ると、処理S
3において現在注目している画素が細線化処理済みであ
ることが判別される。
Thinning processing of the processing S 14 along the contour line of the image P 20 is performed, the tracking termination point of the image P 20 (Xk, Yk and tracking directions dk)
Through the first pixel of the fine line image C 10 again, the processing S
In 3 , it is determined that the pixel of interest is already thinned.

次いで処理S6において、startflgが「−1」、すな
わち追跡終了点のサーチ中であることが判別された後、
処理S7において、既に追跡開始点が登録されている輪郭
点テーブルの有無が判別される。
Then in the process S 6, "-1" startflg, ie after it has been determined is in search of the tracking end point,
In process S 7, whether the contour point table that is already registered tracking start point is determined.

追跡開始点(Xn-1,Yn-1,dn-1)が登録されている輪
郭点テーブル133があるので、YESと判別されて次の処理
S8が行われ、第4図に示すように、輪郭点テーブル133
の追跡終了点に現在の画素点のX,Y座標Xk,Yk及び追跡方
向dkが追跡終了点として登録される。
Since there is a contour point table 133 in which the tracking start points (Xn -1 , Yn -1 , dn -1 ) are registered, the determination is YES and the next processing is performed.
S 8 is performed, as shown in FIG. 4, the contour point table 133
, The X and Y coordinates Xk and Yk of the current pixel point and the tracking direction dk are registered as tracking end points.

処理S8の追跡終了点登録処理が終ると、次の処理S
10に移ってstartflgを「1」に更新して、次の画像の追
跡開始点のサーチ中で、まだ候補点(細線化点)は見つ
かっていないことを指示する。
When tracking endpoint registration process S 8 is completed, the next process S
In step 10 , the startflg is updated to "1" to indicate that no candidate point (thinning point) has been found during the search for the next image tracking start point.

(5) 処理(5) 第7図(5)に示す処理(5)においては、細線画像
C10及び画像P10の追跡処理が行われる。この各処理は、
前述の処理(3)及び(4)における細線画像C10及び
画像P20の追跡処理と同様にして行われるので、その動
作の詳細な説明は省略してそれらの処理結果について説
明する。
(5) Processing (5) In processing (5) shown in FIG.
Tracking process to C 10 and the image P 10 is performed. Each of these processes
Since carried out in the same manner as the tracking process of the aforementioned processes (3) and the fine line image C 10 and the image P 20 in (4), a detailed description of its operation will be described for their processing results are omitted.

前述の処理S3〜S5の処理が繰り返され、細線画像C
10に沿って追跡が行われる。画像P10の新たな追跡開始
点(座標Xl,Yl)に到達すると、現在注目している画素
が細線化処理済みではないので、処理S3においてELSEと
判別され、テップS11の処理が行われる。
Process of the aforementioned processing S 3 to S 5 is repeated, thin line image C
Tracking is performed along 10 . New tracking start point of the image P 10 (coordinates Xl, Yl) is reached, since the pixels that are currently of interest is not the line thinning processed, is determined ELSE in the process S 3, the processing of step S 11 rows Will be

処理S11では、startflgが「2」、すなわち追跡開始
点のサーチが終了であることが判別されて、次の処理S
12が行われる。
In the process S 11, Startflg is "2", ie, it is determined that the search of the tracking starting point is the end, the next process S
12 is done.

処理S12では、第7図(5)に示すように、新たに
輪郭点テーブル134が一つ作成され、その追跡開始点に
現在の画素点の直前の画素点のX,Y座標、すなわちXl-1,
Y1-1及び追跡方向dl-1が、新規に登録される。
In the process S 12, as shown in FIG. 7 (5), newly contour point table 134 is created one, X pixel point immediately preceding the current pixel point on the trace start point, Y-coordinate, i.e. Xl -1 ,
Y1 -1 and tracking direction dl -1 are newly registered.

追跡開始点の登録処理が終わると処理S13が行わ
れ、startflgが「−1」、すなわち追跡終了点のサーチ
中であることが指示される。
A registration process of the tracking starting point and ending process S 13 is performed, Startflg is "-1", ie it is indicated is in the search of the tracking termination point.

画像P10について、第7図(5)に示すように細線
化処理を行いつつその追跡終了点をサーチする処理が実
行される。
The image P 10, the process of searching the tracking termination point while performing the thinning process, as shown in FIG. 7 (5) is executed.

この追跡処理は、前述の処理(4)で説明した同図
(4)における画像P20の追跡終了点をサーチする処理
と同様にして行われるので、その詳細な説明は省略す
る。
This tracking process is so carried out in the same manner as the process of searching the tracking termination point of the image P 20 in FIG. (4) described in the above processing (4), a detailed description thereof will be omitted.

画像P10の輪郭線に沿って処理S14の細線化処理が実行
され、現在注目している画素点が画像P10の追跡開始点
(X0,Y0及び追跡方向d0)と一致することが検出される
と、処理S2が終了して、次の処理S15が行われる。
Thinning processing of the processing S 14 along the contour lines of the image P 10 is performed to match the pixel points to the currently targeted tracking start point of the image P 10 and (X 0, Y 0 and tracking directions d 0) If it is detected, it ends the process S 2, the following process S 15 is performed.

処理S15では、追跡開始点の登録されていない輪郭
点テーブルの有無が判別される。輪郭点テーブル132は
その追跡開始点が未登録であるのでYESと判別されて、
次の処理S16が行われる。
In process S 15, whether the contour point table is not registered in the tracking start point is determined. The contour point table 132 is determined as YES because the tracking start point is not registered,
Next process S 16 is performed.

処理16では、第7図(5)に示すように、追跡開始
点が未登録の輪郭点テーブル132の追跡終了点(Xm,Ym,d
m)を、輪郭点テーブル134の追跡終了点に登録する処理
が行われる。
In process 16 , as shown in FIG. 7 (5), the tracking end point (Xm, Ym, d
m) is registered as the tracking end point of the contour point table 134.

輪郭点テーブル134に対する追跡終了点の登録処理
が終わると、元の追跡開始点が登録してある輪郭点テー
ブル131と追跡開始点が未登録の輪郭点テーブル132を抹
消する処理が行われる。
When the process of registering the tracking end point in the contour point table 134 is completed, a process of deleting the contour point table 131 in which the original tracking start point is registered and the contour point table 132 in which the tracking start point is not registered is performed.

以上のようにして、閉ループ時の細線化処理及び輪郭
点テーブル更新処理が終了する。
As described above, the thinning process and the contour point table updating process in the closed loop are completed.

なお、細線化処理済みの点(第7図の座標点Xm,Ym)
が見つからずに元の追跡開始点XST(X0,Y0)に戻ってき
た場合は、輪郭点テーブルは更新されておらず、追跡開
始点のない輪郭点テーブルも追加されない。したがっ
て、この場合は、輪郭点テーブルの抹消処理は行わずに
細線化処理を終了する。
Note that the thinned point (coordinate point Xm, Ym in FIG. 7)
Is returned to the original tracking start point XST (X 0 , Y 0 ) without finding, the contour point table is not updated, and the contour point table without the tracking start point is not added. Therefore, in this case, the thinning processing ends without performing the deletion processing of the contour point table.

(B3)非閉ループ時の処理 非閉ループ時の処理は、第9図に示す(1)〜(5)
の順番で行われ、(1)〜(5)の処理は第8図の処理
フローチャートに示す手順に従って行われる。以下、第
8図及び第9図を参照して、非閉ループ時の細線化処理
を、第8図の処理順に従って説明する。
(B3) Unclosed Loop Processing Unclosed loop processing is shown in FIG. 9 (1) to (5).
The processing of (1) to (5) is performed according to the procedure shown in the processing flowchart of FIG. Hereinafter, the thinning processing at the time of the non-closed loop will be described with reference to FIGS. 8 and 9 in accordance with the processing order of FIG.

また、以下の各処理は、特に言及しない限り、MPU14
によって実行されるものである。
In addition, the following processing is performed by the MPU14 unless otherwise specified.
Is to be performed by

(1) 処理(1) 第9図の(1)に示す処理(1)は、第8図の処理フ
ローチャートに示す次の各手順に従って行われる。
(1) Processing (1) The processing (1) shown in (1) of FIG. 9 is performed according to the following procedures shown in the processing flowchart of FIG.

輪郭点テーブル13を参照して、一つの図形の輪郭点
テーブルを取り出す。いま、第9図の(1)に示す一連
の細線画像C00、図形画像P10、細線画像C11及び画像P20
からなる一連の図形であり、その輪郭点テーブルは、第
9図(1)に示すテーブル131であるとする。
With reference to the contour point table 13, a contour point table of one figure is extracted. Now, a series of thin line image C 00 , graphic image P 10 , thin line image C 11 and image P 20 shown in (1) of FIG.
It is assumed that the outline point table is a table 131 shown in FIG. 9 (1).

輪郭点テーブル131の追跡開始点には、細線画像C00
追跡開始点STの座標(Xs,Ys)及び追跡の方向(ds)が
格納されており、その追跡終了点には、画像P20の追跡
終了点の座標(Xe,Ye)及び追跡の方向(de)が格納さ
れている。この場合は、追跡終了点の各データはオール
零にクリヤされていないので、非閉ループ処理であるこ
とが示される。
The tracking start point of the contour point table 131, the tracking start point ST of the coordinates of the fine line image C 00 (Xs, Ys) and has a direction (ds) is stored in the tracking Its tracking end point, the image P 20 , The coordinates (Xe, Ye) of the tracking end point and the tracking direction (de) are stored. In this case, since the data at the tracking end point has not been cleared to all zeros, it indicates that the process is a non-closed loop process.

追跡開始点をサーチするために、startflgが「1」に
セットされる(第8図の処理S1)。
To search for tracking start point, Startflg is set to "1" (process S 1 in Figure 8).

(2) 処理(2) 第9図の(2)に示す処理(2)は、第8図の処理フ
ローチャートに示す次の手順に従って行われる。なお、
処理(2)の処理番号は、処理(1)の続き番号で示さ
れる。
(2) Processing (2) The processing (2) shown in (2) of FIG. 9 is performed according to the following procedure shown in the processing flowchart of FIG. In addition,
The processing number of the processing (2) is indicated by a continuation number of the processing (1).

追跡開始点STと追跡終了点の座標及び方向とも一致
するまで、すなわち追跡終了点の座標点及び追跡方向が
Xs,Ys及びdsになるまで以下の各処理が行われる(処理S
2)。
Until the coordinates and directions of the tracking start point ST and the tracking end point also match, that is, the coordinate points and the tracking direction of the tracking end point
The following processes are performed until Xs, Ys, and ds are reached (process S
2 ).

先ず、現在注目している画素は細線化処理済みか否か
が判別される(処理S3)。
First, it is determined whether or not the currently focused pixel has been subjected to the thinning processing (processing S 3 ).

現在注目している画素は細線化処理済みであるので
(処理S3でYES)、続いて処理S4が行われ、startflgが
「1」、すなわち追跡開始点のサーチ中であるか否かが
判別される。
The pixel currently focused is thinning processed (YES in the process S 3), followed by treatment S 4 is performed, Startflg is "1", i.e. whether it is during the search of the tracking starting point Is determined.

追跡開始点のサーチ中(YES)であるので、次の処
理S5が行われ、startflgが「2」、すなわち追跡開始点
のサーチ中で、候補点がまだ見つかっていないことが指
示される。
Since it is in search of a tracking start point (YES), does the following: processing S 5, startflg is "2", that is, during the search of the tracking starting point, the candidate point is indicated that has yet been found.

処理S3に戻り、細線化処理済みの画素点が見つかる
まで前述の〜の処理が繰り返される。
The process returns to S 3, the process of ~ the above until the thinning processed pixel points is repeated.

前述の〜の処理が繰り返され、画像P10の最初
で画素点、すなわち細線化処理済みでない画素点(座標
点がXa,Ya)に到達すると、処理S3において、現在注目
している画素が細線化処理済みでないことが判別され
る。この検出処理は、第3図で説明した細線化処理済み
検出用のマスクパターンを用いて行われる。
Work with the foregoing is repeated, beginning at pixel point of the image P 10, that is, the pixel point not thinning processed (coordinate points Xa, Ya) to reach, in the process S 3, the pixels that are currently targeted It is determined that the thinning process has not been completed. This detection processing is performed using the mask pattern for detection of the completion of the thinning processing described with reference to FIG.

細線化処理済みでない画素が検出されたときは(処
理S3でELSE)、処理S9が行われ、startflgが「2」、す
なわち追跡開始点のサーチ終了であるか否かが判別され
る)。追跡開始点のサーチが終了したので(処理S9でYE
S)、次の処理S10が行われる。
When the pixel is not the line thinning processed is detected (in the process S 3 ELSE), the process S 9 is performed, Startflg is "2", i.e. whether or not the search end of the tracing starting point is determined) . Since the search of the tracing starting point is the end (YE in processing S 9
S), the following processing S 10 is performed.

処理S10では、第9図の(2)に示すように、新た
に輪郭点テーブル132が一つ作成され、その追跡開始点
に現在の画素点の直前の画素点のX,Y座標、すなわちXa
-1,Ya-1及び追跡方向da-1が、新規に登録される。
In process S 10, as shown in the FIG. 9 (2), a new contour point table 132 is created one, X pixel point immediately preceding the current pixel point on the trace start point, Y-coordinate, i.e. Xa
-1 , Ya -1 and the tracking direction da -1 are newly registered.

追跡開始点の登録処理が終わると処理S11が行わ
れ、startflgが「−1」、すなわち追跡終了点のサーチ
中であることが指示される。
A registration process of the tracking starting point and ending process S 11 is performed, Startflg is "-1", ie it is indicated is in the search of the tracking termination point.

(3) 処理(3) 第9図の(3)に示す処理(3)は、第6図の処理フ
ローチャートに示す次の各手順に従って行われる。
(3) Process (3) The process (3) shown in (3) of FIG. 9 is performed according to the following procedures shown in the process flowchart of FIG.

処理S3に戻って、現在注目している画素は細線化処
理済みか否かが判別される。
Returning to process S 3, pixels that are currently of interest is determined whether thinning processed.

現在注目している画素は細線化処理済みではないの
で(処理S3でELSE)、前述と同様に処理S9が行われ、st
artflgが「2」、すなわち追跡開始点のサーチが終了し
たか否かが判別される。
Pixels that are currently of interest is not a thinning-treated (ELSE treated S 3), are performed in the same way as described above the process S 9, st
It is determined whether artflg is “2”, that is, whether or not the search for the tracking start point has been completed.

追跡終了点のサーチ中であるから、当然追跡開始点
のサーチは終了していないので、次のS12の処理が行わ
れる。処理S12では、MPU14が、マスクテーブル12及び輪
郭点テーブル13を使用し、方向dn-1の経路に沿って追跡
を開始し、画像P10の追跡開始点から始まる最初の1画
素を細線化する。
Because it is being searched for tracking the end point, since the course search tracking start point is not finished, processing of the next S 12 is performed. In the process S 12, MPU 14 may use the mask table 12 and the contour point table 13, and start tracking along the path of the direction dn -1, thinning the first 1 pixel starting from the tracking start point of the image P 10 I do.

画像P10の最初の1画素の細線化処理が終了する
と、処理S2に戻り、前述の〜の処理が繰り返され、
画像P10の次の1画素の細線化処理が行われる。以下同
様にして、方向dn-1の輪郭線に沿って画像P10に対する
細線化処理が繰り返し実行される。
When the first 1 pixel thinning processing of image P 10 is completed, the process returns to S 2, is repeated Work with the foregoing,
Thinning processing of the next 1 pixel of the image P 10 is performed. In the same manner, thinning processing on the image P 10 is repeated along the outline direction dn -1.

画像P10の輪郭線に沿って処理S12の細線化処理が実
行され、画像P10の追跡終了点(Xb,Yb及び追跡方向db)
を通って細線画像C10の最初の画素に入ると、処理S3
おいて現在注目している画素が細線化処理済みであるこ
とが判別される。
Thinning processing of the processing S 12 along the contour lines of the image P 10 is performed, the tracking termination point of the image P 10 (Xb, Yb and tracking directions db)
Once in the first pixel of the fine line image C 10 through, that pixel currently focused in the process S 3 is thinning processed is determined.

次いで処理において、startflgが「−1」、すな
わち追跡終了点のサーチ中であることが判別されると、
次の処理S7が行われる。
Next, in process 6 , when it is determined that startflg is “−1”, that is, the search for the tracking end point is being performed,
The following processing S 7 is carried out.

処理S7では、第9図の(3)に示すように、輪郭点
テーブル132の追跡終了点に、現在の画素点のX,Y座標X
b,Yb及び追跡方向dbが追跡終了点として登録される。
In process S 7, as shown in the FIG. 9 (3), to track the end point of the contour point table 132, the current pixel point X, Y coordinates X
b, Yb and the tracking direction db are registered as tracking end points.

処理S7の追跡終了点登録処理が終ると、次の処理S8
に移ってstartflgを「1」に更新し、次の図形の追跡開
始点のサーチ中で、まだ候補点(細線化点)は見つかっ
ていないことを指示する。
When tracking endpoint registration processing S 7 is completed, the next process S 8
To update the startflg to "1", indicating that no candidate point (thinning point) has been found during the search for the tracking start point of the next figure.

(4) 処理(4) 第9図の(4)に示す処理(4)においては、細線画
像C10及び画像P20の追跡処理が行われる。この各処理
は、前述の処理(1)〜(3)における細線画像C00
び画像P10の追跡処理と同様にして行われるので、その
動作の詳細な説明は省略してそれらの処理結果について
説明する。
(4) In the process (4) the process shown in (4) of FIG. 9 (4), the tracking process of the fine line image C 10 and the image P 20 is performed. Each process, so is the how as the tracking process of the thin line image C 00 and the image P 10 in the process described above (1) to (3), for their processing results are omitted the detailed description of the operation explain.

前述の処理S3〜S5の処理が繰り返され、細線画像C
10に沿って追跡が行われる。画像P20の最初の画素点で
ある追跡開始点(座標Xc,Yc)に到達すると、現在注目
している画素が細線化処理済みではないので、処理S3
おいてELSと判別され、テップS9の処理が行われる。
Process of the aforementioned processing S 3 to S 5 is repeated, thin line image C
Tracking is performed along 10 . Upon reaching the first pixel point in a tracking start point of the image P 20 (coordinates Xc, Yc), the pixel currently attention is not a thinning processed, it is determined that ELS in the process S 3, step S 9 Is performed.

処理S9では、startflgが「2」、すなわち追跡開始点
のサーチが終了であることが判別されて、次の処理S10
が行われる。
In step S 9, startflg is "2", ie, it is determined that the search of the tracking starting point is the end, the next process S 10
Is performed.

処理S10では、第9図の(4)に示すように、新た
に輪郭点テーブル133が一つ作成され、その追跡開始点
に現在の画素点の直前の画素点のX,Y座標、すなわちXc
-1,Yc-1及び追跡方向dc-1が、新規に登録される。
In process S 10, as shown in the FIG. 9 (4), a new contour point table 133 is created one, X pixel point immediately preceding the current pixel point on the trace start point, Y-coordinate, i.e. Xc
-1 , Yc -1 and the tracking direction dc -1 are newly registered.

追跡開始点の登録処理が終わると処理S11が行わ
れ、startflgが「−1」、すなわち追跡終了点のサーチ
中であることが指示される。
A registration process of the tracking starting point and ending process S 11 is performed, Startflg is "-1", ie it is indicated is in the search of the tracking termination point.

画像P20について、第9図の(4)に示すように、
細線化処理を行いつつその追跡終了点をサーチする処理
が実行される。
The image P 20, as shown in the FIG. 9 (4),
A process of searching for the tracking end point while performing the thinning process is executed.

この追跡処理は、前述の処理(3)で説明した同図
(3)における画像P10の追跡終了点をサーチする処理
と同様にして行われるので、その詳細な説明は省略す
る。
This tracking process is so carried out in the same manner as the process of searching the tracking termination point of the image P 10 in FIG. (3) described in the above processing (3), a detailed description thereof will be omitted.

画像P20の輪郭線に沿って処理S12の細線化処理が実行
され、現在注目している画素点が画像P10の追跡終了点
(Xe,Ye及び追跡方向de)と一致することが検出される
と、処理S2が終了して、次の処理S13が行われる。
Thinning processing of the processing S 12 along the contour line of the image P 20 is performed, the tracking termination point of the current designated pixel point image P 10 (Xe, Ye and tracking direction de) and it is detected that matches Once, it terminates the process S 2, the following process S 13 is performed.

処理S13では、元の輪郭点テーブル131が不要になっ
たので、輪郭点テーブル131を抹消する処理を行う。
In step S 13, since the original contour point table 131 is no longer needed, performs processing to cancel the contour point table 131.

以上のようにして、非閉ループ時の細線化処理及び輪
郭点テーブルの作成/更新処理が終了する。
As described above, the thinning processing and the creation / update processing of the contour point table in the non-closed loop are completed.

(B4)細線化処理 以上のようにして作成された閉ループ時の輪郭点テー
ブル及び非閉ループ時の輪郭点テーブルに登録された各
画像の追跡開始点及び追跡終了点を参照することによ
り、細線化処理が終了した各細線画像に対する追跡処理
を行うことなく、各画像P10,P20等についてのみ細線化
処理を行うことができる。
(B4) Thinning processing The thinning is performed by referring to the tracking start point and tracking end point of each image registered in the contour point table for closed loop and the contour point table for non-closed loop created as described above. The thinning process can be performed only on each of the images P 10 , P 20, etc. without performing the tracking process on each of the processed thin line images.

細線化処理を必要としない細線画像部分についての追
跡処理が不要になったので、全体の細線化処理時間が短
縮され、処理速度を向上させることができる。
Since the tracking processing for the thin line image portion that does not require the thinning processing is not required, the entire thinning processing time can be reduced, and the processing speed can be improved.

なお、各画像の細線化処理自体は公知の各種の方法が
行うことができるので、その説明は省略する。
The thinning processing of each image itself can be performed by various known methods, and a description thereof will be omitted.

また、1個の画像について細線化処理を実行して行く
と、その画像が複数の小画像とそれらを結ぶ複数の細線
画像が生成されるようになる。その場合は、前述の(B
2)で説明した閉ループ時の処理及び(B3)で説明した
非閉ループ時の処理によって、新たに生成された各画像
についての追跡開始点及び追跡終了点を登録した輪郭点
テーブルが新規に作成され、以降は、この新規の輪郭点
テーブルによって、各新画像についての細線化処理が行
われる。
Further, when the thinning processing is performed on one image, the image generates a plurality of small images and a plurality of thin line images connecting them. In that case,
By the processing at the time of the closed loop described in 2) and the processing at the time of the non-closed loop described in (B3), a contour point table in which the tracking start point and the tracking end point of each newly generated image are registered is newly created. Thereafter, thinning processing for each new image is performed by using this new contour point table.

(B5)オーバーフロー処理 これまでの説明した方法で細線化処理を行うと、細線
化処理が進むにつれて、輪郭点テーブルの個数が次第に
増加して行く。
(B5) Overflow Processing When the thinning processing is performed by the method described above, the number of contour point tables gradually increases as the thinning processing proceeds.

しかし、輪郭点テーブル13のメモリ容量は限られてい
るため、細線化処理が進むと輪郭点テーブル13がオーバ
ーフローする可能性がある。輪郭点テーブル13がオーバ
ーフローすると、新たな輪郭点テーブル13が生成できな
くなるので、以降の細線化処理が失敗する。
However, since the memory capacity of the contour point table 13 is limited, the contour point table 13 may overflow as the thinning process proceeds. If the contour point table 13 overflows, a new contour point table 13 cannot be generated, and the subsequent thinning processing will fail.

第10図は、このようなオーバーフローによる失敗を回
避する方法の一例を示したものである。
FIG. 10 shows an example of a method for avoiding such a failure due to overflow.

細線化処理が済みんで不要になった輪郭点テーブル
を、MPU14は回収する。例えば、第7図(5)で輪郭点
テーブル131及び132を抹消するときに、回収が行われ
る。
The MPU 14 collects an unnecessary contour point table after the thinning process. For example, when the contour point tables 131 and 132 are deleted in FIG. 7 (5), the collection is performed.

この際未使用の輪郭点テーブルを素早く見つけること
が必要である。その方法として、例えば、第10図(a)
に示すように、輪郭点テーブルに次のテーブルへのポイ
ンタを設けるようにすれば、空きポインタと使用中ポイ
ンタの二つで、輪郭点テーブルの使用部分と空き部分を
管理することができる。「NEXT」は次に接続するテーブ
ルのアドレスを示し、「NULL」は次に接続するテーブル
の無いことを示す。
In this case, it is necessary to quickly find an unused contour point table. As the method, for example, FIG. 10 (a)
As shown in (1), if a pointer to the next table is provided in the contour point table, the used part and the vacant part of the contour point table can be managed by the two pointers, the empty pointer and the in-use pointer. “NEXT” indicates the address of the table to be connected next, and “NULL” indicates that there is no table to be connected next.

抹消等により不使用になった輪郭点テーブルは、第10
図(b)に示すように、不使用輪郭点テーブル及びその
直前の輪郭点テーブルのポインタを更新することによ
り、空きテーブルにリンクすることができる。
The contour point table that is no longer used due to erasure etc.
By updating the pointers of the unused contour point table and the contour point table immediately before it, as shown in FIG.

このように各使用中テーブル及び空きテーブルをリン
クすれば、ポインタを参照することにより、使用中テー
ブル及び空きテーブルのいずれも、速やかに検索するこ
とができる。
By linking the used tables and the empty tables in this manner, both the used tables and the empty tables can be quickly searched by referring to the pointer.

また、このような使用中テーブル及び空きテーブルを
リンクする処理を行うと、輪郭点テーブル13がすべて使
用中になったときに初めてオーバーフローを生じるの
で、輪郭点テーブル13が有効に利用されて、オーバーフ
ローの発生を低減することができる。
Further, when such a process of linking the in-use table and the empty table is performed, an overflow occurs only when all the contour point tables 13 are in use. Therefore, the contour point table 13 is effectively used, and the overflow is performed. Can be reduced.

もしオーバーフローが発生したときは、その時点で追
跡開始点及び追跡終了点の分割処理を終了する。この場
合、以降は従来の細線化処理方式と同様に細線化処理が
行われることになるが、それ以前に本発明の細線化処理
が進んでいるため、このような場合でも、従来の細線化
処理方式よりも細線化処理を高速化することができる。
If an overflow has occurred, the division process of the tracking start point and the tracking end point ends at that point. In this case, subsequent thinning processing is performed in the same manner as in the conventional thinning processing method. However, since the thinning processing of the present invention has progressed before that, even in such a case, the conventional thinning processing is performed. The thinning processing can be performed at a higher speed than the processing method.

以上本発明の一実施例について説明したが、本発明は
この実施例に限定されるものではなく、その発明の主旨
に従った各種の変形が可能である。
Although one embodiment of the present invention has been described above, the present invention is not limited to this embodiment, and various modifications in accordance with the gist of the invention are possible.

〔効 果〕(Effect)

以上説明したように、本発明は細線化が未終了の画像
部分についてのみ、その画像の輪郭を追跡しながら細線
化処理を行い、細線化処理が終わった細線画像部分につ
いては追跡処理を行わないようにしたので、処理量が低
減され、従来の逐次型細線化処理に比べて、その処理速
度を向上させることができる。
As described above, the present invention performs thinning processing while tracking the outline of an image only for an image part for which thinning has not been completed, and does not perform tracking processing for a thin line image part after thinning processing. As a result, the processing amount is reduced, and the processing speed can be improved as compared with the conventional sequential thinning processing.

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

第1図は本発明の原理図、 第2図は本発明の一実施例の実施システムの説明図、 第3図は同実施例に使用される細線化処理済み検出マス
クパターンの説明図、 第4図は同実施例に使用される輪郭点テーブル並びに開
始点及び追跡終了点の説明図、 第5図は同実施例の全体の処理の流れを示すフローチャ
ート、 第6図は同実施例の閉ループ時の処理フローチャート、 第7図は同実施例の閉ループ時の処理の説明図、 第8図は同実施例の非閉ループ時の処理フローチャー
ト、 第9図は同実施例の非閉ループ時の処理の説明図、 第10図は同実施例のオーバーフロー時の処理の説明図、 第11図は従来の細線化処理方式の説明図である。 第2図において、 11……画像メモリ、12……マスクテーブル、13……輪郭
点テーブル、14……プロセッサ(MPU)、15……制御メ
モリ。
FIG. 1 is a diagram showing the principle of the present invention, FIG. 2 is an explanatory diagram of an embodiment system of an embodiment of the present invention, FIG. 3 is an explanatory diagram of a thinning-processed detection mask pattern used in the embodiment, FIG. 4 is an explanatory diagram of a contour point table and a start point and a tracking end point used in the embodiment. FIG. 5 is a flowchart showing the flow of the entire processing of the embodiment. FIG. 6 is a closed loop of the embodiment. FIG. 7 is an explanatory diagram of a process in a closed loop of the embodiment, FIG. 8 is a flowchart of a process in a non-closed loop of the embodiment, and FIG. 9 is a diagram of a process in a non-closed loop of the embodiment. FIG. 10 is an explanatory diagram of a process at the time of overflow of the embodiment, and FIG. 11 is an explanatory diagram of a conventional thinning processing method. In FIG. 2, 11 ... image memory, 12 ... mask table, 13 ... contour point table, 14 ... processor (MPU), 15 ... control memory.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】画像の輪郭を追跡して逐次型の細線化処理
を行う画像の細線化方式において、 (a) 画像を、細線化処理が未終了の画像部分と細線
化処理済みの細線画像部分に分割し、 (b) 細線化処理が未終了の画像部分についてのみ、
その画像の輪郭を追跡しながら細線化処理を行い、 (c) 細線化処理を行った残りの画像部分について、
次の細線化処理のための追跡を行う領域を再設定する、 ことを特徴とする画像の細線化方式。
1. An image thinning method in which an outline of an image is tracked and a sequential thinning process is performed, wherein: (a) an image is divided into an image portion which has not been thinned and a thin line image which has been thinned; (B) Only the image portion for which the thinning process has not been completed,
A thinning process is performed while tracing the outline of the image. (C) For the remaining image portion subjected to the thinning process,
A thinning method for an image, wherein a tracking area for the next thinning processing is reset.
【請求項2】逐次細線化処理を行う画像部分の領域が、
その追跡開始点及び追跡終了点によって設定されること
を特徴とする請求項1記載の画像の細線化方式。
2. An image portion area to be subjected to a successive thinning process is:
2. The method for thinning an image according to claim 1, wherein the tracking start point and the tracking end point are set.
JP2147395A 1990-06-07 1990-06-07 Image thinning method Expired - Lifetime JP2804347B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2147395A JP2804347B2 (en) 1990-06-07 1990-06-07 Image thinning method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2147395A JP2804347B2 (en) 1990-06-07 1990-06-07 Image thinning method

Publications (2)

Publication Number Publication Date
JPH0440575A JPH0440575A (en) 1992-02-10
JP2804347B2 true JP2804347B2 (en) 1998-09-24

Family

ID=15429307

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2147395A Expired - Lifetime JP2804347B2 (en) 1990-06-07 1990-06-07 Image thinning method

Country Status (1)

Country Link
JP (1) JP2804347B2 (en)

Also Published As

Publication number Publication date
JPH0440575A (en) 1992-02-10

Similar Documents

Publication Publication Date Title
KR100396357B1 (en) Method for automatically determining trackers along contour and storage medium storing program for implementing the same
CN115779424B (en) Navigation grid path finding method, device, equipment and medium
JP2804347B2 (en) Image thinning method
CN113867371B (en) Path planning method and electronic equipment
JP2002074381A (en) Device and method for editing graphic
JPH0512442A (en) Line image tracking method
JPH1049688A (en) Method for partial erasing method and partial detection method for picture data
JP2644735B2 (en) Drawing information management method
JP2897541B2 (en) Closed figure extraction method
JP3305395B2 (en) Figure division device
JPH01126717A (en) Linear graphic input device
JPH1055382A (en) System and method for path formation and recording medium storing program which makes computer perform process for path formation
JP3438421B2 (en) Drawing device for right angle segments
JP3657725B2 (en) Line figure image processing method
JP2852044B2 (en) Symbol recognition device
JP3092295B2 (en) Vector data editing processor
JPH06243255A (en) Position detecting method/device
JPH04246785A (en) Graphic preparing device
JP3244582B2 (en) Graphic search device
JP2001331303A (en) Plotting processor, its method and storage medium with stored plotting processing program
JPS6041176A (en) Pattern matching method
JPH0816805A (en) Graphic generation device
JP2838556B2 (en) Image processing device
JP3358743B2 (en) Offset figure generation system
JP2614356B2 (en) Closed figure extraction method