JP2000076468A - Method and device for extracting contour of picture, and storage medium - Google Patents

Method and device for extracting contour of picture, and storage medium

Info

Publication number
JP2000076468A
JP2000076468A JP10249756A JP24975698A JP2000076468A JP 2000076468 A JP2000076468 A JP 2000076468A JP 10249756 A JP10249756 A JP 10249756A JP 24975698 A JP24975698 A JP 24975698A JP 2000076468 A JP2000076468 A JP 2000076468A
Authority
JP
Japan
Prior art keywords
contour
pixel
density value
outline
contour line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP10249756A
Other languages
Japanese (ja)
Other versions
JP3679619B2 (en
Inventor
Soichi Kimura
宗市 木村
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.)
Dainippon Screen Manufacturing Co Ltd
Original Assignee
Dainippon Screen Manufacturing 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 Dainippon Screen Manufacturing Co Ltd filed Critical Dainippon Screen Manufacturing Co Ltd
Priority to JP24975698A priority Critical patent/JP3679619B2/en
Publication of JP2000076468A publication Critical patent/JP2000076468A/en
Application granted granted Critical
Publication of JP3679619B2 publication Critical patent/JP3679619B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To shorten the processing time by making a device efficiently perform able the processing of contour extraction concerning an optional density value. SOLUTION: A noticed pixel extracting part 20 extracts noticed pixels one by one in order from the pixel showing the max. value of a density value in a picture. In the case that the four surrounding contour sides of the noticed pixel are not contained in an existing contour line, a contour line consisting of the four contour sides is set as a new contour line, contour line connecting information DC indicating the connecting state of the new contour line is generated and also contour line management information DM including a start side selecting either one among the four contour sides of the noticed pixel and including a start density value obtained by making the density value of the noticed pixel as the start density of an effective density range is generated. When any one among the four contour sides of the noticed pixel is contained in the existing contour line, contour line connecting information DC concerning the existing contour line is updated.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、画像の輪郭抽出
方法およびその装置並びにコンピュータによって画像の
輪郭を抽出するためのプログラムを記録した記録媒体に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for extracting an outline of an image and a recording medium storing a program for extracting an outline of an image by a computer.

【0002】[0002]

【従来の技術】コンピュータで画像を処理する際に、画
像の輪郭を抽出することがある。抽出した画像の輪郭
は、輪郭内の画像に回転、拡大、縮小などの変換処理を
施したり、輪郭内の画像を所望の色で塗りつぶしたり、
輪郭内の画像を他の画像と合成したり下降したりする処
理に利用される。
2. Description of the Related Art When an image is processed by a computer, an outline of the image is sometimes extracted. The outline of the extracted image is subjected to conversion processing such as rotation, enlargement, and reduction of the image within the outline, and the image within the outline is filled with a desired color,
It is used for a process of combining an image within the outline with another image or descending.

【0003】ここで、画像の輪郭を抽出する方法として
は、特開平5−242246号公報に開示された方法が
ある。この方法では、画像を主走査方向に沿った1ライ
ンごとに走査していき、各走査において主走査方向に沿
った輪郭線を抽出していくように構成されている。そし
て、主走査方向に検出された2本の輪郭線の端点が一致
すれば、それらを副走査方向に連結して1本の輪郭線を
形成していく。このような処理を全画像についての各ラ
インごとに行うことによって所望の輪郭を抽出する。
Here, as a method of extracting the outline of an image, there is a method disclosed in Japanese Patent Laid-Open No. 5-242246. In this method, an image is scanned line by line in the main scanning direction, and a contour line in the main scanning direction is extracted in each scan. Then, if the end points of the two contour lines detected in the main scanning direction match, they are connected in the sub-scanning direction to form one contour line. By performing such processing for each line for all images, a desired contour is extracted.

【0004】[0004]

【発明が解決しようとする課題】ところが、上記のよう
な従来の画像の輪郭抽出方法では、異なる濃度値につい
ての輪郭線をいくつか抽出する際に、全画像領域を1ラ
インごとに走査していき1本の輪郭線を抽出する処理を
各濃度値について行わなければならず、輪郭抽出に要す
る時間が長いという問題があった。
However, in the above-described conventional method for extracting contours of an image, when extracting several contours with different density values, the entire image area is scanned line by line. A process of extracting one contour line must be performed for each density value, and there is a problem that the time required for contour extraction is long.

【0005】この発明は、上記課題に鑑みてなされたも
のであって、任意の濃度値についての輪郭抽出の処理を
効率的に行い、処理時間を短縮する画像の輪郭抽出方
法、装置、およびそのプログラムを記録した記録媒体を
提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and has a method and an apparatus for extracting an outline of an image, which efficiently performs an outline extraction process for an arbitrary density value and shortens the processing time. An object is to provide a recording medium on which a program is recorded.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に、請求項1に記載の発明は、画像の輪郭を抽出する方
法であって、(a) 前記画像において濃度値の最大値を示
す画素から降順に1画素ずつ注目画素を抽出する工程
と、(b) 前記注目画素の周囲の複数の輪郭辺が既成輪郭
線に包含されていない場合には、前記複数の輪郭辺から
なる輪郭線を新規輪郭線として設定し、当該新規輪郭線
の接続状態を示す輪郭線接続情報を生成するとともに、
前記注目画素の前記複数の輪郭辺のうちのいずれか1つ
を選択した当該新規輪郭線の開始辺と、前記注目画素の
濃度値を当該新規輪郭線の有効濃度範囲の開始濃度とし
た開始濃度値とを含む輪郭線管理情報を生成する工程
と、(c) 前記注目画素の前記複数の輪郭辺のうちのいず
れかが既成輪郭線に包含されている場合には、当該既成
輪郭線についての前記輪郭線接続情報を更新する工程
と、(d) 前記更新によって前記注目画素のいずれかの前
記輪郭辺が包含されていた少なくとも1つの既成輪郭線
が消滅する場合には、消滅する前記既成輪郭線について
の前記輪郭線管理情報に対して前記注目画素の濃度値を
前記既成輪郭線の有効濃度範囲の終了濃度を示す終了濃
度値として追加する工程とを有している。
According to one aspect of the present invention, there is provided a method for extracting an outline of an image, comprising the steps of: (a) indicating a maximum density value in the image; Extracting a pixel of interest one pixel at a time in descending order from the pixel; and (b) when a plurality of contour sides surrounding the pixel of interest are not included in the existing contour line, a contour line composed of the plurality of contour sides Is set as a new contour line, and contour line connection information indicating the connection state of the new contour line is generated,
A start side of the new contour line in which any one of the plurality of contour sides of the target pixel is selected, and a start density in which a density value of the target pixel is set as a start density of an effective density range of the new contour line Generating contour management information including a value, and (c) when any of the plurality of contour sides of the pixel of interest is included in a predefined contour, Updating the outline connection information; and (d) when the update eliminates at least one existing outline that includes any of the outline sides of the target pixel, the existing outline disappears. Adding a density value of the pixel of interest to the contour management information on a line as an end density value indicating an end density of an effective density range of the existing contour line.

【0007】請求項2に記載の発明は、請求項1に記載
の画像の輪郭抽出方法において、前記画像における同一
の濃度値を示す画素を前記注目画素として、前記(a)な
いし(d)工程を繰り返し行うことによって生成/更新さ
れた前記輪郭線接続情報を出力することを特徴としてい
る。
According to a second aspect of the present invention, in the method for extracting an outline of an image according to the first aspect, a pixel having the same density value in the image is set as the target pixel and the steps (a) to (d) are performed. Is repeatedly output to output the contour line connection information generated / updated.

【0008】請求項3に記載の発明は、請求項1に記載
の画像の輪郭抽出方法において、(e) 前記(a)ないし(d)
工程を繰り返し行うことによって生成された前記輪郭線
管理情報を記憶する工程と、所定の濃度値の輪郭線を抽
出する際に、(f) 前記輪郭線管理情報に含まれる前記開
始濃度値と前記終了濃度値とによって示される前記有効
濃度範囲に基づいて前記所定の濃度値の輪郭線を特定
し、当該輪郭線についての前記輪郭線管理情報から前記
開始辺を取得する工程と、(g) 前記開始辺から所定の規
則に従って輪郭辺を順次抽出していく工程とを有するこ
とを特徴としている。
According to a third aspect of the present invention, there is provided the image contour extracting method according to the first aspect, wherein (e) the (a) to (d)
Storing the contour management information generated by repeatedly performing the step, and extracting a contour of a predetermined density value, (f) the start density value included in the contour management information and the Specifying a contour of the predetermined density value based on the effective density range indicated by an end density value, and acquiring the start side from the contour management information for the contour, (g) the step of: Sequentially extracting contour sides from the start side according to a predetermined rule.

【0009】請求項4に記載の発明は、請求項1ないし
請求項3のいずれかに記載の画像の輪郭抽出方法におい
て、前記(a)ないし(d)工程に先立って行う工程として、
(h)前記画像を構成する全ての画素についての画素情報
を記録する記録領域を確保する工程と、(i) 前記画像を
構成する全ての画素を検索し、濃度値ごとの画素数をカ
ウントする工程と、(j) 前記カウントの結果に基づい
て、各濃度値ごとに当該濃度値未満の累積画素数を求め
る工程と、(k) 前記画像を構成する画素を1画素ずつ抽
出する工程と、(l) 前記(k)工程において抽出された画
素の濃度値を検出し、当該濃度値に対応する前記累積画
素数を取得し、当該累積画素数の値に対応する前記記録
領域の位置に前記抽出された画素を特定する前記画素情
報を記録するとともに、当該累積画素数の値を更新する
工程とを有し、前記(k)から(l)工程を前記画像を構成す
る全ての画素について行うまで繰り返し行うことを特徴
としている。
According to a fourth aspect of the present invention, in the image contour extracting method according to any one of the first to third aspects, the steps performed prior to the steps (a) to (d) are as follows:
(h) a step of securing a recording area for recording pixel information for all pixels constituting the image, and (i) searching for all pixels constituting the image and counting the number of pixels for each density value And (j) a step of calculating the cumulative number of pixels less than the density value for each density value based on the result of the counting, and (k) a step of extracting pixels constituting the image one by one, (l) detecting the density value of the pixel extracted in the step (k), obtaining the cumulative pixel number corresponding to the density value, and setting the cumulative pixel number at the position of the recording area corresponding to the cumulative pixel value. Recording the pixel information specifying the extracted pixels, and updating the value of the cumulative number of pixels, and performing the steps (k) to (l) for all the pixels constituting the image. It is characterized by performing repeatedly up to.

【0010】請求項5に記載の発明は、画像の輪郭を抽
出する装置であって、(a) 前記画像において濃度値の最
大値を示す画素から降順に1画素ずつ注目画素を抽出す
る注目画素抽出手段と、(b) 前記注目画素の周囲の複数
の輪郭辺が既成輪郭線に包含されていない場合には、前
記複数の輪郭辺からなる輪郭線を新規輪郭線とし、当該
新規輪郭線の接続状態を示す輪郭線接続情報を生成する
とともに、前記注目画素の前記複数の輪郭辺のうちのい
ずれか1つを選択した当該新規輪郭線の開始辺と、前記
注目画素の濃度値を当該新規輪郭線の有効濃度範囲の開
始濃度とした開始濃度値とを含む輪郭線管理情報を生成
する輪郭線情報生成手段と、(c) 前記輪郭線接続情報と
前記輪郭線管理情報とを記憶する記憶手段と、(d) 前記
注目画素の前記複数の輪郭辺のうちのいずれかが既成輪
郭線に包含されている場合には、当該既成輪郭線につい
て前記記憶手段に記憶されている前記輪郭線接続情報を
更新するとともに、当該更新によって前記注目画素のい
ずれかの前記輪郭辺が包含されていた少なくとも1つの
既成輪郭線が消滅する場合には、消滅する前記既成輪郭
線についての前記記憶手段に記憶されている前記輪郭線
管理情報に対して前記注目画素の濃度値を前記既成輪郭
線の有効濃度範囲の終了濃度を示す終了濃度値として追
加更新する更新手段とを備えている。
According to a fifth aspect of the present invention, there is provided an apparatus for extracting an outline of an image, comprising: (a) a pixel of interest extracting a pixel of interest one by one in descending order from a pixel having a maximum density value in the image; Extracting means, (b) when a plurality of contour sides around the pixel of interest are not included in the existing contour line, a contour line composed of the plurality of contour sides as a new contour line; Contour line connection information indicating a connection state is generated, and the start side of the new contour line in which any one of the plurality of contour sides of the target pixel is selected, and the density value of the target pixel are stored in the new Contour line information generating means for generating contour line management information including a start density value as a start density of an effective density range of a contour line; and (c) storing the contour line connection information and the contour line management information. And (d) the plurality of rings of the pixel of interest. When any one of the contour sides is included in the existing outline, the outline connection information stored in the storage unit is updated for the existing outline, and the update of the target pixel is performed by the update. In a case where at least one existing contour line that includes any one of the outline sides disappears, the attention is paid to the outline management information stored in the storage unit for the existing contour line that disappears. Updating means for additionally updating the density value of the pixel as an end density value indicating the end density of the effective density range of the existing contour line.

【0011】請求項6に記載の発明は、コンピュータに
よって画像の輪郭を抽出するためのプログラムを記録し
た記録媒体であって、コンピュータに、(a) 前記画像に
おいて濃度値の最大値を示す画素から降順に1画素ずつ
注目画素を抽出する手順、(b) 前記注目画素の周囲の複
数の輪郭辺が既成輪郭線に包含されていない場合には、
前記複数の輪郭辺からなる輪郭線を新規輪郭線として設
定し、当該新規輪郭線の接続状態を示す輪郭線接続情報
を生成するとともに、前記注目画素の前記複数の輪郭辺
のうちのいずれか1つを選択した当該新規輪郭線の開始
辺と、前記注目画素の濃度値を当該新規輪郭線の有効濃
度範囲の開始濃度とした開始濃度値とを含む輪郭線管理
情報を生成する手順、(c) 前記注目画素の前記複数の輪
郭辺のうちのいずれかが既成輪郭線に包含されている場
合には、当該既成輪郭線についての前記輪郭線接続情報
を更新する手順、(d) 前記更新によって前記注目画素の
いずれかの前記輪郭辺が包含されていた少なくとも1つ
の既成輪郭線が消滅する場合には、消滅する前記既成輪
郭線についての前記輪郭線管理情報に対して前記注目画
素の濃度値を前記既成輪郭線の有効濃度範囲の終了濃度
を示す終了濃度値として追加する手順を実行させるため
の画像の輪郭抽出プログラムが記録されている。
According to a sixth aspect of the present invention, there is provided a recording medium in which a program for extracting a contour of an image by a computer is recorded. A procedure of extracting a pixel of interest one pixel at a time in descending order, (b) when a plurality of contour sides around the pixel of interest are not included in the existing contour line,
A contour line including the plurality of contour sides is set as a new contour line, contour line connection information indicating a connection state of the new contour line is generated, and any one of the plurality of contour sides of the target pixel is set. (C) generating contour management information including a start side of the selected new contour, and a start density value having the density value of the target pixel as a start density of an effective density range of the new contour. If any of the plurality of contour sides of the pixel of interest is included in the existing contour, a procedure for updating the contour connection information for the existing contour, (d) by the update In a case where at least one existing contour line in which any of the outline sides of the pixel of interest is included disappears, the density value of the pixel of interest is determined with respect to the outline management information for the existing outline that disappears. The above Image contour extraction program for executing the steps to add as an end density value indicating the end concentration of the active concentration range of the contour line is recorded.

【0012】[0012]

【発明の実施の形態】<1.発明の概要>上述した従来
の画像の輪郭抽出方法は、主走査方向と副走査方向とか
らなる画像平面において主走査方向に沿った1ラインご
との輪郭抽出処理を副走査方向に走査するものであっ
た。
DESCRIPTION OF THE PREFERRED EMBODIMENTS <1. Summary of the Invention> The above-described conventional image contour extraction method scans, in the sub-scanning direction, contour extraction processing for each line along the main scanning direction on an image plane including the main scanning direction and the sub-scanning direction. there were.

【0013】これに対して、この発明における画像の輪
郭抽出方法は、画像を構成する画素のうち最大の濃度値
を示すものから順次に1画素ずつ抽出し、新規に輪郭線
を生成したり、既成の輪郭線を更新したりするものであ
る。
On the other hand, in the method for extracting an outline of an image according to the present invention, a pixel is sequentially extracted one by one from a pixel having the maximum density value among pixels constituting the image, and a new outline is generated. For example, an existing contour is updated.

【0014】ここで、1つの画素とその隣接する画素と
の境界となる線を輪郭辺と呼ぶことにすると、一般に1
つの画素は4つの輪郭辺を有している。
Here, a line that is a boundary between one pixel and an adjacent pixel is called an outline side.
One pixel has four contour sides.

【0015】そこで、最大の濃度値から順次抽出された
画素(以下、「注目画素」という。)の4つの輪郭辺の
うちのいずれもかが既に生成された既成輪郭線に含まれ
ているか否かを判定し、いずれの輪郭辺も既成輪郭線に
含まれていない場合には注目画素の4つの輪郭辺からな
る輪郭線を新たに生成する一方、いずれかの輪郭辺が既
成輪郭線に含まれている場合にはその輪郭内に当該注目
画素が含まれるように既成輪郭線を更新する。
Therefore, it is determined whether any one of the four contour sides of a pixel sequentially extracted from the maximum density value (hereinafter, referred to as a “pixel of interest”) is included in the already generated contour line. If none of the outline sides is included in the existing outline, a new outline including the four outline sides of the pixel of interest is newly generated, while any outline is included in the existing outline. If so, the existing contour is updated so that the target pixel is included in the contour.

【0016】図1は、このような輪郭線の生成/更新の
概念を示す図である。図1では、2×2の4画素PA〜
PDを例示しており、画素PAの濃度値はLV4であ
り、画素PBの濃度値はLV3であり、画素PCの濃度
値はLV2であり、画素PDの濃度値はLV1である。
ここで、各濃度値の関係は、LV1<LV2<LV3<
LV4である。まず、最大の濃度値であるLV4を抽出
すると画素PAが抽出される。そして、図1(a)に示
すように画素PAの4つの輪郭辺が新規輪郭線Eaとし
て生成される。次に、図1(b)に示すように濃度値L
V3の画素PBが抽出される。画素PBの4つの輪郭辺
のうち画素PAに接する輪郭辺は既に輪郭線Eaに含ま
れているので、輪郭線Eaを更新して輪郭線Ebを生成
する。次に、図1(c)に示すように濃度値LV2の画
素PCが抽出される。画素PCの4つの輪郭辺のうち画
素PAに接する輪郭辺は既に輪郭線Ebに含まれている
ので、輪郭線Ebを更新して輪郭線Ecを生成する。最
後に、図1(d)に示すように濃度値LV1の画素PD
が抽出される。画素PDの4つの輪郭辺のうち画素PB
とPCとに接する2つの輪郭辺は既に輪郭線Ecに含ま
れているので、輪郭線Ecを更新して輪郭線Edを生成
する。
FIG. 1 is a diagram showing the concept of generation / update of such a contour line. In FIG. 1, 4 pixels PA of 2 × 2
The density value of the pixel PA is LV4, the density value of the pixel PB is LV3, the density value of the pixel PC is LV2, and the density value of the pixel PD is LV1.
Here, the relationship between the density values is LV1 <LV2 <LV3 <
LV4. First, when the maximum density value LV4 is extracted, the pixel PA is extracted. Then, as shown in FIG. 1A, four contour sides of the pixel PA are generated as new contour lines Ea. Next, as shown in FIG.
The pixel PB of V3 is extracted. Since the contour side in contact with the pixel PA among the four contour sides of the pixel PB is already included in the contour line Ea, the contour line Ea is updated to generate the contour line Eb. Next, as shown in FIG. 1C, the pixel PC having the density value LV2 is extracted. Since the contour side in contact with the pixel PA among the four contour sides of the pixel PC is already included in the contour line Eb, the contour line Eb is updated to generate the contour line Ec. Finally, as shown in FIG. 1D, the pixel PD having the density value LV1
Is extracted. Pixel PB among four contour sides of pixel PD
Since the two contour sides that are in contact with and PC are already included in the contour line Ec, the contour line Ec is updated to generate the contour line Ed.

【0017】この処理過程においては、4つの画素PA
〜PDを1画素ずつ処理する間に、濃度値ごとに存在す
る全ての輪郭線Ea〜Edが抽出されている。従って、
各濃度値ごとの輪郭線が抽出された際にその輪郭線を出
力するようにすれば、全画像領域についての画素ごとの
処理を1回だけ行えば全ての濃度値についての輪郭線を
得ることができる。
In this process, four pixels PA
All the contour lines Ea to Ed existing for each density value are extracted during the processing of .DELTA.PD one pixel at a time. Therefore,
By outputting the contour when the contour for each density value is extracted, the contour for all the density values can be obtained by performing the process for each pixel for the entire image area only once. Can be.

【0018】また、このような処理過程において新規輪
郭線が生成される際には、その輪郭線を後に追跡するこ
とができるように、新規輪郭線を構成する輪郭辺のうち
から1つの輪郭辺を開始辺として設定しておく。このた
め、上記の処理が進むにつれて輪郭線が更新されたとし
ても、開始辺より所定のルール(規則)に基づいて輪郭
を追跡することにより所定の濃度値の輪郭線を容易に抽
出することができる。
Further, when a new contour is generated in such a process, one of the contour sides constituting the new contour can be traced later so that the contour can be tracked. Is set as the starting edge. For this reason, even if the contour is updated as the above processing proceeds, the contour having a predetermined density value can be easily extracted by tracing the contour from the start side based on a predetermined rule. it can.

【0019】以下、このような処理を実現するための詳
細な構成について説明する。
Hereinafter, a detailed configuration for realizing such processing will be described.

【0020】<2.装置の構成>図2は、この発明の一
実施例としての画像の輪郭抽出装置100の構成を示す
ブロック図である。図2に示すように、この輪郭抽出装
置100は、前処理部10と注目画素抽出部20と輪郭
辺判定部30と輪郭線形成部40とメモリ50と輪郭抽
出部60と記憶部70とを備えている。
<2. Configuration of Apparatus> FIG. 2 is a block diagram showing the configuration of an image contour extraction apparatus 100 as one embodiment of the present invention. As shown in FIG. 2, the contour extracting apparatus 100 includes a pre-processing unit 10, a target pixel extracting unit 20, a contour side determining unit 30, a contour forming unit 40, a memory 50, a contour extracting unit 60, and a storage unit 70. Have.

【0021】記憶部70は画像をデータとして保存して
おくためのものであり、前処理部10は記憶部70から
画像を読み出し、その画像に対して前処理を施す部分で
ある。なお、前処理では、枠付き画像の生成と輪郭辺番
号の割付と濃度値に基づく画素のソーティングとが行わ
れるがこれらの処理の詳細については後述する。
The storage unit 70 is for storing an image as data, and the preprocessing unit 10 is a unit for reading an image from the storage unit 70 and performing preprocessing on the image. In the pre-processing, the generation of the framed image, the assignment of the contour side numbers, and the sorting of the pixels based on the density values are performed. The details of these processes will be described later.

【0022】注目画素抽出部20は、画像を構成する複
数の画素のうちから濃度値の最も高い画素から順に注目
画素を1画素ずつ順次抽出する。
The pixel-of-interest extraction unit 20 sequentially extracts pixels of interest one by one in order from the pixel having the highest density value among a plurality of pixels constituting the image.

【0023】そして、輪郭辺判定部30においては、注
目画素の4つの輪郭辺のうちのいずれかが既に生成され
ている輪郭線に含まれているか否かを判定し、その結果
を輪郭線形成部40に伝える。輪郭辺の判定にあたって
は、メモリ50に格納されている輪郭線接続情報DCを
参照する。輪郭線は複数の輪郭辺が連続的に接続された
ものであり、輪郭線接続情報DCには輪郭線を形成する
複数の輪郭辺の接続状態が既述されているため、この輪
郭線接続情報DCを参照することにより注目画素の4つ
の輪郭辺のうちのいずれかが既に生成されている輪郭線
に含まれているか否かを判定することができる。
Then, the contour side judging section 30 judges whether any of the four contour sides of the target pixel is included in the already generated contour line, and determines the result as the contour line formation. Inform part 40. In determining the contour side, the contour line connection information DC stored in the memory 50 is referred to. The outline is formed by connecting a plurality of outline sides continuously, and the outline line connection information DC already describes the connection state of the plurality of outline sides forming the outline. By referring to DC, it is possible to determine whether any of the four contour sides of the target pixel is included in the already generated contour line.

【0024】図3は、輪郭線接続情報DCを説明する図
である。例えば、図3(a)に示すように画素PAが注
目画素として抽出された場合であって画素PAの周囲に
ある4つの輪郭辺a,b,c,dによって新規輪郭線が
形成されたとき、輪郭線接続情報DCは図3(b)に示
すような状態に記述される。図3(b)の輪郭線接続情
報DCより、輪郭辺aは輪郭辺bに、輪郭辺bは輪郭辺
cに、輪郭辺cは輪郭辺dに、輪郭辺dは輪郭辺aにそ
れぞれ接続していることが判る。そして、これら輪郭辺
a,b,c,dによって形成される輪郭線の輪郭線番号
は「1」である。
FIG. 3 is a diagram for explaining the contour line connection information DC. For example, as shown in FIG. 3A, when the pixel PA is extracted as a pixel of interest and a new outline is formed by four outline sides a, b, c, and d around the pixel PA. The outline connection information DC is described in a state as shown in FIG. From the contour line connection information DC in FIG. 3B, the contour side a is connected to the contour side b, the contour side b is connected to the contour side c, the contour side c is connected to the contour side d, and the contour side d is connected to the contour side a. You can see that it is. The contour number of the contour formed by these contour sides a, b, c, and d is “1”.

【0025】そして、図3(a)に示す画素PBが注目
画素として抽出されたとき、図3(b)の輪郭線接続情
報DCを参照すれば画素PBの周囲にある4つの輪郭辺
b,e,f,gのうち輪郭辺bは既に輪郭線番号「1」
の輪郭線に含まれていることが判る。従って、輪郭線接
続情報DCを参照すれば注目画素の各輪郭辺の使用状態
を判定することができる。なお、1つの輪郭辺が同時に
複数の輪郭線に含まれるということはあり得ない。
Then, when the pixel PB shown in FIG. 3A is extracted as the pixel of interest, four contour sides b and 4 around the pixel PB can be obtained by referring to the contour connection information DC of FIG. The contour side b of e, f, and g is already the contour line number "1"
It can be seen that it is included in the contour line. Therefore, the use state of each contour side of the target pixel can be determined by referring to the contour line connection information DC. Note that it is impossible that one contour side is included in a plurality of contour lines at the same time.

【0026】輪郭線形成部40は輪郭線情報生成部40
aと輪郭線情報更新部40bとを備えており、輪郭辺判
定部30において注目画素の4つの輪郭辺のうちのいず
れもが既に生成されている輪郭線に含まれていないと判
定されたときは、輪郭線情報生成部40aが動作して新
規輪郭線の生成処理を行う一方、注目画素の4つの輪郭
辺のうちのいずれかが既に生成されている輪郭線に含ま
れていると判定されたときは、輪郭線情報更新部40b
が動作して既成輪郭線の更新処理を行う。この更新処理
には、後述するように輪郭線の分離と統合と消滅との処
理がある。
The contour line forming section 40 includes a contour line information generating section 40
a and a contour line information updating unit 40b, when the contour side determining unit 30 determines that none of the four contour sides of the target pixel is included in the already generated contour line. Indicates that while the contour information generation unit 40a operates to generate a new contour, it is determined that any of the four contour sides of the target pixel is included in the already generated contour. The contour line information updating unit 40b
Operates to update the existing contour line. This update processing includes processing of separation, integration, and disappearance of contour lines, as described later.

【0027】輪郭線情報生成部40aは、新規輪郭線を
生成すると、その輪郭線の接続状態を輪郭線接続情報D
Cに記述するとともに、輪郭線管理情報DMを生成し、
メモリ50に格納する。
When a new outline is generated, the outline information generation unit 40a changes the connection state of the outline to the outline connection information D.
C and generate contour line management information DM,
It is stored in the memory 50.

【0028】輪郭線情報更新部40bは、既成輪郭線を
更新した際に、輪郭線接続情報DCに記述されている輪
郭線の接続状態を更新する。
The outline information updating section 40b updates the connection state of the outline described in the outline connection information DC when updating the existing outline.

【0029】また、輪郭線情報更新部40bは、更新に
よって既成輪郭線の少なくとも1つが消滅したときに、
その消滅した輪郭線についての輪郭線管理情報DMの終
了濃度値の欄に現在の注目画素の濃度値より1つ高い濃
度値を格納する。ここで、更新によって既成輪郭線の少
なくとも1つが消滅する場合は、輪郭線管理情報DMに
登録されている開始辺が注目画素を追加したことにより
有効でなくなってしまう場合と2以上の輪郭線の統合に
よって1つの輪郭線のみが残り、他の輪郭線が消滅する
場合とを含んでいる。また、さらに、輪郭線情報更新部
40bは、次に抽出すべき注目画素が無くなったときに
は、輪郭線管理情報DMにおいて終了濃度値が未だ格納
されていないものについて終了濃度値として「0」を格
納する。なお、このように終了濃度値を格納する処理を
終了処理という。
When at least one of the existing outlines has disappeared due to the update, the outline information updating unit 40b executes
The density value one higher than the density value of the current pixel of interest is stored in the column of the end density value of the outline management information DM for the disappeared outline. Here, when at least one of the existing contour lines disappears due to the update, the case where the start side registered in the contour line management information DM becomes invalid due to the addition of the pixel of interest and the case where two or more contour lines This includes the case where only one outline remains after integration and the other outline disappears. Further, when there is no more target pixel to be extracted next, the contour line information updating unit 40b stores “0” as the end density value for the contour line management information DM for which the end density value has not yet been stored. I do. Note that the process of storing the end density value in this manner is called an end process.

【0030】上述の輪郭線接続情報DCは輪郭線そのも
のであるので、輪郭線情報生成部40aと輪郭線情報更
新部40bとにおいて輪郭線接続情報DCに新規接続状
態を記述した際又は輪郭線接続情報DCを更新した際に
その輪郭線接続情報DCを出力すれば、輪郭線出力とな
る。
Since the outline connection information DC described above is the outline itself, the outline information generation unit 40a and the outline information update unit 40b describe when the new connection state is described in the outline connection information DC or when the outline connection is performed. If the contour line connection information DC is output when the information DC is updated, the contour line is output.

【0031】例えば、画像の濃度値が0〜255の25
6階調である場合であって濃度値が126の輪郭線を抽
出したい場合は、濃度値255の画素から順次注目画素
を抽出していき、それぞれの濃度値についての輪郭線を
形成させていく。そして濃度値が126である画素の全
てについての処理が終了すると、輪郭線接続情報DCに
所望の輪郭線が形成されたこととなるため、それを出力
すればよい。そして、この場合は、濃度値が125以下
である画素の抽出処理は行わなくてもよいので効率的な
輪郭抽出となっている。
For example, if the density value of the image is 0 to 255, ie 25
When it is desired to extract a contour line having a density value of 126 when there are six gradations, a pixel of interest is sequentially extracted from pixels having a density value of 255, and a contour line is formed for each density value. . Then, when the processing for all the pixels having the density value of 126 is completed, a desired outline is formed in the outline connection information DC, and this may be output. In this case, the extraction of pixels having a density value of 125 or less does not need to be performed, so that efficient contour extraction is performed.

【0032】しかしながら、この実施の形態では、一度
全画像について1画素ごとの輪郭線形成を行っておけ
ば、再度輪郭線を抽出しようとする際には全画像につい
て1画素ごとの輪郭線形成を行う必要がないようにする
ために、輪郭線管理情報DMをメモリ50に格納する。
However, in this embodiment, once the outline is formed for each pixel for the entire image, the outline is formed for each pixel when the outline is to be extracted again. The contour management information DM is stored in the memory 50 in order to eliminate the necessity.

【0033】ここで、輪郭線管理情報DMについて説明
する。図4は、輪郭線管理情報DMを説明する図であ
る。なお、図4(a)に示す各画素内の数字は各画素の
濃度値を示している。
Here, the outline management information DM will be described. FIG. 4 is a diagram illustrating the outline management information DM. The numbers in each pixel shown in FIG. 4A indicate the density value of each pixel.

【0034】例えば、図4(a)に示すように画素PA
が注目画素として抽出された場合であって画素PAの周
囲にある4つの輪郭辺a,b,c,dによって新規輪郭
線が形成されたとき、輪郭線管理情報DMは図4(b)
に示すような状態に記述される。輪郭線管理情報DMの
輪郭線番号には、既存の輪郭線番号と重複しない番号が
付与される。また、開始辺番号には、新規に生成された
輪郭線を後に抽出する際に抽出開始点となる輪郭辺(す
なわち、開始辺)の番号が格納される。
For example, as shown in FIG.
Is extracted as a pixel of interest, and when a new outline is formed by four outline sides a, b, c, and d around the pixel PA, the outline management information DM is shown in FIG.
Are described in the state shown in FIG. A number that does not overlap with an existing contour number is assigned to the contour number of the contour management information DM. The start side number stores the number of a contour side (that is, a start side) that becomes an extraction start point when a newly generated contour line is extracted later.

【0035】開始辺としては、注目画素に隣接する画素
のうち最小の濃度値を示す画素と共有している輪郭辺、
若しくは、注目画素に隣接する画素のうち注目画素の濃
度値と最も差の大きい濃度値を有する画素と共有してい
る輪郭辺を選択することが好ましい。この理由は、開始
辺の有効となる有効濃度範囲を最も大きくすることがで
きるからである。従って、図4(a)のような濃度値の
場合、開始辺として輪郭辺aが決定される。
As the start side, a contour side shared with the pixel having the minimum density value among the pixels adjacent to the target pixel,
Alternatively, it is preferable to select a contour side shared with a pixel having a density value having the largest difference from the density value of the target pixel among the pixels adjacent to the target pixel. The reason is that the effective density range in which the starting side is effective can be maximized. Therefore, in the case of the density value as shown in FIG. 4A, the contour side a is determined as the start side.

【0036】開始濃度値には、注目画素PAの濃度値
「9」が格納される。また、終了濃度値には、輪郭線番
号「1」の輪郭線が更新されて消滅するとき、すなわち
開始辺が無効となるときの注目画素の濃度値よりも1つ
高い濃度値が格納される。
The starting density value stores the density value “9” of the pixel of interest PA. The end density value stores a density value that is one higher than the density value of the target pixel when the outline with the outline number “1” is updated and disappears, that is, when the start side becomes invalid. .

【0037】輪郭辺の数には、輪郭線番号「1」の輪郭
線を構成する輪郭辺の数が格納される。図4(a)の例
の場合であると、輪郭線は4つの輪郭辺a,b,c,d
によって構成されているので、輪郭辺の数は「4」とな
っている。
The number of contour sides stores the number of contour sides forming the contour with the contour number "1". In the case of the example of FIG. 4A, the contour lines are four contour sides a, b, c, and d.
, The number of contour sides is “4”.

【0038】このような輪郭線管理情報DMをメモリ5
0に保持しておくことにより、後に任意の濃度値の輪郭
線を抽出する場合は、輪郭抽出部60が輪郭線管理情報
DMの開始濃度値と終了濃度値とによって輪郭線の開始
辺が有効な有効濃度範囲を知ることができ、輪郭線抽出
の対象となる濃度値が有効濃度範囲内に存在する開始辺
を全て取得することができる。そして輪郭抽出部60
が、それらの開始辺から所定のルールに基づいて輪郭抽
出を行っていけば適切に画像の輪郭抽出を行うことがで
きる。
The contour line management information DM is stored in the memory 5.
When the contour is held at 0, when a contour having an arbitrary density value is to be extracted later, the contour extracting unit 60 determines that the start side of the contour is valid based on the start density value and the end density value of the contour management information DM. The effective density range can be known, and all the starting sides where the density value to be subjected to contour line extraction exists within the effective density range can be acquired. Then, the contour extraction unit 60
However, if the contour extraction is performed from these start sides based on a predetermined rule, the contour extraction of the image can be appropriately performed.

【0039】すなわち、図2の装置において、メモリ5
0内に輪郭線管理情報DMが未だ格納されていないとき
は、前処理部10と注目画素抽出部20と輪郭辺判定部
30と輪郭線形成部40とが機能して、各濃度値ごとの
輪郭線を形成していくに伴って輪郭線管理情報DMと輪
郭線接続情報DCとをメモリ50に逐次格納していくよ
うに構成されている。また、輪郭線形成部40は輪郭線
接続情報DCを生成/更新する際にそれを出力すれば輪
郭線出力を行うことができる。
That is, in the device shown in FIG.
When the outline management information DM has not been stored in 0 yet, the pre-processing unit 10, the pixel-of-interest extraction unit 20, the outline side determination unit 30, and the outline generation unit 40 function to operate for each density value. As the contour is formed, the contour management information DM and the contour connection information DC are sequentially stored in the memory 50. In addition, when generating / updating the contour line connection information DC, the contour line forming unit 40 can output the contour line by outputting it.

【0040】一方、メモリ50内に輪郭線管理情報DM
が既に格納されているときは、輪郭抽出部60が機能し
て、メモリ50内の輪郭線管理情報DMを読み出して輪
郭線ごとに登録されている開始辺より所定のルールに基
づいて輪郭抽出を行うように構成されており、輪郭抽出
部60が抽出した輪郭線を出力する。
On the other hand, the outline management information DM is stored in the memory 50.
Is already stored, the contour extraction unit 60 functions to read the contour management information DM in the memory 50 and extract the contour from the starting side registered for each contour based on a predetermined rule. The contour extracting unit 60 outputs the contour extracted.

【0041】<3.前処理>前処理部10において行わ
れる前処理について説明する。
<3. Preprocessing> The preprocessing performed in the preprocessing unit 10 will be described.

【0042】まず、第1の前処理として枠付き画像の生
成が行われる。図5は、枠付き画像の生成を説明する図
である。図5(a)は輪郭抽出の対象となる原画像を示
しており、図5(b)は枠付き画像を生成する際の中間
段階を示しており、図5(c)は原画像に対して生成さ
れる枠付き画像を示している。図5においては、原画像
は、5×4の20画素によって構成される例を示してお
り、各画素内の数字はその画素の濃度値を示している。
なお、以下においては、図5(a)に示すような原画像
についての処理を一例として説明することとする。
First, a framed image is generated as a first preprocessing. FIG. 5 is a diagram illustrating generation of a framed image. FIG. 5A shows an original image to be subjected to contour extraction, FIG. 5B shows an intermediate stage in generating a framed image, and FIG. 2 shows a framed image generated by the above method. FIG. 5 shows an example in which the original image is composed of 20 5 × 4 pixels, and the number in each pixel indicates the density value of that pixel.
In the following, processing on an original image as shown in FIG. 5A will be described as an example.

【0043】前処理部10は、図5(a)の原画像に対
してその周囲を1画素分だけ広げた画像領域を確保する
(図5(b))。その結果、原画像の周囲に分布するこ
ととなる全ての画素に対して濃度値0を格納する。この
ようにして図5(c)に示すように7×6の42画素か
らなる枠付き画像を生成する。
The preprocessing section 10 secures an image area in which the periphery of the original image of FIG. 5A is expanded by one pixel (FIG. 5B). As a result, the density value 0 is stored for all pixels that are distributed around the original image. In this way, a framed image composed of 7 × 6 42 pixels is generated as shown in FIG.

【0044】このような枠付き画像を生成する理由は、
原画像の全ての輪郭辺について同一の処理を施すことが
できるようにし、処理効率を向上させるためである。図
5(a)に示す原画像の外周部に位置する各輪郭辺は、
他の画素と接していないため、濃度値比較を行うことが
できない。従って、原画像に含まれる全ての輪郭辺につ
いて濃度値比較を行うことができるようにするために枠
付き画像を生成する。なお、図5(a)に示す原画像の
外周部に位置する各輪郭辺については他の輪郭辺とは異
なる例外処理を行うようにする場合、枠付き画像を生成
することは不要である。
The reason for generating such a framed image is as follows.
This is because the same processing can be performed on all the contour sides of the original image to improve processing efficiency. Each contour side located on the outer peripheral portion of the original image shown in FIG.
Since it is not in contact with other pixels, density value comparison cannot be performed. Therefore, a framed image is generated so that density value comparison can be performed for all contour sides included in the original image. Note that, in the case where exception processing different from other contour sides is performed on each contour side located on the outer peripheral portion of the original image illustrated in FIG. 5A, it is unnecessary to generate a framed image.

【0045】次に、第2の前処理として枠付き画像の含
まれる各輪郭辺に対して輪郭辺番号の割付処理が行われ
る。図6は、輪郭辺番号の割付を説明する図である。枠
付き画像において主走査方向Xにn個の画素が存在する
とすると、1ライン目の左端の画素の下辺には0番を付
与し、右辺には1番を付与する。そして、1ライン目の
2番目の画素の下辺、右辺、3番目の画素の下辺、右辺
というように順次番号を付与していく。主走査方向Xに
はn個の画素が存在するため、2ライン目の左端の画素
の下辺には(2n)番を付与することとなり、右辺には
(2n+1)番を付与することとなる。以下同様に、そ
して、2ライン目の2番目の画素の下辺、右辺、3番目
の画素の下辺、右辺というように順次番号を付与してい
き、全てのラインについて輪郭辺番号を付与する。
Next, as a second preprocessing, a process of assigning a contour side number to each contour side including the framed image is performed. FIG. 6 is a diagram for explaining assignment of contour side numbers. If there are n pixels in the main scanning direction X in the framed image, the number 0 is assigned to the lower side of the leftmost pixel on the first line, and the number 1 is assigned to the right side. Then, numbers are sequentially assigned to the lower side of the second pixel on the first line, the right side, the lower side of the third pixel, the right side, and so on. Since there are n pixels in the main scanning direction X, (2n) is assigned to the lower side of the leftmost pixel on the second line, and (2n + 1) is assigned to the right side. In the same manner, numbers are sequentially assigned to the lower side of the second pixel, the right side, the lower side of the third pixel, and the right side of the second line, and the contour side numbers are allocated to all the lines.

【0046】このようにして図5(c)のような7×6
の枠付き画像について輪郭辺番号を割り付けると図7の
ようになる。なお、図7において太線は原画像部分を示
している。従って、この輪郭辺番号の割付によって、原
画像の輪郭抽出に必要な全ての輪郭辺に固有の番号が付
与されたこととなる。ここで、図7に示すように枠付き
画像の上端に位置する各輪郭辺と、左端に位置する各輪
郭辺とには輪郭辺番号は割り付けられないがこれらの輪
郭辺が原画像の輪郭となることはあり得ないので問題な
い。
In this way, the 7 × 6 as shown in FIG.
FIG. 7 shows a case where contour side numbers are assigned to the framed image. In FIG. 7, the thick line indicates the original image portion. Therefore, by the assignment of the contour side numbers, unique numbers are assigned to all the contour sides necessary for extracting the contour of the original image. Here, as shown in FIG. 7, a contour side number is not assigned to each contour side located at the upper end of the framed image and each contour side located at the left end, but these contour sides correspond to the contours of the original image. There is no problem because it cannot happen.

【0047】また、原画像に対してのみ輪郭辺番号の割
付を行う場合は、原画像の上端および左端に位置する輪
郭辺に対して輪郭辺番号を付与するために例外処理を行
わなければならないので時間がかかるが、上記のように
枠付き画像に対して輪郭辺番号の割付を行う場合は、例
外処理を行わずとも原画像に含まれる全ての輪郭辺に対
して番号が付与されるため、効率的に輪郭辺番号を付与
することができ、処理時間を短縮することができる。
When assigning the contour side numbers only to the original image, exception processing must be performed to assign the contour side numbers to the contour sides located at the upper end and the left end of the original image. However, when assigning the contour side numbers to the framed image as described above, the numbers are assigned to all the contour sides included in the original image without performing the exception processing. Thus, the contour side numbers can be efficiently assigned, and the processing time can be reduced.

【0048】次に、第3の前処理として原画像を構成す
る画素を濃度値に基づいてソートする処理が行われる。
濃度値に基づいたソートを行うのは、注目画素抽出部2
0が濃度値の高い画素から順次注目画素を抽出すること
ができるようにするためである。従って、原画像を構成
する画素のうちから濃度値の高い順に1つの画素を抽出
することができるようにソートすることができる手法で
あればよいため、公知となっている種々のソート方法を
適用することができる。
Next, as a third pre-process, a process of sorting the pixels constituting the original image based on the density value is performed.
The sort based on the density value is performed by the target pixel extracting unit 2.
0 is for enabling the pixel of interest to be sequentially extracted from the pixel having the highest density value. Therefore, any method may be used as long as it can be sorted so that one pixel can be extracted in descending order of the density value from the pixels constituting the original image. can do.

【0049】しかしながら、公知となっている種々のソ
ート方法は、判断処理やデータの入れ替え処理が多用さ
れるためソートに時間がかかる。
However, various known sorting methods require a lot of time for judgment processing and data exchange processing, so that sorting takes time.

【0050】そこで、この実施の形態では、効率的にソ
ートを行うために以下に示すようなソート方法を適用す
ることが好ましい。
Therefore, in this embodiment, it is preferable to apply the following sorting method in order to perform the sorting efficiently.

【0051】まず、ソート処理を行うに先立って、枠付
き画像の各画素に対して座標値を設定する。一般に画像
平面内の各画素に座標値を設定する場合は、主走査方向
Xの位置と副走査方向Yの位置とによって現すXY座標
系が使用されるが、この場合はX座標とY座標との2つ
の値を管理しなければならない。そこで、この実施の形
態では、枠付き画像が主走査方向Xにn個の画素を有す
るとすると、「(Y座標)×(n個)+(X座標)」に
よって導かれる1つの値を座標値とする。すなわち、枠
付き画像の主走査方向Xに沿って順次1つの番号を付与
していくことにより各画素に対して座標値を設定する。
このようにして図5(c)に示す枠付き画像について座
標値を設定すると、各画素の座標値は図8に示すように
なる。なお、図8において各画素の数字は座標値であ
り、濃度値の表示は省略している。また、図8における
太線は原画像部分を示している。
First, before performing the sorting process, coordinate values are set for each pixel of the framed image. Generally, when a coordinate value is set for each pixel in the image plane, an XY coordinate system expressed by a position in the main scanning direction X and a position in the sub scanning direction Y is used. In this case, the X coordinate and the Y coordinate are used. Must be managed. Therefore, in this embodiment, assuming that the framed image has n pixels in the main scanning direction X, one value derived by “(Y coordinate) × (n) + (X coordinate)” is represented by coordinates. Value. That is, the coordinate value is set for each pixel by sequentially assigning one number along the main scanning direction X of the framed image.
When the coordinate values are set for the framed image shown in FIG. 5C in this way, the coordinate values of each pixel are as shown in FIG. In FIG. 8, the number of each pixel is a coordinate value, and the display of the density value is omitted. The thick line in FIG. 8 indicates an original image portion.

【0052】次に、実際のソート処理に移る。はじめ
に、原画像に含まれる全ての画素を検索し、濃度値ごと
の画素数をカウントする。図5に示す原画像について濃
度値ごとの画素数をカウントすると、図9に示すような
カウント結果が得られる。このカウント結果を前処理部
10は内部に設けられている図示しないメモリなどに一
時的に格納する。
Next, the process proceeds to the actual sorting process. First, all pixels included in the original image are searched, and the number of pixels for each density value is counted. When the number of pixels for each density value is counted for the original image shown in FIG. 5, a count result as shown in FIG. 9 is obtained. The pre-processing unit 10 temporarily stores the count result in a memory (not shown) provided therein.

【0053】そして、図9に示すカウント結果に基づい
て、各濃度値ごとに、当該濃度値未満の濃度値を示す累
積画素数を導く。例えば、図9のカウント結果より、濃
度値1の累積画素数は濃度値0の画素数であるため0個
となり、濃度値2の累積画素数は濃度値0〜1の画素数
の和であるため2個となり、濃度値3の累積画素数は濃
度値0〜2の画素数の和であるため5個となる。このよ
うにして各濃度値について累積画素数を求ると、図10
のようになる。
Then, based on the count result shown in FIG. 9, for each density value, the cumulative number of pixels indicating a density value lower than the density value is derived. For example, from the count result in FIG. 9, the cumulative number of pixels of density value 1 is 0 because it is the number of pixels of density value 0, and the cumulative number of pixels of density value 2 is the sum of the number of pixels of density values 0 to 1. Therefore, the number of pixels having a density value of 3 is 5, which is the sum of the number of pixels having a density value of 0 to 2, and thus is 5. When the cumulative number of pixels is obtained for each density value in this manner, FIG.
become that way.

【0054】そして、次に、ソートデータを格納するバ
ッファ領域を原画像を構成する画素数分だけ確保する。
図5に示す原画像の場合は20個の画素を有するので、
20個分のバッファ領域を確保する。そして、原画像を
構成する画素のうちから座標値順に1画素抽出し、その
濃度値を検出する。
Then, a buffer area for storing the sort data is secured by the number of pixels constituting the original image.
Since the original image shown in FIG. 5 has 20 pixels,
20 buffer areas are reserved. Then, one pixel is extracted in the order of coordinate values from the pixels constituting the original image, and the density value is detected.

【0055】図5の原画像の場合、図11に示すように
濃度値2の画素が最初に抽出される。この抽出した画素
の濃度値2に対応する累積画素数は2であるため、バッ
ファ領域の2に対応する格納位置、すなわちメモリアド
レス2の位置に抽出した画素の座標値を格納する。図1
1の場合、抽出した濃度値2の画素の座標値は8である
ため(図8参照)、メモリアドレス2の位置に座標値8
が格納される。そして、バッファ領域に座標値を格納す
ると、濃度値2の累積画素数2に対して1を加算するこ
とにより、濃度値2の累積画素数を3に変更する。
In the case of the original image shown in FIG. 5, a pixel having a density value 2 is first extracted as shown in FIG. Since the number of accumulated pixels corresponding to the density value 2 of the extracted pixel is 2, the coordinate value of the extracted pixel is stored at the storage position corresponding to 2 in the buffer area, that is, at the position of memory address 2. FIG.
In the case of 1, since the coordinate value of the extracted pixel having the density value 2 is 8 (see FIG. 8), the coordinate value 8 is stored at the position of the memory address 2.
Is stored. When the coordinate values are stored in the buffer area, 1 is added to the cumulative number of pixels 2 of the density value 2 to change the cumulative number of pixels of the density value 2 to 3.

【0056】次に、図12に示すように濃度値9の画素
が抽出される。この抽出した画素の濃度値9に対応する
累積画素数は19であるため、バッファ領域の19に対
応する格納位置、すなわちメモリアドレス19の位置に
抽出した画素の座標値を格納する。図12の場合、抽出
した濃度値9の画素の座標値は9であるため(図8参
照)、メモリアドレス19の位置に座標値9が格納され
る。そして、バッファ領域に座標値を格納すると、濃度
値9の累積画素数19に対して1を加算することによ
り、濃度値9の累積画素数を20に変更する。
Next, as shown in FIG. 12, pixels having a density value of 9 are extracted. Since the accumulated number of pixels corresponding to the density value 9 of the extracted pixel is 19, the coordinate value of the extracted pixel is stored at the storage position corresponding to 19 in the buffer area, that is, at the position of the memory address 19. In the case of FIG. 12, since the coordinate value of the extracted pixel having the density value 9 is 9 (see FIG. 8), the coordinate value 9 is stored at the position of the memory address 19. When the coordinate values are stored in the buffer area, 1 is added to the cumulative number of pixels 19 of the density value 9 to change the cumulative number of pixels of the density value 9 to 20.

【0057】以下、原画像を構成する画素のうちから座
標値順に1画素する毎に同様の処理を繰り返し行う。そ
して、原画像を構成する全ての画素についての処理が終
了すると、各濃度値ごとの累積画素数とバッファ領域と
は、図13に示すような状態となる。
Hereinafter, the same processing is repeated every time one pixel is selected from the pixels constituting the original image in the order of coordinate values. Then, when the processing for all the pixels constituting the original image is completed, the cumulative number of pixels and the buffer area for each density value are in a state as shown in FIG.

【0058】図13(b)に示すバッファ領域には、メ
モリアドレスの小さい方から順に、濃度値の小さい画素
の座標値が格納されている。例えば、メモリアドレス
0,1には濃度値1の画素の座標値が格納されており、
メモリアドレス2〜4には濃度値2の画素の座標値が格
納されている。従って、上記のような処理を行うことに
より、バッファ領域内に原画像を構成する画素を濃度値
に基づいてソートされた結果が格納されていることとな
る。
In the buffer area shown in FIG. 13B, the coordinate values of the pixels having the smaller density values are stored in the order from the smallest memory address. For example, the memory address 0, 1 stores the coordinate value of the pixel having the density value 1,
The memory addresses 2 to 4 store the coordinate values of the pixel having the density value 2. Therefore, by performing the above processing, the result of sorting the pixels constituting the original image based on the density value is stored in the buffer area.

【0059】上記のようなソート方法を適用すると、2
つの画素の濃度値を比較する判断処理やデータの入れ替
え処理を行うことなくソートすることができるのでソー
トに要する時間を短縮することができる。
When the above sorting method is applied, 2
Sorting can be performed without performing a judgment process of comparing the density values of two pixels or a process of replacing data, so that the time required for sorting can be reduced.

【0060】このようにバッファ領域内に濃度値に基づ
いたソート結果を格納しておくと注目画素抽出部20が
濃度値の高い画素から順次注目画素を抽出する際には、
バッファ領域の最大のメモリアドレスの位置から順次座
標値を取得してその座標値の画素を抽出していけばよ
く、効率的な処理ができる。
As described above, if the sort result based on the density value is stored in the buffer area, when the target pixel extracting unit 20 sequentially extracts the target pixel from the pixel having the higher density value,
It is only necessary to sequentially acquire coordinate values from the position of the largest memory address in the buffer area and extract the pixels having the coordinate values, and efficient processing can be performed.

【0061】<4.輪郭線管理情報などの生成と更新>
次に、注目画素抽出部20が濃度値の高い画素から順次
注目画素を抽出していき、輪郭線管理情報と輪郭線接続
情報とを生成したり、更新したりする処理について説明
する。
<4. Generation and update of contour management information etc.>
Next, a description will be given of a process in which the target pixel extracting unit 20 sequentially extracts the target pixel from the pixel having the highest density value, and generates or updates the outline management information and the outline connection information.

【0062】注目画素抽出部20は、図13(b)のよ
うなソート結果に基づいて濃度値の高い画素から順次注
目画素を抽出する。そして、注目画素の周囲にある4つ
の輪郭辺の輪郭辺番号を求める。図13(b)に示すよ
うに、ソート結果には画素の座標値が格納されているた
め、この座標値より注目画素の4つの輪郭辺の番号を求
める。例えば、注目画素の座標値をPとし、枠付き画像
の主走査方向Xにn個の画素が存在するとし、注目画素
の上側、右側、下側、左側にあるそれぞれの輪郭辺番号
をNU、NR、ND、NLとすると、 上側の輪郭辺番号:NU=(P−n)×2 右側の輪郭辺番号:NR=(P×2)+1 下側の輪郭辺番号:ND=(P×2) 左側の輪郭辺番号:NL=(P×2)−1 で求めることができる。そして、注目画素抽出部20
は、注目画素についての4つの輪郭辺番号を輪郭辺判定
部30に送る。
The pixel-of-interest extraction unit 20 sequentially extracts the pixel of interest from the pixel having the highest density value based on the sort result as shown in FIG. Then, the contour side numbers of the four contour sides around the target pixel are obtained. As shown in FIG. 13B, since the coordinate values of the pixels are stored in the sorting result, the numbers of the four contour sides of the target pixel are obtained from the coordinate values. For example, suppose that the coordinate value of the pixel of interest is P, and that n pixels exist in the main scanning direction X of the framed image, and the contour side numbers on the upper, right, lower, and left sides of the pixel of interest are NU, Assuming that NR, ND, and NL, the upper contour side number: NU = (P−n) × 2 The right contour side number: NR = (P × 2) +1 The lower contour side number: ND = (P × 2 ) Left contour side number: NL = (P × 2) −1. Then, the attention pixel extraction unit 20
Sends the four contour side numbers of the pixel of interest to the contour side determination unit 30.

【0063】輪郭辺判定部30は、メモり50内の輪郭
線接続情報DCを参照し、注目画素の輪郭辺番号が既に
生成されている輪郭線に含まれているか否かを判定す
る。
The contour side determining section 30 refers to the contour connection information DC in the memory 50 and determines whether or not the contour side number of the target pixel is included in the already generated contour.

【0064】そして、メモリ50内に輪郭線接続情報D
Cが未だ格納されていない場合、又は輪郭線接続情報D
Cを参照した結果、注目画素の4つの輪郭辺のいずれも
が既成輪郭線に含まれていないと判定した場合は、輪郭
線情報生成部40aに注目画素の4つの輪郭辺からなる
輪郭線を生成するように指令する。これにより、輪郭線
情報生成部40aは、注目画素の周囲にある4つの輪郭
辺からなる新規輪郭線を生成し、メモリ50の輪郭線接
続情報DCにその新規輪郭線の接続状態を記述するとと
もに、新規輪郭線の開始辺などを求めて輪郭線管理情報
DMに記述する。
The outline connection information D is stored in the memory 50.
C is not stored yet, or the contour line connection information D
As a result of referring to C, if it is determined that none of the four outline sides of the target pixel is included in the existing outline, the outline information generation unit 40a adds the outline including the four outline sides of the target pixel to the outline information generation unit 40a. Instructs it to be generated. As a result, the contour information generation unit 40a generates a new contour composed of four contour sides around the target pixel, and describes the connection state of the new contour in the contour connection information DC of the memory 50. , And the start side of the new contour is obtained and described in the contour management information DM.

【0065】一方、輪郭線接続情報DCを参照した結
果、注目画素の4つの輪郭辺のいずれかが既成輪郭線に
含まれていると判定した場合は、輪郭線情報更新部40
bに輪郭線接続情報DCと輪郭線管理情報DMとを更新
するよう指令する。
On the other hand, as a result of referring to the outline connection information DC, if it is determined that any of the four outline sides of the target pixel is included in the existing outline, the outline information updating unit 40
b is instructed to update the outline connection information DC and the outline management information DM.

【0066】輪郭線情報更新部40bが輪郭線接続情報
DCと輪郭線管理情報DMとを更新する処理について説
明する。図14は、注目画素の4つの輪郭辺が1つの既
成輪郭線に含まれている場合を示す図である。なお、図
14において斜線を施した画素は注目画素であり、細線
は各輪郭辺であり、太線は輪郭線に含まれている輪郭辺
を示している。図14(a)に示すように注目画素の4
つの輪郭辺a,b,c,dのうち、輪郭辺dは既成輪郭
線E1に含まれている。このような状態で注目画素を追
加すると、図14(b)の太線に示すように既成輪郭線
E1が更新される。
A process in which the contour information updating unit 40b updates the contour connection information DC and the contour management information DM will be described. FIG. 14 is a diagram illustrating a case where four contour sides of the target pixel are included in one existing contour line. In FIG. 14, the hatched pixels are the target pixels, the thin lines are the outline sides, and the thick lines indicate the outline sides included in the outline. As shown in FIG.
Of the three contour sides a, b, c, d, the contour side d is included in the existing contour line E1. When the pixel of interest is added in such a state, the existing contour line E1 is updated as shown by the thick line in FIG.

【0067】図15は、図14(a)の輪郭線E1を図
14(b)の輪郭線E1に更新する過程を示す図であ
る。なお、図15(a)〜(e)において左図はメモリ
50に格納される輪郭線接続情報DCであり、右図は注
目画素の4つの輪郭辺から輪郭線が形成されると仮想し
た場合にメモリ50に一時的に格納される注目画素の輪
郭辺の仮想接続状態である。
FIG. 15 is a diagram showing a process of updating the contour E1 of FIG. 14A to the contour E1 of FIG. 15 (a) to 15 (e), the left diagram is the contour connection information DC stored in the memory 50, and the right diagram is a case where a contour is formed from four contour sides of the target pixel. 3 shows a virtual connection state of the contour side of the pixel of interest temporarily stored in the memory 50.

【0068】まず、図14(a)に示す注目画素が抽出
されたときは、輪郭線E1の輪郭線接続情報DCと仮想
接続情報とは図15(a)となる。すなわち、輪郭線E
1の接続状態は「e→d→f→g」となっている。ま
た、注目画素の4つの輪郭辺のつながりは、「a→b→
c→d→a」となっている。
First, when the target pixel shown in FIG. 14A is extracted, the outline connection information DC of the outline E1 and the virtual connection information are as shown in FIG. 15A. That is, the contour line E
The connection state of No. 1 is “e → d → f → g”. The connection between the four contour sides of the pixel of interest is “a → b →
c → d → a ”.

【0069】そして、今回注目画素を追加することによ
って輪郭辺dは輪郭線E1に含まれないようになる。そ
のため、輪郭線接続情報DCにおいて輪郭辺dを次の輪
郭辺(接続先)としている輪郭辺eについての次の輪郭
辺番号を更新することとなる。つまり、仮想接続状態を
参照すると、輪郭辺dは輪郭辺aに接続するため、輪郭
辺eについての次の輪郭辺番号はaに書き換えられる。
この結果、輪郭線E1の輪郭線接続情報DCと仮想接続
情報とは図15(b)となる。
By adding the target pixel this time, the contour side d is not included in the contour line E1. Therefore, in the contour line connection information DC, the next contour side number for the contour side e with the contour side d as the next contour side (connection destination) is updated. That is, referring to the virtual connection state, since the contour side d is connected to the contour side a, the next contour side number for the contour side e is rewritten to a.
As a result, the outline connection information DC and the virtual connection information of the outline E1 are as shown in FIG.

【0070】また、今回注目画素を追加することによっ
て輪郭辺dは輪郭線E1に含まれないようになるため、
仮想接続情報において輪郭辺dを次の輪郭辺(接続先)
としている輪郭辺cについての次の輪郭辺番号を更新す
ることとなる。つまり、輪郭線接続情報DCを参照する
と、輪郭辺dは輪郭辺fに接続するため、輪郭辺cにつ
いての次の輪郭辺番号はfに書き換えられる。この結
果、輪郭線E1の輪郭線接続情報DCと仮想接続情報と
は図15(c)となる。
Also, by adding the pixel of interest this time, the contour side d is not included in the contour line E1.
The contour side d in the virtual connection information is the next contour side (connection destination)
The next contour side number for the contour side c is updated. That is, referring to the outline connection information DC, the outline side d is connected to the outline side f, so the next outline side number for the outline side c is rewritten to f. As a result, the outline connection information DC and the virtual connection information of the outline E1 are as shown in FIG.

【0071】そして、今回注目画素を追加することによ
って輪郭辺dは輪郭線E1に含まれないようになるた
め、輪郭辺接続情報DCから輪郭辺dについての接続状
態を消去する。この結果、輪郭線E1の輪郭線接続情報
DCと仮想接続情報とは図15(d)となる。
Since the contour side d is not included in the contour line E1 by adding the pixel of interest this time, the connection state of the contour side d is deleted from the contour side connection information DC. As a result, the outline connection information DC and the virtual connection information of the outline E1 are as shown in FIG.

【0072】そして、仮想接続情報うちから輪郭辺dを
除く輪郭辺a,b,cについての接続状態を輪郭線接続
情報DCに書き写すことにより、輪郭線E1の輪郭線接
続情報DCと仮想接続情報とは図15(e)のようにな
る。図15(e)の輪郭線接続情報DCでは、図14
(b)の太線に示すような輪郭線E1の接続状態が記述
されていることとなる。従って、ここまでの処理が行わ
れると、仮想接続情報はメモリ50から消去されてもよ
い。
Then, the connection state of the outline sides a, b, and c excluding the outline side d from the virtual connection information is copied to the outline connection information DC, so that the outline connection information DC of the outline E1 and the virtual connection information are obtained. Is as shown in FIG. In the contour line connection information DC of FIG.
The connection state of the outline E1 as shown by the bold line in (b) is described. Therefore, the virtual connection information may be deleted from the memory 50 when the processing up to this point is performed.

【0073】次に、注目画素の4つの輪郭辺が2以上の
既成輪郭線に含まれている場合は、上記の処理とほぼ同
様であるが、異なる部分もある。例えば、図16は、注
目画素の4つの輪郭辺が3つの既成輪郭線に含まれてい
る場合を示す図である。なお、図15において斜線を施
した画素は注目画素であり、細線は各輪郭辺であり、太
線は輪郭線に含まれている輪郭辺を示している。図14
(a)では、輪郭辺e,d,f,gは輪郭線E1に含ま
れており、輪郭辺t,a,sは輪郭線E2に含まれてお
り、輪郭辺m,c,nは輪郭線E3に含まれている。ま
た、輪郭線E1において各輪郭辺は「e→d→f→g」
の順で接続されており、輪郭線E2において各輪郭辺は
「t→a→s」の順で接続されており、輪郭線E3にお
いて各輪郭辺は「m→c→n」の順で接続されている。
このような状態で斜線で示した注目画素を追加すると、
図14(b)の太線に示すように輪郭線E2,E3が輪
郭線E1に統合されて消滅する。
Next, when the four contour sides of the target pixel are included in two or more existing contour lines, the processing is almost the same as that described above, but there are some differences. For example, FIG. 16 is a diagram illustrating a case where four contour sides of a target pixel are included in three existing contour lines. In FIG. 15, the hatched pixels are the target pixels, the thin lines are the outline sides, and the bold lines are the outline sides included in the outline. FIG.
In (a), contour sides e, d, f, and g are included in contour line E1, contour sides t, a, and s are included in contour line E2, and contour sides m, c, and n are contour lines. It is included in line E3. In the contour line E1, each contour side is “e → d → f → g”.
In the contour line E2, each contour side is connected in the order of “t → a → s”, and in the contour line E3, each contour side is connected in the order of “m → c → n”. Have been.
In such a state, if you add the pixel of interest indicated by diagonal lines,
As shown by the thick line in FIG. 14B, the contour lines E2 and E3 are integrated with the contour line E1 and disappear.

【0074】輪郭線を統合する際に、輪郭線情報更新部
40bは各輪郭線E1,E2,E3の輪郭線管理情報D
Mを参照し、各輪郭線を構成する輪郭辺の数を取得する
(図4(b)参照)。そして、最も輪郭辺の数が大きい
輪郭線のみを残し、他の輪郭線は消滅させる。例えば、
図16(a)において最も輪郭辺の数が大きい輪郭線が
E1であったとすると、輪郭線の更新の結果、図16
(b)に示すように輪郭線E1のみが残り、他の輪郭線
E2,E3については消滅している。
When the contours are integrated, the contour information updating unit 40b transmits the contour management information D for each of the contours E1, E2 and E3.
With reference to M, the number of contour sides forming each contour line is acquired (see FIG. 4B). Then, only the outline having the largest number of outline sides is left, and the other outlines are deleted. For example,
Assuming that the contour having the largest number of contour sides in FIG. 16A is E1, the result of updating the contour is as shown in FIG.
As shown in (b), only the outline E1 remains, and the other outlines E2 and E3 have disappeared.

【0075】図17は、図16(a)の状態における輪
郭線接続情報などを示している。なお、図17(a)は
輪郭線接続情報DCであり、図17(b)は注目画素の
4つの輪郭辺から輪郭線が形成されると仮想した場合に
メモリ50に一時的に格納される注目画素の輪郭辺の仮
想接続状態であり、図17(c)は輪郭線管理情報DM
である。図17(c)において、開始辺番号と開始濃度
値との欄には各輪郭線E1〜E3が生成された際にそれ
ぞれ輪郭辺の番号と注目画素の濃度値とが格納されてい
るが、ここでは便宜上これらの値を「−」で表示してい
る。
FIG. 17 shows contour line connection information in the state of FIG. 16 (a). FIG. 17A shows contour line connection information DC, and FIG. 17B shows a case where a contour line is formed from four contour sides of the pixel of interest and is temporarily stored in the memory 50. FIG. 17C shows a virtual connection state of the contour side of the target pixel, and FIG.
It is. In FIG. 17C, the columns of the starting side number and the starting density value store the number of the contour side and the density value of the pixel of interest when the respective contour lines E1 to E3 are generated. Here, these values are indicated by "-" for convenience.

【0076】図16(a)において斜線で示した注目画
素を追加することによって輪郭辺a,c,dは輪郭線に
含まれないこととなる。このため、図17(a)の輪郭
線接続情報DCにおいて輪郭辺aを次の輪郭辺(接続
先)としている輪郭辺tについての次の輪郭辺番号を更
新することとなる。つまり、図17(b)の仮想接続状
態を参照すると、輪郭辺aは輪郭辺bに接続するため、
輪郭辺tについての次の輪郭辺番号はbに書き換えられ
る。
By adding the pixel of interest indicated by oblique lines in FIG. 16A, the contour sides a, c, and d are not included in the contour line. Therefore, in the contour line connection information DC in FIG. 17A, the next contour side number for the contour side t with the contour side a as the next contour side (connection destination) is updated. That is, referring to the virtual connection state in FIG. 17B, since the contour side a is connected to the contour side b,
The next contour side number for the contour side t is rewritten to b.

【0077】次に、図17(c)より輪郭線E1の輪郭
辺の数が最も大きいため、輪郭線E2,E3は消滅す
る。従って、図17(a)の輪郭線接続情報DCにおけ
る所属輪郭線番号E2,E3は全てE1に書き換えられ
る。
Next, as shown in FIG. 17C, since the number of contour sides of the contour line E1 is the largest, the contour lines E2 and E3 disappear. Therefore, the belonging contour numbers E2 and E3 in the contour connection information DC in FIG. 17A are all rewritten to E1.

【0078】次に、輪郭辺aは輪郭線に含まれないこと
となるため、図17(b)の仮想接続状態において輪郭
辺aを次の輪郭辺(接続先)としている輪郭辺dについ
ての次の輪郭辺番号を更新することとなる。つまり、輪
郭線接続情報DCを参照すると、輪郭辺aは輪郭辺sに
接続するため、輪郭辺dについての次の輪郭辺番号はa
からsに書き換えられる。そして、輪郭辺dも輪郭線に
含まれないこととなるため、図17(a)の輪郭線接続
情報DCにおいて輪郭辺dを次の輪郭辺(接続先)とし
ている輪郭辺eについての次の輪郭辺番号を更新するこ
ととなる。つまり、仮想接続状態を参照すると、先程、
輪郭辺dは輪郭辺sに接続するようにかきえられている
ため、輪郭辺eについての次の輪郭辺番号はdからsに
書き換えられる。
Next, since the contour side a is not included in the contour line, in the virtual connection state of FIG. 17B, the contour side d is set to the next contour side (connection destination). The next contour side number is updated. That is, referring to the contour line connection information DC, since the contour side a is connected to the contour side s, the next contour side number for the contour side d is a
To s. Since the contour side d is not included in the contour, the next contour side e with the contour side d as the next contour side (connection destination) in the contour line connection information DC of FIG. The contour side number is updated. In other words, referring to the virtual connection state,
Since the contour side d is drawn so as to be connected to the contour side s, the next contour side number for the contour side e is rewritten from d to s.

【0079】次に、輪郭辺cは輪郭線に含まれないこと
となるため、図17(a)の輪郭線接続情報DCにおい
て輪郭辺cを次の輪郭辺(接続先)としている輪郭辺m
についての次の輪郭辺番号を更新することとなる。つま
り、仮想接続状態を参照すると、輪郭辺cは輪郭辺dに
接続するため、輪郭辺mについての次の輪郭辺番号はc
からdに書き換えられる。しかし、輪郭辺dも輪郭線に
含まれないこととなるため、輪郭線接続情報DCにおい
て輪郭辺dが接続する輪郭辺fを輪郭辺mについての次
の輪郭辺番号とする。
Next, since the contour side c is not included in the contour, the contour side m in which the contour side c is the next contour side (connection destination) in the contour line connection information DC of FIG.
Will be updated. That is, referring to the virtual connection state, since the contour side c is connected to the contour side d, the next contour side number for the contour side m is c
To d. However, since the contour side d is not included in the contour, the contour side f to which the contour side d is connected is set as the next contour side number for the contour side m in the contour line connection information DC.

【0080】次に、輪郭辺cは輪郭線に含まれないこと
となるため、図17(b)の仮想接続状態において輪郭
辺cを次の輪郭辺としている輪郭辺bについての次の輪
郭辺番号を更新することとなる。つまり、輪郭線接続情
報DCを参照すると、輪郭辺cは輪郭辺nに接続するた
め、仮想接続状態の輪郭辺bについての次の輪郭辺番号
はcからnに書き換えられる。
Next, since the contour side c is not included in the contour line, in the virtual connection state of FIG. 17B, the next contour side of the contour side b with the contour side c as the next contour side The number will be updated. That is, referring to the contour line connection information DC, since the contour side c is connected to the contour side n, the next contour side number of the contour side b in the virtual connection state is rewritten from c to n.

【0081】次に、輪郭辺dは輪郭線に含まれないこと
となるため、図17(a)の輪郭線接続情報DCにおい
て輪郭辺dを次の輪郭辺(接続先)としている輪郭辺e
についての次の輪郭辺番号を仮想接続状態を参照してd
からsに更新する。また、輪郭辺cは輪郭線に含まれな
いこととなるため、図17(a)の輪郭線接続情報DC
において輪郭辺cを次の輪郭辺としている輪郭辺mにつ
いての次の輪郭辺番号をcからfに更新する。なお、こ
の処理は既に一度行われているが、ここでもう一度同様
の処理を行うことにより、注目画素の4つの輪郭辺a,
b,c,dの接続状態を書き換える処理がどの輪郭辺か
ら開始されてても同様の結果が得られるようになってい
る。
Next, since the contour side d is not included in the contour line, the contour side e in which the contour side d is set as the next contour side (connection destination) in the contour line connection information DC of FIG.
The next contour side number for
To s. Since the contour side c is not included in the contour line, the contour line connection information DC shown in FIG.
, The next contour side number of the contour side m with the contour side c as the next contour side is updated from c to f. Note that this processing has already been performed once, but the same processing is performed again here to obtain the four contour sides a,
The same result can be obtained even if the process of rewriting the connection state of b, c, d is started from any contour side.

【0082】そして次に、輪郭辺a,c,dは輪郭線に
含まれないこととなるため、図17(a)の輪郭線接続
情報DCにおいて輪郭辺a,c,dについての接続情報
を消去する。そして、仮想接続状態の輪郭辺bのみにつ
いての接続状態を輪郭線接続情報DCに書き込む。ま
た、この処理により輪郭線E2,E3は消滅するため、
輪郭線管理情報DMにおいて輪郭線E2,E3について
の終了濃度値の欄に注目画素の濃度値よりも1つ高い濃
度値を書き込むとともに、これらの輪郭線についての輪
郭辺の数を0にして、輪郭線E2,E3についての有効
濃度範囲を確定させ、輪郭線E2,E3について終了処
理を行う。また、輪郭線管理情報DMにおいて輪郭線E
1についての輪郭辺の数を更新する。なお、この処理が
行われると、注目画素の仮想接続状態はメモリ50から
消去される。
Next, since the contour sides a, c, and d are not included in the contour line, the connection information on the contour sides a, c, and d in the contour line connection information DC of FIG. to erase. Then, the connection state of only the outline side b in the virtual connection state is written in the outline connection information DC. In addition, since the contour lines E2 and E3 disappear by this processing,
In the contour line management information DM, a density value that is one higher than the density value of the pixel of interest is written in the end density value column for the contour lines E2 and E3, and the number of contour sides for these contour lines is set to 0. The effective density range for the contour lines E2 and E3 is determined, and the end processing is performed for the contour lines E2 and E3. Also, in the contour management information DM, the contour E
Update the number of contour sides for one. When this process is performed, the virtual connection state of the target pixel is deleted from the memory 50.

【0083】このような処理の結果、メモリ50に格納
されている輪郭線接続情報DCは図18(a)に示すよ
うになり、輪郭線管理情報DMは図18(b)に示すよ
うになる。すなわち、これらの情報は、図16(b)に
示したような輪郭線E1が生成された状態を示してい
る。上記のような処理の結果、輪郭線E1は輪郭辺16
個よりなる輪郭線に更新され、輪郭線E2,E3は終了
処理が行われて消滅している。
As a result of such processing, the outline connection information DC stored in the memory 50 becomes as shown in FIG. 18A, and the outline management information DM becomes as shown in FIG. 18B. . That is, these pieces of information indicate a state in which the contour line E1 as shown in FIG. As a result of the processing as described above, the contour line E1 becomes the contour side 16
The outlines E2 and E3 have been updated to the outlines composed of the individual pieces, and the outlines E2 and E3 have been erased by performing the end processing.

【0084】次に、注目画素の4つの輪郭辺のうちの2
以上の輪郭辺が同一の輪郭線に含まれている場合につい
て説明する。まず、上記のような処理を行う前に、注目
画素の4つの輪郭辺が所属している輪郭線番号を取得
し、注目画素の4つの輪郭辺のうち同一の輪郭線に含ま
れている輪郭辺番号を取得する。そして、注目画素の輪
郭辺のうち同一の輪郭線に含まれている輪郭辺の接続状
態が連続しているか否かを判定する。同一の輪郭線に含
まれている輪郭辺の接続状態が連続していれば、上記の
ような通常の処理を行えば輪郭線は適切に更新される。
しかし、同一の輪郭線に含まれている輪郭辺の接続状態
が連続していない場合は、輪郭線の内部にホールが形成
されるため、そのホールについて新たに輪郭線が生成さ
れることとなる。
Next, two of the four contour sides of the pixel of interest are
A case where the above-described contour sides are included in the same contour line will be described. First, before performing the above processing, the contour number to which the four contour sides of the target pixel belong is acquired, and the contour number included in the same contour line among the four contour sides of the target pixel is obtained. Get the side number. Then, it is determined whether or not the connection states of the contour sides included in the same contour line among the contour sides of the target pixel are continuous. If the connection state of the contour sides included in the same contour is continuous, the contour is appropriately updated by performing the above-described normal processing.
However, if the connection states of the contour sides included in the same contour are not continuous, a hole is formed inside the contour, and a new contour is generated for the hole. .

【0085】例えば、図19(a)〜(d)の左図に示
すような輪郭線が形成されているときに斜線で示した画
素を注目画素として抽出すると、右図に示すような輪郭
線が生成される。なお、図19(a)〜(d)において
丸印は各輪郭線の開始辺を示している。上述したような
輪郭線接続情報DCの更新処理を行った結果、既成輪郭
線の内側に新たに閉ループを形成するホール状の輪郭線
が生成されている場合は、その輪郭線に対して開始辺と
開始濃度値と輪郭線個数とを求めて輪郭線管理情報DM
に登録することが行われる。このような処理を行うこと
により、輪郭線が分離して新たな輪郭線が生成された場
合であっても適切に対応することができる。
For example, if a pixel indicated by oblique lines is extracted as a pixel of interest when a contour line as shown in the left diagram of FIGS. 19A to 19D is formed, a contour line as shown in the right diagram is obtained. Is generated. In FIGS. 19A to 19D, circles indicate the start sides of the respective contour lines. As a result of performing the above-described update processing of the contour line connection information DC, if a hole-shaped contour line that newly forms a closed loop is generated inside the existing contour line, the start edge of the contour line is determined. , The starting density value and the number of contour lines, and
Registration is performed. By performing such processing, it is possible to appropriately cope with a case where a contour is separated and a new contour is generated.

【0086】次に、注目画素の4つの輪郭辺のうち既成
輪郭線の開始辺として設定されている輪郭辺が存在する
場合について説明する。まず、注目画素の4つの輪郭辺
のうち既成輪郭線E1の開始辺として設定されている輪
郭辺が存在すると判断すると、輪郭線管理情報DMに新
規輪郭線E2の情報を書き込む領域を確保し、その領域
に既成輪郭線E1の内容をコピーする。そして輪郭線E
2についての輪郭線管理情報DMに対して注目画素の濃
度値よりも1つ高い濃度値を終了濃度値に書き込み、輪
郭辺の数を0にすることにより、輪郭線E2について終
了処理を施す。そして、既成輪郭線E1についての輪郭
線管理情報DMの開始濃度値の欄に注目画素の濃度値を
上書きするとともに、開始辺を注目画素の4つの輪郭辺
以外の輪郭辺から抽出して上書きする。このような処理
を行うことにより、注目画素の4つの輪郭辺のうち既成
輪郭線の開始辺として設定されている輪郭辺が存在する
場合であっても良好に輪郭線情報を更新することができ
る。
Next, a case will be described in which there is a contour side set as the start side of the existing contour line among the four contour sides of the target pixel. First, when it is determined that there is a contour side set as the start side of the existing contour line E1 among the four contour sides of the target pixel, an area for writing information of the new contour line E2 in the contour line management information DM is secured. The contents of the existing contour line E1 are copied to the area. And contour line E
The end processing is performed on the contour line E2 by writing a density value one higher than the density value of the target pixel into the end density value for the contour line management information DM for No. 2 and setting the number of contour sides to 0. Then, the density value of the target pixel is overwritten in the column of the start density value of the outline management information DM for the existing outline E1, and the start side is extracted and overwritten from the outline sides other than the four outline sides of the target pixel. . By performing such processing, it is possible to satisfactorily update the contour line information even when there is a contour side set as the start side of the existing contour line among the four contour sides of the target pixel. .

【0087】ただし、図20の左図に示すように注目画
素の4つの輪郭辺の全てが同一の既成輪郭線に含まれて
いる場合は、注目画素の4つの輪郭辺のうち既成輪郭線
の開始辺として設定されている輪郭辺が存在する場合で
あっても上記のような処理を行う必要がなく、単にその
既成輪郭線について終了処理を施せばよい。これによ
り、図20の右図に示すような適切な輪郭線に更新され
る。
However, as shown in the left diagram of FIG. 20, when all of the four contour sides of the target pixel are included in the same existing contour line, of the four outline sides of the target pixel, Even when there is a contour side set as the start side, it is not necessary to perform the above processing, and the end processing may be simply performed on the existing contour line. As a result, the contour is updated to an appropriate contour as shown in the right diagram of FIG.

【0088】以上の説明では、輪郭線情報更新部40b
が輪郭線接続情報DCと輪郭線管理情報DMとを更新す
る処理を概念的に示した。ここで、上記の処理内容をさ
らに判りやすくするために、図5に示した原画像と枠付
き画像とに対して上記の処理を施した場合の処理過程を
みていくこととする。図21〜図30は、各濃度値ごと
の輪郭線を抽出していく際の輪郭線管理情報DMと輪郭
線接続情報DCとを示す図である。なお、図21〜図3
0の(a)において、各画素の数字は原画像部分の画素
ごとの濃度値を示しており、枠部分の濃度値0について
は濃度値を省略している。また、以下の説明において
は、各画素の輪郭辺を参照するのに図7に示した輪郭辺
番号を用い、各画素を参照するのに図8に示した座標値
を用いることとする。
In the above description, the outline information updating unit 40b
Has conceptually shown a process of updating the outline connection information DC and the outline management information DM. Here, in order to make the contents of the above processing more understandable, a processing procedure when the above processing is performed on the original image and the framed image shown in FIG. 5 will be examined. FIGS. 21 to 30 are diagrams showing the outline management information DM and the outline connection information DC when extracting the outline for each density value. 21 to FIG.
In (a) of 0, the number of each pixel indicates the density value of each pixel of the original image portion, and the density value of the density value 0 of the frame portion is omitted. In the following description, the contour side number shown in FIG. 7 is used to refer to the contour side of each pixel, and the coordinate values shown in FIG. 8 are used to refer to each pixel.

【0089】まず、注目画素抽出部20は、図13
(b)のようにソートされたバッファ領域から濃度値の
最大の画素であるメモリアドレス19の座標値9を取得
する。図8の座標値を参照すると、図21(a)のよう
に濃度値9の画素が注目画素として抽出されたこととな
る。図21(a)に示すように注目画素の4つの輪郭辺
は既成輪郭線に含まれていないため、注目画素の4つの
輪郭辺からなる輪郭線を生成し、輪郭線管理情報DMと
輪郭線接続情報DCにその情報が記述される。
First, the pixel-of-interest extraction unit 20 shown in FIG.
The coordinate value 9 of the memory address 19 which is the pixel having the maximum density value is obtained from the buffer area sorted as shown in FIG. Referring to the coordinate values in FIG. 8, the pixel having the density value 9 is extracted as the target pixel as shown in FIG. As shown in FIG. 21A, since the four outline sides of the target pixel are not included in the existing outline, an outline composed of the four outline sides of the target pixel is generated, and the outline management information DM and the outline The information is described in the connection information DC.

【0090】輪郭線管理情報DMにおいて、注目画素の
4つの輪郭辺によって新規に生成された輪郭線は最初に
生成された輪郭線であるため、輪郭線番号は1となる。
また、注目画素の4つの輪郭辺を介して存在する隣接画
素のうち座標値2(注目画素の上側)の画素の濃度値が
0であるため注目画素の上側の輪郭辺が開始辺となる。
この輪郭辺の輪郭辺番号は4であるため、開始辺番号に
は4が格納される。また、このときの注目画素の濃度値
は9であるため開始濃度値には9が格納され、輪郭辺の
数には4が格納される。
In the outline management information DM, since the outline newly generated by the four outline sides of the target pixel is the outline generated first, the outline number is 1.
Further, since the density value of the pixel having the coordinate value 2 (above the target pixel) among the neighboring pixels existing through the four contour sides of the target pixel is 0, the contour side above the target pixel is the start side.
Since the contour side number of this contour side is 4, 4 is stored as the start side number. Since the density value of the target pixel is 9 at this time, 9 is stored as the start density value, and 4 is stored as the number of contour sides.

【0091】輪郭線接続情報DCにおいては、注目画素
の4つの輪郭辺によって形成される輪郭線の接続状態が
記述され、各輪郭辺の所属輪郭線番号には1が格納され
る。
In the outline connection information DC, the connection state of the outline formed by the four outline sides of the target pixel is described, and 1 is stored as the belonging outline number of each outline side.

【0092】次に、注目画素抽出部20は、図13
(b)のバッファ領域のメモリアドレス18,17の座
標値22,18を取得してこれらの画素を注目画素と
し、濃度値8についての輪郭線形成を行うと、図22に
示すようになる。図22(a)に示すように、濃度値8
の2つの画素の各輪郭辺は既に生成された濃度値9の輪
郭線に含まれていないため、それぞれの画素について新
規輪郭線が形成される。そして、輪郭線管理情報DMと
輪郭線接続情報DCとは、それぞれ図22(b),
(c)に示すようになる。なお、座標値22の画素が先
に注目画素として処理されるため、座標値22の画素の
4つの輪郭辺によって形成される輪郭線の輪郭線番号が
2となり、座標値18の画素の4つの輪郭辺によって形
成される輪郭線の輪郭線番号が3となっている。
Next, the pixel-of-interest extraction unit 20 operates as shown in FIG.
When the coordinate values 22 and 18 of the memory addresses 18 and 17 in the buffer area shown in FIG. 2B are obtained, and these pixels are set as a target pixel and a contour line is formed for the density value 8, the result is as shown in FIG. As shown in FIG.
Since the outline sides of the two pixels are not included in the already generated outline of the density value 9, a new outline is formed for each pixel. Then, the outline management information DM and the outline connection information DC are respectively shown in FIG.
The result is as shown in FIG. Since the pixel having the coordinate value 22 is first processed as the pixel of interest, the outline number of the outline formed by the four outline sides of the pixel having the coordinate value 22 is 2, and the four pixels having the coordinate value 18 are four. The contour number of the contour formed by the contour sides is 3.

【0093】次に、注目画素抽出部20は、図13
(b)のバッファ領域のメモリアドレス16〜13に格
納されている各座標値を順次取得してこれらの画素を注
目画素とし、濃度値7についての輪郭線形成を行うと、
図23に示すようになる。図23(a)に示すように、
濃度値7の4画素のうち座標値16の画素の上側の輪郭
辺は既に生成された濃度値9の輪郭線(輪郭線番号1)
に含まれているため、輪郭線番号1についての輪郭線接
続情報DCと輪郭線管理情報DMとが更新される。ま
た、それ以外の画素についての各輪郭辺は既成輪郭線に
含まれていないため、それぞれの画素について新規輪郭
線が形成される。この結果、輪郭線管理情報DMと輪郭
線接続情報DCとは、それぞれ図23(b),(c)に
示すようになる。
Next, the pixel-of-interest extraction unit 20 operates as shown in FIG.
When the coordinate values stored in the memory addresses 16 to 13 of the buffer area in (b) are sequentially acquired, and these pixels are set as a target pixel, and a contour line is formed for the density value 7,
As shown in FIG. As shown in FIG.
The contour side above the pixel having the coordinate value 16 out of the four pixels having the density value 7 is a contour line having a density value 9 already generated (contour line number 1).
, The outline connection information DC and the outline management information DM for the outline number 1 are updated. In addition, since each contour side of the other pixels is not included in the existing contour line, a new contour line is formed for each pixel. As a result, the outline management information DM and the outline connection information DC are as shown in FIGS. 23B and 23C, respectively.

【0094】次に、注目画素抽出部20は、図13
(b)のバッファ領域のメモリアドレス12に格納され
ている座標値30を取得してこの画素を注目画素とし、
濃度値6についての輪郭線形成を行うと、図24に示す
ようになる。図24(a)に示すように、濃度値6の画
素の4つの輪郭辺のうち右側の輪郭辺は既に生成された
濃度値7の輪郭線(輪郭線番号5)に含まれているた
め、輪郭線番号5についての輪郭線接続情報DCと輪郭
線管理情報DMとが更新される。この結果、輪郭線管理
情報DMと輪郭線接続情報DCとは、それぞれ図24
(b),(c)に示すようになる。
Next, the pixel-of-interest extraction unit 20 operates as shown in FIG.
(B) The coordinate value 30 stored in the memory address 12 of the buffer area is obtained, and this pixel is set as a target pixel.
When the contour line is formed for the density value 6, the result is as shown in FIG. As shown in FIG. 24A, the right contour side of the four contour sides of the pixel having the density value 6 is included in the already generated contour line having the density value 7 (contour line number 5). The outline connection information DC and the outline management information DM for the outline number 5 are updated. As a result, the outline management information DM and the outline connection information DC are respectively shown in FIG.
(B) and (c) are obtained.

【0095】次に、注目画素抽出部20は、図13
(b)のバッファ領域のメモリアドレス11,10に格
納されている座標値32,24を取得してこれらの画素
を注目画素とし、濃度値5についての輪郭線形成を行う
と、図25に示すようになる。図25(a)に示すよう
に、濃度値5の2画素のうち座標値24の画素の下側の
輪郭辺は既に生成された輪郭線(輪郭線番号5)に含ま
れている。また、座標値32の画素については、左側の
輪郭辺が既に生成された輪郭線(輪郭線番号5)に含ま
れているとともに、右側の輪郭辺が既に生成された輪郭
線(輪郭線番号4)に含まれている。ここで、輪郭線番
号4と5との輪郭辺の数を比較すると輪郭線番号4の方
が小さいので、輪郭線番号4の輪郭線は輪郭線番号5の
輪郭線に統合される。この結果、輪郭線番号4について
の輪郭線管理情報DMには終了処理が施されて終了濃度
値の欄に濃度値6が記入されるとともに、輪郭辺の数が
0に更新される。また、輪郭線番号5についての輪郭線
管理情報DMと輪郭線接続情報DCとが更新される。こ
の結果、濃度値5の2画素は輪郭線番号5の輪郭線内に
含まれることとなり、輪郭線管理情報DMと輪郭線接続
情報DCとは、それぞれ図25(b),(c)に示すよ
うになる。
Next, the pixel-of-interest extraction unit 20 operates as shown in FIG.
FIG. 25 shows a case where the coordinate values 32 and 24 stored in the memory addresses 11 and 10 of the buffer area in (b) are acquired, and these pixels are set as a target pixel and a contour line is formed for the density value 5. Become like As shown in FIG. 25A, the lower contour side of the pixel having the coordinate value 24 among the two pixels having the density value 5 is included in the already generated contour line (contour line number 5). For the pixel having the coordinate value 32, the left contour side is included in the already generated contour (contour line number 5), and the right contour side is already generated in the contour line (contour line number 4). ) Included. Here, when the numbers of the contour sides of the contour numbers 4 and 5 are compared, the contour of the contour number 4 is integrated with the contour of the contour number 5 because the contour number 4 is smaller. As a result, the end processing is performed on the outline management information DM for the outline number 4, the density value 6 is written in the end density value column, and the number of outline sides is updated to zero. Also, the outline management information DM and the outline connection information DC for the outline number 5 are updated. As a result, the two pixels having the density value 5 are included in the contour of the contour number 5, and the contour management information DM and the contour connection information DC are shown in FIGS. 25B and 25C, respectively. Become like

【0096】次に、注目画素抽出部20は、図13
(b)のバッファ領域のメモリアドレス9〜7に格納さ
れている座標値29,17,11を取得してこれらの画
素を順次注目画素とし、濃度値4についての輪郭線形成
を行うと、図26に示すようになる。図26(a)に示
すように、座標値29の画素の右側の輪郭辺は輪郭線番
号5の輪郭線に含まれており、上側の輪郭辺は輪郭線番
号2の輪郭線に含まれている。従って、輪郭線番号2の
輪郭線は輪郭線番号5の輪郭線に統合されて消滅する。
また、座標値17の画素の右側の輪郭辺は輪郭線番号3
の輪郭線に含まれており、下側の輪郭辺は輪郭線番号5
の輪郭線に含まれており、左側の輪郭辺は輪郭線番号1
の輪郭線に含まれている。従って、輪郭線番号1と3の
輪郭線は輪郭線番号5の輪郭線に統合されて消滅する。
また、座標値11の画素の右側の輪郭辺は輪郭線番号6
の輪郭線に含まれており、下側の輪郭辺は先に統合され
て生成された輪郭線番号5の輪郭線に含まれている。従
って、輪郭線番号6の輪郭線は輪郭線番号5の輪郭線に
統合されて消滅する。このようにして濃度値4の3画素
が注目画素として処理されると、輪郭線管理情報DMと
輪郭線接続情報DCとは、それぞれ図26(b),
(c)に示すようになる。
Next, the pixel-of-interest extraction unit 20 performs the processing shown in FIG.
When the coordinate values 29, 17, and 11 stored in the memory addresses 9 to 7 of the buffer area in (b) are acquired, these pixels are sequentially set as a target pixel, and a contour line is formed for a density value of 4. 26. As shown in FIG. 26A, the contour side on the right side of the pixel having the coordinate value 29 is included in the contour line of the contour number 5, and the upper contour side is included in the contour line of the contour number 2. I have. Therefore, the contour of contour number 2 is integrated with the contour of contour number 5 and disappears.
The contour side on the right side of the pixel having the coordinate value 17 is contour number 3
, And the lower contour side is contour number 5
And the left contour side is contour number 1
Are included in the outline. Therefore, the contours of contour numbers 1 and 3 are integrated with the contour of contour number 5 and disappear.
The contour side on the right side of the pixel having the coordinate value 11 is contour number 6
, And the lower side of the contour is included in the contour of contour number 5 that is generated by being integrated earlier. Therefore, the contour of contour number 6 is integrated with the contour of contour number 5 and disappears. When the three pixels having the density value 4 are processed as the target pixel in this way, the outline management information DM and the outline connection information DC are respectively shown in FIG.
The result is as shown in FIG.

【0097】次に、注目画素抽出部20は、図13
(b)のバッファ領域のメモリアドレス6,5に格納さ
れている座標値25,15を取得してこれらの画素を順
次注目画素とし、濃度値3についての輪郭線形成を行う
と、図27に示すようになる。図27(a)に示すよう
に、座標値25の画素の上側、下側、左側の輪郭辺は輪
郭線番号5の輪郭線に含まれている。従って、座標値2
5の画素が輪郭線番号5の輪郭線に含まれるように輪郭
線番号5の輪郭線が更新される。また、座標値15の画
素の右側、下側の輪郭辺は輪郭線番号5の輪郭線に含ま
れているが、その接続状態は連続していない。このた
め、座標値15の画素を輪郭線番号5の輪郭線内に含ま
れるように更新する処理は、分離処理となって輪郭線番
号5の輪郭線の内側に新規輪郭線(輪郭線番号7)が形
成される。このようにして濃度値3の2画素が注目画素
として処理されると、輪郭線管理情報DMと輪郭線接続
情報DCとは、それぞれ図27(b),(c)に示すよ
うになる。
Next, the pixel-of-interest extraction unit 20 operates as shown in FIG.
When the coordinate values 25 and 15 stored in the memory addresses 6 and 5 in the buffer area of (b) are acquired, and these pixels are sequentially set as a target pixel, and a contour line is formed for the density value 3, FIG. As shown. As shown in FIG. 27A, the upper, lower, and left contour sides of the pixel having the coordinate value 25 are included in the contour line with the contour number 5. Therefore, the coordinate value 2
The outline of outline number 5 is updated so that the pixel of 5 is included in the outline of outline number 5. The right and lower contour sides of the pixel having the coordinate value 15 are included in the contour line having the contour number 5, but the connection state is not continuous. Therefore, the process of updating the pixel having the coordinate value 15 so as to be included in the contour of the contour line number 5 is a separation process, and a new contour line (contour line number 7) is placed inside the contour line of the contour line number 5. ) Is formed. When the two pixels having the density value 3 are processed as the target pixel in this manner, the outline management information DM and the outline connection information DC are as shown in FIGS. 27B and 27C, respectively.

【0098】次に、注目画素抽出部20は、図13
(b)のバッファ領域のメモリアドレス4〜2に格納さ
れている座標値23,19,8を取得してこれらの画素
を順次注目画素とし、濃度値2についての輪郭線形成を
行うと、図28に示すようになる。図28(a)に示す
ように、座標値23の画素の全ての輪郭辺は輪郭線番号
7の輪郭線に含まれているとともに、その輪郭線の開始
辺が含まれている。従って、輪郭線番号7の輪郭線に対
して終了処理を行う。また、座標値19の画素の上側、
左側の輪郭辺は輪郭線番号5の輪郭線に含まれているた
め、輪郭線番号5についての輪郭線接続情報DCと輪郭
線管理情報DMとが更新される。また、座標値8の画素
の右側、下側の輪郭辺は輪郭線番号5の輪郭線に含まれ
ているため、輪郭線番号5についての輪郭線接続情報D
Cと輪郭線管理情報DMとが更新される。この結果、輪
郭線管理情報DMと輪郭線接続情報DCとは、それぞれ
図28(b),(c)に示すようになる。
Next, the pixel-of-interest extraction unit 20 operates as shown in FIG.
When the coordinate values 23, 19, and 8 stored in the memory addresses 4 and 2 of the buffer area in (b) are acquired, these pixels are sequentially set as a target pixel, and a contour line for the density value 2 is formed. As shown in FIG. As shown in FIG. 28A, all the outline sides of the pixel having the coordinate value 23 are included in the outline of the outline number 7, and the start side of the outline is included. Therefore, the end processing is performed on the contour line of contour number 7. Also, above the pixel having the coordinate value 19,
Since the outline on the left side is included in the outline of outline number 5, the outline connection information DC and outline management information DM for outline number 5 are updated. Since the right and lower contour sides of the pixel having the coordinate value 8 are included in the contour of the contour number 5, the contour connection information D for the contour number 5 is included.
C and the outline management information DM are updated. As a result, the outline management information DM and the outline connection information DC are as shown in FIGS. 28B and 28C, respectively.

【0099】次に、注目画素抽出部20は、図13
(b)のバッファ領域のメモリアドレス1,0に格納さ
れている座標値26,10を取得してこれらの画素を順
次注目画素とし、濃度値1についての輪郭線形成を行う
と、図29に示すようになる。図29(a)に示すよう
に、座標値26の画素の右側を除く輪郭辺は輪郭線番号
5の輪郭線に含まれているため、輪郭線番号5について
の輪郭線接続情報DCと輪郭線管理情報DMとが更新さ
れる。また、座標値10の画素の上側を除く輪郭辺は輪
郭線番号5の輪郭線に含まれているため、輪郭線番号5
についての輪郭線接続情報DCと輪郭線管理情報DMと
が更新される。この結果、輪郭線管理情報DMと輪郭線
接続情報DCとは、それぞれ図29(b),(c)に示
すようになる。
Next, the pixel-of-interest extraction unit 20 operates as shown in FIG.
When the coordinate values 26 and 10 stored at the memory addresses 1 and 0 in the buffer area of FIG. 2B are acquired, and these pixels are sequentially set as a target pixel, and a contour line is formed for the density value 1, FIG. As shown. As shown in FIG. 29A, since the contour side excluding the right side of the pixel having the coordinate value 26 is included in the contour of the contour number 5, the contour connection information DC and the contour of the contour number 5 are included. The management information DM is updated. Further, since the contour side excluding the upper side of the pixel having the coordinate value 10 is included in the contour of the contour number 5, the contour number 5
Is updated with respect to the outline connection information DC and the outline management information DM. As a result, the outline management information DM and the outline connection information DC are as shown in FIGS. 29B and 29C, respectively.

【0100】最後に、濃度値0についての処理である
が、濃度値0を輪郭抽出する際の閾値とする場合、抽出
される輪郭線は原画像の外周部となる。従って、濃度値
0については特に注目画素を抽出して1画素ごとに輪郭
線を形成する処理を行わずとも原画像の外周部を接続し
た輪郭線を出力すればよい。そして、濃度値0について
は各輪郭線についての輪郭線管理情報DMに対して終了
処理を施すこととなる。この終了処理が施された結果
を、図30に示している。
Finally, in the processing for the density value 0, when the density value 0 is used as the threshold value for extracting the contour, the extracted contour line is the outer peripheral portion of the original image. Therefore, for the density value 0, it is sufficient to output a contour line connecting the outer peripheral portion of the original image without particularly performing a process of extracting a pixel of interest and forming a contour line for each pixel. For the density value 0, the end processing is performed on the outline management information DM for each outline. FIG. 30 shows the result of the end processing.

【0101】以上説明した処理を簡単に説明すると次の
ようになる。画像において濃度値の最大値を示す画素か
ら降順に1画素ずつ注目画素を抽出していく。そして、
注目画素の周囲の4つの輪郭辺が既成輪郭線に包含され
ていない場合には、4つの輪郭辺からなる輪郭線を新規
輪郭線として設定し、当該新規輪郭線の接続状態を示す
輪郭線接続情報を生成する。また、このとき、新規輪郭
線の開始辺と、注目画素の濃度値を新規輪郭線の有効濃
度範囲の開始濃度とした開始濃度値とを含む輪郭線管理
情報を生成する。一方、注目画素の4つの輪郭辺のうち
のいずれかが既成輪郭線に包含されている場合には、そ
の既成輪郭線についての輪郭線接続情報と輪郭線管理情
報とを更新する。そして、その更新によって注目画素の
いずれかの輪郭辺が包含されていた少なくとも1つの既
成輪郭線が消滅する場合には、消滅する既成輪郭線につ
いての輪郭線管理情報に対して注目画素の濃度値を既成
輪郭線の有効濃度範囲の終了濃度を示す終了濃度値とし
て格納することによって終了処理を行う。
The processing described above will be briefly described as follows. In the image, the pixel of interest is extracted one pixel at a time in descending order from the pixel having the maximum density value. And
If the four outline sides around the target pixel are not included in the existing outline, an outline composed of the four outline sides is set as a new outline, and an outline connection indicating the connection state of the new outline is set. Generate information. At this time, contour management information including a start side of the new contour and a start density value where the density value of the target pixel is set as the start density of the effective density range of the new contour is generated. On the other hand, if any of the four contour sides of the target pixel is included in the existing contour, the contour connection information and the contour management information for the existing contour are updated. If at least one existing contour line that includes any one of the outline sides of the target pixel disappears by the update, the density value of the target pixel is added to the outline management information for the existing contour line that disappears. Is stored as an end density value indicating the end density of the effective density range of the existing contour line.

【0102】このような処理を行うことにより、同一の
濃度値を示す画素が全て注目画素として処理された際、
輪郭線接続情報DCにはその濃度値の輪郭線が格納され
ていることとなる。従って、例えば、濃度値8について
の輪郭線を出力したい場合には、濃度値8を示す全ての
画素が注目画素として処理された際に、輪郭線接続情報
DCを出力すれば所望する濃度値8の輪郭線が得られ、
濃度値7以下の画素については処理することを要しな
い。また、全ての濃度値についての輪郭線を出力したい
場合には、各濃度値を示す全ての画素の処理が行われる
度に輪郭線接続情報DCを出力していけば原画像を構成
する全ての画素を1回ずつ抽出して処理するだけで全て
の濃度値の輪郭線を得ることができる。
By performing such processing, when all the pixels having the same density value are processed as the target pixel,
The contour line connection information DC stores the contour line of the density value. Therefore, for example, when it is desired to output a contour line for the density value 8, if all the pixels indicating the density value 8 are processed as the pixel of interest, the contour line connection information DC is output and the desired density value 8 is output. Contour line is obtained,
It is not necessary to process pixels having a density value of 7 or less. When it is desired to output the contour lines for all the density values, the contour line connection information DC is output every time the processing of all the pixels indicating each density value is performed. It is possible to obtain contour lines of all density values only by extracting and processing pixels one by one.

【0103】なお、この実施の形態では、各濃度値ごと
に輪郭線を形成していく際に、輪郭線管理情報DMを生
成/更新していくため、最終的に濃度値1までの上記処
理が終了した場合は、輪郭線接続情報DCをメモリ50
から消去したとしても、輪郭線管理情報DMを記憶して
おけば、後に任意の濃度値についての輪郭線を抽出する
ことができる。
In this embodiment, when the contour line is formed for each density value, the contour line management information DM is generated / updated. Is completed, the contour line connection information DC is stored in the memory 50.
Even if it is erased from, if the outline management information DM is stored, the outline for an arbitrary density value can be extracted later.

【0104】<5.輪郭線抽出>次に、上記のような注
目画素を1画素ずつ抽出しつつ、輪郭線を形成させてい
く処理を行った後に、輪郭線管理情報DMに基づいて各
濃度値ごとの輪郭線を抽出する処理について説明する。
この処理は、図2の輪郭抽出部60において行われる。
<5. Contour Line Extraction> Next, after performing processing for forming a contour line while extracting the noted pixel one by one as described above, the contour line for each density value is extracted based on the contour line management information DM. The extraction process will be described.
This processing is performed in the contour extraction unit 60 of FIG.

【0105】輪郭抽出部60では、メモリ50に格納さ
れている輪郭線管理情報DMを参照し、抽出すべき濃度
値において有効な輪郭線の開始辺を求め、その開始辺よ
り所定のルール(規則)に基づいて輪郭を追跡すること
により所定の濃度値の輪郭線を抽出する。
The contour extracting section 60 refers to the contour management information DM stored in the memory 50, finds a starting edge of an effective contour at a density value to be extracted, and determines a predetermined rule (rule) from the starting edge. ) To extract a contour having a predetermined density value by tracing the contour.

【0106】ここで、輪郭線を抽出する際のルールにつ
いて説明する。図31は、開始辺の進行方向を特定する
ルールを示す図である。開始辺は主走査方向X(すなわ
ち、横方向)に沿って位置する場合と副走査方向Y(す
なわち、縦方向)に沿って位置する場合とがある。そし
て、1つの開始辺が特定されると、その開始辺の進行方
向を決定する。例えば、開始辺を挟んで存在する2つの
画素の濃度値をa,bとすると、開始辺が縦方向に位置
する場合であって右側の画素の濃度値aが左側の画素の
濃度値bより小さい場合、又は開始辺が横方向に位置す
る場合であって上側の画素の濃度値aが下側の画素の濃
度値bより小さい場合は、図31(a)に示すように、
上方向又は右方向に開始辺の進行方向が設定される。こ
れに対し、開始辺が縦方向に位置する場合であって右側
の画素の濃度値aが左側の画素の濃度値bより大きい場
合、又は開始辺が横方向に位置する場合であって上側の
画素の濃度値aが下側の画素の濃度値bより大きい場合
は、図31(b)に示すように、下方向又は左方向に開
始辺の進行方向が設定される。
Here, rules for extracting a contour line will be described. FIG. 31 is a diagram illustrating a rule for specifying the traveling direction of the start side. The start side may be located along the main scanning direction X (ie, the horizontal direction) or may be located along the sub-scanning direction Y (ie, the vertical direction). When one start side is specified, the traveling direction of the start side is determined. For example, assuming that the density values of two pixels existing on both sides of the start side are a and b, when the start side is located in the vertical direction, the density value a of the right pixel is larger than the density value b of the left pixel. If it is small, or if the start side is located in the horizontal direction and the density value a of the upper pixel is smaller than the density value b of the lower pixel, as shown in FIG.
The traveling direction of the start side is set upward or rightward. On the other hand, when the start side is located in the vertical direction and the density value a of the right pixel is larger than the density value b of the left pixel, or when the start side is located in the horizontal direction and When the density value a of the pixel is larger than the density value b of the lower pixel, the traveling direction of the start side is set downward or leftward as shown in FIG.

【0107】次に、図32は、輪郭線を追跡形成する際
に進行方向を特定するルールを示す図である。図32
(a)には既に進行方向が確定した矢印を示している。
ここで、抽出すべき濃度値をaとし、矢印前方の左側の
画素の濃度値をbとし、矢印前方の右側の画素の濃度値
をcとすると、「a≦bかつa≦c」であれば図32
(b)に示すように進路を左方向にとり、「a>bかつ
a≦c」であれば図32(c)に示すように進路を直進
方向にとり、「a>c」であれば図32(d)に示すよ
うに進路を右方向にとる。このようなルールを設定する
と、輪郭抽出の際の進行方向に対して右側には抽出すべ
き濃度値よりも大きい又は等しい画素が常に得られると
ともに、左側には抽出すべき濃度値よりも小さい画素が
常に得られる。従って、上記のようなルールに基づいて
輪郭辺を辿っていけば、所望の濃度値の輪郭線を抽出す
ることができる。
Next, FIG. 32 is a diagram showing a rule for specifying a traveling direction when a contour is traced and formed. FIG.
(A) shows an arrow whose traveling direction has already been determined.
Here, assuming that the density value to be extracted is a, the density value of the left pixel in front of the arrow is b, and the density value of the right pixel in front of the arrow is c, then “a ≦ b and a ≦ c” FIG. 32
32B, the course is taken in the left direction. If "a> b and a≤c", the course is taken in the straight direction as shown in FIG. 32 (c), and if "a>c", the course is taken in FIG. As shown in (d), take the course to the right. By setting such a rule, a pixel larger or equal to the density value to be extracted is always obtained on the right side with respect to the traveling direction at the time of contour extraction, and a pixel smaller than the density value to be extracted is displayed on the left side. Is always obtained. Therefore, if the contour side is traced based on the rule as described above, a contour line having a desired density value can be extracted.

【0108】実際に、図5の原画像について得られた輪
郭線管理情報DMに基づいて濃度値3の輪郭線を抽出す
る例を以下に示す。まず、図5の原画像について得られ
た図30(b)の輪郭線管理情報DMにおいて各輪郭線
ごとの有効濃度範囲を示すと図33に示すようになる。
図33において有効濃度範囲に濃度値3を含んでいるも
のは輪郭線番号5と7である。従って、輪郭線番号5,
7について図30(b)の輪郭線管理情報DMを参照す
ると、それぞれの開始辺番号は62,45である。この
開始辺を図7のように割り付けられた輪郭辺番号から特
定し、開始辺より上記ルールに基づいて輪郭辺を辿って
いくと、図34に示すようになる。図34(a)は輪郭
辺番号62の開始辺から抽出される輪郭線であり、図3
4(b)は輪郭辺番号45の開始辺から抽出される輪郭
線である。そして、図34(a)と(b)とに示す2つ
の輪郭線を合わせると、所望の濃度値3の輪郭線が得ら
れることとなる。
An example of actually extracting a contour line having a density value of 3 based on the contour line management information DM obtained for the original image of FIG. 5 will be described below. First, FIG. 33 shows the effective density range for each contour in the contour management information DM of FIG. 30B obtained for the original image of FIG.
In FIG. 33, the contour numbers 5 and 7 include the density value 3 in the effective density range. Therefore, contour number 5,
Referring to the outline management information DM of FIG. 30B for No. 7, the start side numbers are 62 and 45, respectively. When the start side is specified from the contour side numbers allocated as shown in FIG. 7 and the contour side is traced from the start side based on the above rule, the result is as shown in FIG. FIG. 34A shows a contour extracted from the start side of the contour side number 62, and FIG.
4 (b) is a contour line extracted from the start side of the contour side number 45. Then, when the two outlines shown in FIGS. 34A and 34B are combined, an outline having a desired density value 3 is obtained.

【0109】輪郭抽出部60は、このようにして開始辺
より輪郭線の抽出を行って輪郭線出力を行う。従って、
輪郭抽出部60が輪郭線出力を行う場合は、画素ごとに
画像を走査する必要がなく、効率的に輪郭線の出力を行
うことができる。すなわち、輪郭線管理情報DMを一度
生成しておけば、それを利用することにより、任意の濃
度値についての輪郭抽出の処理を効率的に行うことがで
き、処理時間を短縮することができる。
The contour extracting section 60 extracts the contour from the start side in this way and outputs the contour. Therefore,
When the contour extraction unit 60 outputs a contour, it is not necessary to scan an image for each pixel, and the contour can be output efficiently. That is, once the contour line management information DM is generated, the contour extraction processing for an arbitrary density value can be efficiently performed by using the information, and the processing time can be reduced.

【0110】<6.処理シーケンス>次に、上述した輪
郭線接続情報DCと輪郭線管理情報DMとを生成/更新
する処理をコンピュータなどによって行う場合の処理シ
ーケンスについて説明する。図35ないし図38は、コ
ンピュータなどによって濃度値ごとの輪郭線形成を行う
処理シーケンスを示すフローチャートである。
<6. Processing Sequence> Next, a description will be given of a processing sequence when the above-described processing for generating / updating the outline connection information DC and the outline management information DM is performed by a computer or the like. 35 to 38 are flowcharts showing a processing sequence for forming a contour line for each density value by a computer or the like.

【0111】まず、ステップS10において、原画像に
対する前処理を行う。すなわち、この前処理においては
上述のような枠付き画像の生成と輪郭辺番号の割付と濃
度値に基づく画素のソーティングとが行われる。
First, in step S10, preprocessing is performed on the original image. That is, in this preprocessing, the generation of the framed image, the assignment of the contour side numbers, and the sorting of the pixels based on the density value are performed as described above.

【0112】次に、ステップS11において注目画素の
抽出が行われる。注目画素の抽出は、ステップS10の
ソート結果に基づいて最大の濃度値を示す画素から順次
濃度値の降順に1画素ずつ行われる。
Next, in step S11, a pixel of interest is extracted. The pixel of interest is extracted one pixel at a time in descending order of the density value from the pixel having the maximum density value based on the sorting result of step S10.

【0113】そして、ステップS12では、ステップS
11において抽出された注目画素の4つの輪郭辺が既成
輪郭線に含まれているか否かを判定する。この判定は、
既に生成されている輪郭線接続情報DCを参照すること
によって行われる。そして、注目画素の4つの輪郭辺の
うちいずれもが既成輪郭線に含まれていない場合は「N
O」と判断されてステップS13に進み、注目画素の4
つの輪郭辺のうちいずれかが既成輪郭線に含まれている
場合は「YES」と判断されてステップS14に進む。
Then, in step S12, step S
It is determined whether four contour sides of the target pixel extracted in 11 are included in the existing contour line. This judgment is
This is performed by referring to the already generated contour line connection information DC. If none of the four contour sides of the target pixel is included in the existing contour line, “N
O ”, the process proceeds to step S13, and the target pixel 4
If any one of the two outline sides is included in the existing outline, “YES” is determined and the process proceeds to step S14.

【0114】ステップS13に進んだ場合は、注目画素
の4つの輪郭辺で構成される新規輪郭線を生成し、この
新規輪郭線について輪郭線接続情報DCと輪郭線管理情
報DMとを生成する。そして、ステップS13の処理が
行われると後述するステップS41に進むこととなる
(接続子A)。
When the process proceeds to step S13, a new outline composed of four outline sides of the target pixel is generated, and outline connection information DC and outline management information DM are generated for the new outline. Then, when the process of step S13 is performed, the process proceeds to step S41 described later (connector A).

【0115】また、ステップS14に進んだ場合は、輪
郭線接続情報DCに基づいて注目画素の輪郭辺が含まれ
ている輪郭線を示す所属輪郭線番号を取得する。このと
き、注目画素の4つの輪郭辺のうち2以上の輪郭辺が既
成輪郭線に含まれている場合は、それぞれの所属輪郭線
番号を取得する。そして、ステップS14の処理が行わ
れるとステップS15に進む。
When the process proceeds to step S14, the assigned contour number indicating the contour including the contour side of the target pixel is obtained based on the contour connection information DC. At this time, if two or more contour sides of the four contour sides of the target pixel are included in the existing contour lines, the respective belonging contour numbers are acquired. Then, when the process of step S14 is performed, the process proceeds to step S15.

【0116】そして、ステップS15では、ステップS
14において取得された所属輪郭線番号を検証し、注目
画素の4つの輪郭辺のうち同一の輪郭線に含まれる輪郭
辺が存在するか否かを判定する。すなわち、注目画素の
4つの輪郭辺のうち既成輪郭線に含まれている2以上の
輪郭辺のそれぞれについて所属輪郭線番号を取得した際
に、同一の所属輪郭線番号を示す輪郭辺が存在する場合
は「YES」と判断され、それ以外の場合は「NO」と
判断される。「YES」と判断された場合は、ステップ
S16に進み、既成輪郭線に含まれている輪郭辺の接続
状態をメモリなどに記憶保存し、ステップS17に進
む。また、「NO」と判断された場合は、そのままステ
ップS17に進む。
Then, in step S15, step S
The belonging contour number acquired in 14 is verified, and it is determined whether or not there is a contour side included in the same contour out of the four contour sides of the target pixel. That is, when the belonging contour numbers are acquired for each of the two or more contour sides included in the existing contour out of the four contour sides of the target pixel, there are contour sides indicating the same belonging contour numbers. In this case, “YES” is determined, and in other cases, “NO” is determined. If “YES” is determined, the process proceeds to step S16, where the connection state of the contour sides included in the existing contour line is stored and stored in a memory or the like, and the process proceeds to step S17. If "NO" is determined, the process directly proceeds to step S17.

【0117】ステップS17では、注目画素の4つの輪
郭辺のうちに既成輪郭線の開始辺として登録されている
輪郭辺が存在するか否かを判定する。この判定は、既に
生成されている輪郭線管理情報DMを参照し、注目画素
の4つの輪郭辺の輪郭辺番号が既成輪郭線の開始辺番号
として登録されているか否かを検証することによって行
われる。そして、既成輪郭線の開始辺として登録されて
いる輪郭辺が存在する場合は「YES」と判断されてス
テップS18に進み、既成輪郭線の開始辺として登録さ
れている輪郭辺が存在する場合は「NO」と判断されて
ステップS21に進む(接続子C)。
In step S17, it is determined whether or not there is a contour side registered as the start side of the existing contour line among the four contour sides of the target pixel. This determination is performed by referring to the already generated contour line management information DM and verifying whether or not the contour side numbers of the four contour sides of the target pixel are registered as the start side numbers of the existing contour lines. Will be If there is a contour side registered as the start side of the existing contour, “YES” is determined and the process proceeds to step S18. If there is a contour side registered as the start side of the existing contour, It is determined as "NO" and the process proceeds to step S21 (connector C).

【0118】ステップS18では、注目画素の輪郭辺を
含む既成輪郭線が注目画素の4つの輪郭辺のみから構成
されているか否かを判断する。ここで「NO」と判断さ
れた場合はステップS19に進み、「YES」と判断さ
れた場合はステップS20に進む。
In step S18, it is determined whether or not the existing contour including the contour side of the target pixel is composed of only four contour sides of the target pixel. If “NO” is determined here, the process proceeds to step S19, and if “YES” is determined, the process proceeds to step S20.

【0119】開始辺が注目画素の輪郭辺に含まれている
場合は、その輪郭線の開始辺を更新することが必要とな
る。この理由は、注目画素を処理することによって注目
画素の輪郭辺に含まれる開始辺は無効となるからであ
る。このため、開始辺が注目画素の輪郭辺に含まれてい
る場合は、新規輪郭線を生成し、その新規輪郭線がそれ
以前の輪郭線の輪郭線接続情報DCを引き継ぐ。新規輪
郭線についての輪郭線管理情報DMには、開始辺が登録
されていないので新規輪郭線上の1つの輪郭辺(但し、
注目画素に接していない輪郭辺)を選択して開始辺とす
る。また、新規輪郭線についての開始濃度値を注目画素
の濃度値とする。そして、それ以前の輪郭線に対しては
終了処理を施すこととなる。ところが、実際には、引き
継いだ新規輪郭線の情報を変更することは効率が悪いの
で、この実施の形態では、ステップS19において、つ
ぎのような処理が行われる。
When the start side is included in the contour side of the target pixel, it is necessary to update the start side of the contour line. The reason for this is that processing the target pixel invalidates the start side included in the contour side of the target pixel. For this reason, when the start side is included in the contour side of the target pixel, a new contour is generated, and the new contour inherits the contour connection information DC of the previous contour. Since the start side is not registered in the outline management information DM about the new outline, one outline side on the new outline (however,
A contour side that is not in contact with the pixel of interest) is selected as a start side. The start density value of the new contour is set as the density value of the pixel of interest. Then, the end processing is performed on the contour lines before that. However, in practice, it is inefficient to change the information of the inherited new contour line. Therefore, in this embodiment, the following processing is performed in step S19.

【0120】輪郭線管理情報DMに新規輪郭線の情報を
書き込む領域を確保し、その領域に無効となる開始辺が
登録されているそれ以前の輪郭線の内容をコピーする
(ただし、輪郭線番号は異なる)。そしてコピーされた
輪郭線管理情報DMに対して注目画素の濃度値よりも1
つ高い濃度値を終了濃度値に書き込むとともに輪郭辺の
数を0にすることにより、生成した新規輪郭線について
終了処理を施す。一方、無効となる開始辺が登録されて
いる既成輪郭線についての輪郭線管理情報DMの開始濃
度値の欄に現在の注目画素の濃度値を上書きするととも
に、開始辺を注目画素の4つの輪郭辺以外の輪郭辺から
抽出して上書きする。このような処理を行うことによ
り、無効となる開始辺が登録されている輪郭線の内容を
引き継いで、効率的に新たに有効となる開始辺を設定す
ることができる。そして、この結果、注目画素の4つの
輪郭辺のうち既成輪郭線の開始辺として設定されている
輪郭辺が存在する場合であっても良好に輪郭線情報を更
新することができる。そして、ステップS19の処理が
行われると、次に、ステップS21に進む(接続子
C)。
An area for writing new outline information is secured in the outline management information DM, and the contents of the previous outline in which the invalid start side is registered are copied to the area (however, the outline number Is different). Then, the density value of the copied contour management information DM is set to 1
By writing the next higher density value to the end density value and setting the number of contour sides to 0, the end processing is performed on the generated new contour line. On the other hand, the density value of the current target pixel is overwritten in the column of the start density value of the contour management information DM for the existing contour in which the invalid start side is registered, and the start side is set to the four contours of the target pixel. Extract from contour side other than side and overwrite. By performing such processing, the contents of the contour line in which the invalid start side is registered can be taken over, and a new valid start side can be set efficiently. As a result, even if there is a contour side set as the start side of the existing contour line among the four contour sides of the target pixel, the contour line information can be satisfactorily updated. Then, after the process of step S19 is performed, the process proceeds to step S21 (connector C).

【0121】また、開始辺が注目画素の輪郭辺に含まれ
ている場合であって、その輪郭線が注目画素の4つの輪
郭辺のみから構成されている場合は、例えば、図20に
示すような場合である。この場合は、注目画素の4つの
輪郭辺のみからなる輪郭線に対して終了処理を施せばよ
い。従って、ステップS20においては、注目画素の輪
郭辺を含んでいる輪郭線に対して終了処理を施す。そし
て、ステップS20の処理が行われると、後述するステ
ップS41に進む(接続子A)。
Further, when the start side is included in the contour side of the target pixel and the contour is composed of only four contour sides of the target pixel, for example, as shown in FIG. This is the case. In this case, the end processing may be performed on a contour line including only four contour sides of the target pixel. Therefore, in step S20, the end processing is performed on the contour line including the contour side of the target pixel. Then, after the process of step S20 is performed, the process proceeds to step S41 described later (connector A).

【0122】次に、ステップS21において、輪郭線管
理情報DMを参照し、注目画素の輪郭辺が含まれている
輪郭線のうちで輪郭辺の数が最も大きいものを求め、そ
の輪郭線の輪郭線番号を取得する。
Next, in step S21, with reference to the outline management information DM, the outline having the largest number of outlines among the outlines including the outline of the target pixel is determined, and the outline of the outline is determined. Get the line number.

【0123】そして、ステップS22で、輪郭線接続情
報DCにおいて注目画素の輪郭辺を含んでいる輪郭線の
所属輪郭線番号を、ステップS21で取得した輪郭線番
号に書き換える。次に、ステップS23において、注目
画素の4つの輪郭辺の仮想接続状態を生成し、それを保
持しておく。
Then, in step S22, the contour number belonging to the contour including the contour side of the target pixel in the contour connection information DC is rewritten to the contour number acquired in step S21. Next, in step S23, a virtual connection state of the four contour sides of the target pixel is generated and held.

【0124】そして、ステップS24において注目画素
の4つの輪郭辺のうち既成輪郭線に含まれている輪郭辺
を1つ選出し、ステップS25において輪郭線接続情報
DCを参照して選出した輪郭辺を次の輪郭辺番号に登録
している輪郭辺を検出する。そして、ステップS26に
おいて仮想接続状態からステップS24で選出された輪
郭辺の接続先となつ次の輪郭辺を検出する。そして、ス
テップS27では、ステップS26で検出された輪郭辺
が既成輪郭線に含まれているか否かを判定し、含まれて
いない場合は「NO」となってステップS28に進み、
含まれている場合は「YES」となってステップS29
に進む。
In step S24, one of the four contour sides of the pixel of interest is selected from the contour lines included in the existing contour line. In step S25, the contour side selected with reference to the contour line connection information DC is selected. The contour side registered at the next contour side number is detected. Then, in step S26, the next contour side connected to the contour side selected in step S24 from the virtual connection state is detected. Then, in step S27, it is determined whether or not the contour side detected in step S26 is included in the existing contour. If not, “NO” is determined and the process proceeds to step S28.
If it is included, “YES” is returned and step S29 is performed.
Proceed to.

【0125】ステップS28では、ステップS25で検
出された輪郭辺の次の輪郭辺番号にステップS26で検
出された輪郭辺番号を格納する。一方、ステップS29
では、輪郭線接続情報DCを参照し、ステップS26で
検出された輪郭辺の接続先となる次の輪郭辺を検出し、
この輪郭辺をステップS25で検出された輪郭辺の次の
輪郭辺とする。
In step S28, the contour side number detected in step S26 is stored in the contour side number next to the contour side detected in step S25. On the other hand, step S29
Then, referring to the contour line connection information DC, the next contour side to be connected to the contour side detected in step S26 is detected,
This contour side is defined as the contour side next to the contour side detected in step S25.

【0126】そして、ステップS30においては、輪郭
線接続情報DCを参照し、ステップS24で選出した輪
郭辺の接続先となっている輪郭辺を検出する。また、ス
テップS31においては、仮想接続状態を参照し、ステ
ップS24で選出した輪郭辺を次の輪郭辺として登録し
ている輪郭辺を検出する。
In step S30, the contour side which is the connection destination of the contour side selected in step S24 is detected with reference to the contour line connection information DC. Further, in step S31, the contour side in which the contour side selected in step S24 is registered as the next contour side is detected with reference to the virtual connection state.

【0127】そして、ステップS32においては、ステ
ップS31で検出した輪郭辺が既成輪郭辺に含まれてい
るか否かを判定し、含まれていない場合は「NO」とな
ってステップS33に進み、含まれている場合は「YE
S」となってステップS34に進む。
Then, in step S32, it is determined whether or not the contour side detected in step S31 is included in the existing contour side. If not, "NO" is determined and the process proceeds to step S33 to include the contour side. "YE
S ", and proceeds to step S34.

【0128】ステップS33では、ステップS31で検
出された輪郭辺の次の輪郭辺番号にステップS30で検
出された輪郭辺番号を格納する。一方、ステップS34
では、輪郭線接続情報DCを参照し、ステップS31で
検出された輪郭辺を次の輪郭辺としている輪郭辺を検出
し、この輪郭辺の次の輪郭辺として登録されている輪郭
辺をステップS30で検出された輪郭辺とする。
In step S33, the contour side number detected in step S30 is stored in the contour side number next to the contour side detected in step S31. On the other hand, step S34
Then, with reference to the contour line connection information DC, a contour side having the contour side detected in step S31 as the next contour side is detected, and the contour side registered as the next contour side of this contour side is determined in step S30. Is the contour side detected in.

【0129】上記のステップS24〜S34の処理で既
成輪郭線に含まれている注目画素の1つの輪郭辺につい
て輪郭辺の接続状態の更新処理が終了したこととなる。
そして、ステップS35において注目画素の4つの輪郭
辺のうち他に既成輪郭線に含まれている輪郭辺があるか
否かを判定し、「YES」の場合はその輪郭辺について
再び同様の処理を行うべくステップS24に戻り(接続
子E)、「NO」の場合はステップS36に進む(接続
子F)。
In the processing of steps S24 to S34, the update processing of the connection state of the outline side is completed for one outline side of the target pixel included in the existing outline.
Then, in step S35, it is determined whether or not there is another contour side included in the existing contour line among the four contour sides of the target pixel. In the case of "YES", the same processing is performed again on the contour side. The process returns to step S24 (connector E), and if "NO", the process proceeds to step S36 (connector F).

【0130】そして、ステップS36においては、上記
ステップS16において記憶した輪郭辺の接続状態があ
るか否かを判定する。記憶した接続状態がある場合は
「YES」となってステップS37に進み、記憶した接
続状態がない場合は「NO」となってステップS41に
進む。
In step S36, it is determined whether or not there is a connection state of the outline stored in step S16. If there is a stored connection state, the determination is "YES" and the process proceeds to step S37. If there is no stored connection state, the determination is "NO" and the process proceeds to step S41.

【0131】ステップS37では、記憶している接続状
態を読み出して、同一輪郭線に含まれている2つの輪郭
辺を抽出する。そして、ステップS38でこれら2つの
輪郭辺の接続状態が連続しているか否かを判定する。連
続していない場合は、例えば、図19に示したように既
成輪郭線の内側にホール状の輪郭線が形成されるので、
ステップS39に進む。一方、連続している場合はホー
ル状の輪郭線は形成されないのでステップS40に進
む。
In step S37, the stored connection state is read, and two contour sides included in the same contour are extracted. Then, in step S38, it is determined whether or not the connection state of these two contour sides is continuous. If not continuous, for example, as shown in FIG. 19, since a hole-shaped contour is formed inside the existing contour,
Proceed to step S39. On the other hand, if they are continuous, a hole-shaped contour is not formed, and the process proceeds to step S40.

【0132】ステップS39では、既成輪郭線の内側に
形成されるホール状の輪郭線に対して開始辺を登録し、
新規輪郭線として設定する。そして、ステップS40に
進む。
In step S39, a starting side is registered for a hole-shaped contour formed inside the existing contour.
Set as a new contour line. Then, the process proceeds to step S40.

【0133】ステップS40では、同一輪郭線に含まれ
ている2つの輪郭辺を抽出する際に他の組み合わせがあ
るか否かを判定し、他の組み合わせがある場合はそれら
の輪郭辺についてホール状輪郭線が形成されるか否かを
検査するために、再びステップS37に戻る。また、他
の組み合わせがない場合は、「NO」となってステップ
S41に進む。
In step S40, when extracting two contour sides included in the same contour line, it is determined whether or not there is another combination. If there is another combination, a hole shape is determined for those contour sides. The process returns to step S37 again to check whether or not a contour line is formed. If there is no other combination, “NO” is determined and the process proceeds to step S41.

【0134】上記ステップS11〜S40の処理によっ
て抽出された注目画素についての処理が終了したことと
なり、ステップS41においては次に注目画素として処
理すべき画素が存在するか否かを、ソート結果のメモリ
アドレスに基づいて判定し、次の画素がある場合には
「YES」となってステップS11に戻る(接続子
G)。また、全ての画素についての処理が終了したとき
は「NO」となってステップS42に進む。
The processing for the pixel of interest extracted by the processing of steps S11 to S40 has been completed, and in step S41, it is determined whether or not there is a pixel to be processed as the pixel of interest next, by storing the result of sorting in the memory. The determination is made based on the address, and if there is a next pixel, “YES” is returned to step S11 (connector G). When the process for all the pixels is completed, “NO” is determined, and the process proceeds to step S42.

【0135】ステップS42では、抽出すべき注目画素
が無くなったので、この時点で輪郭線管理情報DMにお
いて終了濃度値が格納されていない全ての輪郭線に対し
て終了濃度値「0」を格納する。つまり、終了処理が施
されていない全ての輪郭線に対して終了処理を施す。こ
の終了処理が行われるとステップS43に進む。
In step S42, since there are no more target pixels to be extracted, the end density value "0" is stored for all the outlines for which the end density values are not stored in the outline management information DM at this time. . That is, end processing is performed on all contour lines that have not been subjected to end processing. After the end processing is performed, the process proceeds to step S43.

【0136】そして、ステップS43において上記の処
理によって生成/更新された輪郭線管理情報DMを保存
することにより処理シーケンスが終了する。
Then, in step S43, the processing sequence ends by storing the outline management information DM generated / updated by the above processing.

【0137】上記のような処理を行うことにより、各濃
度値ごとの輪郭線を抽出することができる輪郭線管理情
報DMが得られる。また、上記のような処理過程におい
て各濃度値ごとの輪郭線を出力させる場合は、ステップ
S11において注目画素を抽出したときに、その注目画
素の濃度値を調べて前回の濃度値と異なっていれば、そ
の時点の輪郭線接続情報DCを出力するように構成すれ
ばよい。
By performing the above processing, the outline management information DM from which the outline for each density value can be extracted is obtained. In the case where the contour line for each density value is output in the above-described processing, when the target pixel is extracted in step S11, the density value of the target pixel is checked, and if the target pixel is different from the previous density value. For example, the configuration may be such that the contour line connection information DC at that time is output.

【0138】以上、この実施の形態で説明したような処
理形態で画像の輪郭抽出を行えば、任意の濃度値につい
ての輪郭抽出の処理を効率的に行うことができ、処理時
間を短縮することができることはもはや明らかである。
As described above, if the contour extraction of the image is performed in the processing form described in this embodiment, the contour extraction processing for an arbitrary density value can be efficiently performed, and the processing time can be reduced. It is already clear what can be done.

【0139】<7.変形例>上記の処理においては、主
として濃度値が0〜9の10階調の画像に対する処理を
例示して説明したが、これに限定するものではなく、こ
の発明は任意の階調数の画像に対して適用可能であるこ
とは言うまでもない。
<7. Modified Example> In the above-described processing, the processing has been mainly described by exemplifying the processing for an image of 10 gradations having a density value of 0 to 9. However, the present invention is not limited to this. Needless to say, it is applicable to

【0140】次に、上記の説明においては、既成輪郭線
の内側にホール状輪郭線が新たに形成されることを検出
するために、輪郭辺の接続状態が連続するか否かを検出
していた。しかし、これ以外に単に画像のパターン検出
からホール状輪郭線が新たに形成されるか否かを検出す
ることもできる。
Next, in the above description, in order to detect that a hole-shaped contour is newly formed inside the existing contour, it is detected whether or not the connection state of the contour sides is continuous. Was. However, it is also possible to simply detect whether or not a new hole-shaped contour line is formed by simply detecting the pattern of the image.

【0141】次に、上記実施の形態で説明した図2の画
像の輪郭抽出装置100を構成する各処理部を、表示
部、キーボード、CPU、メモリ等を備える一般的なコ
ンピュータが所定のプログラムを実行することによって
実現するものであってもよい。この場合、原画像は磁気
ディスクなどに格納しておき、コンピュータ内部のCP
Uが図35ないし図38に示した各手順を行う画像の輪
郭抽出プログラムを実行することによって、各濃度値ご
との輪郭線が順次形成されていくとともに、メモリ内に
は輪郭線接続情報DCと輪郭線管理情報DMとが順次生
成/更新されていく。そして、コンピュータが上述のよ
うな処理を行うことによって、コンピュータによる輪郭
抽出処理の時間が短縮される。なお、コンピュータが実
行する輪郭抽出プログラムは、CD−ROMやフレキシ
ブルディスクなどの可搬性の記録媒体若しくはコンピュ
ータ内設の磁気ディスクなどの固定の記録媒体に記録保
存されており、コンピュータのCPUがこれらの記録媒
体から輪郭抽出プログラムを読み取って実行するもので
あってもよい。
Next, a general computer having a display unit, a keyboard, a CPU, a memory, and the like executes a predetermined program by using the respective processing units constituting the image contour extracting apparatus 100 shown in FIG. 2 described in the above embodiment. It may be realized by executing. In this case, the original image is stored on a magnetic disk or the like, and the CP
U executes the image contour extraction program for performing the procedures shown in FIGS. 35 to 38, whereby the contour lines for each density value are sequentially formed, and the contour line connection information DC and the memory are stored in the memory. Contour line management information DM is sequentially generated / updated. When the computer performs the above-described processing, the time for the contour extraction processing by the computer is reduced. Note that the contour extraction program executed by the computer is recorded and stored on a portable recording medium such as a CD-ROM or a flexible disk or a fixed recording medium such as a magnetic disk provided in the computer. The program may read and execute a contour extraction program from a recording medium.

【0142】[0142]

【発明の効果】以上説明したように、請求項1に記載の
発明によれば、画像において濃度値の最大値を示す画素
から降順に1画素ずつ注目画素を抽出して、輪郭線接続
情報と輪郭線管理情報とを更新していく過程において各
濃度値ごとの輪郭線が形成されていく。このため、異な
る濃度値についての輪郭線をいくつか抽出する際にも、
画像を構成する全ての画素を注目画素として抽出して行
う処理を1回だけ行えばよい。従って、任意の濃度値に
ついての輪郭抽出の処理を効率的に行うことができ、処
理時間を短縮することができる。また、輪郭線管理情報
に開始辺を含ませるため、後に任意の濃度値の輪郭抽出
を行う場合に輪郭線管理情報を用いることができる。
As described above, according to the first aspect of the present invention, a pixel of interest is extracted one by one in descending order from the pixel having the maximum density value in the image, and the contour connection information is extracted. In the process of updating the outline management information, an outline is formed for each density value. For this reason, when extracting some contour lines for different density values,
The process of extracting all the pixels constituting the image as the pixel of interest need only be performed once. Therefore, it is possible to efficiently perform the contour extraction processing for an arbitrary density value, and to shorten the processing time. In addition, since the start side is included in the outline management information, the outline management information can be used when the outline of an arbitrary density value is extracted later.

【0143】請求項2に記載の発明によれば、画像にお
ける同一の濃度値を示す画素が注目画素として処理され
れば、その濃度値の輪郭線が得られるため、輪郭抽出の
処理を効率的に行うことができ、処理時間を短縮するこ
とができる。
According to the second aspect of the present invention, if pixels having the same density value in an image are processed as a pixel of interest, a contour line having that density value is obtained, so that the contour extraction processing can be performed efficiently. And the processing time can be shortened.

【0144】請求項3に記載の発明によれば、記憶され
た輪郭線管理情報に基づいて所定の濃度値の輪郭線を抽
出することができるため、改めて注目画素を抽出しつつ
輪郭線接続情報を生成する必要はない。従って、輪郭抽
出の処理を効率的に行うことができ、処理時間を短縮す
ることができる。
According to the third aspect of the present invention, it is possible to extract a contour line having a predetermined density value based on the stored contour line management information. Does not need to be generated. Therefore, the contour extraction processing can be performed efficiently, and the processing time can be reduced.

【0145】請求項4に記載の発明によれば、効率的に
画像を構成する画素を濃度値の降順若しくは昇順に並べ
換えることができる。この結果、輪郭抽出の処理を効率
的に行うことができ、処理時間を短縮することができ
る。
According to the fourth aspect of the present invention, pixels constituting an image can be efficiently rearranged in descending or ascending order of density value. As a result, the contour extraction processing can be performed efficiently, and the processing time can be reduced.

【0146】請求項5に記載の発明によれば、画像にお
いて濃度値の最大値を示す画素から降順に1画素ずつ注
目画素を抽出して、輪郭線接続情報と輪郭線管理情報と
を更新していく過程において各濃度値ごとの輪郭線が形
成されていく。このため、異なる濃度値についての輪郭
線をいくつか抽出する際にも、画像を構成する全ての画
素を注目画素として抽出して行う処理を1回だけ行えば
よい。従って、任意の濃度値についての輪郭抽出の処理
を効率的に行うことができ、処理時間を短縮することが
できる。
According to the fifth aspect of the invention, the pixel of interest is extracted one pixel at a time in descending order from the pixel having the maximum density value in the image, and the outline connection information and the outline management information are updated. In the process, the contour line is formed for each density value. For this reason, even when extracting some contours with different density values, the process of extracting and extracting all the pixels constituting the image as the pixel of interest may be performed only once. Therefore, it is possible to efficiently perform the contour extraction processing for an arbitrary density value, and to shorten the processing time.

【0147】請求項6に記載の発明によれば、コンピュ
ータが、所定の画像の輪郭抽出プログラムを実行するこ
とにより、画像の輪郭抽出をコンピュータが効率的に行
うことができ、処理時間を短縮することができる。
According to the sixth aspect of the present invention, when the computer executes the predetermined image outline extraction program, the computer can efficiently extract the outline of the image and reduce the processing time. be able to.

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

【図1】この発明における輪郭線の生成/更新の概念を
示す図である。
FIG. 1 is a diagram showing a concept of generation / update of a contour line according to the present invention.

【図2】この発明の一実施例としての画像の輪郭抽出装
置の構成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of an image contour extraction device as one embodiment of the present invention.

【図3】輪郭線接続情報を説明する図である。FIG. 3 is a diagram illustrating contour line connection information.

【図4】輪郭線管理情報を説明する図である。FIG. 4 is a diagram illustrating contour line management information.

【図5】枠付き画像の生成を説明する図である。FIG. 5 is a diagram illustrating generation of a framed image.

【図6】輪郭辺番号の割付を説明する図である。FIG. 6 is a diagram illustrating assignment of contour side numbers.

【図7】7×6の枠付き画像について輪郭辺番号を示す
図である。
FIG. 7 is a diagram showing contour side numbers for a 7 × 6 framed image.

【図8】7×6の枠付き画像における各画素の座標値を
示す図である。
FIG. 8 is a diagram illustrating coordinate values of respective pixels in a 7 × 6 framed image.

【図9】原画像について濃度値ごとの画素数をカウント
した結果を示す図である。
FIG. 9 is a diagram showing a result of counting the number of pixels for each density value in an original image.

【図10】各濃度値ごとの累積画素数を示す図である。FIG. 10 is a diagram showing the cumulative number of pixels for each density value.

【図11】濃度値に基づくソート処理を示す図である。FIG. 11 is a diagram illustrating a sorting process based on a density value.

【図12】濃度値に基づくソート処理を示す図である。FIG. 12 is a diagram illustrating a sorting process based on a density value.

【図13】ソート処理が行われた各濃度値ごとの累積画
素数とバッファ領域とを示す図である。
FIG. 13 is a diagram showing a cumulative pixel count and a buffer area for each density value on which a sort process has been performed.

【図14】注目画素の4つの輪郭辺が1つの既成輪郭線
に含まれている場合を示す図である。
FIG. 14 is a diagram illustrating a case where four contour sides of a target pixel are included in one existing contour line.

【図15】図14(a)の輪郭線E1を図14(b)の
輪郭線E1に更新する過程を示す図である。
FIG. 15 is a diagram illustrating a process of updating the contour E1 of FIG. 14A to the contour E1 of FIG. 14B.

【図16】注目画素の4つの輪郭辺が3つの既成輪郭線
に含まれている場合を示す図である。
FIG. 16 is a diagram illustrating a case where four contour sides of a target pixel are included in three existing contour lines.

【図17】図16(a)の状態における輪郭線接続情報
などを示している図である。
FIG. 17 is a diagram showing contour line connection information in the state of FIG.

【図18】輪郭線接続情報の一例を示す図である。FIG. 18 is a diagram illustrating an example of contour line connection information.

【図19】ホール状の輪郭線が形成される場合の一例を
示す図である。
FIG. 19 is a diagram illustrating an example of a case where a hole-shaped contour is formed.

【図20】輪郭線が消滅する場合の一例を示す図であ
る。
FIG. 20 is a diagram illustrating an example of a case where a contour line disappears.

【図21】各濃度値ごとの輪郭線を抽出していく際の輪
郭線管理情報と輪郭線接続情報とを示す図である。
FIG. 21 is a diagram showing outline management information and outline connection information when extracting an outline for each density value.

【図22】各濃度値ごとの輪郭線を抽出していく際の輪
郭線管理情報と輪郭線接続情報とを示す図である。
FIG. 22 is a diagram showing outline management information and outline connection information when extracting an outline for each density value.

【図23】各濃度値ごとの輪郭線を抽出していく際の輪
郭線管理情報と輪郭線接続情報とを示す図である。
FIG. 23 is a diagram showing outline management information and outline connection information when extracting an outline for each density value.

【図24】各濃度値ごとの輪郭線を抽出していく際の輪
郭線管理情報と輪郭線接続情報とを示す図である。
FIG. 24 is a diagram showing outline management information and outline connection information when extracting an outline for each density value.

【図25】各濃度値ごとの輪郭線を抽出していく際の輪
郭線管理情報と輪郭線接続情報とを示す図である。
FIG. 25 is a diagram showing outline management information and outline connection information when extracting an outline for each density value.

【図26】各濃度値ごとの輪郭線を抽出していく際の輪
郭線管理情報と輪郭線接続情報とを示す図である。
FIG. 26 is a diagram showing outline management information and outline connection information when extracting an outline for each density value.

【図27】各濃度値ごとの輪郭線を抽出していく際の輪
郭線管理情報と輪郭線接続情報とを示す図である。
FIG. 27 is a diagram showing outline management information and outline connection information when extracting an outline for each density value.

【図28】各濃度値ごとの輪郭線を抽出していく際の輪
郭線管理情報と輪郭線接続情報とを示す図である。
FIG. 28 is a diagram showing outline management information and outline connection information when extracting an outline for each density value.

【図29】各濃度値ごとの輪郭線を抽出していく際の輪
郭線管理情報と輪郭線接続情報とを示す図である。
FIG. 29 is a diagram showing outline management information and outline connection information when extracting an outline for each density value.

【図30】各濃度値ごとの輪郭線を抽出していく際の輪
郭線管理情報と輪郭線接続情報とを示す図である。
FIG. 30 is a diagram showing outline management information and outline connection information when extracting an outline for each density value.

【図31】開始辺の進行方向を特定するルールを示す図
である。
FIG. 31 is a diagram showing a rule for specifying a traveling direction of a start side.

【図32】輪郭線を追跡形成する際に進行方向を特定す
るルールを示す図である。
FIG. 32 is a diagram showing a rule for specifying a traveling direction when tracking and forming an outline.

【図33】輪郭線管理情報において各輪郭線ごとの有効
濃度範囲を示す図である。
FIG. 33 is a diagram showing an effective density range for each contour line in the contour line management information.

【図34】開始辺よりルールに基づいて輪郭辺を辿って
いく過程を示す図である。
FIG. 34 is a diagram illustrating a process of tracing a contour side from a start side based on a rule.

【図35】コンピュータなどによって濃度値ごとの輪郭
線形成を行う処理シーケンスを示すフローチャートであ
る。
FIG. 35 is a flowchart showing a processing sequence for forming a contour line for each density value by a computer or the like.

【図36】コンピュータなどによって濃度値ごとの輪郭
線形成を行う処理シーケンスを示すフローチャートであ
る。
FIG. 36 is a flowchart showing a processing sequence for forming a contour line for each density value by a computer or the like.

【図37】コンピュータなどによって濃度値ごとの輪郭
線形成を行う処理シーケンスを示すフローチャートであ
る。
FIG. 37 is a flowchart showing a processing sequence for forming a contour line for each density value by a computer or the like.

【図38】コンピュータなどによって濃度値ごとの輪郭
線形成を行う処理シーケンスを示すフローチャートであ
る。
FIG. 38 is a flowchart showing a processing sequence for forming a contour line for each density value by a computer or the like.

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

10 前処理部 20 注目画素抽出部 30 輪郭辺判定部 40 輪郭線形成部 40a 輪郭線情報生成部 40b 輪郭線情報更新部 50 メモリ 60 輪郭抽出部 70 記憶部 DM 輪郭線管理情報 DC 輪郭線接続情報 Reference Signs List 10 preprocessing unit 20 target pixel extraction unit 30 contour side determination unit 40 contour formation unit 40a contour line information generation unit 40b contour line information update unit 50 memory 60 contour extraction unit 70 storage unit DM contour line management information DC contour line connection information

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 画像の輪郭を抽出する方法であって、 (a) 前記画像において濃度値の最大値を示す画素から降
順に1画素ずつ注目画素を抽出する工程と、 (b) 前記注目画素の周囲の複数の輪郭辺が既成輪郭線に
包含されていない場合には、前記複数の輪郭辺からなる
輪郭線を新規輪郭線として設定し、当該新規輪郭線の接
続状態を示す輪郭線接続情報を生成するとともに、前記
注目画素の前記複数の輪郭辺のうちのいずれか1つを選
択した当該新規輪郭線の開始辺と、前記注目画素の濃度
値を当該新規輪郭線の有効濃度範囲の開始濃度とした開
始濃度値とを含む輪郭線管理情報を生成する工程と、 (c) 前記注目画素の前記複数の輪郭辺のうちのいずれか
が既成輪郭線に包含されている場合には、当該既成輪郭
線についての前記輪郭線接続情報を更新する工程と、 (d) 前記更新によって前記注目画素のいずれかの前記輪
郭辺が包含されていた少なくとも1つの既成輪郭線が消
滅する場合、又は抽出すべき注目画素が無くなった場合
には、前記既成輪郭線についての前記輪郭線管理情報に
対して前記注目画素の濃度値を前記既成輪郭線の有効濃
度範囲の終了濃度を示す終了濃度値として追加する工程
と、を有することを特徴とする画像の輪郭抽出方法。
1. A method for extracting a contour of an image, comprising: (a) extracting a pixel of interest one by one in descending order from a pixel having a maximum density value in the image; and (b) extracting a pixel of interest. If a plurality of contour sides surrounding the contour line are not included in the existing contour line, a contour line composed of the plurality of contour sides is set as a new contour line, and contour line connection information indicating a connection state of the new contour line. And the start side of the new contour line in which one of the plurality of contour sides of the target pixel is selected and the density value of the target pixel are set to the start of the effective density range of the new contour line. Generating contour management information including a starting density value as a density; and (c) when any of the plurality of contour sides of the pixel of interest is included in an existing contour, Update the contour connection information for existing contours (D) when at least one existing contour line in which any of the contour sides of the pixel of interest is included by the update disappears, or when there is no pixel of interest to be extracted, Adding a density value of the target pixel as an end density value indicating an end density of an effective density range of the formed contour line to the contour line management information for the formed contour line. Image contour extraction method.
【請求項2】 請求項1に記載の画像の輪郭抽出方法に
おいて、 前記画像における同一の濃度値を示す画素を前記注目画
素として、前記(a)ないし(d)工程を繰り返し行うことに
よって生成/更新された前記輪郭線接続情報を出力する
ことを特徴とする画像の輪郭抽出方法。
2. The method according to claim 1, wherein the steps (a) to (d) are repeatedly performed by using pixels having the same density value in the image as the pixel of interest. A method for extracting an outline of an image, comprising outputting the updated outline connection information.
【請求項3】 請求項1に記載の画像の輪郭抽出方法に
おいて、 (e) 前記(a)ないし(d)工程を繰り返し行うことによって
生成された前記輪郭線管理情報を記憶する工程と、 所定の濃度値の輪郭線を抽出する際に、 (f) 前記輪郭線管理情報に含まれる前記開始濃度値と前
記終了濃度値とによって示される前記有効濃度範囲に基
づいて前記所定の濃度値の輪郭線を特定し、当該輪郭線
についての前記輪郭線管理情報から前記開始辺を取得す
る工程と、 (g) 前記開始辺から所定の規則に従って輪郭辺を順次抽
出していく工程と、を有することを特徴とする画像の輪
郭抽出方法。
3. The method for extracting a contour of an image according to claim 1, wherein: (e) storing the contour management information generated by repeatedly performing the steps (a) to (d); When extracting the contour of the density value of (f), the contour of the predetermined density value based on the effective density range indicated by the start density value and the end density value included in the contour management information Identifying a line, acquiring the start side from the contour management information for the contour, and (g) sequentially extracting contour sides from the start side according to a predetermined rule. A contour extraction method for an image characterized by the following.
【請求項4】 請求項1ないし請求項3のいずれかに記
載の画像の輪郭抽出方法において、 前記(a)ないし(d)工程に先立って行う工程として、 (h) 前記画像を構成する全ての画素についての画素情報
を記録する記録領域を確保する工程と、 (i) 前記画像を構成する全ての画素を検索し、濃度値ご
との画素数をカウントする工程と、 (j) 前記カウントの結果に基づいて、各濃度値ごとに当
該濃度値未満の累積画素数を求める工程と、 (k) 前記画像を構成する画素を1画素ずつ抽出する工程
と、 (l) 前記(k)工程において抽出された画素の濃度値を検
出し、当該濃度値に対応する前記累積画素数を取得し、
当該累積画素数の値に対応する前記記録領域の位置に前
記抽出された画素を特定する前記画素情報を記録すると
ともに、当該累積画素数の値を更新する工程と、を有
し、 前記(k)から(l)工程を前記画像を構成する全ての画素に
ついて行うまで繰り返し行うことを特徴とする画像の輪
郭抽出方法。
4. The method for extracting an outline of an image according to claim 1, wherein the steps performed prior to the steps (a) to (d) include: A step of securing a recording area for recording pixel information for the pixels of (a), (i) searching all the pixels constituting the image, and counting the number of pixels for each density value, (j) Based on the result, for each density value, the step of obtaining the cumulative number of pixels less than the density value; (k) the step of extracting the pixels constituting the image one pixel at a time; (l) the (k) step Detecting the density value of the extracted pixel, acquiring the cumulative number of pixels corresponding to the density value,
Recording the pixel information specifying the extracted pixel at the position of the recording area corresponding to the value of the cumulative number of pixels, and updating the value of the cumulative number of pixels, comprising: And (l) are repeated until all the pixels constituting the image are performed.
【請求項5】 画像の輪郭を抽出する装置であって、 (a) 前記画像において濃度値の最大値を示す画素から降
順に1画素ずつ注目画素を抽出する注目画素抽出手段
と、 (b) 前記注目画素の周囲の複数の輪郭辺が既成輪郭線に
包含されていない場合には、前記複数の輪郭辺からなる
輪郭線を新規輪郭線とし、当該新規輪郭線の接続状態を
示す輪郭線接続情報を生成するとともに、前記注目画素
の前記複数の輪郭辺のうちのいずれか1つを選択した当
該新規輪郭線の開始辺と、前記注目画素の濃度値を当該
新規輪郭線の有効濃度範囲の開始濃度とした開始濃度値
とを含む輪郭線管理情報を生成する輪郭線情報生成手段
と、 (c) 前記輪郭線接続情報と前記輪郭線管理情報とを記憶
する記憶手段と、 (d) 前記注目画素の前記複数の輪郭辺のうちのいずれか
が既成輪郭線に包含されている場合には、当該既成輪郭
線について前記記憶手段に記憶されている前記輪郭線接
続情報を更新するとともに、当該更新によって前記注目
画素のいずれかの前記輪郭辺が包含されていた少なくと
も1つの既成輪郭線が消滅する場合、又は抽出すべき注
目画素が無くなった場合には、前記既成輪郭線について
の前記記憶手段に記憶されている前記輪郭線管理情報に
対して前記注目画素の濃度値を前記既成輪郭線の有効濃
度範囲の終了濃度を示す終了濃度値として追加更新する
更新手段と、を備えることを特徴とする画像の輪郭抽出
装置。
5. A device for extracting an outline of an image, comprising: (a) a pixel-of-interest extracting means for extracting pixel-of-interest one pixel at a time in descending order from a pixel having a maximum density value in the image; When a plurality of contour sides around the pixel of interest are not included in the existing contour line, a contour line including the plurality of contour sides is set as a new contour line, and a contour line connection indicating a connection state of the new contour line. Information, and the start side of the new contour line that has selected any one of the plurality of contour sides of the target pixel, and the density value of the target pixel in the effective density range of the new contour line. Contour information generating means for generating contour management information including a start density value as a start density; (c) storage means for storing the contour connection information and the contour management information; (d) Any of the plurality of contour sides of the pixel of interest When the contour line is included in the existing contour line, the contour line connection information stored in the storage unit is updated for the existing contour line, and the contour edge of any of the target pixels is included by the update. If at least one existing contour line that has been deleted disappears, or if there are no more pixels of interest to be extracted, the contour management information stored in the storage unit for the existing contour line is used. Updating means for additionally updating the density value of the pixel of interest as an end density value indicating the end density of the effective density range of the existing contour line.
【請求項6】 コンピュータによって画像の輪郭を抽出
するためのプログラムを記録した記録媒体であって、 コンピュータに、 (a) 前記画像において濃度値の最大値を示す画素から降
順に1画素ずつ注目画素を抽出する手順、 (b) 前記注目画素の周囲の複数の輪郭辺が既成輪郭線に
包含されていない場合には、前記複数の輪郭辺からなる
輪郭線を新規輪郭線として設定し、当該新規輪郭線の接
続状態を示す輪郭線接続情報を生成するとともに、前記
注目画素の前記複数の輪郭辺のうちのいずれか1つを選
択した当該新規輪郭線の開始辺と、前記注目画素の濃度
値を当該新規輪郭線の有効濃度範囲の開始濃度とした開
始濃度値とを含む輪郭線管理情報を生成する手順、 (c) 前記注目画素の前記複数の輪郭辺のうちのいずれか
が既成輪郭線に包含されている場合には、当該既成輪郭
線についての前記輪郭線接続情報を更新する手順、 (d) 前記更新によって前記注目画素のいずれかの前記輪
郭辺が包含されていた少なくとも1つの既成輪郭線が消
滅する場合、又は抽出すべき注目画素が無くなった場合
には、前記既成輪郭線についての前記輪郭線管理情報に
対して前記注目画素の濃度値を前記既成輪郭線の有効濃
度範囲の終了濃度を示す終了濃度値として追加する手
順、を実行させるための画像の輪郭抽出プログラムを記
録したコンピュータ読み取り可能な記録媒体。
6. A recording medium storing a program for extracting a contour of an image by a computer, comprising: (a) a target pixel for each pixel in a descending order from a pixel having a maximum density value in the image; (B) when a plurality of contour sides around the target pixel are not included in the existing contour line, the contour line composed of the plurality of contour sides is set as a new contour line; Contour line connection information indicating a connection state of the contour line is generated, and a start side of the new contour line that selects any one of the plurality of contour sides of the target pixel, and a density value of the target pixel. (C) generating contour management information including a start density value that is the start density of the effective density range of the new contour, and (c) any one of the plurality of contour sides of the pixel of interest is an existing contour. Embraced by The procedure of updating the outline connection information for the existing outline, (d) at least one existing outline that includes any of the outline sides of the pixel of interest by the update. In the case of disappearance, or when there is no more target pixel to be extracted, the density value of the target pixel is set to the end density of the effective density range of the existing contour line with respect to the contour management information for the existing contour line. A computer-readable recording medium on which an image contour extraction program for executing the procedure of adding the end density value is indicated.
JP24975698A 1998-09-03 1998-09-03 Image contour extraction method, apparatus, and recording medium Expired - Fee Related JP3679619B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24975698A JP3679619B2 (en) 1998-09-03 1998-09-03 Image contour extraction method, apparatus, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24975698A JP3679619B2 (en) 1998-09-03 1998-09-03 Image contour extraction method, apparatus, and recording medium

Publications (2)

Publication Number Publication Date
JP2000076468A true JP2000076468A (en) 2000-03-14
JP3679619B2 JP3679619B2 (en) 2005-08-03

Family

ID=17197769

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24975698A Expired - Fee Related JP3679619B2 (en) 1998-09-03 1998-09-03 Image contour extraction method, apparatus, and recording medium

Country Status (1)

Country Link
JP (1) JP3679619B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2709063A1 (en) 2012-09-13 2014-03-19 Omron Corporation Image processing device, computer-readable recording medium, and image processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2709063A1 (en) 2012-09-13 2014-03-19 Omron Corporation Image processing device, computer-readable recording medium, and image processing method
JP2014056507A (en) * 2012-09-13 2014-03-27 Omron Corp Image processing device, image processing program, computer readable recording medium with the same recorded thereon, and image processing method

Also Published As

Publication number Publication date
JP3679619B2 (en) 2005-08-03

Similar Documents

Publication Publication Date Title
US9239946B2 (en) Method and apparatus for detecting and processing specific pattern from image
JP4700892B2 (en) Image matching
JP5854802B2 (en) Image processing apparatus, image processing method, and computer program
JPWO2004051575A1 (en) Feature region extraction apparatus, feature region extraction method, and feature region extraction program
US20020076106A1 (en) Image processing apparatus, image processing method, and recording medium
JPH07184040A (en) Detection device of region encircled by marker by means of singe optical path scanning for photograph copying machine and its method
US5831628A (en) Polygon overlap extraction method, and polygon grouping method and apparatus
Yang et al. A novel line scan clustering algorithm for identifying connected components in digital images
JP2000331156A (en) Method for automatically deciding tracker set along outline and storage medium storing program for execution of the method
JP3679619B2 (en) Image contour extraction method, apparatus, and recording medium
US6496198B1 (en) Color editing system
JP2625612B2 (en) Image processing method and image processing apparatus
JPH04227581A (en) Binarizing-threshold calculation device for image
JP3576759B2 (en) Image processing device
JP2018190266A (en) Information processing apparatus, information processing method, and information processing program
JPH0364909B2 (en)
JP2006279443A (en) Image processing method, apparatus, and program
JP2930599B2 (en) Graphic vectorization processing method and apparatus
JP2773127B2 (en) Image editing method
JPH07225848A (en) Image extracting method
JP2634905B2 (en) How to paint shapes
JP3530390B2 (en) Map figure deformation method, map figure deformation apparatus, and recording medium storing map figure deformation program
JP3330803B2 (en) Image data processing method
JP4351620B2 (en) Image search system
JP2568723B2 (en) Figure display method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050502

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050510

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050513

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090520

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees