JPH05196424A - Pattern recognition method - Google Patents

Pattern recognition method

Info

Publication number
JPH05196424A
JPH05196424A JP4007302A JP730292A JPH05196424A JP H05196424 A JPH05196424 A JP H05196424A JP 4007302 A JP4007302 A JP 4007302A JP 730292 A JP730292 A JP 730292A JP H05196424 A JPH05196424 A JP H05196424A
Authority
JP
Japan
Prior art keywords
inclination
lead
point
image
straight line
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
Application number
JP4007302A
Other languages
Japanese (ja)
Other versions
JP3191373B2 (en
Inventor
Satoshi Yamauchi
智 山内
Keizo Izumida
圭三 泉田
Akira Mori
晃 毛利
Takashi Shimizu
隆 清水
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP00730292A priority Critical patent/JP3191373B2/en
Publication of JPH05196424A publication Critical patent/JPH05196424A/en
Application granted granted Critical
Publication of JP3191373B2 publication Critical patent/JP3191373B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To enable a binary image and a shaded image to be coped with and an image which is not uniformly bright to be recognized positively by performing a primary differential calculation of a data which is projected in a specified direction at a processing region which is set according to the inclination of an object for judging the size of the object. CONSTITUTION:An edge point which is obtained initially is detected for each line and an inclined straight line 12 is obtained by performing scanning in the direction of an arrow A within an inclination detection window 10 of a shaped image which is set from the size of an object and a center position 9 of a nozzle. A lead detection window 13 which is matched to the inclination of the straight line 12 is set and a region is determined. A data which is obtained by projecting a brightness value in a direction which is vertical to the inclination of the straight line 12 within the window 13 is subjected to primary differential calculation. The primary differential value is scanned from the direction of the arrow A, thus obtaining a judgment point 16 (17) which is larger (smaller) than a threshold value 14(15) with a positive (negative differential value. All pairs where the width is smaller than a lead width are extracted out of points 16 and 17 which are greatly in proximity and a coordinate zero-cross point 18 which reaches 0 while changing from a positive to a negative value which is obtained between the points 16 and 17 indicates the center position of a lead 7.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は回路基板に部品を装着す
る実装機等において、リード付き部品のリード位置を検
出するパターン認識方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a pattern recognition method for detecting the lead position of a leaded component in a mounting machine or the like for mounting components on a circuit board.

【0002】[0002]

【従来の技術】以下図面を参照しながら、従来のリード
付き部品のリード位置を検出するパターン認識方法の一
例について説明する。
2. Description of the Related Art An example of a conventional pattern recognition method for detecting the lead position of a leaded component will be described below with reference to the drawings.

【0003】撮像手段(CCDカメラ)によって撮像さ
れた対象物に対してしきい値を設定して2値化すること
により、対象物をHIGH、対象物以外の部分をLOW
と切り分ける。HIGHからLOW、あるいはLOWか
らHIGHに変化する部分が、対象物とそれ以外の部分
の境界となる。ここで、HIGHとLOWのうちHIG
Hの部分を境界を代表する点として境界点とする。
By setting a threshold value for the object imaged by the image pickup means (CCD camera) and binarizing it, the object is HIGH and the part other than the object is LOW.
And cut it. The part that changes from HIGH to LOW or from LOW to HIGH becomes the boundary between the object and the other part. Here, HIG of HIGH and LOW
The portion H is used as a boundary point as a point representing the boundary.

【0004】図5は従来のパターン認識方法を説明する
ための図である。図5(a)の2値画像において、対象
物内部の点(ノズル中心9)から、あらかじめ定められ
た方向に走査して、初めてHIGHからLOWに変化す
るHIGHの点を境界の始点19として検出する。境界
の始点19からあらかじめ定められた方向(右回り)に
境界となるHIGHの点を検索し、再び境界の始点19
に戻るまでの境界点列を求める。
FIG. 5 is a diagram for explaining a conventional pattern recognition method. In the binary image of FIG. 5A, a HIGH point that changes from HIGH to LOW for the first time is detected as a boundary start point 19 by scanning in a predetermined direction from a point (nozzle center 9) inside the object. To do. A HIGH point that becomes a boundary in a predetermined direction (clockwise) is searched from the boundary start point 19 and the boundary start point 19 is again searched.
Find the sequence of boundary points until returning to.

【0005】このようにして得られた境界点列から、右
回りを「+180度コーナー20」及び「+90度コー
ナー22」、左回りを「−180度コーナー21」及び
「−90度コーナー23」と設定することにより、図5
(b)のように各コーナーを検出することができる。そ
して、これらのコーナーの中で、+180度コーナー2
0はリードの先端位置であるからこの+180度コーナ
ー20の中心点を検出すれば、その点がリード位置24
となり、対象物の全てのリード位置24を検出すること
ができる。
From the boundary point sequence thus obtained, clockwise is "+180 degree corner 20" and "+90 degree corner 22", and counterclockwise is "-180 degree corner 21" and "-90 degree corner 23". By setting
Each corner can be detected as in (b). And, among these corners, +180 degree corner 2
Since 0 is the tip position of the lead, if the center point of this +180 degree corner 20 is detected, that point is the lead position 24.
Therefore, all lead positions 24 of the object can be detected.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、このよ
うな従来のパターン認識方法の場合、必ず撮像された画
像を2値化しなければならない。そして、境界を追跡し
た場合、境界の始点19から一定の方向に境界を走査
し、最終的に対象物の全境界点を通過して最初の境界点
の始点19に戻らなければならない。つまり、対象物の
外形が一筆書きできなければならない条件下でのパター
ン認識方法である。また、対象物への照明の当て方や撮
像方法によって図2のようにリード7部分が明るくボデ
ィ8が暗い画像に対しては、2値化することによってリ
ード7がHIGH、ボディ8とそれ以外の部分がLOW
となり、対象物を一つの境界点列で表わすことができな
いため、従来技術の適用が難しいという問題点があっ
た。そこで、本願発明はこの問題点を解決すべく、2値
画像及び濃淡画像のどちらにも対応でき、さらに一様な
明るさでない場合も確実に認識できるパターン認識方法
の提供を目的としたものである。
However, in the case of such a conventional pattern recognition method, the captured image must be binarized. When the boundary is traced, the boundary must be scanned in a fixed direction from the starting point 19 of the boundary, and finally all the boundary points of the object must be passed through to return to the starting point 19 of the first boundary point. In other words, it is a pattern recognition method under the condition that the outline of the object needs to be drawn with one stroke. In addition, as shown in FIG. 2, for an image in which the lead 7 portion is bright and the body 8 is dark depending on how to illuminate the object and the image capturing method, the lead 7 is HIGH and the body 8 and others are binarized. Is LOW
Therefore, there is a problem in that it is difficult to apply the conventional technique because the object cannot be represented by one boundary point sequence. Therefore, in order to solve this problem, the present invention aims to provide a pattern recognition method that can handle both a binary image and a grayscale image and that can reliably recognize even when the brightness is not uniform. is there.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に本発明のパターン認識方法は、撮像手段により対象物
を撮像して得られる画像に対して、対象物の傾きを検出
する第1の工程と、前記第1の工程で得られた対象物の
傾きから、処理すべき領域を設定する第2の工程と、前
記処理すべき領域において所定の方向に射影を行なう第
3の工程と、前記第3の工程にて得られた射影データに
対して1次微分をする第4の工程と、対象物のサイズを
判定する第5の工程と、前記第4の工程にて得た1次微
分値の符号が所定の方向に変化するゼロとなる点を検出
する第6の工程とを備えたことを特徴とするパターン認
識方法。
In order to achieve the above-mentioned object, the pattern recognition method of the present invention is a first method for detecting the inclination of an object with respect to an image obtained by imaging the object by the imaging means. A step, a second step of setting an area to be processed from the inclination of the object obtained in the first step, and a third step of projecting in a predetermined direction in the area to be processed, A fourth step of first-order differentiating the projection data obtained in the third step, a fifth step of determining the size of the object, and a first-order obtained in the fourth step. A sixth step of detecting a point at which the sign of the differential value changes to zero in a predetermined direction and becomes zero.

【0008】[0008]

【作用】上記の方法によれば、次の2つの作用がある。According to the above method, there are the following two actions.

【0009】(1)2値画像及び濃淡(多値)画像に対
応できる。 (2)対象物が一様な明るさでなくても可能である。
(1) It can handle binary images and grayscale (multivalued) images. (2) It is possible even if the object does not have uniform brightness.

【0010】[0010]

【実施例】以下、本発明の一実施例のパターン認識方法
について、図面を参照しながら説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A pattern recognition method according to an embodiment of the present invention will be described below with reference to the drawings.

【0011】図1は本発明の一実施例のパターン認識方
法のフローチャート、図2は対象物の一辺のリード位置
検出の方法を説明するための図である。
FIG. 1 is a flow chart of a pattern recognition method according to an embodiment of the present invention, and FIG. 2 is a diagram for explaining a method of detecting a lead position on one side of an object.

【0012】撮像手段(CCDカメラ)によって撮像さ
れた濃淡画像(図2(a))に対し、あらかじめ与えら
れている対象物のサイズ及びノズル中心位置から、傾き
検出ウインドウ10を設定し、このウインドウ内で矢印
Aの方向から走査し、最初に得られるエッジ点11を各
ライン毎に検出する。その後、エッジ点列を直線により
近似し、傾き直線12を求める(ステップ1)。
An inclination detection window 10 is set for a grayscale image (FIG. 2A) picked up by an image pickup means (CCD camera) from a given object size and nozzle center position, and this window is set. The inside is scanned from the direction of the arrow A, and the edge point 11 obtained first is detected for each line. After that, the edge point sequence is approximated by a straight line to obtain the inclination straight line 12 (step 1).

【0013】次に、傾き直線12の傾きに合わせたりリ
ード検出ウインドウ13を設定し、領域を決定する(ス
テップ2)。このウインドウは、傾き直線12に平行
で、かつリードを含むように設定されており、図2
(b)のようになっている。そして、リード検出ウイン
ドウ13内を傾き直線12の傾きと垂直な方向に輝度値
の射影を行うことにより、図2(c)のようなデータを
得ることができる(ステップ3)。
Next, the read detection window 13 is set according to the inclination of the inclination straight line 12 and the area is determined (step 2). This window is set so as to be parallel to the inclination straight line 12 and to include the lead, as shown in FIG.
It looks like (b). Then, by projecting the luminance value in the lead detection window 13 in a direction perpendicular to the inclination of the inclination straight line 12, data as shown in FIG. 2C can be obtained (step 3).

【0014】さらに、射影(ステップ3)によって得ら
れたデータに対して1次微分を施す(ステップ4)と、
図2(d)のようになる。
Furthermore, when the primary differentiation is applied to the data obtained by the projection (step 3) (step 4),
It becomes like FIG.2 (d).

【0015】そして得られる一次微分4のデータを用い
てリードの中心位置を検出することになる。以下にこの
検出方法を説明する。
Then, the center position of the lead is detected using the obtained data of the first differential 4. This detection method will be described below.

【0016】まず、一次微分値を矢印Aの方向から走査
し、微分値が正のしきい値14より大きくなる判定点A
16及び微分値が負のしきい値15より小さくなる判定
点B17を求める。そして、最も近接する判定点A16
と判定点B17のペアを求め、その幅がリード幅よりも
小さいペアを全て抽出する(ステップ5)。
First, the primary differential value is scanned from the direction of arrow A, and the determination point A at which the differential value becomes larger than the positive threshold value 14 is obtained.
16 and a decision point B17 in which the differential value is smaller than the negative threshold value 15 are obtained. Then, the closest decision point A16
Then, a pair of determination points B17 is obtained, and all pairs whose width is smaller than the read width are extracted (step 5).

【0017】最後に、判定点A16から判定点B17の
間で正から負に変化するゼロとなる座標(ゼロクロス点
18)を求める。このゼロクロス点がリードの中心位置
を示すことになる(ステップ6)。
Finally, a coordinate (zero cross point 18) which becomes zero and changes from positive to negative between the determination point A16 and the determination point B17 is obtained. This zero-cross point indicates the center position of the lead (step 6).

【0018】以上により、一方向を向いたリードの位置
検出が完了する。他の辺のリード検出については、図3
のように各辺に傾き検出ウインドウ10を設定してリー
ド位置を検出すればよい。あるいは、図4のように上記
得られた傾き直線12と対象物のサイズから、各辺にリ
ード検出ウインドウ13を設定してリード位置を検出し
てもよい。
By the above, the position detection of the lead facing in one direction is completed. For lead detection on the other side, refer to FIG.
As described above, the tilt detection window 10 may be set on each side to detect the lead position. Alternatively, as shown in FIG. 4, the lead position may be detected by setting the lead detection window 13 on each side from the obtained inclination straight line 12 and the size of the object.

【0019】[0019]

【発明の効果】以上述べたように、本発明のパターン認
識方法によれば、次の2つの効果が得られる。
As described above, according to the pattern recognition method of the present invention, the following two effects can be obtained.

【0020】(1)2値画像及び濃淡(多値)画像に対
応できる。 (2)対象物が一様な明るさでなくても可能である。
(1) It can handle binary images and grayscale (multivalued) images. (2) It is possible even if the object does not have uniform brightness.

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

【図1】本発明の一実施例におけるパターン認識方法の
概略を示したフローチャート
FIG. 1 is a flowchart showing an outline of a pattern recognition method according to an embodiment of the present invention.

【図2】対象物の一辺のリード位置検出の方法を説明し
た図
FIG. 2 is a diagram illustrating a method of detecting a lead position on one side of an object.

【図3】図2で検出された以外の辺の検出方法を説明す
るための図
FIG. 3 is a diagram for explaining a method of detecting edges other than those detected in FIG.

【図4】図2で検出された以外の辺の検出方法を説明す
るための図
FIG. 4 is a diagram for explaining a side detection method other than that detected in FIG.

【図5】従来のパターン認識方法を説明するための図FIG. 5 is a diagram for explaining a conventional pattern recognition method.

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

10 傾き検出ウインドウ 11 エッジ点 12 傾き直線 13 リード検出ウインドウ 18 ゼロクロス点 10 Tilt detection window 11 Edge point 12 Tilt line 13 Lead detection window 18 Zero cross point

───────────────────────────────────────────────────── フロントページの続き (72)発明者 清水 隆 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Takashi Shimizu 1006 Kadoma, Kadoma City, Osaka Prefecture Matsushita Electric Industrial Co., Ltd.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 撮像手段により対象物を撮像して得られ
る画像に対して対象物の傾きを検出する第1の工程と、
前記第1の工程で得られた対象物の傾きから、処理すべ
き領域を設定する第2の工程と、前記処理すべき領域に
おいて所定の方向に射影を行なう第3の工程と、前記第
3の工程にて得られた射影データに対して1次微分をす
る第4の工程と、対象物のサイズを判定する第5の工程
と、前記第4の工程にて得た1次微分値の符号が所定の
方向に変化するゼロとなる点を検出する第6の工程とを
備えたことを特徴とするパターン認識方法。
1. A first step of detecting an inclination of an object with respect to an image obtained by imaging the object by an imaging means,
A second step of setting an area to be processed from the inclination of the object obtained in the first step, a third step of projecting in a predetermined direction in the area to be processed, and the third step. Of the first derivative of the projection data obtained in the step, a fifth step of determining the size of the object, and a fourth derivative of the first derivative obtained in the fourth step. A sixth step of detecting a point at which the code changes to zero in a predetermined direction and becomes zero.
JP00730292A 1992-01-20 1992-01-20 Pattern recognition method Expired - Fee Related JP3191373B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP00730292A JP3191373B2 (en) 1992-01-20 1992-01-20 Pattern recognition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP00730292A JP3191373B2 (en) 1992-01-20 1992-01-20 Pattern recognition method

Publications (2)

Publication Number Publication Date
JPH05196424A true JPH05196424A (en) 1993-08-06
JP3191373B2 JP3191373B2 (en) 2001-07-23

Family

ID=11662228

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00730292A Expired - Fee Related JP3191373B2 (en) 1992-01-20 1992-01-20 Pattern recognition method

Country Status (1)

Country Link
JP (1) JP3191373B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002134991A (en) * 2000-10-24 2002-05-10 Juki Corp Method and machine for mounting electronic part

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002134991A (en) * 2000-10-24 2002-05-10 Juki Corp Method and machine for mounting electronic part
JP4546635B2 (en) * 2000-10-24 2010-09-15 Juki株式会社 Electronic component mounting method and apparatus

Also Published As

Publication number Publication date
JP3191373B2 (en) 2001-07-23

Similar Documents

Publication Publication Date Title
JPH06203154A (en) Image processor
JP2888735B2 (en) Travel lane detection device
JP3711599B2 (en) Mounting component inspection equipment
JP2006163821A (en) Photographing device, image processor, image processing method, and program
JP2962799B2 (en) Roadside detection device for mobile vehicles
JPH05196424A (en) Pattern recognition method
KR100295360B1 (en) Image Processing Method Using Shading Algorithm
JP3638028B2 (en) Vehicle number recognition device
JP4172236B2 (en) Facial image processing apparatus and program
JP2000194861A (en) Method and device for recognizing image
JPH0520593A (en) Travelling lane recognizing device and precedence automobile recognizing device
JP3779741B2 (en) Character image binarization method
JP2710685B2 (en) Defect detection method by visual inspection
JPH0935065A (en) On-vehicle image processor
JP2002236925A (en) Image inspection device
JPH02156383A (en) Method for pattern matching
JP3050555B2 (en) Tilt detecting method and tilt detecting device
JP2904228B2 (en) Pattern recognition method
JPH0143351B2 (en)
JP2972311B2 (en) Roadside detection device for mobile vehicles
JPH11351835A (en) Method for extracting contour line of cutting edge by processing taken image of tool
CN112257705A (en) Method for identifying picture character content
JP2514727B2 (en) Defect inspection method by visual inspection
JPH02254574A (en) Noise removing system
JPH0728953A (en) Character detecting device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees