JP2007299248A - Method for correcting image position - Google Patents

Method for correcting image position Download PDF

Info

Publication number
JP2007299248A
JP2007299248A JP2006127288A JP2006127288A JP2007299248A JP 2007299248 A JP2007299248 A JP 2007299248A JP 2006127288 A JP2006127288 A JP 2006127288A JP 2006127288 A JP2006127288 A JP 2006127288A JP 2007299248 A JP2007299248 A JP 2007299248A
Authority
JP
Japan
Prior art keywords
image
addition
difference
pixel
images
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
JP2006127288A
Other languages
Japanese (ja)
Inventor
Junichi Kobayashi
純一 小林
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.)
Marantz Electronics Co Ltd
Original Assignee
Marantz Electronics 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 Marantz Electronics Co Ltd filed Critical Marantz Electronics Co Ltd
Priority to JP2006127288A priority Critical patent/JP2007299248A/en
Publication of JP2007299248A publication Critical patent/JP2007299248A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method for correcting an image position capable of promptly and accurately calculating an amount of positional shift between the images while aligning a shot image of an inspection target and its reference image. <P>SOLUTION: All of the brightness data of each pixel G in a shot image S and a reference image M are added respectively along a vertical row direction and horizontal row direction for each pixel line X<SB>1</SB>, X<SB>2</SB>, ..., X<SB>n</SB>, Y<SB>1</SB>, Y<SB>2</SB>, ..., Y<SB>m</SB>for obtaining sum numeric sequences and a difference between the sums of a position corresponding to both images is calculated for each pixel line of vertical rows and horizontal rows. Furthermore, differences between the sums are obtained by shifting the pixel line one by one in each image and then a correction value is decided from a position having the least difference. In this process, a predetermined number of pixels on both the side end parts of a vertical row and a horizontal row of the images is excluded from objects to be compared, and so a maximum correction limit is obtained by subtracting the excluded amount. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、例えば電子部品が実装された基板の実装状態を撮影した撮影画像と、その基準画像とをパターンマッチングで検査するような際、両者の画像の位置ズレを補正する技術に関する。   The present invention relates to a technique for correcting a positional deviation between images when, for example, a captured image obtained by photographing a mounting state of a substrate on which electronic components are mounted and a reference image thereof are inspected by pattern matching.

従来、基板に実装された電子部品の実装状態を検査する技術として、予め、正規に実装された基板を撮影した基準画像を準備しておき、この基準画像と検査対象物の基板を撮影した撮影画像とを比較することで良否を判定するような技術が知られている。そして近年では、実装状態を検査するにあたり、実装部品の微細化に伴って、高倍率で検査対象画像を取得する必要が生じるようになっており、特に高倍率化して撮影したような場合には、検査場所へのカメラの移動を例えばXYステージで行おうとすると、ミクロン単位での移動を繰り返して精度を出す必要がある。しかしながら、機械的に精度を出そうとしても限界があり、誤差のない撮影画像の取得は限界に達している。それでも、このような微細化された実装部品の検査精度を上げるためには、基準画像と検査対象画像とを1画素のズレもなくして重ね合わせて比較する必要がある。
そこで、従来の技術では、このような2つの画像の比較において、両者の画像を位置合わせするため、基準となる画像のある特徴的な領域のセルをテンプレートとして選択し、この選択セルをテンプレートとして他の画像に対してテンプレートマッチングを行い、このマッチング結果に基づいて画像の位置ズレ量を求めるような技術が知られている。(特許文献1参照。)
特開平9−35063号公報
Conventionally, as a technique for inspecting a mounting state of an electronic component mounted on a board, a reference image obtained by photographing a board that is normally mounted is prepared in advance, and a photograph obtained by photographing the reference image and the board of the inspection object is prepared. A technique is known in which pass / fail is determined by comparing with an image. In recent years, in order to inspect the mounting state, it has become necessary to acquire an inspection object image at a high magnification as the mounted parts become finer, especially when shooting at a high magnification. For example, if the camera is moved to the inspection site on the XY stage, it is necessary to repeat the movement in units of microns to obtain accuracy. However, there is a limit in trying to increase the accuracy mechanically, and the acquisition of a photographed image without error has reached the limit. Nevertheless, in order to increase the inspection accuracy of such a miniaturized mounting component, it is necessary to superimpose and compare the reference image and the inspection target image without shifting one pixel.
Therefore, in the conventional technique, in such a comparison of two images, in order to align both images, a cell in a characteristic area having a reference image is selected as a template, and this selected cell is used as a template. A technique is known in which template matching is performed on another image, and the positional deviation amount of the image is obtained based on the matching result. (See Patent Document 1.)
JP-A-9-35063

ところが、上記のような従来技術では、テンプレートとして選択するセルの絵柄のバラツキによる補正の不正確性や、選択セルの場所の限定等の不具合があり、しかも、位置ズレ量の算出に時間がかかるという問題があった。   However, the conventional techniques as described above have inaccuracies in correction due to variations in the pattern of cells selected as a template and limitations on the location of selected cells, and it takes time to calculate the amount of misalignment. There was a problem.

そこで本発明は、選択セルの場所の限定や補正の不正確性という不具合を是正し、画像の位置ズレ量を速やかに且つ正確に算出できるようにすることを目的とする。   In view of the above, an object of the present invention is to correct the problems such as the limitation of the location of a selected cell and the inaccuracy of correction, and to calculate the positional deviation amount of an image quickly and accurately.

上記目的を達成するため本発明は、検査対象物の撮影画像をその基準画像と比較するパターンマッチングの際、二つの画像の位置ずれを補正する補正方法において、両者の画像の各画素の明度を縦列方向、横列方向に各画素ラインごと全て加算して、各方向の画素ラインごとの加算数値列を求め、両画像の対応する画素ラインの加算数値の差を求めるとともに、縦、横方向にお互いの加算数値列の加算数値を1つづつズラシながらその差を求めてゆき、そのうち、差の一番少ない位置を見出して補正値を決定するようにした。   In order to achieve the above object, the present invention provides a correction method for correcting a positional deviation between two images at the time of pattern matching in which a captured image of an inspection object is compared with a reference image. All the pixel lines are added in the vertical direction and the horizontal direction to obtain an addition numerical value sequence for each pixel line in each direction, and a difference between the addition numerical values of the corresponding pixel lines in both images is obtained. The difference is obtained while shifting the addition value of the addition value sequence one by one, and the correction value is determined by finding the position with the smallest difference.

すなわち、従来の画像位置補正方法が、ある狭い領域の特徴的なセルを選択して位置整合するような方式であるとすると、本願発明の場合は画像全体を見渡し、画像全体の明度分布で補正値を求めるような方式である。そして、例えば横方向に○○画素分、縦方向に××画素分移動させれば、両方の画像全体の明度分布差を一番小さくできるという点を見出すようにし、この点を補正値とする。そして補正値が得られると、いずれか一方の画像を他方の画像に対して横方向に○○画素、縦方向に××画素移動させることにより両方の画像を一致させることができる。こうすることで、補正がより正確に行われるとともに、演算処理が簡単で単純なため、補正値を迅速に決定することができる。
なお、ここでいう縦列、横列の画素ラインとは、例えば画像全体が横1000画素、縦500画素によって構成されている場合、縦方向に対しては1000列の画素ライン、横方向に対しては500列の画素ラインが形成され、加算数値列は、横方向に1000の数値からなる加算数値列が、縦方向に500の数値からなる加算数値列が形成されることになる。
また、「加算数値の差が一番少ない位置」とは、後述する最小二乗法によるx/yが最小となる位置とする。
In other words, if the conventional image position correction method is a method in which a characteristic cell in a narrow area is selected and aligned, in the case of the present invention, the entire image is overlooked and corrected with the brightness distribution of the entire image. This is a method for obtaining a value. Then, for example, if the pixel is moved by XX pixels in the horizontal direction and XX pixels in the vertical direction, the point that the difference in the brightness distribution of both the images can be minimized can be found, and this point is used as the correction value. . When the correction value is obtained, both images can be made to coincide by moving one of the images in the horizontal direction by XX pixels and the vertical direction by XX pixels. By doing so, the correction is performed more accurately and the calculation process is simple and simple, so that the correction value can be determined quickly.
The vertical and horizontal pixel lines referred to here are, for example, when the entire image is composed of horizontal 1000 pixels and vertical 500 pixels, with respect to the vertical direction 1000 pixel lines and the horizontal direction. 500 pixel lines are formed. In the addition numerical value sequence, an additional numerical value sequence consisting of 1000 numerical values is formed in the horizontal direction, and an additional numerical value sequence consisting of 500 numerical values is formed in the vertical direction.
Further, the “position where the difference between the addition values is the smallest” is a position where x / y by the least square method described later is minimized.

また本発明では、前記加算数値列を縦、横方向に1つづつズラシながら差を求めて比較する際、縦列、横列の両側端部の所定数の画素ラインについては補正最高限度として比較の対象から除外し、また前記補正最高限度をズラシの最大量とするようにした。   Further, in the present invention, when the difference is obtained while comparing the added numerical value columns one by one in the vertical and horizontal directions, a predetermined number of pixel lines at both end portions of the vertical and horizontal rows are compared as the maximum correction limit. In addition, the maximum correction amount was set as the maximum amount of displacement.

すなわち、補正によって両方の画像を相対的に移動させれば、補正値分に相当する画像の上下、左右両端部分は両方の画像が重なり合うことのない意味のない領域となる。また、両方の画像が重なり合うことのない領域は、一方側の画像から画素の明度を得ることができない領域であり、両画像の明度差から比較するためには特別な細工等を必要とするが、この領域を比較の対象から除外すれば、格別な手段を必要としない。そこで、当初から上下左右の両端部分の所定の領域を最大補正限度として比較の対象から除外しておくことにより効率的に比較できる。
なお、補正最高限度の具体的な値については、経験値等に基づいて決定する。
That is, if both images are relatively moved by correction, the upper and lower and left and right end portions of the image corresponding to the correction value become meaningless regions where both images do not overlap. In addition, the area where both images do not overlap is an area where the brightness of the pixel cannot be obtained from the image on one side, and a special work or the like is required to compare from the brightness difference between the two images. If this area is excluded from comparison, no special means are required. In view of this, efficient comparison can be achieved by excluding predetermined areas at both the upper, lower, left and right end portions from the comparison target as the maximum correction limit.
The specific value of the maximum correction limit is determined based on experience values and the like.

また本発明では、前記撮影画像と基準画像の加算数値列の差を比較する際、加算数値列の総数をyとし、それぞれの加算数値の差をxとした場合に、最小二乗法を用いてx/yが規定量より多い場合はエラーと判定するようにした。   Further, in the present invention, when comparing the difference between the addition numerical value sequences of the photographed image and the reference image, when the total number of the addition numerical value sequences is y and the difference between the respective addition numerical values is x, the least square method is used. When x / y is larger than the specified amount, an error is determined.

基準画像と撮影画像とを重ね合わせてパターンマッチングで比較する際、全く異なった比較対象物で比較することも皆無ではない。このような際には、エラーとして除外する必要があるため、そのようなエラーを最小二乗法で判断するようにする。
ここで最小二乗法とは、計測データ等の誤差を含んだ値から、最もこれに近似する関数を直線で近似するものであり、サンプル数をyとし、誤差をxとした場合に、y=ax+bで表される直線の傾きx/yが一定量以上になると、サンプル数全般における誤差があまりに大きすぎるとして、これをエラーとするものであり、このような最小二乗法を採用することで、エラーを合理的に判断することができる。
When the reference image and the photographed image are overlaid and compared by pattern matching, it is not completely impossible to compare with completely different comparison objects. In such a case, since it is necessary to exclude as an error, such an error is determined by the least square method.
Here, the least square method is a method that approximates a function that approximates this most with a straight line from a value that includes an error such as measurement data, and when y is the number of samples and x is an error, y = If the slope x / y of the straight line represented by ax + b exceeds a certain amount, an error in the total number of samples is regarded as too large, and this is regarded as an error, and such a least square method is adopted. The error can be reasonably judged.

また本発明は前記撮影画像と基準画像の縦列、横列の明度を加算した数値列以外に、斜め列の明度を加算した数値列をも求めて比較するようにした。
縦列、横列以外に斜め列の明度を加算した数値列をも加味することにより、画像の補正がX、Yの2軸方向のみならず、回転方向の補正もできるようになり、一層精密に補正することができる。
In the present invention, in addition to the numerical sequence obtained by adding the brightness of the vertical and horizontal rows of the photographed image and the reference image, a numerical sequence obtained by adding the lightness of the diagonal row is also obtained and compared.
In addition to the vertical and horizontal rows, by adding a numerical sequence that adds the lightness of the diagonal row, the image can be corrected not only in the X and Y axes but also in the rotation direction. can do.

基準画像と撮影画像を重ね合わせてパターンマッチングを行う際、両者の画像全体を見渡し、全体の明度分布で補正値を求めるようにすることで、重ね合わせ精度を高めることができるとともに、補正量を迅速に決定することができる。そして、加算数値列を縦、横方向に1つづつズラシながら差を求めて比較する際、両側端部の所定数の画素ラインを除外することにより、効率的に比較することができ、またエラーを判断するのに最小二乗法を採用することで合理的に判断することができる。
また、斜め列の画素の明度を加算した数値列をも加味することで、画像の位置合わせ精度を一層向上させることができる。
When pattern matching is performed by superimposing the reference image and the captured image, the entire image of both images is looked over and the correction value is obtained from the overall brightness distribution, so that the overlay accuracy can be improved and the correction amount can be reduced. Can be determined quickly. Then, when calculating and comparing the difference between the numerical addition values in the vertical and horizontal directions one by one, it is possible to efficiently compare by excluding a predetermined number of pixel lines at both ends. It can be reasonably judged by adopting the least squares method for judging.
In addition, the accuracy of image alignment can be further improved by taking into account a numerical sequence obtained by adding the brightness of pixels in an oblique column.

本発明の実施の形態について添付した図面に基づき説明する。
ここで図1は基準または撮影画像の一例図、図2、図3は本発明の位置補正方法を説明するための説明図である。
Embodiments of the present invention will be described with reference to the accompanying drawings.
Here, FIG. 1 is an example of a reference or photographed image, and FIGS. 2 and 3 are explanatory diagrams for explaining the position correction method of the present invention.

本発明に係る画像の位置補正方法は、例えば実装基板等の検査対象物の撮影画像をその基準画像と比較して検査するような画像処理検査にあたり、従来のように画像のうちの特徴的な部分を選択セルとして抽出し、これを基準として両画像を位置合わせするのでなく、画像全体を見渡して両画像の位置ズレ量を迅速に決定し、瞬時に両画像を重ね合わせることができるようにされている。   The image position correction method according to the present invention is an image processing inspection in which a captured image of an inspection object such as a mounting substrate is inspected by comparing it with its reference image. Instead of extracting a part as a selected cell and aligning both images based on this, it is possible to quickly determine the amount of misalignment of both images by looking over the entire image and instantly superimpose both images Has been.

そして本願発明の位置補正の基本原理は、図1、図2に示すような画像情報の最小単位である各画素Gの明度に基づいて明度スペクトラムを作成し、検査対象物の撮影画像の明度スペクトラムと、基準画像の明度スペクトラムとを対比するとともに、両画像の相対的な位置を変化させつつ比較し、最もマッチング度の良い相対位置関係を求めて補正量を決定するというものである。   The basic principle of position correction according to the present invention is that a brightness spectrum is created based on the brightness of each pixel G, which is the minimum unit of image information as shown in FIGS. 1 and 2, and the brightness spectrum of a photographed image of the inspection object is obtained. Are compared with the brightness spectrum of the reference image and compared while changing the relative positions of both images, and the relative positional relationship with the best matching degree is obtained to determine the correction amount.

その具体的な方法は、図2に示すように、いま画像の画素Gが、横方向(X方向)にX、X…Xのn列、縦方向(Y方向)にY、Y…Yのm列で構成され、X、X…X、及びY、Y…Yを各画素ラインと呼んだ場合に、各画素Gの明度を、画素ラインごと縦列方向、横列方向に全て加算して各方向の加算数値列を求める。そしてこの加算数値列とは、例えば、Xの画素ライン上に存在する全ての画素Gの明度の加算値を、簡単な一桁の5であるとし、Xの画素ライン上に存在する全ての画素Gの明度の加算値を6とし、Xの画素ライン上に存在する全ての画素Gの明度の加算値を7とし、以下同様にしてXの画素ライン上に存在する全ての画素Gの明度の加算値を4とした場合、X方向の加算数値列は、567…4のようなn個の数値列で表される。
同様にしてY方向の数値列がm個の数値列として表される。
ちなみに、画像処理検査装置などに使用される一般的な画像の画素数は、X方向に1000〜1400画素、Y方向に800〜1100画素程度である。
The specific method is as shown in FIG. 2, the pixel G now image, Y 1 in the transverse direction (X direction) X 1, X 2 ... X n n columns of the vertical direction (Y-direction), Y 2 ... Y m composed of m columns, and when X 1 , X 2 ... X n and Y 1 , Y 2 ... Y m are called pixel lines, the brightness of each pixel G is determined for each pixel line. All values are added in the column direction and the row direction to obtain an added numerical sequence in each direction. The addition numerical value sequence means, for example, that the addition value of the brightness of all the pixels G existing on the X 1 pixel line is a simple single digit of 5, and all the values existing on the X 2 pixel line The added value of the brightness of the pixel G of 6 is set to 6, the added value of the brightness of all the pixels G existing on the X 3 pixel line is set to 7, and the same applies to all the pixels existing on the X n pixel line. When the added value of the brightness of G is 4, the added numerical sequence in the X direction is represented by n numerical sequences such as 567.
Similarly, the numerical sequence in the Y direction is represented as m numerical sequences.
Incidentally, the number of pixels of a general image used in an image processing inspection apparatus or the like is about 1000 to 1400 pixels in the X direction and about 800 to 1100 pixels in the Y direction.

そして、このような数値列が、基準となるべき基準画像の縦・横列と、検査対象物の撮影画像の縦・横列との2種類得られることになる。   Then, two types of numerical values such as a vertical / horizontal row of a reference image to be a reference and a vertical / horizontal row of a photographed image of the inspection object are obtained.

そして、両画像の比較においては、それぞれの画像の対応する縦・横列の加算数値列の数値の比較が行われ、縦・横方向にお互いの加算数値を1つづつズラシながら差が求められて比較される。
これを具体的な数値に例にとって説明すると、今、基準画像のX方向の画素ライン数が13で、その加算数値列が、5556768766555であり、撮影画像のX方向の加算数値列が5676876655554である場合、例えば基準画像に対して撮影画像の加算数値列を右方向に1つづつズラシながら比較すると、一つのズラシで(5556768766555)と(*567687665555)とでその差分(絶対値)が|(*011121101000)|となり、二つのズラシで(5556768766555)と(**56768766555)とでその差分(絶対値)が|(**00000000000)|となり、三つのズラシで(5556768766555)と(***5676876655)とでその差分(絶対値)が|(***1112110100)|となり、二つのズラシの場合が、全体のマッチ度において最高となる。従って、この場合は、X方向に2画素分の補正量が必要であることが判る。
In the comparison of both images, the numerical values of the vertical and horizontal addition numerical values corresponding to each image are compared, and the difference is obtained while shifting the addition numerical values one by one in the vertical and horizontal directions. To be compared.
This will be described using specific numerical values as an example. Now, the number of pixel lines in the X direction of the reference image is 13, the added numerical value sequence is 5556768766555, and the added numerical value sequence in the X direction of the photographed image is 5676876655554. In this case, for example, when comparing the added numerical value sequence of the captured image with respect to the reference image while shifting one by one in the right direction, the difference (absolute value) between (5556768766555) and (* 567687665555) is | (* 011121101000) |, and the difference (absolute value) between (5556768766555) and (** 56768766555) is | (** 00000000000) | for two gaps, and (5556768766555) and (*** 5676876655) for the three gaps And the difference (absolute value) becomes | (*** 1112110100) |, and in the case of two gaps, the overall matching degree is the highest. Therefore, in this case, it can be seen that a correction amount of two pixels in the X direction is necessary.

そして、Y方向においても同様の要領により補正値が求められ、X、Y方向の補正量が直ちに判明し、両方の画像を精度良く一致させることができる。   In the Y direction, correction values are obtained in the same manner, the correction amounts in the X and Y directions are immediately determined, and both images can be matched with high accuracy.

ところで、以上のような補正要領により、基準画像Mと撮影画像Sの両画像を一致させると、図3(c)に示すように、各画像M、SのX方向、Y方向の両側端部に、重なり合うことのない無駄な部分δx、δyが生じるようになる。そして、このδx、δyの領域は、一方側の画像から明度が得られない領域であり、比較の対象として不適当な領域であるため、本実施例では、予め画像の両側端部の所定領域部分の画素Gについては、補正最高限度として比較の対象から除外するとともに、両画像M、Sをズラシて比較する際のズラシの最大量を、この補正最高限度としている。   By the way, when both the reference image M and the captured image S are made to coincide with each other by the correction procedure as described above, as shown in FIG. 3C, both end portions of the images M and S in the X direction and the Y direction are arranged. In addition, useless portions δx and δy that do not overlap are generated. The areas δx and δy are areas where brightness cannot be obtained from the image on one side and are unsuitable areas for comparison. In this embodiment, predetermined areas at both end portions of the image are preliminarily used. The pixel G of the portion is excluded from the comparison target as the maximum correction limit, and the maximum amount of shift when the images M and S are compared with each other is set as the maximum correction limit.

そして、この両側部分の補正最高限度の画素数は、例えば撮像装置のガタ等による画像のズレの量や、撮影エリアの範囲等の関係から経験値で決定するようにしている。
ちなみに、本実施例では、この補正最高限度の画素数は、X、Y方向とも、端部寄りの5〜15画素程度(両側合わせて10〜30画素程度)としており、検査に影響がでないような領域に設定している。
The maximum number of corrected pixels on both sides is determined by an empirical value based on the relationship between the amount of image shift caused by, for example, play of the image pickup apparatus, the range of the shooting area, and the like.
By the way, in this embodiment, the maximum number of pixels for correction is about 5 to 15 pixels near the end in both the X and Y directions (about 10 to 30 pixels on both sides) so that the inspection is not affected. It is set to a proper area.

また、基準画像のスペクトラムと、撮影画像のスペクトラムが全く同じになることは皆無といってよく、場合によっては、全く別の比較対象で比較することもあり得る。そしてこの場合は、補正対象外のエラーとして判別する必要があり、また加算数値の差の最小の位置が不明な場合もある。このため、本発明では、最小二乗法を用いてこれらを判別するようにしている。以下、その判別方法について説明する。   Further, it can be said that the spectrum of the reference image and the spectrum of the photographed image are not exactly the same, and in some cases, the comparison may be performed using completely different comparison objects. In this case, it is necessary to determine that the error is not subject to correction, and the minimum position of the difference between the addition values may be unknown. For this reason, in the present invention, these are discriminated using the least square method. Hereinafter, the determination method will be described.

前記例の基準画像のX方向の加算数値列(5556768766555)と、撮影画像のX方向の加算数値列(5676876655554)を例にとった場合、前記のように、両者の差分(絶対値)は、両画像そのままの状態で、|(0120112111001)|(合計11)、撮影画像を右方向に画素1ライン分ズラシした状態で、|(*011121101000)|(合計8)、画素2ライン分ズラシした状態で、|(**00000000000)|(合計0)、画素3ライン分ズラシした状態で、|(***1112110100)|(合計8)となり、画素2ラインのズラシにより一致させることができることが明白に判る。   In the case of taking the addition numerical sequence in the X direction (5556768766555) of the reference image and the addition numerical sequence in the X direction (5676876655554) of the captured image as an example, the difference (absolute value) between the two is as described above. With both images as they are, | (0120112111001) | (total 11), with the captured image shifted to the right by one line of pixel, | (* 011121101000) | (total 8), shifted by two lines of pixel Thus, | (** 00000000000) | (total 0), with a shift of 3 lines of pixels, it becomes | (*** 1112110100) | (total 8), and it is clear that it can be matched by the shift of 2 lines of pixels. I understand.

これに対して、基準画像のX方向の加算数値列が(5556768766555)で、撮影画像の加算数値列が(6866554934477)の場合、両画像の差分(絶対値)は、そのままの状態で、|(1310214232122)|(合計24)、撮影画像を右方向に画素1ライン分ズラシた状態で、|(*130113333112)|(合計22)、画素2ライン分ズラシた状態で、|(**12103223211)|(合計18)、撮影画像を左方向に画素1ライン分ズラシた状態で、|(311122142222*)|(合計23)、同方向に画素2ライン分ズラシした状態で、|(11013353212**)|(合計19)となり、どの位置が基準画像に近いのか、または基準画像が間違っているのかが判然としない。   On the other hand, when the reference numerical image X-direction addition numerical sequence is (5556768766555) and the photographed image addition numerical sequence is (6866554934477), the difference (absolute value) between the two images remains as it is. 1310214232122) | (total 24), with the captured image shifted by one line to the right, | (* 130113333112) | (total 22), with a shift of two lines of pixel | (** 12103223211) | (Total 18), with the captured image shifted by one line in the left direction, | (311122142222 *) | (total 23), with the pixel shifted by two lines in the same direction, | (11013353212 **) | It is not clear which position is close to the reference image or the reference image is wrong.

そこで本発明では、加算数値列の総数(サンプル数)をyとし、差分(誤差)をxとした場合に、最小二乗法を用いてx/yが規定値より多い場合はエラーと判定し、x/yが規定値内にあるときは、x/yが最小となる位置を補正位置と判断するようにした。この最小二乗法は、複数のデータ(x・y)(x・y)…(x・y)が得られた場合に、最もこれらに最も適合すると思われる直線y=ax+bを計算で求めるものであり、横軸をy、縦軸をxとして直線y=ax+bを表した場合、x/y(直線の傾斜角)が規定値より多い場合は、サンプル数y全般の誤差が多すぎるものとしてエラーと判断するものである。
これは、例えばある加算数値列の総数yの中に局部的に極めて大きい誤差があり、その他の箇所の誤差が殆どない場合などには、最小二乗法を採用することにより、x/yが小さい値を示す反面、加算数値列の総数yの全般に亘って誤差がある場合には、たとえトータルの誤差が前記例の局部的に大きい誤差があるものより小さい場合でもx/yが大きい値を示すことがあることから、画像全般のマッチ度を判断するには合理的な判断方法である。
Therefore, in the present invention, when the total number (number of samples) of the addition numerical sequence is y and the difference (error) is x, it is determined that an error occurs when x / y is larger than a specified value using the least square method. When x / y is within the specified value, the position where x / y is minimum is determined as the correction position. This least squares method is a method in which a plurality of data (x 1 · y 1 ) (x 2 · y 2 )... (X n · y n ) is obtained, and a straight line y = ax that is most likely to be fitted to them is obtained. + b is calculated, and when the horizontal axis is y and the vertical axis is x and the straight line y = ax + b is expressed, if x / y (straight angle of the straight line) is larger than the specified value, the number of samples The error is judged as an error because there is too much error in general y.
This is because, for example, when there is an extremely large error in the total number y of a certain added numerical sequence and there is almost no error in other places, x / y is small by adopting the least square method. On the other hand, if there is an error throughout the total number y of the added numerical sequence, even if the total error is smaller than the locally large error in the above example, x / y is a large value. This is a reasonable judgment method for judging the degree of matching of the images in general.

なお、以上のような各画素Gの明度の加算や、両画像の比較や、最小二乗法の演算等は、コンピュータにとって得意分野で迅速に処理できる操作であり、至短時間に計算されて結論が得られる。   Note that the addition of the brightness of each pixel G, the comparison of both images, the operation of the least square method, and the like are operations that can be quickly processed in the field of expertise for computers, and are calculated in a very short time and concluded. Is obtained.

また、以上の例では、画像の各画素の明度を縦列、横列方向の画素ラインで加算して、X、Y方向の加算数値列を求め、X、Y方向の補正量を求めるようにしているが、対角線方向、及びこれと平行な斜め列の明度を加算した数値列を得、両画像で比較するようにしても良い。この場合は、縦列と横列以外に二方向の斜め列の加算数値列が加わることにより、画像の回転方向の補正も可能となり、より正確に補正することができる。   Further, in the above example, the brightness of each pixel of the image is added in the pixel lines in the vertical and horizontal directions to obtain an added numerical sequence in the X and Y directions, and the correction amount in the X and Y directions is obtained. However, a numerical sequence obtained by adding the brightness values of the diagonal direction and the diagonal columns parallel to the diagonal direction may be obtained and compared in both images. In this case, by adding an addition numerical value sequence in two directions in addition to the vertical row and the horizontal row, the rotational direction of the image can be corrected, and the correction can be made more accurately.

なお、本発明は以上のような実施形態に限定されるものではない。本発明の特許請求の範囲に記載した事項と実質的に同一の構成を有し、同一の作用効果を奏するものは本発明の技術的範囲に属する。
例えば、検査対象物等は任意である。また、画素ラインをズラシながら比較する際、どちらの画像の加算数値列をズラシても良い。
In addition, this invention is not limited to the above embodiments. What has substantially the same configuration as the matters described in the claims of the present invention and exhibits the same operational effects belongs to the technical scope of the present invention.
For example, the inspection object or the like is arbitrary. In addition, when comparing pixel lines while shifting, the addition numerical sequence of either image may be shifted.

基準画像と撮影画像を位置合わせする際、画像の各画素の明度分布により位置ズレを判断することで、補正量の算出を迅速に且つ正確に行うことができるため、例えば実装基板等を画像で検査する場合に、検査時間の短縮や検査精度の向上が図られる。   When aligning the reference image and the captured image, it is possible to calculate the correction amount quickly and accurately by determining the positional deviation based on the brightness distribution of each pixel of the image. In the inspection, the inspection time can be shortened and the inspection accuracy can be improved.

基準画像または撮影画像の一例図Example of reference image or captured image 本発明の画素の縦列、横列の画素ラインを説明する説明図Explanatory drawing explaining the vertical and horizontal pixel line of the pixel of this invention 基準画像と撮影画像の位置合わせ状況を説明するための説明図Explanatory drawing for demonstrating the alignment situation of a reference image and a photographed image

符号の説明Explanation of symbols

M…基準画像、S…撮影画像、G…画素。
M: Reference image, S: Captured image, G: Pixel.

Claims (4)

検査対象物の撮影画像をその基準画像と比較するパターンマッチングの際、二つの画像の位置ずれを補正する補正方法であって、両者の画像の各画素の明度を縦列方向、横列方向に各画素ラインごと全て加算して、各方向の画素ラインごとの加算数値列を求め、両画像の対応する画素ラインの加算数値の差を求めるとともに、縦、横方向にお互いの加算数値列の加算数値を1つづつズラシながらその差を求めてゆき、そのうち、差の一番少ない位置を見出して補正値を決定することを特徴とする画像の位置補正方法。 A correction method for correcting a positional deviation between two images in pattern matching in which a captured image of an inspection object is compared with a reference image, and the brightness of each pixel of both images is set to each pixel in a vertical direction and a horizontal direction. All the lines are added together to obtain an addition value sequence for each pixel line in each direction, and the difference between the addition values of the corresponding pixel lines in both images is obtained, and the addition value of each addition value sequence is obtained in the vertical and horizontal directions. A method for correcting the position of an image, wherein the difference is obtained while shifting one by one and a correction value is determined by finding a position having the smallest difference. 前記加算数値列を縦、横方向に1つづつズラシながら差を求めて比較する際、縦列、横列の両側端部の所定数の画素ラインについては補正最高限度として比較の対象から除外し、また前記補正最高限度をズラシの最大量とすることを特徴とする請求項1に記載の画像の位置補正方法。 When a difference is obtained while comparing the added numerical value columns one by one in the vertical and horizontal directions, a predetermined number of pixel lines at both ends of the vertical and horizontal rows are excluded from comparison targets as the maximum correction limit, and The image correction method according to claim 1, wherein the maximum correction limit is a maximum amount of displacement. 前記撮影画像と基準画像の加算数値の差を比較する際、加算数値列の総数をyとし、それぞれの加算数値の差をxとした場合に、最小二乗法を用いてx/yが規定量より多い場合はエラーと判定することを特徴とする請求項1又は請求項2に記載の画像の位置補正方法。 When comparing the difference between the addition values of the photographed image and the reference image, if the total number of addition value sequences is y and the difference between the addition values is x, x / y is a specified amount using the least square method. The image position correcting method according to claim 1, wherein if there is more, it is determined as an error. 前記撮影画像と基準画像の縦列、横列の明度を加算した加算数値列以外に、斜め列の明度を加算した加算数値列をも求めて比較することを特徴とする請求項1乃至請求項3のいずれか1項に記載の画像の位置補正方法。
4. The addition numerical value sequence obtained by adding the lightness values of the diagonal rows in addition to the addition numerical value sequence value obtained by adding the vertical and horizontal lightness values of the photographed image and the reference image is obtained and compared. The image position correction method according to claim 1.
JP2006127288A 2006-05-01 2006-05-01 Method for correcting image position Pending JP2007299248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006127288A JP2007299248A (en) 2006-05-01 2006-05-01 Method for correcting image position

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006127288A JP2007299248A (en) 2006-05-01 2006-05-01 Method for correcting image position

Publications (1)

Publication Number Publication Date
JP2007299248A true JP2007299248A (en) 2007-11-15

Family

ID=38768684

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006127288A Pending JP2007299248A (en) 2006-05-01 2006-05-01 Method for correcting image position

Country Status (1)

Country Link
JP (1) JP2007299248A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017138837A (en) * 2016-02-04 2017-08-10 トヨタ自動車株式会社 Movement body monitoring system
JP2019158362A (en) * 2018-03-07 2019-09-19 株式会社Screenホールディングス Substrate inspection apparatus, substrate processing apparatus, and substrate inspection method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017138837A (en) * 2016-02-04 2017-08-10 トヨタ自動車株式会社 Movement body monitoring system
JP2019158362A (en) * 2018-03-07 2019-09-19 株式会社Screenホールディングス Substrate inspection apparatus, substrate processing apparatus, and substrate inspection method
JP7089906B2 (en) 2018-03-07 2022-06-23 株式会社Screenホールディングス Board inspection equipment, board processing equipment and board inspection method

Similar Documents

Publication Publication Date Title
US7693348B2 (en) Method of registering and aligning multiple images
US8148682B2 (en) Method and apparatus for pattern position and overlay measurement
KR101015410B1 (en) Soldering-print inspection apparatus
TWI474363B (en) Pattern evaluation device and pattern evaluation method
TW201801603A (en) Apparatus and method for calibrating machining position
US20140210993A1 (en) Automatic programming of solder paste inspection system
JP2005308464A (en) Flaw detector and flaw detecting method
US9098894B2 (en) Defect determination in integrated circuit manufacturing process
US7567699B2 (en) Center determination of rotationally symmetrical alignment marks
JP2008014700A (en) Workpiece inspection method and workpiece inspection device
JP2851022B2 (en) IC tilt inspection method
KR20110105512A (en) Inspection method
US7440080B2 (en) Method and apparatus for automatic correction of direct exposure apparatus
JP2007299248A (en) Method for correcting image position
JP2008283050A (en) Method and device for generating data for image processing
US20200045862A1 (en) Board inspecting apparatus and method of compensating board distortion using the same
JP2007027302A (en) Inspection apparatus and positioning method thereby
CN114357938A (en) Method for generating PCB reference point by using available parallel line segment group on copper-clad surface
KR102593263B1 (en) Test method and apparatus
KR20150076544A (en) Method of reviewing defect of substrate
JP2010283243A (en) Exposure device and device manufacturing method
JP2006284543A (en) Method and device for inspecting mounted circuit board
JP4900951B2 (en) Production line inspection system and inspection method
JP2008151568A (en) Inspection method of photomask, and inspection device of photomask
JP2008151634A (en) Inspecting method for electro-optical device