JP2002259975A - Method for computing degree of coincidence in pattern matching, and image recognition device for performing the same - Google Patents

Method for computing degree of coincidence in pattern matching, and image recognition device for performing the same

Info

Publication number
JP2002259975A
JP2002259975A JP2001051317A JP2001051317A JP2002259975A JP 2002259975 A JP2002259975 A JP 2002259975A JP 2001051317 A JP2001051317 A JP 2001051317A JP 2001051317 A JP2001051317 A JP 2001051317A JP 2002259975 A JP2002259975 A JP 2002259975A
Authority
JP
Japan
Prior art keywords
average
luminance level
sum
image area
calculated
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
JP2001051317A
Other languages
Japanese (ja)
Inventor
Yoshihisa Oido
良久 大井戸
Takayuki Fukae
崇行 深江
Noriyuki Suzuki
規之 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2001051317A priority Critical patent/JP2002259975A/en
Publication of JP2002259975A publication Critical patent/JP2002259975A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Complex Calculations (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable a high speed computation of the whole image, when updating a specific size of an object image area for position in a search image area, and computing a brightness level average by reference to the brightness level of the object image area at each updated position, for the purpose of recognizing the image. SOLUTION: The brightness level average for the object image area A2 at an initial position is calculated to obtain an initial value. Each time the position is updated, a total sum of the brightness level for the object image area A2 before updating the position is calculated from the brightness level average. A sum of the brightness level Sum1 for a partial image area P1 newly referred to by the position updating is determined and added to the total sum of the brightness level, and a sum of the brightness level Sum2 for a partial image area P2 to which reference is stopped is determined and subtracted from the total sum of the brightness level. By calculating the brightness level average for the object image area A2 after updating the position based on the add-subtract value, the brightness level average for the object image area A2 at each updated position is asymptotically obtained. Total number of calculations can be reduced, since overlapped parts in the reference to the brightness level is eliminated.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、電子機器に使用さ
れる電子部品実装基板などを製造する際に位置認識や検
査のために用いられるパターンマッチングの一致度演算
方法およびそれを実施する画像認識装置に関し、詳細に
は、輝度レベル平均値の演算方法、輝度レベルの偏差ベ
クトル値の演算方法、これらを用いるパターンマッチン
グの一致度演算方法、演算プログラム、画像認識装置、
生産設備に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of calculating a degree of coincidence of pattern matching used for position recognition and inspection when manufacturing an electronic component mounting board or the like used for electronic equipment, and image recognition for implementing the method. For the device, in detail, a method of calculating a luminance level average value, a method of calculating a deviation vector value of a luminance level, a method of calculating a matching degree of pattern matching using these, a calculation program, an image recognition device
Related to production equipment.

【0002】[0002]

【従来の技術】電子部品実装基板の製造に用いられる位
置認識装置や検査装置では、図5に示すように、探索領
域A1内で一定の対象画像領域A2(垂直方向サイズl
1、水平方向サイズl2、代表位置座標(x,y)、輝度レ
ベル参照座標(i,j))を設定し、その対象画像領域A2
を一定量ずつ移動させて各更新位置で、画像メモリにア
クセスして輝度情報を得る輝度レベル参照を行い、その
参照値を基にパターンマッチングの一致度を演算してい
る。
2. Description of the Related Art In a position recognition device or an inspection device used for manufacturing an electronic component mounting board, as shown in FIG. 5, a fixed target image area A2 (vertical size l) is set within a search area A1.
1, the horizontal size l2, the representative position coordinates (x, y), and the luminance level reference coordinates (i, j)) are set, and the target image area A2 is set.
Is moved by a fixed amount, and at each update position, an image memory is accessed to refer to a luminance level for obtaining luminance information, and the matching degree of pattern matching is calculated based on the reference value.

【0003】演算に用いられる輝度レベル平均値は、対
象画像領域A2の輝度レベルをintensity(x+i,y+j)とし
た時、以下の式(1)
The average brightness level used in the calculation is given by the following equation (1) when the brightness level of the target image area A2 is intensity (x + i, y + j).

【0004】[0004]

