JPH01295376A - Linear approximation processing system for line pattern - Google Patents

Linear approximation processing system for line pattern

Info

Publication number
JPH01295376A
JPH01295376A JP12507488A JP12507488A JPH01295376A JP H01295376 A JPH01295376 A JP H01295376A JP 12507488 A JP12507488 A JP 12507488A JP 12507488 A JP12507488 A JP 12507488A JP H01295376 A JPH01295376 A JP H01295376A
Authority
JP
Japan
Prior art keywords
displacement
linear approximation
parameter
thd
error value
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
Application number
JP12507488A
Other languages
Japanese (ja)
Inventor
Satoshi Ouchi
敏 大内
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP12507488A priority Critical patent/JPH01295376A/en
Publication of JPH01295376A publication Critical patent/JPH01295376A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To freely set a parameter in case a line pattern is evaluated by its curvature and displacement for execution of the linear approximation by changing the displacement error value in response to the linear segment length and deciding the presence or absence of a feature point based on the result of comparison between said displacement and error value. CONSTITUTION:When the linear approximation is applied to a line pattern, the comparison is carried out between the displacement (d) of the original data from an approximate straight line and a parameter (Thd) as well as the inter- feature point distance (l) and a parameter (Thl) for decision of the presence or absence of a feature point. In other words, an evaluation parameter required for the visually preferable linear approximation is set by changing the error value (Thd) of the displacement (d) in accordance with the linear segment length (l). Then the presence or absence of a feature point is decided by comparing the displacement (d) with the value (Thd). Thus a parameter having a large freedom degree can be set in case a line pattern obtained from extraction of contours in a picture processing job is evaluated by the curvature and the displacement of said pattern for execution of the linear approximation.

Description

【発明の詳細な説明】 〔技術分野〕 本発明は、画像処理の一つである輪郭線抽出などにより
得られる線図形を曲率と変位で評価し、折れ線で近似す
るようにした線図形の直線近似処理方式に関する。
[Detailed Description of the Invention] [Technical Field] The present invention relates to a straight line of a line figure obtained by contour extraction, which is a type of image processing, which is approximated by a polygonal line by evaluating the line figure in terms of curvature and displacement. Concerning approximation processing methods.

〔従来技術〕[Prior art]

従来、画像の輪郭線抽出などで得られる線図形の形状近
似法として、情報処理学会研究資料、グラフィックスと
CAD、26−5 (1987)に掲載の(青白、河越
:“原図形の視覚的特徴を保持する線分近似法”)が知
られている。
Conventionally, as a shape approximation method for line figures obtained by image contour extraction, etc., there has been a A line segment approximation method that preserves features is known.

上記の直線近似法においては、大まかな部分は粗くまた
細かな部分は細かく近似する方法として、近似の評価の
基準に曲率の近似R(=d/f)と変位D (=d)を
基本とすることが開示されている。
In the above straight line approximation method, the rough parts are roughly approximated and the fine parts are approximated finely, and the criteria for approximation evaluation are basically the curvature approximation R (=d/f) and the displacement D (=d). It is disclosed that

しかし、上記の曲率の近似Rを固定のしきい値で判断す
ると、角の目立ち具合を大きさに単純に比例させたくな
いような場合、例えば第2図(a)中のPlと同図(b
)中のP2で角の目立ち具合に差をつけたい場合には対
処できないものである。
However, if the above-mentioned curvature approximation R is judged using a fixed threshold value, in cases where it is not desired to make the conspicuousness of the corner simply proportional to the size, for example, Pl in Fig. 2(a) and the same figure ( b
) If you want to make a difference in the conspicuousness of the corners with P2 in the middle, this cannot be done.

以下に、上記した従来における図形の複雑さに応じた直
線近似、すなわち大まかな部分は粗く、細かな部分は細
かく直線近似する方法について説明する。
The following describes the conventional method of linear approximation according to the complexity of a figure, that is, the method of linearly approximating rough parts coarsely and finely making fine parts.

この場合の直線近似に対するアルゴリズムは3ステツプ
からなるが、以下に各ステップを順を追って説明する。
The algorithm for linear approximation in this case consists of three steps, and each step will be explained below in order.

(1)  ステップ1 第3図に示す格子上の点からなる点列(P、)を順に結
んだ時の折れ点および始点、終点を求める(図中の○印
)。
(1) Step 1 Find the bending point, starting point, and ending point when sequentially connecting the point sequence (P,) consisting of points on the grid shown in Fig. 3 (○ marks in the figure).

なお、求まった点列(Q、)を順に結んでできる線分の
方向は、図中に示す8方向のいずれかである。
Note that the direction of the line segment formed by sequentially connecting the determined point sequence (Q,) is one of the eight directions shown in the figure.

(2)  ステップ2 上記したステップlで得られる格子上の点列から、直線
をディジタイズした場合に現われるパターンを見つけて
直線のあてほめを行ない、点列杏圧縮する。
(2) Step 2 From the point sequence on the grid obtained in step 1 above, find a pattern that appears when a straight line is digitized, fit the straight line, and compress the point sequence.

第4図は直線とみなせる点列パターンの例を示しており
、咳点列は次の条件を満たしている時に直線上のものと
みなされる。
FIG. 4 shows an example of a point sequence pattern that can be regarded as a straight line, and a cough point sequence is considered to be on a straight line when it satisfies the following conditions.

Iso 1<2   ORIsI  1<まただし、(
SO+Sz)または(Is、)l≧2△ IS、1≧2
)の場合は、P、、P、02点のみ直線上のものとみな
される。
Iso 1<2 ORIsI 1<Madashi, (
SO+Sz) or (Is,)l≧2△ IS, 1≧2
), only P,,P,02 points are considered to be on the straight line.

(3)ステップ3 上記したステップ2の結果から、最終的な近似直線を求
める。この時の評価の基準としては、第5図に示す誤差
算定要素、すなわち曲率の近似R(=d/f)と変位D
(=d)を基本として用いる。
(3) Step 3 From the results of step 2 above, find the final approximate straight line. The criteria for evaluation at this time are the error calculation elements shown in Figure 5, namely the approximation R of curvature (=d/f) and the displacement D.
(=d) is used as a basis.

なお、P、を始点とする最大近僚直線PtPt=を求め
るには、その間の全点Pjに対して(Rj≦T、+)△
(Ω、≦’b)(T+、b:Lきい値)が成り立ち、か
つ線分PiPk*1に対しては成り立たないPkを求め
ればよい。
In addition, to find the maximum neighbor straight line PtPt= with P as the starting point, (Rj≦T, +)△ for all points Pj between them.
It is sufficient to find Pk for which (Ω, ≦′b) (T+, b: L threshold) holds and does not hold for the line segment PiPk*1.

上記した直線近似の評価の基準に、曲率の近似Rと変位
りを基本として用いる方法は、原データに対する分割型
の直線近似にも応用することができる。
The method of using the curvature approximation R and displacement as the criteria for evaluating the linear approximation described above can also be applied to the divided linear approximation to the original data.

以下に、例として第6図を参照して反復端点あてはめ法
(区分的直線近似法)で説明する。なお、図中の○印は
点列中の各点を示している。
In the following, an iterative endpoint fitting method (piecewise linear approximation method) will be explained with reference to FIG. 6 as an example. Note that the ○ marks in the figure indicate each point in the series of points.

(1)ステップ1 まず、同図(a)に示すように、点列(点セグメント)
の両端の点を仮想的に直線線分で結び、該直線線分から
最も離れた点(分割点)を見つけ、その最大距離d(図
示のdo)が誤差値Thdより大きければ、または上記
の仮想的な直線線分長!(図示の20)と最大距離dの
比d/2(図示の場合はd、 /12゜)が誤差値Th
dより大きければ、上記の分割点で同図(b)に示すよ
うに2つの直線線分に分割する。
(1) Step 1 First, as shown in (a) of the same figure, a point sequence (point segment)
Virtually connect the points at both ends of with a straight line segment, find the point (dividing point) farthest from the straight line segment, and if the maximum distance d (do in the figure) is greater than the error value Thd, or the above hypothetical Straight line segment length! The ratio d/2 (d, /12° in the case shown) of the maximum distance d (20 in the figure) is the error value Th
If it is larger than d, it is divided into two straight line segments at the above dividing point as shown in FIG.

なお、上記したいずれでもない場合は、この処理におけ
るアルゴリズムを終了する。     ′(2)ステッ
プ2 次に、分割した各々の直線線分に対して、上記したステ
ップ1と同様の手順を用いて分割を繰り返し行なってい
き、同図(C) 、 (d)に示す直線線分に分割する
Note that if it is neither of the above, the algorithm in this process is terminated. '(2) Step 2 Next, the same procedure as in Step 1 above is repeated for each divided straight line segment, and the straight lines shown in (C) and (d) are obtained. Divide into line segments.

(3)ステップ3 上記したアルゴリズムにより分割されたいずれの直線線
分に対しても、上記した最大距離dがしきい値Th、よ
りも小さくなった時点で分割操作を停止し、各々の分割
点で結ばれた直線を求める線図形としてアルゴリズムを
終了する。
(3) Step 3 For any straight line segment divided by the above algorithm, the division operation is stopped when the maximum distance d described above becomes smaller than the threshold value Th, and each division point is The algorithm ends as a line figure to find straight lines connected by .

なお、上記したアルゴリズムにおいて、閉ループの場合
にはl=0となるため、例えば最低1回は分割するなど
の工夫が必要となる。
Note that in the above-mentioned algorithm, in the case of a closed loop, l=0, so it is necessary to take measures such as dividing at least once, for example.

しかしながら、上記した直線近似方法における特徴点の
条件域は、第7図(a)に示す斜線部であり、この境界
を近似結果の視覚的な好みなどの都合により任意の形状
としたい場合、例えば境界点の条件域を同図(b)に示
す斜線部のようにしたい場合は対処できないといった問
題があった。
However, the conditional area of the feature points in the above-mentioned linear approximation method is the shaded area shown in FIG. There is a problem in that this cannot be done when it is desired to make the conditional area of the boundary point as shown in the shaded area shown in FIG. 2(b).

〔目 的〕〔the purpose〕

本発明は、上記した従来における問題を解消するために
なされたもので、画像処理における輪郭線抽出などで得
られる線図形を、曲率と変位で評価して直線近似を行な
う場合に、自由度の大きいパラメータの設定ができるよ
うにした線図形の直線近似処理方式を提供することを目
的とする。
The present invention was made in order to solve the above-mentioned conventional problems, and when a line figure obtained by contour extraction etc. in image processing is evaluated in terms of curvature and displacement and linear approximation is performed, the degree of freedom is reduced. It is an object of the present invention to provide a linear approximation processing method for line figures that allows setting of large parameters.

〔構 成〕〔composition〕

本発明は上記の目的を達成させるために、線図形を直線
近似するに際して、特徴点か否かの判断を近似直線に対
する原データの変位dとパラメータThdとの比較と、
特徴点間の距離2とパラメータThfとの比較に基づい
て行なうようにしたことを特徴とするものである。
In order to achieve the above object, the present invention, when linearly approximating a line figure, determines whether or not it is a feature point by comparing the displacement d of the original data with respect to the approximate straight line and the parameter Thd,
This is characterized in that it is performed based on a comparison between the distance 2 between feature points and the parameter Thf.

以下、本発明の実施例に基づいて具体的に説明する。Hereinafter, the present invention will be specifically explained based on examples.

本発明における視覚的に好ましい直線近似のための評価
パラメータは、前述の第6図中に示した直線線分長lに
対応して変位dの誤差値Thdを変化させることにより
設定される。
The evaluation parameters for the visually preferable linear approximation in the present invention are set by changing the error value Thd of the displacement d in accordance with the straight line segment length l shown in FIG. 6 described above.

このことを、式で記述すると、 if  1=tx  then  Thd=β  (1
)のように表わされる。そして、上記した変位dと誤差
値Thdとを比較することにより、特徴点か否かが決定
される。
To describe this using the formula, if 1=tx then Thd=β (1
). Then, by comparing the above-mentioned displacement d and the error value Thd, it is determined whether the point is a feature point or not.

以下に、この場合の具体的な実施方法について説明する
A specific implementation method in this case will be described below.

例えば、画素数が512X512からなる入力画を対象
とし、該入力画に対する4方向の追跡処理に基づいて輪
郭線を抽出した場合は、直線線分長lのとりうる整数の
種類はたかだか1024種類である。これに基づいて、
上記の直線線分長2の入力に対し、誤差値Thdを出力
するルックアップテーブル(LUT)を作成する。
For example, if an input image with a pixel count of 512 x 512 is used and a contour is extracted based on tracking processing in four directions for the input image, there are at most 1024 types of integers that the straight line segment length l can take. be. Based on this,
A look-up table (LUT) is created that outputs the error value Thd for the input of the straight line segment length 2 described above.

また、直線線分長lに対する誤差値Thff1と、変位
dに対する誤差値Thdとの関係が簡単な関数であれば
、下式に基づく計算により上記の誤差値Thdを算出す
る。
Further, if the relationship between the error value Thff1 with respect to the straight line segment length l and the error value Thd with respect to the displacement d is a simple function, the above error value Thd is calculated by calculation based on the following formula.

例えば、上記した誤差値ThfとThdに比例関係をも
たせたければ、 Thd=kX/! (kはある定数)(2)とする。
For example, if you want the above error values Thf and Thd to have a proportional relationship, Thd=kX/! (k is a certain constant) (2).

而して、第1図は本発明における直線近似処理方式のフ
ローチャートであり、以下に各ステップについて説明す
る。
FIG. 1 is a flowchart of the linear approximation processing method according to the present invention, and each step will be explained below.

まず、ステップS、において、対象とする入力画に対す
る輪郭線追跡処理に基づく、輪郭線追跡後の(X 、 
Y)座標列で記述された点列データをもとにして、咳点
列データが閉ループであるか否かの判断が行なわれる。
First, in step S, after contour tracing (X,
Y) Based on the point sequence data described in a coordinate sequence, it is determined whether the cough point sequence data is a closed loop.

そして、このステップS1で閉ループでないと判断され
た場合はステップS、に移行し、閉ループであると判断
された場合はステップS2に移行する。
If it is determined in step S1 that the loop is not closed, the process moves to step S, and if it is determined that the loop is closed, the process moves to step S2.

そして、閉ループである場合はステップS2において、
上記した点列データは始点(終点)から最も離れた点で
分割される。なお、このステップS2における分割処理
は、閉ループである場合の直線線分長!が0となること
に基づく、最低1回の分割を行なうための処理である。
If the loop is closed, in step S2,
The above point sequence data is divided at the point farthest from the starting point (end point). Note that the division process in step S2 is based on the straight line segment length in the case of a closed loop! This is a process for performing division at least once based on the fact that 0 becomes 0.

次に、ステップS3において、各セグメントに対して前
述したルックアップテーブル(LUT)から誤差値Th
dを求めるとともに、引き続きステップS4において、
各セグメントに対する最大距離dを求める。
Next, in step S3, the error value Th is calculated from the lookup table (LUT) described above for each segment.
While determining d, in step S4,
Find the maximum distance d for each segment.

続いて、ステップS、において、各セグメントに対して
の上記のステップS、およびS4で求めた最大距離dと
誤差値Thdとの大小関係が判断される。このステップ
Ssにおいて、最大距離dが誤差値Thdよりも大きい
と判断された場合は、ステップS、において注目のセグ
メントを分割した後に、上記したステップS、に戻る。
Subsequently, in step S, the magnitude relationship between the maximum distance d obtained in step S and S4 described above for each segment and the error value Thd is determined. If it is determined in step Ss that the maximum distance d is greater than the error value Thd, the segment of interest is divided in step S, and then the process returns to step S described above.

