JPH0581423A - Pattern recognizing method - Google Patents
Pattern recognizing methodInfo
- Publication number
- JPH0581423A JPH0581423A JP3245551A JP24555191A JPH0581423A JP H0581423 A JPH0581423 A JP H0581423A JP 3245551 A JP3245551 A JP 3245551A JP 24555191 A JP24555191 A JP 24555191A JP H0581423 A JPH0581423 A JP H0581423A
- Authority
- JP
- Japan
- Prior art keywords
- area
- straight line
- center
- gravity
- boundary
- 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
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
(57)【要約】
【目的】 対象物画像の輪郭を正確に直線近似で求める
パターン認識方法を提供することを目的とする。
【構成】 (a)境界点検出手段により領域8内の画像
輪郭のすべての境界点10を求め、(b)領域分割手段
により領域8を所定方向で小領域に分割し、(c)領域
内重心計算手段により小領域内の境界点の重心7を求
め、(d)雑音点除去手段により隣接する小領域の重心
を互いに直線で結んだ折れ線を求め、所定方向側(斜線
部)の境界点を除去し、(e)近似直線検出手段により
残った境界点に最小自乗法で近似直線を求めて輪郭に対
応する直線とする。
(57) [Abstract] [Purpose] It is an object of the present invention to provide a pattern recognition method for accurately determining the contour of an object image by linear approximation. [Structure] (a) The boundary point detection means finds all boundary points 10 of the image contour in the area 8, (b) the area dividing means divides the area 8 into small areas in a predetermined direction, and (c) the area The center of gravity 7 of the boundary point in the small area is obtained by the center of gravity calculation means, and (d) the polygonal line connecting the center of gravity of the adjacent small areas with a straight line is obtained by the noise point removal means, and the boundary point on the predetermined direction side (hatched portion) Is removed, and (e) an approximate straight line is obtained at the boundary points remaining by the approximate straight line detecting means by the method of least squares and is set as a straight line corresponding to the contour.
Description
【0001】[0001]
【産業状の利用分野】本発明は表面実装用電子部品の位
置や傾きを検出するために、撮像手段で撮像された画像
内の対象物と背景との境界点から求めた近似直線で対象
物の輪郭を検出するパターン認識方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention uses an approximate straight line obtained from the boundary point between the object and the background in the image picked up by the image pickup means in order to detect the position and inclination of the surface mounting electronic component. The present invention relates to a pattern recognition method for detecting the contour of a pattern.
【0002】[0002]
【従来の技術】近年、パターン認識を利用した機器が広
く用いられるが、その認識精度が課題である。2. Description of the Related Art In recent years, devices utilizing pattern recognition have been widely used, but their recognition accuracy is a problem.
【0003】以下、従来のパターン認識方法について、
対象物(QFP)の輪郭を直線近似して検出する場合を
例に説明する。The conventional pattern recognition method will be described below.
An example will be described in which the contour of the object (QFP) is detected by linear approximation.
【0004】図3は従来のパターン認識方法の過程をパ
ターン図で示す。図3の(a)に示す画像11におい
て、粗中心検出領域12を水平方向と垂直方向に設定す
る。上記水平方向粗中心検出領域12の両端から検索し
て、対象物の水平方向の両端を抽出し、水平方向の中心
を求める。また、垂直方向粗中心検出領域12の両端か
ら検索して、対象物の垂直方向の両端を抽出し、垂直方
向の中心を求めることにより対象物の粗中心13を検出
することができる。得られた粗中心13と対象物の寸法
から図3の(b)に示すように、対象物のリード9を含
む検出領域8を対象物(QFP)の4辺に設定する。つ
ぎに、検出領域8で背景からQFPリード9の先端方向
に検出することにより、図3の(c)に示すようにリー
ド9の境界点10を抽出ことができる。上記得られた境
界点10に関して最小2乗法を適用することにより図3
の(d)に示すように直線を得ることができる。上記得
られた直線から各境界点までの距離が、あらかじめ定め
られた基準距離以上離れている場合、その境界点を雑音
点と見なして除去し、基準距離以内の境界点に関して最
小2乗法を適用することによって、図3の(e)に示す
ような近似直線14を検出することができる。以上の処
理を対象物(QFP)の4辺について行うことによっ
て、図3の(f)に示すように4辺の近似直線14を検
出することができる。上記4つの近似直線14の隣り合
う直線の交点を求め、その交点の重心を求めることによ
り対象物の中心位置を検出できる。FIG. 3 is a pattern diagram showing the steps of a conventional pattern recognition method. In the image 11 shown in FIG. 3A, the coarse center detection area 12 is set in the horizontal direction and the vertical direction. Both ends of the horizontal coarse center detection area 12 are searched to extract both ends of the object in the horizontal direction to obtain the center in the horizontal direction. Further, the rough center 13 of the object can be detected by searching both ends of the vertical direction rough center detection area 12, extracting both ends of the object in the vertical direction, and obtaining the center in the vertical direction. From the obtained coarse center 13 and the size of the target object, as shown in FIG. 3B, the detection regions 8 including the leads 9 of the target object are set on four sides of the target object (QFP). Next, by detecting in the detection area 8 from the background toward the tip of the QFP lead 9, the boundary point 10 of the lead 9 can be extracted as shown in FIG. By applying the method of least squares on the boundary point 10 obtained above, FIG.
A straight line can be obtained as shown in (d). When the distance from the obtained straight line to each boundary point is more than a predetermined reference distance, the boundary point is regarded as a noise point and removed, and the least squares method is applied to the boundary points within the reference distance. By doing so, it is possible to detect the approximate straight line 14 as shown in FIG. By performing the above processing on the four sides of the object (QFP), the approximate straight lines 14 on the four sides can be detected as shown in (f) of FIG. The center position of the object can be detected by obtaining the intersection of adjacent straight lines of the four approximate straight lines 14 and obtaining the center of gravity of the intersection.
【0005】[0005]
【発明が解決しようとする課題】このような従来のパタ
ーン認識方法では、本来の境界点でない雑音点が多くな
ると、正確な近似直線を検出することが難しくなる。た
とえば、図4の(a)に示すような画像の場合、従来の
方法では図4の(b)示すような近似直線14となり、
QPFリード9の先端位置を結ぶ直線が検出されていな
い。In such a conventional pattern recognition method, it becomes difficult to detect an accurate approximate straight line when there are many noise points that are not the original boundary points. For example, in the case of an image as shown in FIG. 4A, the conventional method produces an approximate straight line 14 as shown in FIG.
The straight line connecting the tip positions of the QPF leads 9 is not detected.
【0006】本発明は上記課題を解決するもので、雑音
点の多い形状であっても、正確に輪郭を検出できるパタ
ーン認識方法を提供することを目的とする。An object of the present invention is to solve the above problems, and an object thereof is to provide a pattern recognition method capable of accurately detecting a contour even in a shape having many noise points.
【0007】[0007]
【課題を解決擦るための手段】本発明は上記目的を達成
するために、撮像手段により対象物を撮像して得られる
画像に対し、境界点検出手段によりあらかじめ定めた領
域内で前記対象物と背景とのすべての境界点を検出し、
領域分割手段により前記領域を一定方向に複数個の小領
域に分割し、領域内重心計算手段によりそれぞれの小領
域内の境界点の重心を求め、雑音点除去手段により各隣
接する小領域の前記重心を互いに直線で結んだ折れ線か
らあらかじめ定められた方向にある境界点を雑音点とし
て除去し、近似直線検出手段により残ったすべての境界
点を対象として最小2乗法により近似直線を求め、複数
の前記近似直線により前記対象物の輪郭を求めるように
したパターン認識方法とする。SUMMARY OF THE INVENTION In order to achieve the above object, the present invention relates to an image obtained by picking up an image of an object by an image pick-up means, in the area determined in advance by a boundary point detection means. Find all boundary points with the background,
The area dividing means divides the area into a plurality of small areas in a predetermined direction, the in-area center of gravity calculating means obtains the center of gravity of the boundary point in each of the small areas, and the noise point removing means calculates the adjacent small areas. Boundary points in a predetermined direction are removed from the polygonal line connecting the centers of gravity with straight lines as noise points, and an approximate straight line is obtained by the least-squares method for all boundary points remaining by the approximate straight line detecting means, and a plurality of approximate straight lines are obtained. The pattern recognition method is such that the contour of the object is obtained from the approximate straight line.
【0008】[0008]
【作用】本発明は上記の構成において、所望の位置から
大きくずれた点が雑音点として除去され、有効な点列の
みで近似直線を検出する。According to the present invention, in the above structure, a point greatly deviated from a desired position is removed as a noise point, and an approximate straight line is detected only by an effective point sequence.
【0009】[0009]
(実施例1)以下、本発明のパターン検出方法について
図面を参照しながら説明する。図1は本発明の一実施例
のパターン検出方法の過程を示すフローチャート、図2
は本発明のパターン認識方法の動作を示すパターン図で
ある。(Embodiment 1) A pattern detecting method of the present invention will be described below with reference to the drawings. FIG. 1 is a flowchart showing a process of a pattern detection method according to an embodiment of the present invention, FIG.
FIG. 6 is a pattern diagram showing the operation of the pattern recognition method of the present invention.
【0010】まず、ステップ1の開始前の処理として、
従来と同じ方法により対象物の粗中心を求め、図2の
(a)に示すように、粗中心から粗検出領域8を設定
し、その検出領域8で対象物の輪郭を示す近似直線を決
定する。First, as the processing before the start of step 1,
The coarse center of the object is obtained by the same method as the conventional method, the coarse detection area 8 is set from the coarse center as shown in FIG. 2A, and the approximate straight line showing the contour of the object is determined in the detection area 8. To do.
【0011】つぎにステップ1において、検出領域8の
QFPリード9の先端方向からスキャンして、境界点1
0を検出する。つぎに、ステップ2において検出領域8
を図2の(b)に示すように一定方向に4等分に分割す
る。つぎにステップ3において図2の(c)に示すよう
に、分割した各領域内の境界点10の座標から重心を計
算して領域内重心7を求める。つぎに、ステップ4にお
いて図2の(d)に示すように隣接する領域の重心を連
結する。いま、必要とする境界点はQFPリード9の先
端部分である。したがって、図2の(d)に示した斜線
部分に存在する境界点を雑音点として削除する。つぎに
ステップ5において、残った境界点に関して最小2乗法
を適用して図2の(e)に示すように近似直線を検出す
る。Next, in step 1, scanning is performed from the front end direction of the QFP lead 9 in the detection area 8 to determine the boundary point 1
Detect 0. Next, in step 2, the detection area 8
Is divided into four equal parts in a fixed direction as shown in FIG. Next, in step 3, as shown in FIG. 2C, the center of gravity 7 is calculated by calculating the center of gravity from the coordinates of the boundary points 10 in each of the divided areas. Next, in step 4, the centers of gravity of adjacent areas are connected as shown in FIG. Now, the required boundary point is the tip portion of the QFP lead 9. Therefore, the boundary points existing in the shaded area shown in FIG. 2D are deleted as noise points. Next, in step 5, the least squares method is applied to the remaining boundary points to detect an approximate straight line as shown in (e) of FIG.
【0012】以上のように本発明のパターン認識方法に
よれば、撮像手段により対象物を撮像して得られる画像
で、あらかじめ定められた領域内で、対象物と背景を境
界点とし、すべての境界点を検出する第1行程、あらか
じめ定められた領域を一定方向に複数分割する第2行
程、上記複数分割された領域の一つの領域内で境界点座
標の重心を求める第3の行程、各近接擦る領域の重心を
結んだ直線からあらかじめ定められた方向にある境界点
を雑音点として除去する第4行程、上記で残った境界点
から最小2乗法により近似直線を求める第5行程を備え
たパターン認識方法とすることにより、輪郭から大きく
ずれた点を雑音点として除去し、的確な点列のみを用い
て正確な近似直線を検出することができる。As described above, according to the pattern recognition method of the present invention, an image obtained by picking up an image of an object by the image pickup means is used as a boundary point between the object and the background within a predetermined area. A first step of detecting a boundary point, a second step of dividing a predetermined area into a plurality of areas in a certain direction, and a third step of obtaining a center of gravity of boundary point coordinates in one area of the plurality of divided areas. A fourth step of removing a boundary point in a predetermined direction as a noise point from the straight line connecting the centers of gravity of the areas rubbed in close proximity, and a fifth step of obtaining an approximate straight line from the remaining boundary points by the least square method By adopting the pattern recognition method, it is possible to remove a point greatly deviated from the contour as a noise point and detect an accurate approximate straight line using only an accurate point sequence.
【0013】[0013]
【発明の効果】以上の実施例から明かなように、本発明
は撮像手段により対象物を撮像して得られる画像に対
し、境界点検出手段によりあらかじめ定めた領域内で前
記対象物と背景とのすべての境界点を検出し、領域分割
手段により前記領域を一定方向に複数個の小領域に分割
し、領域内重心計算手段によりそれぞれの小領域内の境
界点の重心を求め、雑音点除去手段により各隣接する小
領域の前記重心を互いに直線で結んだ折れ線からあらか
じめ定められた方向にある境界点を雑音点として除去
し、近似直線検出手段により残ったすべての境界点を対
象として最小2乗法により近似直線を求め、複数の前記
近似直線により前記対象物の輪郭を求めるようにしたパ
ターン認識方法とすることにより、輪郭から大きくずれ
た点を雑音点として除去し、的確な点列のみを用いて正
確な近似直線を検出することができる。As is apparent from the above embodiments, the present invention relates to an image obtained by picking up an image of an object by the image pickup means, and the background and the object within a predetermined area by the boundary point detection means. All the boundary points are detected, the area dividing means divides the area into a plurality of small areas in a certain direction, and the center-of-area centroid calculating means finds the center of gravity of each boundary area to eliminate noise points. Means removes, as noise points, boundary points existing in a predetermined direction from the polygonal line connecting the centers of gravity of the adjacent small areas to each other with a straight line, and all the boundary points remaining by the approximate straight line detecting means are set to a minimum of 2 By using a pattern recognition method in which an approximate straight line is obtained by a multiplicative method, and the contour of the object is obtained by a plurality of the approximate straight lines, points greatly deviated from the contour are removed as noise points. And, it is possible to detect an accurate approximate line using only exact sequence of points.
【図1】本発明の一実施例のパターン認識方法の動作を
示すフローチャートFIG. 1 is a flowchart showing an operation of a pattern recognition method according to an embodiment of the present invention.
【図2】本発明の一実施例のパターン認識方法による近
似直線検出の手順を示すパターン図FIG. 2 is a pattern diagram showing a procedure for detecting an approximate straight line by a pattern recognition method according to an embodiment of the present invention.
【図3】従来のパターン認識方法の手順を示すパターン
図FIG. 3 is a pattern diagram showing a procedure of a conventional pattern recognition method.
【図4】本発明の方法と従来の方法による近似直線の抽
出結果を示すパターン図FIG. 4 is a pattern diagram showing an extraction result of an approximate straight line by the method of the present invention and the conventional method.
1 境界点検出手段により輪郭の境界点を検出する動作 2 領域検出手段により領域を小領域に分割する動作 3 領域内重心計算手段により小領域内の境界点の重心
を計算する動作 4 雑音点除去手段により雑音点を除去する動作 5 近似直線検出手段により残存境界点から近似直線を
検出する動作1 operation of detecting boundary points of contour by boundary point detecting means 2 operation of dividing area into small areas by area detecting means 3 operation of calculating center of gravity of boundary points in small area by area center of gravity calculating means 4 noise point removal Operation for removing noise points by means 5 Operation for detecting approximate straight line from remaining boundary points by approximate straight line detecting means
フロントページの続き (72)発明者 清水 隆 大阪府門真市大字門真1006番地 松下電器 産業株式会社内Front page continuation (72) Inventor Takashi Shimizu 1006 Kadoma, Kadoma City, Osaka Prefecture Matsushita Electric Industrial Co., Ltd.
Claims (1)
る画像に対し、境界点検出手段によりあらかじめ定めた
領域内で前記対象物と背景とのすべての境界点を検出
し、領域分割手段により前記領域を一定方向に複数個の
小領域に分割し、領域内重心計算手段によりそれぞれの
小領域内の境界点の重心を求め、雑音点除去手段により
各隣接する小領域の前記重心を互いに直線で結んだ折れ
線からあらかじめ定められた方向にある境界点を雑音点
として除去し、近似直線検出手段により残ったすべての
境界点を対象として最小2乗法により近似直線を求め、
複数の前記近似直線により前記対象物の輪郭を求めるよ
うにしたパターン認識方法。1. An image obtained by picking up an image of an object by an image pickup means, all boundary points between the object and the background are detected by a boundary point detection means within a predetermined area, and the area division means is used. The area is divided into a plurality of small areas in a certain direction, the center of gravity of the boundary points in each small area is obtained by the area center of gravity calculating means, and the center of gravity of each adjacent small area is made straight by the noise point removing means. Boundary points in a predetermined direction are removed as noise points from the polygonal line connected by, and an approximate straight line is obtained by the least squares method for all boundary points remaining by the approximate straight line detecting means,
A pattern recognition method in which the contour of the object is obtained from a plurality of the approximate straight lines.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3245551A JP2855913B2 (en) | 1991-09-25 | 1991-09-25 | Pattern recognition method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3245551A JP2855913B2 (en) | 1991-09-25 | 1991-09-25 | Pattern recognition method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0581423A true JPH0581423A (en) | 1993-04-02 |
| JP2855913B2 JP2855913B2 (en) | 1999-02-10 |
Family
ID=17135384
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP3245551A Expired - Fee Related JP2855913B2 (en) | 1991-09-25 | 1991-09-25 | Pattern recognition method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2855913B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6550085B2 (en) | 1997-06-23 | 2003-04-22 | Georges M. Roux | Support for expansible cells |
-
1991
- 1991-09-25 JP JP3245551A patent/JP2855913B2/en not_active Expired - Fee Related
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6550085B2 (en) | 1997-06-23 | 2003-04-22 | Georges M. Roux | Support for expansible cells |
| US6684430B2 (en) | 1997-06-23 | 2004-02-03 | Georges M. Roux | Support for expansible cells |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2855913B2 (en) | 1999-02-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101210800A (en) | Device and method for measuring distance using structured light | |
| JP2745764B2 (en) | Position recognition device | |
| JP4631197B2 (en) | Branch determination device, program, and recording medium | |
| JP5160366B2 (en) | Pattern matching method for electronic parts | |
| JPH0581423A (en) | Pattern recognizing method | |
| JP3243916B2 (en) | Circular pattern measurement and position recognition device | |
| JP2002288678A (en) | Method of measuring center position of circular mark and alignment method in substrate exposure apparatus | |
| JP2798349B2 (en) | Vehicle position detection device | |
| JPH10269365A (en) | Feature extraction method and object recognition device using the method | |
| JP3867410B2 (en) | Three-dimensional visual positioning method and apparatus | |
| JPH11219435A (en) | Automotive white line detector | |
| JPH065545B2 (en) | Figure recognition device | |
| JP2825359B2 (en) | Pattern recognition method | |
| JP4566686B2 (en) | Method and apparatus for determining shape of object | |
| JP3311551B2 (en) | Image data input processing method and apparatus | |
| JP3375242B2 (en) | Robot object recognition method and apparatus | |
| JPH065544B2 (en) | Figure recognition device | |
| JP2000269700A (en) | Pattern matching recognition method | |
| JPH08166355A (en) | Defect inspection apparatus | |
| JP2507818B2 (en) | Road guide line break point position detection device | |
| JP2514257B2 (en) | Road guide line feature calculation point setting device | |
| JP4365619B2 (en) | Edge detection device, component recognition device, edge detection method, and component recognition method | |
| JP2954498B2 (en) | Method for estimating joint position of electronic components | |
| JPH1166326A (en) | Pattern recognition method and apparatus | |
| JPH074931A (en) | Peak detection method using light-section method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |