JPH0737104A - Method and device for processing picture - Google Patents

Method and device for processing picture

Info

Publication number
JPH0737104A
JPH0737104A JP5182938A JP18293893A JPH0737104A JP H0737104 A JPH0737104 A JP H0737104A JP 5182938 A JP5182938 A JP 5182938A JP 18293893 A JP18293893 A JP 18293893A JP H0737104 A JPH0737104 A JP H0737104A
Authority
JP
Japan
Prior art keywords
center
points
mark
hypothetical
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5182938A
Other languages
Japanese (ja)
Inventor
Shinji Inagaki
真次 稲垣
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.)
Yamaha Motor Co Ltd
Original Assignee
Yamaha Motor 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 Yamaha Motor Co Ltd filed Critical Yamaha Motor Co Ltd
Priority to JP5182938A priority Critical patent/JPH0737104A/en
Publication of JPH0737104A publication Critical patent/JPH0737104A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Supply And Installment Of Electrical Components (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

PURPOSE:To precisely detect the center position of a mark even if a lack, distortion or the like exists in the picture of the mark when the center position of the mark is obtained from the picture of the mark in a circle. CONSTITUTION:Three points (P1, P2 and P3) at prescribed distances on a boundary becoming the outline of the picture of the mark in the circle are set, and the position of an assumed center point being the center point of the circle passing through the three points is operated. The processing is repetitively executed while the three points are shifted on the boundary. The distribution of frequency is obtained for respective unit sections on a two-dimensional coordinate on the mutliple assumed center points. Then, the centroids of them are operated from the assumed center points existing in a prescribed range where a position whose frequency on the assumed center point is the highest is set to be the center. The centroid is set to be the center position of the mark.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、実装機においてプリン
ト基板に付されたマークにより基板の位置を検出する場
合等に行う画像処理の技術に関するものであり、とく
に、円形のマークの中心位置を求めるための方法および
装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique of image processing performed when a position of a board is detected by a mark attached to a printed board in a mounting machine. It relates to a method and a device for determining.

【0002】[0002]

【従来の技術】マーク等を撮像した画像を処理して位置
検出等を行う画像処理技術は各種分野において知られ、
例えば、プリント基板にチップ部品(電子部品)を実装
する実装機において、プリント基板の位置検出のために
プリント基板に付されているマークを検出する場合等に
採用されている。
2. Description of the Related Art Image processing technology for processing a captured image of a mark or the like to detect a position is known in various fields,
For example, it is used in a mounting machine that mounts a chip component (electronic component) on a printed circuit board, when detecting a mark attached to the printed circuit board to detect the position of the printed circuit board.

【0003】すなわち、上記実装機においては、搬送手
段によりプリント基板を所定位置に搬送した後、吸着ノ
ズルを備えた移動可能なヘッドにより、部品供給部から
チップ部品を吸着し、これをプリント基板上の目的位置
へ装着するようになっているが、この装着作業を正確に
行うためには、搬送手段により搬送されたプリント基板
の位置を検出することが必要である。このため、通常、
上記プリント基板に円形のマークを予め付しておき、上
記ヘッド等に装備した基板検出用カメラでマークを撮像
し、その画像を処理してマークの中心位置を求めるよう
にしている。
That is, in the above mounting machine, after the printed circuit board is transported to a predetermined position by the transporting means, the movable head having the suction nozzle suctions the chip component from the component supply unit, and the chip component is sucked onto the printed circuit board. However, in order to perform this mounting work accurately, it is necessary to detect the position of the printed circuit board transported by the transport means. For this reason,
A circular mark is attached to the printed board in advance, the mark is picked up by a board detecting camera mounted on the head or the like, and the image is processed to obtain the center position of the mark.

【0004】従来、このような場合の画像処理として
は、例えば、対象画像における境界画素を次々に追跡し
ていく境界追跡(特開平5−114027号公報参照)
等の手法で対象画像の外形を調べた上で、その重心を求
め、これをマークの中心位置の検出値としていた。
Conventionally, as image processing in such a case, for example, boundary tracking in which boundary pixels in a target image are sequentially tracked (see Japanese Patent Laid-Open No. 5-114027).
After examining the outer shape of the target image by the method described above, the center of gravity of the target image was obtained and used as the detected value of the center position of the mark.

【0005】[0005]

【発明が解決しようとする課題】上記のような従来の手
法によると、図10(a)(b)に示すように、マーク
の画像に欠けや歪み等があった場合に精度が低下し易い
という問題があった。すなわち、実際のマークMは円形
であっても、マークの表面状態や照明の不均一等によ
り、図10(a)中に実線で示すように入力された画像
Miには部分的に凹曲状等の欠けLが発生したり、歪み
が生じたりする場合がある。あるいはまた、マークの一
部がカメラの視野に入っていなかった場合等に、図10
(b)中に実線で示すように画像Miが直線的に切れた
欠落部分L′を有する欠円形状となるような場合もあ
る。このように欠けL、欠落部分L′等が生じている場
合、従来の手法では、マーク中心位置の検出値とされる
重心Ciが実際のマーク中心位置Caからずれてしま
い、誤差を生じることとなる。
According to the conventional method as described above, as shown in FIGS. 10 (a) and 10 (b), the accuracy is apt to decrease when the mark image has a defect or distortion. There was a problem. That is, even if the actual mark M is circular, the input image Mi is partially curved as shown by the solid line in FIG. There may be a case in which a chip L such as a crack occurs or a distortion occurs. Alternatively, when a part of the mark is out of the field of view of the camera,
In some cases, as shown by the solid line in (b), the image Mi has a missing circular shape having a missing portion L ′ that is linearly cut. When the missing L, the missing portion L ′, and the like are generated in this manner, the conventional method causes the center of gravity Ci, which is the detected value of the mark center position, to deviate from the actual mark center position Ca, resulting in an error. Become.

【0006】本発明は、上記の事情に鑑み、マークの画
像に欠けや歪み等があった場合にも精度良くマーク中心
位置を検出することができる画像処理方法および同装置
を提供することを目的とする。
In view of the above circumstances, it is an object of the present invention to provide an image processing method and apparatus capable of accurately detecting the center position of a mark even if the mark image has a defect or distortion. And

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、本発明の画像処理方法は、円形のマークの画像から
マークの中心位置を求める画像処理方法であって、上記
マークの画像の輪郭となる境界線を追跡し、この境界線
上に所定距離をおいた3点を設定して、これら3点を通
る円の中心点である仮定中心点の位置を演算し、この仮
定中心点演算の処理を、上記境界線上で3点を移動させ
つつ繰返し行い、こうして得られる多数個の仮定中心点
の演算値から2次元空間上で仮定中心点の分布を求めた
後、2次元空間上で仮定中心点が最も密集する位置を検
出し、この位置を中心とした所定範囲内に存在する仮定
中心点からこれらの重心を演算し、この重心を上記マー
クの中心位置とするようにしたものである。
In order to achieve the above object, an image processing method of the present invention is an image processing method for obtaining a center position of a mark from an image of a circular mark, the outline of the image of the mark. The boundary line is defined as follows, three points are set on this boundary line with a predetermined distance, and the position of the hypothetical center point which is the center point of the circle passing through these three points is calculated. The processing is repeated while moving three points on the boundary line, and the distribution of the hypothesized central points is obtained in the two-dimensional space from the calculated values of the large number of hypothesized central points obtained in this way, and then the hypothesis is assumed in the two-dimensional space. The position where the central points are most densely detected is detected, these barycenters are calculated from the hypothesized center points existing within a predetermined range centered on this position, and this barycenter is made to be the center position of the mark. .

【0008】また、上記方法を実施する画像処理装置
は、撮像手段により撮像された円形のマークの画像を読
み込んで、その画像の輪郭となる境界線を追跡する輪郭
追跡手段と、上記境界線上に所定距離をおいた3点を設
定して、これら3点を通る円の中心点である仮定中心点
の位置を演算し、この仮定中心点演算の処理を、上記境
界線上で3点を移動させつつ繰返し行う仮定中心演算手
段と、この仮定中心演算手段により演算された仮定中心
点を2次元座標上の単位区分毎にカウントするカウント
手段と、このカウント手段によるカウントに基づき2次
元座標上の単位区分毎に仮定中心位置の頻度を記憶して
上記頻度分布のマップを作成する頻度分布作成手段と、
この頻度分布のマップから頻度の最も高い区分を中心と
した所定の広さの重心位置演算用の範囲を設定し、この
範囲内の各単位区分の座標と上記頻度とに基づいて重心
を演算し、これをマークの中心位置とするマーク中心演
算手段とを備えたものである。
Further, the image processing apparatus for carrying out the above method reads the image of the circular mark picked up by the image pickup means and traces the boundary line which is the outline of the image, and the contour tracking means on the boundary line. By setting three points with a predetermined distance, the position of the hypothetical center point, which is the center point of the circle passing through these three points, is calculated, and the hypothetical center point calculation process is performed by moving the three points on the boundary line. While repeatedly performing the hypothetical center calculation means, a hypothetical center point calculated by the hypothetical center calculation means for each unit division on the two-dimensional coordinate, and a unit on the two-dimensional coordinate based on the count by the counting means. Frequency distribution creating means for creating a map of the frequency distribution by storing the frequency of the hypothetical center position for each section,
From the map of this frequency distribution, set a range for calculating the center of gravity position of a predetermined area centered on the section with the highest frequency, and calculate the center of gravity based on the coordinates of each unit section within this range and the frequency. , And a mark center calculation means for setting this as the center position of the mark.

【0009】[0009]

【作用】上記構成によると、上記仮定中心点が最も密集
する位置を中心とした所定範囲内に存在する仮定中心点
から重心を演算していることにより、マークの画像にお
ける欠けや歪みにより一部の仮定中心点が上記所定範囲
から外れている場合に、その所定範囲外の仮定中心点は
上記重心の演算要素に含まれず、その影響が除去される
こととなる。
According to the above construction, since the center of gravity is calculated from the hypothetical center points existing within a predetermined range centered on the position where the hypothetical center points are most densely packed, a part of the mark image may be missing or distorted. When the hypothetical center point of is outside the predetermined range, the hypothetical center point outside the predetermined range is not included in the calculation element of the center of gravity, and the influence thereof is removed.

【0010】[0010]

【実施例】本発明の実施例を図面に基づいて説明する。
図示の実施例は、実装機において、プリント基板に付さ
れたマークの検出に本発明を適用したものである。図1
および図2は実装機全体の構造を示している。これらの
図において、基台1上には、プリント基板搬送用のコン
ベア2が配置され、プリント基板3が上記コンベア2上
を搬送され、所定の装着作業用位置で停止されるように
なっている。
Embodiments of the present invention will be described with reference to the drawings.
In the illustrated embodiment, the present invention is applied to the detection of a mark attached to a printed circuit board in a mounting machine. Figure 1
2 shows the structure of the entire mounting machine. In these figures, a conveyor 2 for carrying a printed circuit board is arranged on a base 1, and a printed circuit board 3 is carried on the conveyor 2 and stopped at a predetermined mounting work position. .

【0011】上記コンベア2の側方には、部品供給部4
が配置されている。この部品供給部4は多数列のテープ
フィーダー4aを備えており、各テープフィーダー4a
はそれぞれ、IC、トランジスタ、コンデンサ等の小片
状のチップ部品を所定間隔おきに収納、保持したテープ
がリールから導出されるようにするとともに、テープ繰
り出し端にはラチェット式の送り機構を具備し、後記ヘ
ッドユニット5によりチップ部品がピックアップされる
につれてテープが間欠的に繰り出されるようになってい
る。
On the side of the conveyor 2, a parts supply section 4 is provided.
Are arranged. The component supply unit 4 includes a plurality of rows of tape feeders 4a, and each tape feeder 4a
Each of them has a chip-like chip component such as an IC, a transistor and a capacitor housed at a predetermined interval so that the held tape can be taken out from the reel, and the tape feeding end is equipped with a ratchet type feeding mechanism. The tape is intermittently delivered as chip components are picked up by the head unit 5 described later.

【0012】また、上記基台1の上方には、部品装着用
のヘッドユニット5が装備され、このヘッドユニット5
はX軸方向(コンベア2の方向)およびY軸方向(水平
面上でX軸と直交する方向)に移動することができるよ
うになっている。
A head unit 5 for mounting components is installed above the base 1, and the head unit 5 is mounted on the head unit 5.
Can move in the X-axis direction (direction of the conveyor 2) and in the Y-axis direction (direction orthogonal to the X-axis on the horizontal plane).

【0013】すなわち、上記基台1上には、Y軸方向に
延びる一対の固定レール7と、Y軸サーボモータ9によ
り回転駆動されるボールねじ軸8とが配設され、上記固
定レール7上にヘッドユニット支持部材11が配置され
て、この支持部材11に設けられたナット部分12が上
記ボールねじ軸8に螺合している。また、上記支持部材
11には、X軸方向に延びるガイド部材13と、X軸サ
ーボモータ15により駆動されるボールねじ軸14とが
配設され、上記ガイド部材13にヘッドユニット5が移
動可能に保持され、このヘッドユニット5に設けられた
ナット部分(図示せず)が上記ボールねじ軸14に螺合
している。そして、Y軸サーボモータ9の作動によりボ
ールねじ軸8が回転して上記支持部材11がY軸方向に
移動するとともに、X軸サーボモータ15の作動により
ボールねじ軸14が回転して、ヘッドユニット5が支持
部材11に対してX軸方向に移動するようになってい
る。
That is, a pair of fixed rails 7 extending in the Y-axis direction and a ball screw shaft 8 rotatably driven by a Y-axis servomotor 9 are arranged on the base 1, and the fixed rails 7 are mounted on the fixed rail 7. A head unit support member 11 is arranged in the head unit, and a nut portion 12 provided on the support member 11 is screwed onto the ball screw shaft 8. A guide member 13 extending in the X-axis direction and a ball screw shaft 14 driven by an X-axis servomotor 15 are arranged on the support member 11, and the head unit 5 can be moved on the guide member 13. A nut portion (not shown) that is held and provided on the head unit 5 is screwed onto the ball screw shaft 14. Then, the ball screw shaft 8 is rotated by the operation of the Y-axis servomotor 9 to move the support member 11 in the Y-axis direction, and the ball screw shaft 14 is rotated by the operation of the X-axis servomotor 15, so that the head unit is rotated. 5 moves in the X-axis direction with respect to the support member 11.

【0014】上記Y軸サーボモータ9およびX軸サーボ
モータ15にはそれぞれエンコーダからなる位置検出手
段10,16が設けられており、これによって上記ヘッ
ドユニット5の移動位置検出がなされるようになってい
る。
The Y-axis servomotor 9 and the X-axis servomotor 15 are respectively provided with position detecting means 10 and 16 composed of encoders, by which the moving position of the head unit 5 can be detected. There is.

【0015】上記ヘッドユニット5には、チップ部品を
吸着するための吸着ノズル20が設けられている。この
吸着ノズル20は、昇降(Z軸方向の移動)および中心
軸(R軸)回りの回転が可能とされ、ヘッドユニット5
に装備されたZ軸サーボモータ21およびR軸サーボモ
ータ22により作動されるようになっている。各サーボ
モータ21,22にはそれぞれ位置検出手段23,24
が設けられ、これらによって吸着ノズル20の移動位置
検出がなされるようになっている。また、吸着ノズル2
0は図外の負圧供給手段にバルブ等を介して接続され、
実装作業時に、吸着ノズル20に負圧が供給されること
によりチップ部品の吸着が行われるようになっている。
The head unit 5 is provided with a suction nozzle 20 for sucking a chip component. The suction nozzle 20 can be moved up and down (moved in the Z-axis direction) and rotated about the central axis (R-axis).
It is operated by a Z-axis servo motor 21 and an R-axis servo motor 22 equipped in the. The servo motors 21 and 22 have position detecting means 23 and 24, respectively.
Is provided, and the moving position of the suction nozzle 20 is detected by these. Also, the suction nozzle 2
0 is connected to a negative pressure supply means (not shown) via a valve or the like,
At the time of mounting work, a negative pressure is supplied to the suction nozzle 20 to suck the chip component.

【0016】さらにノズルユニット5には、基板認識用
カメラ(撮像手段)25が装備されている。このカメラ
25は、実装作業にあたってプリント基板3の位置ずれ
等を調べるため、図3に示すように予めプリント基板3
に付されている円形のマークMを撮像するもので、ノズ
ルユニット5に下向きに取り付けられており、コンベア
2によって搬送されたプリント基板3が所定の作業位置
に保持された状態で、ノズルユニット5がプリント基板
3上の所定位置まで移動されてから、このカメラ25に
よりマークMの撮像が行われるようになっている。
Further, the nozzle unit 5 is equipped with a board recognition camera (imaging means) 25. In order to check the positional deviation of the printed circuit board 3 in the mounting work, the camera 25 is used in advance as shown in FIG.
The circular mark M attached to the nozzle unit 5 is imaged. The nozzle unit 5 is mounted downward on the nozzle unit 5, and the printed circuit board 3 conveyed by the conveyor 2 is held at a predetermined working position. After the mark is moved to a predetermined position on the printed circuit board 3, the image of the mark M is taken by the camera 25.

【0017】なお、基台1上の適宜箇所には部品認識用
カメラ26が装備されている。この部品認識用カメラ2
6は、吸着ノズル20による部品吸着状態が正常か否か
の判定や吸着位置のずれの検出等のため、上記吸着ノズ
ル20に吸着されたチップ部品を撮像するもので、基台
1上に上向きに配置されている。
A component recognition camera 26 is provided at an appropriate position on the base 1. This part recognition camera 2
Reference numeral 6 is an image of the chip component sucked by the suction nozzle 20 in order to determine whether the suction state of the component by the suction nozzle 20 is normal or to detect a shift in the suction position. It is located in.

【0018】図4は上記基板認識用カメラ25による撮
像に基づいて画像処理を行う制御系統を示し、この図に
おいて、カメラ25からの画像情報は、実装機に装備さ
れているマイクロコンピュータ等を用いた制御装置30
に入力されている。この制御装置30は、上記カメラ2
5からの画像情報をA/D変換するA/D変換器31
と、A/D変換された画像情報を記憶する画像メモリ3
2と、画像メモリ32から読み出し情報をD/A変換し
てモニタテレビ33に出力するD/A変換器34とを含
む。さらに制御装置30は、プログラム等を記憶するR
OM35と、後記頻度マップ等を記憶するRAM36
と、各種演算制御処理を行うCPU37と、外部作動機
器に対する出力用のポート38とを含んでいる。
FIG. 4 shows a control system for performing image processing based on the image picked up by the board recognizing camera 25. In FIG. 4, the image information from the camera 25 is obtained by using a microcomputer or the like mounted on the mounting machine. Control device 30
Has been entered in. This control device 30 uses the camera 2
5. A / D converter 31 for A / D converting the image information from 5
And an image memory 3 for storing the A / D converted image information.
2 and a D / A converter 34 for D / A converting the read information from the image memory 32 and outputting it to the monitor television 33. Further, the control device 30 stores an R for storing programs and the like.
An OM 35 and a RAM 36 that stores a frequency map described below.
And a CPU 37 for performing various arithmetic control processes, and an output port 38 for an external operating device.

【0019】上記制御装置30のCPU37、ROM3
5およびRAM36は、図5に示すように、マークの輪
郭となる境界線を求めるための輪郭追跡手段41と、上
記境界線上に設定した3点から仮定中心点を求める処理
を設定点をずらせつつ繰返し行う仮定中心位置手段42
と、その多数の仮定中心点の2次元座標上における頻度
分布のマップを作成するためのカウント手段43および
頻度分布作成手段44と、この頻度分布のマップに基づ
いてマークの中心位置を求めるマーク中心演算手段45
とを構成している。
CPU 37 and ROM 3 of the control device 30
As shown in FIG. 5, the RAM 5 and the RAM 36 shift the set point by the contour tracing means 41 for finding the boundary line that is the contour of the mark and the process for finding the hypothetical center point from the three points set on the boundary line. Assumed center position means 42 repeatedly performed
And a counting means 43 and a frequency distribution creating means 44 for creating a map of the frequency distribution on the two-dimensional coordinates of the many hypothesized center points, and a mark center for obtaining the center position of the mark based on the frequency distribution map. Computing means 45
And make up.

【0020】上記各手段としての機能による画像処理方
法を、図7乃至図9を参照しつつ、図6のフローチャー
トによって説明する。
An image processing method using the functions of the above means will be described with reference to FIGS. 7 to 9 and the flowchart of FIG.

【0021】図6のフローチャートにおいては、先ず輪
郭追跡手段41の機能を果す処理として、画像メモリ3
2からマークの画像が読み出され(ステップS1)、こ
の画像の輪郭追跡が行われる(ステップS2)。この輪
郭追跡は従来知られているような方法で行えば良く、例
えば先ず画像を走査して輪郭を形成している或る一つの
境界画素を調べ、ここから次々に続く境界画素を追跡し
ていくようにすれば良く、この輪郭追跡により、マーク
の輪郭となる境界線が求められる。
In the flowchart of FIG. 6, the image memory 3 is first processed as a process that fulfills the function of the contour tracking means 41.
The image of the mark is read from 2 (step S1), and the contour tracking of this image is performed (step S2). This contour tracking may be performed by a method known in the art. For example, an image is first scanned to check one boundary pixel forming the contour, and from this point, the following boundary pixels are tracked. It is sufficient that the boundary tracing which is the contour of the mark is obtained by this contour tracking.

【0022】次に、頻度分布のマップがクリアされてか
ら(ステップS3)、3点(P1,P2,P3)が設定
される(ステップS4)。この場合、図7に示すよう
に、マークの画像Miの輪郭となる境界線上に適当な距
離をおいて3点(P1,P2,P3)が設定される。そ
して、上記3点(P1,P2,P3)を通る円の中心点
である仮定中心点の位置が、次のように計算される(ス
テップS5)。
Next, after the frequency distribution map is cleared (step S3), three points (P1, P2, P3) are set (step S4). In this case, as shown in FIG. 7, three points (P1, P2, P3) are set at appropriate distances on the boundary line serving as the contour of the image Mi of the mark. Then, the position of the assumed center point, which is the center point of the circle passing through the above three points (P1, P2, P3), is calculated as follows (step S5).

【0023】すなわち、3点の座標をP1(x1,y1),
P2(x2,y2),P3(x3,y3)とし、
That is, the coordinates of the three points are P1 (x1, y1),
P2 (x2, y2), P3 (x3, y3),

【0024】[0024]

【数1】 a1=(x2−x1)/(y2−y1) , b1=(y1+y2)/2−a1・(x1+x2)/2 a2=(x3−x2)/(y3−y2) , b2=(y2+y3)/2−a2・(x2+x3)/2 とおくと、円の中心点の座標(xc,yc)は、[Formula 1] a1 = (x2-x1) / (y2-y1), b1 = (y1 + y2) / 2-a1. (X1 + x2) / 2 a2 = (x3-x2) / (y3-y2), b2 = ( If y2 + y3) / 2-a2 ・ (x2 + x3) / 2 is set, the coordinates (xc, yc) of the center point of the circle are

【0025】[0025]

【数2】 xc=(b2−b1)/(a1−a2) , yc=(a2・b1−a1・b2)/(a2−a1) と求められる。## EQU00002 ## xc = (b2-b1) / (a1-a2) and yc = (a2-b1-a1.b2) / (a2-a1).

【0026】このように仮定中心点の位置が求められる
と、これが量子化された上で、図8および図9に示すよ
うな2次元座標上の単位区分毎に頻度がカウントされる
(ステップS6)。つまり、図8および図9に示す2次
元座標上の各単位区分は、仮定中心点の位置を量子化し
たときにとり得る各種の点の座標(xc,yc)に相当する
ものであり、この単位区分毎に頻度を記憶するためのマ
ップが予めRAM36に設定されている。そして、ステ
ップS5で求められた仮定中心点の位置の量子化された
点に対応する区分が調べられ、その区分の頻度を示すカ
ウント値がカウントアップされる。
When the position of the hypothetical center point is obtained in this way, this is quantized and the frequency is counted for each unit section on the two-dimensional coordinates as shown in FIGS. 8 and 9 (step S6). ). That is, each unit section on the two-dimensional coordinates shown in FIGS. 8 and 9 corresponds to the coordinates (xc, yc) of various points that can be taken when the position of the hypothetical center point is quantized. A map for storing the frequency for each category is set in the RAM 36 in advance. Then, the section corresponding to the quantized point at the position of the hypothetical center point obtained in step S5 is examined, and the count value indicating the frequency of the section is counted up.

【0027】続いて、上記の3点(P1,P2,P3)
が、マークの画像の境界線上で一定量だけずらされた上
で、仮定中心点演算の処理を終了すべき状態に至ったか
否かの判定(ステップS8)がNOの間は、ステップS
5〜S7の処理が繰り返される。つまり、図7中に示す
ように3点が(P1,P2,P3)→(P1′,P
2′,P3′)→(P1″,P2″,P3″)というよ
うに一定量ずつ順次ずらされつつ、それぞれの3点に基
づく仮定中心点の演算(ステップS5)および該当する
区分の頻度のカウント(ステップS6)が繰り返され
る。
Then, the above three points (P1, P2, P3)
However, while the amount of displacement is shifted by a certain amount on the boundary line of the image of the mark, and if the determination as to whether or not the processing of the hypothetical center point calculation should be ended (step S8) is NO, step S
The processing of 5 to S7 is repeated. That is, as shown in FIG. 7, three points are (P1, P2, P3) → (P1 ′, P
2 ′, P3 ′) → (P1 ″, P2 ″, P3 ″) while sequentially shifting by a fixed amount, the calculation of the hypothetical center point based on each of the three points (step S5) and the frequency of the corresponding segment Counting (step S6) is repeated.

【0028】なお、画像Miが図10(b)のように境
界線が直線状となる欠落部分L′を有する場合におい
て、この直線状の境界線上に上記の3点が位置するとき
には、上記数1,数2の式で仮定中心点を求めることが
できないが、このときは頻度のカウントを行わないよう
にすればよい。また、上記の3点のずらし量は任意に設
定し得るところであり、必ずしも一定量ずつである必要
はない。
In the case where the image Mi has a missing portion L'where the boundary line is linear as shown in FIG. 10B, when the above three points are located on this linear boundary line, the above number Although it is not possible to obtain the hypothetical center point by the equations 1 and 2, the frequency may not be counted at this time. The above three shift amounts can be set arbitrarily, and do not necessarily have to be constant amounts.

【0029】このようにして上記の3点がマークの画像
Miの境界線上を一周して元の位置に戻る状態になるま
でこれらの処理が繰り返されると、ステップS8の判定
がYESとなる。
In this way, when these processes are repeated until the above-mentioned three points go around the boundary line of the image Mi of the mark and return to the original position, the determination in step S8 becomes YES.

【0030】上記のステップS4〜S8により仮定中心
演算手段42およびカウント手段43の機能が果される
とともに、これらの処理が終了すると2次元空間上に図
8に示すような頻度分布が得られ、上記RAM36内の
マップには図9に示すように各区分毎に頻度を示す値が
書き込まれ、頻度分布作成手段44の機能が果される。
なお、図9中で頻度値を示す数値は、単なる例示であっ
て、本発明を限定するものではない。
The above-described steps S4 to S8 serve the functions of the hypothetical center computing means 42 and the counting means 43, and when these processings are completed, a frequency distribution as shown in FIG. 8 is obtained in the two-dimensional space. As shown in FIG. 9, a value indicating the frequency for each section is written in the map in the RAM 36, and the function of the frequency distribution creating means 44 is fulfilled.
It should be noted that the numerical values indicating the frequency values in FIG. 9 are merely examples and do not limit the present invention.

【0031】ステップS8までの処理が終了すると、次
に、上記の頻度分布から、2次元空間上で仮定中心点が
最も密集する位置が調べられ、つまり、上記頻度分布の
マップから、頻度の最も高い区分(図9中の符号aの区
分)の位置の座標が選出される(ステップS9)。そし
て、この位置を中心とした所定の広さの重心位置演算用
の範囲が設定され(ステップS10)、その範囲内に存
在する仮定中心点からこれらの重心が演算される(ステ
ップS11)。これにより、マーク中心演算手段45と
しての機能が果される。
When the processing up to step S8 is completed, the position where the hypothetical center points are most dense in the two-dimensional space is examined from the above frequency distribution, that is, the most frequent frequency is calculated from the above frequency distribution map. The coordinates of the position of the higher section (section of symbol a in FIG. 9) are selected (step S9). Then, a range for calculating the center of gravity position having a predetermined width centered on this position is set (step S10), and these centers of gravity are calculated from the hypothesized center points existing in the range (step S11). As a result, the function as the mark center calculation means 45 is fulfilled.

【0032】マーク中心演算手段45としての処理を具
体的に説明する。上記頻度の最も高い位置をPc(Xc,Y
c)とすると、この位置と、予め定められているパラメ
ータdとから、
The processing as the mark center calculation means 45 will be specifically described. The position with the highest frequency above is Pc (Xc, Y
c), from this position and the predetermined parameter d,

【0033】[0033]

【数3】Xc−d≦X≦Xc+d , Yc−d≦Y≦Yc+d の範囲が設定される。例えば、図9において、頻度の最
も高い区分aを中心にそのまわりの符号bの各区分を含
む範囲が設定される。
## EQU00003 ## The ranges of Xc-d.ltoreq.X.ltoreq.Xc + d and Yc-d.ltoreq.Y.ltoreq.Yc + d are set. For example, in FIG. 9, the range including the section a having the highest frequency as a center and including each section of the code b around it is set.

【0034】上記範囲内の各点をPi(Xi,Yi)(i=
1,2,……,n)とし、点Piでの頻度値をHiとする
と、上記範囲に含まれる仮定中心点の重心Pg(Xg,Yg)
は次式で求められる。
Each point within the above range is Pi (Xi, Yi) (i =
1, 2, ..., N) and the frequency value at the point Pi is Hi, the center of gravity Pg (Xg, Yg) of the hypothesized center point included in the above range
Is calculated by the following equation.

【0035】[0035]

【数4】 [Equation 4]

【0036】この所定範囲内の仮定中心点の重心Pg(X
g,Yg)が、上記マークMの中心位置とされる。
The center of gravity Pg (X
g, Yg) is the center position of the mark M.

【0037】以上のような方法によると、マークの画像
の境界線上で3点が移動されつつその3点に基づいて求
められる多数の仮定中心点のうちで、最大頻度を中心と
した所定範囲(図9中の区分aおよび区分b)内のもの
から上記重心Pg(Xg,Yg)が演算され、上記所定範囲か
ら外れたものは重心演算要素から除かれる。従って、円
形のマークの画像Miに部分的に欠けが生じているよう
な場合に、その部分を含む3点から求められるような仮
定中心位置は、上記重心演算要素に含まれなくなる。
According to the method as described above, the three points are moved on the boundary line of the image of the mark, and among a number of hypothetical center points obtained based on the three points, the predetermined range centered on the maximum frequency ( The center of gravity Pg (Xg, Yg) is calculated from those in the sections a and b) in FIG. 9, and those outside the predetermined range are excluded from the center of gravity calculation element. Therefore, when the image Mi of the circular mark partially lacks, the assumed center position obtained from the three points including the part is not included in the centroid calculation element.

【0038】このため、上記重心Pg(Xg,Yg)がマーク
中心位置の検出値とされることにより、上記欠けの影響
でマーク中心位置の検出値が実際の中心位置からずれる
ことが避けられる。
Therefore, by setting the center of gravity Pg (Xg, Yg) as the detected value of the mark center position, it is possible to prevent the detected value of the mark center position from deviating from the actual center position due to the influence of the chipping.

【0039】なお、上記重心位置演算用の範囲を設定す
るためのパラメータdは、予想される上記仮定中心点の
ばらつきを考慮して適度の値に設定しておけばよく、と
くに仮定中心点の大部分が一点に集中するような場合に
は、dを0とすることにより、仮定中心点の最大頻度の
位置をマークの中心位置としてもよい。
It should be noted that the parameter d for setting the range for calculating the position of the center of gravity may be set to a proper value in consideration of the expected variation of the assumed center point. When most of the points are concentrated on one point, the position of the maximum frequency of the hypothetical center point may be set as the center position of the mark by setting d to 0.

【0040】[0040]

【発明の効果】請求項1記載の画像処理方法は、円形の
マークの画像の輪郭となる境界線上に所定距離をおいた
3点を設定して、これら3点を通る円の中心点である仮
定中心点の位置を演算する処理を、上記境界線上で3点
を一定量ずつ移動させつつ繰返し行い、その多数個の仮
定中心点の位置の2次元空間上での分布を求めた後、仮
定中心点が最も密集する位置を中心とした所定範囲内に
存在する仮定中心点からこれらの重心を演算し、この重
心を上記マークの中心位置とするようにしているため、
円形のマークの中心位置を精度良く検出することができ
る。とくに、照明の不均一等で入力された画像に欠けや
歪み等が生じていても、その影響を除去して、正確に中
心位置を求めることができる。
According to the image processing method of the first aspect, three points are set at a predetermined distance on the boundary line which is the outline of the image of the circular mark, and are the center points of the circles passing through these three points. The process of calculating the position of the hypothetical center point is repeated while moving the three points on the boundary line by a fixed amount, and the distribution of the positions of the multiplicity of hypothetical center points in the two-dimensional space is obtained. Since these barycenters are calculated from the hypothesized center points existing within a predetermined range centered on the position where the center points are most dense, the center of gravity is set as the center position of the mark.
The center position of the circular mark can be accurately detected. In particular, even if the input image is lacking or distorted due to uneven illumination, the influence can be removed and the center position can be accurately determined.

【0041】また、請求項2に記載の画像処理装置は、
輪郭追跡手段と、仮定中心演算手段と、カウント手段
と、頻度分布作成手段と、マーク中心演算手段とを備え
ることにより、上記方法を自動的に行うことができるも
のである。
The image processing apparatus according to claim 2 is
The above method can be automatically performed by providing the contour tracing means, the hypothetical center calculating means, the counting means, the frequency distribution creating means, and the mark center calculating means.

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

【図1】本発明の適用の一例として示す実装機の平面図
である。
FIG. 1 is a plan view of a mounting machine shown as an example of application of the present invention.

【図2】同正面図である。FIG. 2 is a front view of the same.

【図3】カメラを装備したヘッドユニットとマークを付
したプリント基板の一部を示す斜視図である。
FIG. 3 is a perspective view showing a head unit equipped with a camera and a part of a printed circuit board with marks.

【図4】制御装置の構成を示すブロック図である。FIG. 4 is a block diagram showing a configuration of a control device.

【図5】主要部の構成を示す機能ブロック図である。FIG. 5 is a functional block diagram showing a configuration of a main part.

【図6】画像処理の方法を示すフローチャートである。FIG. 6 is a flowchart showing an image processing method.

【図7】マークの画像の輪郭となる境界線上に3点をと
って仮定中心点を演算する処理を説明するための図であ
る。
FIG. 7 is a diagram for explaining a process of calculating an assumed center point by taking three points on a boundary line that is the contour of the image of a mark.

【図8】仮定中心点の頻度分布をグラフ化して表した説
明図である。
FIG. 8 is an explanatory diagram showing a frequency distribution of hypothetical center points in a graph.

【図9】頻度分布のマップを示す図である。FIG. 9 is a diagram showing a frequency distribution map.

【図10】(a)(b)は従来の方法の問題点を示す説
明図である。
10A and 10B are explanatory diagrams showing problems of the conventional method.

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

3 プリント基板 M マーク 25 カメラ(撮像手段) 30 制御装置 41 輪郭追跡手段 42 仮定中心演算手段 43 カウント手段 44 頻度分布作成手段 45 マーク中心演算手段 3 printed circuit board M mark 25 camera (imaging means) 30 controller 41 contour tracing means 42 hypothetical center calculating means 43 counting means 44 frequency distribution creating means 45 mark center calculating means

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06T 7/00 // H05K 13/08 B 8315−4E ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI Technical display location G06T 7/00 // H05K 13/08 B 8315-4E

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 円形のマークの画像からマークの中心位
置を求める画像処理方法であって、上記マークの画像の
輪郭となる境界線を追跡し、この境界線上に所定距離を
おいた3点を設定して、これら3点を通る円の中心点で
ある仮定中心点の位置を演算し、この仮定中心点演算の
処理を、上記境界線上で3点を移動させつつ繰返し行
い、こうして得られる多数個の仮定中心点の演算値から
2次元空間上で仮定中心点の分布を求めた後、2次元空
間上で仮定中心点が最も密集する位置を検出し、この位
置を中心とした所定範囲内に存在する仮定中心点からこ
れらの重心を演算し、この重心を上記マークの中心位置
とすることを特徴とする画像処理方法。
1. An image processing method for obtaining a center position of a mark from an image of a circular mark, wherein a boundary line which is an outline of the image of the mark is traced, and three points are set on the boundary line at a predetermined distance. The position of an assumed center point, which is the center point of a circle passing through these three points, is calculated, and the processing of this assumed center point calculation is repeated while moving the three points on the boundary line. After calculating the distribution of the hypothetical center points in the two-dimensional space from the calculated values of the hypothetical center points, the position where the hypothetical central points are most concentrated in the two-dimensional space is detected, and the position within the predetermined range centered on this position is detected. An image processing method, characterized in that these barycenters are calculated from the hypothesized center points existing in 1. and the barycenter is set as the center position of the mark.
【請求項2】 撮像手段により撮像された円形のマーク
の画像を読み込んで、その画像の輪郭となる境界線を追
跡する輪郭追跡手段と、上記境界線上に所定距離をおい
た3点を設定して、これら3点を通る円の中心点である
仮定中心点の位置を演算し、この仮定中心点演算の処理
を、上記境界線上で3点を移動させつつ繰返し行う仮定
中心演算手段と、この仮定中心演算手段により演算され
た仮定中心点を2次元座標上の単位区分毎にカウントす
るカウント手段と、このカウント手段によるカウントに
基づき2次元座標上の単位区分毎に仮定中心位置の頻度
を記憶して上記頻度分布のマップを作成する頻度分布作
成手段と、この頻度分布のマップから頻度の最も高い区
分を中心とした所定の広さの重心位置演算用の範囲を設
定し、この範囲内の各単位区分の座標と上記頻度とに基
づいて重心を演算し、これをマークの中心位置とするマ
ーク中心演算手段とを備えたことを特徴とする画像処理
装置。
2. A contour tracking means for reading an image of a circular mark imaged by the imaging means and tracing a boundary line which is a contour of the image, and three points set at a predetermined distance on the boundary line are set. Then, the position of a hypothetical center point, which is the center point of a circle passing through these three points, is calculated, and the hypothetical center calculation means for repeatedly performing the process of this hypothetical center point calculation while moving the three points on the boundary line, Counting means for counting the hypothetical center point calculated by the hypothetical center calculating means for each unit section on the two-dimensional coordinate, and the frequency of the hypothetical center position for each unit section on the two-dimensional coordinate is stored based on the count by the counting means. Then, a frequency distribution creating means for creating a map of the frequency distribution, and a range for calculating the center of gravity position of a predetermined width centering on the highest frequency segment from this frequency distribution map are set, and within this range An image processing apparatus, comprising: a mark center calculating unit that calculates a center of gravity based on the coordinates of each unit segment and the frequency, and sets the calculated center of gravity as a center position of the mark.
JP5182938A 1993-07-23 1993-07-23 Method and device for processing picture Pending JPH0737104A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5182938A JPH0737104A (en) 1993-07-23 1993-07-23 Method and device for processing picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5182938A JPH0737104A (en) 1993-07-23 1993-07-23 Method and device for processing picture

Publications (1)

Publication Number Publication Date
JPH0737104A true JPH0737104A (en) 1995-02-07

Family

ID=16127004

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5182938A Pending JPH0737104A (en) 1993-07-23 1993-07-23 Method and device for processing picture

Country Status (1)

Country Link
JP (1) JPH0737104A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010001458A1 (en) * 2008-06-30 2010-01-07 三菱重工業株式会社 Shaft curve calculation system of turbine rotor
WO2010001457A1 (en) * 2008-06-30 2010-01-07 三菱重工業株式会社 Method and system for calculating core shift of rotating body
JP2011007621A (en) * 2009-06-25 2011-01-13 Toppan Printing Co Ltd Apparatus for measurement of two-layer circular displacement
CN106395638A (en) * 2016-11-08 2017-02-15 芜湖市长江起重设备制造有限公司 Bridge crane for production

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010001458A1 (en) * 2008-06-30 2010-01-07 三菱重工業株式会社 Shaft curve calculation system of turbine rotor
WO2010001457A1 (en) * 2008-06-30 2010-01-07 三菱重工業株式会社 Method and system for calculating core shift of rotating body
US8306776B2 (en) 2008-06-30 2012-11-06 Mitsubishi Heavy Industries, Ltd. Method and system for calculating misalignment of rotational body
US8417479B2 (en) 2008-06-30 2013-04-09 Mitsubishi Heavy Industries, Ltd. System for calculating axial deformation of turbine rotor
JP2011007621A (en) * 2009-06-25 2011-01-13 Toppan Printing Co Ltd Apparatus for measurement of two-layer circular displacement
CN106395638A (en) * 2016-11-08 2017-02-15 芜湖市长江起重设备制造有限公司 Bridge crane for production

Similar Documents

Publication Publication Date Title
KR100857257B1 (en) Screen printer and image sensor position alignment method
EP0320317A2 (en) Position feedback enhancement over a limited repositioning area for a movable member
US20020078580A1 (en) Automated system with improved height sensing
US10334770B2 (en) Component holding state detection method and component mounting machine
JP2941617B2 (en) Electronic component component data recording device and electronic component transport and assembling device using the same
US6563530B1 (en) Camera position-correcting method and system and dummy component for use in camera position correction
JP4391846B2 (en) Method and apparatus for detecting mounting error of electronic component mounting apparatus
JP5457665B2 (en) Electronic component mounting device
JP4623657B2 (en) Captured image processing apparatus and captured image processing method for electronic component mounter
US6633663B1 (en) Method and system for determining component dimensional information
CN111096102B (en) Component mounting apparatus
JPH0737104A (en) Method and device for processing picture
JP3286105B2 (en) Mounting position correction method for mounting machine
US20220105641A1 (en) Belt Conveyor Calibration Method, Robot Control Method, and Robot System
JP3499316B2 (en) Calibration data detection method for mounting machine and mounting machine
JPH10320565A (en) Image processing method and device therefor
JP2000258121A (en) Master substrate for calibrating a plurality of cameras and calibration method for image recognition camera
JP3112574B2 (en) Scale adjustment method for component mounting device and device
CN113155097B (en) Dynamic tracking system with pose compensation function and pose compensation method thereof
JP2004273578A (en) Electronic component mounting method and equipment thereof
JPH08293700A (en) Method and apparatus for correcting position of parts mounting machine
JPH07208924A (en) Method for calibrating optical system for recognition of visual recognition device
JP2004062784A (en) Method for identifying body to be inspected and method for detecting position of body to be inspected
JP2001217599A (en) Surface mounting component attaching device and electronic component detecting method thereof
JP2008004657A (en) Surface mounting apparatus