JP2008151607A - Method and apparatus for positioning mark using template matching - Google Patents

Method and apparatus for positioning mark using template matching Download PDF

Info

Publication number
JP2008151607A
JP2008151607A JP2006339050A JP2006339050A JP2008151607A JP 2008151607 A JP2008151607 A JP 2008151607A JP 2006339050 A JP2006339050 A JP 2006339050A JP 2006339050 A JP2006339050 A JP 2006339050A JP 2008151607 A JP2008151607 A JP 2008151607A
Authority
JP
Japan
Prior art keywords
mark
peak
template
image
matching
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
JP2006339050A
Other languages
Japanese (ja)
Other versions
JP4860452B2 (en
Inventor
Kimiko Fujie
公子 藤江
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.)
Juki Corp
Original Assignee
Juki 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 Juki Corp filed Critical Juki Corp
Priority to JP2006339050A priority Critical patent/JP4860452B2/en
Publication of JP2008151607A publication Critical patent/JP2008151607A/en
Application granted granted Critical
Publication of JP4860452B2 publication Critical patent/JP4860452B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To carry out positioning precisely without the need for processing other than template matching for performing the positioning minutely, even in the case where the size of a recognized mark differs from that of a mark on a template image. <P>SOLUTION: The mark positioning uses the template matching, wherein a template image including the mark is moved sequentially on a recognized image, and the maximum correlation position is obtained. The mark positioning grasps a peak overall shape, defines a narrow range around the peak top in the case of a sharp peak, or a wide range containing the whole area of the flat top in the case of a flat peak, as a sampling area, and calculates a detection position from a weighted average of correlation values in the sampling area. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、認識画像上を、マークを含むテンプレート画像を逐次移動させ、最大相関位置を求めるテンプレートマッチングを用いたマーク位置決め方法及び装置に係り、特に、部品実装機でマークを位置決めする際に、円形や多角形のマークの中心位置を精度良く検出することが可能なマーク位置決め方法及び装置に関する。   The present invention relates to a mark positioning method and apparatus using template matching for sequentially moving a template image including a mark on a recognition image to obtain a maximum correlation position, and in particular, when positioning a mark with a component mounting machine. The present invention relates to a mark positioning method and apparatus capable of accurately detecting the center position of a circular or polygonal mark.

プリント基板上に配置された各種アライメントマークの位置決め方法として、マークをカメラで撮像し、何らかの画像処理を施してマーク位置を検出する手法が一般的である。   As a method for positioning various alignment marks arranged on a printed circuit board, a method is generally used in which a mark is picked up by a camera and subjected to some image processing to detect the mark position.

マークの位置決め手法として、例えばテンプレートマッチングを用いた手法がある。これは、認識画像上を、マークを含むテンプレート画像を逐次移動させ、最大相関位置を求める手法であるが、画素単位でしか相関を求められないため、画素より小さなサブピクセル単位で位置決めを行なうための手法が数多く提案されている(特許文献1、2、3)。   As a mark positioning method, for example, there is a method using template matching. This is a technique for obtaining the maximum correlation position by sequentially moving the template image including the mark on the recognition image. However, since the correlation can be obtained only in the pixel unit, the positioning is performed in the sub-pixel unit smaller than the pixel. Many methods have been proposed (Patent Documents 1, 2, and 3).

マーク等の図形をテンプレートマッチングによって位置決めする場合、認識したい画像と同じ形状・サイズのテンプレート画像を作成する必要がある。認識しようとする図形と、テンプレート画像上の図形にずれがある場合、相関位置のピークが出難い。   When positioning a figure such as a mark by template matching, it is necessary to create a template image having the same shape and size as the image to be recognized. If there is a difference between the figure to be recognized and the figure on the template image, it is difficult to peak the correlation position.

例えば円形のマークで、認識マークとテンプレート上のマークが同じサイズの場合と、サイズにずれがある場合との相関分布の違いを図1に例示する。図1(A)に示す如く、認識マークとテンプレート上のマークのサイズが一致している場合は、最大相関位置で高く尖ったピークとなるのに対して、図1(B)に示す如く、マークサイズが一致していない場合は、低く平坦なピークとなる。更に、図1(B)の下段に拡大して示すように、認識画像の濃度ムラやノイズの影響によって、平坦部には小さな凹凸が存在している。この状態で最大相関位置を検出し、先の手法によりサブピクセル精度で位置決めを行なっても、それは局所的な小さなピークを検出しているだけであって、実際に求めたいマーク位置とは大きく異なっている。又、濃度ムラやノイズの有無は撮影画像によって異なるので、検出位置が大きくばらつく原因にもなる。   For example, in the case of a circular mark, the difference in correlation distribution between the case where the recognition mark and the mark on the template are the same size and the case where there is a deviation in size are illustrated in FIG. As shown in FIG. 1A, when the size of the recognition mark coincides with the mark on the template, the peak is highly sharp at the maximum correlation position, whereas as shown in FIG. When the mark sizes do not match, the peak is low and flat. Furthermore, as shown in an enlarged view in the lower part of FIG. 1B, small unevenness exists in the flat portion due to the density unevenness of the recognized image and the influence of noise. Even if the maximum correlation position is detected in this state and positioning is performed with sub-pixel accuracy by the previous method, it only detects a small local peak, and is greatly different from the mark position to be actually obtained. ing. Also, the presence or absence of density unevenness or noise varies depending on the photographed image, which may cause the detection position to vary greatly.

部品実装機のマーク位置決めの場合、基板によってマークサイズにばらつきが大きかったり、同一マークを複数のカメラで認識したりするため、同一マークの認識であっても、認識の都度マークサイズが変動する場合がある。そのため、マークの位置決め精度が安定せず問題であった。   In the case of mark positioning of component mounters, the mark size varies widely depending on the board, or the same mark is recognized by multiple cameras, so even if the same mark is recognized, the mark size varies with each recognition There is. For this reason, the positioning accuracy of the mark is not stable, which is a problem.

このような問題に対し、特許文献4では、テンプレートマッチングでの位置決めを粗位置決めとし、粗位置決めした周辺でマークエッジを検出し、検出したエッジの良否判定を行ない、良エッジのみからマークのサイズや位置を求める手法が提案されている。   With respect to such a problem, in Patent Document 4, the positioning by template matching is rough positioning, the mark edge is detected in the vicinity of the coarse positioning, the quality of the detected edge is judged, and the mark size or the like is determined only from the good edge. A method for obtaining the position has been proposed.

又、特許文献5には、1段階前の解像度で検出したピーク情報から、次の解像度とのマッチング領域を設定することにより、等倍画像になるまで解像度を段階的に高めていくピラミッドマッチングを行なうことが記載されている。   In Patent Document 5, pyramid matching is used to increase the resolution step by step until the same-size image is obtained by setting a matching area with the next resolution from the peak information detected at the previous resolution. It is described to do.

特開平4−115376号公報JP-A-4-115376 特許第2943257号公報Japanese Patent No. 2943257 特開昭61−260235号公報Japanese Patent Laid-Open No. 61-260235 特許第3520758号公報Japanese Patent No. 3520758 特開2001−148014号公報(段落[0005]図8)JP 2001-148014 A (paragraph [0005] FIG. 8)

しかしながら、特許文献4の手法では、エッジの良否判定、マークサイズの取得、マーク位置検出の各アルゴリズムを、マーク形状によって切換える必要がある。又、テンプレートマッチングの他に、詳細位置決めのための処理が必要なため、処理時間がかかってしまうという問題点がある。   However, in the method of Patent Document 4, it is necessary to switch the algorithms for edge quality determination, mark size acquisition, and mark position detection depending on the mark shape. Further, in addition to template matching, there is a problem that processing time is required because processing for detailed positioning is required.

又、特許文献5の手法のみでは、特許文献1〜3と同様の問題を解決できない。   Moreover, only the method of patent document 5 cannot solve the problem similar to patent documents 1-3.

本発明は、前記従来の問題点を解決するべくなされたもので、認識したいマークとテンプレート画像上のマークのサイズが異なっていても、テンプレートマッチングの他に詳細位置決めのための処理を必要とすることなく、精度良く位置決め可能とすることを課題とする。   The present invention has been made to solve the above-described conventional problems, and requires processing for detailed positioning in addition to template matching even if the size of the mark to be recognized differs from the size of the mark on the template image. Therefore, it is an object to enable positioning with high accuracy.

本発明は、認識画像上を、マークを含むテンプレート画像を逐次移動させ、最大相関位置を求めるテンプレートマッチングを用いたマーク位置決め方法において、ピーク全体形状を把握し、尖ったピークであればピーク頂上部周辺の狭い範囲、平坦なピークであれば頂上の平坦部を全て含む広い範囲をサンプリング領域として、該サンプリング領域内の相関値の加重平均から検出位置を算出するようにして、前記課題を解決したものである。   The present invention is a mark positioning method using template matching that sequentially moves a template image including a mark on a recognition image to obtain a maximum correlation position. The above-mentioned problem has been solved by calculating the detection position from the weighted average of the correlation values in the sampling region, with a narrow range around the periphery, and a wide range including all the flat part at the top in the case of a flat peak as the sampling region. Is.

又、前記テンプレートマッチングに際して、1段階前の解像度で検出したピーク情報から、次の解像度でのマッチング領域を設定することにより、等倍画像になるまで解像度を段階的に高めていくピラミッドマッチングを行なうことができる。   Also, in the template matching, pyramid matching is performed in which the resolution is increased step by step until the same-magnification image is obtained by setting a matching area at the next resolution from the peak information detected at the previous resolution. be able to.

本発明は、又、認識画像上を、マークを含むテンプレート画像を逐次移動させ、最大相関位置を求めるテンプレートマッチングを用いたマーク位置決め装置において、ピーク全体形状を把握する手段と、尖ったピークであればピーク頂上部周辺の狭い範囲、平坦なピークであれば頂上の平坦部を全て含む広い範囲をサンプリング領域とする手段と、該サンプリング領域内の相関値の加重平均から検出位置を算出する手段と、を備えたことを特徴とするテンプレートマッチングを用いたマーク位置決め装置を提供するものである。   In the mark positioning apparatus using template matching that sequentially moves the template image including the mark on the recognition image and obtains the maximum correlation position, the present invention has a means for grasping the overall shape of the peak and the sharp peak. Means for setting a narrow range around the top of the peak, a wide range including all of the top of the peak if it is a flat peak, and means for calculating the detection position from a weighted average of correlation values in the sampling region; And a mark positioning device using template matching characterized by comprising:

本発明によれば、認識したいマークとテンプレート画像上のマークのサイズが異なっていても、テンプレートマッチングの他に詳細位置決めのための処理を必要とすることなく、精度良く位置決めすることが可能となる。   According to the present invention, even if the size of the mark to be recognized and the size of the mark on the template image are different, it is possible to perform positioning accurately without requiring processing for detailed positioning in addition to template matching. .

以下図面を参照して、本発明の実施形態を詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

本発明の適用対象の一例である部品実装機を図2に示す。図において、吸着ヘッド1の吸着ノズル1aは、XY駆動機構(図示せず)により駆動されて、フィーダ2の位置に移動し、該フィーダ2から供給される部品3を吸着した後、認識カメラ6の上方に移動する。そこで部品3が下方から撮像され、その画像が処理されて、部品3の吸着ノズル1aにおける吸着位置ずれが補正され、搬送路11を介して搬送されてくる基板10上の所定位置に部品が実装される。部品3の正確な実装には、基板10が基準位置にあることが前提となるので、基板10の所定位置に基板マーク10a、10b、10cを形成し、これを吸着ヘッド1に取り付けたCCDカメラ(画像読取手段)12で上方から撮像して画像認識し、基板10の基準位置からのずれを求め、これを補正して部品搭載が行なわれている。   FIG. 2 shows a component mounter as an example to which the present invention is applied. In the figure, the suction nozzle 1a of the suction head 1 is driven by an XY drive mechanism (not shown), moves to the position of the feeder 2, sucks the component 3 supplied from the feeder 2, and then recognizes the camera 6. Move up. Therefore, the component 3 is picked up from below, the image is processed, the suction position deviation of the suction nozzle 1a of the component 3 is corrected, and the component is mounted at a predetermined position on the substrate 10 transported through the transport path 11. Is done. Since accurate mounting of the component 3 is based on the premise that the substrate 10 is at the reference position, substrate marks 10 a, 10 b, 10 c are formed at predetermined positions on the substrate 10 and attached to the suction head 1. (Image reading means) 12 picks up an image from above and recognizes the image, finds the deviation of the substrate 10 from the reference position, corrects this, and mounts the components.

前記CCDカメラ12で撮像される基板マークの画像を処理する画像処理装置20の構成を図3に示す。CCDカメラ12からのアナログの画像信号は、画像処理装置20のA/D変換器20aにより、所定フォーマットのデジタル画像データに変換される。A/D変換器20aの出力する画像データは、画像メモリ20bに一旦記憶され、必要に応じて(あるいは所定の画像処理を経た後)D/A変換器20cを介してアナログデータに戻され、モニタ21で表示できるようになっている。   FIG. 3 shows a configuration of an image processing apparatus 20 that processes an image of a substrate mark picked up by the CCD camera 12. The analog image signal from the CCD camera 12 is converted into digital image data of a predetermined format by the A / D converter 20a of the image processing apparatus 20. The image data output from the A / D converter 20a is temporarily stored in the image memory 20b and returned to analog data via the D / A converter 20c as necessary (or after a predetermined image processing), It can be displayed on the monitor 21.

前記画像処理装置20の各部は、CPU20dにより制御され、CPU20dには、各種プログラム等を格納したROM20e、CPU20dのワークエリア等として使用されるRAM20f、認識対象となるマークの形状やサイズ等を記憶するマークデータ領域20g、生産用テンプレートメモリ20hが接続されている。又、CPU20dは、各部のコントローラ22を介して、他の装置、例えば部品実装機の基板10を搬送する搬送系、部品を吸着する吸着ヘッド1等を画像処理した結果に応じて制御できるようになっている。   Each unit of the image processing apparatus 20 is controlled by the CPU 20d. The CPU 20d stores a ROM 20e storing various programs, a RAM 20f used as a work area of the CPU 20d, and the shape and size of a mark to be recognized. A mark data area 20g and a production template memory 20h are connected. Further, the CPU 20d can control other devices, for example, a transport system for transporting the substrate 10 of the component mounting machine, the suction head 1 for attracting components, and the like according to the result of image processing via the controller 22 of each unit. It has become.

このような構成において、図4及び図5のフローチャートを参照して、基板マークに適するモデルテンプレートの取得(ティーチング)及びマーク認識の手順を説明する。   In such a configuration, a procedure for acquiring (teaching) a model template suitable for a substrate mark and recognizing the mark will be described with reference to the flowcharts of FIGS.

ティーチングに際しては、図4に示す如く、まず、吸着ヘッド1を、例えば基板マーク10aの領域に移動させ、吸着ヘッド1に取り付けられたCCDカメラ12により、基板マーク10aを読み取り、A/D変換器20aでデジタルデータに変換して、画像メモリ20bに格納する(ステップS1)。続いて、画像メモリ20b内の画像データに対してマッチング処理を行なうべき領域、即ち、マッチングウィンドウWを設定する(ステップS2)。このマッチングウィンドウWの設定は、基板上のマーク領域から、濃度情報の検索等により基板マーク10aの位置等を粗く検出し、マッチング処理領域を特定するものであるので、その設定には、それ程の精度を必要とするものではない。   In teaching, as shown in FIG. 4, first, the suction head 1 is moved to, for example, the area of the substrate mark 10a, and the substrate mark 10a is read by the CCD camera 12 attached to the suction head 1, and the A / D converter It is converted into digital data at 20a and stored in the image memory 20b (step S1). Subsequently, an area to be subjected to the matching process on the image data in the image memory 20b, that is, a matching window W is set (step S2). The setting of the matching window W is to roughly detect the position of the substrate mark 10a from the mark region on the substrate by searching density information, etc., and specify the matching processing region. It does not require accuracy.

続いて、マッチングウィンドウW内の画像データから、濃度変化カーブ、その変極点、あるいは、これらの情報のマッチングウィンドウW内での位置等の特徴が抽出される(ステップS3)。ここでは、後述の生成されるモデルテンプレートを用いて基板マーク10aを認識するのに、少なくとも最低限必要な特徴部分が取り出され、例えば、基板マーク10aの射影データ、サイズ、濃度情報の最大/最小値の特徴が抽出される。   Subsequently, features such as a density change curve, its inflection point, or the position of these pieces of information in the matching window W are extracted from the image data in the matching window W (step S3). Here, at least the minimum necessary feature portion is extracted for recognizing the substrate mark 10a using a model template to be described later. For example, the projection data, size, and density information maximum / minimum of the substrate mark 10a are extracted. Value features are extracted.

次にステップS4において、モデルテンプレートを作成する。例えば図6の31〜39の形状に対応している場合、ステップS3で抽出した画像の特徴、即ち、画像の最大濃度、最小濃度や、マークサイズに基づいて、まず31の形状で階調濃淡データを有する2次元のモデルテンプレートを生成する。   Next, in step S4, a model template is created. For example, in the case of corresponding to the shapes of 31 to 39 in FIG. 6, first, the gradation density of 31 is first determined based on the characteristics of the image extracted in step S3, that is, the maximum density, minimum density, and mark size of the image. A two-dimensional model template having data is generated.

このようにして生成したモデルテンプレートと、マッチングウィンドウWの画像データと相関演算を行ない(ステップS5)、マッチング結果、例えばマッチング係数(相関係数)を、生成したモデルテンプレート、形状名と共にRAM20fに保存する(ステップS6)。   The correlation between the model template thus generated and the image data of the matching window W is calculated (step S5), and the matching result, for example, the matching coefficient (correlation coefficient) is stored in the RAM 20f together with the generated model template and shape name. (Step S6).

次いで、他のモデル形状32〜39でもモデルテンプレートを作成し、上記処理を繰り返す。全ての形状に対してモデルテンプレートを生成して、上記処理が終了した場合(ステップS7のYES)には、基板マーク10aに適するモデルテンプレートがあったかどうかを検索する(ステップS8)。これは、マッチング結果をモニタ21上に表示し、マッチング係数が設定値よりも大きいモデルテンプレートがあったかどうかを調べることにより行なわれる。設定値よりも大きいモデルテンプレートがあった場合(ステップS8のYES)には、そのうちマッチング係数が最大なものを基板マーク10a用のモデルテンプレートとして選択する(ステップS9)。   Next, model templates are created for the other model shapes 32 to 39, and the above process is repeated. When model templates are generated for all shapes and the above process is completed (YES in step S7), it is searched whether there is a model template suitable for the board mark 10a (step S8). This is done by displaying the matching result on the monitor 21 and checking whether there is a model template whose matching coefficient is larger than the set value. If there is a model template larger than the set value (YES in step S8), the one with the largest matching coefficient is selected as the model template for the substrate mark 10a (step S9).

一方、ステップS8において、マッチング係数が設定値よりも大きいものが無く、適するテンプレートが無い場合には、モニタ21上にテンプレート一覧を表示し、その中からオペレータの確認作業によって、基板マーク10aに対するモデルテンプレートを選択する(ステップS10)。   On the other hand, if there is no matching coefficient larger than the set value in step S8 and there is no suitable template, a template list is displayed on the monitor 21, and the model for the substrate mark 10a is checked by the operator from among them. A template is selected (step S10).

次に、以上の処理を基板マーク10b、10cに対して行なう(ステップS12)。これにより、基板10の全ての基板マークのティーチングが行われたことになる。   Next, the above processing is performed on the substrate marks 10b and 10c (step S12). As a result, teaching of all substrate marks on the substrate 10 has been performed.

ティーチング動作により得られたマーク形状やマークサイズは、マークの探索範囲や期待するマッチング係数等と共に、認識マーク毎にIDが付され、マークデータ領域20gに格納される(ステップS13)。   The mark shape and the mark size obtained by the teaching operation are given an ID for each recognition mark together with the mark search range, the expected matching coefficient, etc., and are stored in the mark data area 20g (step S13).

基板生産時には、図5に示す如く、まず生産(搭載)すべき基板種類(ID)が入力される(ステップS20)。続いて、この基板種の各基板マークに対応するモデルテンプレートを、マークデータ領域20gに格納されたマークデータから、それぞれ生成する(ステップS21)。なお、生成したモデルテンプレートは生産用テンプレートメモリ20hに格納しておく。ここでRAM20fに余裕がある場合は、図4のステップS13でマークデータを格納した段階でモデルテンプレートを生成し、RAM20fに予め格納しておくこともできる。   At the time of board production, as shown in FIG. 5, first, a board type (ID) to be produced (mounted) is input (step S20). Subsequently, a model template corresponding to each board mark of the board type is generated from the mark data stored in the mark data area 20g (step S21). The generated model template is stored in the production template memory 20h. Here, if there is a margin in the RAM 20f, a model template can be generated at the stage where the mark data is stored in step S13 of FIG. 4 and stored in advance in the RAM 20f.

基板10が搬送路11に入って沿って搬入される(ステップS22)と、吸着ヘッド1は、基板マークが形成されているマーク領域にそれぞれ移動し、CCDカメラ12により、各基板マークの画像がそれぞれ読み取られる(ステップ23)。続いて、ステップS21で生成された該基板マークに対応するモデルテンプレートを用いて、テンプレートマッチングを行ない、各基板マークがそれぞれ認識される(ステップS24)。本発明は、この工程でのテンプレートマッチングを精度良く行なうためのものであり、詳細は後述する。   When the substrate 10 enters the conveyance path 11 and is carried along (step S22), the suction head 1 moves to each mark area where the substrate mark is formed, and an image of each substrate mark is obtained by the CCD camera 12. Each is read (step 23). Subsequently, template matching is performed using the model template corresponding to the substrate mark generated in step S21, and each substrate mark is recognized (step S24). The present invention is for accurately performing template matching in this step, and details will be described later.

このマーク認識の結果に従って、基板の補正値が演算され(ステップS25)、コントローラ22を介して搬送路11を制御し、基板10の位置を補正し、基板10の位置決めが行なわれ(ステップS26)、続いて、部品搭載が行なわれる(ステップS27)。   According to the result of this mark recognition, a correction value of the substrate is calculated (step S25), the transport path 11 is controlled via the controller 22, the position of the substrate 10 is corrected, and the substrate 10 is positioned (step S26). Subsequently, component mounting is performed (step S27).

本発明では、図1(A)のような高く尖ったピークに対しても、図1(B)のような低く平坦なピークに対しても有効で、しかも精度良く位置決めできるテンプレートマッチングを提供する。その位置決め手法の模式図(2次元表現)を図7に示す。   The present invention provides template matching that is effective for both high and sharp peaks as shown in FIG. 1A and low and flat peaks as shown in FIG. . A schematic diagram (two-dimensional representation) of the positioning method is shown in FIG.

要は、最大相関位置周辺の局所演算を用いてサブピクセル演算を行なうのではなく、ピーク全体形状を把握し、尖ったピークであればピーク頂上部の狭い範囲、平坦なピークであれば、頂上の平坦部を含む広い範囲をサンプリング領域として、該サンプリング領域内の相関値の加重平均から検出位置を算出するというものである。   The point is not to perform sub-pixel calculation using local calculation around the maximum correlation position, but to grasp the whole peak shape, if it is a sharp peak, a narrow range at the top of the peak, if it is a flat peak, The detection position is calculated from the weighted average of the correlation values in the sampling area, with a wide range including the flat part of the sampling area as a sampling area.

テンプレートマッチングでは、処理時間の短縮のため、一般的にピラミッドマッチングが用いられる。これは、特許文献5に記載されているように、等倍画像でテンプレートマッチングを行なう前に、解像度を何段階か落として、まず解像度が最も粗い画像で候補位置を絞り込み、この絞り込んだ領域内のみを対象として、次段階の解像度画像でマッチング演算を行ない、最終的に等倍画像で位置決めを行なうという手法である。   In template matching, pyramid matching is generally used to reduce processing time. This is because, as described in Patent Document 5, before performing template matching with the same-size image, the resolution is reduced in several steps, and the candidate position is first narrowed down with the image with the coarsest resolution. In this method, matching calculation is performed on the next resolution image, and positioning is finally performed on the same-size image.

本実施形態では、このピラミッド演算と組合せて本発明を説明する。図8に本実施形態の手順を示す。   In the present embodiment, the present invention will be described in combination with this pyramid calculation. FIG. 8 shows the procedure of this embodiment.

まず、認識画像、テンプレート画像共、解像度を落としたピラミッド画像を生成する(ステップS30)。最粗解像度をどこまで落とすかは、画像の大きさや認識マークサイズに応じて決めるようにする。   First, a pyramid image with reduced resolution is generated for both the recognition image and the template image (step S30). The extent to which the coarsest resolution is reduced is determined according to the size of the image and the size of the recognition mark.

次に、解像度を最も落とした認識画像とテンプレート画像とでマッチング演算を行なう(ステップS31)。ここで求まる相関値の分布は、例えば図9(A)のようになっており、ある適当な閾値を設けることにより、図9(B)に黒色で示すように、この閾値を超えるピークを抜き出すことができる(ステップS32)。このとき用いる閾値は、最大相関値の何%かで求めても良いし、ユーザが期待するマークの相関値が分かっている場合は、この値を基準に閾値を定めても良い。ここで検出したピークの外接矩形を、図10に例示するように求めておく。   Next, a matching operation is performed on the recognition image with the lowest resolution and the template image (step S31). The correlation value distribution obtained here is, for example, as shown in FIG. 9A. By providing a certain appropriate threshold, a peak exceeding this threshold is extracted as shown in black in FIG. 9B. (Step S32). The threshold value used at this time may be obtained as a percentage of the maximum correlation value. When the correlation value of the mark expected by the user is known, the threshold value may be determined based on this value. The circumscribed rectangle of the peak detected here is obtained as illustrated in FIG.

以降は、等倍画像になるまで解像度を段階的に上げていき(ステップS33)、前の階層で検出した各ピーク付近のみにマッチング演算を行なう。即ち、1段階前の解像度で検出したピーク情報から、次のマッチング領域を設定し(ステップS34)、ピークを囲む矩形(ピーク算出時に求めた外接矩形又は1段階前のマッチング領域)内で、ピークの中心位置、ピークの尖度(ピークの広がり量)を算出し、これを用いて、マッチング領域を設定し、このようにして求めたマッチング領域内でテンプレートマッチングを行なう(ステップS35)。   Thereafter, the resolution is increased stepwise until an equal-magnification image is obtained (step S33), and matching calculation is performed only in the vicinity of each peak detected in the previous layer. That is, the next matching area is set from the peak information detected at the previous resolution (step S34), and the peak is set in the rectangle surrounding the peak (the circumscribed rectangle obtained when calculating the peak or the previous matching area). The center position and kurtosis of the peak (peak spread amount) are calculated, and using this, a matching area is set, and template matching is performed within the matching area thus obtained (step S35).

具体的には、図11に2次元で例示した如く、ピークを囲む矩形Aの境界4辺上(Sp上、Ep上)の最大相関値thrを閾値として得られる塊の外接矩形を、中心演算矩形Bとして設定する。   Specifically, as illustrated in FIG. 11 as a two-dimensional example, the circumscribed rectangle of the lump obtained using the maximum correlation value thr on the four sides (Sp and Ep) of the rectangle A surrounding the peak as a threshold is calculated as the center calculation. Set as rectangle B.

次いで、該中心演算矩形B内で、次式に示す如く、座標xに対して相関値V(x)の重みを付ける相関分布の加重平均を行ない、ピーク中心位置Cpを算出する。   Next, in the center calculation rectangle B, as shown in the following equation, a weighted average of the correlation distribution that weights the correlation value V (x) with respect to the coordinate x is performed, and the peak center position Cp is calculated.

Figure 2008151607
Figure 2008151607

これにより、ピーク平坦部の凹凸に影響を受けず、ピーク中心が算出できる。   Thereby, the peak center can be calculated without being affected by the unevenness of the peak flat portion.

次いで、ピーク中心位置Cpから放射線状に周辺の相関分布を調査して、ピーク中心部の相関値に対して大きく変動する(例えばピーク相関位置の5%変動等)位置を算出する。このとき、相関分布を平滑化しても良い。   Next, the correlation distribution around the peak is radiated from the peak center position Cp, and a position that greatly fluctuates with respect to the correlation value at the peak center (for example, 5% fluctuation of the peak correlation position) is calculated. At this time, the correlation distribution may be smoothed.

次いで、先に求めた変動位置を囲む矩形Dを、次のマッチング領域とする。   Next, the rectangle D surrounding the previously obtained variation position is set as the next matching region.

最粗層で検出した全てのピークに対してマッチングを終えたら(ステップS36でYES)、解像度を上げ(ステップS33)、ステップS34とS35を繰り返す。   When matching is completed for all peaks detected in the coarsest layer (YES in step S36), the resolution is increased (step S33), and steps S34 and S35 are repeated.

等倍画像でのマッチングを終えたら(ステップS37でYES)、検出したピークの中で最も高いピークを選択し(ステップS38)、ピーク中心位置を算出し(ステップS39)、これを最終的な検出位置とする。   When matching with the same size image is completed (YES in step S37), the highest peak among the detected peaks is selected (step S38), the peak center position is calculated (step S39), and this is finally detected. Position.

本実施形態においては、ピラミッドマッチングを併用しているので、簡単な計算で、ピーク中心位置を正確に求めることができる。なお、ピラミッドマッチングを行うことなく、等倍画像で直接、本発明によるテンプレートマッチングを行うこともできる。   In this embodiment, since pyramid matching is used together, the peak center position can be accurately obtained by simple calculation. It should be noted that template matching according to the present invention can also be performed directly on an equal-size image without performing pyramid matching.

前記実施形態においては、本発明が部品実装機に適用されていたが、本発明の適用対象は、これに限定されない。   In the said embodiment, although this invention was applied to the component mounting machine, the application object of this invention is not limited to this.

従来の問題点を説明するための図Illustration for explaining conventional problems 本発明の適用対象の一例である部品実装機の要部構成を示す斜視図The perspective view which shows the principal part structure of the component mounting machine which is an example of the application object of this invention 同じく画像処理装置の構成を示すブロック図Block diagram showing the configuration of the image processing apparatus 同じく基板マークに適するモデルテンプレートの取得(ティーチング)の手順を示す流れ図Flow chart showing the procedure for obtaining (teaching) model templates that are also suitable for board marks 同じくマーク認識の手順を示す流れ図Flow chart showing the procedure for mark recognition 同じく基板マークの例を示す平面図Similarly, a plan view showing an example of a substrate mark 本発明によるテンプレートマッチングの概念を示す図The figure which shows the concept of the template matching by this invention 本発明の実施形態における処理手順を示す流れ図The flowchart which shows the process sequence in embodiment of this invention 同じく相関値の分布の例を示す図The figure which similarly shows the example of distribution of correlation value 同じく外接矩形を示す平面図A plan view showing the circumscribed rectangle 本発明による処理手順の詳細を示す図The figure which shows the detail of the process sequence by this invention

符号の説明Explanation of symbols

1…吸着ヘッド
2…フィーダ
3…部品
10…基板
10a、10b、10c…基板マーク
11…搬送路
12…CCDカメラ
20…画像処理装置
22…コントローラ
DESCRIPTION OF SYMBOLS 1 ... Adsorption head 2 ... Feeder 3 ... Parts 10 ... Substrate 10a, 10b, 10c ... Substrate mark 11 ... Conveyance path 12 ... CCD camera 20 ... Image processing device 22 ... Controller

Claims (3)

認識画像上を、マークを含むテンプレート画像を逐次移動させ、最大相関位置を求めるテンプレートマッチングを用いたマーク位置決め方法において、
ピーク全体形状を把握し、
尖ったピークであればピーク頂上部周辺の狭い範囲、平坦なピークであれば頂上の平坦部を全て含む広い範囲をサンプリング領域として、
該サンプリング領域内の相関値の加重平均から検出位置を算出することを特徴とするテンプレートマッチングを用いたマーク位置決め方法。
In the mark positioning method using the template matching for sequentially moving the template image including the mark on the recognition image and obtaining the maximum correlation position,
Understand the overall shape of the peak,
If it is a sharp peak, a narrow range around the top of the peak, and if it is a flat peak, a wide range including all the flat part of the top is used as a sampling region.
A mark positioning method using template matching, wherein a detection position is calculated from a weighted average of correlation values in the sampling region.
前記テンプレートマッチングに際して、1段階前の解像度で検出したピーク情報から、次の解像度でのマッチング領域を設定することにより、等倍画像になるまで解像度を段階的に高めていくピラミッドマッチングを行なうことを特徴とする請求項1に記載のテンプレートマッチングを用いたマーク位置決め方法。   In the template matching, by setting a matching area at the next resolution from the peak information detected at the previous resolution, pyramid matching is performed in which the resolution is increased step by step until an equal-magnification image is obtained. The mark positioning method using template matching according to claim 1. 認識画像上を、マークを含むテンプレート画像を逐次移動させ、最大相関位置を求めるテンプレートマッチングを用いたマーク位置決め装置において、
ピーク全体形状を把握する手段と、
尖ったピークであればピーク頂上部周辺の狭い範囲、平坦なピークであれば頂上の平坦部を全て含む広い範囲をサンプリング領域とする手段と、
該サンプリング領域内の相関値の加重平均から検出位置を算出する手段と、
を備えたことを特徴とするテンプレートマッチングを用いたマーク位置決め装置。
In the mark positioning device using template matching for sequentially moving the template image including the mark on the recognition image and obtaining the maximum correlation position,
Means to understand the overall shape of the peak;
If it is a sharp peak, a narrow range around the peak top, and if it is a flat peak, a means to set the sampling range as a wide range including all of the flat top,
Means for calculating a detection position from a weighted average of correlation values in the sampling region;
A mark positioning device using template matching characterized by comprising:
JP2006339050A 2006-12-15 2006-12-15 Mark positioning method and apparatus using template matching Expired - Fee Related JP4860452B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006339050A JP4860452B2 (en) 2006-12-15 2006-12-15 Mark positioning method and apparatus using template matching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006339050A JP4860452B2 (en) 2006-12-15 2006-12-15 Mark positioning method and apparatus using template matching

Publications (2)

Publication Number Publication Date
JP2008151607A true JP2008151607A (en) 2008-07-03
JP4860452B2 JP4860452B2 (en) 2012-01-25

Family

ID=39653924

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006339050A Expired - Fee Related JP4860452B2 (en) 2006-12-15 2006-12-15 Mark positioning method and apparatus using template matching

Country Status (1)

Country Link
JP (1) JP4860452B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011158346A (en) * 2010-02-01 2011-08-18 Furuno Electric Co Ltd Image processing device, radar device, image processing method, and image processing program
WO2012001876A1 (en) * 2010-07-01 2012-01-05 株式会社 日立ハイテクノロジーズ Pattern matching method, image processing device, and computer program
CN112082480A (en) * 2020-09-08 2020-12-15 浙江清华柔性电子技术研究院 Method and system for measuring spatial orientation of chip, electronic device and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04361104A (en) * 1991-06-07 1992-12-14 Juki Corp Detecting system of position of substrate mark
JPH0755429A (en) * 1993-08-17 1995-03-03 Toshiba Corp Position recognition system
JPH1021389A (en) * 1996-07-03 1998-01-23 Mitsubishi Electric Corp Template matching method and device for the method
JPH11161795A (en) * 1997-12-01 1999-06-18 Tani Denki Kogyo Kk Measuring method by picture recognition and recording medium
JP2001052167A (en) * 1999-08-09 2001-02-23 Murata Mfg Co Ltd Image processing method
JP2001148014A (en) * 1999-11-22 2001-05-29 Matsushita Electric Ind Co Ltd Method of automatically deciding template pattern
JP2002310618A (en) * 2001-04-19 2002-10-23 Murata Mfg Co Ltd Size measurement device, size measurement method and inspection device for electronic component
JP2003075114A (en) * 2001-08-31 2003-03-12 Juki Corp Mark detection device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04361104A (en) * 1991-06-07 1992-12-14 Juki Corp Detecting system of position of substrate mark
JPH0755429A (en) * 1993-08-17 1995-03-03 Toshiba Corp Position recognition system
JPH1021389A (en) * 1996-07-03 1998-01-23 Mitsubishi Electric Corp Template matching method and device for the method
JPH11161795A (en) * 1997-12-01 1999-06-18 Tani Denki Kogyo Kk Measuring method by picture recognition and recording medium
JP2001052167A (en) * 1999-08-09 2001-02-23 Murata Mfg Co Ltd Image processing method
JP2001148014A (en) * 1999-11-22 2001-05-29 Matsushita Electric Ind Co Ltd Method of automatically deciding template pattern
JP2002310618A (en) * 2001-04-19 2002-10-23 Murata Mfg Co Ltd Size measurement device, size measurement method and inspection device for electronic component
JP2003075114A (en) * 2001-08-31 2003-03-12 Juki Corp Mark detection device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011158346A (en) * 2010-02-01 2011-08-18 Furuno Electric Co Ltd Image processing device, radar device, image processing method, and image processing program
WO2012001876A1 (en) * 2010-07-01 2012-01-05 株式会社 日立ハイテクノロジーズ Pattern matching method, image processing device, and computer program
JP2012014475A (en) * 2010-07-01 2012-01-19 Hitachi High-Technologies Corp Pattern matching method, image processor and computer program
US9141879B2 (en) 2010-07-01 2015-09-22 Hitachi High-Technologies Corporation Pattern matching method, image processing device, and computer program
CN112082480A (en) * 2020-09-08 2020-12-15 浙江清华柔性电子技术研究院 Method and system for measuring spatial orientation of chip, electronic device and storage medium

Also Published As

Publication number Publication date
JP4860452B2 (en) 2012-01-25

Similar Documents

Publication Publication Date Title
US6798925B1 (en) Method and apparatus for calibrating an image acquisition system
US7406191B2 (en) Inspection data producing method and board inspection apparatus using the method
EP3910593A1 (en) Image processing device, work robot, substrate inspection device, and specimen inspection device
JP4860452B2 (en) Mark positioning method and apparatus using template matching
JP2001135711A (en) Laser marking system
JP3974445B2 (en) Mark recognition method and apparatus
WO2017068638A1 (en) Image processing apparatus and parts mounter
JP2010147401A (en) Electronic component mounting apparatus and image distortion correcting method
US10849261B2 (en) Surface mounter and method of correcting recognition error
US20080008381A1 (en) Coordinate acquisition apparatus for test of printed board, and coordinate acquisition method and program for test thereof
JP2010025803A (en) Inspection device having positioning function, program therefor, inspection method of inspection device having positioning function
JP4515924B2 (en) Component data creation method, component automatic teaching device, component mounter, and program
JP4008722B2 (en) Method and apparatus for detecting floating electrode of electronic component
JP2004118467A (en) Member inclination recognizing method, member inclination recognition control program, readable recording medium, and shape recognizing device
US7724940B2 (en) Method of accurately determining similarity between target image and reference image
JP2974794B2 (en) Multi-view recognition method for polygonal parts
JPH10260016A (en) Image recognition device
JP7153127B2 (en) Pass/Fail Judgment Device and Pass/Fail Judgment Method
JP2005166769A (en) Electronic part packaging apparatus
Martinek et al. Measuring component self-alignment by automatic image processing method
JP2008181261A (en) Method and device for extracting contour line of object
JPH08167800A (en) Part mounting equipment
JP2006200900A (en) Technique and device for recognizing object
JP2005302821A (en) Method for creating inspection data, inspection device for screen print and screen printer with inspection function
JP2005033102A (en) Method for calculating pixel rate in image recognition apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110802

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110803

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110930

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20111018

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111102

R150 Certificate of patent or registration of utility model

Ref document number: 4860452

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141111

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees