JPH01120680A - Approximate pattern generating device - Google Patents
Approximate pattern generating deviceInfo
- Publication number
- JPH01120680A JPH01120680A JP27970987A JP27970987A JPH01120680A JP H01120680 A JPH01120680 A JP H01120680A JP 27970987 A JP27970987 A JP 27970987A JP 27970987 A JP27970987 A JP 27970987A JP H01120680 A JPH01120680 A JP H01120680A
- Authority
- JP
- Japan
- Prior art keywords
- section
- point
- separation
- line segment
- straight
- 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.)
- Pending
Links
- 238000000926 separation method Methods 0.000 claims abstract description 76
- 238000004364 calculation method Methods 0.000 claims abstract description 9
- 239000000284 extract Substances 0.000 claims description 9
- 238000000605 extraction Methods 0.000 claims description 6
- 238000000034 method Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 17
- 238000004458 analytical method Methods 0.000 description 7
- 239000000470 constituent Substances 0.000 description 6
- 238000011835 investigation Methods 0.000 description 6
- 238000001514 detection method Methods 0.000 description 4
- 241000220317 Rosa Species 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 230000035622 drinking Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
- Image Generation (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野J
本発明は近似図形発生装置、%に1図面の自動読取等で
図形の輪郭を円弧区間と直線区間に分離し、分離された
各区間に対し、直線または円弧の近似図形を発生させる
近似図形発生装置に関する。[Detailed Description of the Invention] [Industrial Field of Application J] The present invention is an approximate figure generator, which separates the outline of a figure into an arc section and a straight section by automatically reading one drawing per %, and generates an image in each separated section. On the other hand, the present invention relates to an approximate figure generator that generates approximate figures of straight lines or circular arcs.
従来の近似図形発生装置には、特開昭59−12156
4号公報に示されているように図形入力装置がある。従
来の近似図形発生装置は画像入力装置と記憶装置と点列
データ作成装置と、特徴量算出装置と、特徴量解析装置
と、図形データ作成装置とを含んで構成される。次に従
来の近似図形発生装置について図面を参照して詳細に説
明する。M6図に示す近似図形発生装置は画像を入力す
る画像入力袋f130と入力された画像を記憶する記憶
装置131と入力された画像の線の中心となるような点
を抽出し、点列データを作成する点列データ作成装置3
2と作成された点列データを記憶する記憶装置33と点
列データから直線性を表゛わす特徴蓋を算出する特徴量
算出装置34と、−連の特徴蓋から直線や円弧や角を判
定し、点列を分離する特徴量解析装置35と解析結果、
直線や円弧などをコード化し図形データを作成する図形
データ作成装置36を含んでいる。ここで、画像入力装
置30は画像を入力し、入力された画像は記憶装置31
に記憶される。記憶された画像は処理のために記憶装置
31から読み出され、点列データ作成装置32に入れら
れる。点列データ作成装置32では、細線化処理及び細
線化された図形のチェーンコード化を行なう。ここで細
線化処理及びチェ−ンコード化については種々の文献に
よシ、その動作は明らかで1本発明の範躊ではないので
説明は省略する。チェーンコード化された点列データは
記憶装置33に記憶される。Conventional approximate figure generators include Japanese Patent Application Laid-Open No. 59-12156.
There is a graphic input device as shown in Publication No. 4. A conventional approximate figure generation device includes an image input device, a storage device, a point sequence data generation device, a feature amount calculation device, a feature amount analysis device, and a figure data generation device. Next, a conventional approximate figure generator will be described in detail with reference to the drawings. The approximate figure generator shown in Fig. M6 extracts an image input bag f130 for inputting an image, a storage device 131 for storing the input image, a point that is the center of a line in the input image, and generates point sequence data. Point sequence data creation device 3
2, a storage device 33 for storing the created point sequence data, a feature amount calculation device 34 for calculating a feature cover representing linearity from the point sequence data, and a straight line, arc, or corner determined from the - series feature cover. and a feature quantity analysis device 35 that separates the point sequence and analysis results,
It includes a graphic data creation device 36 that creates graphic data by encoding straight lines, arcs, etc. Here, the image input device 30 inputs an image, and the input image is stored in the storage device 31.
is memorized. The stored image is read out from the storage device 31 and entered into the point sequence data creation device 32 for processing. The point sequence data creation device 32 performs thinning processing and converts the thinned figure into a chain code. The thinning process and chain coding are described in various documents, and their operations are clear and do not fall within the scope of the present invention, so a description thereof will be omitted. The chain-coded point sequence data is stored in the storage device 33.
次に記憶装置33から点列データが読み出され、特徴量
算出装置34で特徴蓋j(以後、特徴蓋と呼ぶ)の算出
が行なわれる。Next, the point sequence data is read out from the storage device 33, and the feature calculation device 34 calculates a feature cover j (hereinafter referred to as a feature cover).
第7図において特徴蓋はチェーンコード化されたある画
素に着目した時(以後、着目画素と呼ぶ)。In FIG. 7, the characteristic cover is when focusing on a certain pixel encoded in a chain code (hereinafter referred to as the pixel of interest).
その着目画素40の前後に点(k=1〜n)離れたとこ
ろにある画素kl、に2の間を結んだ線分42と着目画
素40との距離41で表わされる。It is represented by the distance 41 between the pixel of interest 40 and a line segment 42 connecting the pixels kl and 2 located before and after the pixel of interest 40 (k=1 to n).
第8図は特徴蓋の一例を示す図である。直線部分を構成
する点列の特徴蓋は小さい値をとり、角付近の点列の特
徴蓋は山形の形状をとシ、円弧部分を構成する点列の特
徴蓋はある一定の値に近い一値をとることから区間50
,52ij直線を表わす区間(以後直線区間と呼ぶ)0
区間51は角を表わす区間(以後角区間と呼ぶ)、区間
53は円弧を表わす区間(以後円弧区間と呼ぶ)と判断
できる。FIG. 8 is a diagram showing an example of a characteristic lid. The characteristic cover of the point sequence that makes up the straight line part takes a small value, the characteristic cover of the point sequence near the corner has a chevron shape, and the characteristic cover of the point sequence that makes up the arc part takes a value close to a certain value. Interval 50 since it takes the value
, 52ij A section representing a straight line (hereinafter referred to as a straight section) 0
It can be determined that the section 51 is a section representing a corner (hereinafter referred to as a corner section), and the section 53 is a section representing a circular arc (hereinafter referred to as a circular arc section).
轡微量解析装置35では、直線区間、角区間。The trace amount analysis device 35 analyzes straight sections and corner sections.
円弧区間が前記したような特性を持つことからある基準
値11で特徴蓋を分割し、11以下の特徴蓋を持つ一連
の点列を直線区間とする。Since the arc section has the characteristics described above, the characteristic cover is divided by a certain reference value 11, and a series of points having a characteristic cover of 11 or less is defined as a straight line section.
欠に1直線区間以外の区間の各点列の特徴蓋の分散を求
め、分散の大きい区間を角区間、小さい区間を円弧区間
とする。さらに角区間に対しては角の頂点に対応する点
(以後角点と呼ぶ)を求め隣接している区間を角点まで
延長する。この様にして点列は最終的な直線区間54.
55と円弧区間56に分離される。The variance of the feature cover of each point sequence in an interval other than one straight line interval is determined, and the interval with a large variance is defined as an angular interval, and the interval with a small variance is defined as an arc interval. Furthermore, for a corner section, a point corresponding to the vertex of the corner (hereinafter referred to as a corner point) is found and the adjacent section is extended to the corner point. In this way, the point sequence becomes the final straight line section 54.
55 and an arc section 56.
特徴量解析装置35により求められた分離データは記憶
装置33に記tiされ、記憶された分離データは図形デ
ータ作成装置36に入れられる。The separated data obtained by the feature analysis device 35 is written in the storage device 33, and the stored separated data is input into the graphic data creation device 36.
図形データ作成装置36では直線区間なら直線の始点、
終点9円弧なら始点、終点、中心位置などの情報を作成
し、作成された図形データは記憶装置33に記憶される
。In the graphic data creation device 36, if it is a straight section, the starting point of the straight line,
If the end point is an arc with nine arcs, information such as the start point, end point, center position, etc. is created, and the created graphic data is stored in the storage device 33.
上述した従来の近似図形発生装置は、点列データを作成
する際細線化処理を行なうため図形周囲の情報が失なわ
れてしまい入力図形が面積を持つ面図形で図形周囲の情
報が必要とされる場合には使用できず、また特徴蓋の解
析を、第1段階では点列データを直線区間と、円弧区間
または角区間の2りに分類し、第2段階で直線区間以外
の区間の各点列の特徴蓋の分散を調べ、分散が大きい区
間を角区間、小さい区間を円弧区間と判定し、第3段階
で角区間に関しては角点を求め隣接する区間を角点まで
延長して最終的な直線区間と円弧区間に分離しておシ最
終的な直線区間と円弧区間を求めるために第1段階から
第3段階までの処理を行なわなければならず、これらの
処理を行なった後に図形データの作成を行なっているの
で処理が複雑であシ、また従来例で引用した入力図形の
例のように直線区間と円弧区間が滑らかに変化する場合
は直線区間と円弧区間の分離を行なえるが直線区間から
円弧区間へと急激に変化する場合、直線区間と円弧区間
の分離が困難であるという欠点があった。The conventional approximate figure generator described above performs thinning processing when creating point sequence data, so information around the figure is lost, and the input figure is a surface figure with an area and information around the figure is required. In addition, in the analysis of feature lids, the point sequence data is classified into straight sections and arc sections or corner sections in the first step, and in the second step, each section of the section other than the straight sections is The dispersion of the feature lid of the point sequence is investigated, and the sections with large variances are determined to be corner sections, and the sections with small variances are determined to be arc sections.In the third step, for corner sections, the corner points are found and the adjacent sections are extended to the corner points, and the final In order to obtain the final straight line section and circular arc section, the first to third steps must be performed, and after these processes, the graphic Since the data is created, the processing is complicated, and if the straight line section and circular arc section change smoothly, as in the example of the input figure cited in the conventional example, it is possible to separate the straight line section and the circular arc section. When there is a sudden change from a straight section to an arcuate section, there is a drawback that it is difficult to separate the straight section from the arcuate section.
〔問題点を解決するための手段j
本発明の近似図形発生装置は画像を入力するための画像
入力装置と入力された画像を二値化するための二値化装
置と、二値比された画像の輪郭を点列のつながりとして
取シ出す輪郭点列データ作成装置と作成された輪郭点列
データを記憶するための記憶装置と記憶された輪郭点列
データを直線区間1円弧区間に分離するために用いる特
徴量を算出する特徴量算出装置と算出された特徴量から
直線区間と円弧区間を分離するための分離点抽出装置と
抽出された分離点から分離点と分離点の間の区間に対し
、直IIIJ!または円弧の近似図形を発生させる線分
近似装置と、隣接する線分を取シ出し同一線分であると
判定したら分離点を取シ除き1つの線分とする隣接線分
調査装置とを含んで構成される。[Means for Solving the Problems J] The approximate figure generator of the present invention includes an image input device for inputting an image, a binarization device for binarizing the input image, and a binary ratio A contour point sequence data creation device for extracting the contour of an image as a series of points; a storage device for storing the created contour point sequence data; and a separation of the stored contour point sequence data into straight sections and circular arc sections. A feature amount calculation device that calculates feature amounts used for On the other hand, Nao IIIJ! Alternatively, it includes a line segment approximation device that generates an approximate figure of a circular arc, and an adjacent line segment investigation device that extracts adjacent line segments and removes the separation point to form a single line segment if it is determined that they are the same line segment. Consists of.
次に、本発明の実施例について、図面を参照して詳細に
説明する。Next, embodiments of the present invention will be described in detail with reference to the drawings.
第1図は本発明の一実施例を示すプロ、り図である。FIG. 1 is a diagram showing an embodiment of the present invention.
第2図(a)は入力図形の第一の例で図形の輪郭線は直
線あるいは円弧によって#II成される。第2図(b)
はg2図(a)で示される入力図形の輪郭点列を表わし
ている。FIG. 2(a) is a first example of an input figure, and the outline of the figure is formed by straight lines or circular arcs. Figure 2(b)
represents the contour point sequence of the input figure shown in Fig. g2 (a).
第3図は第2図(b)に示す輪郭点列の特徴量lの変化
を表わす図である。FIG. 3 is a diagram showing changes in the feature quantity l of the contour point sequence shown in FIG. 2(b).
第4図(a)は入力図形の第2の例を示す図、第4図(
b)は第4図(a) K示す入力図形の隣接線分調査後
の分離点を表わす図である。FIG. 4(a) is a diagram showing a second example of the input figure, FIG.
b) is a diagram showing separation points after examining adjacent line segments of the input figure shown in FIG. 4(a)K.
第5図18)は隣接線分調査装置の動作の説明図、第5
図[b)は第5図(a)K示す線分の隣接線分調査後の
分離点を表わす図である。なお、本実施例では、本発明
の理解を容易にするために入力図形の第1の例と第2の
例を用いて詳細に説明する。Fig. 5 18) is an explanatory diagram of the operation of the adjacent line segment investigation device;
Figure [b] is a diagram showing separation points after examining adjacent line segments of the line segment shown in Figure 5(a)K. In this embodiment, in order to facilitate understanding of the present invention, a detailed explanation will be given using a first example and a second example of input graphics.
第1図に示す近似図形発生装置は、画像を入力するため
の画像入力装置1と、入力された画像を二値化するため
の二値化装置2と、二値化された画像の輪郭を点列のつ
ながりとして取り出しチェーンコード化する輪郭点列デ
ータ作成装置3と、作成された輪郭データを記憶するた
めの、記憶装置4と、輪郭点列データを直線区間1円弧
区間に分離するために用いる特徴量を算出する特徴量算
出装置5と、算出された特徴量から直線区間と円弧区間
を分離するための分離点を抽出する分離点抽出装置6と
、抽出された分離点から分離点と分離点の間の区間に対
し直線または円弧の近似図形を発生させる線分近似装置
7と、隣接する線分を取シ出し同一線分であると判定し
たら分離点を取シ除き、1つの線分とする隣接線分調査
装置8とを含んで構成される。The approximate figure generator shown in FIG. 1 includes an image input device 1 for inputting an image, a binarization device 2 for binarizing the input image, and a A contour point sequence data creation device 3 for extracting and chain-coding the connected point sequence, a storage device 4 for storing the created contour data, and a device for separating the contour point sequence data into straight sections and circular arc sections. A feature amount calculation device 5 that calculates the feature amount to be used, a separation point extraction device 6 that extracts a separation point for separating a straight section and an arc section from the calculated feature amount, and a separation point extraction device 6 that extracts a separation point from the extracted separation point. A line segment approximation device 7 generates an approximate figure of a straight line or circular arc for the section between the separation points, and the line segment approximation device 7 extracts adjacent line segments, removes the separation points when they are determined to be the same line segment, and creates a single line. and an adjacent line segment investigation device 8.
画像入力装置1は画像を入力し入力された画像は二値化
装置2に入れられる。二値化装置2では入力された画像
の二値化を行ない、二値化された画像は輪郭点列データ
作成装置3に入れられる。An image input device 1 inputs an image, and the input image is input into a binarization device 2. The binarization device 2 binarizes the input image, and the binarized image is input to the contour point sequence data creation device 3.
輪郭点列データ作成装置3では二値化された入力図形の
エツジトレース処理及びチエインコード化を行なう。エ
ツジトレース処理は図形の輪郭をトレースする処理のこ
とでトレースした情報からチェーンコード化が行なわれ
る。The contour point sequence data creation device 3 performs edge tracing processing and chain coding of the binarized input figure. Edge trace processing is a process of tracing the outline of a figure, and chain coding is performed from the traced information.
第2図(a)は入力図形の一例で図形の輪郭線は直線あ
るいは円弧によシ構成される。第2図(b)は第2図t
a)で示される入力図形にエツジトレース処理を行なっ
た後の輪郭点列を表わしている。FIG. 2(a) is an example of an input figure, and the outline of the figure is composed of straight lines or circular arcs. Figure 2 (b) is Figure 2 t
It shows a sequence of contour points after performing edge tracing processing on the input figure shown in a).
チエインコード化された輪郭点列データは記憶装置4に
記憶される。次に記tぽ装置4から輪郭点列データが読
み出され、特徴量算出装置5で特徴量の算出が行なわれ
る。The chain-coded contour point sequence data is stored in the storage device 4. Next, the contour point sequence data is read out from the writing device 4, and the feature amount calculation device 5 calculates the feature amount.
第7図において特徴Jkはチェーンコード化されたある
画素に着目した時(以後着目画素と呼ぶ)、その着目画
素40の前後に点(k=x〜n)Mれたところにある画
gkl、に2の間を結んだ線分42と着目画素40との
距離41で表わされる。In FIG. 7, a feature Jk is an image gkl located at a point (k=x~n) M before and after the pixel of interest 40 when focusing on a certain chain-coded pixel (hereinafter referred to as the pixel of interest); The distance 41 between the pixel 40 of interest and the line segment 42 connecting between .
第3図は第2図tb)に示す輪郭点列の特徴量を表わし
ている。ここで区間14.15.17は直線区間1区間
16は、円弧区間を表わしている。特徴aXX張装置で
算出された特徴量のデータは分離点抽出装置6に入れら
れる。FIG. 3 shows the feature amount of the contour point sequence shown in FIG. 2 tb). Here, sections 14, 15, and 17 represent straight sections, and section 16 represents an arc section. The feature amount data calculated by the feature aXX expansion device is input to the separation point extraction device 6.
第2図において直線区間と直線区間を分離する分離点1
6.11は第3図における分離点10b。Separation point 1 that separates straight sections from straight sections in Figure 2
6.11 is the separation point 10b in FIG.
11bに相当しており、分離点10b、llbで特徴量
は山形の形伏をとる。また第2図において直線区間と円
弧区間を発酵する分離点12.13は第3図における分
離点12b、13bK相当しておシ分離点12・:bJ
゛13bで特徴量は円弧区間における特徴量の値と直線
区間における特徴量の値との間の値をとる。11b, and the feature amount takes the shape of a chevron at separation points 10b and llb. In addition, the separation points 12.13 that ferment the straight line section and the circular arc section in Fig. 2 correspond to the separation points 12b and 13bK in Fig. 3, and the separation points 12.:bJ
In step 13b, the feature value takes a value between the value of the feature value in the circular arc section and the value of the feature value in the straight line section.
分離点抽出装置6では、これらの分離点を抽出するため
に分離基準値72. i13を導入する。The separation point extraction device 6 uses separation reference values 72. to extract these separation points. Install i13.
分離基準値12は直線区間と直線区間を分離するために
用い、円弧区間での特徴量よシも大きい値を設定する。The separation reference value 12 is used to separate the straight section from the straight section, and is set to a value larger than the feature amount for the arc section.
分離基準値12以上の特徴量が連続する区間で特徴量が
最大値をとる点を直線区間と直線区間を分離する分離点
として抽出する。この時点列の始点と終点は隣接点とし
て考えることは当然である。A point where the feature value takes the maximum value in an interval where feature quantities having a separation reference value of 12 or more are continuous is extracted as a separation point that separates straight sections from straight sections. Naturally, the starting point and ending point of this point sequence can be considered as adjacent points.
分離基準値13は直線区間と円弧区間を分離するために
用い、直線区間での、特徴量と円弧区間での特徴量との
間の値を設定する。次に%微量と分離基準値13との交
点を求め直線区間と円弧区間を分離する分離点として抽
出する。ただし、直線区間と直線区間を分離する分離点
が抽出されたらその前後にある特徴量と分離基準値13
との交点は分離点として抽出しない。以上のような方法
で%徴童と分離基準値iJ2゜13によシ、分離点が抽
出される。The separation reference value 13 is used to separate the straight line section and the circular arc section, and is set to a value between the feature amount in the straight line section and the feature amount in the circular arc section. Next, the intersection point between the % trace amount and the separation reference value 13 is found and extracted as a separation point that separates the straight line section and the circular arc section. However, once the separation point that separates the straight section from the straight section is extracted, the feature values before and after that point and the separation reference value 13
The intersection point with is not extracted as a separation point. By the method described above, a separation point is extracted based on the percentage change and the separation reference value iJ2°13.
分離点抽出装置6で抽出された分離点の情報は線分近似
装置7に入れられる。線分近似装置7は抽出された分離
点から隣シ合う分離点を両端とする各区間に対し、直線
または円弧の近似図形を発生させる。Information on the separation points extracted by the separation point extraction device 6 is input to the line segment approximation device 7. The line segment approximation device 7 generates an approximate figure of a straight line or a circular arc for each section whose ends are adjacent separation points from the extracted separation point.
区間両端の分離点が分離基準値13と特徴量との交点と
して求められた分離点である場合その区間は円弧区間で
あると判定し、円を表わす式で近似する。それ以外の区
間は直線区間であると判定し、直線を表わす式で近似す
る。If the separation points at both ends of the section are the separation points found as the intersection of the separation reference value 13 and the feature amount, the section is determined to be an arc section and approximated by an equation representing a circle. Other sections are determined to be straight sections and approximated by an equation representing a straight line.
以下同様に第2の入力図形の例を用いて本発明の詳細な
説明する。The present invention will be described in detail below using the example of the second input graphic.
第4図ta)は第2の入力図形の例で輪郭点列のm−を
表わしている。第4図(b)は第4図(a)に示す輪郭
点列の特徴量!を表わしている。分離基準値12.13
を用いて分離点を求めると分離点21b。FIG. 4 ta) is an example of the second input figure and represents the contour point sequence m-. Figure 4(b) is the feature amount of the contour point sequence shown in Figure 4(a)! It represents. Separation standard value 12.13
When the separation point is found using , separation point 21b is obtained.
22b、23bが抽出され、区間24.25゜26は直
線区間として直線の式に近似され、区間27は円弧区間
として円の式に近似される。分離点21において図形輪
郭は直線から円弧へと変化するがその変化が滑らかでは
ないため特徴量は山形の形伏をとなる。また画素22で
は図形輪郭の形伏から特徴tlが0になる。したがって
分離基準値12,13/Cよシ分M点を抽出すると第4
図[b) K示すよ51C輪郭の形伏から判断すると、
本来は分離点でない分離点23bが抽出され、本来円弧
区間の一部である線分26が直線区間とされ直線に近似
される。22b and 23b are extracted, the section 24.25.degree. 26 is approximated as a straight section by the equation of a straight line, and the section 27 is approximated as an arc section by the equation of a circle. At the separation point 21, the figure outline changes from a straight line to a circular arc, but the change is not smooth, so the feature amount takes the shape of a chevron. Further, in the pixel 22, the feature tl becomes 0 due to the shape of the figure outline. Therefore, if you extract the separation standard value 12, 13/C and the separation M point, the fourth
Figure [b] Judging from the shape of the 51C outline as shown in K,
A separation point 23b, which is not originally a separation point, is extracted, and a line segment 26, which is originally a part of an arc section, is made into a straight line section and approximated to a straight line.
線分近似装置7で近似された線分の情報は隣接線分調査
装置8に入れられる。以下線分近似調量の機能の概略を
説明し、その後動作について詳細に説明する。Information about the line segment approximated by the line segment approximation device 7 is input to the adjacent line segment investigation device 8. An outline of the function of the line segment approximation adjustment will be explained below, and then the operation will be explained in detail.
線分近似調査装置では線分近似された線分のうち隣接す
る2つの線分を順番に取シ出し、2つの線分のうち点列
を構成する画素数(以下、構成画素数という)の多い刀
の線分の近似式と、他方の線分の構成画素との近似度(
近似度については後述する)を求め、°その値が基準値
未満であれば2つの線分間の分離点を取シ除き、構成画
素数が多い刀の線分の近似式を新しい線分の近似式とし
て用いる。The line segment approximation investigation device sequentially extracts two adjacent line segments from among the approximated line segments, and calculates the number of pixels that make up a point sequence (hereinafter referred to as the number of constituent pixels) of the two line segments. Approximation formula between the many sword line segments and the constituent pixels of the other line segment (
The degree of approximation will be described later). If the value is less than the standard value, remove the separation point between the two line segments, and use the approximation formula for the sword line segment with a large number of constituent pixels to approximate the new line segment. Used as a formula.
以下第5図を使って線分近似調量の動作を説明する。The operation of line segment approximation adjustment will be explained below using FIG.
第5図(a)K図形の輪郭を構成する点列の一部と抽出
された分離点81.82.83と分離点Bl。FIG. 5(a) Part of the point sequence constituting the outline of the K figure, extracted separation points 81, 82, 83, and separation points Bl.
B2を両端とする点列を近似した近似式m1と、分離点
82.B3を両端とする点列を近似した近似式m2を示
す。An approximation formula m1 that approximates a point sequence with B2 as both ends, and a separation point 82. An approximate expression m2 is shown that approximates a sequence of points with B3 as both ends.
今、隣接線分調査装置でこの2つの線分を取り出したと
する。近似線分mlの構成画素数は近似線分m2の構成
画素数よりも多いので近似−分m1と分離点B2,83
間の点列との距離d1の平均値(以下近似度と呼ぶ)を
求める。近似度が基準値以下であれば分離点1:12.
t33間の点列によシ構成される線分は近似線分mlK
よって近似することができると判定し、2つの線分の間
にある分離点B2を取り除く。また、分離点Bl、B3
を両m、bする新しい線分の近似式には近似式mlを用
いる。Now, assume that these two line segments are extracted using the adjacent line segment investigation device. Since the number of constituent pixels of the approximate line segment ml is greater than the number of constituent pixels of the approximate line segment m2, the approximate line segment m1 and the separation point B2, 83
The average value (hereinafter referred to as the degree of approximation) of the distance d1 to the point sequence between them is calculated. If the degree of approximation is less than the reference value, the separation point is 1:12.
The line segment constructed by the sequence of points between t33 is the approximate line segment mlK
Therefore, it is determined that the approximation is possible, and the separation point B2 between the two line segments is removed. In addition, separation points Bl, B3
The approximation formula ml is used as the approximation formula for a new line segment that makes both m and b.
ただし近似度が基準値以上ならば例もしない。However, if the degree of approximation is greater than the reference value, there will be no such example.
第5図fb)は第5図1a)に示す2つの近似線分とそ
れらの構成画素によシ計算された近似度が基準値以下で
めった時に2つの線分を分離点Bl、B3を両端とする
1つの線分にして、その区間を近似式m1で近似した結
果を表わしている。以上説明した内容から第4図Fa)
に示す入力画像の点列の分離点23は隣接線分装置によ
り取シ除かれ、第5図fb)に示すように分離点20.
21のみが正しい分離点として残る。Figure 5 fb) shows the two approximate line segments shown in Figure 5 1a) and when the degree of approximation calculated by their constituent pixels is rarely below the reference value, the two line segments are separated by a point Bl and B3 at both ends. It represents the result of approximating that section using the approximation formula m1. From the above explanation, Figure 4 Fa)
Separation point 23 of the point sequence of the input image shown in is removed by the adjacent line segmenter, and separation point 20.
Only 21 remains as a correct separation point.
また第2図(b)に示す7Xlの入力図形の分離点は正
しく抽出されているので隣接線分装置装置により分な点
は灰化しない。Furthermore, since the separation points of the 7X1 input figure shown in FIG. 2(b) are correctly extracted, the points that are separated by the adjacent line segmentation apparatus are not ashed.
し発明の効果〕
本発明の近似図形発生装置は輪郭点列f−タ作成装置と
、分離点抽出装置と隣接線分装置装置とを設けることに
より図形外周の情報が電装である面図形の輪郭の特徴を
解析できるとともに分離基準点11,12を設けて分に
よ点を抽出するので、角区間と円弧区間の区別をするた
めに区間の各点列の特徴音の分散を求めることや、隣接
する区間を角点まで蝙長する必要がなく、直線区間と円
弧区間の分離が簡単にでき、また直線区間から円弧区間
へ急激に変化する部分で余分に検出される分離点を取り
除くことによシ、正しい分離点を求めることがでさると
いう効果がある。[Effects of the Invention] The approximate figure generating device of the present invention is provided with a contour point sequence f-tater creating device, a separation point extracting device, and an adjacent line segment device, so that information on the outer periphery of the figure can be used to generate the contour of a surface figure that is electrical equipment. Since it is possible to analyze the characteristics of the area, and to extract the points by minute by setting the separation reference points 11 and 12, it is possible to calculate the variance of the characteristic sound of each point sequence of the section in order to distinguish between the corner section and the arc section. There is no need to extend adjacent sections to the corner points, making it easy to separate straight sections and arc sections, and to eliminate excessive separation points that are detected in sections where there is a sudden change from a straight section to an arc section. This has the effect of making it possible to find the correct separation point.
第1図は本発明の一夾施例を示すブロック図、第2図f
a)は入力図形の第1の例を表わす図、第2図(b)は
第2図(a)に示す入力図形の輪郭点列を表わす図、第
3図は第2図tblの輪郭点列の特徴音と分離点検出の
説明図、第4図(a)は入力図形の第2の例の輪郭点列
の一部を表わす図、巣4図(blは第4図(a)に示す
点列の特徴音と分離点検出の説明図、第4図1c)は第
4図12)に示す一分の隣接線分調食後の分離点の説明
図、第5図(a)は隣接線分装置装置の動作の説明図、
第5図ib)は第5図(a)に示す線分の隣接線分調食
後の分i点の説明図、第6図は従来の一例を示すプロッ
クーー第71.第8図は第6図における特徴音を説明す
るグラフである。
■・・・・・・画像入力装置、2・・・・・・二値化装
置、3・・・・・・輪郭点列データ作成装置、4・・・
・・・記憶装置、5・・・・・・荷徴澁鼻出装置、6・
・・・・・分離点検出装置、7・・・・・・線分近似装
置、8・・・・・・隣接線分y4食装置、10〜↓3・
・・・・・分離点、10′〜13′・・・・・・分離点
、14.15.17・・・・・・直線区間、16・・・
・・・円弧区間、20.21.23・・・・・・分離点
、20’ 、21’。
23′・・・・・・分離点、22.22’・・・・・・
籍徴璽が0になる画素、24〜26・・・・・・直線区
間、27・・・・・・円弧区間、30・・・・・・画像
入力装置、31.33・・・・・・記憶装置、32・・
・・・・点列データ作成装置、34・・・・・・特9に
算出装置、35・・・・・・特徴量解析装置、36・・
・・・・図形データ作成装置、40・・・・・・層目画
素、41・・・・・・特徴社、42・・・・・・線分、
50.52・・・・・・直煉区間、51・・・・・・角
区間、53・・・・・・円弧区間、54.55・・・・
・・最終的直線区間、56・・・・・・R終曲円弧区間
。
伏FF人弁理士内厚 音
/θ〜13・・ヌ端IL薇。
(a)(幻
第2 図
/4.15./7−47群2閘
)乙−−IFI5ρ−区閂
1bQ〜13トー冷り櫨。
ノ2.ノ3−−−今虜咋糾青匡
第3 図
(αン
(呑)
第47
も
j
(α)
櫓S ゾ
第 7 則Fig. 1 is a block diagram showing one embodiment of the present invention, Fig. 2 f
a) is a diagram showing the first example of the input figure, FIG. 2(b) is a diagram showing the contour point sequence of the input figure shown in FIG. 2(a), and FIG. 3 is a diagram showing the contour points of FIG. 2 tbl. An explanatory diagram of the characteristic sound of the sequence and separation point detection, Fig. 4 (a) is a diagram showing a part of the contour point sequence of the second example of the input figure, and Fig. 4 (bl is in Fig. 4 (a) Fig. 4 (1c) is an explanatory diagram of the separation point detection after adjusting the adjacent line segment of 1 minute shown in Fig. 4 (12), and Fig. 5 (a) is an explanatory diagram of the characteristic sound of the point sequence shown and the separation point detection. An explanatory diagram of the operation of the line segment device,
FIG. 5 ib) is an explanatory diagram of the point i after preparing the adjacent line segment shown in FIG. 5(a), and FIG. FIG. 8 is a graph explaining the characteristic sounds in FIG. 6. ■... Image input device, 2... Binarization device, 3... Contour point sequence data creation device, 4...
...Storage device, 5...Cargo storage device, 6.
... Separation point detection device, 7 ... Line segment approximation device, 8 ... Adjacent line segment y4 eclipse device, 10 ~ ↓ 3.
... Separation point, 10'-13' ... Separation point, 14.15.17 ... Straight section, 16...
...Arc section, 20.21.23...Separation point, 20', 21'. 23'... Separation point, 22.22'...
Pixels where the flag becomes 0, 24-26... Straight section, 27... Arc section, 30... Image input device, 31.33...・Storage device, 32...
...Point sequence data creation device, 34...Particularly 9 calculation device, 35...Feature amount analysis device, 36...
...Graphic data creation device, 40...Layer pixel, 41...Jikisha, 42...Line segment,
50.52... Direct cultivation section, 51... Corner section, 53... Arc section, 54.55...
...Final straight section, 56...R final arc section. Atsushi Uchi, FF Patent Attorney Sound/θ ~ 13... Nu end IL rose. (a) (Illusion 2nd figure/4.15./7-47 group 2 lock) Otsu--IFI5ρ-ku lock 1bQ~13 Tohrigashi. No2.ノ3 --- Now a prisoner of war Seikatsu 3rd figure (αn (drinking) 47th Moj (α) Yagura S Zo 7th rule
Claims (1)
を二値化するための二値化装置と、二値化された画像の
輪郭を点列のつながりとして取り出す輪郭点列データ作
成装置と、作成された輪郭点列データを記憶するための
記憶装置と、記憶された輪郭点列データを直線区間、円
弧区間に分離するために用いる特徴量を算出する特徴量
算出装置と、算出された特徴量から直線区間と円弧区間
を分離するための分離点を抽出する分離点抽出装置と、
抽出された分離点から分離点と分離点の間の区間に対し
直線または円弧の近似図形を発生させる線分近似装置と
、隣接する線分を取り出し同一線分であると判定したら
分離点を取り除き1つの線分とする隣接線分調査装置と
を含むことを特徴とする近似図形発生装置。An image input device for inputting an image, a binarization device for binarizing the input image, and a contour point sequence data creation device for extracting the contour of the binarized image as a series of points. , a storage device for storing the created contour point sequence data, a feature calculation device for calculating a feature used to separate the stored contour point sequence data into a straight line section and a circular arc section, a separation point extraction device that extracts separation points for separating straight sections and circular arc sections from feature quantities;
A line segment approximation device generates an approximate figure of a straight line or an arc for the section between the extracted separation points, and extracts adjacent line segments and removes the separation points if they are determined to be the same line segment. 1. An approximate figure generator comprising: an apparatus for investigating adjacent line segments that are treated as one line segment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP27970987A JPH01120680A (en) | 1987-11-04 | 1987-11-04 | Approximate pattern generating device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP27970987A JPH01120680A (en) | 1987-11-04 | 1987-11-04 | Approximate pattern generating device |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH01120680A true JPH01120680A (en) | 1989-05-12 |
Family
ID=17614783
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP27970987A Pending JPH01120680A (en) | 1987-11-04 | 1987-11-04 | Approximate pattern generating device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH01120680A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0737968A (en) * | 1993-07-22 | 1995-02-07 | Nec Corp | Method and apparatus for calculating orientation for positioning wafer |
JPH08255259A (en) * | 1994-08-12 | 1996-10-01 | Dassault Syst Of America | Computerized plotting method |
-
1987
- 1987-11-04 JP JP27970987A patent/JPH01120680A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0737968A (en) * | 1993-07-22 | 1995-02-07 | Nec Corp | Method and apparatus for calculating orientation for positioning wafer |
JPH08255259A (en) * | 1994-08-12 | 1996-10-01 | Dassault Syst Of America | Computerized plotting method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111815602B (en) | Building PDF drawing wall identification device and method based on deep learning and morphology | |
JPH05500874A (en) | Polygon-based method for automatic extraction of selected text in digitized documents | |
US5222158A (en) | Pattern recognition apparatus | |
US5889889A (en) | Method and apparatus for machine recognition of handwritten symbols from stroke-parameter data | |
CN112949707B (en) | Cross-modal face image generation method based on multi-scale semantic information supervision | |
CN115345790A (en) | Ground penetrating radar image enhancement method based on window self-attention neural network | |
CN115270184A (en) | Video desensitization method, vehicle video desensitization method and vehicle-mounted processing system | |
JPH01120680A (en) | Approximate pattern generating device | |
CN111933154A (en) | Method and device for identifying counterfeit voice and computer readable storage medium | |
Kim et al. | Recognition of logic diagrams by identifying loops and rectilinear polylines | |
CN110825896A (en) | Trademark retrieval system and method | |
CN111444834A (en) | Image text line detection method, device, equipment and storage medium | |
CN116051813A (en) | Full-automatic intelligent lumbar vertebra positioning and identifying method and application | |
CN115641344A (en) | Method for segmenting optic disc image in fundus image | |
CN114399681A (en) | Electric power energy equipment identification method and device and terminal equipment | |
CN112348112B (en) | Training method and training device for image recognition model and terminal equipment | |
CN113379637A (en) | Image restoration method, system, medium, and device based on progressive learning strategy | |
CN112419208A (en) | Construction drawing review-based vector drawing compiling method and system | |
Naouai et al. | Line recognition algorithm using constrained delaunay triangulation | |
CN116898439B (en) | Emotion recognition method and system for analyzing brain waves by deep learning model | |
Kaddoura | Real-world applications | |
CN113705430B (en) | Form detection method, device, equipment and storage medium based on detection model | |
CN113971745B (en) | Method and device for identifying entry-exit check stamp based on deep neural network | |
KR20230080224A (en) | Occlusion Image Making Method for Artificial Intelligence Learning | |
CN109410291B (en) | Processing method and device for burr type pen segments |