また、ステップS、において、最大距離dが誤差値Th
dより小さいと判断された場合は、注目のセグメントを
分割することなくステップS、に移行する。
Further, in step S, the maximum distance d is the error value Th
If it is determined that the segment size is smaller than d, the process moves to step S without dividing the segment of interest.

そして、ステップS7において点列データに対する終了
判定を行ない、まだ途中であればステップS1に戻って
上記した各ステップにおける処理を再開する。また、す
べての点列データに対する処理が終了したと判断された
時点でステップS8に移行し、このステップS、におい
て分割点を結ぶことにより、一連の直線近似処理を終了
する。
Then, in step S7, it is determined whether the point sequence data is finished or not, and if it is still in progress, the process returns to step S1 and restarts the processing in each step described above. Further, when it is determined that the processing for all point sequence data has been completed, the process moves to step S8, and in step S, the dividing points are connected, thereby completing the series of linear approximation processing.

〔効 果〕〔effect〕

以上説明した本発明によれば、直線線分長2に対応して
変位dの誤差値Thdを変化させ、該変位と誤差値Th
dとの比較に基づいて特徴点か否かを判断するようにし
たので、線図形を曲率と変位で評価して直線近似を行な
う場合において、パラメータの設定が自由にできるとと
もに、視覚的に好ましい直線近似結果を得ることができ
る。
According to the present invention described above, the error value Thd of the displacement d is changed corresponding to the straight line segment length 2, and the error value Thd of the displacement d and the error value Th
Since it is decided whether it is a feature point or not based on the comparison with Linear approximation results can be obtained.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明による直線近似処理方式における処理手
順を示すフローチャート、 第2図は従来の直線近似法における不都合を説明するた
めの図、 第3図は従来の直線近似法における格子上点列の折れ点
を示す図、 第4図は従来の直線近似法における直線とみなせる点列
パターンの例を示す図、 第5図は従来の直線近似法における誤差算定要素を示す
図、 第6図は従来における反復端点あてはめ法による折れ線
近似を説明するための図、 第7図は従来の直線近似法における特徴点の条件域を示
す図である。 第1図 (G)            (b)Pl 0α〜Q
J 第3図 (a)               (C)(b) 
             (d)第6図 (G)                (b)第7図
Fig. 1 is a flowchart showing the processing procedure in the linear approximation processing method according to the present invention, Fig. 2 is a diagram for explaining disadvantages in the conventional linear approximation method, and Fig. 3 is a grid point sequence in the conventional linear approximation method. Figure 4 is a diagram showing an example of a point sequence pattern that can be regarded as a straight line in the conventional linear approximation method, Figure 5 is a diagram showing error calculation elements in the conventional linear approximation method, and Figure 6 is a diagram showing the error calculation elements in the conventional linear approximation method. FIG. 7 is a diagram for explaining polygonal line approximation using the conventional iterative endpoint fitting method. FIG. 7 is a diagram showing the conditional range of feature points in the conventional linear approximation method. Figure 1 (G) (b) Pl 0α~Q
J Figure 3 (a) (C) (b)
(d) Figure 6 (G) (b) Figure 7

Claims (4)

【特許請求の範囲】[Claims] (1)線図形を曲率と変位で評価して直線近似するよう
にした直線近似処理において、 特徴点か否かの判断を、近似直線に対する原データの変
位(d)と該変位に対する誤差値であるパラメータ(T
hd)との比較と、特徴点間の距離(1)と該距離に対
する誤差値であるパラメータ(Thl)との比較に基づ
いて行なうようにしたことを特徴とする線図形の直線近
似処理方式。
(1) In the linear approximation process in which a line figure is approximated by a straight line by evaluating it using curvature and displacement, the determination of whether or not it is a feature point is based on the displacement (d) of the original data with respect to the approximate straight line and the error value for this displacement. A certain parameter (T
hd) and a distance (1) between feature points and a parameter (Thl) that is an error value for the distance.
(2)上記のパラメータ(Thd)とパラメータ(Th
l)との間に特定の関係をもたせることを特徴とする請
求項(1)記載の線図形の直線近似処理方式。
(2) The above parameter (Thd) and the parameter (Th
1) A linear approximation processing method for a line figure according to claim 1, characterized in that a specific relationship is established between the line figure and the line shape.
(3)上記のパラメータ(Thd)が大なる時にパラメ
ータ(Thl)が大なる関係を有することを特徴とする
請求項(2)記載の線図形の直線近似処理方式。
(3) The linear approximation processing method for line figures according to claim (2), characterized in that when the parameter (Thd) becomes large, the parameter (Thl) has a large relationship.
(4)上記のパラメータ(Thd)とパラメータ(Th
l)が比例関係を有することを特徴とする請求項(3)
記載の線図形の直線近似処理方式。
(4) The above parameter (Thd) and the parameter (Th
Claim (3) characterized in that l) has a proportional relationship.
Linear approximation processing method for the described line figure.
JP12507488A 1988-05-24 1988-05-24 Linear approximation processing system for line pattern Pending JPH01295376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12507488A JPH01295376A (en) 1988-05-24 1988-05-24 Linear approximation processing system for line pattern

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12507488A JPH01295376A (en) 1988-05-24 1988-05-24 Linear approximation processing system for line pattern

Publications (1)

Publication Number Publication Date
JPH01295376A true JPH01295376A (en) 1989-11-29

Family

ID=14901178

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12507488A Pending JPH01295376A (en) 1988-05-24 1988-05-24 Linear approximation processing system for line pattern

Country Status (1)

Country Link
JP (1) JPH01295376A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7068821B2 (en) 2001-01-29 2006-06-27 Canon Kabushiki Kaisha Information processing method and apparatus
JP2020016952A (en) * 2018-07-23 2020-01-30 株式会社デンソーテン Image processing apparatus and image processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7068821B2 (en) 2001-01-29 2006-06-27 Canon Kabushiki Kaisha Information processing method and apparatus
JP2020016952A (en) * 2018-07-23 2020-01-30 株式会社デンソーテン Image processing apparatus and image processing method

Similar Documents

Publication Publication Date Title
JPH02162475A (en) Picture contour correcting method
US8068122B2 (en) Method of image scaling
CN110689492B (en) Image edge smoothing method and device
JPH0820725B2 (en) How to create image contour data
CN108492263B (en) Lens radial distortion correction method
JP2001519065A (en) Method and apparatus for changing the color of an image
Perrin et al. Rethinking classical internal forces for active contour models
JPH11345319A (en) Method for removing shade of picture, picture processor and recording medium
CN113781642A (en) Three-dimensional model multi-level LOD generation method based on face reduction algorithm
JPH01295376A (en) Linear approximation processing system for line pattern
JP3826412B2 (en) Edge detection method and edge detection apparatus
CN110766117B (en) Two-dimensional code generation method and system
JP2003216959A (en) Method, device and program for extracting outline
US6486878B1 (en) Method for detecting incorrectly oriented lofted solids in a solid modeling system
US6760022B1 (en) Simple soft creases for subdivision surfaces
JPH07334648A (en) Method and device for processing image
CN111862017A (en) Human body nonlinear transformation algorithm based on skeleton extraction
JPS61115174A (en) Picture data processing method
CN110363708B (en) Image processing method and device for improving interpolation effect in oblique line direction
CN110349089B (en) Image processing method and device for improving linear interpolation effect
Amintoosi et al. Precise image registration with structural similarity error measurement applied to superresolution
JPH06251148A (en) Outline extracting method
JPH06100906B2 (en) Character processing method
JPH08329253A (en) Method and device for detecting edge
JPH0683962A (en) Picture recognizing method