JPWO2012029662A1 - Image processing method and image processing apparatus - Google Patents

Image processing method and image processing apparatus Download PDF

Info

Publication number
JPWO2012029662A1
JPWO2012029662A1 JP2012531845A JP2012531845A JPWO2012029662A1 JP WO2012029662 A1 JPWO2012029662 A1 JP WO2012029662A1 JP 2012531845 A JP2012531845 A JP 2012531845A JP 2012531845 A JP2012531845 A JP 2012531845A JP WO2012029662 A1 JPWO2012029662 A1 JP WO2012029662A1
Authority
JP
Japan
Prior art keywords
image
template
similarity
geometric transformation
eigenfunctions
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
JP2012531845A
Other languages
Japanese (ja)
Other versions
JP5317250B2 (en
Inventor
剛 上瀧
剛 上瀧
圭一 内村
圭一 内村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kumamoto University NUC
Original Assignee
Kumamoto University NUC
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 Kumamoto University NUC filed Critical Kumamoto University NUC
Priority to JP2012531845A priority Critical patent/JP5317250B2/en
Application granted granted Critical
Publication of JP5317250B2 publication Critical patent/JP5317250B2/en
Publication of JPWO2012029662A1 publication Critical patent/JPWO2012029662A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/242Aligning, centring, orientation detection or correction of the image by image rotation, e.g. by 90 degrees

Abstract

テンプレート画像を回転させながら照合を行う回転照合法よりも少ない照合回数で、回転照合法と同等の精度を確保することができ、処理時間を短縮することができる手法を提案する。テンプレート画像1に幾何変換を加えることで、幾何変換の量が異なる複数の幾何変換後のテンプレート画像からなる第1の画像群を生成するステップと、前記画像群に固有値分解を施すことで、変換後テンプレート画像と同数の固有値および固有関数を算出するステップと、複数の固有関数と前記画像群との内積演算を施すことで、第2の画像群を生成するステップと、入力画像と第2の画像群との画像類似度を算出するステップと、算出された画像類似度に基づき、入力画像の幾何変換パラメータの値を決定するステップとを備える。We propose a method that can ensure the same accuracy as the rotation matching method and reduce the processing time with a smaller number of matching times than the rotation matching method that performs the matching while rotating the template image. A step of generating a first image group composed of a plurality of template images after geometric transformation with different geometric transformation amounts by applying geometric transformation to the template image 1, and a transformation by performing eigenvalue decomposition on the image group A step of calculating the same number of eigenvalues and eigenfunctions as a post-template image; a step of generating a second image group by performing an inner product operation of a plurality of eigenfunctions and the image group; and an input image and a second A step of calculating an image similarity with the image group, and a step of determining a value of a geometric transformation parameter of the input image based on the calculated image similarity.

Description

本発明は、テンプレート画像を用いた画像照合を行う画像処理方法および画像処理装置に関する。   The present invention relates to an image processing method and an image processing apparatus that perform image matching using a template image.

従来から、部品の検査等を行うソフトため、画像照合が用いられている。画像照合の一例として、テンプレート画像を用いるものがある。テンプレート画像を用いた画像照合においては、例えば、良品であることが既知の部品が撮像され、その撮像された画像が用いられてテンプレート画像が予め準備される。そして、検査対象の部品を撮像することで得られる入力画像とテンプレート画像とが照合され、入力画像とテンプレート画像との比較により、検査対象の部品の検査が行われる。   Conventionally, image collation is used for software for inspecting parts and the like. One example of image matching is to use a template image. In image collation using a template image, for example, a component that is known to be a non-defective product is imaged, and a template image is prepared in advance using the captured image. Then, the input image obtained by imaging the part to be inspected and the template image are collated, and the part to be inspected is inspected by comparing the input image and the template image.

特に、産業用の画像処理においては、検査対象となる部品の位置および方向角を高精度に検出するために、予め与えたテンプレート画像と入力画像とをサブピクセル精度で照合する処理が行われる(非特許文献1参照)。こうしたサブピクセル精度の画像照合技術としては、入力画像に対して、テンプレート画像を回転させながら照合を行う回転照合法が知られている。回転照合法は、テンプレート画像に対して幾何変換を行う、幾何変換を用いた画像照合技術である。   In particular, in industrial image processing, in order to detect the position and direction angle of a part to be inspected with high accuracy, processing is performed in which a template image given in advance and an input image are collated with sub-pixel accuracy ( Non-patent document 1). As such an image collation technique with subpixel accuracy, a rotation collation method is known in which collation is performed while rotating a template image with respect to an input image. The rotation matching method is an image matching technique using geometric transformation that performs geometric transformation on a template image.

回転照合法においては、テンプレート画像が回転および平行移動させられながら、入力画像との関係において画像の類似度を示す画像類似度が算出され、画像類似度のピーク値から、入力画像の方向角および座標値が検出される。つまり、回転照合法によれば、テンプレート画像が所定のピッチで回転および平行移動させられ、テンプレート画像が入力画像に最も近似する回転角度およびXY座標値が探索されることで、入力画像の方向角および座標値が検出される。   In the rotation matching method, an image similarity indicating image similarity in relation to an input image is calculated while the template image is rotated and translated, and the direction angle of the input image and the input image direction angle are calculated from the peak value of the image similarity. Coordinate values are detected. That is, according to the rotation collation method, the template image is rotated and translated at a predetermined pitch, and the rotation angle and the XY coordinate values that approximate the input image to the template image are searched, whereby the direction angle of the input image. And coordinate values are detected.

このような回転照合法において、検出精度を上げるためには、テンプレート画像が入力画像に最も近似する回転角度を探索するためのテンプレート画像の回転ピッチを細かくして照合回数を増やす必要がある。このため、回転照合法において検出精度を上げることは、処理時間の長期化を招く。一方で、処理時間を短縮するためにテンプレート画像の回転ピッチを粗く(大きく)すると、十分な検出精度を得ることが困難となる。   In such a rotation collation method, in order to increase the detection accuracy, it is necessary to increase the number of collations by reducing the rotation pitch of the template image for searching for the rotation angle at which the template image most closely approximates the input image. For this reason, increasing the detection accuracy in the rotation matching method leads to a long processing time. On the other hand, if the rotation pitch of the template image is rough (enlarged) in order to shorten the processing time, it becomes difficult to obtain sufficient detection accuracy.

そこで、画像照合法において処理時間を削減するために、テンプレート画像の回転ピッチを粗くして照合を行いつつ、算出される画像類似度を、2次曲面あるいは2次曲線を用いて補間する方法がある(非特許文献2,3参照)。しかしながら、このように補間を行う方法によれば、補間による誤差が発生し、検出精度が低下する。   Therefore, in order to reduce the processing time in the image matching method, there is a method of interpolating the calculated image similarity using a quadratic curved surface or a quadratic curve while performing collation by coarsening the rotation pitch of the template image. Yes (see Non-Patent Documents 2 and 3). However, according to the method of performing interpolation in this way, an error due to interpolation occurs, and the detection accuracy decreases.

また、別の画像照合技術として、位相限定相関法が知られている(非特許文献4〜6参照)。位相限定相関法は、高速かつ高精度に位置合わせが可能な技術として、近年注目を浴びている。しかしながら、位相限定相関法は、画像の回転角の検出精度があまり良くなく、画像の位置ずれ・回転・拡大縮小以外の画像変形には十分に対応することができない。   As another image matching technique, a phase only correlation method is known (see Non-Patent Documents 4 to 6). In recent years, the phase-only correlation method has attracted attention as a technique that enables high-speed and high-precision alignment. However, the phase-only correlation method does not have a very good detection accuracy of the rotation angle of the image, and cannot sufficiently cope with image deformation other than image misalignment, rotation, and enlargement / reduction.

また、入力画像の明るさ変動や隠れに頑健な画像照合を行うために、テンプレート画像および入力画像をエッジ方向画像あるいは増分符号画像に変換してから画像照合を行う技術がある(非特許文献7参照)。しかし、この方法は入力画像の回転に対応していない。   In addition, there is a technique for performing image matching after converting a template image and an input image into an edge direction image or an incremental code image in order to perform image matching that is robust against brightness fluctuations and hiding of the input image (Non-patent Document 7). reference). However, this method does not support rotation of the input image.

鷲見 和彦,金子 俊一,“マシンビジョン技術の実利用”,電気学会論文誌C,Vol.124,No.3,pp.598−605,2004.Kazuhiko Kusumi, Shunichi Kaneko, “Practical use of machine vision technology”, IEEJ Transactions C, Vol. 124, no. 3, pp. 598-605, 2004. 清水 雅夫,奥富 正敏,“画像のマッチングにおける高精度なサブピクセル推定手法”,電子情報通信学会論文誌D−II,Vol.J84−D−II,No.7,pp.1409−1418,2001.Masao Shimizu and Masatoshi Okutomi, “Precise Subpixel Estimation Method for Image Matching”, IEICE Transactions D-II, Vol. J84-D-II, No. 7, pp. 1409-1418, 2001. 清水 雅夫,奥富 正敏,“画像のマッチングにおけるサブピクセル推定の意味と性質”,電子情報通信学会論文誌D−II,Vol.J85−D−II,No.12,pp.1791−1800,2002.Masao Shimizu, Masatoshi Okutomi, “Meaning and Properties of Subpixel Estimation in Image Matching”, IEICE Transactions D-II, Vol. J85-D-II, No. 12, pp. 1791-1800, 2002. K.Takita,T.Aoki,Y.Sasaki,T.Higuchi and K.Kobayashi,“High−accuracy subpixel image registration based on phase−only correlation” IEICE Transactions on Fundamentals of Electronics,Communications and Computer Sciences,Vol.E86−A,No.8,pp.1925−1934,2003.K. Taketa, T .; Aoki, Y .; Sasaki, T .; Higuchi and K.H. Kobayashi, “High-accuracy subpixel image registration based on phase-only correlation”, IEICE Transactions of Fundamentals of Fundamentals of Electronic Sciences. E86-A, no. 8, pp. 1925-1934, 2003. 佐々木 宏,小林 孝次,青木 孝文,川又 政征,樋口 龍雄,“回転不変位相限定相関による画像の回転角度計測について”,映像情報メディア学会技術報告,Vol.22,No.45,pp.55−60,1998.Hiroshi Sasaki, Kouji Kobayashi, Takafumi Aoki, Masayuki Kawamata, Tatsuo Higuchi, “Measurement of Image Rotation Angle by Rotation Invariant Phase-Only Correlation”, ITE Technical Report, Vol. 22, no. 45, pp. 55-60, 1998. 青木 孝文,伊藤 康一,柴原 琢磨,長嶋 聖,“位相限定相関法に基づく高精度マシンビジョン−ピクセル分解能の壁を越える画像センシング技術を目指して−”,IEICE Fundamentals Review,Vol.1,No.1,pp.30−40,2007.Takafumi Aoki, Koichi Ito, Takuma Shibahara, Satoshi Nagashima, “High-Precision Machine Vision Based on Phase-Only Correlation—Towards Image Sensing Technology that Transcends Pixel Resolution—”, IEICE Fundamentals Review, Vol. 1, No. 1 1, pp. 30-40, 2007. 村瀬 一郎,金子 俊一,“増分符号相関によるロバスト画像照合”,電子情報通信学会論文誌,DII,Vol.J83,No.5,pp.1323−1331,2000.Ichiro Murase and Shunichi Kaneko, “Robust Image Matching by Incremental Code Correlation”, IEICE Transactions, DII, Vol. J83, no. 5, pp. 1323-1331, 2000.

本発明は、上記のような背景技術に鑑みてなされたものであり、テンプレート画像を回転させながら照合を行う回転照合法等の、幾何変換を用いた従来の画像照合技術に対して、少ない照合回数で同等の精度を確保することができ、処理時間を短縮することができる画像処理方法および画像処理装置を提供することを目的とする。   The present invention has been made in view of the background art as described above, and has fewer collations than conventional image collation techniques using geometric transformation, such as a rotation collation method that collates while rotating a template image. It is an object of the present invention to provide an image processing method and an image processing apparatus that can ensure the same accuracy by the number of times and reduce the processing time.

本発明の画像処理方法は、所定のテンプレート画像を用いた照合を行うことで、前記テンプレート画像を基準とする入力画像の幾何変換パラメータの値を決定する画像処理方法であって、前記テンプレート画像に幾何変換を加えることで、前記幾何変換の量が異なる複数の幾何変換後の前記テンプレート画像からなる第1の画像群を生成する第1の画像群生成ステップと、前記第1の画像群に固有値分解を施すことで、前記複数の幾何変換後の前記テンプレート画像と同数の固有値および固有関数を算出する固有値分解ステップと、複数の前記固有関数と前記第1の画像群との内積演算を施すことで、第2の画像群を生成する第2の画像群生成ステップと、連続曲線で表され前記入力画像と前記第2の画像群との類似度合いを示す画像類似度を算出する画像類似度算出ステップと、前記画像類似度算出ステップで算出された前記画像類似度に基づき、前記幾何変換パラメータの値を決定する照合ステップと、を備えるものである。   The image processing method of the present invention is an image processing method for determining a value of a geometric transformation parameter of an input image with reference to the template image by performing collation using a predetermined template image. A first image group generation step for generating a first image group composed of a plurality of template images after geometric conversion by applying geometric transformation, and eigenvalues in the first image group; Performing decomposition, eigenvalue decomposition step for calculating the same number of eigenvalues and eigenfunctions as the template images after the plurality of geometric transformations, and performing inner product operation of the plurality of eigenfunctions and the first image group And a second image group generation step for generating a second image group, and an image similarity that is expressed by a continuous curve and indicates the degree of similarity between the input image and the second image group An image similarity calculation step of calculating, based on the image similarity calculated by the image similarity calculation step, a matching step of determining the value of the geometric transformation parameters are those comprising a.

また、本発明の画像処理方法においては、好ましくは、前記固有値分解ステップで算出された複数の前記固有関数のうち、前記固有値の大きな順に、所定の数の前記固有関数を選択する選択ステップをさらに備え、前記第2の画像群生成ステップは、前記選択ステップで選択された複数の前記固有関数と前記第1の画像群との内積演算を施すことで、前記第2の画像群を生成するものである。   In the image processing method of the present invention, preferably, a selection step of selecting a predetermined number of the eigenfunctions in descending order of the eigenvalues among the plurality of eigenfunctions calculated in the eigenvalue decomposition step is further included. And the second image group generation step generates the second image group by performing an inner product operation of the plurality of eigenfunctions selected in the selection step and the first image group. It is.

また、本発明の画像処理方法においては、好ましくは、前記幾何変換パラメータは、方向角および2次元座標値を含み、前記幾何変換は、方向角を変化させる回転および前記2次元座標値を変化させる平行移動を含むものである。   In the image processing method of the present invention, it is preferable that the geometric transformation parameter includes a direction angle and a two-dimensional coordinate value, and the geometric transformation changes the rotation that changes the direction angle and the two-dimensional coordinate value. Includes translation.

また、本発明の画像処理方法においては、好ましくは、前記幾何変換パラメータは、射影変換に必要なパラメータを含み、前記幾何変換は、射影変換を含むものである。   In the image processing method of the present invention, it is preferable that the geometric transformation parameter includes a parameter necessary for projective transformation, and the geometric transformation includes projective transformation.

また、本発明の画像処理方法においては、好ましくは、前記幾何変換パラメータは、画像のぼかし処理に必要なパラメータを含み、前記幾何変換は、画像のぼかし処理を含むものである。   In the image processing method of the present invention, it is preferable that the geometric transformation parameter includes a parameter necessary for an image blurring process, and the geometric transformation includes an image blurring process.

本発明の画像処理装置は、入力画像を取得するための入力画像取得手段と、所定のテンプレート画像を用いた照合を行うことで、前記テンプレート画像を基準とする前記入力画像の幾何変換パラメータの値を決定する画像処理手段と、を備え、前記画像処理手段は、前記テンプレート画像に幾何変換を加えることで、前記幾何変換の量が異なる複数の幾何変換後の前記テンプレート画像からなる第1の画像群を生成する第1の画像群生成部と、前記第1の画像群に固有値分解を施すことで、前記複数の幾何変換後の前記テンプレート画像と同数の固有値および固有関数を算出する固有値分解部と、複数の前記固有関数と前記第1の画像群との内積演算を施すことで、第2の画像群を生成する第2の画像群生成部と、連続曲線で表され前記入力画像と前記第2の画像群との類似度合いを示す画像類似度を算出する画像類似度算出部と、前記画像類似度算出部で算出された前記画像類似度に基づき、前記幾何変換パラメータの値を決定する照合部と、を備えるものである。   The image processing apparatus according to the present invention performs input image acquisition means for acquiring an input image and collation using a predetermined template image, so that the value of the geometric transformation parameter of the input image based on the template image Image processing means for determining the first image comprising the template images after the plurality of geometric transformations having different geometric transformation amounts by applying geometric transformation to the template image. A first image group generation unit that generates a group, and an eigenvalue decomposition unit that calculates the same number of eigenvalues and eigenfunctions as the template images after the plurality of geometric transformations by performing eigenvalue decomposition on the first image group A second image group generation unit that generates a second image group by performing an inner product operation of the plurality of eigenfunctions and the first image group, and the input represented by a continuous curve An image similarity calculating unit that calculates an image similarity indicating a degree of similarity between an image and the second image group, and a value of the geometric transformation parameter based on the image similarity calculated by the image similarity calculating unit. And a collation unit for determining.

また、本発明の画像処理装置は、好ましくは、前記画像処理手段は、前記固有値分解部で算出された複数の前記固有関数のうち、前記固有値の大きな順に、所定の数の前記固有関数を選択する選択部をさらに備え、前記第2の画像群生成部は、前記選択部で選択された複数の前記固有関数と前記第1の画像群との内積演算を施すことで、前記第2の画像群を生成するものである。   In the image processing apparatus of the present invention, it is preferable that the image processing unit selects a predetermined number of the eigenfunctions in descending order of the eigenvalues among the plurality of eigenfunctions calculated by the eigenvalue decomposition unit. And a second image group generation unit that performs an inner product operation of the plurality of eigenfunctions selected by the selection unit and the first image group, so that the second image group is generated. A group is generated.

本発明によれば、テンプレート画像を回転させながら照合を行う回転照合法等の、幾何変換を用いた従来の画像照合技術に対して、少ない照合回数で同等の精度を確保することができ、処理時間を短縮することができる。   According to the present invention, compared with a conventional image matching technique using geometric transformation, such as a rotation matching method that performs matching while rotating a template image, the same accuracy can be ensured with a small number of matching times. Time can be shortened.

本発明の一実施形態に係る画像処理方法の概略の説明図。1 is a schematic explanatory diagram of an image processing method according to an embodiment of the present invention. 本発明の一実施形態に係る画像処理方法の説明図。Explanatory drawing of the image processing method which concerns on one Embodiment of this invention. 本発明の一実施形態に係る画像処理装置の構成を示す図。1 is a diagram illustrating a configuration of an image processing apparatus according to an embodiment of the present invention. 本発明の一実施形態に係る画像処理装置の制御ブロック図。1 is a control block diagram of an image processing apparatus according to an embodiment of the present invention. 本発明の一実施形態に係る画像処理装置の画像処理の説明図。Explanatory drawing of the image processing of the image processing apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態の係る画像処理装置による処理手順の一例を示すフロー図。The flowchart which shows an example of the process sequence by the image processing apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態の係る画像処理装置による処理手順の一例についての説明図。Explanatory drawing about an example of the process sequence by the image processing apparatus which concerns on one Embodiment of this invention. 本発明の実施例に係る提案手法と回転照合法との精度比較を示す図。The figure which shows the precision comparison with the proposal method and rotation collation method which concern on the Example of this invention. 本発明の実施例に係る照合回数と誤差との関係を示す図。The figure which shows the relationship between the frequency | count of collation and the error which concern on the Example of this invention. 本発明の実施例に係る白色雑音を加えた場合の方向角および位置ずれの推定誤差の値について表を示す図。The figure which shows a table | surface about the value of the estimation error of the direction angle and position shift at the time of adding the white noise which concerns on the Example of this invention. 本発明の別実施例についての説明図。Explanatory drawing about another Example of this invention. 回転照合法についての説明図。Explanatory drawing about a rotation collation method. 従来の画像照合技術についての説明図。Explanatory drawing about the conventional image collation technique.

本発明は、テンプレート画像を回転させながら入力画像と照合することで得られる、テンプレート画像と入力画像との画像類似度の波形が、テンプレート画像の固有値分解により得られる新たなテンプレート画像と入力画像とを照合することで得られることに着目したものである。そして、本発明は、入力画像と新たなテンプレート画像との照合を行うことで、高速かつ高精度な照合を行おうとするものである。以下、本発明の実施の形態を説明する。   According to the present invention, a new template image and an input image obtained by eigenvalue decomposition of a template image obtained by comparing the template image with the input image while rotating the template image are obtained. It pays attention to what is obtained by collating. The present invention is intended to perform high-speed and high-precision collation by collating an input image with a new template image. Embodiments of the present invention will be described below.

図1に示すように、本実施形態に係る画像処理方法は、所定のテンプレート画像1を用いた照合を行うことで、テンプレート画像1を基準とする入力画像2の幾何変換パラメータの値を決定する。ここで、幾何変換パラメータとしては、例えば、方向角および2次元座標値(XY座標値)が用いられる。   As shown in FIG. 1, the image processing method according to the present embodiment determines the value of the geometric transformation parameter of the input image 2 with reference to the template image 1 by performing collation using a predetermined template image 1. . Here, as the geometric transformation parameter, for example, a direction angle and a two-dimensional coordinate value (XY coordinate value) are used.

すなわち、本実施形態の画像処理方法では、入力画像2に対して、テンプレート画像1の照合が行われることにより、テンプレート画像1の入力画像2に対する近似度合いである画像類似度が最も高くなる方向角および2次元座標値を求める処理が行われる。したがって、本実施形態の画像処理方法によれば、照合結果として、テンプレート画像1を基準とする入力画像2の方向角および2次元座標値が求められる。   That is, in the image processing method of the present embodiment, the template image 1 is collated with respect to the input image 2, whereby the direction angle at which the image similarity, which is the degree of approximation of the template image 1 with respect to the input image 2, is the highest. And the process which calculates | requires a two-dimensional coordinate value is performed. Therefore, according to the image processing method of the present embodiment, the direction angle and the two-dimensional coordinate value of the input image 2 with the template image 1 as a reference are obtained as a matching result.

具体的には、図1に示すように、照合結果に含まれる方向角としては、例えば、テンプレート画像1の方向角を示す基準線O1に対する、入力画像2の傾き(回転角度)θが求められる。また、照合結果に含まれる2次元座標値としては、例えば、テンプレート画像1の中心位置を原点O2とした場合の入力画像2の中心位置C1の2次元座標値(XY座標値)が求められる。   Specifically, as shown in FIG. 1, as the direction angle included in the collation result, for example, the inclination (rotation angle) θ of the input image 2 with respect to the reference line O1 indicating the direction angle of the template image 1 is obtained. . As the two-dimensional coordinate value included in the collation result, for example, the two-dimensional coordinate value (XY coordinate value) of the center position C1 of the input image 2 when the center position of the template image 1 is set as the origin O2 is obtained.

本実施形態の画像処理方法は、例えば、部品の検査等を行うための産業用の画像処理に用いられる。このため、本実施形態の画像処理方法において、テンプレート画像1は、例えば、検査対象となる部品と同じ部品がカメラ等の撮像手段によって撮像されることにより取得され、方向角および2次元座標値の基準を示す画像として、予め準備される。入力画像2は、例えば、部品の検査においては、検査対象となる部品をカメラ等の撮像手段によって撮像することにより取得され、テンプレート画像1の照合の対象となる。以下では、本実施形態の画像処理方法の具体的な処理内容について説明する。   The image processing method according to the present embodiment is used, for example, for industrial image processing for inspecting components and the like. For this reason, in the image processing method of the present embodiment, the template image 1 is acquired, for example, by imaging the same component as the component to be inspected by an imaging unit such as a camera, and the direction angle and the two-dimensional coordinate value are obtained. An image indicating a reference is prepared in advance. For example, in the inspection of a component, the input image 2 is acquired by imaging a component to be inspected by an imaging unit such as a camera, and is a target for collation of the template image 1. Below, the specific processing content of the image processing method of this embodiment is demonstrated.

本実施形態の画像処理方法においては、まず、テンプレート画像1に幾何変換を加えて第1の画像群としての変換後テンプレート画像群を生成する処理が行われる。本処理においては、テンプレート画像1に加えられる幾何変換として、例えば、方向角を変化させる回転や、2次元座標値を変化させる平行移動が行われる。   In the image processing method of the present embodiment, first, a process of generating a converted template image group as a first image group by performing geometric transformation on the template image 1 is performed. In this processing, as geometric transformation applied to the template image 1, for example, rotation for changing the direction angle and parallel movement for changing the two-dimensional coordinate value are performed.

具体的には、テンプレート画像1に加える幾何変換として、方向角を変化させる回転が行われる場合、例えば、テンプレート画像1を1°ピッチで回転させることで、変換後テンプレート画像群を生成する処理が行われる。かかる処理においては、方向角が1°ピッチで異なる360枚の幾何変換後のテンプレート画像1(以下「変換後テンプレート画像」という。)が、本処理で生成される変換後テンプレート画像群として得られる。   Specifically, when a rotation that changes the direction angle is performed as the geometric transformation applied to the template image 1, for example, a process of generating a template image group after conversion by rotating the template image 1 at a 1 ° pitch. Done. In this processing, 360 geometrically converted template images 1 (hereinafter referred to as “post-conversion template images”) having different directional angles with a 1 ° pitch are obtained as a post-conversion template image group generated in this processing. .

また、テンプレート画像1に加える幾何変換として、2次元座標値を変化させる平行移動が行われる場合、例えば、テンプレート画像1が128×128(ピクセル)の場合において、テンプレート画像1の中心位置(中心の2次元座標値)を8×8(ピクセル)の範囲で1(ピクセル)ピッチで平行移動させることで、変換後テンプレート画像群を生成する処理が行われる。かかる処理においては、中心位置(中心の2次元座標値)が1(ピクセル)ピッチで異なる64枚の変換後テンプレート画像が、本処理で生成される変換後テンプレート画像群として得られる。   Further, as a geometric transformation to be added to the template image 1, when a parallel movement that changes the two-dimensional coordinate value is performed, for example, when the template image 1 is 128 × 128 (pixels), the center position of the template image 1 (the center position) A process of generating a post-conversion template image group is performed by translating the two-dimensional coordinate value) within a range of 8 × 8 (pixels) at a 1 (pixel) pitch. In such processing, 64 converted template images having different center positions (center two-dimensional coordinate values) at a 1 (pixel) pitch are obtained as a group of converted template images generated by this processing.

このように、本実施形態の画像処理方法においては、始めに、テンプレート画像1に幾何変換を加えることで、幾何変換の量が異なる複数の幾何変換後のテンプレート画像1からなる変換後テンプレート画像群を生成する第1の画像群生成ステップが行われる。ここで、幾何変換の量は、幾何変換が方向角の場合、テンプレート画像1の方向角を基準とした画像の回転量に対応し、幾何変換が2次元座標値の場合、テンプレート画像1の2次元座標値を基準とした画像の平行移動量に対応する。したがって、幾何変換の量は、幾何変換パラメータの値の大きさに対応する。   As described above, in the image processing method of the present embodiment, first, a template image group after conversion, which includes a plurality of template images 1 after geometric conversion with different amounts of geometric conversion by applying geometric conversion to the template image 1. A first image group generation step of generating is performed. Here, the amount of geometric transformation corresponds to the rotation amount of the image with reference to the direction angle of the template image 1 when the geometric transformation is a direction angle, and 2 of the template image 1 when the geometric transformation is a two-dimensional coordinate value. This corresponds to the amount of parallel movement of the image based on the dimensional coordinate value. Therefore, the amount of geometric transformation corresponds to the magnitude of the value of the geometric transformation parameter.

なお、テンプレート画像1に加える幾何変換としては、方向角および2次元座標値のほか、例えば、画像の歪み、ぼけの量、焦点深度、台形歪み等の画像歪み等であってもよい。また、テンプレート画像1に加える幾何変換としては、前記のような幾何変換のいずれか一つが用いられたり、複数の幾何変換が組み合わせて用いられたりする。   The geometric transformation applied to the template image 1 may be, for example, image distortion such as image distortion, blur amount, depth of focus, trapezoidal distortion, etc. in addition to the direction angle and the two-dimensional coordinate value. In addition, as the geometric transformation applied to the template image 1, any one of the geometric transformations as described above is used, or a plurality of geometric transformations are used in combination.

本実施形態の画像処理方法においては、次に、変換後テンプレート画像群に固有値分解を施して固有値および固有関数を算出する処理が行われる。ここでは、変換後テンプレート画像群を構成する変換後テンプレート画像と同数の固有値および固有関数が算出される。   In the image processing method of the present embodiment, next, a process of calculating eigenvalues and eigenfunctions by performing eigenvalue decomposition on the converted template image group is performed. Here, the same number of eigenvalues and eigenfunctions as the number of converted template images constituting the converted template image group are calculated.

したがって、上述したように、テンプレート画像1に加える幾何変換として方向角が用いられ、360枚の変換後テンプレート画像からなる変換後テンプレート画像群が生成される場合、その360枚の画像からなる変換後テンプレート画像群に対して固有値分解が行われ、360個の固有値および固有関数が得られる。また、テンプレート画像1に加える幾何変換として2次元座標値が用いられ、64枚の変換後テンプレート画像からなる変換後テンプレート画像群が生成される場合、その64枚の画像からなる変換後テンプレート画像群に対して固有値分解が行われ、64個の固有値および固有関数が得られる。   Therefore, as described above, when the direction angle is used as the geometric transformation applied to the template image 1 and a post-conversion template image group including 360 post-conversion template images is generated, the post-conversion unit consisting of the 360 images is generated. Eigenvalue decomposition is performed on the template image group, and 360 eigenvalues and eigenfunctions are obtained. Further, when a two-dimensional coordinate value is used as a geometric transformation applied to the template image 1 and a converted template image group including 64 converted template images is generated, the converted template image group including the 64 images. Is subjected to eigenvalue decomposition, and 64 eigenvalues and eigenfunctions are obtained.

固有値分解を施すことで算出される固有関数としては、例えば、図2に示すように、波形p1〜p3で表わされる固有関数φ(θ)〜φ(θ)が得られる。これらの固有関数群は、主成固有関数群と言える。波形p1〜p3を示す各グラフにおいて、横軸はテンプレート画像1を基準とする方向角(θ)を示し、縦軸は固有関数値を示す。波形p1〜p3に示すように、固有関数として得られる波形は、方向角について固有関数値が連続的に存在する連続波形である。As eigenfunctions calculated by performing eigenvalue decomposition, eigenfunctions φ 1 (θ) to φ 3 (θ) represented by waveforms p1 to p3 are obtained, for example, as shown in FIG. These eigenfunction groups can be said to be main eigenfunction groups. In each graph showing the waveforms p1 to p3, the horizontal axis represents the direction angle (θ) with reference to the template image 1, and the vertical axis represents the eigenfunction value. As shown in the waveforms p1 to p3, the waveform obtained as the eigenfunction is a continuous waveform in which eigenfunction values continuously exist with respect to the direction angle.

固有関数においては、図2の波形p1〜p3に示すように、方向角の変化にともなって固有関数値が周期的に変動する。これらの固有関数は、本実施形態の画像処理方法において、後述する相関値(r)が掛け合わせられることで、画像類似度を表す関数(P(θ))として算出される。In the eigenfunction, as shown by the waveforms p1 to p3 in FIG. 2, the eigenfunction value periodically varies with the change in the direction angle. These eigenfunctions are calculated as functions (P n (θ)) representing image similarity by multiplying correlation values (r n ) described later in the image processing method of the present embodiment.

このように、本実施形態の画像処理方法においては、第1の画像群生成ステップの後に、変換後テンプレート画像群に固有値分解を施すことで、複数の変換後テンプレート画像と同数の固有値および固有関数を算出する固有値分解ステップが行われる。   As described above, in the image processing method of the present embodiment, after the first image group generation step, eigenvalue decomposition is performed on the converted template image group, so that the same number of eigenvalues and eigenfunctions as the plurality of converted template images are obtained. An eigenvalue decomposition step for calculating is performed.

本実施形態の画像処理方法においては、続いて、上記のとおり算出された複数の固有関数と変換後テンプレート画像群とを内積演算して新たな画像群を生成する処理が行われる。ここで生成される新たな画像群(以下「固有値分解テンプレート画像群」という。)が、本実施形態での第2の画像群に相当する。   In the image processing method of the present embodiment, subsequently, a process of generating a new image group by performing an inner product operation on the plurality of eigenfunctions calculated as described above and the converted template image group is performed. The new image group generated here (hereinafter referred to as “eigenvalue decomposition template image group”) corresponds to the second image group in the present embodiment.

固有値分解テンプレート画像群としては、例えば、図2において固有値分解テンプレート画像E1〜E3に示すような複数の画像が得られる。各固有値分解テンプレート画像E1〜E3は、固有関数を表す各波形p1〜p3にそれぞれ対応する。   As the eigenvalue decomposition template image group, for example, a plurality of images as shown in eigenvalue decomposition template images E1 to E3 in FIG. 2 are obtained. Each eigenvalue decomposition template image E1 to E3 corresponds to each waveform p1 to p3 representing an eigenfunction.

このように、本実施形態の画像処理方法においては、固有値分解ステップの後に、複数の固有関数と変換後テンプレート画像群との内積演算を施すことで、固有値分解テンプレート画像群を生成する第2の画像群生成ステップが行われる。   As described above, in the image processing method of the present embodiment, the eigenvalue decomposition template image group is generated by performing the inner product operation of the plurality of eigenfunctions and the converted template image group after the eigenvalue decomposition step. An image group generation step is performed.

本実施形態の画像処理方法においては、次に、入力画像2について、固有値分解テンプレート画像群に対する画像類似度を算出する処理が行われる。   In the image processing method of the present embodiment, next, a process of calculating the image similarity with respect to the eigenvalue decomposition template image group is performed for the input image 2.

画像類似度の算出の原理について説明する。なお、ここでは、上述した第1の画像群生成ステップでテンプレート画像1に加えられる幾何変換が方向角であるとして説明する。   The principle of calculating the image similarity will be described. Here, the description will be made assuming that the geometric transformation applied to the template image 1 in the first image group generation step described above is a direction angle.

テンプレート画像1をT(x,y)、入力画像2をf(x,y)、テンプレート画像T(x,y)をθ回転させた画像、つまり変換後テンプレート画像をT(x,y;θ)で表すとすると、テンプレート画像1と入力画像2との画像類似度g(θ)は、次式(1)により計算される。なお各画像を表すx,yは、画像におけるピクセルの2次元座標値を示す。   The template image 1 is T (x, y), the input image 2 is f (x, y), and the template image T (x, y) is rotated by θ, that is, the converted template image is T (x, y; θ ), The image similarity g (θ) between the template image 1 and the input image 2 is calculated by the following equation (1). Note that x and y representing each image indicate two-dimensional coordinate values of pixels in the image.

Figure 2012029662
Figure 2012029662

g(θ)をθ方向にそって固有関数列φ(θ),(n=0,1,2,・・・)で展開を行うと、次式(2)となる。When g (θ) is expanded by the eigenfunction sequence φ n (θ), (n = 0, 1, 2,...) along the θ direction, the following equation (2) is obtained.

Figure 2012029662
Figure 2012029662

上記式(2)の積分演算の順序を交換して次式(3)が得られる。   The following equation (3) is obtained by exchanging the order of the integral operation of the above equation (2).

Figure 2012029662
Figure 2012029662

ここで、次式(4)として定義するE(x,y)は、変換後テンプレート画像T(x,y;θ)と固有関数φ(θ)との内積で計算される画像、つまり固有値分解テンプレート画像となる。Here, E n (x, y) defined as the following equation (4) is an image calculated by the inner product of the converted template image T (x, y; θ) and the eigenfunction φ n (θ), that is, It becomes an eigenvalue decomposition template image.

Figure 2012029662
Figure 2012029662

上記式(4)で表わされる画像は、入力画像f(x,y)と分離して計算することができる。したがって、事前にE(x,y)を計算しておくことで、その後、入力画像f(x,y)が与えられることにより、E(x,y)との照合結果から、全方向角の画像類似度(g(θ))を計算することができる。The image represented by the above equation (4) can be calculated separately from the input image f (x, y). Therefore, by calculating E n (x, y) in advance, the input image f (x, y) is given thereafter, and from the result of matching with E n (x, y), all directions The corner image similarity (g (θ)) can be calculated.

全方向角の画像類似度(g(θ))としては、例えば、図2に示すように、波形p1〜p3で表わされる固有関数φ(θ)〜φ(θ)が所定の比率で足し合わせることで得られる波形qsが算出される。波形qsに示すように、全方向角の画像類似度(g(θ))として得られる波形は、方向角について画像類似度が連続的に存在する連続波形(連続曲線)である。つまり、画像類似度(g(θ))は、方向角(θ)方向についての画像類似度の分布を表す。As the image similarity (g (θ)) of the omnidirectional angles, for example, as shown in FIG. 2, eigenfunctions φ 1 (θ) to φ 3 (θ) represented by waveforms p1 to p3 are at a predetermined ratio. A waveform qs obtained by adding together is calculated. As shown in the waveform qs, the waveform obtained as the image similarity (g (θ)) for all directional angles is a continuous waveform (continuous curve) in which the image similarity is continuously present for the directional angles. That is, the image similarity (g (θ)) represents the distribution of the image similarity in the direction angle (θ) direction.

画像類似度(g(θ))は、具体的には次のようにして算出される。図2に示す例では、固有関数φ(θ)〜φ(θ)には、それぞれ相関値r〜rが掛け合わされる。固有関数φ(θ)〜φ(θ)に相関値r〜rが掛け合わされることで、画像類似度を表す関数P(θ)〜P(θ)が算出される。図2に示すように、関数P(θ)〜P(θ)は、固有関数φ(θ)〜φ(θ)としての波形p1〜p3が所定の比率で表された波形q1〜q3により表され、この所定の比率が、相関値r〜rに相当する。関数P(θ)〜P(θ)を表す波形q1〜q3を示す各グラフにおいて、横軸はテンプレート画像1を基準とする方向角(θ)を示し、縦軸は画像類似度を示す。そして、関数P(θ)〜P(θ)が足し合わされることで、波形qsで表される画像類似度(g(θ))が算出される。ここで、相関値rは、固有値分解テンプレート画像群の各固有値分解テンプレート画像と入力画像との相関を表す所定の実数であり、次式(5)として定義される。Specifically, the image similarity (g (θ)) is calculated as follows. In the example shown in FIG. 2, the eigenfunctions φ 1 (θ) to φ 3 (θ) are multiplied by correlation values r 1 to r 3 , respectively. By multiplying eigenfunctions φ 1 (θ) to φ 3 (θ) by correlation values r 1 to r 3 , functions P 1 (θ) to P 3 (θ) representing image similarity are calculated. As shown in FIG. 2, the functions P 1 (θ) to P 3 (θ) are waveforms q1 in which waveforms p1 to p3 as eigenfunctions φ 1 (θ) to φ 3 (θ) are represented at a predetermined ratio. This predetermined ratio corresponds to the correlation values r 1 to r 3 . In each graph showing the waveforms q1 to q3 representing the functions P 1 (θ) to P 3 (θ), the horizontal axis indicates the direction angle (θ) with reference to the template image 1, and the vertical axis indicates the image similarity. . Then, by adding the functions P 1 (θ) to P 3 (θ), the image similarity (g (θ)) represented by the waveform qs is calculated. Here, the correlation value r n, a predetermined real number representing the correlation between the input image and each eigenvalue decomposition template image eigenvalue decomposition template image group is defined as the following equation (5).

Figure 2012029662
Figure 2012029662

このように、相関値rは、f(x,y)で表される入力画像2と、上記式(4)で表される固有値分解テンプレート画像群との内積値となる。したがって、上記式(3)および式(5)から、画像類似度(g(θ))は、次式(6)により表わされる。
g(θ)=Σr×φ(θ) ・・・(6)
Thus, the correlation value r n, f (x, y) and the input image 2 represented by, the inner product value of the eigenvalue decomposition template image group represented by the formula (4). Therefore, from the above equations (3) and (5), the image similarity (g (θ)) is expressed by the following equation (6).
g (θ) = Σr n × φ n (θ) (6)

以上のように、本実施形態の画像処理方法においては、第2の画像群生成ステップの後に、連続曲線で表され入力画像2と固有値分解テンプレート画像群との類似度合いを示す画像類似度を算出する画像類似度算出ステップが行われる。   As described above, in the image processing method according to the present embodiment, after the second image group generation step, the image similarity that is represented by a continuous curve and indicates the degree of similarity between the input image 2 and the eigenvalue decomposition template image group is calculated. An image similarity calculation step is performed.

そして、本実施形態の画像処理方法では、上記のとおり算出された画像類似度(g(θ))に基づいて、テンプレート画像1を基準とする入力画像2の幾何変換パラメータの値(実数値)を決定する処理が行われる。つまり、この処理では、テンプレート画像1と入力画像2との照合が、上記のとおり算出された画像類似度(g(θ))の値を指標として行われる。   In the image processing method according to the present embodiment, based on the image similarity (g (θ)) calculated as described above, the value (real value) of the geometric transformation parameter of the input image 2 based on the template image 1. The process of determining is performed. That is, in this process, the template image 1 and the input image 2 are collated using the image similarity (g (θ)) value calculated as described above as an index.

具体的には、図2に示すように、全方向角の画像類似度(g(θ))である波形qsにおいて、画像類似度が最大となる方向角θaが、テンプレート画像1を基準とする入力画像2の幾何変換パラメータの値として決定される。つまり、本実施形態の画像処理方法の照合結果として、テンプレート画像1を基準とする入力画像2の方向角が、方向角θaとして算出される。   Specifically, as shown in FIG. 2, in the waveform qs which is the image similarity (g (θ)) of all direction angles, the direction angle θa at which the image similarity is maximum is based on the template image 1. It is determined as the value of the geometric transformation parameter of the input image 2. That is, the direction angle of the input image 2 based on the template image 1 is calculated as the direction angle θa as a collation result of the image processing method of the present embodiment.

ここで、照合結果として得られた方向角θaは、テンプレート画像1の方向角を基準(0°)とした場合における画像の回転角度に対応する。つまり、この場合、テンプレート画像1が360°回転する範囲において、角度θa回転させられた状態のテンプレート画像1が、入力画像2との関係において画像類似度が最も高くなる。   Here, the direction angle θa obtained as a matching result corresponds to the rotation angle of the image when the direction angle of the template image 1 is set as a reference (0 °). That is, in this case, in the range in which the template image 1 is rotated by 360 °, the template image 1 in the state rotated by the angle θa has the highest image similarity in relation to the input image 2.

このように、本実施形態の画像処理方法においては、画像類似度算出ステップの後に、画像類似度算出ステップで算出された画像類似度(g(θ))に基づき、テンプレート画像1を基準とする入力画像2の幾何変換パラメータの値を決定する照合ステップが行われる。照合ステップでは、固有関数の連続性に起因する画像類似度の連続性に着目し、幾何変換パラメータの実数値が決定される。   As described above, in the image processing method of the present embodiment, the template image 1 is used as a reference based on the image similarity (g (θ)) calculated in the image similarity calculation step after the image similarity calculation step. A collation step for determining the value of the geometric transformation parameter of the input image 2 is performed. In the collation step, focusing on the continuity of the image similarity due to the continuity of the eigenfunction, the real value of the geometric transformation parameter is determined.

以上のような画像処理方法においては、上述したように変換後テンプレート画像群に固有値分解を施す固有値分解ステップの後に、固有値分解ステップで算出された複数の固有関数のうち、固有値の大きな順に、所定の数の固有関数を選択する選択ステップが行われることが好ましい。   In the image processing method as described above, as described above, after the eigenvalue decomposition step for performing eigenvalue decomposition on the post-conversion template image group, among the plurality of eigenfunctions calculated in the eigenvalue decomposition step, predetermined values are arranged in descending order. Preferably, a selection step is performed to select a number of eigenfunctions.

本実施形態の画像処理方法においては、固有値分解ステップにおいて、複数の変換後テンプレート画像と同数の固有値および固有関数が算出される。つまり、上記のとおり1°ピッチの回転がテンプレート画像1に対して幾何変換として加えられることで360枚の変換後テンプレート画像が得られる場合、360個の固有値および固有関数が算出される。この場合、固有値分解テンプレート画像群の生成に際して全ての固有関数が用いられると、固有値分解テンプレート画像群は、360枚の固有値分解テンプレート画像となる。   In the image processing method of the present embodiment, the same number of eigenvalues and eigenfunctions as the plurality of post-conversion template images are calculated in the eigenvalue decomposition step. That is, as described above, when 360 converted template images are obtained by applying a rotation of 1 ° pitch as geometric transformation to the template image 1, 360 eigenvalues and eigenfunctions are calculated. In this case, when all eigenfunctions are used in generating the eigenvalue decomposition template image group, the eigenvalue decomposition template image group becomes 360 eigenvalue decomposition template images.

そこで、固有値分解ステップで算出された変換後テンプレート画像と同数の固有関数のうち、所定の数の固有関数が選択される。そして、固有関数の選択は、固有値が大きい方から行われる。つまり、選択ステップにおいては、固有値分解ステップで算出された複数の固有関数のうち、固有値が大きい側から所定の数だけ選択される。したがって、例えば、上記のとおり360個の固有関数が算出される場合、そのうち固有値が大きい側の60個の固有関数が選択される。このことは、固有値が大きい固有関数ほど、最終的に算出される、入力画像2と固有値分解テンプレート画像群との画像類似度に対する影響が大きい(寄与度が高い)ことに基づく。   Therefore, a predetermined number of eigenfunctions are selected from the same number of eigenfunctions as the converted template images calculated in the eigenvalue decomposition step. The selection of the eigenfunction is performed from the one with the larger eigenvalue. That is, in the selection step, a predetermined number of eigenfunctions calculated in the eigenvalue decomposition step are selected from the larger eigenvalue side. Therefore, for example, when 360 eigenfunctions are calculated as described above, 60 eigenfunctions with larger eigenvalues are selected. This is based on the fact that the eigenfunction having a larger eigenvalue has a greater influence (higher contribution) on the image similarity between the input image 2 and the eigenvalue decomposition template image group that is finally calculated.

このような選択ステップが行われる場合、上述した第2の画像群生成ステップにおいては、選択ステップで選択された複数の固有関数と変換後テンプレート画像群との内積演算が施されることで、固有値分解テンプレート画像群が生成される。つまり、選択ステップによれば、固有値分解ステップで算出された複数の固有関数のうち、固有値が大きい側の一部の固有関数が用いられて、固有値分解テンプレート画像群の生成が行われる。   When such a selection step is performed, in the second image group generation step described above, an eigenvalue is calculated by performing an inner product operation of the plurality of eigenfunctions selected in the selection step and the converted template image group. A decomposition template image group is generated. In other words, according to the selection step, an eigenvalue decomposition template image group is generated by using a part of the eigenvalues calculated in the eigenvalue decomposition step, a part of the eigenvalues having larger eigenvalues.

このような選択ステップは、具体的には、上記式(3)において、級数を所定の数で打ち切り近似することに対応する。ここで、式(3)の級数をM個で打ち切り近似する場合、式(3)は、次式(7)で表わされる。   Specifically, such a selection step corresponds to approximating the series by a predetermined number in Expression (3). Here, when the series of Expression (3) is approximated by M truncation, Expression (3) is expressed by the following Expression (7).

Figure 2012029662
Figure 2012029662

このとき、少ない次数Mでg(θ)を近似することができる固有関数列φ(θ)を選ぶことにより、全方向角での画像類似度が、M枚の画像E(x,y)との照合により計算することができる。そして、固有関数列φ(θ)の選び方として、変換後テンプレート画像列T(x,y;θ)の固有値λおよび固有関数φ(θ)を算出し、固有値の大きな順から、M個の固有関数を選ぶ。At this time, by selecting an eigenfunction sequence φ n (θ) that can approximate g (θ) with a small order M, the image similarity at all angles is M images E n (x, y ). Then, as a method of selecting the eigenfunction sequence φ n (θ), the eigenvalue λ n and the eigenfunction φ n (θ) of the post-conversion template image sequence T (x, y; θ) are calculated. Select eigenfunctions.

具体的には、θ={θ,θ,・・・,θ}と離散化して得られるベクトルφ、テンプレート画像T(x,y)=T(x,y;θ)として、次式(8)の行列固有値問題を解くことで、固有ベクトルφおよび固有値λが得られる。
Cφ=λφ ・・・(8)
Specifically, θ = {θ 1 , θ 2 ,..., Θ N } and vector φ n obtained by discretization, template image T i (x, y) = T (x, y; θ i ) Then, eigenvector φ n and eigenvalue λ n can be obtained by solving the matrix eigenvalue problem of the following equation (8).
n = λ n φ n (8)

ここで、行列Cは、i行j番目の要素を、次式(9)とする共分散行列である。   Here, the matrix C is a covariance matrix in which the i-th and j-th elements are represented by the following equation (9).

Figure 2012029662
Figure 2012029662

式(9)において、μは、T(x,y)の平均濃度値である。本固有ベクトルを用いて得られる画像E(x,y)が、固有値分解テンプレート画像に相当する。In Expression (9), μ j is an average density value of T i (x, y). An image E n (x, y) obtained using this eigenvector corresponds to an eigenvalue decomposition template image.

以上のような本実施形態の画像処理方法によれば、テンプレート画像を回転させながら照合を行う回転照合法等の、幾何変換を用いた従来の画像照合技術に対して、少ない照合回数で同等の精度を確保することができ、処理時間を短縮することができる。ここで、従来の画像照合技術である回転照合法について、図12を用いて説明する。   According to the image processing method of the present embodiment as described above, it is equivalent to a conventional image matching technique using geometric transformation, such as a rotation matching method that performs matching while rotating a template image, with a small number of matching times. Accuracy can be ensured and processing time can be shortened. Here, the rotation collation method, which is a conventional image collation technique, will be described with reference to FIG.

図12(a)に示すように、回転照合法においては、テンプレート画像101の回転角度(方向角)および位置(2次元座標値)が変化させられながら、入力画像102との関係における画像類似度が算出される。そして、画像類似度が最大となる方向角および2次元座標値が、入力画像102の方向角および2次元座標値として検出される。   As shown in FIG. 12A, in the rotation collation method, the image similarity in relation to the input image 102 while the rotation angle (direction angle) and position (two-dimensional coordinate value) of the template image 101 are changed. Is calculated. Then, the direction angle and the two-dimensional coordinate value that maximize the image similarity are detected as the direction angle and the two-dimensional coordinate value of the input image 102.

図12(a)中、下段に示すグラフG1において、横軸はテンプレート画像101の方向角、つまり回転させられるテンプレート画像101の回転角度を示し、縦軸はテンプレート画像101と入力画像102との画像類似度を示す。つまり、図12(a)下段に示すグラフG1は、テンプレート画像101の方向角が変化することによる、テンプレート画像101の入力画像102に対する画像類似度の変化を示す。   In graph G1 shown in the lower part of FIG. 12A, the horizontal axis represents the direction angle of the template image 101, that is, the rotation angle of the template image 101 to be rotated, and the vertical axis represents the image of the template image 101 and the input image 102. Indicates the similarity. That is, the graph G1 shown in the lower part of FIG. 12A shows a change in image similarity of the template image 101 with respect to the input image 102 due to a change in the direction angle of the template image 101.

また、図12(a)中、中段は、同図に示すグラフG1における方向角に対応して回転するテンプレート画像101の回転の過程を示す。テンプレート画像101は、例えば、1°の回転ピッチで360°回転させられる(図10では便宜上4枚のみ図示)。また、図12(a)中、上段は、回転照合法において検出対象となる入力画像102を示す。   Further, in FIG. 12A, the middle stage shows the process of rotation of the template image 101 that rotates in accordance with the direction angle in the graph G1 shown in FIG. For example, the template image 101 is rotated 360 ° at a rotation pitch of 1 ° (only four images are shown in FIG. 10 for convenience). In FIG. 12A, the upper part shows an input image 102 that is a detection target in the rotation matching method.

このような回転照合法においては、図12(a)に示すように、画像類似度が最大となる方向角P1が、入力画像102の方向角として検出される。つまり、回転照合法によれば、テンプレート画像101が所定の回転ピッチで回転させられ、テンプレート画像101が入力画像102に最も近似する回転角度(方向角)が探索されることで、入力画像102の方向角等が検出される。   In such a rotation collation method, as shown in FIG. 12A, the direction angle P1 that maximizes the image similarity is detected as the direction angle of the input image 102. That is, according to the rotation matching method, the template image 101 is rotated at a predetermined rotation pitch, and the rotation angle (direction angle) that approximates the input image 102 is searched for the template image 101. Direction angles and the like are detected.

このような回転照合法において、検出精度を上げるためには、テンプレート画像101が入力画像102に最も近似する回転角度(方向角P1)を探索するためのテンプレート画像101の回転ピッチを細かくして照合回数を増やす必要がある。このため、回転照合法において検出精度を上げることは、処理時間の長期化を招く。一方で、処理時間を短縮するためにテンプレート画像101の回転ピッチを粗く(大きく)すると、十分な検出精度を得ることが困難となる。   In such a rotation collation method, in order to increase the detection accuracy, collation is made by reducing the rotation pitch of the template image 101 for searching for the rotation angle (direction angle P1) that the template image 101 is closest to the input image 102. It is necessary to increase the number of times. For this reason, increasing the detection accuracy in the rotation matching method leads to a long processing time. On the other hand, if the rotation pitch of the template image 101 is roughened (enlarged) in order to shorten the processing time, it becomes difficult to obtain sufficient detection accuracy.

そこで、図12(b)に示すように、画像照合法において処理時間を削減するために、テンプレート画像101の回転ピッチを粗くして照合を行いつつ、算出される画像類似度を、2次曲面等を用いて補間する方法がある。   Therefore, as shown in FIG. 12B, in order to reduce the processing time in the image matching method, the calculated image similarity is calculated with a quadratic curved surface while performing the matching with a coarse rotation pitch of the template image 101. There is a method of interpolation using, for example.

具体的には、図12(b)に示す場合においては、例えば36°ピッチのR1〜R9の9箇所の方向角においてテンプレート画像101と入力画像102との照合が行われる。そして、R1〜R9の各箇所で画像類似度が算出され、各箇所での画像類似度に基づいて、各箇所の間の範囲における画像類似度が2次曲面等によって補間され、推定値としてのグラフG2が得られる。このグラフG2から、画像類似度が最大となる方向角P2が、入力画像102の方向角の推定値として検出される。   Specifically, in the case shown in FIG. 12B, for example, the template image 101 and the input image 102 are collated at nine directional angles R1 to R9 with a pitch of 36 °. Then, the image similarity is calculated at each of R1 to R9, and based on the image similarity at each location, the image similarity in the range between each location is interpolated by a quadric surface or the like to obtain an estimated value. A graph G2 is obtained. From this graph G2, the direction angle P2 having the maximum image similarity is detected as the estimated value of the direction angle of the input image 102.

図12(b)に示すように、推定値としての方向角P2は、比較的細かい回転ピッチによる同図(a)に示す方向角P1に対してずれた値となっている。このように、補間を行う方法によれば、補間による誤差が発生し、検出精度が低下する。   As shown in FIG. 12 (b), the direction angle P2 as the estimated value is a value shifted from the direction angle P1 shown in FIG. 12 (a) due to a relatively fine rotation pitch. Thus, according to the method of performing interpolation, an error due to interpolation occurs, and the detection accuracy decreases.

また、従来の画像照合技術の他の例について、図13を用いて説明する。図13に示すように、本例の画像照合技術の手法(以下「従来手法」という。)では、方向角が異なる複数の登録画像201が予め登録される。図13に示す例では、方向角が0°、30°、45°、90°の4つの登録画像201a、201b、201c、201dが登録されている。   Another example of the conventional image matching technique will be described with reference to FIG. As shown in FIG. 13, in the image matching technique method of this example (hereinafter referred to as “conventional method”), a plurality of registered images 201 having different direction angles are registered in advance. In the example shown in FIG. 13, four registered images 201a, 201b, 201c, and 201d having directional angles of 0 °, 30 °, 45 °, and 90 ° are registered.

4つの登録画像201a、201b、201c、201dは、固有値分解(主成分分析)により、それぞれ特徴ベクトルv〜vに変換される。特徴ベクトルは、登録画像を情報圧縮したものである。The four registered images 201a, 201b, 201c, and 201d are converted into feature vectors v 1 to v 4 by eigenvalue decomposition (principal component analysis), respectively. The feature vector is a registered image obtained by information compression.

また、従来手法においては、入力画像202も、登録画像201と同様に、固有値分解によって特徴ベクトルvinに変換される。そして、登録画像201に基づく特徴ベクトルv〜vのそれぞれについて、入力画像202に基づく特徴ベクトルvinとの差が求められ、その差の値が最小となる登録画像201が検出される。図13に示す例では、方向角が45°の登録画像201cが、入力画像202に最も近い登録画像201として検出され、この登録画像201cの方向角45°が、入力画像202の方向角として決定される。Further, in the conventional method, the input image 202, similarly to the registration image 201 is converted into a feature vector v in the eigenvalue decomposition. Then, for each feature vector v 1 to v 4 based on the registered image 201, the difference is obtained between the feature vector v in based on the input image 202, registered image 201 is detected that the value of the difference is minimized. In the example shown in FIG. 13, a registered image 201 c having a direction angle of 45 ° is detected as the registered image 201 closest to the input image 202, and the direction angle 45 ° of the registered image 201 c is determined as the direction angle of the input image 202. Is done.

このような従来手法において、検出精度を上げるためには、複数の登録画像201における方向角の角度間隔が小さくなるように登録画像201の数を多くする必要がある。登録画像201の数が増加すると、登録画像201と入力画像202との特徴ベクトル同士の差を求めるための比較回数も増加し、処理負担が大きくなる。このため、従来手法において検出精度を上げることは、処理時間の長期化を招く。一方で、処理時間を短縮するために登録画像201の数を少なくすると、検出分解能が粗くなり、十分な検出精度を得ることが困難となる。   In such a conventional method, in order to increase the detection accuracy, it is necessary to increase the number of registered images 201 so that the angle interval between the direction angles in the plurality of registered images 201 becomes small. As the number of registered images 201 increases, the number of comparisons for obtaining a difference between feature vectors of the registered image 201 and the input image 202 also increases, and the processing burden increases. For this reason, increasing the detection accuracy in the conventional method leads to a long processing time. On the other hand, if the number of registered images 201 is reduced in order to shorten the processing time, the detection resolution becomes coarse and it is difficult to obtain sufficient detection accuracy.

以上のように、処理時間の短縮化と検出精度の向上の両立が困難な回転照合法や従来手法等の従来の画像照合技術との比較において、本実施形態の画像処理方法によれば、同等の処理時間をかけた場合、高い検出精度を得ることができ、同等の検出精度を確保しようとした場合、処理時間を短くすることができる。具体的には、本実施形態の画像処理方法によれば、上述した従来手法のような特徴ベクトルの比較ではなく、決定すべき幾何変換パラメータについて連続的な波形として現れる画像類似度に基づいて幾何変換パラメータが決定されるため、高精度な検出処理を行うことができる。   As described above, according to the image processing method of the present embodiment, in comparison with the conventional image matching technology such as the rotation matching method and the conventional method in which it is difficult to simultaneously reduce the processing time and improve the detection accuracy. When the above processing time is taken, high detection accuracy can be obtained, and when the equivalent detection accuracy is to be ensured, the processing time can be shortened. Specifically, according to the image processing method of the present embodiment, the geometric vector is not based on the feature vector comparison as in the conventional method described above, but based on the image similarity that appears as a continuous waveform for the geometric transformation parameter to be determined. Since the conversion parameter is determined, highly accurate detection processing can be performed.

また、本実施形態の画像処理方法において、上述したように、固有値の大きな順に固有関数の一部を選択する選択ステップを行うことで、検出精度を確保しながら、処理時間のさらなる短縮化を図ることができる。すなわち、本実施形態に係る選択ステップによれば、変換後テンプレート画像と同数の固有関数のうち、画像類似度への影響(寄与度)が大きい一部の固有関数が用いられる。これにより、算出された固有関数の全てを用いる場合との比較において、決定される幾何変換パラメータについては十分な精度を確保することができるとともに、選択しない固有関数の分、処理速度を上げることができ、処理時間をさらに短くすることができる。   In the image processing method of the present embodiment, as described above, the selection step of selecting a part of the eigenfunctions in descending order of the eigenvalues is performed, thereby further reducing the processing time while ensuring the detection accuracy. be able to. That is, according to the selection step according to the present embodiment, some eigenfunctions having a large influence (contribution) on the image similarity are used among the same number of eigenfunctions as the converted template images. Thereby, in comparison with the case where all of the calculated eigenfunctions are used, sufficient accuracy can be ensured for the determined geometric transformation parameters, and the processing speed can be increased by the eigenfunctions not selected. The processing time can be further shortened.

また、本実施形態の画像処理方法においては、次のような手法を採用することができる。本実施形態の画像処理方法においては、上述したようにテンプレート画像1に幾何変換を加えることで得られる変換後テンプレート画像群の枚数が多いほど、固有関数の連続度は高くなる。そこで、本実施形態の画像処理方法では、変換後テンプレート画像の枚数を無限大に増やすことが好ましい。つまり、上述したような本実施形態の画像処理方法における一連の処理において、変換後テンプレート画像群を構成する変換後テンプレート画像の枚数を、数学的に無限大とする。   In the image processing method of the present embodiment, the following method can be employed. In the image processing method of the present embodiment, as the number of post-conversion template image groups obtained by applying geometric transformation to the template image 1 as described above increases, the continuity of the eigenfunction increases. Therefore, in the image processing method of this embodiment, it is preferable to increase the number of converted template images to infinity. That is, in the series of processes in the image processing method of the present embodiment as described above, the number of converted template images constituting the converted template image group is mathematically infinite.

この場合、行列の固有値問題の上記式(8)が、次式(10)のようになる。

Figure 2012029662
In this case, the above equation (8) of the matrix eigenvalue problem becomes the following equation (10).
Figure 2012029662

上記式(10)において、K(s,t)は、次式(11)により表される。

Figure 2012029662
In the above formula (10), K (s, t) is represented by the following formula (11).
Figure 2012029662

すなわち、行列の固有値問題ではなく、式(10)は、微分方程式の問題に変換される。変換後テンプレート画像の枚数を無限大に増やすことで、固有関数は、真の意味で連続関数となる。例えば、この連続関数を多項式で近似して、解析的に表すことも可能である。   That is, instead of the matrix eigenvalue problem, equation (10) is converted into a differential equation problem. By increasing the number of template images after conversion to infinity, the eigenfunction becomes a continuous function in a true sense. For example, this continuous function can be approximated by a polynomial and expressed analytically.

固有関数を多項式で表現することで、相関値を用いた固有関数の重み付き和である画像類似度関数(画像類似度g)も、多項式で表現される。多項式で表現された画像類似度関数の最大値を見つける処理は、多項式を微分して0となる位置を見つければよい。このように、変換後テンプレート画像の枚数を無限大に増やすことにより、パラメータの推定値を解析的に求めることが可能となり、幾何学的パラメータの値の推定精度を非常に高くすることができる。   By expressing the eigenfunction by a polynomial, an image similarity function (image similarity g) that is a weighted sum of eigenfunctions using correlation values is also expressed by a polynomial. The process of finding the maximum value of the image similarity function expressed by a polynomial may be performed by differentiating the polynomial and finding a position where it becomes zero. In this way, by increasing the number of post-conversion template images to infinity, it is possible to analytically determine the estimated value of the parameter, and the estimation accuracy of the value of the geometric parameter can be greatly increased.

また、本実施形態の画像処理方法においては、入力画像2について決定される幾何変換パラメータは、方向角および2次元座標値を含み、テンプレート画像1に加えられる幾何変換は、方向角を変化させる回転および2次元座標値を変化させる平行移動を含むことが好ましい。   In the image processing method of the present embodiment, the geometric transformation parameters determined for the input image 2 include a direction angle and a two-dimensional coordinate value, and the geometric transformation applied to the template image 1 is a rotation that changes the direction angle. It is preferable to include a translation that changes the two-dimensional coordinate values.

方向角および2次元座標値は、産業用の画像照合処理において比較的多用される幾何変換パラメータであり、また、2次元的な幾何変換パラメータであることから、比較的単純な演算処理により本実施形態の画像処理方法を行うことができる。このため、高い汎用性を得ることができる。   The direction angle and the two-dimensional coordinate value are geometric transformation parameters that are relatively frequently used in industrial image matching processing, and are two-dimensional geometric transformation parameters. The image processing method of the form can be performed. For this reason, high versatility can be obtained.

また、本実施形態の画像処理方法においては、入力画像2について決定される幾何変換パラメータは、射影変換に必要なパラメータを含み、テンプレート画像1に加えられる幾何変換は、射影変換を含む。   In the image processing method of the present embodiment, the geometric transformation parameters determined for the input image 2 include parameters necessary for projective transformation, and the geometric transformation applied to the template image 1 includes projective transformation.

射影変換は、アフィン変換をも含む一般的な射影変換であり、所定の変換式により、元の画像の座標(x,y)を、投影面における座標(x’,y’)に変換するものである。したがって、射影変換に必要なパラメータは、射影変換の一般式における係数である。   The projective transformation is a general projective transformation including an affine transformation, and converts the coordinates (x, y) of the original image into the coordinates (x ′, y ′) on the projection plane by a predetermined transformation formula. It is. Accordingly, the parameters necessary for the projective transformation are coefficients in the general formula of the projective transformation.

したがって、本実施形態の画像処理方法において、テンプレート画像1に加えられる幾何変換として射影変換が用いられる場合、第1の画像群生成ステップにおいて、テンプレート画像1に射影変換が加えられることで、変換後テンプレート画像群が生成される。そして、照合ステップにおいて、入力画像2の幾何変換パラメータの値として、射影変換の一般式における係数の値が決定される。   Therefore, when projective transformation is used as the geometric transformation applied to the template image 1 in the image processing method of the present embodiment, the projection transformation is added to the template image 1 in the first image group generation step, so that A template image group is generated. Then, in the collating step, the value of the coefficient in the general formula of the projective transformation is determined as the value of the geometric transformation parameter of the input image 2.

また、本実施形態の画像処理方法においては、入力画像2について決定される幾何変換パラメータは、画像のぼかし処理に必要なパラメータを含み、テンプレート画像1に加えられる幾何変換は、画像のぼかし処理を含む。   In the image processing method of the present embodiment, the geometric transformation parameters determined for the input image 2 include parameters necessary for the image blurring process, and the geometric transformation applied to the template image 1 performs the image blurring process. Including.

画像のぼかし処理は、画像をにじませる処理であり、例えば次のようにして行われる。画像のぼかし処理としては、例えば、処理対象のピクセル(x,y)を中心とする3×3ピクセル(9ピクセル)の色(色値)の平均を、処理対象のピクセルの色(色値)とする処理が行われる。かかる処理は、平滑化とも称される。画像のぼかし処理は、例えば、ピクセルの色を構成するR(赤)、G(緑)、B(青)の成分ごとに行われる。このように3×3ピクセルの色の平均が処理対象のピクセルの色として採用される場合、9ピクセルの平均化処理における各ピクセルの重みはいずれも同じ(「1」)となる。   The image blurring process is a process for blurring an image, and is performed as follows, for example. As an image blurring process, for example, an average of colors (color values) of 3 × 3 pixels (9 pixels) centering on a pixel (x, y) to be processed is used as a color (color value) of the pixel to be processed. Is performed. Such processing is also referred to as smoothing. The image blurring process is performed, for example, for each of R (red), G (green), and B (blue) components constituting the pixel color. As described above, when the average of the colors of 3 × 3 pixels is adopted as the color of the pixel to be processed, the weights of the pixels in the averaging process of 9 pixels are all the same (“1”).

したがって、画像のぼかし処理においては、処理対象のピクセルに対して周囲の8ピクセルの各ピクセルに2倍の重みを置いたり、処理対象のピクセルの上下左右の4ピクセルのみの色の平均が処理対象の色として用いられたりしてもよい。前者の場合、処理対象のピクセルの重みは「1」、周囲の各ピクセルの重みは「2」となり、後者の場合、処理対象のピクセルの上下左右のピクセルの重みは「1」、それ以外の5ピクセルの各ピクセルの重みは「0」となる。   Therefore, in image blurring processing, the weight of each of the surrounding 8 pixels is doubled with respect to the pixel to be processed, or the average of the colors of only four pixels above, below, left, and right of the pixel to be processed is processed. It may also be used as the color. In the former case, the weight of the pixel to be processed is “1” and the weight of each surrounding pixel is “2”. In the latter case, the weight of the upper, lower, left, and right pixels of the pixel to be processed is “1”. The weight of each pixel of 5 pixels is “0”.

このように画像のぼかし処理において行われる平均化処理における各ピクセルの重み(「1」や「2」等の数値)が、画像のぼかし処理に必要なパラメータとなる。また、処理対象のピクセルの色として平均化される対象となる範囲のピクセルの数(縦N×横N(個))も、画像のぼかし処理に必要なパラメータとなる。なお、Nの値が大きいほど、画像のぼけ具合は大きくなる。このような画像のぼかし処理に必要なパラメータが、入力画像2について決定される幾何変換パラメータに含まれる。   Thus, the weight of each pixel (numerical value such as “1” or “2”) in the averaging process performed in the image blurring process is a parameter necessary for the image blurring process. In addition, the number of pixels in the range to be averaged as the color of the pixel to be processed (vertical N × horizontal N (pieces)) is also a parameter necessary for the image blurring process. Note that the greater the value of N, the greater the degree of image blur. Parameters necessary for such an image blurring process are included in the geometric transformation parameters determined for the input image 2.

したがって、本実施形態の画像処理方法において、テンプレート画像1に加えられる幾何変換として画像のぼかし処理が用いられる場合、第1の画像群生成ステップにおいて、テンプレート画像1に画像のぼかし処理が加えられることで、変換後テンプレート画像群が生成される。そして、照合ステップにおいて、入力画像2の幾何変換パラメータの値として、上述のような画像のぼかし処理に必要なパラメータの値が決定される。なお、画像のぼかし処理としては、上述のような画像のぼかし処理に限らず、周知の画像のぼかし処理を適宜採用することができる。   Therefore, in the image processing method of the present embodiment, when image blurring processing is used as geometric transformation applied to the template image 1, image blurring processing is added to the template image 1 in the first image group generation step. Thus, a post-conversion template image group is generated. In the collation step, the value of the parameter necessary for the image blurring process as described above is determined as the value of the geometric transformation parameter of the input image 2. The image blurring process is not limited to the image blurring process described above, and a well-known image blurring process can be appropriately employed.

以上のように、本実施形態の画像処理方法において、射影変換や画像のぼかし処理を用いることで、より高度な画像照合処理において、処理時間の短縮化および検出精度の向上を図ることが可能となる。   As described above, in the image processing method of the present embodiment, by using projective transformation and image blurring processing, it is possible to shorten processing time and improve detection accuracy in more advanced image matching processing. Become.

具体的には、入力画像2に関し、検査対象となる部品等の撮像の際に、カメラ等の撮像手段による撮像方向が、検査対象物において設定される撮影面に対して垂直でないことにより、入力画像2において検査対象となる部品等が台形状に歪む現象(いわゆる台形歪み)が生じる場合がある。このような入力画像2において生じる台形歪みは、検出誤差の原因となる。   Specifically, with respect to the input image 2, when the part to be inspected is imaged, the imaging direction by the imaging unit such as a camera is not perpendicular to the imaging plane set in the inspection object. In the image 2, there is a case in which a part to be inspected is distorted into a trapezoid (so-called trapezoidal distortion). Such trapezoidal distortion that occurs in the input image 2 causes detection errors.

そこで、上述したように本実施形態の画像処理方法において射影変換が用いられることにより、入力画像2において台形歪みが生じた場合であっても、正確に画像照合を行うことが可能となる。つまり、変換後テンプレート画像群として、射影変換を施した複数のテンプレート画像1を予め準備することにより、台形歪みの影響を加味した固有値分解テンプレート画像を生成することができ、台形歪みによる誤差の少ない正確な画像照合を行うことができる。   Therefore, by using projective transformation in the image processing method of the present embodiment as described above, it is possible to accurately perform image matching even when trapezoidal distortion occurs in the input image 2. That is, by preparing in advance a plurality of template images 1 that have undergone projective transformation as a group of converted template images, an eigenvalue decomposition template image that takes into account the effect of trapezoidal distortion can be generated, and errors due to trapezoidal distortion are small. Accurate image matching can be performed.

また、同じく入力画像2に関し、カメラ等の撮像手段と検査対象物との距離により、入力画像2には「ぼけ」が含まれる。通常、このような画像のぼけに対しては、オートフォーカス処理等によって、カメラやレンズの移動をともなう調整(ピント合わせ)が行われる。しかし、このようなカメラやレンズの移動をともなう調整は、機械的な処理であるため、処理時間が長くなってしまう。   Similarly, regarding the input image 2, “blur” is included in the input image 2 due to the distance between the imaging means such as a camera and the inspection object. Normally, for such blurring of an image, adjustment (focusing) with movement of a camera or a lens is performed by autofocus processing or the like. However, such adjustment with movement of the camera and lens is a mechanical process, so that the processing time becomes long.

そこで、上述したように本実施形態の画像処理方法において画像のぼかし処理が用いられることにより、入力画像2にぼけが生じた場合であっても、事前に様々なパターンでぼかし処理を施したテンプレート画像1を準備することで対応が可能となる。つまり、変換後テンプレート画像群として、ぼかし処理を施した複数のテンプレート画像1を予め準備することにより、画像のぼけの影響を加味した固有値分解テンプレート画像を生成することができ、画像のぼけによる誤差の少ない正確な画像照合を行うことができる。また、オートフォーカス処理等の、画像処理時間の長期化の原因となる処理を省略することができるので、画像照合を行うための処理時間を短くすることができる。   Therefore, as described above, by using the image blurring process in the image processing method of the present embodiment, even if the input image 2 is blurred, a template that has been subjected to the blurring process in various patterns in advance. By preparing the image 1, it is possible to cope with it. That is, by preparing in advance a plurality of template images 1 subjected to blurring processing as a template image group after conversion, an eigenvalue decomposition template image that takes into account the effect of image blur can be generated, and errors due to image blurring can be generated. Therefore, it is possible to perform accurate image matching with a small amount of image. In addition, since processing that causes longer image processing time, such as autofocus processing, can be omitted, processing time for image matching can be shortened.

ぼかし処理についてさらに説明する。本実施形態の画像処理方法を用いた実際の検査においては、入力画像2について、ノイズや検査対象物の回転等の幾何学的な変形に加え、撮像手段のレンズのフォーカスずれ等に起因する画像のぼけが発生する。ぼけた画像である入力画像2に対して、テンプレート画像1による画像照合を行った場合、位置ずれが大きくなる。すなわち、入力画像2がぼけることで、ぼけていないテンプレート画像1とぼけた入力画像2との画像照合が行われることになり、画像照合がうまくいかず、位置ずれが生じる。このように画像照合の結果生じる位置ずれは、深刻な問題である。   The blurring process will be further described. In the actual inspection using the image processing method of the present embodiment, the input image 2 is an image caused by a focus shift of the lens of the imaging unit in addition to geometric deformation such as noise and rotation of the inspection object. Blurring occurs. When image collation using the template image 1 is performed on the input image 2 which is a blurred image, the positional deviation becomes large. That is, when the input image 2 is blurred, the image matching between the template image 1 that is not blurred and the blurred input image 2 is performed, the image matching is not successful, and a positional deviation occurs. As described above, misalignment caused as a result of image collation is a serious problem.

そこで、上記のとおりテンプレート画像1にぼかし処理を施すことで、敢えてぼけを加えたテンプレート画像1を画像照合に用いることで、入力画像2にぼけが生じた場合であっても、入力画像2とテンプレート画像1とを一致させることができる。これにより、入力画像2のぼけによる位置ずれの問題を回避することが可能となる。つまり、ぼけた入力画像2に合わせてテンプレート画像1にぼけを加えることで、マッチング精度を上げることができる。   Therefore, by applying blurring processing to the template image 1 as described above, the template image 1 that is intentionally blurred is used for image matching, so that even if the input image 2 is blurred, the input image 2 and The template image 1 can be matched. Thereby, it is possible to avoid the problem of misalignment due to blurring of the input image 2. That is, matching accuracy can be increased by adding blur to the template image 1 in accordance with the blurred input image 2.

一般的に、画像のぼかし処理は、ノイズ除去の用途に用いられるが、本実施形態の画像処理方法においては、入力画像2の照合の対象となるテンプレート画像1にぼかし処理を施すことで、ぼけを加えたテンプレート画像1を作成するために用いられる。このように、本実施形態の画像処理方法は、画像のぼかし処理の用い方が特徴的である。   In general, the image blurring process is used for noise removal. However, in the image processing method according to the present embodiment, blurring is performed by performing a blurring process on the template image 1 that is the target of matching of the input image 2. Is used to create a template image 1 to which is added. Thus, the image processing method of the present embodiment is characterized by the use of the image blurring process.

また、画像のぼけに関しては、小さな画像ぼけから、大きな画像ぼけまで多数のバリエーションがあり得る。このような多数のバリエーションの画像のぼけに対応するためには、画像のぼけのバリエーションに応じて、ぼけを加えたテンプレート画像1も多数枚用意する必要がある。このように全ての画像のぼけに対応して多数のテンプレート画像1を用いた画像照合を行うと、計算時間が非常に長くなると考えられる。   Regarding image blur, there can be many variations from small image blur to large image blur. In order to cope with such a large number of variations in the image, it is necessary to prepare a large number of template images 1 to which the blur has been added in accordance with the variation in the image blur. As described above, if image collation using a large number of template images 1 corresponding to the blur of all images is performed, it is considered that the calculation time becomes very long.

この点、本実施形態の画像処理方法においては、様々なぼけを加えたテンプレート画像群を変換後テンプレート画像として入力し、これらを固有値分解を用いて圧縮することで、上述のような計算時間の問題を解消することができる。つまり、変換後テンプレート画像は、固有値分解によって情報圧縮されることから、画像のぼけのバリエーションが多くなっても、計算時間が長くなることを抑えることができる。   In this regard, in the image processing method of the present embodiment, a template image group with various blurs is input as a template image after conversion, and these are compressed using eigenvalue decomposition to reduce the calculation time as described above. The problem can be solved. That is, since the post-conversion template image is information-compressed by eigenvalue decomposition, it is possible to suppress an increase in calculation time even if there are many variations in image blur.

なお、幾何変換としての射影変換および画像のぼかし処理は、それぞれ単独で用いられたり、上述した方向角および2次元座標値との関係で組み合わせて用いられたりする。   Note that the projective transformation and the image blurring processing as geometric transformation are used independently or in combination in relation to the above-described directional angle and two-dimensional coordinate values.

次に、本実施形態の画像処理方法の適用例として、本実施形態の画像処理方法を行うための装置について説明する。本適用例では、例えばICチップの生産ラインにおいて、ICチップのIC基盤への位置決めの工程で、画像照合が用いられる。   Next, as an application example of the image processing method of the present embodiment, an apparatus for performing the image processing method of the present embodiment will be described. In this application example, for example, in an IC chip production line, image verification is used in the process of positioning the IC chip on the IC substrate.

図3および図4に示すように、本実施形態の画像処理装置10は、コンピュータ11と、カメラ12とを備える。画像処理装置10は、カメラ12によってワークとしてのICチップ20を撮像し、その撮像画像を入力画像として、コンピュータ11において予め準備されているテンプレート画像を用いて画像照合を行う。本実施形態の画像処理装置10は、画像照合結果として、テンプレート画像を基準とする入力画像の方向角および2次元座標値を検出する。   As shown in FIGS. 3 and 4, the image processing apparatus 10 according to the present embodiment includes a computer 11 and a camera 12. The image processing apparatus 10 images the IC chip 20 as a work with the camera 12, and uses the captured image as an input image to perform image collation using a template image prepared in advance in the computer 11. The image processing apparatus 10 according to the present embodiment detects a direction angle and a two-dimensional coordinate value of an input image with reference to a template image as an image matching result.

そして、画像処理装置10による画像照合結果が用いられることで、複数のICチップ20が収容されるICチップ供給トレイ16からアーム17によってピッキングされたICチップ20が、IC基盤における所定の位置に位置決めされる。なお、アーム17は、例えばICチップ20を搬送する装置の一部を構成するロボットアームやピッキングアーム等の、部品取り出し用の構成である。   Then, by using the image collation result by the image processing apparatus 10, the IC chip 20 picked by the arm 17 from the IC chip supply tray 16 accommodating the plurality of IC chips 20 is positioned at a predetermined position on the IC substrate. Is done. Note that the arm 17 is a component-extracting configuration such as a robot arm or a picking arm that constitutes a part of a device that transports the IC chip 20, for example.

ICチップ20の位置決めは、具体的には次のように行われる。まず、アーム17によって、ICチップ供給トレイ16内の所定のICチップ20がピッキングされる(矢印A1参照)。ピッキングされたICチップ20が、アーム17に保持された状態で、カメラ12によって撮像される。このICチップ20の撮像画像が入力画像としてコンピュータ11に送信され、テンプレート画像が用いられて画像照合が行われる。   Specifically, the positioning of the IC chip 20 is performed as follows. First, a predetermined IC chip 20 in the IC chip supply tray 16 is picked by the arm 17 (see arrow A1). The picked IC chip 20 is captured by the camera 12 while being held by the arm 17. The captured image of the IC chip 20 is transmitted to the computer 11 as an input image, and image verification is performed using a template image.

画像処理装置10による画像照合結果としての入力画像の方向角および2次元座標値は、撮像対象となったICチップ20の角度および位置に対応する。したがって、画像処理装置10による画像照合結果に基づき、ICチップ20を保持するアーム17が、IC基盤への位置決めに際して、回転および平行移動させられる。かかるアーム17の回転および平行移動の動作の後、アーム17の上下方向の移動をともなって、ICチップ20がIC基盤における所定の位置に位置決めされる。   The direction angle and two-dimensional coordinate value of the input image as an image collation result by the image processing apparatus 10 correspond to the angle and position of the IC chip 20 that is the imaging target. Therefore, the arm 17 holding the IC chip 20 is rotated and translated when positioning the IC chip 20 based on the result of image collation by the image processing apparatus 10. After the arm 17 is rotated and translated, the IC chip 20 is positioned at a predetermined position on the IC substrate as the arm 17 moves in the vertical direction.

図4に示すように、コンピュータ11は、演算制御部13と、入力部14と、表示部15とを備える。演算制御部13は、画像処理装置10の一連の動作を制御する。演算制御部13は、プログラム等を格納する格納部、プログラム等を展開する展開部、プログラム等に従って所定の演算を行う演算部、演算部による演算結果等を保管する保管部等を有する。   As shown in FIG. 4, the computer 11 includes an arithmetic control unit 13, an input unit 14, and a display unit 15. The arithmetic control unit 13 controls a series of operations of the image processing apparatus 10. The calculation control unit 13 includes a storage unit that stores a program and the like, a development unit that expands the program and the like, a calculation unit that performs a predetermined calculation according to the program and the like, a storage unit that stores calculation results and the like by the calculation unit, and the like.

演算制御部13としては、具体的には、CPU、ROM、RAM、HDD等がバスで接続される構成や、ワンチップのLSI等からなる構成が用いられる。演算制御部13としては、専用品のほか、市販のパーソナルコンピュータやワークステーション等に上記プログラム等が格納されたものが用いられる。   Specifically, a configuration in which a CPU, ROM, RAM, HDD, or the like is connected by a bus, or a configuration that includes a one-chip LSI or the like is used as the arithmetic control unit 13. As the arithmetic control unit 13, in addition to a dedicated product, a commercially available personal computer, a workstation or the like in which the above program is stored is used.

入力部14は、演算制御部13に接続され、演算制御部13に、画像処理に係る種々の情報・指示等を入力する。入力部14としては、例えば、キーボード、マウス、ポインティングデバイス、ボタン、スイッチ等が用いられる。   The input unit 14 is connected to the calculation control unit 13 and inputs various information / instructions related to image processing to the calculation control unit 13. For example, a keyboard, a mouse, a pointing device, a button, a switch, or the like is used as the input unit 14.

表示部15は、演算制御部13に接続され、画像処理の動作状況、入力部14から演算制御部13への入力内容、画像処理による処理結果等を表示する。表示部15としては、例えば、液晶ディスプレイやCRT(陰極線管)等が用いられる。   The display unit 15 is connected to the calculation control unit 13 and displays an operation status of image processing, an input content from the input unit 14 to the calculation control unit 13, a processing result by the image processing, and the like. For example, a liquid crystal display, a CRT (cathode ray tube), or the like is used as the display unit 15.

カメラ12は、例えばCCDカメラであり、接続ケーブルを介する等してコンピュータ11に接続される。カメラ12は、ICチップ供給トレイ16内のICチップ20に対して相対移動することで、アーム17によるピッキングの対象となるICチップ20を撮像する。本実施形態では、カメラ12は、ICチップ20を上側から撮像し、ICチップ20の平面画像を撮像する。   The camera 12 is a CCD camera, for example, and is connected to the computer 11 via a connection cable. The camera 12 takes an image of the IC chip 20 to be picked by the arm 17 by moving relative to the IC chip 20 in the IC chip supply tray 16. In the present embodiment, the camera 12 captures the IC chip 20 from above and captures a planar image of the IC chip 20.

カメラ12により撮像されたICチップ20についての撮像データは、コンピュータ11に送られ、入力画像22(図5参照)として演算制御部13に入力される。このように、本実施形態の画像処理装置10においては、カメラ12が、入力画像22を取得するための入力画像取得手段として機能する。   Imaging data about the IC chip 20 captured by the camera 12 is sent to the computer 11 and input to the arithmetic control unit 13 as an input image 22 (see FIG. 5). As described above, in the image processing apparatus 10 of the present embodiment, the camera 12 functions as an input image acquisition unit for acquiring the input image 22.

図5に示すように、本実施形態の画像処理装置10において、コンピュータ11に備えられる演算制御部13が、所定のテンプレート画像21を用いた照合を行うことで、テンプレート画像21を基準とする入力画像22の幾何変換パラメータの値を決定する画像処理手段として機能する。したがって、演算制御部13において格納部に格納されるプログラム等には、テンプレート画像21とカメラ12によって撮像される入力画像22との画像照合を行うためのプログラムが含まれる。   As shown in FIG. 5, in the image processing apparatus 10 according to the present embodiment, the calculation control unit 13 provided in the computer 11 performs collation using a predetermined template image 21, thereby making an input based on the template image 21. It functions as an image processing means for determining the value of the geometric transformation parameter of the image 22. Therefore, the program stored in the storage unit in the arithmetic control unit 13 includes a program for performing image matching between the template image 21 and the input image 22 captured by the camera 12.

演算制御部13におけるプログラム等の格納部分としては、例えばRAM等のコンピュータ11に内蔵される記憶デバイスのほか、CD(Compact Disk)、FD(Flexible Disk )、MO(Magneto−Optical Disk)、DVD(Digital Versatile Disk)、HD(Hard Disk)等の記憶デバイスが適宜用いられる。   As a storage part of the program or the like in the arithmetic control unit 13, for example, a storage device built in the computer 11 such as a RAM, a CD (Compact Disk), an FD (Flexible Disk), an MO (Magneto-Optical Disk), a DVD ( A storage device such as a digital versatile disk (HD) or a hard disk (HD) is appropriately used.

図4に示すように、演算制御部13は、固有値分解パラメータ画像作成処理部18と、検出処理部19とを有する。固有値分解パラメータ画像作成処理部18は、予め記憶されているテンプレート画像21に基づいて、変換後パラメータ画像群を生成し、生成した変換後パラメータ画像群に固有値分解を施し、算出した固有関数と変換後テンプレート画像群とから固有値分解テンプレート画像群を作成する。   As shown in FIG. 4, the arithmetic control unit 13 includes an eigenvalue decomposition parameter image creation processing unit 18 and a detection processing unit 19. The eigenvalue decomposition parameter image creation processing unit 18 generates a converted parameter image group based on a template image 21 stored in advance, performs eigenvalue decomposition on the generated converted parameter image group, and converts the calculated eigenfunction and conversion An eigenvalue decomposition template image group is created from the subsequent template image group.

検出処理部19は、カメラ12によって取得された入力画像22と、固有値分解パラメータ画像作成処理部18によって生成された固有値分解テンプレート画像群との相関値を算出する。検出処理部19は、算出した相関値から、画像類似度を算出し、算出した画像類似度に基づいて、テンプレート画像21を基準とする入力画像22の幾何変換パラメータの値を決定する。   The detection processing unit 19 calculates a correlation value between the input image 22 acquired by the camera 12 and the eigenvalue decomposition template image group generated by the eigenvalue decomposition parameter image creation processing unit 18. The detection processing unit 19 calculates the image similarity from the calculated correlation value, and determines the value of the geometric transformation parameter of the input image 22 based on the template image 21 based on the calculated image similarity.

図4に示すように、演算制御部13は、テンプレート画像記憶部30と、変換後テンプレート画像生成部31と、固有値分解部32と、固有関数選択部33と、固有値分解テンプレート画像生成部34と、画像類似度算出部35と、照合部36とを有する。   As shown in FIG. 4, the arithmetic control unit 13 includes a template image storage unit 30, a post-conversion template image generation unit 31, an eigenvalue decomposition unit 32, an eigenfunction selection unit 33, and an eigenvalue decomposition template image generation unit 34. The image similarity calculation unit 35 and the collation unit 36 are included.

テンプレート画像記憶部30は、テンプレート画像21(図5参照)を記憶する。テンプレート画像21は、例えば、カメラ12による撮像対象となるICチップ20と同じ部品がカメラ12と同様のアングルから撮像されることにより得られる。テンプレート画像21は、ICチップ20のIC基盤への位置決めの工程において、方向角および2次元座標値の基準を示す画像として、入力画像22の照合の対象となる。   The template image storage unit 30 stores the template image 21 (see FIG. 5). For example, the template image 21 is obtained by imaging the same components as the IC chip 20 to be imaged by the camera 12 from the same angle as the camera 12. The template image 21 is a target to be collated with the input image 22 as an image indicating the direction angle and the reference of the two-dimensional coordinate value in the step of positioning the IC chip 20 on the IC substrate.

詳細には、テンプレート画像21は、カメラ12によって取得される入力画像22との関係において、画像におけるICチップ20の占める部分(大きさ)が同程度となるように作成される。言い換えると、カメラ12については、その取得する入力画像22におけるICチップ20の占める部分が、テンプレート画像21におけるICチップ20の占める部分と同程度となるように、ICチップ20の撮像位置等が設定される。このようなテンプレート画像21が、演算制御部13のテンプレート画像記憶部30において予め設定され記憶させられる。   Specifically, the template image 21 is created so that the portion (size) occupied by the IC chip 20 in the image is approximately the same in relation to the input image 22 acquired by the camera 12. In other words, for the camera 12, the imaging position of the IC chip 20 is set so that the portion occupied by the IC chip 20 in the input image 22 to be acquired is the same as the portion occupied by the IC chip 20 in the template image 21. Is done. Such a template image 21 is preset and stored in the template image storage unit 30 of the calculation control unit 13.

変換後テンプレート画像生成部31は、上述した画像処理方法における第1の画像群生成ステップに相当する処理を行う。すなわち、変換後テンプレート画像生成部31は、テンプレート画像記憶部30に記憶されているテンプレート画像21に幾何変換を加えることで、第1の画像群としての変換後テンプレート画像群を生成する。   The post-conversion template image generation unit 31 performs a process corresponding to the first image group generation step in the above-described image processing method. That is, the post-conversion template image generation unit 31 generates a post-conversion template image group as the first image group by performing geometric transformation on the template image 21 stored in the template image storage unit 30.

変換後テンプレート画像生成部31は、テンプレート画像21に加える幾何変換として、方向角を変化させる回転、および2次元座標値を変化させる平行移動を行う。このように、画像処理装置10においては、変換後テンプレート画像生成部31が、テンプレート画像21に幾何変換を加えることで、幾何変換の量が異なる複数の変換後テンプレート画像からなる変換後テンプレート画像群を生成する第1の画像群生成部として機能する。   The post-conversion template image generation unit 31 performs a rotation for changing the direction angle and a parallel movement for changing the two-dimensional coordinate value as the geometric transformation applied to the template image 21. As described above, in the image processing apparatus 10, the post-conversion template image generation unit 31 performs geometric transformation on the template image 21, thereby converting post-conversion template image groups including a plurality of post-conversion template images having different amounts of geometric transformation. Functions as a first image group generation unit for generating.

固有値分解部32は、上述した画像処理方法における固有値分解ステップに相当する処理を行う。すなわち、固有値分解部32は、変換後テンプレート画像群に固有値分解を施すことで、固有値および固有関数を算出する。   The eigenvalue decomposition unit 32 performs processing corresponding to the eigenvalue decomposition step in the above-described image processing method. That is, the eigenvalue decomposition unit 32 calculates eigenvalues and eigenfunctions by performing eigenvalue decomposition on the converted template image group.

固有値分解部32は、変換後テンプレート画像群を構成する変換後テンプレート画像と同数の固有値および固有関数を算出する。このように、画像処理装置10においては、固有値分解部32は、変換後テンプレート画像群に固有値分解を施すことで、複数の変換後テンプレート画像と同数の固有値および固有関数を算出する。   The eigenvalue decomposition unit 32 calculates the same number of eigenvalues and eigenfunctions as the converted template images that constitute the converted template image group. As described above, in the image processing apparatus 10, the eigenvalue decomposition unit 32 performs eigenvalue decomposition on the converted template image group to calculate the same number of eigenvalues and eigenfunctions as the plurality of converted template images.

固有関数選択部33は、上述した画像処理方法における選択ステップに相当する処理を行う。すなわち、画像処理装置10においては、固有関数選択部33は、固有値分解部32で算出された複数の固有関数のうち、固有値の大きな順に、所定の数の固有関数を選択する選択部として機能する。つまり、固有関数選択部33によれば、固有値分解部32で算出された複数の固有関数のうち、固有値が大きい側の一部の固有関数が選択される。   The eigenfunction selection unit 33 performs processing corresponding to the selection step in the above-described image processing method. That is, in the image processing apparatus 10, the eigenfunction selection unit 33 functions as a selection unit that selects a predetermined number of eigenfunctions in descending order of eigenvalues among the plurality of eigenfunctions calculated by the eigenvalue decomposition unit 32. . That is, the eigenfunction selection unit 33 selects some eigenfunctions on the side having a larger eigenvalue from among the plurality of eigenfunctions calculated by the eigenvalue decomposition unit 32.

固有値分解テンプレート画像生成部34は、上述した画像処理方法における第2の画像群生成ステップに相当する処理を行う。すなわち、固有値分解テンプレート画像生成部34は、固有値分解部32で算出された複数の固有関数と変換後テンプレート画像生成部31で生成された変換後テンプレート画像群とを内積演算することで、固有値分解テンプレート画像群を生成する処理を行う。   The eigenvalue decomposition template image generation unit 34 performs processing corresponding to the second image group generation step in the image processing method described above. That is, the eigenvalue decomposition template image generation unit 34 performs an inner product operation on the plurality of eigenfunctions calculated by the eigenvalue decomposition unit 32 and the converted template image group generated by the converted template image generation unit 31, thereby performing eigenvalue decomposition. Processing for generating a template image group is performed.

このように、固有値分解テンプレート画像生成部34は、複数の固有関数と変換後テンプレート画像群との内積演算を施すことで、固有値分解テンプレート画像群を生成する第2の画像群生成部として機能する。画像処理装置10のように、固有関数選択部33を有する構成においては、固有値分解テンプレート画像生成部34は、固有関数選択部33で選択された複数の固有関数と変換後テンプレート画像群との内積演算を施すことで、固有値分解テンプレート画像群を生成する。   As described above, the eigenvalue decomposition template image generation unit 34 functions as a second image group generation unit that generates an eigenvalue decomposition template image group by performing an inner product operation of the plurality of eigenfunctions and the converted template image group. . In the configuration having the eigenfunction selection unit 33 as in the image processing apparatus 10, the eigenvalue decomposition template image generation unit 34 is an inner product of a plurality of eigenfunctions selected by the eigenfunction selection unit 33 and the converted template image group. By performing the calculation, an eigenvalue decomposition template image group is generated.

画像類似度算出部35は、上述した画像処理方法における画像類似度算出ステップに相当する処理を行う。すなわち、画像類似度算出部35は、上記式(1)〜(9)に基づき、入力画像22について、固有値分解テンプレート画像群に対する画像類似度(g(θ))を算出する。すなわち、画像処理装置10においては、画像類似度算出部35は、連続曲線で表され入力画像22と固有値分解テンプレート画像群との類似度合いを示す画像類似度を算出する。   The image similarity calculation unit 35 performs processing corresponding to the image similarity calculation step in the above-described image processing method. That is, the image similarity calculation unit 35 calculates the image similarity (g (θ)) for the eigenvalue decomposition template image group for the input image 22 based on the above formulas (1) to (9). That is, in the image processing apparatus 10, the image similarity calculation unit 35 calculates an image similarity that is represented by a continuous curve and indicates the degree of similarity between the input image 22 and the eigenvalue decomposition template image group.

照合部36は、上述した画像処理方法における照合ステップに相当する処理を行う。すなわち、照合部36は、画像類似度算出部35で算出された画像類似度(g(θ))に基づいて、テンプレート画像21を基準とする入力画像22の幾何変換パラメータの値を決定する。   The collation unit 36 performs processing corresponding to the collation step in the above-described image processing method. That is, the collation unit 36 determines the value of the geometric transformation parameter of the input image 22 based on the template image 21 based on the image similarity (g (θ)) calculated by the image similarity calculation unit 35.

照合部36は、テンプレート画像21と入力画像22との照合を、上記のとおり画像類似度算出部35で算出された画像類似度の値を指標として行う。このように、画像処理装置10においては、照合部36は、画像類似度算出部35で算出された画像類似度に基づき、幾何変換パラメータの値を決定する照合部として機能する。本実施形態の画像処理装置10では、照合部36は、テンプレート画像21を基準とする入力画像22の幾何変換パラメータの値として、画像類似度が最大となる方向角および2次元座標値を決定する。   The collation unit 36 collates the template image 21 and the input image 22 with the image similarity value calculated by the image similarity calculation unit 35 as described above as an index. Thus, in the image processing apparatus 10, the collation unit 36 functions as a collation unit that determines the value of the geometric transformation parameter based on the image similarity calculated by the image similarity calculation unit 35. In the image processing apparatus 10 according to the present embodiment, the matching unit 36 determines the direction angle and the two-dimensional coordinate value that maximize the image similarity as the value of the geometric transformation parameter of the input image 22 with the template image 21 as a reference. .

以上のように、本実施形態の画像処理装置10において演算制御部13が有する各部によって行われる画像照合によれば、照合結果として、入力画像22の方向角および2次元座標値が得られる。具体的には、図5に示すように、照合結果に含まれる方向角としては、例えば、テンプレート画像21の方向角を示す基準線O10に対する、入力画像22の傾き(回転角度)θが求められる。また、照合結果に含まれる2次元座標値としては、例えば、テンプレート画像21の中心位置を原点O20とした場合の入力画像22の中心位置C10の2次元座標値(XY座標値)が求められる。   As described above, according to the image collation performed by each unit included in the calculation control unit 13 in the image processing apparatus 10 of the present embodiment, the direction angle and the two-dimensional coordinate value of the input image 22 are obtained as the collation result. Specifically, as shown in FIG. 5, as the direction angle included in the collation result, for example, the inclination (rotation angle) θ of the input image 22 with respect to the reference line O10 indicating the direction angle of the template image 21 is obtained. . As the two-dimensional coordinate value included in the collation result, for example, the two-dimensional coordinate value (XY coordinate value) of the center position C10 of the input image 22 when the center position of the template image 21 is the origin O20 is obtained.

本実施形態の画像処理装置10により行われる画像照合の処理手順の一例について、図6に示すフロー図を用いて説明する。   An example of the processing procedure of image collation performed by the image processing apparatus 10 of the present embodiment will be described with reference to the flowchart shown in FIG.

図6に示すように、画像処理装置10による画像照合の処理手順では、まず、テンプレート画像21の入力が行われる(S10)。このステップS10では、検査対象であるICチップ20が所定の方法によって撮像されることで得られるテンプレート画像21が、テンプレート画像記憶部30に入力され、予め記憶される。   As shown in FIG. 6, in the image collation processing procedure by the image processing apparatus 10, first, the template image 21 is input (S10). In step S10, a template image 21 obtained by imaging the IC chip 20 to be inspected by a predetermined method is input to the template image storage unit 30 and stored in advance.

次に、変換後テンプレート画像群の生成が行われる(S20)。このステップでは、変換後テンプレート画像生成部31により、テンプレート画像記憶部30に記憶されているテンプレート画像21に幾何変換が加えられることで、N枚の変換後テンプレート画像からなる変換後テンプレート画像群が生成される。例えば、テンプレート画像21が1°ピッチで回転させられることで、N=360枚の変換後テンプレート画像(回転画像)からなる変換後テンプレート画像群が生成される。図2に示す例では、N枚の変換後テンプレート画像からなる変換後テンプレート画像群1Nが生成される。   Next, a converted template image group is generated (S20). In this step, the post-conversion template image generation unit 31 applies geometric transformation to the template image 21 stored in the template image storage unit 30, so that a post-conversion template image group composed of N post-conversion template images is obtained. Generated. For example, the template image 21 is rotated at a pitch of 1 °, thereby generating a converted template image group including N = 360 converted template images (rotated images). In the example shown in FIG. 2, a post-conversion template image group 1N composed of N post-conversion template images is generated.

続いて、複数の固有値および固有関数の算出が行われる(S30)。このステップでは、固有値分解部32により、変換後テンプレート画像群(N枚の変換後テンプレート画像)に固有値分解が施されることで、固有値および固有関数が算出される。ここでは、固有値分解部32により生成された変換後テンプレート画像の数と同数(N個)の固有値および固有関数が算出される。したがって、上記のとおり360枚の変換後テンプレート画像が生成される場合、360個の固有値および固有関数が算出される。図2に示す例では、変換後テンプレート画像群1Nに固有値分解が施されることで、N個の固有関数φ(θ),(n=1,2,・・・N)からなる固有関数群と、N個の固有値が算出される。Subsequently, a plurality of eigenvalues and eigenfunctions are calculated (S30). In this step, the eigenvalue decomposition unit 32 performs eigenvalue decomposition on the post-conversion template image group (N post-conversion template images), thereby calculating eigenvalues and eigenfunctions. Here, the same number (N) of eigenvalues and eigenfunctions as the number of post-conversion template images generated by the eigenvalue decomposition unit 32 are calculated. Therefore, when 360 converted template images are generated as described above, 360 eigenvalues and eigenfunctions are calculated. In the example shown in FIG. 2, eigenvalue decomposition is performed on the post-conversion template image group 1N, so that an eigenfunction composed of N eigenfunctions φ n (θ), (n = 1, 2,... N). A group and N eigenvalues are calculated.

次に、固有値の大きさに基づく固有関数の選択が行われる(S40)。このステップでは、固有関数選択部33により、固有値分解部32で算出されたN個の固有関数のうち、固有値が大きい側の所定の数(M個)の固有関数が選択される。例えば、上記のとおり360個(N個)の固有関数が算出された場合、そのうちの固有値が大きい方の60個(M個)の固有関数が選択される。図2に示す例では、N個の固有関数φ(θ)から、M個の固有関数からなる固有関数群φ(θ),φ(θ),・・・,φ(θ)が選択される。Next, an eigenfunction is selected based on the size of the eigenvalue (S40). In this step, the eigenfunction selection unit 33 selects a predetermined number (M) of eigenfunctions having larger eigenvalues among the N eigenfunctions calculated by the eigenvalue decomposition unit 32. For example, when 360 (N) eigenfunctions are calculated as described above, 60 (M) eigenfunctions having a larger eigenvalue are selected. In the example shown in FIG. 2, a group of eigenfunctions φ 1 (θ), φ 2 (θ),..., Φ M (θ) consisting of M eigenfunctions from N eigenfunctions φ n (θ). Is selected.

そして、固有値分解テンプレート画像群の生成が行われる(S50)。このステップでは、固有値分解テンプレート画像生成部34により、上記式(4)に基づき、固有関数選択部33で選択されたM個の固有関数と変換後テンプレート画像生成部31で生成された変換後テンプレート画像群とが内積演算されることで、固有値分解テンプレート画像群(M枚の固有値分解テンプレート画像)が生成される。図2に示す例では、固有値分解テンプレート画像E1〜E3(E(x,y)〜E(x,y))からなる固有値分解テンプレート画像群が得られる。Then, an eigenvalue decomposition template image group is generated (S50). In this step, the eigenvalue decomposition template image generation unit 34 generates the M eigenfunctions selected by the eigenfunction selection unit 33 and the converted template image generated by the converted template image generation unit 31 based on the above equation (4). An inner product operation is performed on the image group to generate an eigenvalue decomposition template image group (M eigenvalue decomposition template images). In the example illustrated in FIG. 2, an eigenvalue decomposition template image group including eigenvalue decomposition template images E1 to E3 (E 1 (x, y) to E 3 (x, y)) is obtained.

続いて、入力画像22の取得が行われる(S60)。このステップでは、カメラ12により、アーム17によってピッキングされてアーム17に保持されている状態のICチップ20が撮像され、その撮像データが、コンピュータ11の演算制御部13に入力される。図2に示す例では、入力画像2が取得され入力される。   Subsequently, the input image 22 is acquired (S60). In this step, the IC chip 20 picked by the arm 17 and held by the arm 17 is imaged by the camera 12, and the imaging data is input to the arithmetic control unit 13 of the computer 11. In the example shown in FIG. 2, the input image 2 is acquired and input.

次に、入力画像22の位置の設定が行われる(S70)。このステップでは、上記ステップS60により取得された入力画像22について、その画像における位置、つまり画素の2次元座標値(x,y)が特定される。   Next, the position of the input image 22 is set (S70). In this step, the position in the image, that is, the two-dimensional coordinate value (x, y) of the pixel is specified for the input image 22 acquired in step S60.

次に、入力画像22の位置(x,y)における、入力画像22とM枚の固有値分解テンプレート画像の各画像との相関値r(x,y)の算出が行われる(S80)。このステップでは、相関値rは、上記式(5)により算出される。相関値rの算出に際しては、上記ステップS70で設定された入力画像22の位置(x,y)が用いられる。図2に示す例では、f(x,y)で表される入力画像2について、上記式(5)により、相関値rが算出される。Next, the correlation value r n (x, y) between the input image 22 and each of the M eigenvalue decomposition template images at the position (x, y) of the input image 22 is calculated (S80). In this step, the correlation value r n, is calculated by the equation (5). When calculating the correlation value r n is the position of the input image 22 that has been set in step S70 (x, y) is used. In the example shown in FIG. 2, f (x, y) for the input image 2 represented by, according to the above equation (5), the correlation value r n is calculated.

続いて、入力画像22の位置(x,y)における、入力画像22と固有値分解テンプレート画像群との画像類似度の算出が行われる(S90)。このステップでは、画像類似度算出部35により、上記式(3)((6))により、上記ステップS70にて設定された入力画像22の位置(x,y)について、固有値分解テンプレート画像群に対する画像類似度(g(θ,x,y))が算出される。図2に示す例では、固有関数φ(θ)〜φ(θ)に相関値r〜rが掛け合わされることで、画像類似度を表す関数P(θ)〜P(θ)が算出され、これらの関数P(θ)〜P(θ)が足し合わされることで、波形qsで表される画像類似度(g(θ))が算出される。Subsequently, the image similarity between the input image 22 and the eigenvalue decomposition template image group at the position (x, y) of the input image 22 is calculated (S90). In this step, the image similarity calculation unit 35 calculates the position (x, y) of the input image 22 set in step S70 with respect to the eigenvalue decomposition template image group according to the above formulas (3) and (6). An image similarity (g (θ, x, y)) is calculated. In the example shown in FIG. 2, the correlation values r 1 to r 3 are multiplied by the eigenfunctions φ 1 (θ) to φ 3 (θ), so that the functions P 1 (θ) to P 3 ( θ) is calculated, and these functions P 1 (θ) to P 3 (θ) are added to calculate the image similarity (g (θ)) represented by the waveform qs.

このように、ステップS70にて設定された入力画像22の位置(x,y)についての相関値rの算出および画像類似度gの算出が、入力画像22の全ての2次元座標値について行われる。つまり、入力画像22において位置(x,y)を特定する全画素について、相関値rの算出および画像類似度gの算出が行われる。Thus, the position (x, y) of the input image 22 that has been set in step S70 is calculated and the calculation of the image similarity g correlation value r n for all the rows for the two-dimensional coordinate values of the input image 22 Is called. That is, the position in the input image 22 (x, y) for all pixels to identify the calculation of the calculation and image similarity g of correlation value r n is performed.

本処理手順では、図7(a)に示すように、ステップS70において、入力画像22の位置(x,y)は、入力画像22の左上の画素22aを始点とし、右下の画素22bを終点として、各行において右側に向けて1画素ずつ順にずらしながら設定される。そして、各画素について相関値rの算出および画像類似度gの算出が行われる。すなわち、図6に示すフロー図において、入力画像22の位置の設定(S70)、相関値rの算出(S80)、画像類似度gの算出(S90)が、入力画像22の位置が始点となる画素22aの位置から終点となる画素22bまで走査され、全画素について行われる(S100)。言い換えると、相関値rの算出(S80)、および画像類似度gの算出(S90)が、入力画像22の画素毎に、画素配列に沿って順番に全画素分繰り返される(S70〜S100)。In this processing procedure, as shown in FIG. 7A, in step S70, the position (x, y) of the input image 22 starts from the upper left pixel 22a of the input image 22 and ends at the lower right pixel 22b. As described above, the values are set while sequentially shifting by one pixel toward the right side in each row. Then, the calculation of the calculation and image similarity g of correlation value r n is performed for each pixel. That is, in the flowchart shown in FIG. 6, the setting of the position of the input image 22 (S70), the correlation value r n is calculated in (S80), the calculation of the image similarity g (S90) is a starting point position of the input image 22 The scanning is performed from the position of the pixel 22a to the pixel 22b as the end point, and is performed for all the pixels (S100). In other words, the calculation of the correlation value r n (S80), and calculates the image similarity g (S90) is, for each pixel of the input image 22 is repeated for all pixels in sequence along the pixel arrangement (S70~S100) .

そして、入力画像22の終点の画素22bまで、相関値rの算出および画像類似度gの算出が行われると(S100、yes)、画像類似度g(θ,x,y)が最大となる方向角(θ)、および位置(x,y)が、入力画像22の方向角(θ)、2次元座標値(x,y)として決定される(S110)。このステップでは、照合部36により、画像類似度算出部35で算出された画像類似度(g(θ))に基づいて、テンプレート画像21を基準とする入力画像22の方向角(θ)と、中心位置の2次元座標値(x,y)とが決定される。ここでは、画像類似度が最大となる方向角(θ)および中心位置の2次元座標値(x,y)が、入力画像22の幾何変換パラメータの値(実数値)として決定される。Then, to the pixel 22b of the end point of the input image 22, the calculation of the calculation and image similarity g of correlation value r n is performed (S100, yes), image similarity g (theta, x, y) is maximum The direction angle (θ) and the position (x, y) are determined as the direction angle (θ) and the two-dimensional coordinate value (x, y) of the input image 22 (S110). In this step, based on the image similarity (g (θ)) calculated by the image similarity calculation unit 35 by the matching unit 36, the direction angle (θ) of the input image 22 with the template image 21 as a reference, A two-dimensional coordinate value (x, y) of the center position is determined. Here, the two-dimensional coordinate value (x, y) of the direction angle (θ) and the center position at which the image similarity is maximized is determined as the value (real value) of the geometric transformation parameter of the input image 22.

このステップS110では、具体的には次のような処理が行われる。図7(b)に示すように、ステップS70〜S100による入力画像22の全画素についての画像類似度gの算出結果、つまり全位置(x,y)×全方向角(θ)の画像類似度gの算出結果は、θ、x、yを各軸とする3次元配列データである画像類似度テーブル50として、演算制御部13における所定の部分に格納される。   In step S110, specifically, the following processing is performed. As shown in FIG. 7B, the calculation result of the image similarity g for all the pixels of the input image 22 in steps S70 to S100, that is, the image similarity of all positions (x, y) × omnidirectional angle (θ). The calculation result of g is stored in a predetermined portion of the arithmetic control unit 13 as an image similarity table 50 that is three-dimensional array data having θ, x, and y as axes.

画像類似度テーブル50は、θ、x、yを各軸とする3次元座標において、画像類似度の高低の3次元的な分布を表す。このような画像類似度テーブル50が参照され、画像類似度g(θ,x,y)が最大となる方向角(θ)、および位置(x,y)が、入力画像22の方向角(θ)、2次元座標値(x,y)として採用される。   The image similarity table 50 represents a three-dimensional distribution of high and low image similarity in three-dimensional coordinates with θ, x, and y as axes. The image similarity table 50 is referred to, and the direction angle (θ) and the position (x, y) at which the image similarity g (θ, x, y) is maximized are the direction angle (θ ) Is adopted as a two-dimensional coordinate value (x, y).

このステップS110で決定される方向角(θ)は、図5に示すように、テンプレート画像21の方向角を示す基準線O10に対する、入力画像22の傾き(回転角度)θに相当する。また、ここで決定される2次元座標値(x,y)は、図5に示すように、テンプレート画像21の中心位置を原点O20とした場合の入力画像22の中心位置C10の2次元座標値に相当する。図2に示す例では、上述したように算出された、波形qsで表される画像類似度(g(θ))から、画像類似度gが最大となる方向角θaが、テンプレート画像1を基準とする入力画像2の幾何変換パラメータの値として決定される。   The direction angle (θ) determined in step S110 corresponds to the inclination (rotation angle) θ of the input image 22 with respect to the reference line O10 indicating the direction angle of the template image 21, as shown in FIG. The two-dimensional coordinate value (x, y) determined here is the two-dimensional coordinate value of the center position C10 of the input image 22 when the center position of the template image 21 is the origin O20, as shown in FIG. It corresponds to. In the example shown in FIG. 2, the direction angle θa that maximizes the image similarity g is based on the template image 1 based on the image similarity (g (θ)) represented by the waveform qs calculated as described above. As the value of the geometric transformation parameter of the input image 2.

以上のような画像処理装置10により行われる画像照合の処理手順においては、予め記憶されているテンプレート画像21に基づいて固有値分解テンプレート画像群が作成される処理であるステップS10〜S50が、固有値分解パラメータ画像作成処理部18により行われる。そして、固有値分解テンプレート画像群と入力画像とに基づいてこれらの画像類似度を算出し、方向角および2次元座標値を決定するステップS60〜S110が、検出処理部19により行われる。   In the image collation processing procedure performed by the image processing apparatus 10 as described above, steps S10 to S50, which are processes for creating an eigenvalue decomposition template image group based on the template image 21 stored in advance, are performed as eigenvalue decomposition. This is performed by the parameter image creation processing unit 18. Then, the detection processing unit 19 performs steps S60 to S110 for calculating the image similarity based on the eigenvalue decomposition template image group and the input image and determining the direction angle and the two-dimensional coordinate value.

なお、実際の処理工程においては、複数のICチップ20の位置決めが行われる場合、固有値分解パラメータ画像作成処理部18による固有値分解テンプレート画像群の生成処理は、複数のICチップ20の位置決めに際して予め行われる。そして、検出処理部19による方向角および2次元座標値の決定のための処理が、各ICチップ20の位置決めの工程において、予め生成された固有値分解テンプレート画像群が用いられて繰り返し行われることとなる。   In the actual processing steps, when the plurality of IC chips 20 are positioned, the eigenvalue decomposition template image group generation processing by the eigenvalue decomposition parameter image creation processing unit 18 is performed in advance when positioning the plurality of IC chips 20. Is called. Then, the processing for determining the direction angle and the two-dimensional coordinate value by the detection processing unit 19 is repeatedly performed using the eigenvalue decomposition template image group generated in advance in the step of positioning each IC chip 20. Become.

以上説明した画像処理装置10においては、入力画像22について決定される幾何変換パラメータとして、方向角および2次元座標値が用いられているが、上述したように、テンプレート画像21に加えられる幾何変換として射影変換や画像のぼかし処理が用いられ、幾何変換パラメータとして射影変換や画像のぼかし処理に必要なパラメータが用いられてもよい。   In the image processing apparatus 10 described above, the directional angle and the two-dimensional coordinate value are used as the geometric transformation parameters determined for the input image 22, but as described above, as the geometric transformation applied to the template image 21. Projective transformation or image blurring processing may be used, and parameters necessary for projective transformation or image blurring processing may be used as geometric transformation parameters.

以上説明した本発明の実施形態は、本発明の好適な具体例であり、本発明を限定するものではなく、実施形態における構成要素は適宜、既存の構成要素等との置き換えが可能である。したがって、本実施形態の記載をもって、特許請求の範囲に記載された発明の内容を限定するものではない。   The embodiment of the present invention described above is a preferable specific example of the present invention, and does not limit the present invention. The components in the embodiment can be appropriately replaced with existing components. Therefore, the description of the present embodiment does not limit the contents of the invention described in the claims.

以下、本発明の実施例について説明する。本実施例では、テンプレート画像として、128×128ピクセルの画像を用いた。また、テンプレート画像を1°ピッチで回転させることで、計360枚の変換後テンプレート画像からなる変換後テンプレート画像群を生成した。   Examples of the present invention will be described below. In this embodiment, a 128 × 128 pixel image is used as the template image. In addition, a template image group consisting of a total of 360 template images after conversion was generated by rotating the template images at a pitch of 1 °.

本実施例では、入力画像として、上記のテンプレート画像に対して、x方向およびy方向に−0.5〜0.5ピクセルの位置ずれ、および0〜180°の回転を施すことで、テスト画像を生成した。本実施例では、位置決めずれについては、0.1ピクセルピッチ、回転については0.5°ピッチで変化させることで、計43560枚のテスト画像(入力画像)を生成した。   In the present embodiment, as the input image, the above-described template image is subjected to a position shift of −0.5 to 0.5 pixels in the x direction and the y direction and a rotation of 0 to 180 °, whereby a test image is obtained. Was generated. In this example, 43560 test images (input images) were generated in total by changing the positioning deviation at a 0.1 pixel pitch and rotating at a 0.5 ° pitch.

本実施例では、本発明に係る画像処理方法(以下「提案手法」という。)において、次数M=60として照合を行った(上記式(7)参照)。また、本実施例では、提案手法の比較例として、回転照合法を採用した。回転照合法としては、テンプレート画像を6°ピッチで回転させながら計360°回転させて照合させる方法を採用した。したがって、提案手法および回転照合法いずれにおいても、1回の探索で60回の照合が行われることとなる。このため、提案手法と回転照合法とで計算量は同じである。   In this example, in the image processing method according to the present invention (hereinafter referred to as “proposed method”), collation was performed with the order M = 60 (see the above formula (7)). In the present embodiment, the rotation verification method is adopted as a comparative example of the proposed method. As the rotation collation method, a method was adopted in which the template image is collated by rotating a total 360 ° while rotating the template image at a pitch of 6 °. Therefore, in both the proposed method and the rotation collation method, the collation is performed 60 times in one search. For this reason, the calculation amount is the same between the proposed method and the rotation matching method.

本実施例では、テスト画像の方向角および位置ずれ(2次元座標値)について、提案手法および回転照合法それぞれにより算出される値(推定値)の、テスト画像についての実際の方向角および位置ずれに対する誤差を求めた。   In this embodiment, for the direction angle and displacement (two-dimensional coordinate value) of the test image, the actual direction angle and displacement of the test image of the values (estimated values) calculated by the proposed method and the rotation verification method, respectively. The error for was calculated.

図8は、テスト画像の方向角と、方向角および位置ずれについての誤差との関係を示す。図8(a)において、横軸はテスト画像の方向角を示し、縦軸は方向角についての誤差を示す。図8(b)において、横軸はテスト画像の方向角を示し、縦軸は位置ずれについての誤差を示す。また、図8の各図において、実線で示すグラフが提案手法(Proposed)についてのデータであり、破線で示すグラフが回転照合法(Rotational matching)についてのデータである。なお、図8(a)、(b)において、方向角および位置ずれのそれぞれ誤差の値について、0〜180°で1°ピッチで回転を加えたテスト画像の各角度(横軸の各値)における誤差の値(縦軸の値)は、−0.5〜0.5ピクセルの範囲における0.1ピクセルピッチの各位置での誤差の平均値である。   FIG. 8 shows the relationship between the direction angle of the test image and the error regarding the direction angle and the positional deviation. In FIG. 8A, the horizontal axis represents the direction angle of the test image, and the vertical axis represents the error with respect to the direction angle. In FIG. 8B, the horizontal axis indicates the direction angle of the test image, and the vertical axis indicates an error regarding the positional deviation. In each figure of FIG. 8, the graph shown by a solid line is data about the proposed method (Proposed), and the graph shown by a broken line is data about the rotation matching method (Rotational matching). 8A and 8B, each angle of the test image (each value on the horizontal axis) obtained by rotating at 0 ° to 180 ° with a 1 ° pitch for each of the error values of the direction angle and the positional deviation. The error value at (the value on the vertical axis) is the average value of errors at each position of 0.1 pixel pitch in the range of -0.5 to 0.5 pixels.

図8(a)および(b)のグラフから分かるように、提案手法および回転照合法いずれにおいても照合回数は60回で処理時間は同じであるが、提案手法の方が、方向角および位置ずれのいずれについても誤差が極めて小さい。具体的には、方向角の誤差については、平均で、提案手法では0.03°であり、回転照合法では0.36°であった。また、位置ずれの誤差については、平均で、提案手法では0.04ピクセルであり、回転照合法では0.09ピクセルであった。   As can be seen from the graphs of FIGS. 8 (a) and 8 (b), in both the proposed method and the rotation matching method, the number of matching times is 60 and the processing time is the same. In either case, the error is extremely small. Specifically, the direction angle error was 0.03 ° in the proposed method and 0.36 ° in the rotation matching method on average. Further, the error of the positional deviation was 0.04 pixels in the proposed method on average and 0.09 pixel in the rotation matching method on the average.

また、図8(a)および(b)のグラフから分かるように、回転照合法においては、6°ピッチで得られた画像類似度を補間していることから、6°間隔で周期的な誤差が発生している。一方、提案手法においては、補間が行われていないことから、回転照合法のような周期的な誤差が発生することなく、方向角および位置ずれについて高い推定精度を得ることができる。   Further, as can be seen from the graphs of FIGS. 8A and 8B, in the rotation matching method, since the image similarity obtained at a 6 ° pitch is interpolated, a periodic error occurs at an interval of 6 °. Has occurred. On the other hand, since the interpolation is not performed in the proposed method, it is possible to obtain high estimation accuracy for the direction angle and the positional deviation without causing a periodic error as in the rotation matching method.

このように、提案手法によれば、回転照合法との比較において、周期的な誤差が発生せず、処理時間(照合回数)が同程度であれば、極めて高い精度を得ることができる。   Thus, according to the proposed method, extremely high accuracy can be obtained as long as no periodic error occurs and the processing time (number of verifications) is comparable in comparison with the rotation verification method.

次に、照合回数と誤差との関係を図9に示す。図9に示すグラフにおいて、横軸は1回の探索に要する照合回数で、縦軸は推定した方向角の誤差を示す。ここで、照合回数は、提案手法の場合、打ち切り次数Mに相当し(式(7)参照)、回転照合法の場合、回転ピッチにより定まる照合回数であり、360°を回転ピッチで除した数となる。   Next, FIG. 9 shows the relationship between the number of verifications and the error. In the graph shown in FIG. 9, the horizontal axis represents the number of verifications required for one search, and the vertical axis represents the estimated directional angle error. Here, the number of collations corresponds to the truncation order M in the case of the proposed method (see Expression (7)), and in the case of the rotation collation method, the number of collations is determined by the rotation pitch, and is obtained by dividing 360 ° by the rotation pitch. It becomes.

図9において、実線で示すグラフは、提案手法についてのデータであり、次数Mを10から360まで変化させた場合の方向角の平均誤差を示す。また、図9において、破線で示すグラフは、回転照合法についてのデータであり、回転ピッチを変化させた場合の方向角の平均誤差を示す。   In FIG. 9, a graph indicated by a solid line is data on the proposed method, and shows an average error of the direction angle when the order M is changed from 10 to 360. In FIG. 9, a graph indicated by a broken line is data about the rotation matching method, and shows an average error of the direction angle when the rotation pitch is changed.

図9の実線のグラフから、提案手法では、照合回数が60回付近(次数M=60付近に相当)から、方向角の誤差が収束していることがわかる。このときの誤差の値は、0.03°であった。一方、図9の破線のグラフから、回転照合法では、照合回数が120回付近で、方向角の誤差が収束していることがわかる。これらの実験結果から、提案手法によれば、回転照合法の約半分の照合回数で同等の精度を得ることができることが分かった。   From the solid line graph in FIG. 9, it can be seen that in the proposed method, the direction angle error converges from the vicinity of the number of collations of 60 (corresponding to the order of M = 60). The error value at this time was 0.03 °. On the other hand, it can be seen from the broken line graph in FIG. 9 that in the rotation matching method, the direction angle error converges when the number of matching times is around 120 times. From these experimental results, it was found that according to the proposed method, the same accuracy can be obtained with about half the number of collations of the rotation collation method.

続いて、提案手法の雑音に対する耐性を検証するため、テスト画像にσ=0,10,20,30の白色雑音(gaussian noise)を加えて実験を行った。本実験では、提案手法の比較例として、回転照合法に加え、位相限定相関法(非特許文献4〜6参照)を採用した。位相限定相関法は、現在、最も精度が良いとされている手法であり、工業用として実用化されている。なお、提案手法については、次数M=60(照合回数60回)とし、回転照合法については、6°ピッチ(照合回数60回)で照合を行った。   Subsequently, in order to verify the tolerance of the proposed method against noise, an experiment was performed by adding white noise (σus, 0, 10, 20, 30) to the test image. In this experiment, a phase-only correlation method (see Non-Patent Documents 4 to 6) was adopted as a comparative example of the proposed method in addition to the rotation matching method. The phase-only correlation method is a technique that is currently considered to have the highest accuracy, and has been put into practical use for industrial use. Note that the order M = 60 (the number of collations was 60) for the proposed method, and the collation was performed at a 6 ° pitch (the number of collations was 60) for the rotation collation method.

図10(a)、(b)に、提案手法、回転照合法、および位相限定相関法それぞれについての方向角および位置ずれの推定誤差を示す。図10(a)は、白色雑音を加えた場合の方向角(°)の推定誤差を示し、同図(b)は、白色雑音を加えた場合の位置ずれ量(ピクセル)の推定誤差を示す。   FIGS. 10A and 10B show estimation errors of the direction angle and the positional deviation for each of the proposed method, the rotation matching method, and the phase only correlation method. FIG. 10A shows the estimation error of the direction angle (°) when white noise is added, and FIG. 10B shows the estimation error of the positional deviation amount (pixel) when white noise is added. .

図10(a),(b)から、提案手法および回転照合法については、白色雑音の雑音量が増えても、誤差の値が変化しないことが分かる。同じく図10(a),(b)から、提案手法、回転照合法、および位相限定相関法のうち、提案手法が最も誤差の値が小さく、検出精度が良いことが分かる。   10 (a) and 10 (b), it can be seen that the error value does not change even when the amount of white noise increases in the proposed method and the rotation matching method. Similarly, FIGS. 10A and 10B show that the proposed method has the smallest error value and the detection accuracy is good among the proposed method, the rotation matching method, and the phase-only correlation method.

一方、図10(a),(b)から分かるように、位相限定相関法については、位置ずれに関して誤差が小さく精度は比較的良いが、方向角の精度は他の2つの手法と比べて良いとは言えない。さらに、位相限定相関法については、雑音が小さな場合は良い結果が得られたが、雑音が小さな場合は比較的良い結果が得られたが、雑音が大きくなると、性能が大幅に劣化した。このことは、位相限定相関法においては、周波数分解をスペクトル強度で除算する処理が入るため、高周波成分の雑音が増幅され、照合に悪影響を及ぼしたためだと考えられる。これらの実験結果から、提案手法によれば、推定精度が雑音の大きさにほとんど影響されることなく、回転照合法および位相限定相関法との比較において、高い精度を得ることができる。   On the other hand, as can be seen from FIGS. 10 (a) and 10 (b), the phase-only correlation method has a small error with respect to misalignment and a relatively good accuracy, but the direction angle accuracy is better than the other two methods. It can not be said. Furthermore, with respect to the phase-only correlation method, good results were obtained when the noise was small, but relatively good results were obtained when the noise was small. However, when the noise increased, the performance deteriorated significantly. This is considered to be because in the phase-only correlation method, a process of dividing the frequency resolution by the spectral intensity is included, so that the noise of the high-frequency component is amplified and adversely affects the matching. From these experimental results, according to the proposed method, high accuracy can be obtained in comparison with the rotation matching method and the phase-only correlation method, with the estimation accuracy being hardly influenced by the magnitude of noise.

本発明の別の実施例について説明する。近年、高速かつ高精度なパターンマッチング手法として、SIFT(Scale−Invariant Feature Transform)が用いられている。SIFTは、顔認識や拡張現実感(AR;Augmented Reality)の分野で大きな成功を収めている。SIFTは、2枚の画像から特徴点と呼ばれる点群情報を抽出し、それぞれの画像の特徴点群を対応付けることでパターンマッチングを行う方法である。   Another embodiment of the present invention will be described. In recent years, SIFT (Scale-Invariant Feature Transform) has been used as a high-speed and high-precision pattern matching technique. SIFT has been very successful in the field of face recognition and augmented reality (AR). SIFT is a method of performing pattern matching by extracting point group information called feature points from two images and associating the feature point groups of the respective images.

SIFTで特徴点を検出するためには、DOG(Differential Of Gaussian)処理が行われる。具体的には、入力画像に対してぼけ量の異なるガウスフィルタをかけて、ぼけた画像を複数枚作成し、これらの画像群(DOG画像群)から特徴点を検出することで、画像のぼけやスケール変化に頑健な特徴点の検出が可能となる。SIFTにおいては、ぼけた画像の枚数を多くすれば検出精度は良くなるが計算量が増えるというトレードオフの関係がある。   In order to detect feature points by SIFT, DOG (Differential Of Gaussian) processing is performed. Specifically, by applying Gaussian filters with different amounts of blur to the input image to create a plurality of blurred images and detecting feature points from these image groups (DOG image groups), the image blurs. And feature points that are robust to scale changes can be detected. In SIFT, if the number of blurred images is increased, the detection accuracy is improved, but the calculation amount is increased.

SIFTにおいて、画像をぼかすという操作は、ガウス関数で与えられたテンプレート画像を照合させることで可能である。そこで、上述した実施形態における固有値分解テンプレート画像のような、ぼけ量の異なるガウス関数のテンプレート画像群を圧縮した固有値分解テンプレート画像を、前述のDOG処理に用いることで、検出精度を維持しつつ計算量を削減することが可能となる。この場合、ガウス関数のテンプレート画像はぼけ量のパラメータで連続的に記述可能であるため、式(11)の問題を解くことで、解析的な式で固有値分解テンプレート画像を記述することができる。固有値分解テンプレート画像が解析的な式で表されるため、DOG画像群のピーク位置も解析的に求めることができる。本発明方法は数値的な誤差を含ない高精度な特徴点を高速に検出することができる。   In SIFT, an operation of blurring an image can be performed by collating a template image given by a Gaussian function. Therefore, the eigenvalue decomposition template image obtained by compressing a template image group of Gaussian functions with different amounts of blur, such as the eigenvalue decomposition template image in the above-described embodiment, is used for the above-mentioned DOG processing, and calculation is performed while maintaining detection accuracy. The amount can be reduced. In this case, since the template image of the Gaussian function can be described continuously with the blur amount parameter, the eigenvalue decomposition template image can be described with an analytical expression by solving the problem of Expression (11). Since the eigenvalue decomposition template image is expressed by an analytical expression, the peak position of the DOG image group can also be obtained analytically. The method of the present invention can detect feature points with high accuracy without numerical errors at high speed.

本実施例において、特徴点を検出した結果を図11に示す。本実施例では、図11(a)に示すような入力画像301に対して特徴点の検出を行った。特徴点が正しく検出されれば、図11(d)の画像304に示すように、計16点の特徴点305が検出される。なお、図11においては、検出された特徴点を、×を○で囲んだ図形により表している。   FIG. 11 shows the result of detecting feature points in this example. In this embodiment, feature points are detected for an input image 301 as shown in FIG. If the feature points are detected correctly, a total of 16 feature points 305 are detected as shown in the image 304 in FIG. In FIG. 11, the detected feature points are represented by a graphic in which x is surrounded by ○.

図11(b)に示す画像302においては、計8箇所の特徴点305aが存在する。画像302における8箇所の特徴点305aは、従来のSIFT処理によりDOG画像を5枚作成して検出した特徴点である。同様に、図11(c)に示す画像303においては、計12箇所の特徴点305bが存在する。画像303における12箇所の特徴点は、DOG画像を15枚作成して検出した特徴点である。これらの検出結果から、通常、SIFTにおいては5枚のDOG画像群が用いられるが、これでは検出精度は良くなく、DOG画像枚数を15枚に増やしても全ての特徴点を検出できないことが分かる。   In the image 302 shown in FIG. 11B, there are a total of eight feature points 305a. Eight feature points 305a in the image 302 are feature points detected by creating five DOG images by conventional SIFT processing. Similarly, in the image 303 shown in FIG. 11C, there are a total of 12 feature points 305b. Twelve feature points in the image 303 are feature points detected by creating 15 DOG images. From these detection results, 5 DOG image groups are normally used in SIFT, but this does not provide good detection accuracy, and it is understood that all feature points cannot be detected even if the number of DOG images is increased to 15. .

一方で、本発明に係る方法により特徴点を検出した結果が、図11(d)に示す画像304である。画像304に示す場合の特徴点の検出においては、固有値分解テンプレート画像の枚数は5枚であり、計算量は図11(b)に示す画像302の場合と同じである。それにもかかわらず、本発明に係る方法を用いた場合、16点全ての特徴点305が正しく検出されている。この検出結果から、本発明に係る方法によれば、固有値分解テンプレート画像の枚数や計算量を増やすことなく、全ての特徴点を正しく検出することが可能であることが分かる。   On the other hand, the result of detecting the feature points by the method according to the present invention is an image 304 shown in FIG. In the detection of feature points in the case of the image 304, the number of eigenvalue decomposition template images is 5, and the amount of calculation is the same as in the case of the image 302 shown in FIG. Nevertheless, when the method according to the present invention is used, all 16 feature points 305 are correctly detected. From this detection result, it can be seen that according to the method of the present invention, it is possible to correctly detect all feature points without increasing the number of eigenvalue decomposition template images and the amount of calculation.

なお、本発明において、テンプレート画像群の濃淡値に対して固有値分解を行うのではなく、それぞれのテンプレート画像および入力画像をエッジ方向画像あるいは増分符号画像に変換した後に、本発明に係る方法によりテンプレート画像群を固有値分解テンプレート画像群に変換して画像照合を行うこともできる。すなわち、エッジ方向を加味した画像照合を行うことで、明るさの変動や、対象物の一部が隠れる等の遮蔽に頑健な画像照合が可能となる。   In the present invention, the eigenvalue decomposition is not performed on the gray value of the template image group, but the template image and the input image are converted into the edge direction image or the incremental code image, and then the template according to the present invention is used. Image collation can also be performed by converting an image group into an eigenvalue decomposition template image group. That is, by performing image matching in consideration of the edge direction, it is possible to perform image matching that is robust against shielding such as fluctuations in brightness and hiding part of the object.

以上のような本発明の実施例から、精度および計算量(処理時間)ともに、本発明が優れていることが実証された。   From the examples of the present invention as described above, it was proved that the present invention is excellent in both accuracy and calculation amount (processing time).

本発明は、入力画像からテンプレート画像と一致する位置と方向角等の幾何変換パラメータを高速に検出する新しい方法を提案した。提案手法は、テンプレート画像の固有値分解で得られる画像を照合することで、相関値波形を算出する。すなわち、本発明は、画像照合用のテンプレート画像群に固有値分解を施して主成分情報を抽出し、これに基づいて画像の類似度推定用の連続した類似度曲線を算出することにより、照合時間の短縮および照合精度の向上を可能とするものである。   The present invention has proposed a new method for rapidly detecting a geometric transformation parameter such as a position and a direction angle corresponding to a template image from an input image. The proposed method calculates a correlation value waveform by collating images obtained by eigenvalue decomposition of a template image. That is, the present invention performs eigenvalue decomposition on a template image group for image matching, extracts principal component information, and calculates a continuous similarity curve for estimating similarity of images based on this, thereby matching time. Shortening and improving collation accuracy.

本発明は、固有値分解を用いて枚数を削減した新たなテンプレート画像を用いて精度を落とすことなく、検査対象画像(入力画像)とテンプレート画像との幾何学的差異(幾何変換パラメータの値)を推定する圧縮テンプレートマッチング法ということができる。そして、固有値分解により算出された固有関数を、元のテンプレート画像群である第1の画像群(変換後テンプレート画像群)に内積演算して生成した第2の画像群(固有値分解テンプレート画像群)の生成、および入力画像との画像類似度の算出に2度活用している。これにより、連続曲線で表される画像類似度を得ることができ、従来手法では得られない高い精度の幾何変換パラメータの値の推定を行うことが可能となる。   In the present invention, a geometrical difference (value of a geometric transformation parameter) between an inspection target image (input image) and a template image is reduced without lowering accuracy by using a new template image in which the number of sheets is reduced using eigenvalue decomposition. It can be said to be a compression template matching method to be estimated. Then, a second image group (eigenvalue decomposition template image group) generated by performing an inner product operation on the first image group (post-conversion template image group) that is the original template image group for the eigenfunction calculated by eigenvalue decomposition. This is used twice to generate the image and calculate the image similarity with the input image. Thereby, the image similarity represented by a continuous curve can be obtained, and it is possible to estimate the value of the geometric transformation parameter with high accuracy that cannot be obtained by the conventional method.

本発明の応用例としては、自動車部品等の各種機械部品の検査・計測、バイオメトリクス(指紋認証)、高精度な位置合わせが要求される、半導体ウエハやIC基盤の位置決め(半導体検査、マスク露光の位置合わせ、回転角合わせ(アライメント))、外観検査等が挙げられ、本発明は各分野での適用の可能性を有する。   Applications of the present invention include inspection and measurement of various machine parts such as automobile parts, biometrics (fingerprint authentication), and positioning of semiconductor wafers and IC substrates (semiconductor inspection, mask exposure) that require high-precision alignment. Alignment, rotation angle alignment (alignment)), appearance inspection, and the like, and the present invention has applicability in various fields.

1 テンプレート画像
2 入力画像
10 画像処理装置
11 コンピュータ
12 カメラ(入力画像取得手段)
13 演算制御部(画像処理手段)
18 固有値分解パラメータ画像作成処理部
19 検出処理部
21 テンプレート画像
22 入力画像
31 変換後テンプレート画像生成部(第1の画像群生成部)
32 固有値分解部
33 固有関数選択部
34 固有値分解テンプレート画像生成部(第2の画像群生成部)
35 画像類似度算出部
36 照合部
DESCRIPTION OF SYMBOLS 1 Template image 2 Input image 10 Image processing apparatus 11 Computer 12 Camera (input image acquisition means)
13 Arithmetic control unit (image processing means)
18 eigenvalue decomposition parameter image creation processing unit 19 detection processing unit 21 template image 22 input image 31 converted template image generation unit (first image group generation unit)
32 eigenvalue decomposition unit 33 eigenfunction selection unit 34 eigenvalue decomposition template image generation unit (second image group generation unit)
35 Image similarity calculation unit 36 Verification unit

本発明の画像処理方法は、所定のテンプレート画像を用いた照合を行うことで、前記テンプレート画像を基準とする入力画像の幾何変換パラメータの値を決定する画像処理方法であって、前記テンプレート画像に幾何変換を加えることで、前記幾何変換の量が異なる複数の幾何変換後の前記テンプレート画像からなる第1の画像群を生成する第1の画像群生成ステップと、前記第1の画像群に固有値分解を施すことで、前記複数の幾何変換後の前記テンプレート画像と同数の固有値および前記テンプレート画像を基準とする前記幾何変換の量と固有関数値との関係を表す固有関数を算出する固有値分解ステップと、複数の前記固有関数と前記第1の画像群との内積演算を施すことで、第2の画像群を生成する第2の画像群生成ステップと、連続曲線で表され前記入力画像と前記第2の画像群との類似度合いを示す画像類似度を、該画像類似度をg、前記入力画像と前記第2の画像群との内積値である相関値をr 、前記固有関数をφ としてg=Σr ×φ ,(n=0,1,2,・・・)により算出する画像類似度算出ステップと、前記画像類似度算出ステップで算出された前記画像類似度に基づき、前記幾何変換パラメータの値を決定する照合ステップと、を備えるものである。 The image processing method of the present invention is an image processing method for determining a value of a geometric transformation parameter of an input image with reference to the template image by performing collation using a predetermined template image. A first image group generation step for generating a first image group composed of a plurality of template images after geometric conversion by applying geometric transformation, and eigenvalues in the first image group; Eigenvalue decomposition step of calculating eigenvalues representing the same number of eigenvalues as the template images after the plurality of geometric transformations and eigenfunctions representing the relationship between the amount of the geometric transformations based on the template images and eigenfunction values by performing decomposition And a second image group generation step of generating a second image group by performing an inner product operation of the plurality of eigenfunctions and the first image group, An image similarity is expressed by a curve indicating the degree of similarity between the second image group and the input image, the correlation value is the inner product value of the image similarity g, and the said input image second image group the r n, calculates the g =? r eigenfunctions as φ n n × φ n, ( n = 0,1,2, ···) and the image similarity calculation step of calculating by at the image similarity calculation step And a collation step of determining a value of the geometric transformation parameter based on the image similarity.

本発明の画像処理装置は、入力画像を取得するための入力画像取得手段と、所定のテンプレート画像を用いた照合を行うことで、前記テンプレート画像を基準とする前記入力画像の幾何変換パラメータの値を決定する画像処理手段と、を備え、前記画像処理手段は、前記テンプレート画像に幾何変換を加えることで、前記幾何変換の量が異なる複数の幾何変換後の前記テンプレート画像からなる第1の画像群を生成する第1の画像群生成部と、前記第1の画像群に固有値分解を施すことで、前記複数の幾何変換後の前記テンプレート画像と同数の固有値および前記テンプレート画像を基準とする前記幾何変換の量と固有関数値との関係を表す固有関数を算出する固有値分解部と、複数の前記固有関数と前記第1の画像群との内積演算を施すことで、第2の画像群を生成する第2の画像群生成部と、連続曲線で表され前記入力画像と前記第2の画像群との類似度合いを示す画像類似度を、該画像類似度をg、前記入力画像と前記第2の画像群との内積値である相関値をr 、前記固有関数をφ としてg=Σr ×φ ,(n=0,1,2,・・・)により算出する画像類似度算出部と、前記画像類似度算出部で算出された前記画像類似度に基づき、前記幾何変換パラメータの値を決定する照合部と、を備えるものである。 The image processing apparatus according to the present invention performs input image acquisition means for acquiring an input image and collation using a predetermined template image, so that the value of the geometric transformation parameter of the input image based on the template image Image processing means for determining the first image comprising the template images after the plurality of geometric transformations having different geometric transformation amounts by applying geometric transformation to the template image. A first image group generation unit configured to generate a group, and eigenvalue decomposition on the first image group, whereby the same number of eigenvalues as the template images after the plurality of geometric transformations and the template image are used as a reference. this performing the eigenvalue decomposition unit configured to calculate a unique function representing the relationship between the amount and the eigenfunction value of geometric transformation, the inner product calculation between the plurality of the eigenfunction first image group In a second image group generating unit that generates a second image group, the image similarity is expressed by the continuous curve showing the degree of similarity between the second image group and the input image, the image similarity g, a correlation value is the inner product value r n of the said input image second image group, the eigenfunctions as φ n g = Σr n × φ n, (n = 0,1,2, ·· The image similarity calculation unit calculated by (1) and a collation unit that determines the value of the geometric transformation parameter based on the image similarity calculated by the image similarity calculation unit.

Figure 2012029662
Figure 2012029662

式(9)において、μ は、T(x,y)の平均濃度値である。本固有ベクトルを用いて得られる画像E(x,y)が、固有値分解テンプレート画像に相当する。 In Expression (9), μ i is an average density value of T i (x, y). An image E n (x, y) obtained using this eigenvector corresponds to an eigenvalue decomposition template image.

図4に示すように、演算制御部13は、固有値分解テンプレート画像作成処理部18と、検出処理部19とを有する。固有値分解テンプレート画像作成処理部18は、予め記憶されているテンプレート画像21に基づいて、変換後テンプレート画像群を生成し、生成した変換後テンプレート画像群に固有値分解を施し、算出した固有関数と変換後テンプレート画像群とから固有値分解テンプレート画像群を作成する。 As shown in FIG. 4, the arithmetic control unit 13 includes an eigenvalue decomposition template image creation processing unit 18 and a detection processing unit 19. Eigenvalue decomposition template image creation processing unit 18, based on the template image 21 stored in advance, to generate the converted template image group subjected to eigenvalue decomposition to the generated converted template image group, converted calculated eigenfunction An eigenvalue decomposition template image group is created from the subsequent template image group.

検出処理部19は、カメラ12によって取得された入力画像22と、固有値分解テンプレート画像作成処理部18によって生成された固有値分解テンプレート画像群との相関値を算出する。検出処理部19は、算出した相関値から、画像類似度を算出し、算出した画像類似度に基づいて、テンプレート画像21を基準とする入力画像22の幾何変換パラメータの値を決定する。 The detection processing unit 19 calculates a correlation value between the input image 22 acquired by the camera 12 and the eigenvalue decomposition template image group generated by the eigenvalue decomposition template image creation processing unit 18. The detection processing unit 19 calculates the image similarity from the calculated correlation value, and determines the value of the geometric transformation parameter of the input image 22 based on the template image 21 based on the calculated image similarity.

以上のような画像処理装置10により行われる画像照合の処理手順においては、予め記憶されているテンプレート画像21に基づいて固有値分解テンプレート画像群が作成される処理であるステップS10〜S50が、固有値分解テンプレート画像作成処理部18により行われる。そして、固有値分解テンプレート画像群と入力画像とに基づいてこれらの画像類似度を算出し、方向角および2次元座標値を決定するステップS60〜S110が、検出処理部19により行われる。 In the image collation processing procedure performed by the image processing apparatus 10 as described above, steps S10 to S50, which are processes for creating an eigenvalue decomposition template image group based on the template image 21 stored in advance, are performed as eigenvalue decomposition. This is performed by the template image creation processing unit 18. Then, the detection processing unit 19 performs steps S60 to S110 for calculating the image similarity based on the eigenvalue decomposition template image group and the input image and determining the direction angle and the two-dimensional coordinate value.

なお、実際の処理工程においては、複数のICチップ20の位置決めが行われる場合、固有値分解テンプレート画像作成処理部18による固有値分解テンプレート画像群の生成処理は、複数のICチップ20の位置決めに際して予め行われる。そして、検出処理部19による方向角および2次元座標値の決定のための処理が、各ICチップ20の位置決めの工程において、予め生成された固有値分解テンプレート画像群が用いられて繰り返し行われることとなる。 In the actual processing step, if the positioning of the plurality of IC chips 20 is performed, generation processing of eigenvalue decomposition template images by eigenvalue decomposition template image creation processing unit 18 in advance row upon positioning of a plurality of IC chips 20 Is called. Then, the processing for determining the direction angle and the two-dimensional coordinate value by the detection processing unit 19 is repeatedly performed using the eigenvalue decomposition template image group generated in advance in the step of positioning each IC chip 20. Become.

1 テンプレート画像
2 入力画像
10 画像処理装置
11 コンピュータ
12 カメラ(入力画像取得手段)
13 演算制御部(画像処理手段)
18 固有値分解テンプレート画像作成処理部
19 検出処理部
21 テンプレート画像
22 入力画像
31 変換後テンプレート画像生成部(第1の画像群生成部)
32 固有値分解部
33 固有関数選択部
34 固有値分解テンプレート画像生成部(第2の画像群生成部)
35 画像類似度算出部
36 照合部
DESCRIPTION OF SYMBOLS 1 Template image 2 Input image 10 Image processing apparatus 11 Computer 12 Camera (input image acquisition means)
13 Arithmetic control unit (image processing means)
18 eigenvalue decomposition template image creation processing unit 19 detection processing unit 21 template image 22 input image 31 converted template image generation unit (first image group generation unit)
32 eigenvalue decomposition unit 33 eigenfunction selection unit 34 eigenvalue decomposition template image generation unit (second image group generation unit)
35 Image similarity calculation unit 36 Verification unit

Claims (7)

所定のテンプレート画像を用いた照合を行うことで、前記テンプレート画像を基準とする入力画像の幾何変換パラメータの値を決定する画像処理方法であって、
前記テンプレート画像に幾何変換を加えることで、前記幾何変換の量が異なる複数の幾何変換後の前記テンプレート画像からなる第1の画像群を生成する第1の画像群生成ステップと、
前記第1の画像群に固有値分解を施すことで、前記複数の幾何変換後の前記テンプレート画像と同数の固有値および固有関数を算出する固有値分解ステップと、
複数の前記固有関数と前記第1の画像群との内積演算を施すことで、第2の画像群を生成する第2の画像群生成ステップと、
連続曲線で表され前記入力画像と前記第2の画像群との類似度合いを示す画像類似度を算出する画像類似度算出ステップと、
前記画像類似度算出ステップで算出された前記画像類似度に基づき、前記幾何変換パラメータの値を決定する照合ステップと、を備える、
ことを特徴とする画像処理方法。
An image processing method for determining a value of a geometric transformation parameter of an input image based on the template image by performing collation using a predetermined template image,
A first image group generation step of generating a first image group composed of the template images after a plurality of geometric transformations by adding geometric transformation to the template image;
An eigenvalue decomposition step of calculating the same number of eigenvalues and eigenfunctions as the plurality of geometrically transformed template images by performing eigenvalue decomposition on the first image group;
A second image group generation step of generating a second image group by performing an inner product operation of the plurality of eigenfunctions and the first image group;
An image similarity calculating step for calculating an image similarity that is represented by a continuous curve and indicates a similarity between the input image and the second image group;
A collation step of determining a value of the geometric transformation parameter based on the image similarity calculated in the image similarity calculation step,
An image processing method.
前記固有値分解ステップで算出された複数の前記固有関数のうち、前記固有値の大きな順に、所定の数の前記固有関数を選択する選択ステップをさらに備え、
前記第2の画像群生成ステップは、前記選択ステップで選択された複数の前記固有関数と前記第1の画像群との内積演算を施すことで、前記第2の画像群を生成する、
ことを特徴とする請求項1に記載の画像処理方法。
A selection step of selecting a predetermined number of the eigenfunctions in descending order of the eigenvalues among the plurality of eigenfunctions calculated in the eigenvalue decomposition step;
The second image group generation step generates the second image group by performing an inner product operation of the plurality of eigenfunctions selected in the selection step and the first image group.
The image processing method according to claim 1.
前記幾何変換パラメータは、方向角および2次元座標値を含み、
前記幾何変換は、方向角を変化させる回転および前記2次元座標値を変化させる平行移動を含む、
請求項1または請求項2に記載の画像処理方法。
The geometric transformation parameter includes a direction angle and a two-dimensional coordinate value,
The geometric transformation includes a rotation that changes a direction angle and a translation that changes the two-dimensional coordinate value.
The image processing method according to claim 1 or 2.
前記幾何変換パラメータは、射影変換に必要なパラメータを含み、
前記幾何変換は、射影変換を含む、
請求項1〜3のいずれか1項に記載の画像処理方法。
The geometric transformation parameters include parameters necessary for projective transformation,
The geometric transformation includes a projective transformation,
The image processing method according to claim 1.
前記幾何変換パラメータは、画像のぼかし処理に必要なパラメータを含み、
前記幾何変換は、画像のぼかし処理を含む、
請求項1〜3のいずれか1項に記載の画像処理方法。
The geometric transformation parameters include parameters necessary for image blurring processing,
The geometric transformation includes image blur processing,
The image processing method according to claim 1.
入力画像を取得するための入力画像取得手段と、
所定のテンプレート画像を用いた照合を行うことで、前記テンプレート画像を基準とする前記入力画像の幾何変換パラメータの値を決定する画像処理手段と、を備え、
前記画像処理手段は、
前記テンプレート画像に幾何変換を加えることで、前記幾何変換の量が異なる複数の幾何変換後の前記テンプレート画像からなる第1の画像群を生成する第1の画像群生成部と、
前記第1の画像群に固有値分解を施すことで、前記複数の幾何変換後の前記テンプレート画像と同数の固有値および固有関数を算出する固有値分解部と、
複数の前記固有関数と前記第1の画像群との内積演算を施すことで、第2の画像群を生成する第2の画像群生成部と、
連続曲線で表され前記入力画像と前記第2の画像群との類似度合いを示す画像類似度を算出する画像類似度算出部と、
前記画像類似度算出部で算出された前記画像類似度に基づき、前記幾何変換パラメータの値を決定する照合部と、を備える、
画像処理装置。
Input image acquisition means for acquiring an input image;
Image processing means for determining a value of a geometric transformation parameter of the input image based on the template image by performing collation using a predetermined template image,
The image processing means includes
A first image group generation unit configured to generate a first image group composed of the template images after a plurality of geometric transformations having different geometric transformation amounts by applying geometric transformation to the template image;
An eigenvalue decomposition unit that calculates eigenvalues and eigenfunctions of the same number as the template images after the plurality of geometric transformations by performing eigenvalue decomposition on the first image group;
A second image group generation unit that generates a second image group by performing an inner product operation of the plurality of eigenfunctions and the first image group;
An image similarity calculation unit that calculates an image similarity represented by a continuous curve and indicating a similarity between the input image and the second image group;
A collation unit that determines a value of the geometric transformation parameter based on the image similarity calculated by the image similarity calculation unit,
Image processing device.
前記画像処理手段は、
前記固有値分解部で算出された複数の前記固有関数のうち、前記固有値の大きな順に、所定の数の前記固有関数を選択する選択部をさらに備え、
前記第2の画像群生成部は、前記選択部で選択された複数の前記固有関数と前記第1の画像群との内積演算を施すことで、前記第2の画像群を生成する、
請求項6に記載の画像処理装置。
The image processing means includes
A selection unit that selects a predetermined number of the eigenfunctions in descending order of the eigenvalues among the plurality of eigenfunctions calculated by the eigenvalue decomposition unit;
The second image group generation unit generates the second image group by performing an inner product operation of the plurality of eigenfunctions selected by the selection unit and the first image group.
The image processing apparatus according to claim 6.
JP2012531845A 2010-08-31 2011-08-26 Image processing method and image processing apparatus Active JP5317250B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012531845A JP5317250B2 (en) 2010-08-31 2011-08-26 Image processing method and image processing apparatus

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2010193160 2010-08-31
JP2010193160 2010-08-31
JP2012531845A JP5317250B2 (en) 2010-08-31 2011-08-26 Image processing method and image processing apparatus
PCT/JP2011/069320 WO2012029662A1 (en) 2010-08-31 2011-08-26 Image processing method and image processing apparatus

Publications (2)

Publication Number Publication Date
JP5317250B2 JP5317250B2 (en) 2013-10-16
JPWO2012029662A1 true JPWO2012029662A1 (en) 2013-10-28

Family

ID=45772752

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012531845A Active JP5317250B2 (en) 2010-08-31 2011-08-26 Image processing method and image processing apparatus

Country Status (2)

Country Link
JP (1) JP5317250B2 (en)
WO (1) WO2012029662A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5945823B2 (en) * 2012-06-06 2016-07-05 国立大学法人 熊本大学 Image processing method and image processing apparatus
WO2014061372A1 (en) * 2012-10-18 2014-04-24 コニカミノルタ株式会社 Image-processing device, image-processing method, and image-processing program
US20140184618A1 (en) * 2012-12-28 2014-07-03 Scott A. Krig Generating canonical imaging functions
JP6307953B2 (en) * 2014-03-13 2018-04-11 富士通株式会社 License plate recognition device, license plate recognition system, license plate recognition program, and license plate recognition method
JP6613030B2 (en) 2015-01-19 2019-11-27 株式会社メガチップス Determination apparatus, control program, and determination method
JP6524721B2 (en) * 2015-03-06 2019-06-05 富士通株式会社 Recognition device, recognition system, recognition program and recognition method
JP6604537B2 (en) * 2015-08-14 2019-11-13 株式会社デンソーアイティーラボラトリ Keypoint detector, keypoint detection method, and keypoint detection program
EP3188019B1 (en) * 2015-12-30 2019-09-18 InterDigital CE Patent Holdings Method for selecting a content comprising audiovisual data and corresponding electronic device, system, computer readable program product and computer readable storage medium
JP6629685B2 (en) * 2016-06-30 2020-01-15 鹿島建設株式会社 Crack analysis method and crack analysis system
CN117349027B (en) * 2023-12-04 2024-02-23 环球数科集团有限公司 Multi-mode large model construction system and method for reducing calculation force demand

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1125269A (en) * 1997-07-02 1999-01-29 Sanyo Electric Co Ltd Facial picture recognizing device and method therefor
JP4570764B2 (en) * 2000-12-01 2010-10-27 本田技研工業株式会社 Motion information recognition system

Also Published As

Publication number Publication date
JP5317250B2 (en) 2013-10-16
WO2012029662A1 (en) 2012-03-08

Similar Documents

Publication Publication Date Title
JP5317250B2 (en) Image processing method and image processing apparatus
JP5699788B2 (en) Screen area detection method and system
JP6009351B2 (en) System, method, and computer program product for classification in inspection images
JP2897772B1 (en) Image registration method, image registration device, and recording medium
JP6842039B2 (en) Camera position and orientation estimator, method and program
JP6899189B2 (en) Systems and methods for efficiently scoring probes in images with a vision system
JP4001162B2 (en) Image processing method, image processing program and storage medium therefor, and image processing apparatus
JP2013246162A (en) Defect inspection method and defect inspection device
JP2007120968A (en) Electron beam type dimension measuring device, and dimension measuring method using it
US11094082B2 (en) Information processing apparatus, information processing method, robot system, and non-transitory computer-readable storage medium
JP4776259B2 (en) Pattern evaluation method, pattern alignment method, and program
US9569850B2 (en) System and method for automatically determining pose of a shape
JP6880618B2 (en) Image processing program, image processing device, and image processing method
JP2020148625A (en) Image processing device, image processing method, and image processing program
KR20160014548A (en) Registration of cad data with sem images
US8971627B2 (en) Template matching processing device and template matching processing program
JP2008116207A (en) Apparatus and method for image measurement, and program
JP2009146150A (en) Method and device for detecting feature position
JP5945823B2 (en) Image processing method and image processing apparatus
JP4097255B2 (en) Pattern matching apparatus, pattern matching method and program
Liang et al. An integrated camera parameters calibration approach for robotic monocular vision guidance
US20220358631A1 (en) Optical Measurement of Workpiece Surface using Sharpness Maps
JP4953211B2 (en) Feature extraction apparatus and feature extraction method
JP2007058811A (en) Pattern matching method
JP5378340B2 (en) Strain measuring apparatus and strain measuring method

Legal Events

Date Code Title Description
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: 20130604

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130704

R150 Certificate of patent or registration of utility model

Ref document number: 5317250

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250