JP2001052167A - Image processing method - Google Patents

Image processing method

Info

Publication number
JP2001052167A
JP2001052167A JP11225039A JP22503999A JP2001052167A JP 2001052167 A JP2001052167 A JP 2001052167A JP 11225039 A JP11225039 A JP 11225039A JP 22503999 A JP22503999 A JP 22503999A JP 2001052167 A JP2001052167 A JP 2001052167A
Authority
JP
Japan
Prior art keywords
image
template
input image
correlation
processing method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11225039A
Other languages
Japanese (ja)
Inventor
Tatsugo Komae
竜吾 小前
Shintaro Koike
慎太郎 小池
Yoshinori Ikeda
芳則 池田
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.)
Murata Manufacturing Co Ltd
Original Assignee
Murata Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Murata Manufacturing Co Ltd filed Critical Murata Manufacturing Co Ltd
Priority to JP11225039A priority Critical patent/JP2001052167A/en
Publication of JP2001052167A publication Critical patent/JP2001052167A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing method capable of reducing an arithmetic quantity and performing high speed processing in spite of highly accurate processing in the case of template matching based on mutual correlation. SOLUTION: Concerning the image processing method using template matching based on mutual correlation, this method has a step for segmenting and fixing an input image from a fetched image through loose position detection and a step for detecting a maximum correlation position by comparing the input image with a template image while successively changing a segmenting position on the side of the template image. At the time of detecting the maximum correlation position, processing is performed for equalizing a luminance average value and a luminance dispersion for template images to be successively segmented and the peak of a mutual correlation value is detected by calculating the total sum of products of respective pixels in the input image and the template image.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、自動化された製造
ラインなどにおいて、相互相関によるパターンマッチン
グを用いて画像の位置合わせや特定パターンの抽出など
を行なうことができる画像処理方法に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method capable of performing image alignment, extraction of a specific pattern, and the like using pattern matching by cross-correlation in an automated manufacturing line or the like.

【0002】[0002]

【従来の技術】組み立て、実装、検査などの製造ライン
を流れるワークの位置合わせを行なう際、相互相関によ
るパターンマッチング法が用いられている。相互相関マ
ッチングでは、図1に示すようにカメラで撮像した画像
1を取り込み、この画像1から参照画像であるテンプレ
ート画像Tの大きさ(N1×N1)に対応した入力画像
1 〜I3 を順次切り出し、テンプレート画像Tと比較
する処理を行なう。すなわち、(1)式のような相互相
関式によって入力画像Iとテンプレート画像Tの相互相
関値C(a,b)を逐次求める。なお、座標(a,b)
はm,n方向の入力画像の左上位置を表す。
2. Description of the Related Art Manufacturing lines for assembly, mounting, inspection, etc.
When aligning workpieces flowing through
Pattern matching method is used. Cross-correlation
In the case of switching, the image captured by the camera as shown in FIG.
1 and the template 1 as a reference image
Input image corresponding to the size (N1 × N1) of the port image T
I 1 ~ IThree Are sequentially cut out and compared with the template image T.
Is performed. That is, the mutual phase as shown in equation (1)
Mutual phase of input image I and template image T
The function C (a, b) is sequentially obtained. The coordinates (a, b)
Represents the upper left position of the input image in the m and n directions.

【0003】[0003]

【数1】 (Equation 1)

【0004】入力画像Iとテンプレート画像Tとの類似
度が高いほど、相互相関値C(a,b)が大きくなり、
1に近づく。最大相関位置とは、(1)式が最大になる
切り出された入力画像の左上位置(a,b)のことであ
る。但し、は入力画像の平均輝度、はテンプレート
画像の平均輝度、Iσは入力画像の各画素の輝度と平均
輝度との差の2乗の総和、Tσはテンプレート画像の各
画素の輝度と平均輝度との差の2乗の総和である。
As the similarity between the input image I and the template image T increases, the cross-correlation value C (a, b) increases,
Approaches one. The maximum correlation position is the upper left position (a, b) of the clipped input image at which the expression (1) is maximized. Where I is the average luminance of the input image, T is the average luminance of the template image, Iσ is the sum of the squares of the difference between the luminance of each pixel of the input image and the average luminance, and Tσ is the average of the luminance of each pixel of the template image. This is the sum of the square of the difference from the luminance.

【0005】図2はこの相互相関値Cをグラフで表した
ものである。図2の場合、入力画像I2 が最も相関値C
が高く、最大相関位置であることがわかる。
FIG. 2 is a graph showing the cross-correlation value C. In the case of FIG. 2, the input image I 2 has the largest correlation value C
Is high, indicating that this is the maximum correlation position.

【0006】[0006]

【発明が解決しようとする課題】ところが、(1)式を
演算する際、入力画像Iから求められるI(a,b) (m,
n)−およびIσの計算は、入力画像Iの切り出し位
置(抽出位置)を変更する度に必要となる。すなわち、
入力画像Iの抽出位置を変更する度に相互相関値C
(a,b)の計算を逐次行う必要があるため、ピーク点
を検出するために多大の時間を要する。画像を取り込ん
だ後の処理時間は、画像処理を用いた位置決め設備や検
査設備の処理能力に影響を与えるので、極力短くする必
要がある。
However, when calculating equation (1), I (a, b) (m,
n)-The calculation of I and I [ sigma] is required every time the cutout position (extraction position) of the input image I is changed. That is,
Every time the extraction position of the input image I is changed, the cross-correlation value C
Since the calculation of (a, b) needs to be performed sequentially, it takes a lot of time to detect a peak point. Since the processing time after capturing the image affects the processing capability of the positioning equipment and the inspection equipment using the image processing, it is necessary to shorten the processing time as much as possible.

【0007】そこで、本発明の目的は、相互相関による
テンプレートマッチングの際に、高精度な処理にもかか
わらず、演算量を削減し、高速処理を可能とした画像処
理方法を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an image processing method capable of reducing the amount of calculation and performing high-speed processing despite high-accuracy processing in template matching by cross-correlation. .

【0008】[0008]

【課題を解決するための手段】上記目的を達成するた
め、請求項1に記載の発明は、相互相関によるテンプレ
ートマッチングを用いた画像処理方法において、入力画
像を固定するステップと、テンプレート画像側の切り出
し位置を順次変更しながら、入力画像とテンプレート画
像とを比較することにより、最大相関位置を検出するス
テップと、を有することを特徴とする画像処理方法を提
供する。従来の相互相関によるテンプレートマッチング
の場合、相互相関に必要な計算は、画像の取込み後でな
いとできない演算が多い。そのため、相互相関値Cの演
算に多大の時間を要し、処理能力の低下の原因となって
いた。これに対し、請求項1に記載の発明では、入力画
像を固定し、テンプレート画像の切り出し位置を変更す
るので、相互相関値の計算に必要な大部分を外段取りで
予め計算することができ、画像取込み後の演算を少なく
することができる。その結果、処理能力の大幅な向上を
実現できる。
According to an aspect of the present invention, there is provided an image processing method using template matching based on cross-correlation, comprising the steps of: fixing an input image; Detecting the maximum correlation position by comparing the input image with the template image while sequentially changing the cut-out position, thereby providing an image processing method. In the case of the template matching based on the conventional cross-correlation, there are many calculations required for the cross-correlation only after the image is captured. Therefore, it takes a lot of time to calculate the cross-correlation value C, which causes a reduction in processing capacity. On the other hand, according to the first aspect of the present invention, since the input image is fixed and the cutout position of the template image is changed, most of the cross-correlation values required for calculation can be calculated in advance by external setup. The number of calculations after image capture can be reduced. As a result, the processing capacity can be significantly improved.

【0009】また、請求項2に記載の発明は、相互相関
によるテンプレートマッチングを用いた画像処理方法に
おいて、入力画像およびテンプレート画像の一方を固定
するステップと、入力画像およびテンプレート画像の他
方の切り出し位置を順次変更しながら、入力画像とテン
プレート画像とを比較することにより、最大相関位置を
検出するステップとを有し、上記最大相関位置を検出す
るとき、順次切り出す入力画像またはテンプレート画像
の輝度平均値および輝度ばらつきを同じにする処理を行
なうとともに、入力画像とテンプレート画像の各画素の
積の総和計算により相互相関値のピークを検出すること
を特徴とする画像処理方法を提供する。相互相関を求め
る式は非常に多くの演算を要するが、相互相関値のピー
クを見つけるだけなら、入力画像とテンプレート画像の
各画素の積の総和計算による簡略式を用いればよい。し
かし、この簡略計算では、順次切り出された画像の各画
素の平均輝度値や輝度のばらつきに変化がある場合に
は、相互相関式との差が大きく出てしまう。そこで、請
求項2のように、輝度平均値および輝度ばらつきを同じ
にすることで、入力画像とテンプレート画像の各画素の
積の総和計算だけで、相互相関値のピークを高速で見つ
け出せるようにしたものである。
According to a second aspect of the present invention, in the image processing method using template matching based on cross-correlation, one of the input image and the template image is fixed, and the other of the input image and the template image is cut out. Detecting the maximum correlation position by comparing the input image and the template image while sequentially changing the luminance value of the input image or the template image that is sequentially cut out when the maximum correlation position is detected. In addition, the present invention provides an image processing method for performing processing for making the same luminance variation and detecting a peak of a cross-correlation value by calculating a sum of products of pixels of an input image and a template image. The expression for obtaining the cross-correlation requires a great deal of calculation, but if only the peak of the cross-correlation value is to be found, a simplified expression based on the sum of the products of the pixels of the input image and the template image may be used. However, in the simplified calculation, if there is a change in the average luminance value or the luminance variation of each pixel of the sequentially cut out image, a large difference from the cross-correlation formula appears. Therefore, by making the average luminance value and the luminance variation the same, it is possible to find the peak of the cross-correlation value at high speed only by calculating the sum of the products of the pixels of the input image and the template image. Things.

【0010】さらに、請求項3に記載の発明は、請求項
1と請求項2とを組み合わせたものであり、相互相関に
よるテンプレートマッチングを用いた画像処理方法にお
いて、入力画像を固定するステップと、テンプレート画
像側の切り出し位置を順次変更しながら、入力画像とテ
ンプレート画像とを比較することにより、最大相関位置
を検出するステップとを有し、最大相関位置を検出する
とき、順次切り出すテンプレート画像の輝度平均値およ
び輝度ばらつきを同じにする処理を行なうとともに、入
力画像とテンプレート画像の各画素の積の総和計算によ
り相互相関値のピークを検出することを特徴とする画像
処理方法である。この場合には、請求項1および請求項
2の作用効果を併せ持つことができる。
Further, the invention according to claim 3 is a combination of claims 1 and 2, wherein in the image processing method using template matching by cross-correlation, a step of fixing an input image; Detecting the maximum correlation position by comparing the input image and the template image while sequentially changing the extraction position on the template image side. When detecting the maximum correlation position, the luminance of the template image to be sequentially extracted is determined. This is an image processing method that performs processing for making the average value and the luminance variation the same, and detects the peak of the cross-correlation value by calculating the sum of the products of the pixels of the input image and the template image. In this case, the effects of the first and second aspects can be obtained.

【0011】請求項4に記載の発明は、請求項2または
3に記載の画像処理方法において、上記輝度平均値およ
び輝度ばらつきを同じにする処理とは、順次切り出す画
像の共通部分以外を一定輝度値に処理することであるこ
とを特徴とする。すなわち、画像の中に他の部分と異な
る輝度を持つ特徴部を有する場合、特徴部以外の部分を
一定輝度値とすることにより、入力画像とテンプレート
画像の各画素の積の総和計算だけで、最大相関位置を簡
単に検出できる。
According to a fourth aspect of the present invention, in the image processing method according to the second or third aspect, the processing for equalizing the luminance average value and the luminance variation includes the steps of: It is characterized by processing to a value. That is, when the image has a feature portion having a different luminance from other portions in the image, the portion other than the feature portion has a constant brightness value, so that only the sum of the products of the respective pixels of the input image and the template image is calculated. The maximum correlation position can be easily detected.

【0012】請求項5に記載の発明は、請求項2または
3に記載の画像処理方法において、上記輝度平均値およ
び輝度ばらつきを同じにする処理とは、順次画像を切り
出すときに、現在の切り出し画像の端部の一部分を次の
切り出し画像の別の部分に上書きすることであることを
特徴とする。この場合も、請求項4と同様に、特徴部以
外の部分を次の切り出し画像の別の部分に上書きするこ
とで、データ量を少なくし、最大相関位置を簡単に検出
できる。
According to a fifth aspect of the present invention, in the image processing method according to the second or third aspect, the processing for equalizing the luminance average value and the luminance variation is performed when a current image is sequentially cut out. It is characterized in that part of the end of the image is overwritten on another part of the next cut-out image. In this case as well, by overwriting a part other than the characteristic part with another part of the next cut-out image, the data amount can be reduced and the maximum correlation position can be easily detected.

【0013】[0013]

【発明の実施の形態】図3,図4は本発明にかかる画像
処理の流れの第1実施形態を示す。以下に、図3の画像
処理の流れを図4を参照しながら説明する。まず、後述
する入力画像Iの切り出し範囲よりサーチエリアを含め
やや大きめにテンプレート画像Tを作成し、登録する
(ステップS1)。ここでは、テンプレート画像Tはマ
ーク部分10とそれ以外の部分11とからなる画像であ
る。このテンプレート画像Tから入力画像Iと同じ大き
さの部分テンプレート画像T1 〜T3 を複数個切り出す
(ステップS2)。このうち、部分テンプレート画像T
3の中心にマーク10が位置している。次に、各部分テ
ンプレート画像T1 〜T3 について、相互相関値C
(a,b)の計算式のうち、分子の{T(m,n)−
}と分母のTσを予め計算しておき、テーブル化して
記憶しておく(ステップS3)。これらステップS1〜
S3の操作は、入力画像の取込みとは別に外段取りで行
なう。
3 and 4 show a first embodiment of the flow of image processing according to the present invention. Hereinafter, the flow of the image processing of FIG. 3 will be described with reference to FIG. First, the template image T is created and registered slightly larger than the cut-out range of the input image I, which will be described later, including the search area (step S1). Here, the template image T is an image including the mark portion 10 and the other portion 11. Cutting a plurality of partial template image T 1 through T 3 of the same size as the input image I from the template image T (Step S2). Of these, the partial template image T
The mark 10 is located at the center of 3 . Next, for each of the partial template images T 1 to T 3 , the cross-correlation value C
In the calculation formula of (a, b), ΔT (m, n) −
T } and the denominator Tσ are calculated in advance, stored in a table, and stored (step S3). These steps S1 to
The operation of S3 is performed in an external setup separately from the capture of the input image.

【0014】一方、CCDカメラなどの撮像装置によっ
て対象物の画像12を取り込む(ステップS4)。次
に、取り込まれた画像12から粗位置検出を行ない(ス
テップS5)、取込み画像12からマーク10が存在し
そうな入力画像Iを検出する。なお、入力画像Iの中心
にマーク10が位置している必要はない。粗位置検出の
方法としては、公知の重心計測,残差法によるマッチン
グなどを用いればよい。次に、粗位置検出された入力画
像Iを1個だけ切り出し、固定する(ステップS6)。
そして、相互相関値C(a,b)の計算式のうち、分子
の{I(a,b) (m,n)−}と分母のIσとを切り出
された入力画像Iから計算する(ステップS7)。この
計算は1回で済む。
On the other hand, an image 12 of the object is captured by an imaging device such as a CCD camera (step S4). Next, coarse position detection is performed from the captured image 12 (step S5), and an input image I in which the mark 10 is likely to exist is detected from the captured image 12. Note that the mark 10 does not need to be located at the center of the input image I. As a method of detecting the coarse position, a known method of measuring the center of gravity, matching by the residual method, or the like may be used. Next, only one input image I whose coarse position is detected is cut out and fixed (step S6).
Then, among the equations for calculating the cross-correlation value C (a, b), {I (a, b) (m, n) -I } of the numerator and Iσ of the denominator are calculated from the cut-out input image I ( Step S7). This calculation only needs to be performed once.

【0015】次に、上記のようにテーブル化された{T
(m,n)−}およびTσと、計算された{I(a,b)
(m,n)−}およびIσとから、(1)式によって
相互相関値C(a,b)を計算する(ステップS8)。
そして、相互相関値C(a,b)の最大値から最大相関
位置を算出する(ステップS9)。図4の例では、入力
画像Iと最大相関位置にあるのはテンプレート画像T3
である。その後、テンプレート画像T3 からテンプレー
ト画像T2 の位置を逆算してマーク10の中心位置を求
めればよい。
Next, ΔT tabulated as described above
(M, n) −T } and Tσ, and the calculated {I (a, b)
From (m, n) -I } and Iσ, a cross-correlation value C (a, b) is calculated by equation (1) (step S8).
Then, the maximum correlation position is calculated from the maximum value of the cross-correlation value C (a, b) (step S9). In the example of FIG. 4, the template image T 3 is located at the maximum correlation position with the input image I.
It is. Thereafter, it may be obtained center position of the mark 10 by back calculation the position of the template image T 2 from the template image T 3.

【0016】上記のように、相互相関値C(a,b)の
計算式のうち、分子の{I(a,b) (m,n)−}およ
び分母のIσは、切り出された入力画像Iについて1回
計算するのみであり、分子の{T(m,n)−}およ
び分母Tσは予めサーチ範囲だけ計算しておき、テーブ
ル化しておくことができるので、入力画像を取り込んだ
後での処理が簡単になり、短時間で相互相関値C(a,
b)を計算できる。
As described above, in the equation for calculating the cross-correlation value C (a, b), {I (a, b) (m, n) -I } of the numerator and Iσ of the denominator are the cut-out input values. The calculation is performed only once for the image I, and {T (m, n) -T } and the denominator Tσ of the numerator can be calculated only in advance in the search range and tabulated. The subsequent processing is simplified, and the cross-correlation value C (a,
b) can be calculated.

【0017】図5は本発明にかかる画像処理方法の第2
実施形態を示す。(1)式のような相互相関式を用いて
最大相関位置を求めるには、平均輝度やばらつきIσ
を計算しなければならず、計算時間がかかる。これに対
し、相対的な類似度のピーク位置を見つけるだけであれ
ば、次のような簡略式(2)が考えられる。
FIG. 5 shows a second example of the image processing method according to the present invention.
1 shows an embodiment. In order to obtain the maximum correlation position using the cross-correlation equation such as the equation (1), the average luminance I and the variation Iσ
Must be calculated, which takes a long calculation time. On the other hand, if only the relative similarity peak position is found, the following simplified expression (2) can be considered.

【0018】[0018]

【数2】 なお、α,Bは定数である。(Equation 2) Note that α and B are constants.

【0019】従来のように入力画像の切り出し位置を変
更しながら順次テンプレート画像と比較する場合には、
切り出された入力画像の平均輝度と輝度ばらつきIσ
が一定である場合のみ、簡略式(2)式が成り立つ。し
かしながら、実際には入力画像には輝度むらがあり、一
定とはいえないので、簡略式(2)でピーク位置を検出
することができない。
In the case of sequentially comparing the input image with the template image while changing the cutout position of the input image as in the related art,
Average luminance I and luminance variation Iσ of cut out input image
Equation (2) holds only when is constant. However, actually, the input image has luminance unevenness and cannot be said to be constant. Therefore, the peak position cannot be detected by the simplified formula (2).

【0020】これに対し、入力画像を1個だけ切出し固
定するとともに、テンプレート画像の切り出し位置を順
次変更しながら、入力画像とテンプレート画像とを比較
する方法の場合には、入力画像の平均輝度と輝度ばら
つきIσは一定であり、テンプレート画像の輝度平均値
および輝度ばらつきを同じにする前処理を行なうこと
で、テンプレート画像の平均輝度と輝度ばらつきTσ
も一定化できる。これにより、簡略式(2)を用いて相
対的なピーク位置を検出できる。
On the other hand, in the method of cutting out and fixing only one input image and comparing the input image and the template image while sequentially changing the cutting position of the template image, the average luminance I of the input image is reduced. And the luminance variation Iσ are constant, and by performing pre-processing to make the average luminance value and the luminance variation of the template image the same, the average luminance T and the luminance variation Tσ of the template image are obtained.
Can also be constant. Thus, the relative peak position can be detected using the simplified expression (2).

【0021】テンプレート画像の輝度平均値および輝度
ばらつきを同じにする前処理方法として、ここでは、順
次切り出すテンプレート画像T1 〜T3 の周辺部を一定
輝度値(ここではグレーの部分)に塗りつぶし処理す
る。この場合には、入力画像とテンプレート画像の各画
素の積の総和計算のみでよく、テンプレート画像の{T
(m,n)−}とTσを予め計算しておく必要がな
く、テーブル化も不要となる。また、入力画像について
も、粗位置検出後の{I (a,b) (m,n)−}やIσ
の計算が不要となる。上記簡略式P(a,b)のピーク
位置を検出すれば、相互相関値C(a,b)のピーク位
置と同じとなり、最大相関位置を得ることができる。図
5の場合には、入力画像Iと最大相関位置にあるテンプ
レート画像はT3 であることを容易に検出できる。
Average luminance and luminance of template image
Here, as a preprocessing method to make the variation the same,
Next template image T1 ~ TThree Constant around
Fill the luminance value (here the gray part)
You. In this case, the input image and template image
Only the sum of elementary products needs to be calculated, and the ΔT
(M, n)-TIt is not necessary to calculate} and Tσ in advance
In addition, there is no need to create a table. Also, regarding the input image
{I after coarse position detection (a, b) (M, n)-I} And Iσ
Is unnecessary. Peak of the simplified formula P (a, b)
If the position is detected, the peak position of the cross-correlation value C (a, b)
And the maximum correlation position can be obtained. Figure
In the case of No. 5, the template at the maximum correlation position with the input image I
Rate image is TThree Can be easily detected.

【0022】図6は本発明にかかる画像処理方法の第3
実施形態を示す。図5ではテンプレート画像の輝度平均
値および輝度ばらつきを同じにするため、テンプレート
画像Tの周辺部を一定輝度で塗りつぶしたが、ここでは
テンプレート画像の現在の切り出し画像のマーク10以
外の端部15を次の切り出し画像の別の端部16に上書
きするようにしたものである。すなわち、現在切り出し
たテンプレート画像Tn の端部15を、次に切り出した
テンプレート画像Tn+1 の別の部分16に反転して上書
きする。なお、図では説明を簡単にするために、端部1
5がL字形である例を示したが、矩形の端部であっても
よい。このようにすることで、図5の場合と同様に、簡
略化したマッチング計算式P(a,b)を用いてピーク
位置を検出することができる。
FIG. 6 shows a third embodiment of the image processing method according to the present invention.
1 shows an embodiment. In FIG. 5, the peripheral portion of the template image T is painted with a constant luminance in order to make the average luminance value and the luminance variation of the template image the same. This is to overwrite another end 16 of the next cutout image. That is, the end 15 of the currently cut out template image T n is inverted and overwritten with another portion 16 of the next cut out template image T n + 1 . Note that, in the drawing, the end 1
Although the example in which 5 is L-shaped is shown, it may be a rectangular end. In this way, the peak position can be detected using the simplified matching calculation formula P (a, b), as in the case of FIG.

【0023】第3の実施形態のように、現在の切り出し
画像のマーク10以外の端部15を次の切り出し画像の
別の端部16に上書きする方法では、対象となる画像に
輝度むらがあっても問題がないので、上書き対象となる
画像がテンプレート画像である必要はなく、入力画像で
あってもよい。したがって、第3の実施形態の場合に
は、入力画像を固定し、テンプレート画像の切り出し位
置を変更する場合に限らず、テンプレート画像を固定
し、入力画像の切り出し位置を変更してもよい。
In the method of overwriting the end 15 other than the mark 10 of the current cut image on another end 16 of the next cut image as in the third embodiment, the target image has uneven brightness. Since there is no problem, the image to be overwritten need not be a template image, but may be an input image. Therefore, in the case of the third embodiment, not only the case where the input image is fixed and the cutout position of the template image is changed, the template image may be fixed and the cutout position of the input image may be changed.

【0024】[0024]

【発明の効果】以上の説明で明らかなように、請求項1
の発明によれば、入力画像を固定し、テンプレート画像
の切り出し位置を変更するので、相互相関値の計算に必
要な大部分を外段取りで予め計算することができ、画像
取込み後の演算を少なくすることができる。その結果、
相互相関値の演算を高速で行なうことができ、処理能力
の大幅な向上を実現できる。また、請求項2の発明によ
れば、最大相関位置を検出するとき、輝度平均値および
輝度ばらつきを同じにし、入力画像とテンプレート画像
の各画素の積の総和計算による簡略式を用いるので、相
互相関値のピーク位置を高精度でかつ高速で求めること
ができる。さらに、請求項3の発明では、請求項1およ
び請求項2の発明の特徴を併せ持つので、一層高速で高
精度な位置合わせが可能となる。
As is apparent from the above description, claim 1
According to the invention of the above, since the input image is fixed and the cutout position of the template image is changed, most of the cross-correlation value required can be calculated in advance by external setup, and the number of operations after image capture is reduced. can do. as a result,
The calculation of the cross-correlation value can be performed at high speed, and the processing capability can be greatly improved. According to the second aspect of the invention, when the maximum correlation position is detected, the average luminance value and the luminance variation are set to be the same, and a simplified expression based on the sum of the products of the pixels of the input image and the template image is used. The peak position of the correlation value can be obtained with high accuracy and at high speed. Further, since the third aspect of the present invention has the features of the first and second aspects of the present invention, the positioning can be performed at higher speed and with higher accuracy.

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

【図1】従来の相互相関によるパターンマッチング法を
示す説明図である。
FIG. 1 is an explanatory diagram showing a conventional pattern matching method based on cross-correlation.

【図2】入力画像と相互相関値との関係を示す図であ
る。
FIG. 2 is a diagram illustrating a relationship between an input image and a cross-correlation value.

【図3】本発明にかかる画像処理方法の第1の実施形態
のフローチャート図である。
FIG. 3 is a flowchart of a first embodiment of an image processing method according to the present invention.

【図4】図3に示す画像処理方法における入力画像およ
びテンプレート画像の処理方法を示す説明図である。
FIG. 4 is an explanatory diagram showing a method for processing an input image and a template image in the image processing method shown in FIG. 3;

【図5】本発明にかかる画像処理方法の第2実施形態の
処理方法を示す説明図である。
FIG. 5 is an explanatory diagram showing a processing method according to a second embodiment of the image processing method according to the present invention.

【図6】本発明にかかる画像処理方法の第3実施形態の
処理方法を示す説明図である。
FIG. 6 is an explanatory diagram showing a processing method according to a third embodiment of the image processing method according to the present invention.

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

I 入力画像 T テンプレート画像 10 マーク I Input image T Template image 10 Mark

───────────────────────────────────────────────────── フロントページの続き (72)発明者 池田 芳則 京都府長岡京市天神2丁目26番10号 株式 会社村田製作所内 Fターム(参考) 5L096 AA06 BA05 DA02 EA35 FA32 FA34 FA69 GA41 HA08 JA09 JA11  ────────────────────────────────────────────────── ─── Continued on the front page (72) Inventor Yoshinori Ikeda 2-26-10 Tenjin, Nagaokakyo-shi, Kyoto F-term in Murata Manufacturing Co., Ltd. 5L096 AA06 BA05 DA02 EA35 FA32 FA34 FA69 GA41 HA08 JA09 JA11

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】相互相関によるテンプレートマッチングを
用いた画像処理方法において、入力画像を固定するステ
ップと、テンプレート画像側の切り出し位置を順次変更
しながら、入力画像とテンプレート画像とを比較するこ
とにより、最大相関位置を検出するステップと、を有す
ることを特徴とする画像処理方法。
In an image processing method using template matching based on cross-correlation, a step of fixing an input image and a step of comparing the input image and the template image while sequentially changing a cutout position on the template image side, Detecting the maximum correlation position.
【請求項2】相互相関によるテンプレートマッチングを
用いた画像処理方法において、入力画像およびテンプレ
ート画像の一方を固定するステップと、入力画像および
テンプレート画像の他方の切り出し位置を順次変更しな
がら、入力画像とテンプレート画像とを比較することに
より、最大相関位置を検出するステップとを有し、上記
最大相関位置を検出するとき、順次切り出す入力画像ま
たはテンプレート画像の輝度平均値および輝度ばらつき
を同じにする処理を行なうとともに、入力画像とテンプ
レート画像の各画素の積の総和計算により相互相関値の
ピークを検出することを特徴とする画像処理方法。
2. An image processing method using template matching based on a cross-correlation, wherein one of an input image and a template image is fixed, and the other of the input image and the template image is sequentially changed while cutting out the input image and the template image. Comparing the template image with the template image to detect the maximum correlation position. When the maximum correlation position is detected, a process for making the average luminance value and the luminance variation of the input image or the template image cut out sequentially the same is performed. An image processing method for detecting a peak of a cross-correlation value by calculating a sum of products of pixels of an input image and a template image.
【請求項3】相互相関によるテンプレートマッチングを
用いた画像処理方法において、入力画像を固定するステ
ップと、テンプレート画像側の切り出し位置を順次変更
しながら、入力画像とテンプレート画像とを比較するこ
とにより、最大相関位置を検出するステップとを有し、
上記最大相関位置を検出するとき、順次切り出すテンプ
レート画像の輝度平均値および輝度ばらつきを同じにす
る処理を行なうとともに、入力画像とテンプレート画像
の各画素の積の総和計算により相互相関値のピークを検
出することを特徴とする画像処理方法。
3. An image processing method using template matching based on cross-correlation, wherein the step of fixing the input image and the step of comparing the input image and the template image while sequentially changing the cutout position on the template image side, Detecting a maximum correlation position,
When the maximum correlation position is detected, a process of making the average luminance value and the luminance variation of the template image sequentially cut out the same is performed, and the peak of the cross-correlation value is detected by calculating the sum of the products of the respective pixels of the input image and the template image. An image processing method comprising:
【請求項4】上記輝度平均値および輝度ばらつきを同じ
にする処理とは、順次切り出す画像の共通部分以外を一
定輝度値に処理することであることを特徴とする請求項
2または3に記載の画像処理方法。
4. The method according to claim 2, wherein the processing for equalizing the luminance average value and the luminance variation is to process a portion other than a common portion of the sequentially cut out image to a constant luminance value. Image processing method.
【請求項5】上記輝度平均値および輝度ばらつきを同じ
にする処理とは、順次画像を切り出すときに、現在の切
り出し画像の端部の一部分を次の切り出し画像の別の部
分に上書きすることであることを特徴とする請求項2ま
たは3に記載の画像処理方法。
5. The processing for equalizing the brightness average value and the brightness variation is to overwrite a part of the end of the current cut image with another part of the next cut image when cutting out the image sequentially. The image processing method according to claim 2 or 3, wherein
JP11225039A 1999-08-09 1999-08-09 Image processing method Pending JP2001052167A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11225039A JP2001052167A (en) 1999-08-09 1999-08-09 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11225039A JP2001052167A (en) 1999-08-09 1999-08-09 Image processing method

Publications (1)

Publication Number Publication Date
JP2001052167A true JP2001052167A (en) 2001-02-23

Family

ID=16823100

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11225039A Pending JP2001052167A (en) 1999-08-09 1999-08-09 Image processing method

Country Status (1)

Country Link
JP (1) JP2001052167A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008151607A (en) * 2006-12-15 2008-07-03 Juki Corp Method and apparatus for positioning mark using template matching
JP2017033063A (en) * 2015-07-29 2017-02-09 キヤノン株式会社 Image processing method, image processing device, program, and recording medium
CN112488240A (en) * 2020-12-16 2021-03-12 广东省科学院智能制造研究所 Image frequency domain difference material matching method based on cross correlation

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008151607A (en) * 2006-12-15 2008-07-03 Juki Corp Method and apparatus for positioning mark using template matching
JP2017033063A (en) * 2015-07-29 2017-02-09 キヤノン株式会社 Image processing method, image processing device, program, and recording medium
CN112488240A (en) * 2020-12-16 2021-03-12 广东省科学院智能制造研究所 Image frequency domain difference material matching method based on cross correlation
CN112488240B (en) * 2020-12-16 2023-02-03 广东省科学院智能制造研究所 Image frequency domain difference material matching method based on cross correlation

Similar Documents

Publication Publication Date Title
JP5699788B2 (en) Screen area detection method and system
EP2858008B1 (en) Target detecting method and system
US7889887B2 (en) Lane recognition apparatus
JP4429298B2 (en) Object number detection device and object number detection method
CN108470356B (en) Target object rapid ranging method based on binocular vision
JP2004334819A (en) Stereo calibration device and stereo image monitoring device using same
JP4373840B2 (en) Moving object tracking method, moving object tracking program and recording medium thereof, and moving object tracking apparatus
CN113223050B (en) Robot motion track real-time acquisition method based on Aruco code
CN105869148A (en) Target detection method and device
CN112991374A (en) Canny algorithm-based edge enhancement method, device, equipment and storage medium
CN104966283A (en) Imaging layered registering method
CN110120012A (en) The video-splicing method that sync key frame based on binocular camera extracts
US20150029230A1 (en) System and method for estimating target size
JP4918615B2 (en) Object number detection device and object number detection method
US10580208B2 (en) Ceiling map building method, ceiling map building device, and ceiling map building program
JP2001052167A (en) Image processing method
JP2007200364A (en) Stereo calibration apparatus and stereo image monitoring apparatus using the same
JP5983033B2 (en) Position relationship determination program, position relationship determination method, and position relationship determination device
JP3017122B2 (en) Depth information extraction device and depth information extraction method
JP2004240909A (en) Image processor and image processing method
KR100551825B1 (en) Image Alignment Method by Using Statistical Correlation
JP2009205695A (en) Apparatus and method for detecting the number of objects
CN108280815B (en) Geometric correction method for monitoring scene structure
JP3502933B2 (en) Image processing method for target extraction from infrared image, target extraction method, ground observation method for tracking the extraction target, flying object guidance method and their devices
JP2001209804A (en) Dynamic image processor and dynamic image processing method