JPH0434668A - Image processor - Google Patents
Image processorInfo
- Publication number
- JPH0434668A JPH0434668A JP13957390A JP13957390A JPH0434668A JP H0434668 A JPH0434668 A JP H0434668A JP 13957390 A JP13957390 A JP 13957390A JP 13957390 A JP13957390 A JP 13957390A JP H0434668 A JPH0434668 A JP H0434668A
- Authority
- JP
- Japan
- Prior art keywords
- line
- approximate
- straight line
- contour
- line segment
- 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
Links
- 238000007493 shaping process Methods 0.000 claims abstract description 10
- 238000000034 method Methods 0.000 description 27
- 230000000875 corresponding effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 150000001768 cations Chemical class 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000006866 deterioration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明は、図面読取装置等において画像入力された図面
を認識処理する際の入力画像の近似線分図形を精度良く
求めることのできる画像処理装置に関する。Detailed Description of the Invention (Industrial Application Field) The present invention relates to image processing that can accurately obtain approximate line segment figures of an input image when performing recognition processing on a drawing input as an image in a drawing reading device or the like. Regarding equipment.
(従来の技術)
近時、地図や施設管理図等の各種図面を画像入力し、そ
の入力画像中の文字・シンボル・線分を認識処理してデ
ータ入力する図面読取装置が種々開発されている。この
種の図面読取装置において入力画像中の文字・シンボル
・線分等の図面構成要素を高性能に認識する上で、図面
中の各種線情報を如何にして精度良く検出するかが重要
な課題となる。(Prior Art) Recently, various drawing reading devices have been developed that input images of various drawings such as maps and facility management charts, recognize characters, symbols, and line segments in the input images, and input data. . In order for this type of drawing reading device to recognize drawing components such as characters, symbols, and line segments in input images with high performance, an important issue is how to accurately detect various line information in drawings. becomes.
従来、この種の図面中の図形領域における直線を検出す
る代表的な手法としては、例えば次のような報告がなさ
れている。その1つは、図面中の図形領域を細線化処理
し、これによって求められた細線を折れ線近似すること
により図面中の直線を検出する手法である。然し乍ら、
細線化処理におけるノイズの為、精度の良い近似直線が
得られないと云う欠点がある。Conventionally, the following reports have been made as typical methods for detecting straight lines in graphic areas in drawings of this type. One of them is a method of detecting straight lines in a drawing by thinning a graphic area in the drawing and approximating the resulting thin line to a polygonal line. However,
The drawback is that a highly accurate approximate straight line cannot be obtained due to noise in the line thinning process.
一方、図形領域の連結黒画素領域の輪郭を折れ線近似し
、これらの輪郭線の平行線ベアを求めることによって、
図面中の線分の中心線(芯線)を求めることでその近似
直線を得る手法がある。しかしこの手法にあっては、次
のような原因により高精度な近似直線が得られないと云
う問題がある。On the other hand, by approximating the outline of the connected black pixel area of the figure area with polygonal lines and finding parallel line bears of these outlines,
There is a method of obtaining an approximate straight line by finding the center line (core line) of a line segment in a drawing. However, this method has a problem in that highly accurate approximate straight lines cannot be obtained due to the following reasons.
即ち、図面中における図形領域の近似直線(芯線)は、
折れ線近似された輪郭線に基づいて求められるので、芯
線の精度が輪郭線近似の精度に大きく依存してしまうと
云う問題がある。しかも輪郭線を折れ線近似する場合、
一般的にはその線分の端点を曲率の変化点上で求めるた
め、1点(1画素ブずれただけで、その近似直線の精度
が大きく変化すると云う不具合がある。また、例えば直
線の交差部のような曲率変化の大きい場所では、入力画
像の2値化の際のノイズの影響を受は易い為、輪郭線の
形状自体が正確でないと云う問題がある。In other words, the approximate straight line (core line) of the graphic area in the drawing is
Since it is determined based on a contour line approximated by a polygonal line, there is a problem in that the accuracy of the core line greatly depends on the accuracy of the contour line approximation. Moreover, when approximating the contour line to a polygonal line,
Generally, the end point of the line segment is found on the point of change of curvature, so there is a problem that the accuracy of the approximate straight line changes greatly even if there is a shift of just one point (one pixel). In a place where the curvature changes greatly, such as a part, the shape of the contour line itself is not accurate because it is easily affected by noise during binarization of the input image.
更には図面中において、例えば直線の片側に文字列が接
触する場合など、必ずしも輪郭の近似直線の平行線ペア
が得られない場合が多々生じる。Furthermore, in drawings, there are many cases where a parallel line pair of straight lines approximating the outline cannot necessarily be obtained, for example, when a character string touches one side of a straight line.
このような場合には、線分としての認識自体ができなく
なるので、その芯線を検出することができなくなると云
う問題が生じる。In such a case, since the line segment itself cannot be recognized, a problem arises in that the core line cannot be detected.
(発明が解決しようとする課題)
このように従来にあっては、画像として入力された図面
の線分を直線近似して文字・記号・線分の認識処理に供
する際の、直線近似精度に問題があり、認識性能低下の
要因となっている等の問題があった。(Problem to be Solved by the Invention) In the past, when line segments in a drawing input as an image are approximated by a straight line and used for recognition processing of characters, symbols, and line segments, the accuracy of the straight line approximation has not been improved. There were some problems, such as being a factor in the deterioration of recognition performance.
本発明はこのような事情を考慮してなされたもので、そ
の目的とするところは、画像入力された図面についての
近似直線を簡易にして高精度に得ることができ、図面認
識処理性能の向上に大きく寄与することのできる画像処
理装置を提供することにある。The present invention has been made in consideration of these circumstances, and its purpose is to easily obtain approximate straight lines with high accuracy for drawings input as images, and to improve drawing recognition processing performance. An object of the present invention is to provide an image processing device that can greatly contribute to
[発明の構成]
(課題を解決するための手段)
本発明に係る画像処理装置は、入力画像を細線化処理し
た細線化画像から前記入力画像の近似線分を得ると共に
、前記入力画像の連結黒画素領域の輪郭線の近似線分を
得、前記細線化画像から求められた近似線分を前記輪郭
線近似線分を用いて整形するようにしたことを特徴とす
るものである。[Structure of the Invention] (Means for Solving the Problems) An image processing device according to the present invention obtains approximate line segments of the input image from a thinned image obtained by thinning the input image, and connects the input images. The present invention is characterized in that an approximate line segment of the outline of the black pixel area is obtained, and the approximate line segment obtained from the thinned image is shaped using the approximate outline segment.
(作 用)
このように構成された本発明によれば、細線化画像から
求められる有る程度精度の高い近似線分を、輪郭線近似
線分を用いて整形するので、細線化処理時のノイズ等に
起因する精度低下の要因を効果的に補正することが可能
となるので、入力画像の近似直線を簡易な処理にて高精
度に得る二′とが可能となる。(Function) According to the present invention configured as described above, since the approximate line segment with a certain degree of accuracy obtained from the thinned image is shaped using the contour line approximate line segment, noise during the line thinning process is reduced. Since it is possible to effectively correct the factors that reduce accuracy due to factors such as the above, it is possible to obtain an approximate straight line of the input image with high accuracy through simple processing.
(実施例)
以下、図面を参照して本発明に係る画像処理装置の一実
施例について説明する。(Example) Hereinafter, an example of an image processing apparatus according to the present invention will be described with reference to the drawings.
第1図は実施例装置の基本的な処理手続きの流れを示し
ている。この実施例装置では、入力画像を細線化処理し
、その細線化処理画像を折れ線近似して第1の近似直線
を得る処理手続き(処理A)と、前記入力画像の連結黒
画素領域を求め、この連結黒画素領域の輪郭線を折れ線
近似して第2の近似直線を得る処理手続き(処理B)と
が並列的に行われる。FIG. 1 shows the flow of the basic processing procedure of the embodiment apparatus. In this embodiment device, a processing procedure (processing A) for performing line thinning processing on an input image, and approximating the line thinning processed image with a polygonal line to obtain a first approximate straight line, and determining a connected black pixel area of the input image, A processing procedure (processing B) for obtaining a second approximate straight line by performing polygonal line approximation to the outline of the connected black pixel area is performed in parallel.
しかる後、上記第1および第2の近似直線を、その入力
画像中での位置情報や近似直線としての特徴に従って対
応付けしく処理C)、その対応関係に従って前記細線化
画像から求められた第1の近似直線を、前記輪郭線から
求められた第2の近似直線に従って整形処理しく処理D
)、ここに近似精度の高い前記入力画像の近似直線を求
めることを特徴としている。Thereafter, the first and second approximate straight lines are correlated according to their positional information in the input image and the characteristics of the approximate straight line (C), and the first and second approximate straight lines obtained from the thinned image are processed according to the correspondence relationship. The approximate straight line is shaped according to the second approximate straight line obtained from the contour line
), which is characterized in that an approximate straight line of the input image with high approximation accuracy is obtained.
ここで前記入力画像を細線化処理して求められる細線化
画像から得られる第1の近似線分を(L 11として、
また前記入力画像の連結黒画素領域の輪郭線を直線近似
して求められる第2の近似線分を IRilとしてそれ
ぞれ表すものとする。Here, the first approximate line segment obtained from the thinned image obtained by thinning the input image is (L11,
Further, the second approximate line segments obtained by linearly approximating the outlines of the connected black pixel regions of the input image are each expressed as IRil.
しかして前記第1の近似直線 (Ll)は、基本的には
前述したように入力画像を従来より種々提唱される細線
化処理の手法を適宜用いて線幅[1](1画素の大きさ
に相当)の細線化画像を求め、この細線化画像における
各線分を、例えば曲率の大きい点を区切り点として各区
切り点間を直線で結ぶことで直線近似して求められる。Basically, as mentioned above, the first approximate straight line (Ll) is obtained by appropriately applying various line thinning processing methods proposed in the past to the input image. A thin line image (equivalent to ) is obtained, and each line segment in this thin line image is obtained by linear approximation by using, for example, a point with a large curvature as a break point and connecting each break point with a straight line.
このような細線化画像の直線近似処理により、例えば第
2図に示すような入力画像の第1の近似直線 ILl)
として、例えば第3図に示されるような線分情報11.
1! 2.・・・に関する情報と、これらの各線分11
゜12、・・・の端点P 1.P 2.・・・に関する
第4図に示すような情報とが求められる。つまり直線近
似した各線分# 1.N 2.・・・の端点がどこであ
るか、また各端点P 1.P 2.・・・はどの線分に
属するかの情報が求め′られる。Through such straight line approximation processing of the thinned image, for example, the first approximate straight line of the input image as shown in FIG.
For example, line segment information 11. as shown in FIG.
1! 2. Information about ... and each of these line segments 11
End point P of ゜12,... 1. P2. . . information as shown in FIG. 4 is required. In other words, each line segment #1 approximated by a straight line. N2. Where are the end points of ... and each end point P1. P2. ... is required to obtain information about which line segment it belongs to.
一方、前記第2の近似直線 IRl)は、入力画像の連
結黒画素領域の全ての輪郭を求め、この輪郭を直線近似
処理することによって求められる。この入力画像の輪郭
検出は、例えば
”A high 5peed raster to v
ector conversionuslng 5pe
cial hardware for contour
tracking″(IAPRworkshop o
n CV −5pec1al hardware an
dindustrial application、
1988. pp、18−23)に紹介されるような手
法を用いて行われる。On the other hand, the second approximate straight line IRl) is obtained by obtaining all contours of connected black pixel regions of the input image and subjecting these contours to linear approximation processing. The contour detection of this input image is performed using, for example, “A high 5peed raster to v
ector conversionuslng 5pe
cial hardware for contour
tracking'' (IAPRworkshop o
n CV-5peclal hardware an
industrial application,
1988. This is done using a method such as that introduced in pp. 18-23).
この輪郭検出処理は連結黒画素領域の輪郭を追跡しなが
ら、次のような処理を実行することにより達せられる。This contour detection process is achieved by executing the following process while tracing the contour of the connected black pixel area.
即ち、この輪郭追跡処理では、先ず入力画像中の[黒/
白]の境界を追跡しながら、輪郭線の向きを示すチェー
ンコードを順次出力する。このチェーンコードは入力画
像中の[黒/白]の境界が示す向きを、例えば第5図に
示すように45″刻みに設定したコードの系列からなる
。しかしてこの輪郭線分の直線近似処理では、先ず上記
チェーンコードに従って次の第(1)式に示す計算を行
い、追跡点ptにおける曲率Ciを計算することから開
始される。That is, in this contour tracking process, first, [black/
While tracing the boundaries of white, it sequentially outputs chain codes that indicate the direction of the contour line. This chain code consists of a series of codes in which the direction indicated by the [black/white] boundary in the input image is set in 45'' increments, for example, as shown in Figure 5. First, the calculation shown in the following equation (1) is performed according to the chain code, and the curvature Ci at the tracking point pt is calculated.
但し、kjは、輪郭追跡点Pjにおけるチェーンコード
である。However, kj is a chain code at the contour tracking point Pj.
次に上記輪郭線上において、曲率Ciの絶対値が所定の
閾値T以下である連続輪郭線(Pl、P2゜・・・・・
・Pn)を抽出する。そしてこの連続輪郭線チェーンコ
ードに基づいて、例えば第6図に示すように求められる
連続輪郭線と、その端点PI、Pnを結ぶ直線[P 1
−P n]とで構成される閉領域の面積Sを、第(2)
式に示す計算により求める。Next, on the above contour line, a continuous contour line (Pl, P2°...
・Extract Pn). Then, based on this continuous contour line chain code, a straight line [P 1
−P n], the area S of the closed region composed of
Obtained by the calculation shown in the formula.
S−Σ (Xi* δxi−Yi* δyl)
−(2)但し、(Xi、Yi )は、点P1の座標
値であり、δxi−Xi+l −Xi 、δyi −Y
i+1− Y iである。S-Σ (Xi* δxi-Yi* δyl)
-(2) However, (Xi, Yi) are the coordinate values of point P1, δxi-Xi+l -Xi, δyi -Y
i+1-Yi.
このようにして求められる値(面積S)が成る閾値より
小さいとき、この連続輪郭線が1本の直線を表すものと
し、上記端点P1.Pnを結ぶ線分[P L−P n]
を当該連続輪郭線の近似直線とする。When the value (area S) obtained in this way is smaller than the threshold value, this continuous contour line represents one straight line, and the above-mentioned end point P1. Line segment connecting Pn [P L-P n]
Let be the approximate straight line of the continuous contour line.
また上記第(2)式に示す計算により求められる値(面
積S)が前記閾値より大きいときには、当該連続輪郭線
は複数本の線分より構成されるものと判断する。そして
この連続輪郭線を、例えば2分割法により折れ線近似す
る。この2分割法は、例えば
”Pattern classification a
nd 5cene analysls″R1chard
O,Duda and Peter E、 Hart
。Further, when the value (area S) obtained by the calculation shown in equation (2) above is larger than the threshold value, it is determined that the continuous contour line is composed of a plurality of line segments. Then, this continuous contour line is approximated by a polygonal line, for example, by the two-division method. This two-division method is, for example, “Pattern classification a
nd 5scene analyzes″R1chard
O, Duda and Peter E, Hart
.
A Viley−1nterseince Publl
cation、pp43B−339なる文献に紹介され
るような手法を用いて実行される。A Viley-1interseince Publl
cation, pp 43B-339.
このようにして入力画像の全ての輪郭について上述した
処理を実行し、この結果水められる全ての輪郭について
の各近似直線を前述した第2の近似直線 (Rilとし
て登録する。尚、この輪郭線の直線近似処理については
、前記入力画像の輪郭を単純に2分割法により折れ線近
似するだけでもいが、上述したような処理を実行する方
が入力画像の輪郭を直線近似すると云う点で精度が良い
ものが得られる。In this way, the above-described process is executed for all the contours of the input image, and each approximate straight line for all the contours that are subtracted as a result is registered as the second approximate straight line (Ril). Regarding the linear approximation process, it is possible to simply approximate the outline of the input image using a polygonal line using the 2-division method, but performing the process described above is more accurate in that the outline of the input image is approximated by a straight line. You can get something good.
以上のようにして入力画像に対する第1の近似直線 I
L itと、第2の近似直線 (R1)とが求められる
と、次にこれらの第1および第2の近似直線 IL i
l、 fRil間での対応付けを行う。この対応付は
処理は、第1の近似直線 +L l+の各線分L1につ
いて、ソノ端点P 1O(XiO,YiO)P 1t(
Xil、 Yil)の近傍に存在する第2の近似直線I
R1)中の線分R1を探索することから開始される。こ
の探索は、例えば線分Liの中点Pi2からこの線分の
方向に対して左右両方向を区別し、前記中点Pi2に最
も近い線分のうち、線分L1とのなす角度が成る閾値θ
以下の直線を求めることによってなされる。As described above, the first approximate straight line I for the input image
Once L it and the second approximate straight line (R1) are obtained, next these first and second approximate straight lines IL i
Correlation is made between l and fRil. This correspondence processing is performed for each line segment L1 of the first approximate straight line +L l+, sono end point P 1O (XiO, YiO)
The second approximate straight line I existing in the vicinity of Xil, Yil)
The process starts by searching for line segment R1 in R1). In this search, for example, from the midpoint Pi2 of the line segment Li, we distinguish both the left and right directions with respect to the direction of this line segment, and among the line segments closest to the midpoint Pi2, the threshold value θ is determined by the angle formed with the line segment L1.
This is done by finding the following straight line.
例えば後述する第10図に示す例では、細線化画像から
求められた近似直線 (L ilの線分L1については
、図中右側に対して線分R1が、また左側に対して線分
R5がそれぞれ求められる。このような線分の対応付は
処理を全ての線分Liに対してそれぞれ実行する。For example, in the example shown in FIG. 10, which will be described later, regarding the line segment L1 of the approximate straight line (L il) obtained from the thinned image, the line segment R1 is on the right side in the figure, and the line segment R5 is on the left side. Such line segment correspondence is performed for each line segment Li.
次に上述した如く対応付けられた線分Liと線分Riと
の関係に基づき、第2の近似直線 (Rilの情報を用
いた前記第1の近似直線 (L i)の整形処理を行う
。Next, based on the relationship between the line segment Li and the line segment Ri associated as described above, a shaping process is performed on the first approximate straight line (L i ) using the information of the second approximate straight line (Ril).
この整形処理は線分Liに対応付けられた2つの線分R
iに基づき、細線近似線分Liの端点P1の位置を決定
することにより実現される。This shaping process is performed on two line segments R that are associated with line segment Li.
This is realized by determining the position of the end point P1 of the thin approximate line segment Li based on i.
ここで成る細線近似線分Liに対応付けられた2つの輪
郭近似線分R1である輪郭近似線分対(ベア)を(Ri
、Rj )として表すものとする。A pair of contour approximation line segments (bare) that are two contour approximation line segments R1 associated with the thin line approximation line segment Li consisting of (Ri
, Rj).
そしてこの組で決定される直線を、例えば第7図に示す
ように輪郭近似線分Ri、Rjの各端点を相互に結ぶ線
分(破線で示す)の中点c 11. Cjjで決定さ
れる直線として定義する。Then, the straight line determined by this set is determined, for example, as shown in FIG. 7, at the midpoint c of the line segment (indicated by a broken line) that connects the end points of the contour approximation line segments Ri and Rj.11. Define as a straight line determined by Cjj.
しかし細線近似線分L1に対応する輪郭近似線分は必ず
しも上述したように組として存在するとは限らない。そ
の際には、例えば第8図に示すように、細線近似線分L
Lの中点P1を通る前記細線近似線分L1に対応し、且
つ輪郭近似線分R1に平行な線分kを前記直線として定
義する。このようにして直線を定義することにより、以
下の説明では輪郭近似線分対(R1,Rj )と示した
際には、その一方がない場合であっても2つの輪郭近似
線分R1が存在する場合と同様な議論が成立することに
なる。However, the contour approximate line segments corresponding to the thin approximate line segment L1 do not necessarily exist as a set as described above. In that case, for example, as shown in FIG. 8, the thin approximate line segment L
A line segment k that corresponds to the thin approximate line segment L1 passing through the midpoint P1 of L and is parallel to the contour approximate line segment R1 is defined as the straight line. By defining a straight line in this way, in the following explanation, when a pair of contour approximating line segments (R1, Rj) is indicated, two contour approximating line segments R1 exist even if one of them is missing. The same argument can be made in this case.
また輪郭近似線分対(R1,R2)と輪郭近似線分対(
RLR4)との交点として、前記輪郭近似線分R1(i
=1.・・・、4)が全て異なっている場合には、前述
した輪郭近似線分対(R1,R2)で決定される直線と
、輪郭近似線分対(R3,R4)で決定される直線の交
点として定義する。また上記輪郭近似線分R1が[R1
=Rj (1−1or 2.j−3or 4) ]なる
関係を持つ場合には、前記交点は次のようにして得られ
る点Qとして定義されるものとする。Also, the contour approximation line segment pair (R1, R2) and the contour approximation line segment pair (
The contour approximation line segment R1(i
=1. ..., 4) are all different, the straight line determined by the pair of contour approximating line segments (R1, R2) and the straight line determined by the pair of contour approximating line segments (R3, R4) described above. Define as an intersection. Moreover, the above contour approximation line segment R1 is [R1
=Rj (1-1or 2.j-3or 4)], the intersection point is defined as a point Q obtained as follows.
即ち、例えば第9図に示すように、前記交点Qは、2つ
の細線近似線分LL、L2の中点を結ぶ直線にと、輪郭
近似線分R2と輪郭近似線分R3との端点を結ぶ線分の
中点を通り、且つ輪郭近似線分R1(−R4)に垂直な
直線mとの交点であるとする。That is, as shown in FIG. 9, for example, the intersection Q connects the end points of the contour approximation line segment R2 and contour approximation line segment R3 with a straight line connecting the midpoints of the two thin approximation line segments LL and L2. Assume that it is an intersection with a straight line m that passes through the midpoint of the line segment and is perpendicular to the contour approximation line segment R1 (-R4).
以上のような定義の下で第1の近似線分 (L il
’に対する整形処理は次のようにして進められる。Under the above definition, the first approximate line segment (L il
The formatting process for ' is proceeded as follows.
具体的には、例えば第10図に示すようにその線分が分
岐している場合、細線近似直線L1の端点P1の位置の
決定による当該細線近似直線L1の整形は次のようにし
て行う。即ち、細線近似直線L1の端点P1には、細線
近似直線Llを含めて3つの細線近似直線LL、L2.
L3が接続されている。そこでこれらの各細線近似直線
Ll。Specifically, when the line segment is branched as shown in FIG. 10, for example, shaping of the thin approximate straight line L1 by determining the position of the end point P1 of the thin approximate straight line L1 is performed as follows. That is, at the end point P1 of the thin approximate straight line L1, there are three thin approximate straight lines LL, L2, .
L3 is connected. Therefore, each of these thin approximate straight lines Ll.
R2,R3にそれぞれ対応する第2の近似線分(R1)
の組(R1,R5) (R2,R3) (R4,R
5)をそれぞれ求める。Second approximate line segment (R1) corresponding to R2 and R3, respectively
The set (R1, R5) (R2, R3) (R4, R
5) respectively.
そしてこの場合には前記第2の近似線分 [Ri)の組
(R1,R5) (R4,R5)の各交点を通り、且
つ輪郭近似線分R5に平行な直線と、前記第2の近似線
分 (R1)の組(R2,R1)から求められる直線の
交点Qiの位置を求める。このようにして求められる交
点Q1の位置を前記端点PIの位置として変更して前記
細線近似直線L L(L 2.L 3.)を整形する。In this case, the second approximate line segment [Ri) passes through each intersection of the set (R1, R5) (R4, R5) and is parallel to the contour approximate line segment R5, and the second approximate line segment Find the position of the intersection point Qi of the straight lines found from the set (R2, R1) of the line segment (R1). The position of the intersection point Q1 obtained in this manner is changed to the position of the end point PI to shape the thin approximate straight line L L (L 2 . L 3.).
また第11図に示すように線分が折れ曲がっている場合
には、細線近似直線LLの端点P1に接続する2つの細
線近似直線LL、L2について、これらの細線近似直線
Ll、L2に対応する第2の近似線分 (Rflの組(
R1,R2) (R3,R4)を求める。そしてこれ
らの第2の近似線分 (R1)の組(R1,R2)
(R3,R4)の交点Q1の位置を求め、前記端点Pi
の位置を上記交点Q1の位置に変更する。この端点Pi
の位置変更により細線近似直線L1.L2が整形される
。Furthermore, when the line segment is bent as shown in FIG. 2 approximate line segment (set of Rfl (
R1, R2) Find (R3, R4). And the set (R1, R2) of these second approximate line segments (R1)
Find the position of the intersection Q1 of (R3, R4), and
The position of is changed to the position of the above-mentioned intersection Q1. This end point Pi
By changing the position of the thin approximate straight line L1. L2 is reshaped.
更に第12図に示すように線分が交差しているような場
合には、上述した第11図に示す例のように、先ず折れ
線として求められている細線近似直線LLの端点Piの
位置を、細線近似直線LL、L2に対応する第2の近似
線分 (R1)の組(R2,R3) (R4,R5)
の交点Q1の位置に変更し、また折れ線として求められ
て0る細線近似直線L3の端点P2の位置を、他の細線
近似直線L3.L4に対応する第2の近似線分(Ri)
の組(R8,R7)(RLRI )の交点Q2の位置に
変更する。尚、前記交点Qlが第2の近′似線分 iR
ilの組(RI3.R7)の間にあり、且つ組(R8,
R1)の間にある場合には、前記点P1と点P2とを仮
想的に結ぶ線分Lxを除去して上記点P1と点P2とを
併合し、その座標値を前記交点Q1と交点Q2との中点
とする。このようにして求められる位置を前記細線近似
直線LL (L2.L3.L4)の端点P1の位置と
して変更する。この処理により前記細線近似直線LJ、
。Furthermore, in the case where line segments intersect as shown in FIG. 12, as in the example shown in FIG. , thin approximate straight line LL, second approximate line segment (R1) corresponding to L2 (R2, R3) (R4, R5)
, and change the position of the end point P2 of the thin approximate straight line L3, which is found as a polygonal line and is 0, to the position of the intersection point Q1 of the other thin approximate straight line L3. Second approximate line segment (Ri) corresponding to L4
The position is changed to the intersection Q2 of the set (R8, R7) (RLRI). Note that the intersection Ql is the second approximate line segment iR
It is between the set (RI3.R7) of il, and the set (R8,
R1), the line segment Lx that virtually connects the points P1 and P2 is removed, the points P1 and P2 are merged, and the coordinate values are set as the intersection point Q1 and the intersection Q2. The midpoint between The position thus obtained is changed to the position of the end point P1 of the thin approximate straight line LL (L2.L3.L4). Through this process, the thin approximate straight line LJ,
.
L2.L3.L4がそれぞれ整形される。L2. L3. L4 is shaped respectively.
また第13図に示すように折れ曲がり線分が直線に接触
しているような場合には次のようにする。Further, in the case where a bent line segment is in contact with a straight line as shown in FIG. 13, the following procedure is performed.
つまり線分L1に示すようにその線分長が短く、且つこ
れに対応する輪郭近似線分が無く、しかも上記線分L1
の端点P1に接続される他の2つの細線近似線分に対応
する輪郭近似線分が共通した線分R4である場合には、
上記線分L1を除去する。そして線分L1の端点てあり
、他の細線近似線分との接続点であったPL、P2の位
置を、輪郭近似直線対(R3,R4) (R4,R5
)の交点、および輪郭近似直線対(R1,R2) (
R3,R4)の交点としてそれぞれ変更し、細線近似線
分を整形する。In other words, as shown in the line segment L1, the line segment length is short, and there is no corresponding contour approximation line segment, and the line segment L1
If the contour approximation line segment corresponding to the other two thin line approximation line segments connected to the end point P1 of is a common line segment R4,
The line segment L1 is removed. Then, the positions of PL and P2, which are the end points of the line segment L1 and the connection points with other thin line approximation line segments, are moved to the contour approximation straight line pair (R3, R4) (R4, R5
), and the pair of contour approximation straight lines (R1, R2) (
R3, R4), respectively, and shape the thin approximate line segment.
更に第14図に示すように、2つの輪郭近似線分(R1
,R2)の間に2つの分岐点Pl、P2が存在するよう
な場合には、線分LL、・・・L5を除去する。そして
新たに点P3と点P4とを結ぶ線分、および点P5と点
P6とを結ぶ線分をそれぞれ発生させて、細線近似線分
を整形する。Furthermore, as shown in FIG. 14, two contour approximation line segments (R1
, R2), the line segments LL, . . . L5 are removed. Then, a new line segment connecting points P3 and P4 and a line segment connecting points P5 and P6 are respectively generated to shape the thin approximate line segment.
以上のような処理を第1の近似直線 (L 11の端点
にそれぞれ適用することにより、細線近似線分の整形処
理が施されることになる。By applying the above processing to each end point of the first approximate straight line (L11), the thin approximate line segment is shaped.
このように上述した整形処理によれば、入力画像を細線
化処理してなる細線化画像から求められる図面の近似直
線を、上記入力画像の輪郭線から求められる近似直線を
用いて整形処理するので、入力画像中のノイズに起因し
て細線化画像の精度が悪く、これによって近似直線の精
度が悪い場合であっても、入力画像の輪郭線情報に従っ
てこれを効果的に補正することができ、修正された近似
精度の高い図面の直線近似データを求めることが・可能
となる。しかも入力画像の輪郭線情報に従ってその細線
化画像から求められる近似直線の整形を上述したように
線分を対応付けながら行うので、簡易にして精度の高い
直線近似データを効率的に求めることができる等の実用
上多大なる効果が奏せられる。According to the shaping process described above, the approximate straight line of the drawing obtained from the thinned image obtained by thinning the input image is shaped using the approximate straight line obtained from the contour line of the input image. Even if the accuracy of the thinned image is poor due to noise in the input image and the accuracy of the approximate straight line is poor due to this, this can be effectively corrected according to the contour information of the input image, It becomes possible to obtain corrected linear approximation data of the drawing with high approximation accuracy. Moreover, since the approximate straight line obtained from the thinned image is shaped according to the contour line information of the input image while associating line segments as described above, it is possible to easily and efficiently obtain highly accurate straight line approximate data. Many practical effects can be achieved.
尚、本発明は上述した実施例に限定されるものではない
。例えば入力画像に対して細線化を完全に施すのではな
く、限定回数だけ境界上の黒画素を除去する部分細線化
処理を施すことで塗り潰し領域を求めることができる。Note that the present invention is not limited to the embodiments described above. For example, instead of completely thinning the input image, a filled area can be obtained by performing partial thinning processing that removes black pixels on the boundary a limited number of times.
従ってこのような上記部分細線化処理により完全に線幅
[1]にならなかった領域を塗り潰し領域として求め、
その部分については当該部分細線化画像の輪郭情報を用
いて上述した細線近似直線を整形した場合と同様な処理
により整形することかできる。その他、本発明はその要
旨を逸脱しない範囲で種々変形して実施することができ
る。Therefore, the area where the line width did not completely become [1] due to the above partial line thinning process is determined as a filled area,
That portion can be shaped using the same process as when shaping the thin line approximation straight line described above using the contour information of the partial thinned image. In addition, the present invention can be implemented with various modifications without departing from the gist thereof.
[発明の効果コ
以上説明したように本発明によれば、入力画像を細線化
処理してなる細線化画像から求められる近似直線を、上
記入力画像の輪郭線の情報に従って整形すると云う手法
を導入することて、簡易にして高精度な直線近似データ
を効率的に求めることが可能となる。この結果、直線近
似データに基づく各種の認識処理を高精度に行なわせる
ことが可能となる等の実用上多大なる効果が奏せられる
。[Effects of the Invention] As explained above, according to the present invention, a method is introduced in which an approximate straight line obtained from a thinned image obtained by thinning an input image is shaped according to information about the contour of the input image. By doing so, it becomes possible to efficiently obtain linear approximation data that is simple and highly accurate. As a result, great practical effects can be achieved, such as making it possible to perform various recognition processes based on linear approximation data with high precision.
図は本発明に係る画像処理装置について示すもので、第
1図は実施例装置における概略的な処理の流れを表す図
、第2図は細線化画像の近似線分について示す図、第3
図および第4図は細線近似線分のデータ構造の例を示す
図、第5図はチェ−ンコードを表す図、第6図は輪郭線
を近似する近似線分と原画像と関係を示す図、第7図は
輪郭近似線分の組で決定される直線を示す図、第8図は
輪郭近似線分の組が存在しない場合の輪郭近似線と細線
化近似線との関係で決定される直線を示す図、第9図は
2つの輪郭近似線分の交点について示す図、第10図乃
至第14図はそれぞれ細線′近似直線の輪郭近似直線を
用いた整形処理を説明する為の図である。
A・・・細線化画像からの直線近似処理、B・・・輪郭
線の直線近似処理、C・・・細線近似直線と輪郭近似直
線との対応材は処理、D・・・輪郭近似直線を用いた細
線近似直線の整形処理、 IL l・・・第1の近似直
線(細線近似直線) 1R1)・・・第2の近似直
線(輪郭近似直線)。
出願人代理人 弁理士 鈴江武彦
第5
図
第6図
第1
第2図
第7図
第8図
RI=R4
第9図The figures show an image processing device according to the present invention, and FIG. 1 is a diagram showing a schematic processing flow in the embodiment device, FIG. 2 is a diagram showing approximate line segments of a thinned image, and FIG.
Figure 4 shows an example of the data structure of a thin approximate line segment, Figure 5 shows a chain code, and Figure 6 shows the relationship between an approximate line segment that approximates a contour line and the original image. , Fig. 7 shows a straight line determined by a set of contour approximating line segments, and Fig. 8 shows a straight line determined by the relationship between a contour approximating line and a thinned approximating line when a set of contour approximating line segments does not exist. 9 is a diagram showing a straight line, FIG. 9 is a diagram showing the intersection of two contour approximation line segments, and FIGS. 10 to 14 are diagrams for explaining the shaping process using the contour approximation straight line of the thin line' approximation line, respectively. be. A... Straight line approximation processing from the thinned image, B... Linear approximation processing of the contour line, C... Processing of correspondence between the thin line approximation straight line and the contour approximation straight line, D... Processing of the contour approximation straight line Shaping processing of the used thin line approximation straight line, IL l...First approximate line (thin line approximation line) 1R1)...Second approximate line (contour approximation line). Applicant's agent Patent attorney Takehiko Suzue Figure 5 Figure 6 Figure 1 Figure 2 Figure 7 Figure 8 RI=R4 Figure 9
Claims (1)
の第1の近似線分を得る手段と、前記入力画像から求め
られる連結黒画素領域の輪郭を線分近似して上記輪郭の
第2の近似線分を得る手段と、前記細線化画像から得ら
れた第1近似線分を、前記輪郭の第2近似線分により整
形する手段とを具備したことを特徴とする画像処理装置
。means for obtaining a first approximation line segment of the input image from a thinned image obtained by thinning the input image; and means for approximating the contour of the connected black pixel area obtained from the input image by line segment to obtain a second approximate line segment of the contour. An image processing device comprising: means for obtaining an approximate line segment; and means for shaping a first approximate line segment obtained from the thinned image using a second approximate line segment of the contour.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP13957390A JP2885476B2 (en) | 1990-05-31 | 1990-05-31 | Image processing method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP13957390A JP2885476B2 (en) | 1990-05-31 | 1990-05-31 | Image processing method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH0434668A true JPH0434668A (en) | 1992-02-05 |
JP2885476B2 JP2885476B2 (en) | 1999-04-26 |
Family
ID=15248415
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP13957390A Expired - Lifetime JP2885476B2 (en) | 1990-05-31 | 1990-05-31 | Image processing method and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2885476B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08329227A (en) * | 1995-03-27 | 1996-12-13 | Nippon Steel Corp | Interactive drawing recognition processing method |
JP2009193361A (en) * | 2008-02-14 | 2009-08-27 | Canon Inc | Device, method, and program for processing image, and recording medium |
-
1990
- 1990-05-31 JP JP13957390A patent/JP2885476B2/en not_active Expired - Lifetime
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08329227A (en) * | 1995-03-27 | 1996-12-13 | Nippon Steel Corp | Interactive drawing recognition processing method |
JP2009193361A (en) * | 2008-02-14 | 2009-08-27 | Canon Inc | Device, method, and program for processing image, and recording medium |
Also Published As
Publication number | Publication date |
---|---|
JP2885476B2 (en) | 1999-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2019135643A (en) | Method, device, and medium for detecting lane boundary line | |
Das et al. | A fast algorithm for skew detection of document images using morphology | |
US8340433B2 (en) | Image processing apparatus, electronic medium, and image processing method | |
Hori et al. | Raster-to-vector conversion by line fitting based on contours and skeletons | |
WO1993007580A1 (en) | Method of determining direction in local region of profile segment and method of determining lines and angles | |
US8249387B2 (en) | Image processing method and apparatus for detecting lines of images and start and end points of lines | |
CN114863492B (en) | Method and device for repairing low-quality fingerprint image | |
CN112085709A (en) | Image contrast method and equipment | |
JPH11167455A (en) | Hand form recognition device and monochromatic object form recognition device | |
JPH0434668A (en) | Image processor | |
KR101391667B1 (en) | A model learning and recognition method for object category recognition robust to scale changes | |
CN106056599B (en) | A kind of object recognition algorithm and device based on Object Depth data | |
CN112464753A (en) | Method and device for detecting key points in image and terminal equipment | |
JP2941322B2 (en) | Drawing processing equipment | |
Su et al. | Dimension recognition and geometry reconstruction in vectorization of engineering drawings | |
Gong et al. | Contour extraction and quality inspection for inner structure of deep hole components | |
JPH0628476A (en) | Processor for image signal | |
JPS622382A (en) | Feature extracting devie for pattern | |
Chen et al. | A New Objective Evaluation Method on Image Edge Detection | |
JPH07302338A (en) | Template matching method and pattern recognizing device using the same method | |
JPH02264373A (en) | Graphic recognizing device | |
Zhang et al. | A novel arc segmentation approach for document image processing | |
CN115393337A (en) | Industrial defect detection method, device, equipment and computer readable storage medium | |
JP3048718B2 (en) | Vertex detector | |
CN116863176A (en) | Image template matching method for digital intelligent manufacturing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080212 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090212 Year of fee payment: 10 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100212 Year of fee payment: 11 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100212 Year of fee payment: 11 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110212 Year of fee payment: 12 |
|
EXPY | Cancellation because of completion of term | ||
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110212 Year of fee payment: 12 |