【数1】 で表わされるので、代表位置座標(x,y)を更新するごと
に、l1×l2回の輝度レベル参照(たとえばl1×l
2個の画素のレベル参照)と加算演算を行なうことにな
る。
(Equation 1) Therefore, every time the representative position coordinates (x, y) are updated, the luminance level is referred to 11 × 12 times (for example, 11 × l
(Refer to the level of two pixels) and the addition operation.

【0005】また輝度レベルの偏差ベクトルの大きさ
は、以下の式(2)
The magnitude of the luminance level deviation vector is given by the following equation (2).

【0006】[0006]

【数2】 で表わされるので(M(x,y),intensity(x+i,y+j)は上
記と同意義である)、代表位置座標(x,y)を更新するご
とに、l1×l2回の輝度レベル参照、減算、乗算、加
算演算を行なうことになる。
(Equation 2) (M (x, y) and intensity (x + i, y + j) are the same as above), so that every time the representative position coordinates (x, y) are updated, 11 × 12 times Brightness level reference, subtraction, multiplication, and addition operations are performed.

【0007】ここで、輝度レベルの偏差ベクトルとは、
部分画像の輝度レベルintensity(x+i,y+j) を一列に並
べた多次元ベクトル
Here, the deviation vector of the luminance level is
A multidimensional vector in which the intensity levels (x + i, y + j) of partial images are arranged in a line

【0008】[0008]

【数3】 の偏差ベクトルのノルム(Equation 3) Norm of the deviation vector of

【0009】[0009]

【数4】 のことである。(Equation 4) That is.

【0010】[0010]

【発明が解決しようとする課題】上記した(1)式を用
いて輝度レベル平均を演算し、その演算値を用いて対象
画像の正規化を行い、下記の(3)式で表されるテンプ
レート画像との一致度を演算し、それより一致度の最小
値を探索するパターンマッチングを行う場合、総演算量
の内で輝度レベル平均の演算が占める割合は約40%で
ある。
The average brightness level is calculated using the above equation (1), the target image is normalized using the calculated value, and a template represented by the following equation (3) is obtained. When calculating the degree of coincidence with an image and performing pattern matching to search for the minimum value of the degree of coincidence, the average luminance level calculation accounts for about 40% of the total amount of calculation.

【0011】[0011]

【数5】 ところが、輝度レベル平均の演算時には、図6に示すよ
うに代表位置を単位移動量sにて更新する毎に斜線部分
を重複して輝度レベル参照し演算しており、この画素参
照重複部分A3が、パターンマッチングで画像全体を探
索する際の高速化の妨げになっている。
(Equation 5) However, at the time of calculating the average brightness level, as shown in FIG. 6, every time the representative position is updated by the unit movement amount s, the hatched portion is overlapped and the brightness level is referred to for calculation. This hinders speeding up when searching the entire image by pattern matching.

【0012】また、上記した(2)式を用いて輝度レベ
ルの偏差ベクトルの大きさを演算し、その演算値を用い
て対象画像の正規化を行い、下記の(4)式で表される
テンプレート画像との一致度を演算し、それより一致度
の最小値を探索するパターンマッチングを行う場合は、
輝度レベル平均の演算時と輝度レベルの偏差ベクトルの
大きさの演算時との両方で、前出の輝度レベル参照の重
複が生じるため、さらにパターンマッチングの高速化が
困難である。
Further, the magnitude of the deviation vector of the luminance level is calculated by using the above equation (2), and the target image is normalized by using the calculated value, and is expressed by the following equation (4). When calculating the degree of coincidence with the template image and performing pattern matching to search for the minimum value of the degree of coincidence based on that,
Since the above-mentioned luminance level reference overlaps both when the luminance level average is calculated and when the magnitude of the luminance level deviation vector is calculated, it is difficult to further speed up the pattern matching.

【0013】[0013]

【数6】 本発明は上記問題を解決するもので、画像全体を高速に
演算しパターンマッチングの高速化を実現できるように
することを目的とする。
(Equation 6) SUMMARY OF THE INVENTION An object of the present invention is to solve the above-described problem, and to enable high-speed calculation of an entire image to realize high-speed pattern matching.

【0014】[0014]

【課題を解決するための手段】上記課題を解決するため
に本発明は、輝度レベル平均や輝度レベルの偏差ベクト
ルの大きさを演算する際の輝度レベル参照の重複部分を
なくし、それにより演算の総回数を削減し、画像全体を
高速に演算するようにしたものである。このようにする
ことにより、高速にパターンマッチングして位置認識や
検査を行うことが可能になり、この方法を採用した画像
認識装置を備えた製造設備とすることで、高速な位置決
めや検査が可能になり、生産性が向上する。
SUMMARY OF THE INVENTION In order to solve the above-mentioned problems, the present invention eliminates the overlap of the luminance level reference when calculating the average of the luminance level and the magnitude of the deviation vector of the luminance level. The total number of times is reduced, and the whole image is calculated at high speed. By doing so, it becomes possible to perform position recognition and inspection by high-speed pattern matching, and by using a manufacturing facility equipped with an image recognition device that adopts this method, high-speed positioning and inspection can be performed. And productivity is improved.

【0015】請求項1に記載の発明は、画像を認識する
際に、探索画像領域内で一定サイズの対象画像領域を位
置更新し、各更新位置で前記対象画像領域の輝度レベル
を参照して輝度レベル平均を演算する輝度レベル平均値
の演算方法であって、初期位置での前記対象画像領域の
輝度レベル平均値を算出して初期値とし、位置更新する
たびに、位置更新前の対象画像領域の輝度レベル総和を
その輝度レベル平均値より算出し、この輝度レベル総和
に対して、位置更新によって新たに参照する部分画像領
域の輝度レベル和を求めて加算するとともに、参照しな
くなる部分画像領域の輝度レベル和を求めて減算し、そ
の加減算値を基に位置更新後の対象画像領域の輝度レベ
ル平均を算出することにより、各更新位置での対象画像
領域の輝度レベル平均値を漸化的に得ることを特徴とす
る。
According to the first aspect of the present invention, when recognizing an image, the position of a target image region having a fixed size is updated in a search image region, and the luminance level of the target image region is referred to at each update position. A method of calculating a brightness level average value for calculating a brightness level average, wherein a brightness level average value of the target image area at an initial position is calculated and set as an initial value, and each time the position is updated, the target image before the position update is updated. The brightness level sum of the area is calculated from the brightness level average value, the brightness level sum of the partial image area to be newly referred to by the position update is added to the brightness level sum, and the partial image area not to be referred to is added. The luminance level of the target image area at each update position is calculated by subtracting and subtracting the luminance level sum of Wherein the obtained recurrently the average value.

【0016】請求項2に記載の発明は、画像を認識する
際に、探索画像領域内で一定サイズの対象画像領域を位
置更新し、各更新位置で前記対象画像領域の輝度レベル
を参照してその偏差ベクトルの大きさを演算する輝度レ
ベルの偏差ベクトル値の演算方法であって、初期位置で
前記対象画像領域の輝度レベル平均および輝度レベルの
2乗の平均を求め、これらの平均値より輝度レベルの偏
差ベクトルを算出して初期値とし;位置更新するたび
に、(A)位置更新前の対象画像領域の輝度レベル総和
をその輝度レベル平均値より算出し、この輝度レベル総
和に対して、位置更新によって新たに参照する部分画像
領域の輝度レベル和を求めて加算する一方で、参照しな
くなる部分画像領域の輝度レベル和を求めて減算し、そ
の加減算値を基に位置更新後の対象画像領域の輝度レベ
ル平均を算出するとともに、(B)位置更新前の対象画
像領域の輝度レベルの2乗の総和をその平均値より算出
し、この輝度レベル2乗総和に対して、位置更新によっ
て新たに参照する部分画像領域の輝度レベル2乗和を求
めて加算する一方で、参照しなくなる部分画像領域の輝
度レベル2乗和を求めて減算し、その加減算値を基に位
置更新後の対象画像領域の輝度レベル2乗和の平均を算
出し、(C)算出した輝度レベル平均値と輝度レベル2
乗和の平均値とを用いて対象画像領域の輝度レベルの偏
差ベクトルの大きさを算出することにより;各更新位置
での対象画像領域の輝度レベルの偏差ベクトル値を漸化
的に得ることを特徴とする。
According to a second aspect of the present invention, when recognizing an image, a position of a target image region having a predetermined size is updated in a search image region, and the luminance level of the target image region is referred to at each update position. A method of calculating a deviation vector value of a luminance level for calculating a magnitude of the deviation vector, wherein an average of a luminance level and an average of a square of the luminance level of the target image area are obtained at an initial position, and a luminance is calculated from these average values. Each time the position is updated, (A) the sum of the luminance levels of the target image area before the position update is calculated from the average of the luminance levels. While calculating and adding the sum of the brightness levels of the partial image areas to be newly referred to by the position update, calculating and subtracting the sum of the brightness levels of the partial image areas that are no longer referred to, The luminance level average of the target image area after the update is calculated, and (B) the sum of the squares of the luminance levels of the target image area before the position update is calculated from the average value. While calculating and adding the sum of the luminance levels of the partial image areas to be newly referred to by the position update, calculating and subtracting the sum of the luminance levels of the partial image areas that are no longer referred to, the position is calculated based on the addition / subtraction value. The average of the sum of the brightness levels of the target image area after the update is calculated, and (C) the calculated brightness level average value and the brightness level 2
Calculating the magnitude of the deviation vector of the luminance level of the target image area using the average value of the sum of squares; and gradually obtaining the deviation vector value of the luminance level of the target image area at each update position. Features.

【0017】請求項3に記載の発明は、請求項1記載の
演算方法で得られる輝度レベル平均値をテンプレート画
像の輝度レベル平均値に対して比較しパターン一致度を
演算することを特徴とするパターンマッチングの一致度
演算方法である。
According to a third aspect of the present invention, the pattern matching is calculated by comparing the average brightness level obtained by the calculation method according to the first aspect with the average brightness level of the template image. This is a method of calculating the degree of coincidence of pattern matching.

【0018】請求項4に記載の発明は、請求項2記載の
演算方法で得られる輝度レベルの偏差ベクトル値をテン
プレート画像の輝度レベルの偏差ベクトル値に対して比
較しパターン一致度を演算することを特徴とするパター
ンマッチングの一致度演算方法である。
According to a fourth aspect of the present invention, a pattern matching degree is calculated by comparing the deviation vector value of the luminance level obtained by the operation method of the second aspect with the deviation vector value of the luminance level of the template image. This is a method of calculating the degree of coincidence of pattern matching characterized by the following.

【0019】請求項5に記載の発明は、請求項1〜請求
項4のいずれかに記載の演算方法の手順を記録した演算
プログラムである。請求項6に記載の発明は、請求項5
に記載の演算プログラムを記憶し演算する演算手段を備
えた画像認識装置である。
According to a fifth aspect of the present invention, there is provided an arithmetic program recording the procedure of the arithmetic method according to any one of the first to fourth aspects. The invention according to claim 6 is the invention according to claim 5
An image recognizing device comprising an arithmetic means for storing and operating the arithmetic program described in (1).

【0020】請求項7に記載の発明は、請求項6に記載
の画像認識装置を搭載した生産設備である。請求項8に
記載の発明は、請求項7に記載の生産設備としての電子
部品実装機である。
According to a seventh aspect of the present invention, there is provided a production facility equipped with the image recognition device according to the sixth aspect. An eighth aspect of the present invention is an electronic component mounting machine as the production facility according to the seventh aspect.

【0021】[0021]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照しながら説明する。以下に記載する手順は演算プ
ログラムとして記録され、図示を省略した電子部品実装
機等の生産設備に搭載された画像認識装置の演算手段に
備えられている。 (実施の形態1)まず、図1に示すように、電子部品な
どの認識対象物に相応する探索領域内の初期位置での対
象画像領域A2の輝度レベル平均M(x,y)を上述した式
(1)により演算し、初期値として保存する。その後に
対象画像領域A2の位置をx方向に単位移動量sだけ更
新し、それにより新たに参照する部分画像領域P1の輝
度レベルの総和Sum1と、参照しなくなる部分画像領域
P2の輝度レベルの総和Sum2とを演算する。これらの
輝度レベルの総和Sum1, Sum2と、先に保存した輝度
レベル平均M(x,y)とを用いて、以下の(5)式より、
更新位置の平均輝度レベルM(x+s,y)を得る。
Embodiments of the present invention will be described below with reference to the drawings. The procedure described below is recorded as a calculation program, and is provided in a calculation means of an image recognition device mounted on a production facility such as an electronic component mounting machine (not shown). (Embodiment 1) First, as shown in FIG. 1, the average brightness level M (x, y) of the target image area A2 at the initial position in the search area corresponding to the recognition target such as an electronic component has been described above. Calculate according to equation (1) and save as an initial value. Thereafter, the position of the target image area A2 is updated in the x-direction by the unit movement amount s, whereby the sum Sum1 of the luminance levels of the partial image area P1 to be newly referred to and the sum total of the luminance levels of the partial image areas P2 not to be referred to anymore. Sum2 is calculated. Using the sums Sum1 and Sum2 of these brightness levels and the brightness level average M (x, y) previously stored, from the following equation (5),
An average luminance level M (x + s, y) at the update position is obtained.

【0022】[0022]

【数7】 同様にして、探索領域内で平均輝度レベルM(x+ps,y)を
漸化的に、つまり順次に得る(pは0以上の整数であ
る)。
(Equation 7) Similarly, the average brightness level M (x + ps, y) is obtained recursively, that is, sequentially in the search area (p is an integer of 0 or more).

【0023】得られた平均輝度レベルM(x,y)〜M(x+p
s,y)の演算値を用いて対象画像の正規化を行い、上述し
た(3)式で表されるテンプレート画像との一致度を演
算し、それより一致度の最小値を探索するパターンマッ
チングを行ない、認識対象物の位置認識や検査を行う。
The obtained average luminance levels M (x, y) to M (x + p
s, y) is used to normalize the target image, calculate the degree of coincidence with the template image represented by the above equation (3), and search for the minimum value of the degree of coincidence based on the pattern matching. To perform position recognition and inspection of the recognition target object.

【0024】上記した方法によれば、輝度レベル参照の
重複部分がない分だけ演算の総回数が少なくてすみ、画
像全体を高速に演算できる。よって、従来に比べて位置
決めや検査を高速に行うことができ、生産性が向上す
る。
According to the above-described method, the total number of operations can be reduced by an amount corresponding to the absence of overlapping luminance level references, and the entire image can be operated at high speed. Therefore, positioning and inspection can be performed at a higher speed than in the past, and productivity is improved.

【0025】なお、対象画像の正規化からの演算過程、
位置認識・検査過程は以下の方法でも同様なので以降の
説明は省略する。図2に示すように対象画像領域A2の
位置をy方向に更新していく場合は、以下の(6)式よ
り、更新位置の平均輝度レベルM(x,y+s)を得る。ここ
でSum1’は単位移動量sの位置更新により新たに参照
する部分画像領域P1’の輝度レベルの総和と、Sum
2’は同じく参照しなくなる部分画像領域P2’の輝度
レベルの総和である。
It should be noted that the calculation process from the normalization of the target image,
Since the position recognition / inspection process is the same in the following method, the following description is omitted. When updating the position of the target image area A2 in the y direction as shown in FIG. 2, an average luminance level M (x, y + s) at the update position is obtained from the following equation (6). Here, Sum1 'is the sum of the brightness levels of the partial image area P1' newly referred to by updating the position of the unit movement amount s, and Sum1 '.
2 ′ is the sum of the luminance levels of the partial image area P2 ′ which is no longer referred to.

【0026】[0026]

【数8】 同様にして、平均輝度レベルM(x,y+qs) を漸化的に得
る(qは0以上の整数である)。
(Equation 8) Similarly, an average luminance level M (x, y + qs) is recursively obtained (q is an integer of 0 or more).

【0027】図3に示すように画面全体に対して演算を
行う場合は、対象画像領域A2の位置を更新する際の単
位移動量をsとして、画面を図4に示すように1行1列
目、1行n列目、m行1列目、n行m列目の4領域に分
割し、1行1列目については、(1)式より、輝度レベ
ル平均M(x,y)である初期値を求め、m行1列目につい
ては、上記(5)式を用いて、1行1列目の輝度レベル
平均M(x,y)の結果から順次に演算していく。1行n列
目についても、上記(6)式を用いて、同様に漸化的に
演算を行う。
When the calculation is performed on the entire screen as shown in FIG. 3, the unit movement amount at the time of updating the position of the target image area A2 is s, and the screen is one row and one column as shown in FIG. , The first row, the n-th column, the m-th row, the first column, and the n-th row, the m-th column. A certain initial value is obtained, and for the m-th row and the first column, calculations are sequentially performed from the result of the average brightness level M (x, y) of the first row and the first column using the above equation (5). Similarly for the first row and the n-th column, the recursive calculation is performed using the above equation (6).

【0028】m行n列については、ラスタースキャン方
式で演算を進めていく場合、垂直方向、水平方向の両方
向の変化分を考慮して、単位移動量sだけ位置を更新し
た際の漸化式を以下のように立てることができる。
For the calculation of the m rows and n columns by the raster scan method, the recurrence formula when the position is updated by the unit movement amount s in consideration of the change in both the vertical and horizontal directions. Can be established as follows.

【0029】[0029]

【数9】 式中、s1,s2はそれぞれx方向,y方向の移動量、Buffe
r1,Buffer2,s1,s2,Sum1,Sum2,Sum3,Sum4はs1,s2に基づ
く図5に示した領域の輝度レベルの総和を示す。
(Equation 9) Where s1 and s2 are the movement amounts in the x and y directions, respectively,
r1, Buffer2, s1, s2, Sum1, Sum2, Sum3, and Sum4 indicate the sum of the luminance levels of the area shown in FIG. 5 based on s1 and s2.

【0030】図3、図4を用いて説明した演算方式を用
い、画像サイズ512×480画素、テンプレートサイ
ズ(対象画像領域サイズ)200×200画素、単位移
動量(s)を2画素としたところ、Pentium166Hzのプロ
セッサーで、3msで演算を終了することができた。これ
に対し、同一プロセッサーで従来方式の演算を行った時
には34220msの演算時間が必要であった。 (実施の形態2)本発明の実施の形態2における輝度レ
ベルの偏差ベクトル値の演算方法、およびそれを用いて
テンプレートマッチングを行うパターンマッチング一致
度演算方法を図1〜図4を援用して説明する。この実施
の形態2は請求項2、請求項4に相応する。
Using the calculation method described with reference to FIGS. 3 and 4, the image size is 512 × 480 pixels, the template size (target image area size) is 200 × 200 pixels, and the unit movement amount (s) is 2 pixels. With a Pentium 166Hz processor, the operation could be completed in 3ms. On the other hand, when the conventional processor performs the calculation using the same processor, a calculation time of 34220 ms is required. (Embodiment 2) A method of calculating a deviation vector value of a luminance level and a method of calculating a pattern matching coincidence degree for performing template matching using the same in Embodiment 2 of the present invention will be described with reference to FIGS. I do. The second embodiment corresponds to claims 2 and 4.

【0031】まず、図1に示すような、対象画像領域A
2の初期位置での輝度レベル平均M(x,y)を上述した
(1)式により演算し、初期値として保存する。また、
初期位置での輝度レベルの2乗の平均レベルW(x,y)を
以下の(8)式にて演算する。
First, as shown in FIG.
The average brightness level M (x, y) at the initial position of No. 2 is calculated by the above-described equation (1) and stored as an initial value. Also,
An average level W (x, y) of the square of the luminance level at the initial position is calculated by the following equation (8).

【0032】[0032]

【数10】 偏差ベクトルの大きさは一般的に分散の平方根と同じで
あるから、初期位置での偏差ベクトルの大きさN(x,y)
を以下の(9)式にて演算する。
(Equation 10) Since the magnitude of the deviation vector is generally the same as the square root of the variance, the magnitude N (x, y) of the deviation vector at the initial position
Is calculated by the following equation (9).

【0033】[0033]

【数11】 そして、初期位置(座標(x,y))での輝度レベルの総和
と輝度レベルの2乗の総和とを演算し保存する。その後
に、演算対象領域A2の位置をx方向にsだけ更新し、
その際に新たに参照する部分画像領域P1の輝度レベル
の総和および輝度レベルの2乗の総和と、参照しなくな
る部分画像領域P2の輝度レベルの総和および輝度レベ
ルの2乗の総和とを演算する。
[Equation 11] Then, the sum of the brightness levels and the sum of the squares of the brightness levels at the initial position (coordinates (x, y)) are calculated and stored. Thereafter, the position of the calculation target area A2 is updated by s in the x direction,
At this time, the sum of the luminance level and the sum of the squares of the luminance levels of the partial image area P1 to be newly referred to, and the sum of the luminance levels and the sum of the squares of the luminance levels of the partial image area P2 not to be referred to are calculated. .

【0034】そして、保存した輝度レベルの総和及び輝
度レベルの2乗の総和を用いて、以下の(10)式にて輝
度レベルの2乗の平均レベルW(x+s,y)を算出する。
Then, using the stored sum of the brightness levels and the sum of the squares of the brightness levels, an average level W (x + s, y) of the squares of the brightness levels is calculated by the following equation (10). .

【0035】[0035]

【数12】 このW(x+s,y)を用い、上記(9)式にしたがって、更
新位置の偏差ベクトルの大きさN(x+s,y)を得る。
(Equation 12) Using this W (x + s, y), the magnitude N (x + s, y) of the deviation vector of the update position is obtained according to the above equation (9).

【0036】同様にして、各更新位置の偏差ベクトルの
大きさN (x+ps,y) を漸化的に得る(pは0以上の整数
である)。図2に示すように対象画像領域A2の位置を
y方向に更新していく場合も同様にして、以下の輝度レ
ベルの2乗の平均レベルW(x,y+s)を算出する。
Similarly, the magnitude N (x + ps, y) of the deviation vector at each update position is recursively obtained (p is an integer of 0 or more). Similarly, when the position of the target image area A2 is updated in the y direction as shown in FIG. 2, the following average level W (x, y + s) of the square of the luminance level is calculated.

【0037】[0037]

【数13】 このW(x,y+s)を用い、上記(9)式にしたがって、更
新位置の偏差ベクトルの大きさN(x,y+s)を得る。さら
に、各更新位置の偏差ベクトルの大きさN (x,y+qs) を
漸化的に得る(qは0以上の整数である)。
(Equation 13) Using this W (x, y + s), the magnitude N (x, y + s) of the deviation vector of the update position is obtained according to the above equation (9). Further, the magnitude N (x, y + qs) of the deviation vector at each update position is recursively obtained (q is an integer of 0 or more).

【0038】図3に示すように画面全体に対して演算を
行う際には、輝度レベルの平均を求める時(実施の形態
1)と同様にして、図4に示すように対象画像領域A2
の位置を更新する際の単位移動量をsとして、画面を1
行1列目、1行n列目、m行1列目、n行m列目の4領
域に分割して、漸化的に演算を行う。
When the calculation is performed on the entire screen as shown in FIG. 3, as in the case of obtaining the average of the luminance levels (Embodiment 1), as shown in FIG.
When the unit movement amount when updating the position of is set to s, the screen is set to 1
The operation is divided into four regions of the first row, the first column, the n-th column, the m-th row, the first column, and the n-th row and the m-th column, and the operation is recursively performed.

【0039】m行n列については、ラスタースキャン方
式で演算を進めていく場合、垂直方向、水平方向の両方
向の変化分を考慮して、単位移動量sだけ位置を更新し
た際の漸化式を以下のように立てることができる。
For the calculation of the m rows and n columns by the raster scan method, the recurrence formula when the position is updated by the unit movement amount s in consideration of the change in both the vertical and horizontal directions. Can be established as follows.

【0040】[0040]

【数14】 上記した各方法によれば、輝度レベル参照の重複部分が
ない分だけ演算の総回数が少なくてすみ、輝度レベルの
偏差を画像全体について高速に演算できる。
[Equation 14] According to each of the above-described methods, the total number of operations can be reduced because there is no overlapping part of the luminance level reference, and the deviation of the luminance level can be calculated at high speed for the entire image.

【0041】[0041]

【発明の効果】以上のように本発明によれば、輝度レベ
ル参照を重複することなく、したがって必要最小限の演
算量で、部分画像の輝度レベル平均や輝度レベルの偏差
ベクトルの大きさを得ることができる。またこれらの演
算値を用いることによって、照度やコントラストの影響
を不変に出来るという特徴を持った輝度レベルの正規化
を行うパターンマッチングの演算を高速に行うことがで
き、さらには位置認識や検査を高速に行うことが可能に
なる。よって、これらの演算手順を記録した演算プログ
ラムを備えた画像認識装置を搭載することで、認識対象
のワークに依る画像の照度レベルやコントラストの変動
に左右されることなく、製造装置を高速に連続動作させ
ることができ、その生産能力を向上できる。
As described above, according to the present invention, the average of the luminance level of the partial image and the magnitude of the deviation vector of the luminance level can be obtained without duplicating the luminance level reference and with the minimum necessary amount of calculation. be able to. In addition, by using these calculated values, it is possible to perform high-speed pattern matching calculation for normalizing a luminance level, which has a feature that the influence of illuminance and contrast can be kept unchanged. It can be performed at high speed. Therefore, by installing an image recognition device equipped with an operation program that records these operation procedures, the manufacturing device can be continuously operated at high speed without being affected by variations in the illuminance level and contrast of the image depending on the work to be recognized. It can be operated and its production capacity can be improved.

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

【図1】本発明の実施の形態における演算方法であっ
て、対象画像領域をx方向に移動させる際の演算方法を
示す説明図
FIG. 1 is an explanatory diagram showing a calculation method according to an embodiment of the present invention when a target image area is moved in an x direction.

【図2】本発明の実施の形態における演算方法であっ
て、対象画像領域をy方向に移動させる際の演算方法を
示す説明図
FIG. 2 is an explanatory diagram showing a calculation method according to the embodiment of the present invention when the target image area is moved in the y direction.

【図3】本発明の実施の形態における演算方法であっ
て、対象画像領域をx,y方向に移動させる際の演算方
法を示す説明図
FIG. 3 is an explanatory diagram showing a calculation method according to the embodiment of the present invention when the target image area is moved in the x and y directions.

【図4】図3の演算方法における対象エリアの分割を示
す説明図
FIG. 4 is an explanatory diagram showing division of a target area in the calculation method of FIG. 3;

【図5】従来より行なっている画像認識方法における探
索領域と対象画像領域との関係を示す説明図
FIG. 5 is an explanatory diagram showing a relationship between a search area and a target image area in a conventional image recognition method.

【図6】図5に示した画像認識方法において対象画像領
域をx方向に移動させる際の画素参照重複部分を示す説
明図
FIG. 6 is an explanatory diagram showing a pixel reference overlap portion when the target image area is moved in the x direction in the image recognition method shown in FIG. 5;

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

A2 対象画像領域 s 単位移動量 P1 部分画像領域 P2 部分画像領域 Sum1 輝度レベル和 Sum2 輝度レベル和 P1’ 部分画像領域 P2’ 部分画像領域 Sum1’ 輝度レベル和 Sum2’ 輝度レベル和 A2 Target image area s Unit movement amount P1 Partial image area P2 Partial image area Sum1 Sum of luminance levels Sum2 Sum of luminance levels P1 'Partial image area P2' Partial image area Sum1 'Sum of luminance levels Sum2' Sum of luminance levels

フロントページの続き (72)発明者 鈴木 規之 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 Fターム(参考) 5B056 AA04 BB62 BB72 BB81 DD06 5C054 CA04 CF07 CG01 CG02 EA01 EA05 EG07 EH07 FC03 FC12 FC15 FE09 FE18 FF06 HA01 HA03 HA04 HA05 5L096 BA03 FA32 FA33 HA09 JA09Continuation of front page (72) Inventor Noriyuki Suzuki 1006 Kazuma Kadoma, Kazuma-shi, Osaka F-term in Matsushita Electric Industrial Co., Ltd. FF06 HA01 HA03 HA04 HA05 5L096 BA03 FA32 FA33 HA09 JA09

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 画像を認識する際に、探索画像領域内で
一定サイズの対象画像領域を位置更新し、各更新位置で
前記対象画像領域の輝度レベルを参照して輝度レベル平
均を演算する輝度レベル平均値の演算方法であって、 初期位置での前記対象画像領域の輝度レベル平均値を算
出して初期値とし、 位置更新するたびに、位置更新前の対象画像領域の輝度
レベル総和をその輝度レベル平均値より算出し、この輝
度レベル総和に対して、位置更新によって新たに参照す
る部分画像領域の輝度レベル和を求めて加算するととも
に、参照しなくなる部分画像領域の輝度レベル和を求め
て減算し、その加減算値を基に位置更新後の対象画像領
域の輝度レベル平均を算出することにより、 各更新位置での対象画像領域の輝度レベル平均値を漸化
的に得ることを特徴とする輝度レベル平均値の演算方
法。
When recognizing an image, a luminance for updating a position of a target image region of a fixed size in a search image region and calculating an average luminance level by referring to a luminance level of the target image region at each update position. A method of calculating a level average value, wherein an average value of the luminance level of the target image area at an initial position is calculated and set as an initial value, and each time the position is updated, the total luminance level of the target image area before the position update is calculated. The brightness level average is calculated, and the sum of the brightness levels is calculated and added to the sum of the brightness levels of the partial image areas to be newly referred to by the position update. By subtracting and calculating the average luminance level of the target image area after the position update based on the addition / subtraction value, the average luminance level value of the target image area at each update position can be gradually obtained. And a method for calculating a luminance level average value.
【請求項2】 画像を認識する際に、探索画像領域内で
一定サイズの対象画像領域を位置更新し、各更新位置で
前記対象画像領域の輝度レベルを参照してその偏差ベク
トルの大きさを演算する輝度レベルの偏差ベクトル値の
演算方法であって、 初期位置で前記対象画像領域の輝度レベル平均および輝
度レベルの2乗の平均を求め、これらの平均値より輝度
レベルの偏差ベクトルを算出して初期値とし、位置更新
するたびに、 位置更新前の対象画像領域の輝度レベル総和をその輝度
レベル平均値より算出し、この輝度レベル総和に対し
て、位置更新によって新たに参照する部分画像領域の輝
度レベル和を求めて加算する一方で、参照しなくなる部
分画像領域の輝度レベル和を求めて減算し、その加減算
値を基に位置更新後の対象画像領域の輝度レベル平均を
算出するとともに、 位置更新前の対象画像領域の輝度レベルの2乗の総和を
その平均値より算出し、この輝度レベル2乗総和に対し
て、位置更新によって新たに参照する部分画像領域の輝
度レベル2乗和を求めて加算する一方で、参照しなくな
る部分画像領域の輝度レベル2乗和を求めて減算し、そ
の加減算値を基に位置更新後の対象画像領域の輝度レベ
ル2乗和の平均を算出し、 算出した輝度レベル平均値と輝度レベル2乗和の平均値
とを用いて対象画像領域の輝度レベルの偏差ベクトルの
大きさを算出することにより、 各更新位置での対象画像領域の輝度レベルの偏差ベクト
ル値を漸化的に得ることを特徴とする輝度レベルの偏差
ベクトル値の演算方法。
2. When recognizing an image, a position of a target image region of a fixed size is updated in a search image region, and a magnitude of a deviation vector is determined by referring to a luminance level of the target image region at each update position. A method of calculating a deviation vector value of a luminance level to be calculated, wherein an average of a luminance level and an average of a square of a luminance level of the target image area are obtained at an initial position, and a luminance level deviation vector is calculated from these average values. Each time the position is updated, the sum of the brightness levels of the target image area before the position update is calculated from the average brightness level, and the sum of the brightness levels is compared with the partial image area newly referenced by the position update. While adding and subtracting the sum of the brightness levels of the partial image areas that are no longer referenced, and calculating the sum of the brightness of the target image area after the position update based on the addition / subtraction value. A bell average is calculated, and the sum of the squares of the luminance levels of the target image area before the position update is calculated from the average value. While adding and subtracting the sum of the luminance levels of the partial image areas that are no longer referred to, and subtracting the sum of the luminance levels of the partial image areas that are no longer referred to. By calculating the average of the sum and calculating the magnitude of the deviation vector of the luminance level of the target image region using the calculated luminance level average value and the average value of the luminance level sum of squares, the target at each update position is calculated. A method of calculating a deviation vector value of a luminance level, wherein a deviation vector value of a luminance level of an image area is gradually obtained.
【請求項3】 請求項1記載の演算方法で得られる輝度
レベル平均値をテンプレート画像の輝度レベル平均値に
対して比較しパターン一致度を演算することを特徴とす
るパターンマッチングの一致度演算方法。
3. A pattern matching matching degree calculating method, wherein the pattern matching degree is calculated by comparing the average brightness level value obtained by the calculation method according to claim 1 with the average brightness level value of the template image. .
【請求項4】 請求項2記載の演算方法で得られる輝度
レベルの偏差ベクトル値をテンプレート画像の輝度レベ
ルの偏差ベクトル値に対して比較しパターン一致度を演
算することを特徴とするパターンマッチングの一致度演
算方法。
4. A pattern matching method according to claim 2, wherein a luminance vector deviation vector value obtained by the operation method is compared with a luminance level deviation vector value of a template image to calculate a pattern matching degree. Matching degree calculation method.
【請求項5】 請求項1〜請求項4のいずれかに記載の
演算方法の手順を記録したことを特徴とする演算プログ
ラム。
5. An operation program recording a procedure of the operation method according to claim 1. Description:
【請求項6】 請求項5に記載の演算プログラムを記憶
し演算する演算手段を備えたことを特徴とする画像認識
装置。
6. An image recognizing device comprising an arithmetic means for storing and operating the arithmetic program according to claim 5.
【請求項7】 請求項6に記載の画像認識装置を搭載し
たことを特徴とする生産設備。
7. A production facility equipped with the image recognition device according to claim 6.
【請求項8】 電子部品実装機である請求項7に記載の
生産設備。
8. The production facility according to claim 7, which is an electronic component mounting machine.
JP2001051317A 2001-02-27 2001-02-27 Method for computing degree of coincidence in pattern matching, and image recognition device for performing the same Pending JP2002259975A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001051317A JP2002259975A (en) 2001-02-27 2001-02-27 Method for computing degree of coincidence in pattern matching, and image recognition device for performing the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001051317A JP2002259975A (en) 2001-02-27 2001-02-27 Method for computing degree of coincidence in pattern matching, and image recognition device for performing the same

Publications (1)

Publication Number Publication Date
JP2002259975A true JP2002259975A (en) 2002-09-13

Family

ID=18912124

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001051317A Pending JP2002259975A (en) 2001-02-27 2001-02-27 Method for computing degree of coincidence in pattern matching, and image recognition device for performing the same

Country Status (1)

Country Link
JP (1) JP2002259975A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008009442A (en) * 2007-07-23 2008-01-17 Video Research:Kk Voice data processing method
CN103237176A (en) * 2013-04-24 2013-08-07 广州视睿电子科技有限公司 Light source brightness adjustment method and device of optical imaging touch frame
WO2015031113A1 (en) * 2013-08-27 2015-03-05 Qualcomm Incorporated Systems, devices and methods for tracking objects on a display

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008009442A (en) * 2007-07-23 2008-01-17 Video Research:Kk Voice data processing method
CN103237176A (en) * 2013-04-24 2013-08-07 广州视睿电子科技有限公司 Light source brightness adjustment method and device of optical imaging touch frame
CN103237176B (en) * 2013-04-24 2016-08-24 广州视睿电子科技有限公司 Optical imagery touches method for adjusting brightness of light source and the device of frame
WO2015031113A1 (en) * 2013-08-27 2015-03-05 Qualcomm Incorporated Systems, devices and methods for tracking objects on a display
CN105493147A (en) * 2013-08-27 2016-04-13 高通股份有限公司 Systems, devices and methods for tracking objects on a display
US9454827B2 (en) 2013-08-27 2016-09-27 Qualcomm Incorporated Systems, devices and methods for tracking objects on a display

Similar Documents

Publication Publication Date Title
US7565029B2 (en) Method for determining camera position from two-dimensional images that form a panorama
JP3166905B2 (en) Image processing method and system by pattern matching
US6330353B1 (en) Method of localization refinement of pattern images using optical flow constraints
JP2003030653A (en) Image processing method, image processor and bonding device
CN110910445A (en) Object size detection method and device, detection equipment and storage medium
US20040109599A1 (en) Method for locating the center of a fiducial mark
CN105005991B (en) A kind of method for calculating atom barycenter displacement in high resolution scanning transmission image in batches
CN111898408B (en) Quick face recognition method and device
JPH11167455A (en) Hand form recognition device and monochromatic object form recognition device
JP2002259975A (en) Method for computing degree of coincidence in pattern matching, and image recognition device for performing the same
CN113921412A (en) Method, device and equipment for calculating chip period in wafer
JP3679958B2 (en) License plate recognition device
JP4530723B2 (en) PATTERN MATCHING METHOD, PATTERN MATCHING DEVICE, AND ELECTRONIC COMPONENT MOUNTING METHOD
JPH0737893B2 (en) Pattern matching method
JP2004118467A (en) Member inclination recognizing method, member inclination recognition control program, readable recording medium, and shape recognizing device
JP3437087B2 (en) Feature point tracking method and apparatus, and recording medium storing feature point tracking program
CN115022535B (en) Image processing method and device and electronic equipment
JP2002008028A (en) Pattern matching method and device therefor
US10909706B1 (en) Robust hardware efficient disparity estimation using total-variation L1 regularization
JP3024254B2 (en) Curve drawing method and apparatus
JPH05114028A (en) Method and circuit for matching density pattern
JP2016091458A (en) Program, image processor, and image processing method
CN113420762A (en) Image processing method, system, electronic equipment and storage medium
CN117253255A (en) Palm correction method based on non-homologous binocular
TW202240533A (en) Image splicing method