JP3754401B2 - Image distortion correction method, image distortion correction apparatus and image distortion correction program based on representative point measurement - Google Patents

Image distortion correction method, image distortion correction apparatus and image distortion correction program based on representative point measurement Download PDF

Info

Publication number
JP3754401B2
JP3754401B2 JP2002198885A JP2002198885A JP3754401B2 JP 3754401 B2 JP3754401 B2 JP 3754401B2 JP 2002198885 A JP2002198885 A JP 2002198885A JP 2002198885 A JP2002198885 A JP 2002198885A JP 3754401 B2 JP3754401 B2 JP 3754401B2
Authority
JP
Japan
Prior art keywords
image
representative point
measurement
dimensional
deviation
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.)
Expired - Lifetime
Application number
JP2002198885A
Other languages
Japanese (ja)
Other versions
JP2004038884A (en
Inventor
正明 渡辺
雄二 泉水
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
AdIn Research Inc
Original Assignee
AdIn Research Inc
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 AdIn Research Inc filed Critical AdIn Research Inc
Priority to JP2002198885A priority Critical patent/JP3754401B2/en
Publication of JP2004038884A publication Critical patent/JP2004038884A/en
Application granted granted Critical
Publication of JP3754401B2 publication Critical patent/JP3754401B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、画像による検査システム及び識別システム、特に、良品画像と検査画像の比較による欠陥検出システム、及び、基準画像と比較画像の比較による対象識別システムにおいて、良品画像と検査画像の間、または、基準画像と比較画像の間に、歪みパターンが存在する場合の画像歪み補正方法に関する。
【0002】
【従来の技術】
従来の画像歪み補正手段としては、主にレンズの収差や透視投影効果による光学系歪みを、数式で表現して補正するという方法が知られている。この方法は、再現性があり数式表現が可能な対象については有効であるが、撮影対象の個体毎に違いがあるため再現性がない対象、或いは、不規則な歪みのため数式表現が不可能な対象については適応できない。
【0003】
再現性や規則性が無い画像歪みに関しては、画像を格子状に分割し各矩形内で2次元ずれ量を決定するという方法が取られている。しかしながら、画像中で位置ずれ計測に適した箇所は限定されているので、画像の矩形分割ではずれ計測点を設定できない場合が多い。
【0004】
画像の矩形分割ではうまくいかない場合、計測代表点を位置ずれ計測に適した箇所に不規則に配置し、各代表点の近傍毎または代表点で構成される三角形毎に補正を行う方法もある。しかしながら、代表点の設定そのものが難しく、上記のように位置ずれ計測に適した箇所が限定されているという制限は依然として存在する。更に、補正対象画像毎に歪みパターンが異なるため、事前に固定的な補正式または補正テーブルを準備することができず、一般に処理負荷が大きい。
【0005】
【発明が解決しようとする課題】
数式表現を用いる従来の画像歪み補正手段は、個体毎の違いがある対象、或いは、数式表現が不可能な対象には適応できない。
【0006】
例えば、柔軟性のある基材上に構成する電子回路基板では、加工中の基材の伸縮変形により不規則な歪みが発生する。また、ラインスキャンカメラで対象を撮影する場合には、搬送系の速度にムラがあると、撮影対象物が安定していても画像の伸縮となって現れ、画像歪みを引き起こす。
【0007】
これらの不規則な画像歪みに関しては、代表点で位置ずれを計測し各代表点の近傍毎に補正を行うか、代表点でのずれ量を補間して歪みパターンを決定することになる。しかしながら、2次元の位置ずれ計測に適した箇所は限定されているという問題もあり、代表点の設定は難しい作業である。また、毎回異なる歪みパターンのため、補正処理の演算量が大きくなるという問題もある。
【0008】
そこで、本発明は、位置ずれ計測に適切な箇所に代表点を自動的に配置することができ、代表点における位置ずれ量から画像全体でなめらかに変化する歪みパターンを、少ない処理時間で生成できる、画像歪み補正方法の提供を目的とする。
【0009】
代表点に関しては、各代表点で2次元の位置ずれ計測ができるのが望ましいが、現実には画像中に2次元計測に適切な箇所は少ない場合が多い。そこで、本発明は、2次元位置ずれ計測点の他に1次元位置ずれ計測点も配置できるような代表点自動配置を実現し、2次元位置ずれ計測点と1次元位置ずれ計測点の計測結果を組み合わせて、画像全体の歪みパターンを決定できる、画像歪み補正方法の提供を目的とする。
【0010】
従来の代表点における位置ずれ量から画像全体の歪みパターンを決定する手法は、検査画像または比較画像の一部の計測代表点に欠陥が発生したり、一部の計測代表点が異物で遮られたりして、ずれ計測に失敗すると歪みパターンを決定できない。そこで、本発明は、一部のずれ計測代表点で位置ずれ計測に失敗しても、失敗を検出し、周辺の計測点から、位置ずれ計測に失敗した計測代表点のずれ量を補填することができる、画像歪み補正方法の提供を目的とする。
【0011】
本発明は、さらに、上記画像歪み補正方法を実現する画像歪み補正装置の提供を目的とする。
【0012】
また、本発明は、上記画像歪み補正方法をコンピュータに実行させるための画像歪み補正プログラムの提供を目的とする。
【0013】
【課題を解決するための手段】
上記本発明の目的を達成するため、本発明の第1の局面によれば、基準画像に対する比較画像の歪みパターンを、対応する計測代表点でのパターンマッチングによって計測されたずれ量から補間処理により算出する、画像歪み補正方法が提供される。この画像歪み補正方法は、基準画像と比較画像の対応する計測代表点を設定し、更に、補正対象画像範囲の周辺に計測代表点以外の補助代表点を設定し、補助代表点でのずれ量を、近傍の計測代表点で計測されたずれ量から外挿により補填し、補正対象画像範囲の全領域を、補正対象画像範囲に設けられた計測代表点又は補助代表点を頂点とした3角形又は4角形にくまなく分割し、3角形又は4角形内でのずれ量を、当該3角形又は4角形の頂点に関連したずれ量から線形補間により算出する、ことを特徴とする画像歪み補正方法である。
【0014】
さらに、本発明の画像歪み補正方法において、
上記計測代表点として、画像内の2方向の2次元ずれ量を計測する2次元タイプと、縦方向の1次元ずれ量を計測する縦方向タイプと、横方向の1次元ずれ量を計測する横方向タイプと、右下がり斜め方向の1次元ずれ量を計測する右下がり斜め方向タイプと、右上がり斜め方向の1次元ずれ量を計測する右上がり斜め方向タイプのうちのいずれかの種別の計測代表点を設定し、
各種別の計測代表点でのずれ量を組み合わせて、画像全体での歪みパターンを決定する。
【0015】
さらに、本発明の画像歪み補正方法において、
計測代表点は、基準画像の局所領域の画像特徴に基づき、パターンマッチングに最適な位置と種別を決定し、自動的に配置される。
【0016】
さらに、本発明の画像歪み補正方法において、
計測代表点でのパターンマッチングの結果が所定の基準を満たすかどうかを判定し、
パターンマッチングの結果が所定の基準を満たさない計測代表点のずれ量を、当該計測代表点の近傍の計測代表点でのずれ量から補填し、
これにより、画像全体の歪みパターンを決定する。
【0017】
さらに、本発明の画像歪み補正方法において、
画像全体の歪みパターンは、画像の小領域毎の2次元ずれ量によって表現され、
画像の小領域毎に、小領域内の2次元ずれ量と、小領域の中心位置を囲む3角形の頂点に対応した計測代表点又は補助代表点の識別番号と、該3角形の頂点に対応した計測代表点又は補助代表点から該小領域のずれ量を算出するための補間係数と、を関連付けて保持している。計測代表点又は補助代表点の識別番号と補間係数は、計測代表点又は補助代表点の設定時に予め算出し設定することにより、補正実行時には計測代表点又は補助代表点のずれ量から、画像の小領域毎の2次元ずれ量を少ない演算量で算出できる。
【0018】
上記本発明の目的を達成するため、本発明の第1の局面によれば、基準画像と比較画像との歪みパターンを、計測代表点でのパターンマッチングによるずれ量計測結果から補間処理により算出する、画像歪み補正装置が提供される。本発明の画像歪み補正装置は、基準画像と比較画像の対応する計測代表点を設定し、更に、計測代表点に加え画像周辺と画像4隅に補助代表点を追加し補助代表点でのずれ量は近傍の計測代表点でのずれ量から外挿により補填したうえで、画像の全領域を計測代表点または補助代表点により構成される3角形によりくまなく分割し、3角形内のずれ量を3個の計測代表点のずれ量から線形補間により算出することを特徴とする。
【0019】
また、本発明の画像歪み補正装置は、上記計測代表点としては、2次元ずれ量を計測する2次元計測代表点と、縦方向のみ、横方向のみ、右下がり斜め方向のみ、右上がり斜め方向のみの1次元ずれ量を計測する4種類の1次元代表点を任意の個数設定し、各種別の代表点でのずれ量を組み合わせて、画像全体での歪みパターンを決定する。
【0020】
また、本発明の補正歪み補正装置は、上記計測代表点を、基準画像の局所領域の画像特徴に基づき、パターンマッチングに最適な位置と代表点種別を決定し、自動的に配置する。
【0021】
また、本発明の補正歪み補正装置は、上記代表点でのパターンマッチングが、基準画像と比較画像との画像特徴変化により失敗する場合に、基準画像と比較画像の代表点近傍における輝度値変動量の相違、または基準画像と比較画像の代表点のマッチング度合により失敗を検出し、パターンマッチングに失敗した代表点のずれ量を、該当代表点の近傍の1個ないし3個の計測代表点でのずれ量から補填したうえで、画像全体の歪みパターンを決定する。
【0022】
さらに、本発明の補正歪み補正装置において、上記歪みパターンは、画像全体を小矩形に分割したうえで、各矩形内の2次元ずれ量は一定値とするずれ量テーブルの形で保持し、画像中の任意の位置でのずれ量はテーブル参照により素早く参照できるとともに、ずれ量テーブルには、該当矩形の中心位置を囲む3個の代表点番号と代表点3点から各小矩形のずれ量を算出するための補間係数をずれ変換テーブルとして付随させ、代表点番号と補間係数は代表点設定時に算出しておき、補正実行時には代表点のずれ量からずれ量テーブルを少ない演算量で作成できる。
【0023】
【発明の実施の形態】
〔構成〕
本発明の第1実施例による画像歪み補正システムの構成を図1に示す。本発明の第1実施例による画像歪み補正システムは、画像歪み補正装置1と、画像取得部2と、操作指示部3と、結果表示部4と、結果蓄積部5と、を含む。画像歪み補正装置1は、外部の画像取得部2より受け取った基準画像または良品画像を用いて、位置ずれ計測に適切な箇所に計測代表点を配置する代表点配置処理部10と、代表点の位置ずれ量を画像の各位置でのずれ量に変換するテーブルを作成するずれ変換テーブル作成処理部20と、画像取得部2より受け取った比較画像または検査画像中の代表点での位置ずれを計測し計測失敗点のずれ量を補填した上でずれ量テーブルを作成する歪み計測処理部30とを含む。また、画像歪み補正装置1は、代表点配置データ41と、ずれ変換テーブル42と、ずれ量テーブル43を蓄える内部記憶部40が付随する。
【0024】
画像歪み補正装置1は、外部の操作指示部3より操作指示を受け付け、処理結果を外部の結果表示部4及び結果蓄積部5へ出力する。
【0025】
〔代表点配置処理部〕
図2は、本発明の第1実施例による代表点配置処理部の説明図である。歪みパターン決定のためにずれ量を計測する計測代表点としては、たとえば、直交する2方向のずれ量を計測する2次元計測点、並びに、縦方向のみの1方向のずれ量を計測する1次元計測点、横方向のみの1方向のずれ量を計測する1次元計測点、右下がり斜め方向のみの1方向のずれ量を計測する1次元計測点、及び、右上がり斜め方向のみの1方向のずれ量を計測する1次元計測点、の4種類の1次元計測点を用いる。代表点配置処理部10は、図2に示すように、評価画像作成部12と代表点位置決定部14から構成される。評価画像作成部12で、良品画像または基準画像の局所領域の画像特徴に基づき、2次元配置評価画像131と4種類の1次元配置評価画像、すなわち、縦方向1次元配置評価画像132、横方向1次元配置評価画像133、右下がり斜め方向1次元配置評価画像134及び右上がり斜め方向1次元配置評価画像135を作成する。これにより、たとえば、特定の局所的な画像特徴が存在する画素位置に高い評価点が与えられた画像が得られる。代表点位置決定部14は、画像の評価値の高い箇所に順次計測代表点を配置する。
【0026】
計測代表点を設定したら、ずれ量計測エリアの良品画像または基準画像を切り出し、位置ずれ計測テンプレートとして保存しておく。このときテンプレート画像の画素値の標準偏差も算出し保存する。また、各位置ずれ計測代表点は、想定されるずれ量に対応して探索範囲を設定しておく。代表点配置データ41には、代表点位置、位置ずれ計測テンプレート、探索範囲などが含まれる。 〔ずれ変換テーブル作成処理部〕
【0027】
ずれ変換テーブル42は、不規則に配置された計測代表点での2次元ずれ量を、画像を小さな矩形に分割した所定の小領域の2次元ずれ量に変換するためのテーブルである。各小領域内の2次元ずれ量は一定とする。ずれ変換テーブル42には、小矩形中心位置を囲む近傍3個の代表点番号と、小矩形中心位置のずれ量を3代表点のずれ量から補間で算出する際の補間係数を格納する。
【0028】
図3は、ずれ変換テーブル作成処理部20の説明図である。ずれ変換テーブル作成処理部20は、図3に示すように、補助代表点追加し(ステップ201)、画像全体を3角形に分割し(ステップ202)、テーブルを作成する(ステップ203)。
【0029】
画像全体は、3角形以外の任意の多角形で分割することができるが、任意の多角形は分割を重ねることによって最終的に3角形に分割することができる。そこで、本発明の実施例では、画像全体を3角形に分割した場合について説明する。また、以下の説明では、補正対象画像範囲は4角形であると仮定する。
【0030】
補助代表点追加ステップ201では、ずれ計測を行う計測代表点に加え、画像周辺と画像4隅に補助代表点を追加し、補助代表点でのずれ量は、計測代表点のずれ量から補填するものとする。画像全体3角形分割ステップ202では、画像全体を、3個の代表点(すなわち、計測代表点又は補助代表点)を頂点とする3角形で分割する。テーブル作成ステップ203では、各小領域中心を含む3角形を構成する3個の代表点を決定し、小領域中心のずれ量を3個の代表点から決定する補間演算のための補間係数を算出する。
【0031】
〔歪み計測処理部〕
歪み計測処理部30の動作は、計測代表点の種別の構成により異なる。計測代表点の種別には、画像内の2方向の2次元ずれ量を計測する2次元タイプと、縦方向の1次元ずれ量を計測する縦方向タイプと、横方向の1次元ずれ量を計測する横方向タイプと、右下がり斜め方向の1次元ずれ量を計測する右下がり斜め方向タイプと、右上がり斜め方向の1次元ずれ量を計測する右上がり斜め方向タイプがある。
【0032】
計測代表点がすべて2次元計測代表点である場合には、歪み計測処理部30は、基本歪み計測処理を実行する。図4は、本発明の第1実施例による歪み計測処理部30の基本ひずみ計測処理の説明図である。図4に示すように、基本歪み計測処理は、ずれ計測部31と、計測失敗ずれ量補填部32と、ずれ量テーブル作成部33とを含む。
【0033】
ずれ計測部31は、検査画像または比較画像の各ずれ計測代表点の近傍画像と、対応するテンプレートとのパターンマッチングを行い、ずれ量を計測する。
【0034】
図5は、本発明の第1実施例による計測失敗ずれ量補填部32の処理説明図である。計測失敗ずれ量補填部32は、良品画像または基準画像と、検査画像または比較画像の、計測代表点近傍画像の輝度値変動量の相違と、両画像をマッチングさせたときの合致の度合により失敗を検出する(ステップ321)。パターンマッチングに失敗した計測代表点のずれ量は、当該計測代表点の近傍3個の計測代表点でのずれ量から、ずれ変換テーブルと同等の方法で、補間により補填する(ステップ322)。
【0035】
ずれ量テーブル作成部33は、補助代表点でのずれ量を対応する計測代表点から補填し、ずれ変換テーブル42を用いて、各小矩形のずれ量を表わすずれ量テーブル43を作成する。
【0036】
図6は、本発明の第1実施例による2次元・1次元混在歪み計測処理の説明図である。
【0037】
画像に2次元計測代表点と1次元計測代表点の両方を設定した場合には、図6に示すように最初に2次元計測代表点のずれ量を計測し(ステップ301)、この2次元計測代表点のずれ量から歪みパターンを仮決定する(ステップ303)。この結果に基づいて、1次元計測代表点の位置を移動し(ステップ304)、移動先を基点とするパターンマッチングによるずれ計測を行う(ステップ305)。最後に、全計測点の計測結果をまとめて、ずれ量テーブルを作成する(ステップ306)。
【0038】
図7は、本発明の第1実施例による歪み計測処理部の1次元計測の歪み計測処理フロー図である。2次元計測代表点が無く1次元計測代表点のみを設定した場合には、図7に示すように最初に、一度全1次元計測代表点のずれ計測を行い(ステップ311)、所定回数に達したかどうかを判定し(ステップ313)、所定回数に達していない場合には、以下の処理を任意の回数繰り返す。1次元計測点の種別毎に、同一種別以外の1次元計測代表点のみで歪みパターンを仮決定し(ステップ315)、この結果に基づいて、この種別の1次元計測代表点の位置を移動し(ステップ316)、移動先を基点とするパターンマッチングによるずれ計測を行う(ステップ311)。最後に、全計測点の計測結果をまとめて、ずれ量テーブルを作成する(ステップ314)。
【0039】
このような本発明の第1実施例の画像歪み補正システムによれば、不規則性な画像歪みに関しても、自動的にずれ計測代表点を設定することができ、計測代表点設定時にずれ変換テーブルも作成するので、新たな検査画像または比較画像に対して、迅速に歪みパターンを決定し歪み補正処理を施すことができる。
【0040】
これにより、従来技術では、画像歪みのために難しかった、柔軟性のある基材上に構成する電子回路の外観検査や、搬送系の速度にムラがある状態でラインスキャンカメラを用いて撮影した画像に基づく検査や識別処理も、現実的に許容できる処理時間内で実現することができる。
【0041】
また、本発明の第1実施例の画像歪み補正システムによれば、2次元計測点と1次元計測点でのずれ情報を組み合わせて、画像全体の歪みパターンを決定できるので、画像中に2次元計測に適切な箇所が少ない場合でも、画像歪み計測を行うことができる。
【0042】
本発明の第1実施例の画像歪み補正システムによれば、検査画像または比較画像の計測代表点に欠陥が発生したり異物で遮られたりして、ずれ計測に失敗しても、失敗を検出し周辺の計測点からずれ量を補填する事ができ、欠陥や異物の影響を受けにくい、画像歪み計測を行うことができる。
【0043】
以下、本発明を柔軟性のある基材上に構成されたプリント基板パターン検査装置に適用した、本発明の第2実施例について説明する。
【0044】
図8は、本発明の第2実施例によるプリント基板パターン検査システムの概略構成図である。本実施例のプリント基板パターン検査システムは、パターン検査装置101と、カメラ102と、外部入力装置103と、外部出力装置104とを含む。外部入力装置103は、操作者から学習や検査の実施の指示を入力する。外部出力装置104は、処理装置の状態や検査結果を出力し、操作者に示す。カメラ102は、検査対象とするプリント基板パターンを撮影し、映像信号をパターン検査装置101に送信する。
【0045】
パターン検査装置101は、カメラ102による撮像を制御し、カメラ102からの映像信号をデジタル画像に変換するカメラ制御系105と、歪み補正処理系109及び検査処理系110を含む主処理系106と、内部記憶部40と、外部入力装置103及び外部出力装置104に接続された入出力制御系108とから構成されている。尚、単独の画像歪み補正装置の場合には、主処理系106は、歪み補正処理系109のみで構成されることになる。
【0046】
図9は、本発明の第2実施例によるプリント基板パターン検査システムのデータの流れを示すデータフロー図である。同図に示されるように、歪み補正処理系109には、本発明の第1実施例に関して説明した代表点配置処理部10と、ずれ変換テーブル作成処理部20と、歪み計測処理部30とが含まれている。
【0047】
カメラ102から取り込まれた映像信号は、カメラ制御系105を介して、画像データの形で歪み補正処理系109に供給される。歪み補正処理系109で処理された画像データ及びずれテーブルは、検査処理形110へ供給される。歪み補正処理系109で生成された歪み補正データは、内部記憶部40に格納される。
【0048】
歪み補正処理系109及び検査処理系110で生成された数値データ又は画像データは、入出力制御系108へ供給され、外部出力装置104を介してユーザへ提示される。或いは、ユーザからの入力データは、外部入力装置103から入出力制御系108を介して歪み補正処理系109や検査処理系110へ与えられる。
【0049】
代表点配置処理部10は、基準画像または良品画像を用いて、位置ずれ計測に適切な箇所に計測代表点を配置し、ずれ変換テーブル作成処理部20は、代表点の位置ずれ量を画像の各位置でのずれ量に変換するテーブルを作成し、歪み計測処理部30は、検査画像または比較画像中の代表点での位置ずれを計測し計測失敗点のずれ量を補填した上でずれ量テーブルを作成する。代表点配置データ及びずれ変換テーブルは、内部記憶部40に格納される。
【0050】
図10は、本発明の第2実施例によるパターン検査装置101における歪み補正処理系109の代表点配置処理部10の処理の流れを示す処理フロー図である。
【0051】
代表点配置処理部10は、良品プリント基板パターンをカメラで撮影し良品画像データを入力し(ステップ11)、良品画像の局所領域の特徴に基づき、代表点配置のための評価画像を作成する(ステップ12)。
【0052】
評価画像は、2次元計測点、および、縦方向のみ、横方向のみ、右下がり斜め方向のみ、右上がり斜め方向のみ、の4種類の1次元計測点に対応した5種類を作成する。図11には、本発明の第2実施例による評価画像作成処理のフロー図が示されている。
【0053】
1次元計測点の評価画像は、例えば、最初に、ずれ計測を行う方向に画像を微分し(ステップ21−1、21−2、21−3、又は、21−4)、次に、ずれ計測を行う方向と直交する方向に沿って、配置すべきエリアサイズ程度の大きさの積分長で積分する(ステップ22−1、22−2、22−3、又は、22−4)。このようにすると、計測方向に直交する方向に沿って、エッジがエリアサイズ程度続いている個所の評価値が高くなる。
【0054】
2次元計測点の評価画像は、2種類の直交する2方向の1次元計測点評価画像組(すなわち、縦方向と横方向の評価画像の組、及び、右下がり斜め方向と右上がり斜め方向の組)の最小値画像を作成し(ステップ23−1及び23−2)、最小値画像から最大値画像を作成する(ステップ24)。これにより、両方向についてエッジ成分を有する個所の評価値が高くなる。
【0055】
ここで、画像の組の最小値画像とは、最小値画像の画素位置(p)における値が画像の組の各画像の対応した画素位置(p)における値の最小値であるような画像である。また、画像の組の最大値画像とは、最大値画像のある画素位置(p)における値が画像の組の各画像の対応した画素位置(p)における値の最大値であるような画像である。4種類の1次元配置評価画像に対し、このような最小値画像化と最大値画像化を適用することによって、2次元配置評価画像が得られる。
【0056】
より詳細に説明すると、まず、4種類の1次元配置評価画像を対応した方向に微分し、次に、その方向に直交する方向に沿って積分する。例えば、縦方向1次元配置評価画像は、良品画像を縦方向に微分し、次に、横方向に積分して作成する。縦方向に微分(正確には微分して絶対値をとる)すると、横方向のエッジ部分の評価が高くなり、これを横方向に積分すると、そのエッジが横方向に連続している部分の評価が高くなる。
【0057】
次に、直交する2方向(縦方向と横方向、または、右上がり方向と右下がり方向)の最小値画像を作成する。このようにすると、例えば、縦方向と横方向の最小値をとる場合、縦方向にも横方向にもエッジが連続している個所のみ、評価が高くなる(縦にエッジがあり評価が高くても横にエッジが無く評価0だと、最小値画像は0になる)。
【0058】
最後に、「縦方向と横方向の最小値画像」と「右上がり方向と右下がり方向の最小値画像」の最大値画像を作成する。この最大値画像は、「縦方向と横方向の両方向にエッジがある」あるいは「右上がり方向と右下がり方向の両方向にエッジがある」個所の評価が高くなる。
【0059】
図12は、本発明の第2実施例による代表点配置処理のフロー図である。代表点配置は、事前に代表点エリアサイズ、ずれ探索範囲、配置間隔および評価値下限を設定し、最大評価位置探索を行う(ステップ31)。最大評価位置探索は、縦方向1次元配置評価画像、横方向1次元配置評価画像、右下がり斜め方向1次元配置評価画像、右上がり斜め方向1次元配置評価画像、及び、2次元配置評価画像の5種類の評価画像で、評価値が最大となる個所を探索する。得られた最大評価値が下限以上であれば(ステップ32)、その箇所を代表点として登録する(ステップ33)。代表点登録の際には、代表点位置とともに代表点エリアサイズとずれ量探索範囲も記録する。この代表点を1個配置したら、この点を中心とする半径が配置間隔である円形領域の評価値をすべて0にし(ステップ33)、ステップ31へ戻り、次の代表点探索を行う。そして、評価値の最大値が評価値下限未満になった場合(ステップ32)、代表点配置処理を終了する。
【0060】
5種類の評価画像を別々に評価せずに、各々に重み係数を乗じた上で、最大値画像を1個作成し、これだけを用いて配置を行うこともできる。この場合、重みにより2次元代表点と1次元代表点のどちらを多く配置するかをコントロールすることができる。
【0061】
図13は、本発明の第2実施例によるパターン検査装置における歪み補正処理系109のずれ変換テーブル作成処理部20の処理の流れを示す処理フロー図である。
【0062】
ステップ41において、例えば、計測代表点の個数の平方根程度の個数の補助代表点を画像周縁の各辺に追加する。配置方法としては、画像周縁の各辺について、当該辺の近くにある計測代表点から当該辺へ垂線を下ろした位置に補助代表点を配置する。この補助代表点のずれ量は、対応する計測代表点と同一にする。更に、画像の周縁の隅(たとえば、補正対象画像領域が4角形である場合には画像4隅)にも補助代表点を追加する。この画像の隅に配置された補助代表点のずれ量は、接続する両辺上に存在し、この隅に最も近い2個の補助代表点の平均とする。
【0063】
次に、画像全体を3角形でくまなく分割する(ステップ42)。図14は、この画像の3角形分割処理のフロー図である。画像の3角形分割は、例えば、始めに画像周辺の4辺に配置した補助計測点を結ぶ辺を確定する(ステップ51)。次に、画像周辺の辺に対して片側に3角形が生成され、画像内部の辺に対して両側に3角形が生成される、という完了条件が満たされるまで、未完了の辺を探索し(ステップ52)、ステップ53において、未完了の辺がある場合、ステップ54へ進み、未完了の辺に対応する頂点を探索し辺を生成し、探索が完了した場合、3角形分割処理を終了する。
【0064】
ステップ54では、1辺に対し1頂点を順次決定する。その際、着目している現在の辺との距離がなるべく近く、現在の辺の両側の内角がなるべく等しく、作成された三角形内に他の頂点が含まれず、辺同士が交差しない、との条件で順次頂点を決定し、辺を生成する(すなわち、3角形を決定する)。
【0065】
図15は、画像の3角形分割結果の例を示す図である。図15では、補助代表点を生成するために計測代表点から各辺に垂線を下ろす方向と、補助代表点におけるずれ量補填関係を矢印で示す。計測代表点に対応する補正エリアは実線で囲まれ、補助代表点に対応する補助エリアは点線で囲まれている。
【0066】
画像全体の歪みパターンは、画像を小矩形に分割した小矩形毎に対応したずれ量を収容するずれ量テーブルによって表現され、小矩形内のずれ量は一定とする。ずれ量テーブルには、各小矩形の中心が含まれる3角形を構成する代表点(計測代表点又は補助代表点)番号と、3個の代表点からずれ量を線形補間するための係数が関連付けられ、ずれ変換テーブルを形成する。
【0067】
図16は、本発明の第2実施例における3角形と小矩形中心の関係を説明する図である。ずれ量の線形補間は、同図に示されるように、3角形をABC、小矩形中心をP、APを通る直線とBCとの交点をQとし、
Aでのずれ量 (dxa,dya)
Bでのずれ量 (dxb,dyb)
Cでのずれ量 (dxc,dyc)
BQ:QC = t:(1−t)
AP:PQ = u:(1−u)
とすると、Pでのずれ量は、
dxp = dxa×(1−u)+(dxb×(1−t)+dxc×t)×u
dyp = dya×(1−u)+(dyb×(1−t)+dyc×t)×u
と表現することができる。
【0068】
3点による線形補間は、画像面をXY面、ずれをZ軸とした3次元空間を考えたとき、3角形内のずれ量分布を3点で構成される平面で表現することに相当する。また、補間係数は、計測点配置時に算出することができ、検査画像に対する歪み補正処理を行う際には、わずかの積和計算で補間演算が可能となる。従って、処理速度を増大させることなく、3点のずれ量情報を最も有効に利用できる手法である。
【0069】
図17は、本発明の第2実施例のプリント基板パターン検査システムにおける歪み補正処理系109の歪み計測処理部30の処理の流れを示す処理フロー図である。ここでは、5種類の計測代表点が全て設定された場合を想定している。 最初に2次元計測代表点のずれ量を正規化相関に基づくパターンマッチングにより計測し(ステップ61)、計測失敗代表点のずれ量補填処理を行い(ステップ62)、2次元計測代表点のみにより歪みパターンを仮決定する(ステップ63)。この結果に基づいて、1次元計測代表点の位置を移動し(ステップ64)、移動先を基点とするパターンマッチングによるずれ計測(ステップ65)と計測失敗代表点のずれ量補填処理(ステップ66)を行う。更に、1次元計測点の種別ごとに、同一種別以外の全計測代表点で歪みパターンを仮決定し(ステップ68)、この結果に基づいて該当種別1次元計測代表点の位置を移動し(ステップ59)、移動先を基点とするパターンマッチングによるずれ計測(ステップ65)と計測失敗代表点のずれ量補填処理(ステップ66)を行い、これを任意の回数繰り返す(ステップ67)。
【0070】
なお、計測失敗代表点のずれ量補填処理における失敗検出は、検査画像の最大マッチング位置での代表点対応エリア画像の標準偏差を算出し、これが算出済みの良品画像の標準偏差に比べて、一定比率以上小さければ失敗とする。また、最大マッチング位置での相関係数が一定値以下になった場合も失敗とする。失敗時補填処理は、失敗計測近傍で同一のずれ量テーブル作成に関わる3代表点を、ずれ変換テーブル作成部と同様の方法で事前に決めておき、この3点から線形補間により決定する。
【0071】
最後に、本発明の第3実施例による位置ずれと歪みを同時に補正する装置について説明する。図18は、本発明の第3実施例による位置ずれと歪みの分離計測と統合処理の説明図である。たとえば、本発明の第2実施例におけるパターン検査装置は、検査対象画像に画像全体の平行移動と回転による位置ずれがある一方で、局所歪み量が位置ずれ量に比べて小さい場合には、簡単な方法で位置ずれと歪みを同時に補正できる装置とすることができる。
【0072】
すなわち、図18に示すように、最初に、位置ずれ計測用の1次元計測点又は2次元計測点の位置ずれを計測し(ステップ71)、2個の1次元計測点または1個の2次元計測点による平行位置ずれ、あるいは、2個の2次元計測点による平行移動と回転の位置ずれを決定し、位置ずれテーブルを作成する(ステップ72)。そして、歪み補正用の計測代表点位置を移動し(ステップ73)、歪み量を計測する(ステップ74)。最後に、統合ずれテーブルに位置ずれと歪みずれの和を格納する(ステップ75)。このようにすると、歪み補正の探索範囲を小さくすることができ、ずれ量を1個のテーブルから参照することができるので、検査処理を高速化することが可能である。
【0073】
上記の本発明の実施例による画像歪み補正方法は、ソフトウェア(プログラム)で構築することが可能であり、コンピュータのCPUによってこのプログラムを実行することにより本発明の実施例による画像歪み補正装置を実現することができる。構築されたプログラムは、ディスク装置等に記録しておき必要に応じてコンピュータにインストールされ、フレキシブルディスク、メモリカード、CD−ROM等の可搬記録媒体に格納して必要に応じてコンピュータにインストールされ、或いは、通信回線等を介してコンピュータにインストールされ、コンピュータのCPUによって実行される。
【0074】
本発明は、上記の実施例に限定されることなく、特許請求の範囲内で各種変更および応用が可能である。
【0075】
【発明の効果】
本発明によれば、補正対象画像内に配置した計測代表点から、補正対象画像全体でなめらかに変化する歪みパターンを少ない処理時間で生成することができる。また、計測代表点は適切な箇所に自動的に配置することができ、画像内に2次元ずれ計測に適切な箇所が限定されている場合や、一部の計測代表点で計測に失敗しても歪み補正を行うことが可能になる。
【図面の簡単な説明】
【図1】本発明の第1実施例による画像歪み補正システムの構成図である。
【図2】本発明の第1実施例による代表点配置処理部の説明図である。
【図3】本発明の第1実施例によるずれ変換テーブル作成処理部の説明図である。
【図4】本発明の第1実施例による基本歪み計測処理の説明図である。
【図5】本発明の第1実施例による計測失敗ずれ量補填部の説明図である。
【図6】本発明の第1実施例による2次元・1次元混在歪み計測処理の説明図である。
【図7】本発明の第1実施例による1次元計測の歪み計測処理のフロー図である。
【図8】本発明の第2実施例によるプリント基板パターン検査システムの構成図である。
【図9】本発明の第2実施例によるプリント基板パターン検査システムのデータフロー図である。
【図10】本発明の第2実施例による代表点配置処理部の処理フロー図である。
【図11】本発明の第2実施例による評価画像作成処理のフロー図である。
【図12】本発明の第2実施例による代表点配置処理のフロー図である。
【図13】本発明の第2実施例によるずれ変換テーブル作成処理のフロー図である。
【図14】本発明の第2実施例による画像の3角形分割処理のフロー図である。
【図15】画像の3角形分割結果の例の説明図である。
【図16】本発明の第2実施例における3角形と小矩形中心の説明図である。
【図17】本発明の第2実施例による歪み計測処理のフロー図である。
【図18】本発明の第3実施例による位置ずれと歪みの分離計測及び統合処理の説明図である。
【符号の説明】
1 画像歪み補正装置
2 画像取得部
3 操作指示部
4 結果表示部
5 結果蓄積部
10 代表点配置処理部
11 代表点配置部
20 ずれ変換テーブル作成処理部
21 ずれ変換テーブル作成部
30 歪み計測処理部
31 代表点位置ずれ計測部
32 計測失敗ずれ量補填部
33 ずれ量テーブル作成部
40 内部記憶部
41 代表点配置データ
42 ずれ変換テーブル
43 ずれ量テーブル
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an inspection system and an identification system based on an image, in particular, a defect detection system based on a comparison between a non-defective image and an inspection image, and an object identification system based on a comparison between a reference image and a comparative image. The present invention relates to an image distortion correction method when a distortion pattern exists between a reference image and a comparison image.
[0002]
[Prior art]
As a conventional image distortion correction means, there is known a method of correcting an optical system distortion mainly due to a lens aberration or a perspective projection effect by expressing it with a mathematical expression. This method is effective for reproducible targets that can be expressed in mathematical formulas, but it is not possible to express mathematical formulas due to irregularities due to irregularities due to differences in individual subjects. It is not possible to adapt to a simple subject.
[0003]
For image distortion that does not have reproducibility or regularity, a method of dividing an image into a grid and determining a two-dimensional deviation amount in each rectangle is used. However, since the locations suitable for positional deviation measurement in the image are limited, there are many cases where deviation measurement points cannot be set by rectangular division of the image.
[0004]
When the rectangular division of the image does not work, there is a method in which measurement representative points are irregularly arranged at positions suitable for positional deviation measurement, and correction is performed for each triangle composed of the representative points in the vicinity of each representative point. However, it is difficult to set the representative point itself, and there is still a limitation that the portions suitable for the positional deviation measurement are limited as described above. Furthermore, since the distortion pattern differs for each correction target image, it is not possible to prepare a fixed correction formula or correction table in advance, and the processing load is generally large.
[0005]
[Problems to be solved by the invention]
The conventional image distortion correction means using mathematical expression cannot be applied to an object having individual differences or an object incapable of mathematical expression.
[0006]
For example, in an electronic circuit board configured on a flexible base material, irregular distortion occurs due to expansion and contraction of the base material being processed. Further, when shooting an object with a line scan camera, if the speed of the transport system is uneven, the image appears as an expansion / contraction of the image even if the shooting object is stable, causing image distortion.
[0007]
Regarding these irregular image distortions, a positional deviation is measured at the representative point and corrected for each neighborhood of the representative point, or a distortion pattern is determined by interpolating the deviation amount at the representative point. However, there is a problem that there are limited places suitable for two-dimensional positional deviation measurement, and setting of representative points is a difficult task. There is also a problem that the amount of calculation for correction processing increases because of different distortion patterns each time.
[0008]
Therefore, the present invention can automatically arrange representative points at positions suitable for misregistration measurement, and can generate a distortion pattern that smoothly changes from the misregistration amount at the representative points in the entire image in a short processing time. An object of the present invention is to provide an image distortion correction method.
[0009]
As for representative points, it is desirable to be able to measure a two-dimensional displacement at each representative point, but in reality, there are often few places suitable for two-dimensional measurement in an image. Accordingly, the present invention realizes representative point automatic placement that can place one-dimensional positional deviation measurement points in addition to two-dimensional positional deviation measurement points, and the measurement results of the two-dimensional positional deviation measurement points and the one-dimensional positional deviation measurement points. An object of the present invention is to provide an image distortion correction method capable of determining a distortion pattern of the entire image by combining the above.
[0010]
The conventional method for determining the distortion pattern of the entire image from the amount of misalignment at the representative point is that a defect occurs at some measurement representative points in the inspection image or comparison image, or some measurement representative points are blocked by foreign matter. If the displacement measurement fails, the distortion pattern cannot be determined. Therefore, the present invention detects a failure even if the position deviation measurement fails at some of the deviation measurement representative points, and compensates the deviation amount of the measurement representative point at which the position deviation measurement has failed from the surrounding measurement points. An object of the present invention is to provide a method for correcting image distortion.
[0011]
It is another object of the present invention to provide an image distortion correction apparatus that realizes the image distortion correction method.
[0012]
Another object of the present invention is to provide an image distortion correction program for causing a computer to execute the image distortion correction method.
[0013]
[Means for Solving the Problems]
In order to achieve the above object of the present invention, according to the first aspect of the present invention, the distortion pattern of the comparison image with respect to the reference image is interpolated from the deviation amount measured by pattern matching at the corresponding measurement representative point. An image distortion correction method for calculating is provided. This image distortion correction methodSet the measurement representative points corresponding to the reference image and the comparison image, andAn auxiliary representative point other than the measurement representative point is set around the correction target image range, and the amount of deviation at the auxiliary representative point is extrapolated from the amount of deviation measured at a nearby measurement representative point, and the correction target image range Are all divided into a triangle or a quadrangle having the measurement representative points or auxiliary representative points provided in the correction target image range as vertices, and the deviation amount in the triangle or the quadrangle is divided into the triangles. Alternatively, the image distortion correction method is characterized in that it is calculated by linear interpolation from a shift amount related to a vertex of a quadrangle.
[0014]
Furthermore, in the image distortion correction method of the present invention,
As the measurement representative points, a two-dimensional type that measures a two-dimensional deviation amount in two directions in an image, a vertical type that measures a one-dimensional deviation amount in a vertical direction, and a horizontal direction that measures a one-dimensional deviation amount in a horizontal direction. A measurement representative of any one of a direction type, a right-down diagonal direction type that measures a one-dimensional deviation amount in a right-down diagonal direction, and a right-up diagonal direction type that measures a one-dimensional deviation amount in a right-up diagonal direction Set the point
The distortion pattern in the entire image is determined by combining the deviation amounts at the measurement representative points of each type.
[0015]
Furthermore, in the image distortion correction method of the present invention,
The measurement representative points are automatically arranged based on the image characteristics of the local region of the reference image, determining the optimum position and type for pattern matching.
[0016]
Furthermore, in the image distortion correction method of the present invention,
Determine whether the result of pattern matching at the measurement representative point meets a predetermined standard,
The amount of deviation of the measurement representative point whose pattern matching result does not satisfy the predetermined standard is compensated from the amount of deviation at the measurement representative point near the measurement representative point,
Thereby, the distortion pattern of the whole image is determined.
[0017]
Furthermore, in the image distortion correction method of the present invention,
The distortion pattern of the entire image is expressed by a two-dimensional deviation amount for each small area of the image,
For each small area of the image, the two-dimensional deviation amount in the small area, the identification number of the measurement representative point or auxiliary representative point corresponding to the vertex of the triangle surrounding the center position of the small area, and the vertex of the triangle The interpolation coefficient for calculating the shift amount of the small area from the measured representative point or auxiliary representative point is held in association with each other. The identification number and interpolation coefficient of the measurement representative point or auxiliary representative point are calculated and set in advance when setting the measurement representative point or auxiliary representative point. The two-dimensional deviation amount for each small area can be calculated with a small amount of calculation.
[0018]
In order to achieve the object of the present invention, according to the first aspect of the present invention, a distortion pattern between a reference image and a comparative image is calculated by interpolation processing from a deviation amount measurement result by pattern matching at a measurement representative point. An image distortion correction apparatus is provided. The image distortion correction apparatus of the present invention isSet the measurement representative points corresponding to the reference image and the comparison image, andIn addition to the measurement representative points, auxiliary representative points are added to the periphery of the image and the four corners of the image. The present invention is characterized in that it is divided all over by a triangle composed of representative points or auxiliary representative points, and the deviation amount in the triangle is calculated from the deviation amounts of three measurement representative points by linear interpolation.
[0019]
In the image distortion correction apparatus of the present invention, the measurement representative point includes a two-dimensional measurement representative point for measuring a two-dimensional deviation amount, a vertical direction only, a horizontal direction only, a right-down diagonal direction, and a right-up diagonal direction. An arbitrary number of four types of one-dimensional representative points for measuring only one-dimensional deviation amounts are set, and deviation amounts at various representative points are combined to determine a distortion pattern in the entire image.
[0020]
Also, the correction distortion correction apparatus of the present invention determines the optimum position and representative point type for pattern matching based on the image features of the local region of the reference image and automatically arranges the measurement representative points.
[0021]
In addition, the correction distortion correction apparatus according to the present invention provides a luminance value fluctuation amount in the vicinity of the representative point of the reference image and the comparison image when the pattern matching at the representative point fails due to an image feature change between the reference image and the comparison image. The failure is detected based on the difference between the representative points of the reference image and the comparison image, and the amount of deviation of the representative points that failed the pattern matching is calculated at one to three measurement representative points near the corresponding representative point. After compensating for the shift amount, the distortion pattern of the entire image is determined.
[0022]
Furthermore, in the correction distortion correction apparatus of the present invention, the distortion pattern is held in the form of a deviation amount table in which the entire image is divided into small rectangles, and the two-dimensional deviation amount in each rectangle is a constant value. The amount of deviation at any of the positions can be quickly referred to by referring to the table, and the amount of deviation of each small rectangle from the three representative point numbers surrounding the center position of the rectangle and the three representative points is displayed in the amount of deviation table. An interpolation coefficient for calculation is attached as a deviation conversion table, the representative point number and the interpolation coefficient are calculated when the representative point is set, and the deviation amount table can be created with a small amount of calculation from the deviation amount of the representative point when correction is executed.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
〔Constitution〕
The configuration of the image distortion correction system according to the first embodiment of the present invention is shown in FIG. The image distortion correction system according to the first embodiment of the present invention includes an image distortion correction apparatus 1, an image acquisition unit 2, an operation instruction unit 3, a result display unit 4, and a result storage unit 5. The image distortion correction apparatus 1 uses a reference image or a non-defective image received from the external image acquisition unit 2 to arrange a representative point arrangement processing unit 10 that arranges measurement representative points at positions appropriate for positional deviation measurement, and a representative point A displacement conversion table creation processing unit 20 for creating a table for converting a displacement amount into a displacement amount at each position of the image, and a displacement at a representative point in the comparison image or inspection image received from the image acquisition unit 2 are measured. And a distortion measurement processing unit 30 that creates a deviation amount table after compensating for the deviation amount of the measurement failure point. In addition, the image distortion correction apparatus 1 is accompanied by an internal storage unit 40 that stores representative point arrangement data 41, a shift conversion table 42, and a shift amount table 43.
[0024]
The image distortion correction apparatus 1 receives an operation instruction from the external operation instruction unit 3 and outputs a processing result to the external result display unit 4 and the result storage unit 5.
[0025]
[Representative point arrangement processing section]
FIG. 2 is an explanatory diagram of the representative point arrangement processing unit according to the first embodiment of the present invention. As a measurement representative point for measuring a deviation amount for determining a distortion pattern, for example, a two-dimensional measurement point for measuring a deviation amount in two orthogonal directions and a one-dimensional measurement for a deviation amount in one direction only in the vertical direction. Measurement point, one-dimensional measurement point for measuring the amount of deviation in one direction only in the horizontal direction, one-dimensional measurement point for measuring the amount of deviation in one direction only in the downward-right diagonal direction, and one direction in only the upward-right diagonal direction Four types of one-dimensional measurement points, which are one-dimensional measurement points for measuring the deviation amount, are used. As shown in FIG. 2, the representative point arrangement processing unit 10 includes an evaluation image creation unit 12 and a representative point position determination unit 14. In the evaluation image creation unit 12, based on the image characteristics of the local area of the non-defective image or the reference image, the two-dimensional arrangement evaluation image 131 and four types of one-dimensional arrangement evaluation images, that is, the vertical one-dimensional arrangement evaluation image 132, the horizontal direction A one-dimensional arrangement evaluation image 133, a right-down diagonal direction one-dimensional arrangement evaluation image 134, and a right-up diagonal direction one-dimensional arrangement evaluation image 135 are created. Thereby, for example, an image in which a high evaluation score is given to a pixel position where a specific local image feature exists is obtained. The representative point position determination unit 14 sequentially arranges measurement representative points at locations where the evaluation value of the image is high.
[0026]
When the measurement representative point is set, a non-defective image or a reference image in the deviation amount measurement area is cut out and stored as a position deviation measurement template. At this time, the standard deviation of the pixel value of the template image is also calculated and stored. Each positional deviation measurement representative point sets a search range corresponding to an assumed deviation amount. The representative point arrangement data 41 includes a representative point position, a positional deviation measurement template, a search range, and the like. [Displacement conversion table creation processing section]
[0027]
The shift conversion table 42 is a table for converting a two-dimensional shift amount at irregularly arranged measurement representative points into a two-dimensional shift amount of a predetermined small region obtained by dividing an image into small rectangles. The two-dimensional deviation amount in each small area is assumed to be constant. The shift conversion table 42 stores three representative point numbers surrounding the small rectangular center position and an interpolation coefficient for calculating the shift amount of the small rectangular center position from the shift amount of the three representative points by interpolation.
[0028]
FIG. 3 is an explanatory diagram of the shift conversion table creation processing unit 20. As shown in FIG. 3, the shift conversion table creation processing unit 20 adds auxiliary representative points (step 201), divides the entire image into triangles (step 202), and creates a table (step 203).
[0029]
The entire image can be divided by any polygon other than the triangle, but any polygon can be finally divided into triangles by overlapping the division. Therefore, in the embodiment of the present invention, a case where the entire image is divided into triangles will be described. In the following description, it is assumed that the correction target image range is a quadrangle.
[0030]
In the auxiliary representative point adding step 201, auxiliary representative points are added to the periphery of the image and the four corners of the image in addition to the measurement representative points for measuring the deviation, and the deviation amount at the auxiliary representative points is compensated from the deviation amount of the measurement representative point. Shall. In the entire image triangle dividing step 202, the entire image is divided into triangles having three representative points (that is, measurement representative points or auxiliary representative points) as vertices. In table creation step 203, three representative points constituting a triangle including the center of each small region are determined, and an interpolation coefficient for an interpolation operation for determining a shift amount of the small region center from the three representative points is calculated. To do.
[0031]
[Strain measurement processing section]
The operation of the distortion measurement processing unit 30 differs depending on the configuration of the measurement representative point type. The types of measurement representative points are the two-dimensional type that measures the two-dimensional displacement in two directions in the image, the vertical type that measures the one-dimensional displacement in the vertical direction, and the one-dimensional displacement in the horizontal direction. There are a horizontal direction type, a right-down oblique direction type that measures a one-dimensional deviation amount in a right-down oblique direction, and a right-up oblique direction type that measures a one-dimensional deviation amount in a right-up oblique direction.
[0032]
When all the measurement representative points are two-dimensional measurement representative points, the strain measurement processing unit 30 executes basic strain measurement processing. FIG. 4 is an explanatory diagram of the basic strain measurement process of the strain measurement processing unit 30 according to the first embodiment of the present invention. As shown in FIG. 4, the basic distortion measurement process includes a deviation measurement unit 31, a measurement failure deviation amount compensation unit 32, and a deviation amount table creation unit 33.
[0033]
The deviation measurement unit 31 performs pattern matching between an image near each deviation measurement representative point of the inspection image or the comparison image and the corresponding template, and measures the deviation amount.
[0034]
FIG. 5 is a process explanatory diagram of the measurement failure deviation amount compensation unit 32 according to the first embodiment of the present invention. The measurement failure deviation amount compensation unit 32 fails due to a difference in luminance value fluctuation amount between the measurement representative point neighboring images of the non-defective image or the reference image and the inspection image or the comparison image, and the degree of matching when the two images are matched. Is detected (step 321). The deviation amount of the measurement representative point that has failed the pattern matching is compensated by interpolation using the same method as the deviation conversion table from the deviation amounts at the three measurement representative points in the vicinity of the measurement representative point (step 322).
[0035]
The deviation amount table creation unit 33 compensates the deviation amount at the auxiliary representative point from the corresponding measurement representative point, and creates a deviation amount table 43 representing the deviation amount of each small rectangle using the deviation conversion table 42.
[0036]
FIG. 6 is an explanatory diagram of a two-dimensional / one-dimensional mixed strain measurement process according to the first embodiment of the present invention.
[0037]
When both the two-dimensional measurement representative point and the one-dimensional measurement representative point are set in the image, the deviation amount of the two-dimensional measurement representative point is first measured as shown in FIG. 6 (step 301), and this two-dimensional measurement is performed. A distortion pattern is provisionally determined from the amount of deviation of the representative point (step 303). Based on this result, the position of the one-dimensional measurement representative point is moved (step 304), and deviation measurement is performed by pattern matching using the movement destination as a base point (step 305). Finally, the measurement results at all measurement points are collected and a deviation amount table is created (step 306).
[0038]
FIG. 7 is a distortion measurement processing flowchart of one-dimensional measurement of the distortion measurement processing unit according to the first embodiment of the present invention. When there is no two-dimensional measurement representative point and only the one-dimensional measurement representative point is set, as shown in FIG. 7, first, the deviation measurement of all the one-dimensional measurement representative points is performed once (step 311), and the predetermined number of times is reached. It is determined whether or not (step 313), and if the predetermined number of times has not been reached, the following processing is repeated an arbitrary number of times. For each type of one-dimensional measurement point, a distortion pattern is provisionally determined using only one-dimensional measurement representative points other than the same type (step 315), and based on this result, the position of this type of one-dimensional measurement representative point is moved. (Step 316), displacement measurement is performed by pattern matching using the movement destination as a base point (Step 311). Finally, the measurement results at all measurement points are collected and a deviation amount table is created (step 314).
[0039]
According to the image distortion correction system of the first embodiment of the present invention as described above, it is possible to automatically set a deviation measurement representative point even for irregular image distortion, and a deviation conversion table when setting the measurement representative point. Therefore, it is possible to quickly determine a distortion pattern and perform distortion correction processing on a new inspection image or comparison image.
[0040]
As a result, in the conventional technology, it was difficult due to image distortion, and the image was taken using a line scan camera in a state where there was unevenness in the appearance inspection of the electronic circuit configured on the flexible base material and the speed of the conveyance system. Inspection and identification processing based on images can also be realized within a processing time that is practically acceptable.
[0041]
Further, according to the image distortion correction system of the first embodiment of the present invention, since the distortion pattern of the entire image can be determined by combining the deviation information at the two-dimensional measurement point and the one-dimensional measurement point, Even when there are few places suitable for measurement, image distortion measurement can be performed.
[0042]
According to the image distortion correction system of the first embodiment of the present invention, even if the measurement representative point of the inspection image or the comparison image has a defect or is blocked by a foreign substance, the failure detection is detected. However, it is possible to compensate for the amount of deviation from the surrounding measurement points, and to perform image distortion measurement that is not easily affected by defects and foreign matter.
[0043]
Hereinafter, a second embodiment of the present invention in which the present invention is applied to a printed circuit board pattern inspection apparatus configured on a flexible base material will be described.
[0044]
FIG. 8 is a schematic configuration diagram of a printed circuit board pattern inspection system according to a second embodiment of the present invention. The printed circuit board pattern inspection system of this embodiment includes a pattern inspection apparatus 101, a camera 102, an external input device 103, and an external output device 104. The external input device 103 inputs an instruction to perform learning or inspection from the operator. The external output device 104 outputs the status of the processing device and the inspection result, and shows it to the operator. The camera 102 captures a printed circuit board pattern to be inspected and transmits a video signal to the pattern inspection apparatus 101.
[0045]
The pattern inspection apparatus 101 controls imaging by the camera 102, converts a video signal from the camera 102 into a digital image, a main processing system 106 including a distortion correction processing system 109 and an inspection processing system 110, The internal storage unit 40 includes an external input device 103 and an input / output control system 108 connected to the external output device 104. In the case of a single image distortion correction apparatus, the main processing system 106 is composed of only the distortion correction processing system 109.
[0046]
FIG. 9 is a data flow diagram showing a data flow of the printed circuit board pattern inspection system according to the second embodiment of the present invention. As shown in the figure, the distortion correction processing system 109 includes the representative point arrangement processing unit 10, the deviation conversion table creation processing unit 20, and the distortion measurement processing unit 30 described with respect to the first embodiment of the present invention. include.
[0047]
The video signal captured from the camera 102 is supplied to the distortion correction processing system 109 in the form of image data via the camera control system 105. The image data and the deviation table processed by the distortion correction processing system 109 are supplied to the inspection processing form 110. The distortion correction data generated by the distortion correction processing system 109 is stored in the internal storage unit 40.
[0048]
Numerical data or image data generated by the distortion correction processing system 109 and the inspection processing system 110 is supplied to the input / output control system 108 and presented to the user via the external output device 104. Alternatively, input data from the user is given from the external input device 103 to the distortion correction processing system 109 and the inspection processing system 110 via the input / output control system 108.
[0049]
The representative point arrangement processing unit 10 uses the reference image or the non-defective image to arrange the measurement representative points at a position appropriate for the positional deviation measurement, and the deviation conversion table creation processing unit 20 determines the positional deviation amount of the representative point of the image. A table to be converted into a deviation amount at each position is created, and the distortion measurement processing unit 30 measures a positional deviation at a representative point in the inspection image or the comparison image and compensates for the deviation amount at the measurement failure point, and then the deviation amount. Create a table. The representative point arrangement data and the deviation conversion table are stored in the internal storage unit 40.
[0050]
FIG. 10 is a process flowchart showing a process flow of the representative point arrangement processing unit 10 of the distortion correction processing system 109 in the pattern inspection apparatus 101 according to the second embodiment of the present invention.
[0051]
The representative point arrangement processing unit 10 captures a non-defective printed circuit board pattern with a camera, inputs non-defective image data (step 11), and creates an evaluation image for representative point arrangement based on the characteristics of the local region of the non-defective product image ( Step 12).
[0052]
Five types of evaluation images corresponding to four types of one-dimensional measurement points, that is, two-dimensional measurement points, that is, only in the vertical direction, only in the horizontal direction, only in the diagonally downward direction, and only in the diagonally upward direction, are created. FIG. 11 shows a flowchart of an evaluation image creation process according to the second embodiment of the present invention.
[0053]
For the evaluation image of the one-dimensional measurement point, for example, first, the image is differentiated in the direction in which the deviation measurement is performed (steps 21-1, 21-2, 21-3, or 21-4), and then the deviation measurement is performed. Integration is performed with an integration length that is about the size of the area to be arranged along the direction orthogonal to the direction of performing (steps 22-1, 22-2, 22-3, or 22-4). In this way, the evaluation value of the portion where the edge continues about the area size along the direction orthogonal to the measurement direction becomes high.
[0054]
Two-dimensional measurement point evaluation images include two types of orthogonal two-dimensional one-dimensional measurement point evaluation image sets (that is, a set of vertical and horizontal evaluation images, and a right-down diagonal direction and a right-up diagonal direction). Set) minimum value images are created (steps 23-1 and 23-2), and a maximum value image is created from the minimum value images (step 24). Thereby, the evaluation value of the part which has an edge component about both directions becomes high.
[0055]
Here, the minimum value image of the set of images is an image in which the value at the pixel position (p) of the minimum value image is the minimum value of the values at the corresponding pixel position (p) of each image of the set of images. is there. The maximum value image of the set of images is an image in which the value at a pixel position (p) of the maximum value image is the maximum value at the corresponding pixel position (p) of each image of the set of images. is there. By applying such minimum value imaging and maximum value imaging to four types of one-dimensional layout evaluation images, a two-dimensional layout evaluation image can be obtained.
[0056]
More specifically, first, four types of one-dimensional arrangement evaluation images are differentiated in corresponding directions, and then integrated along a direction orthogonal to the directions. For example, a vertical one-dimensional layout evaluation image is created by differentiating a non-defective image in the vertical direction and then integrating in the horizontal direction. Differentiating in the vertical direction (more precisely, taking the absolute value by differentiating) increases the evaluation of the edge part in the horizontal direction, and integrating this in the horizontal direction evaluates the part where the edge is continuous in the horizontal direction. Becomes higher.
[0057]
Next, minimum value images in two orthogonal directions (vertical direction and horizontal direction, or upward and downward direction) are created. In this way, for example, when taking the minimum value in the vertical direction and the horizontal direction, the evaluation is high only at the portion where the edge is continuous in both the vertical direction and the horizontal direction (the evaluation is high because there is an edge in the vertical direction). If there is no side edge and the evaluation is 0, the minimum value image is 0).
[0058]
Finally, maximum value images of “minimum value images in the vertical and horizontal directions” and “minimum value images in the upward and downward directions” are created. This maximum value image has a high evaluation of “there are edges in both the vertical direction and the horizontal direction” or “the edges are in both the upward and downward directions”.
[0059]
FIG. 12 is a flowchart of representative point arrangement processing according to the second embodiment of the present invention. For representative point arrangement, a representative point area size, a shift search range, an arrangement interval, and an evaluation value lower limit are set in advance, and a maximum evaluation position search is performed (step 31). The maximum evaluation position search includes a vertical one-dimensional layout evaluation image, a horizontal one-dimensional layout evaluation image, a right-down diagonal direction one-dimensional layout evaluation image, a right-up diagonal direction one-dimensional layout evaluation image, and a two-dimensional layout evaluation image. A location where the evaluation value is maximized is searched with five types of evaluation images. If the obtained maximum evaluation value is greater than or equal to the lower limit (step 32), the location is registered as a representative point (step 33). When registering the representative point, the representative point area size and the shift amount search range are recorded together with the representative point position. When one representative point is arranged, all the evaluation values of the circular area whose radius is the arrangement interval around this point are all set to 0 (step 33), and the process returns to step 31 to search for the next representative point. When the maximum evaluation value is less than the lower limit of the evaluation value (step 32), the representative point arrangement process is terminated.
[0060]
Instead of evaluating the five types of evaluation images separately, each can be multiplied by a weighting factor, and one maximum value image can be created and used alone for placement. In this case, it is possible to control which of the two-dimensional representative points and the one-dimensional representative points are arranged more by the weight.
[0061]
FIG. 13 is a process flow diagram showing a process flow of the shift conversion table creation processing unit 20 of the distortion correction processing system 109 in the pattern inspection apparatus according to the second embodiment of the present invention.
[0062]
In step 41, for example, about the square root of the number of measurement representative pointsNumberAn auxiliary representative point is added to each side of the image periphery. As an arrangement method, for each side of the image periphery,Near the edgeAn auxiliary representative point is arranged at a position where a perpendicular is dropped from the measurement representative point to the corresponding side. The amount of deviation of this auxiliary representative point is the same as the corresponding measurement representative point. Furthermore, auxiliary representative points are also added to the corners of the periphery of the image (for example, the four corners of the image when the correction target image region is a quadrangle). The shift amount of the auxiliary representative points arranged at the corners of the image is the average of the two auxiliary representative points that are present on both sides to be connected and are closest to the corners.
[0063]
Next, the entire image is divided into triangles (step 42). FIG. 14 is a flowchart of this image triangulation process. In the triangular division of the image, for example, first, the side connecting the auxiliary measurement points arranged on the four sides around the image is determined (step 51). Next, an incomplete edge is searched until a completion condition that a triangle is generated on one side with respect to the edges around the image and a triangle is generated on both sides with respect to the edges inside the image is satisfied ( In step 52), if there is an incomplete edge in step 53, the process proceeds to step 54, a vertex corresponding to the incomplete edge is searched for to generate an edge, and if the search is completed, the triangle dividing process is terminated. .
[0064]
In step 54, one vertex is sequentially determined for one side. At this time, the condition that the distance to the current side of interest is as close as possible, the interior angles on both sides of the current side are as equal as possible, no other vertices are included in the created triangle, and the sides do not intersect To determine the vertices sequentially and generate edges (ie, determine the triangle).
[0065]
FIG. 15 is a diagram illustrating an example of a triangular division result of an image. In FIG. 15, the direction in which a perpendicular is drawn from the measurement representative point to each side in order to generate the auxiliary representative point, and the shift amount compensation relationship at the auxiliary representative point are indicated by arrows. The correction area corresponding to the measurement representative point is surrounded by a solid line, and the auxiliary area corresponding to the auxiliary representative point is surrounded by a dotted line.
[0066]
The distortion pattern of the entire image is represented by a deviation amount table that accommodates a deviation amount corresponding to each small rectangle obtained by dividing the image into small rectangles, and the deviation amount in the small rectangle is constant. The deviation amount table associates the representative point (measurement representative point or auxiliary representative point) number constituting the triangle including the center of each small rectangle with the coefficient for linearly interpolating the deviation amount from the three representative points. The shift conversion table is formed.
[0067]
FIG. 16 is a diagram for explaining the relationship between the triangle and the center of the small rectangle in the second embodiment of the present invention. As shown in the figure, the linear interpolation of the deviation amount is defined as ABC for the triangle, P for the center of the small rectangle, Q for the intersection of the straight line passing through AP and BC,
Amount of deviation at A (dxa, dya)
Deviation amount at B (dxb, dyb)
Deviation amount at C (dxc, dyc)
BQ: QC = t: (1−t)
AP: PQ = u: (1−u)
Then, the deviation amount at P is
dxp = dxa x (1-u) + (dxb x (1-t) + dxc x t) x u
dyp = dya × (1−u) + (dyb × (1−t) + dyc × t) × u
It can be expressed as
[0068]
Linear interpolation by three points corresponds to expressing a deviation amount distribution in a triangle by a plane composed of three points when considering a three-dimensional space in which an image plane is an XY plane and a deviation is a Z axis. In addition, the interpolation coefficient can be calculated at the time of measurement point arrangement, and when performing distortion correction processing on an inspection image, interpolation calculation can be performed with a slight product-sum calculation. Therefore, this is a method that can most effectively utilize the deviation information of the three points without increasing the processing speed.
[0069]
FIG. 17 is a process flow diagram showing a process flow of the distortion measurement processing unit 30 of the distortion correction processing system 109 in the printed circuit board pattern inspection system according to the second embodiment of the present invention. Here, it is assumed that all five types of measurement representative points are set. First, the deviation amount of the two-dimensional measurement representative point is measured by pattern matching based on the normalized correlation (step 61), and the deviation amount compensation process of the measurement failure representative point is performed (step 62). A pattern is provisionally determined (step 63). Based on this result, the position of the one-dimensional measurement representative point is moved (step 64), deviation measurement by pattern matching using the movement destination as a base point (step 65), and deviation amount compensation processing of the measurement failure representative point (step 66). I do. Further, for each type of one-dimensional measurement point, a distortion pattern is provisionally determined at all measurement representative points other than the same type (step 68), and the position of the corresponding one-dimensional measurement representative point is moved based on the result (step 68). 59) Deviation measurement by pattern matching using the movement destination as a base point (step 65) and deviation amount compensation processing of the measurement failure representative point (step 66) are performed, and this is repeated an arbitrary number of times (step 67).
[0070]
In addition, the failure detection in the measurement failure representative point deviation amount compensation process calculates the standard deviation of the representative point corresponding area image at the maximum matching position of the inspection image, and this is constant compared to the standard deviation of the calculated good product image. If it is smaller than the ratio, it is considered as a failure. A failure also occurs when the correlation coefficient at the maximum matching position falls below a certain value. In the failure compensation process, three representative points related to the creation of the same deviation amount table in the vicinity of the failure measurement are determined in advance by the same method as the deviation conversion table creation unit, and are determined from these three points by linear interpolation.
[0071]
Finally, an apparatus for simultaneously correcting misalignment and distortion according to a third embodiment of the present invention will be described. FIG. 18 is an explanatory diagram of the positional deviation and distortion separation measurement and integration processing according to the third embodiment of the present invention. For example, the pattern inspection apparatus according to the second embodiment of the present invention is simple when the image to be inspected is misaligned due to translation and rotation of the entire image, but the local distortion amount is smaller than the misalignment amount. It is possible to provide a device that can simultaneously correct misalignment and distortion by a simple method.
[0072]
That is, as shown in FIG. 18, first, the positional deviation of the one-dimensional measuring point or the two-dimensional measuring point for measuring the positional deviation is measured (step 71), two one-dimensional measuring points or one two-dimensional A parallel position shift due to the measurement points or a parallel shift and rotation position shift between the two two-dimensional measurement points is determined, and a position shift table is created (step 72). Then, the measurement representative point position for distortion correction is moved (step 73), and the distortion amount is measured (step 74). Finally, the sum of positional deviation and distortion deviation is stored in the integrated deviation table (step 75). In this way, the search range for distortion correction can be reduced, and the shift amount can be referred to from a single table, so that the inspection process can be speeded up.
[0073]
The image distortion correction method according to the embodiment of the present invention can be constructed by software (program), and the image distortion correction apparatus according to the embodiment of the present invention is realized by executing this program by the CPU of the computer. can do. The built program is recorded in a disk device or the like and installed in a computer as necessary, and stored in a portable recording medium such as a flexible disk, a memory card, or a CD-ROM, and installed in the computer as needed. Alternatively, it is installed in a computer via a communication line or the like and executed by the CPU of the computer.
[0074]
The present invention is not limited to the above-described embodiments, and various modifications and applications can be made within the scope of the claims.
[0075]
【The invention's effect】
  According to the present invention,A distortion pattern that smoothly changes in the entire correction target image can be generated from the measurement representative points arranged in the correction target image in a short processing time.. In addition, measurement representative points can be automatically placed at appropriate locations,Distortion correction can be performed when a location suitable for two-dimensional deviation measurement is limited in the image, or even if measurement fails at some measurement representative points.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of an image distortion correction system according to a first embodiment of the present invention.
FIG. 2 is an explanatory diagram of a representative point arrangement processing unit according to the first embodiment of the present invention.
FIG. 3 is an explanatory diagram of a shift conversion table creation processing unit according to the first embodiment of the present invention.
FIG. 4 is an explanatory diagram of basic distortion measurement processing according to the first embodiment of the present invention.
FIG. 5 is an explanatory diagram of a measurement failure deviation amount compensation unit according to the first embodiment of the present invention.
FIG. 6 is an explanatory diagram of a two-dimensional / one-dimensional mixed strain measurement process according to the first embodiment of the present invention.
FIG. 7 is a flowchart of one-dimensional distortion measurement processing according to the first embodiment of the present invention.
FIG. 8 is a configuration diagram of a printed circuit board pattern inspection system according to a second embodiment of the present invention.
FIG. 9 is a data flow diagram of a printed circuit board pattern inspection system according to a second embodiment of the present invention.
FIG. 10 is a process flow diagram of a representative point arrangement processing unit according to the second embodiment of the present invention.
FIG. 11 is a flowchart of an evaluation image creation process according to the second embodiment of the present invention.
FIG. 12 is a flowchart of representative point arrangement processing according to the second embodiment of the present invention.
FIG. 13 is a flowchart of a shift conversion table creation process according to the second embodiment of the present invention.
FIG. 14 is a flowchart of image triangle division processing according to the second embodiment of the present invention;
FIG. 15 is an explanatory diagram of an example of a triangular division result of an image.
FIG. 16 is an explanatory diagram of a triangle and a center of a small rectangle in the second embodiment of the present invention.
FIG. 17 is a flowchart of distortion measurement processing according to the second embodiment of the present invention.
FIG. 18 is an explanatory diagram of the positional deviation and distortion separation measurement and integration processing according to the third embodiment of the present invention.
[Explanation of symbols]
1 Image distortion correction device
2 Image acquisition unit
3 Operation instruction section
4 results display
5 result accumulation part
10 Representative point placement processing section
11 Representative point placement section
20 Deviation conversion table creation processing section
21 Deviation conversion table creation section
30 Strain measurement processing unit
31 Representative point position measurement unit
32 Measurement failure deviation compensation unit
33 Deviation table creation unit
40 Internal storage
41 Representative point arrangement data
42 Deviation conversion table
43 Deviation table

Claims (15)

基準画像に対する比較画像の歪みパターンを、対応する計測代表点でのパターンマッチングによって計測されたずれ量から補間処理により算出する、画像歪み補正方法であって、
基準画像と比較画像の対応する計測代表点を設定し、更に
補正対象画像範囲の周辺に前記計測代表点以外の補助代表点を設定し、
補助代表点でのずれ量を、近傍の計測代表点で計測されたずれ量から外挿により補填し、
補正対象画像範囲の全領域を、補正対象画像範囲に設けられた計測代表点又は補助代表点を頂点とした3角形又は4角形にくまなく分割し、
3角形又は4角形内でのずれ量を、該3角形又は4角形の頂点に関連したずれ量から線形補間により算出する、
ことを特徴とする画像歪み補正方法。
An image distortion correction method for calculating a distortion pattern of a comparison image with respect to a reference image by interpolation processing from a deviation amount measured by pattern matching at a corresponding measurement representative point,
Set the corresponding measurement representative points of the reference image and the comparative image, further wherein the set of auxiliary representative points other than the measurement representative points around the correction target image area,
The amount of deviation at the auxiliary representative point is extrapolated from the amount of deviation measured at the nearby measurement representative point,
Dividing the entire region of the correction target image range into a triangle or a quadrangle with the measurement representative points or auxiliary representative points provided in the correction target image range as vertices;
The amount of deviation within the triangle or quadrangle is calculated by linear interpolation from the amount of deviation associated with the apex of the triangle or quadrangle.
An image distortion correction method characterized by the above.
計測代表点として、画像内の2方向の2次元ずれ量を計測する2次元タイプと、縦方向の1次元ずれ量を計測する縦方向タイプと、横方向の1次元ずれ量を計測する横方向タイプと、右下がり斜め方向の1次元ずれ量を計測する右下がり斜め方向タイプと、右上がり斜め方向の1次元ずれ量を計測する右上がり斜め方向タイプのうちのいずれかの種別の計測代表点を設定し、
各種別の計測代表点でのずれ量を組み合わせて、画像全体での歪みパターンを決定する、
請求項1記載の画像歪み補正方法。
As measurement representative points, a two-dimensional type that measures a two-dimensional displacement amount in two directions in an image, a vertical type that measures a one-dimensional displacement amount in a vertical direction, and a horizontal direction that measures a one-dimensional displacement amount in a horizontal direction. Measurement representative point of any of the following types: a right-down diagonal direction type that measures the one-dimensional deviation amount in the right-down diagonal direction and a right-up diagonal direction type that measures the one-dimensional deviation amount in the right-up diagonal direction Set
Combine the amount of deviation at each type of measurement representative point to determine the distortion pattern in the entire image,
The image distortion correction method according to claim 1.
計測代表点は、基準画像の局所領域の画像特徴に基づいて位置と種別が決定される、請求項1又は2記載の画像歪み補正方法。  The image distortion correction method according to claim 1, wherein the measurement representative point is determined in position and type based on an image feature of a local region of the reference image. 計測代表点でのパターンマッチングの結果が所定の基準を満たすかどうかを判定し、
パターンマッチングの結果が所定の基準を満たさない計測代表点のずれ量を、該計測代表点の近傍の計測代表点でのずれ量から補填する、
請求項1乃至3のうちいずれか一項記載の画像歪み補正方法。
Determine whether the result of pattern matching at the measurement representative point meets a predetermined standard,
The amount of deviation of the measurement representative point whose pattern matching result does not satisfy the predetermined standard is compensated from the amount of deviation at the measurement representative point near the measurement representative point.
The image distortion correction method according to claim 1.
画像全体の歪みパターンは、画像の小領域毎の2次元ずれ量によって表現され、
画像の小領域毎に、小領域内の2次元ずれ量と、小領域の中心位置を囲む3角形又は4角形の頂点に対応した計測代表点又は補助代表点の識別番号と、該3角形又は4角形の頂点に対応した計測代表点又は補助代表点から該小領域のずれ量を算出するための補間係数と、を関連付けて保持している、
請求項1乃至4のうちいずれか一項記載の画像歪み補正方法。
The distortion pattern of the entire image is expressed by a two-dimensional deviation amount for each small area of the image,
For each small area of the image, the two-dimensional deviation amount in the small area, the identification number of the measurement representative point or auxiliary representative point corresponding to the apex of the triangle or quadrangle surrounding the center position of the small area, the triangle or An interpolation coefficient for calculating the amount of deviation of the small area from the measurement representative point or auxiliary representative point corresponding to the vertex of the quadrangle,
The image distortion correction method according to claim 1.
基準画像と比較画像との歪みパターンを、計測代表点でのパターンマッチングによるずれ量計測結果から補間処理により算出する、画像歪み補正装置であって、
基準画像と比較画像の対応する計測代表点を設定し、更に、
補正対象画像範囲の周辺に計測代表点以外の補助代表点を設定し、補助代表点でのずれ量を、近傍の計測代表点で計測されたずれ量から外挿により補填する手段と、
補正対象画像範囲の全領域を、補正対象画像範囲に設けられた計測代表点又は補助代表点を頂点とした3角形又は4角形にくまなく分割する手段と、
3角形又は4角形内でのずれ量を、該3角形又は4角形の頂点に関連したずれ量から線形補間により算出する手段と、
を有することを特徴とする画像歪み補正装置。
An image distortion correction apparatus for calculating a distortion pattern between a reference image and a comparison image by interpolation processing from a deviation amount measurement result by pattern matching at a measurement representative point,
Set the measurement representative points corresponding to the reference image and the comparison image, and
Means for setting an auxiliary representative point other than the measurement representative point around the correction target image range, and extrapolating the deviation amount at the auxiliary representative point from the deviation amount measured at the nearby measurement representative point;
Means for dividing the entire region of the correction target image range into a triangle or a quadrangle with the measurement representative points or auxiliary representative points provided in the correction target image range as vertices;
Means for calculating a deviation amount in the triangle or the quadrangle by linear interpolation from a deviation amount related to the vertex of the triangle or the quadrangle;
An image distortion correction apparatus comprising:
2次元ずれ量を計測する2次元計測代表点、縦方向のみの1次元ずれ量を計測する第1の1次元計測代表点、横方向のみの1次元ずれ量を計測する第2の1次元計測代表点、右下がり斜め方向のみの1次元ずれ量を計測する第3の1次元計測代表点、及び、右上がり斜め方向のみの1次元ずれ量を計測する第4の1次元計測代表点のうちのいずれかの種別の計測代表点を設定する手段と、
各種別の計測代表点でのずれ量を組み合わせて、画像全体での歪みパターンを決定する手段と、
を更に有する請求項6記載の画像歪み補正装置。
A two-dimensional measurement representative point for measuring a two-dimensional deviation amount, a first one-dimensional measurement representative point for measuring a one-dimensional deviation amount only in the vertical direction, and a second one-dimensional measurement for measuring a one-dimensional deviation amount only in the horizontal direction. Of the representative point, the third one-dimensional measurement representative point that measures the one-dimensional deviation amount only in the diagonally downward direction, and the fourth one-dimensional measurement representative point that measures the one-dimensional deviation amount only in the diagonally upward direction Means for setting one of the types of measurement representative points,
Means for determining the distortion pattern in the entire image by combining the amount of deviation at each type of measurement representative point;
The image distortion correction apparatus according to claim 6, further comprising:
上記いずれかの種別の計測代表点を設定する手段は、基準画像の局所領域の画像特徴に基づいて、パターンマッチングに最適な計測代表点の位置と種別を決定し配置する、
請求項7記載の画像歪み補正装置。
The means for setting any type of measurement representative point determines and arranges the position and type of the measurement representative point optimal for pattern matching based on the image characteristics of the local region of the reference image.
The image distortion correction apparatus according to claim 7.
計測代表点でのパターンマッチングの結果が所定の基準を満たすかどうかを判定する手段と、
パターンマッチングの結果が所定の基準を満たさない計測代表点のずれ量を、該計測代表点の 近傍の別の計測代表点でのずれ量から補填する手段と、
を更に有する請求項6乃至8のうちいずれか一項記載の画像歪み補正装置。
Means for determining whether the result of pattern matching at the measurement representative point satisfies a predetermined criterion;
Means for compensating the deviation amount of the measurement representative point whose pattern matching result does not satisfy the predetermined standard from the deviation amount at another measurement representative point in the vicinity of the measurement representative point;
The image distortion correction apparatus according to claim 6, further comprising:
画像の小領域毎に、画像全体の歪みパターンを表現する小領域内の2次元ずれ量と、
小領域の中心位置を囲む3角形又は4角形の頂点に対応した計測代表点又は補助代表点の識別番号と、
当該3角形又は4角形の頂点に対応した計測代表点又は補助代表点から該小領域のずれ量を算出するための補間係数と、
を関連付けて保持する記憶手段を更に有する請求項6乃至9のうちいずれか一項記載の画像歪み補正装置。
For each small area of the image, a two-dimensional deviation amount in the small area representing the distortion pattern of the entire image,
An identification number of a measurement representative point or auxiliary representative point corresponding to a vertex of a triangle or a quadrangle surrounding the center position of the small area;
An interpolation coefficient for calculating the shift amount of the small region from the measurement representative point or auxiliary representative point corresponding to the triangle or the apex of the quadrangle;
The image distortion correction apparatus according to claim 6, further comprising a storage unit that stores the information in association with each other.
基準画像に対する比較画像の歪みパターンを、対応する計測代表点でのパターンマッチングによって計測されたずれ量から補間処理により算出する、画像歪み補正プログラムであって、
基準画像と比較画像の対応する計測代表点を設定し、更に
補正対象画像範囲の周辺に、計測代表点以外の補助代表点を設定する機能と、
補助代表点でのずれ量を、近傍の計測代表点で計測されたずれ量から外挿により補填する機能と、
補正対象画像範囲の全領域を、補正対象画像範囲に設けられた計測代表点又は補助代表点を頂点とした3角形又は4角形にくまなく分割する機能と、
3角形又は4角形内でのずれ量を、該3角形又は4角形の頂点に関連したずれ量から線形補間により算出する機能と、
をコンピュータに実現させるための画像歪み補正プログラム。
An image distortion correction program for calculating a distortion pattern of a comparison image with respect to a reference image by interpolation processing from a deviation amount measured by pattern matching at a corresponding measurement representative point,
A function for setting a measurement representative point corresponding to the reference image and the comparison image, and further setting an auxiliary representative point other than the measurement representative point around the correction target image range;
A function of extrapolating the amount of deviation at the auxiliary representative point from the amount of deviation measured at a nearby measurement representative point;
A function to divide the entire area of the correction target image range into a triangle or a quadrangle with the measurement representative points or auxiliary representative points provided in the correction target image range as vertices;
A function of calculating a deviation amount in a triangle or a quadrangle by linear interpolation from a deviation amount related to the apex of the triangle or the quadrangle;
An image distortion correction program for realizing a computer.
計測代表点として、画像内の2方向の2次元ずれ量を計測する2次元タイプと、縦方向の1次元ずれ量を計測する縦方向タイプと、横方向の1次元ずれ量を計測する横方向タイプと、右下がり斜め方向の1次元ずれ量を計測する右下がり斜め方向タイプと、右上がり斜め方向の1次元ずれ量を計測する右上がり斜め方向タイプのうちのいずれかの種別の計測代表点を設定する機能と、
各種別の計測代表点でのずれ量を組み合わせて、画像全体での歪みパターンを決定する機能と、
を更にコンピュータに実現させるための請求項11記載の画像歪み補正プログラム。
As measurement representative points, a two-dimensional type that measures a two-dimensional displacement amount in two directions in an image, a vertical type that measures a one-dimensional displacement amount in a vertical direction, and a horizontal direction that measures a one-dimensional displacement amount in a horizontal direction. Measurement representative point of any of the following types: a right-down diagonal direction type that measures the one-dimensional deviation amount in the right-down diagonal direction and a right-up diagonal direction type that measures the one-dimensional deviation amount in the right-up diagonal direction A function to set
A function that determines the distortion pattern in the entire image by combining the amount of deviation at each type of measurement representative point,
The image distortion correction program according to claim 11, further causing the computer to realize the above.
基準画像の局所領域の画像特徴に基づいて計測代表点の位置と種別を決定する機能を更にコンピュータに実現させるための請求項10又は12記載の画像歪み補正プログラム。  The image distortion correction program according to claim 10 or 12, further causing a computer to realize a function of determining a position and type of a measurement representative point based on an image feature of a local region of a reference image. 計測代表点でのパターンマッチングの結果が所定の基準を満たすかどうかを判定する機能と、
パターンマッチングの結果が所定の基準を満たさない計測代表点のずれ量を、該計測代表点の近傍の計測代表点でのずれ量から補填する機能と、
を更にコンピュータに実現させるための請求項11乃至13のうちいずれか一項記載の画像歪み補正プログラム。
A function for determining whether the result of pattern matching at the measurement representative point satisfies a predetermined standard;
A function of compensating the deviation amount of the measurement representative point whose pattern matching result does not satisfy the predetermined standard from the deviation amount at the measurement representative point in the vicinity of the measurement representative point;
14. The image distortion correction program according to claim 11, wherein the image distortion correction program is further implemented by a computer.
画像の小領域毎に、画像全体の歪みパターンを表現する小領域内の2次元ずれ量と、
小領域の中心位置を囲む3角形又は4角形の頂点に対応した計測代表点又は補助代表点の識別番号と、該3角形又は4角形の頂点に対応した計測代表点又は補助代表点から該小領域のずれ量を算出するための補間係数と、を関連付けて保持する機能と、
を更にコンピュータに実現させるための請求項10乃至14のうちいずれか一項記載の画像歪み補正プログラム。
For each small area of the image, a two-dimensional deviation amount in the small area representing the distortion pattern of the entire image,
The identification number of the measurement representative point or auxiliary representative point corresponding to the vertex of the triangle or quadrangle surrounding the center position of the small area, and the measurement representative point or auxiliary representative point corresponding to the vertex of the triangle or quadrilateral A function of associating and holding an interpolation coefficient for calculating a shift amount of a region;
15. The image distortion correction program according to claim 10, further comprising:
JP2002198885A 2002-07-08 2002-07-08 Image distortion correction method, image distortion correction apparatus and image distortion correction program based on representative point measurement Expired - Lifetime JP3754401B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002198885A JP3754401B2 (en) 2002-07-08 2002-07-08 Image distortion correction method, image distortion correction apparatus and image distortion correction program based on representative point measurement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002198885A JP3754401B2 (en) 2002-07-08 2002-07-08 Image distortion correction method, image distortion correction apparatus and image distortion correction program based on representative point measurement

Publications (2)

Publication Number Publication Date
JP2004038884A JP2004038884A (en) 2004-02-05
JP3754401B2 true JP3754401B2 (en) 2006-03-15

Family

ID=31706213

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002198885A Expired - Lifetime JP3754401B2 (en) 2002-07-08 2002-07-08 Image distortion correction method, image distortion correction apparatus and image distortion correction program based on representative point measurement

Country Status (1)

Country Link
JP (1) JP3754401B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1754200B1 (en) * 2004-05-28 2017-07-12 Koninklijke Philips N.V. A method, a computer program, an apparatus and an imaging system for image processing
JP5603720B2 (en) * 2010-09-13 2014-10-08 新日本工機株式会社 Inspection image generation method, image inspection method using the same, and appearance inspection apparatus
JP2013234976A (en) * 2012-05-11 2013-11-21 Hioki Ee Corp External appearance inspection device and external appearance inspection method
KR101444259B1 (en) * 2013-09-12 2014-10-30 주식회사 고영테크놀러지 Method for generating a compensation matrix during a circuit board inspection
JP2015059875A (en) * 2013-09-20 2015-03-30 日置電機株式会社 Device for generating inspection result display data, inspection result display device, substrate inspection system, and method for generating inspection result display data
JP6468415B2 (en) * 2013-10-16 2019-02-13 富士ゼロックス株式会社 Image processing apparatus and image processing program
JP6328443B2 (en) * 2014-02-24 2018-05-23 国立研究開発法人宇宙航空研究開発機構 Method for preventing misperception caused by parallax by correcting viewpoint position of camera image and system for implementing the same
JP7047725B2 (en) * 2018-11-27 2022-04-05 オムロン株式会社 Inspection system, inspection method and program

Also Published As

Publication number Publication date
JP2004038884A (en) 2004-02-05

Similar Documents

Publication Publication Date Title
JP4951496B2 (en) Image generation method and image generation apparatus
EP2916535B1 (en) Image processing device, image processing method, and program
JP2007525770A (en) Technology to form a single image from multiple overlapping images
JP2007036482A (en) Information projection display and program
JP2001069433A (en) Image projector, image projection method, and computer- readable recording medium recording program to allow computer to execute the method
JP3754401B2 (en) Image distortion correction method, image distortion correction apparatus and image distortion correction program based on representative point measurement
US20140313224A1 (en) Image processing device and method, and program
US20050053304A1 (en) Method and device for the correction of a scanned image
JPWO2006006525A1 (en) Image processing apparatus and method
KR101689964B1 (en) Data amending apparatus, drawing apparatus, inspecting apparatus, data amending method, drawing method, inspecting method and recording medium storing a program
JP2004536300A5 (en)
JP2013192240A (en) Projector, program, information storage medium, and trapezoidal distortion correction method
EP4001931B1 (en) Electromagnetic environment analysis system, electromagnetic environment analysis method, and program
JP2010177832A (en) Image processing apparatus and image processing method
CN115684012A (en) Visual inspection system, calibration method, device and readable storage medium
JP3381129B2 (en) Observation area setting method and apparatus, and appearance inspection method and apparatus using the observation area setting method
JP2006338167A (en) Image data creation method
JP2004220371A (en) Image processing method, image processor, image processing program, and recording medium recorded with image processing program
JP2001041725A (en) Shape measurement device
JP2961140B2 (en) Image processing method
JPH10320565A (en) Image processing method and device therefor
JP2003510568A (en) LCD inspection method and LCD inspection apparatus by pattern comparison
CN114049260B (en) Image splicing method, device and equipment
US20220114710A1 (en) Image correction device
CN111860136B (en) Package positioning method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050304

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050308

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050428

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050719

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050826

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20051122

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051215

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3754401

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20081222

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20091222

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20091222

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101222

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20101222

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111222

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20111222

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20121222

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20121222

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20131222

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term