JP2621810B2 - Figure detection method and apparatus - Google Patents

Figure detection method and apparatus

Info

Publication number
JP2621810B2
JP2621810B2 JP23274994A JP23274994A JP2621810B2 JP 2621810 B2 JP2621810 B2 JP 2621810B2 JP 23274994 A JP23274994 A JP 23274994A JP 23274994 A JP23274994 A JP 23274994A JP 2621810 B2 JP2621810 B2 JP 2621810B2
Authority
JP
Japan
Prior art keywords
straight line
pixel
origin
image
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP23274994A
Other languages
Japanese (ja)
Other versions
JPH0896131A (en
Inventor
讓二 田島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP23274994A priority Critical patent/JP2621810B2/en
Publication of JPH0896131A publication Critical patent/JPH0896131A/en
Application granted granted Critical
Publication of JP2621810B2 publication Critical patent/JP2621810B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、図面上の図形データを
読み取り、図面を電子化する図形検出方法及び装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic detecting method and apparatus for reading graphic data on a drawing and digitizing the drawing.

【0002】[0002]

【従来の技術】従来から、図面上に描かれた直線・曲線
を画像処理技術により自動的に検出・読み取りを行な
い、数値化することが行なわれている。中でも、ノイズ
に強い方法として、ハフ変換が知られている。(例え
ば、Richard O. Duda and Peter E.Hart 著“Pattern C
lassification and Scene Analysis ”,John Wiley & S
ons1973,336ページ) 図2を参照して、ハフ変換による直線検出法を説明す
る。直線11上の任意の点(x,y)において、
2. Description of the Related Art Conventionally, a straight line and a curve drawn on a drawing are automatically detected and read by image processing technology and are digitized. Among them, Hough transform is known as a method resistant to noise. (See, for example, Pattern C by Richard O. Duda and Peter E. Hart.
lassification and Scene Analysis ”, John Wiley & S
ons1973, page 336) A straight line detection method using Hough transform will be described with reference to FIG. At an arbitrary point (x, y) on the straight line 11,

【0003】 [0003]

【0004】が成り立つ。そのため、得られた直線を含
む画像から、θとρを求めることが課題となる。
The following holds. Therefore, it is necessary to obtain θ and ρ from the obtained image including the straight line.

【0005】ディジタル画像処理では、画像中の直線エ
ッジを求める場合、まず画像に対してエッジ抽出処理を
行ない、続いて、このエッジ画像から直線を検出する。
実際の画像では、この直線11を構成する複数のエッジ
画素12がエッジ抽出処理の特性や画像入力に伴うノイ
ズによって、完全に直線11に乗っていることや、とぎ
れなく画素12が直線を形成していることは期待できな
い。
In digital image processing, when a straight edge in an image is obtained, an edge extraction process is first performed on the image, and then a straight line is detected from the edge image.
In an actual image, the plurality of edge pixels 12 constituting the straight line 11 completely lie on the straight line 11 due to the characteristics of the edge extraction processing and noise due to image input, and the pixel 12 forms a straight line without interruption. I can't expect that.

【0006】ハフ変換では、これをパラメータ空間にお
ける累積という形で解決する。まず、(θ,ρ)空間
を、図3のように直線を求めるのに必要な精度と範囲に
分割する。分割された各領域をセル15と呼ぶ。各セル
毎に計数用のメモリを持つ。次に、各画素12毎に、そ
の位置座標(x,y)を式(2)に代入して、
In the Hough transform, this is solved in the form of accumulation in a parameter space. First, the (θ, ρ) space is divided into the accuracy and the range necessary for obtaining a straight line as shown in FIG. Each of the divided areas is called a cell 15. Each cell has a memory for counting. Next, for each pixel 12, its position coordinates (x, y) are substituted into equation (2),

【0007】 [0007]

【0008】に従い、ρを0≦θ<2πについて計算
し、図4のような特性曲線のグラフを得る。即ち、1つ
の直線上の画素2により、その直線の方程式のパラメー
タである(θ,ρ)は図4の特性曲線13上の値に制限
される。曲線13が通る、図3のセルのメモリの値を1
増加させる。複数の画素12a,12b,12cから得
られた特性曲線13a,13b,13c(図は原理を概
念的に示しており、図2の画素位置と図3の曲線位置の
対応は正確ではない)が、(θ,ρ)平面上の1点14
で交わる時、この点を集積点と呼び、この点の座標(θ
0 ,ρ0 )が求める直線のパラメータであり、
Ρ is calculated for 0 ≦ θ <2π to obtain a graph of a characteristic curve as shown in FIG. That is, the pixel 2 on one straight line limits the parameters (θ, ρ) of the equation of the straight line to the values on the characteristic curve 13 in FIG. The value of the memory of the cell of FIG.
increase. Characteristic curves 13a, 13b, 13c obtained from a plurality of pixels 12a, 12b, 12c (the diagram conceptually illustrates the principle, and the correspondence between the pixel position in FIG. 2 and the curve position in FIG. 3 is not accurate) , One point 14 on the (θ, ρ) plane
When this point intersects, this point is called an accumulation point, and the coordinates of this point (θ
0 , ρ 0 ) are the parameters of the straight line to be found,

【0009】 [0009]

【0010】がその直線の方程式である。Is the equation of the straight line.

【0011】即ち、直線のパラメータ(θ0 ,ρ0 )を
求めるには、その領域内のすべての“1”の画素につい
て特性曲線を描き、通るセルについて計数を行なう。そ
して、集積点14を検出するためには、図3の各セルの
計数値を調べ、最大の値を持つセルの位置から、直線の
パラメータ(θ0 ,ρ0 )を求める。このようにする
と、画像処理の過程で直線の画素が正しく求まらなかっ
た場合にも、安定して直線を検出することができる。
That is, in order to obtain the parameters (θ 0 , ρ 0 ) of a straight line, a characteristic curve is drawn for all “1” pixels in the area, and counting is performed for passing cells. Then, in order to detect the accumulation point 14, the count value of each cell in FIG. 3 is checked, and a straight line parameter (θ 0 , ρ 0 ) is obtained from the position of the cell having the maximum value. In this way, a straight line can be stably detected even when a pixel of the straight line is not correctly obtained in the course of image processing.

【0012】以上が、通常、画像中の直線を検出するの
に用いられるハフ変換である。このように、ある図形の
検出をその図形を定めるパラメータを座標軸とした、パ
ラメータ空間への累積に変換することで行なうことが、
他の図形の検出の場合にも試みられている。特に、図面
を自動的に画像から読み取るような場合、図面に頻繁に
描かれている円や円弧を検出したい要求が多い。上記の
ハフ変換は、次のように円・円弧の検出に拡張される。
拡張法を図5を参照して説明する。
The above is the Hough transform usually used for detecting a straight line in an image. As described above, the detection of a certain figure can be performed by converting it into the accumulation in the parameter space with the parameters defining the figure as coordinate axes.
Attempts have been made to detect other figures. In particular, when a drawing is automatically read from an image, there are many demands for detecting a circle or an arc drawn frequently in the drawing. The above Hough transform is extended to the detection of a circle / arc as follows.
The extension method will be described with reference to FIG.

【0013】円16は、中心の座標(x0 ,y0 )と半
径r0 で表わされ、式(4)のように書かれる。
The circle 16 is represented by the coordinates (x 0 , y 0 ) of the center and the radius r 0 , and is written as in equation (4).

【0014】 [0014]

【0015】このように、円はx0 ,y0 ,r0 の3つ
のパラメータで表わされるので、上記のハフ変換になぞ
らえ、図6に示すように(x0 ,y0 ,r0 )の3次元
のパラメータ空間を考える。そして、これをセル17に
分割し、各セルに計数用のメモリを持つ。画像の“1”
の画素毎に、その位置(xi ,yi )について、式
(4)を変形し、
As described above, since a circle is represented by three parameters x 0 , y 0 , and r 0 , the circle is represented by (x 0 , y 0 , r 0 ) as shown in FIG. Consider a three-dimensional parameter space. This is divided into cells 17, and each cell has a memory for counting. "1" in the image
Equation (4) is modified for each pixel of the position (x i , y i ),

【0016】 [0016]

【0017】を各(x0 ,y0 )について計算すると、
(x0 ,y0 ,r0 )3次元空間中の曲面6としてパラ
メータの存在範囲が表わされる。図5に示す、複数の画
素18a,18b,18c...について、図7に示す
ようにそのパラメータの存在範囲を示す曲面19a,1
9b,19c...(図5の画素の位置と図7の曲面の
対応は正確ではない)を求め、3次元空間内の集積点2
0として、求める円弧のパラメータ(x0 ,y0
0 )が求められる。
Is calculated for each (x 0 , y 0 ):
(X 0 , y 0 , r 0 ) The parameter range is represented as a curved surface 6 in a three-dimensional space. The plurality of pixels 18a, 18b, 18c. . . , A curved surface 19a, 1 indicating the existence range of the parameter as shown in FIG.
9b, 19c. . . (The correspondence between the position of the pixel in FIG. 5 and the curved surface in FIG. 7 is not accurate).
0, the parameters (x 0 , y 0 ,
r 0 ) is required.

【0018】[0018]

【発明が解決しようとする課題】しかし、これを直線検
出の場合と同様に実行するには、パラメータ空間
(x0,y0 ,r0 )を離散化してセル17に区切り、
そのセル19を曲面6が通過する回数を累積する必要が
ある。この場合、パラメータ空間は3次元空間であり、
パラメータのとる範囲は曲面で2次元であるため、離散
化したセルの数は膨大となり、1つの画素18に対する
累積の処理量も膨大となる。そのため、この方法は余り
実用的ではなかった。
However, in order to perform this in the same manner as in the case of detecting a straight line, the parameter space (x 0 , y 0 , r 0 ) is discretized and divided into cells 17.
It is necessary to accumulate the number of times the curved surface 6 passes through the cell 19. In this case, the parameter space is a three-dimensional space,
Since the range of parameters is two-dimensional on a curved surface, the number of discretized cells becomes enormous, and the amount of processing for accumulating one pixel 18 becomes enormous. Therefore, this method was not very practical.

【0019】本発明の目的は、図面の読み取りにおい
て、図形の一部が通る画素が知られている、実際的な場
面において、図面の重要な要素である直線及び円弧を容
易に検出する方法及び装置を提供する事にある。
An object of the present invention is to provide a method and a method for easily detecting straight lines and arcs, which are important elements of a drawing, in a practical scene in which pixels through which a part of a figure passes are known in reading the drawing. To provide equipment.

【0020】[0020]

【課題を解決するための手段】第1の発明は、図面上の
直線・円弧を構成する図形の一部の位置が既知であると
き、この位置を原点とし、図形を構成する他の画素位置
を(xi ,yi )(i=1,2,...,,n;nは0
でない画素値を持つ画素数)で表したとき、複数のセル
に離散化した(ω,φ)空間において
According to a first aspect of the present invention, when the position of a part of a figure forming a straight line or an arc on a drawing is known, this position is used as an origin and the position of another pixel forming the figure is determined. To (x i , y i ) (i = 1, 2,..., N; n is 0
The number of pixels with non-pixel values) in the (ω, φ) space discretized into multiple cells

【0021】 [0021]

【0022】を満足するセルに画素値を累積し、累積値
のピークを集積点(ω0 ,φ0 )として求め、φ0 ≠0
の場合には、図形が原点からω0 の角度の方向にr0
1/2φ0 離れた位置に中心がある半径r0 の円弧であ
ると検出し、φ0 =0の場合には、図形が原点を通り、
ω0 +π/2の角度の方向の直線であると検出する図形
検出方法である。
The accumulated pixel values in a cell which satisfies, The peak of the accumulated value accumulation point (ω 0, φ 0) as, phi 0 ≠ 0
In the case of, r figure from the origin in the direction of the angle of ω 0 0 =
1/2 [phi 0 is detected as an arc of radius r 0 centered at a remote location, in the case of phi 0 = 0, the figure through the origin,
This is a figure detection method for detecting a straight line in the direction of an angle of ω 0 + π / 2.

【0023】第2の発明は、図面を画像として保持する
画像メモリと、前記画像を走査し図形の一部を始点とし
て検出する始点探索手段と、(ω,φ)空間を複数のセ
ルに離散化した累積メモリと、前記始点の位置を原点と
し、図形を構成するとみなされる0でない画素値を持つ
画素の位置を(xi ,yi )(i=1,2,...,,
n;nは0でない画素値を持つ画素数)で表したとき、
前記累積メモリのセル位置(ω,φ)に対して、
According to a second aspect of the present invention, there is provided an image memory for holding a drawing as an image, starting point searching means for scanning the image and detecting a part of a figure as a starting point, and discretely dividing the (ω, φ) space into a plurality of cells. a cumulative memory turned into the a position of the start point as the origin, the positions of pixels having a pixel value non-zero that is regarded as forming the figure (x i, y i) ( i = 1,2, ... ,,
n; n is the number of pixels having a non-zero pixel value)
With respect to the cell position (ω, φ) of the accumulation memory,

【0024】 [0024]

【0025】を満足するセルに画素値を累積する特性曲
線累積手段と、前記累積メモリの累積値のピークを集積
点(ω0 ,φ0 )として求めるピーク検出手段と、得ら
れた集積点(ω0 ,φ0 )の位置から、φ0 ≠0の場合
には、図形が原点からω0 の角度の方向にr0 =1/2
φ0 離れた位置に中心がある半径r0 の円弧である出力
し、φ0 =0の場合には、図形が原点を通り、ω0 +π
/2の角度の方向の直線であると出力する円・直線計算
手段と、から成る図形検出装置である。
A characteristic curve accumulating means for accumulating pixel values in cells satisfying the following conditions; peak detecting means for obtaining a peak of the accumulated value of the accumulating memory as an accumulation point (ω 0 , φ 0 ); From the position (ω 0 , φ 0 ), if φ 0 ≠ 0, the figure is r 0 = 1 / in the direction of the angle ω 0 from the origin.
An output is an arc with a radius r 0 centered at a position φ 0 away. If φ 0 = 0, the figure passes through the origin and ω 0 + π
And a circle / straight line calculating means for outputting a straight line in the direction of the angle of / 2.

【0026】[0026]

【作用】本発明は図8に示すような、すでに公知の手法
で図形21の始点22が画像上に求まっている場合を対
象としている。例えば、エッジ抽出などの処理により直
線エッジ部分が“1”、背景が“0”である二値画像と
して得られているとき、画像全体を左上から走査方向2
3のように走査し、見つけられた“1”画素が始点22
である。
The present invention is directed to a case where the starting point 22 of the figure 21 is determined on the image by a known method as shown in FIG. For example, when a straight edge portion is obtained as a binary image having “1” and the background is “0” by a process such as edge extraction, the entire image is scanned in the scanning direction 2 from the upper left.
3 is scanned, and the found “1” pixel is the starting point 22.
It is.

【0027】この点を原点とし、検出されるべき円弧で
ある図形21の中心24の座標を(x0 ,y0 )、半径
をr0 とすると、
If this point is the origin, the coordinates of the center 24 of the figure 21 which is the arc to be detected are (x 0 , y 0 ), and the radius is r 0 ,

【0028】 [0028]

【0029】が成立し、この円上の任意の点(x,y)
の方程式は、式(4)に代入することにより、
Holds, and any point (x, y) on this circle
By substituting into equation (4),

【0030】 [0030]

【0031】となり、変形するとWhen it is transformed,

【0032】 [0032]

【0033】と書ける。[0033]

【0034】式(8)は式(1)と同様に、図形上の各
点の座標(x,y)と図形を表す2つのパラメータωと
φから成っている。そのため、原点以外の“1”の画素
25a,25b,...の位置(xi ,yi )につい
て、式(8)を変形した式(9)を、0≦ω<2πにつ
いて計算すれば、図9のようにω−φ平面のグラフ26
a,26b,...が得られる。
Equation (8), like equation (1), comprises coordinates (x, y) of each point on the figure and two parameters ω and φ representing the figure. Therefore, the pixels 25a, 25b,. . . Is calculated for the position (x i , y i ) of equation (8) with respect to 0 ≦ ω <2π, a graph 26 on the ω-φ plane as shown in FIG.
a, 26b,. . . Is obtained.

【0035】 [0035]

【0036】よって、ω−φ平面をセルに分割し、図9
に描かれた曲線26a,26b,...の通る回数を累
積し、ピークを検出する事によって集積点27の座標
(ω0 ,φ0 )を得る事ができる。図8における、原点
から円弧の中心24への角度ω0はこれにより求まる。
距離(円弧の半径)r0 は、得られたφ0 から、
Therefore, the ω-φ plane is divided into cells, and FIG.
The curves 26a, 26b,. . . The coordinates (ω 0 , φ 0 ) of the accumulation point 27 can be obtained by accumulating the number of times of passing through and detecting the peak. The angle ω 0 from the origin to the center 24 of the arc in FIG.
From the obtained φ 0 , the distance (radius of the arc) r 0 is

【0037】 [0037]

【0038】により求まる。[0038]

【0039】本発明では、直線も同様に求まる。直線は
0 =∞に対応するため、φ0 =0となる。よって、図
10に示すように、始点28を通る直線29はこれに垂
直な方向30が、集積点27のω0 として求まる。
In the present invention, a straight line is obtained similarly. Since the straight line corresponds to r 0 = ∞, φ 0 = 0. Therefore, as shown in FIG. 10, a straight line 29 passing through the starting point 28 has a direction 30 perpendicular to the straight line 29 determined as ω 0 of the accumulation point 27.

【0040】[0040]

【実施例】本発明の実施例を図1を参照して説明する。
画像メモリ1には、図形を含んだ2値画像が格納されて
おり、始点探索手段2は画像メモリ1を一定方向に走査
し、図形の始点となる“1”の画素を探索する。例え
ば、始点探索手段2が画像メモリ1を左上から走査方向
7の方向にテレビジョンのように走査すると、円の一部
である画素が見つかる。この画素を始点8(Xs
s )とする。
An embodiment of the present invention will be described with reference to FIG.
The image memory 1 stores a binary image including a figure, and the starting point searching means 2 scans the image memory 1 in a certain direction to search for a "1" pixel which is a starting point of the figure. For example, when the starting point searching means 2 scans the image memory 1 from the upper left in the direction of the scanning direction 7 like a television, a pixel which is a part of a circle is found. This pixel is set to a starting point 8 (X s ,
Y s ).

【0041】累積メモリ4は図11のようにω−φ空間
を必要な精度にセル状に分割した計数用のメモリであ
り、各セルは下記検出範囲9の占める画素数まで計数で
きる精度を持つ。累積メモリ4を構成するすべての計数
用メモリは、始点8が探索された時点ですべて0にクリ
アされる。図11において、累積メモリはφ≧0の領域
しか構成されていない。式(9)によれば、φ<0の計
算結果も現れ、これも累積することもできるが、(ω,
φ)=(ω1 ,φ1 )に集積点が現れれば、原理的に必
ず(ω,φ)=(ω1 +π,−φ1 )にも集積点が現れ
るので、この重複を避けるための構成である。
The accumulating memory 4 is a counting memory which divides the ω-φ space into cells as required as shown in FIG. 11, and each cell has an accuracy capable of counting up to the number of pixels occupied by the detection range 9 described below. . All counting memories constituting the accumulating memory 4 are all cleared to 0 when the starting point 8 is searched. In FIG. 11, the accumulative memory includes only the area of φ ≧ 0. According to equation (9), a calculation result of φ <0 also appears, and this can also be accumulated, but (ω,
If an accumulation point appears at (φ) = (ω 1 , φ 1 ), an accumulation point always appears at (ω, φ) = (ω 1 + π, −φ 1 ) in principle. Configuration.

【0042】本実施例では、あらかじめ定められた半径
以下の円と直線とを検出するとしているので、特性曲線
累積手段3は画像メモリ1の中に検出範囲9を設定し、
この範囲内の“1”の画素毎に以下の処理を行なう。
In this embodiment, since a circle and a straight line having a radius equal to or less than a predetermined radius are detected, the characteristic curve accumulating means 3 sets a detection range 9 in the image memory 1,
The following processing is performed for each “1” pixel within this range.

【0043】(a)各画素座標(Xi ,Yi )を始点座
標(Xs ,Ys )を原点とする座標系に平行移動し、正
規化された座標(xi ,yi )を得る。
(A) Each pixel coordinate (X i , Y i ) is translated in parallel to a coordinate system whose origin is the starting point coordinate (X s , Y s ), and the normalized coordinate (x i , y i ) is calculated. obtain.

【0044】 [0044]

【0045】(b)各(xi ,yi )について、式
(9)により各ω(0≦ω<2π)につきφを計算し、
累積メモリのセル(ω,φ)の値に1を加算する。
(B) For each (x i , y i ), φ is calculated for each ω (0 ≦ ω <2π) by equation (9),
1 is added to the value of the cell (ω, φ) of the accumulation memory.

【0046】以上の処理を検出範囲9のすべての“1”
の画素について実行する。
The above processing is performed for all “1” s in the detection range 9.
Is executed for the pixel of.

【0047】これが終了するとピーク探索手段5が起動
される。ピーク探索手段5は、累積メモリ4のすべての
セルを走査し、計数値が最大であるセルの(ω,φ)を
求め(ω0 ,φ0 )とする。円・直線計算手段6は、ま
ずφ0 が0であるかを調べ、この場合はω0 +π/2を
直線の方向として出力する。直線は始点(Xs ,Ys
を通っているから、この結果から外部の装置(描かれて
いない)は得られた直線を例えば、
When this is completed, the peak search means 5 is started. The peak searching means 5 scans all the cells of the accumulation memory 4 and obtains (ω, φ) of the cell having the largest count value as (ω 0 , φ 0 ). The circle / straight line calculating means 6 first checks whether φ 0 is 0, and in this case, outputs ω 0 + π / 2 as the direction of the straight line. Straight start (X s, Y s)
From this result, an external device (not shown) draws the resulting straight line, for example,

【0048】 [0048]

【0049】として得る事ができる。Can be obtained as follows.

【0050】φ0 が0でない場合には、r0 =1/2φ
により始点から円の中心への距離が求められ、式(6)
により中心座標は(x0 ,y0 )となる。この場合も外
部の装置は始点の座標(Xs ,Ys )をも読み出して、
円の中心の座標を
If φ 0 is not 0 , r 0 = 1 / φ
Gives the distance from the starting point to the center of the circle, and equation (6)
, The center coordinate becomes (x 0 , y 0 ). Again external device start point of coordinates (X s, Y s) is also read out,
The coordinates of the center of the circle

【0051】 [0051]

【0052】のように得る事ができる。Can be obtained as follows.

【0053】尚、実施例では、図1のように直線・円弧
は二値化された図形として得られているが、図形が濃淡
のある画像である場合には、各画素も“1”または
“0”以外の、図形らしさを示す中間の値を取り得る。
このような場合にも、本発明は対応可能であり、その画
素値を累積メモリ4に累積し、集積点を見つける事によ
って同様に直線・円弧を検出する事が可能である。
In the embodiment, straight lines and circular arcs are obtained as binarized figures as shown in FIG. 1. However, when the figure is an image with shading, each pixel is either "1" or "1". An intermediate value other than “0” indicating the likeness of a figure can be taken.
Even in such a case, the present invention can cope with the situation. By accumulating the pixel values in the accumulation memory 4 and finding an accumulation point, it is possible to detect a straight line or an arc in the same manner.

【0054】[0054]

【発明の効果】以上、述べたように、本発明の構成をと
ることにより、図面上の直線、円弧を、その一部の画素
が求まっている、という条件の下に、画像から安定に検
出する事ができる。本発明の特徴としては、直接・円弧
は完全に接続している必要がなく、少々のノイズ画素が
あってもピーク検出によりそれらを求める事が可能であ
るという効果がある。また、直線と円弧を同時に一つの
構成で検出できるのも大きな効果がある。
As described above, by adopting the configuration of the present invention, a straight line or an arc on the drawing can be stably detected from an image under the condition that some of its pixels have been obtained. You can do it. As a feature of the present invention, it is not necessary that the direct and circular arcs are completely connected, and even if there are a few noise pixels, they can be obtained by peak detection. Another great effect is that a straight line and a circular arc can be detected simultaneously with one configuration.

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

【図1】本発明の実施例の構成を示すブロック図であ
る。
FIG. 1 is a block diagram showing a configuration of an embodiment of the present invention.

【図2】従来技術による直線を検出するハフ変換の説明
図である。
FIG. 2 is an explanatory diagram of a Hough transform for detecting a straight line according to a conventional technique.

【図3】従来技術による直線を検出するハフ変換の説明
図である。
FIG. 3 is an explanatory diagram of a Hough transform for detecting a straight line according to the related art.

【図4】従来技術による直線を検出するハフ変換の説明
図である。
FIG. 4 is an explanatory diagram of a Hough transform for detecting a straight line according to a conventional technique.

【図5】従来技術による円弧を検出する方法の説明図で
ある。
FIG. 5 is an explanatory diagram of a method for detecting a circular arc according to the related art.

【図6】従来技術による円弧を検出する方法の説明図で
ある。
FIG. 6 is an explanatory diagram of a method for detecting a circular arc according to the related art.

【図7】従来技術による円弧を検出する方法の説明図で
ある。
FIG. 7 is an explanatory diagram of a method for detecting a circular arc according to the related art.

【図8】本発明の原理の説明図である。FIG. 8 is an explanatory diagram of the principle of the present invention.

【図9】本発明の原理の説明図である。FIG. 9 is an explanatory diagram of the principle of the present invention.

【図10】本発明の原理の説明図である。FIG. 10 is an explanatory diagram of the principle of the present invention.

【図11】本発明の累積メモリの構成を示す説明図であ
る。
FIG. 11 is an explanatory diagram showing a configuration of a cumulative memory of the present invention.

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

1 画像メモリ 2 始点探索手段 3 特性曲線累積手段 4 累積メモリ 5 ピーク検出手段 6 円・直線計算手段 DESCRIPTION OF SYMBOLS 1 Image memory 2 Starting point searching means 3 Characteristic curve accumulating means 4 Accumulating memory 5 Peak detecting means 6 Circle / straight line calculating means

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 図面上の直線・円弧を構成する図形の一
部の位置が既知であるとき、この位置を原点とし、図形
を構成する他の画素位置を(xi ,yi )(i=1,
2,...,,n;nは0でない画素値を持つ画素数)
で表したとき、複数のセルに離散化した(ω,φ)空間
において、 を満足するセルに画素値を累積し、累積値のピークを集
積点(ω0 ,φ0 )として求め、φ0 ≠0の場合には、
図形が原点からω0 の角度の方向にr0 =1/(2
φ0 )離れた位置に中心がある半径r0 の円弧を検出
し、φ0 =0の場合には、図形が原点を通り、ω0 +π
/2の角度の方向の直線を検出する図形検出方法。
1. When the position of a part of a figure forming a straight line or an arc on a drawing is known, this position is used as an origin, and other pixel positions forming the figure are defined as (x i , y i ) (i = 1
2,. . . , N; n is the number of pixels having a pixel value other than 0)
In the (ω, φ) space discretized into a plurality of cells, Is accumulated in a cell satisfying the following equation, and the peak of the accumulated value is obtained as an accumulation point (ω 0 , φ 0 ). When φ 0 ≠ 0,
R 0 = 1 / (2 figure is from the origin in the direction of the angle of ω 0
φ 0 ) An arc with a radius r 0 having a center at a distant position is detected. When φ 0 = 0, the figure passes through the origin and ω 0 + π
A figure detecting method for detecting a straight line in the direction of the angle of / 2.
【請求項2】 図面を画像として保持する画像メモリ
と、 前記画像を走査し図形の一部を始点として検出する始点
探索手段と、 (ω,φ)空間を複数のセルに離散化した累積メモリ
と、 前記始点の位置を原点とし、図形を構成するとみなされ
る0でない画素値を持つ画素の位置を(xi ,yi
(i=1,2,...,,n;nは0でない画素値を持
つ画素数)で表したとき、前記累積メモリのセル位置
(ω,φ)に対して、 を満足するセルに画素値を累積する特性曲線累積手段
と、 前記累積メモリの累積値のピークを集積点(ω0
φ0 )として求めるピーク検出手段と、 前記集積点(ω0 ,φ0 )の位置から、φ0 ≠0の場合
には、図形が原点からω0 の角度の方向にr0 =1/
(2φ0 )離れた位置に中心がある半径r0 の円弧を出
力し、φ0 =0の場合には、図形が原点を通り、ω0
π/2の角度の方向の直線を出力する円・直線計算手段
と、から成る図形検出装置。
2. An image memory for holding a drawing as an image, a starting point searching means for scanning the image and detecting a part of a figure as a starting point, and a cumulative memory for discretizing (ω, φ) space into a plurality of cells. And the position of a pixel having a non-zero pixel value regarded as constituting a figure as (x i , y i )
(I = 1, 2,..., N; n is the number of pixels having a pixel value other than 0), and the cell position (ω, φ) of the accumulation memory is A characteristic curve accumulating means for accumulating the pixel values in a cell that satisfies the peak of the accumulated value of the cumulative memory integrated point (omega 0,
a peak detection means for determining as a phi 0), the integrated point (ω 0, φ from the position of 0), .phi.0 the case of ≠ 0 is, r from figure origin in the direction of the angle ω 0 0 = 1 /
(2φ 0 ) An arc with a radius r 0 whose center is located at a distance is output. When φ 0 = 0, the figure passes through the origin and ω 0 +
and a circle / straight line calculating means for outputting a straight line in the direction of the angle of π / 2.
JP23274994A 1994-09-28 1994-09-28 Figure detection method and apparatus Expired - Lifetime JP2621810B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23274994A JP2621810B2 (en) 1994-09-28 1994-09-28 Figure detection method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23274994A JP2621810B2 (en) 1994-09-28 1994-09-28 Figure detection method and apparatus

Publications (2)

Publication Number Publication Date
JPH0896131A JPH0896131A (en) 1996-04-12
JP2621810B2 true JP2621810B2 (en) 1997-06-18

Family

ID=16944161

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23274994A Expired - Lifetime JP2621810B2 (en) 1994-09-28 1994-09-28 Figure detection method and apparatus

Country Status (1)

Country Link
JP (1) JP2621810B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5027783B2 (en) * 2008-11-25 2012-09-19 パナソニック株式会社 Circle detector
CN106296645A (en) * 2015-06-25 2017-01-04 株式会社理光 Image processing method and image processing apparatus

Also Published As

Publication number Publication date
JPH0896131A (en) 1996-04-12

Similar Documents

Publication Publication Date Title
JP6794766B2 (en) Fingerprint processing device, fingerprint processing method, program, fingerprint processing circuit
CN108875723B (en) Object detection method, device and system and storage medium
JP3249605B2 (en) Document edge detection device
JP5404263B2 (en) Parallax calculation method and parallax calculation device
JPH11351862A (en) Foregoing vehicle detecting method and equipment
JP2004129271A (en) Method for determining skew angle and position for document in overscanned image
JP4128837B2 (en) Road lane detection device
JP2621810B2 (en) Figure detection method and apparatus
Kröger et al. Performance evaluation on contour extraction using Hough transform and RANSAC for multi-sensor data fusion applications in industrial food inspection
JPH113421A (en) Method for detecting line segment
JP4552409B2 (en) Image processing device
JP5305366B2 (en) Image feature extraction device, image feature extraction method, image recognition device, and image recognition method
JPH11219435A (en) White line detector for automobile
JP2011186916A (en) Image recognition device, image recognition method and image recognition program
JPH01271883A (en) Detecting system for center of fingerprint
US20020159654A1 (en) Method for processing an image of a concrete construction
Satzoda et al. Gradient angle histograms for efficient linear hough transform
JP5579297B2 (en) Parallax calculation method and parallax calculation device
Liang et al. A configurable tilt license plate correction method based on parallel lines
JPH10312460A (en) Image processing method and high precision image processor
Poulain et al. High resolution remote sensing image analysis with exogenous data: A generic framework
JP2000163692A (en) Car type discriminating device
JP3653542B2 (en) Straight line detection method and straight line detection apparatus
JPH05266194A (en) Outline extracting device
Pochec Moire based stereo matching technique

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19970128