JP3627249B2 - Image processing device - Google Patents
Image processing device Download PDFInfo
- Publication number
- JP3627249B2 JP3627249B2 JP31487093A JP31487093A JP3627249B2 JP 3627249 B2 JP3627249 B2 JP 3627249B2 JP 31487093 A JP31487093 A JP 31487093A JP 31487093 A JP31487093 A JP 31487093A JP 3627249 B2 JP3627249 B2 JP 3627249B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- partial
- reference image
- partial region
- cross
- 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 - Fee Related
Links
Images
Landscapes
- Image Processing (AREA)
- Closed-Circuit Television Systems (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Description
【0001】
【産業上の利用分野】
本発明は、検査対象物を撮像して得た画像について特徴的な部分領域として設定した基準画像との一致度を求め、一致度の高い部分領域を基準として座標変換を行なうことで、検査対象物の画像の位置を補正するようにした画像処理装置に関するものである。
【0002】
【従来の技術】
従来より、検査対象物についてTVカメラのような撮像装置によって撮像した画像に基づいて、検査対象物の表面の傷などの欠陥を検査する技術が知られている。ところで、検査対象物と撮像装置との相対的な位置関係は、検査対象物ごとに異なるのが普通であるから、撮像装置に規定された座標系において、検査対象物の画像の位置は検査対象物ごとに異なることになる。このように、規定の座標系内での検査対象物の画像の位置が異なっていると、同条件での欠陥検査ができず、欠陥部分を正確に抽出できないという問題が生じる。
【0003】
そこで、検査対象物の画像に座標変換を施して位置を補正し、どの検査対象物についても同じ条件で欠陥検査を行なうようにすることが考えられている。すなわち、位置の補正には次のような処理を行なっている。まず、基準となる対象物について撮像装置によって撮像した画像のうち、位置補正に適すると考えられる特徴的な部分領域を人の判断によって抽出して基準画像とする。ここにおいて、特徴的な部分領域というのは、部分領域内での変化が比較的多い部分領域のことであって、たとえば、検査対象物の角部分を含む部分領域や変化の多い曲線部分を含むような部分領域になる。次に、検査対象物について基準画像とのパターンマッチングを行ない、基準画像との一致度の高い部分領域を求める。規定の座標系における基準画像の座標位置は既知であるから、検査対象物について基準画像との一致度が高かった部分領域の座標位置を基準画像の座標位置に一致させるように座標変換を行なえば、すべての検査対象物の画像を同じ座標位置で扱うことができるようになるのである。
【0004】
【発明が解決しようとする課題】
上述した従来技術では、基準画像を抽出するにあたって、人の判断によって基準画像に適したと考えられる部分領域を選択しているのであって、基準画像の抽出には個人差が生じて再現性が低くなるという問題があり、また再現性を高めるには経験的な判断が必要になるという問題がある。
【0005】
本発明は上記問題点の解決を目的とするものであり、基準画像を自動的に抽出するようにして人による基準画像の設定作用を不要とし、基準画像を自動的に登録することができる画像処理装置を提供しようとするものである。
【0006】
【課題を解決するための手段】
請求項1の発明は、上記目的を達成するために、検査対象物を撮像装置により撮像した画像のうちの特徴的な部分領域であって画像内での座標位置が既知である基準画像を設定する基準画像設定手段と、検査対象物の画像の各部分領域について基準画像との一致度を求め一致度の高い部分領域を抽出する照合手段と、検査対象物の画像のうち基準画像との一致度が高い部分領域を基準として基準画像の画像内での座標位置に対応するように検査対象物の画像について座標変換を行なう位置補正手段とを備えた画像処理装置において、基準画像設定手段は、基準となる対象物を撮像装置により撮像した画像について一定の大きさの部分領域ごとに自己相関値を求める基準画像候補抽出部と、自己相関値が第1の閾値を越える第1の部分領域について第1の部分領域を各方向に規定の画素数分だけ偏移させて各方向にそれぞれ設定した第2の部分領域との相互相関値を求め、相互相関値が第2の閾値以下であるときに第1の部分領域の画像を基準画像とする基準画像検証部とを具備することを特徴とする。
【0007】
請求項2の発明は、請求項1の発明において、光軸が互いに略平行であってそれぞれ検査対象物の一部分を撮像領域とする複数台の撮像装置を備え、少なくとも2台の撮像装置において画像内の縦方向の変化が大きい部分領域と横方向の変化が大きい部分領域が求められる場合に基準画像設定手段により基準画像を各部分領域ごとに設定し、位置補正手段は検査対象物の画像の位置座標を各基準画像の設定に用いた各部分領域での変化が大きい各一方向について各基準画像の位置座標に一致させるように座標変換することを特徴とする。
【0008】
請求項3の発明は、請求項1の発明において、基準となる対象物の画像内で部分領域を順に走査し、各位置において第1の部分領域の近傍で第1の部分領域に対して互いに異なる方向に離れた複数個の第2の部分領域を設定して、各第2の部分領域と第1の部分領域との相互相関値を求め、すべての方向の第2の部分領域について相互相関値が第2の閾値以下になる第1の部分領域を基準画像とすることを特徴とする。
【0009】
請求項4の発明は、請求項1の発明において、基準となる対象物の画像内で部分領域を順に走査し、すべての部分領域について自己相関値を求めた後に、自己相関値の大きいほうから順に第1の部分領域の近傍で第1の部分領域に対して互いに異なる方向に離れた複数個の第2の部分領域を設定して、各第2の部分領域と第1の部分領域との相互相関値を求め、すべての方向の第2の部分領域について相互相関値が第2の閾値以下になる第1の部分領域を基準画像とすることを特徴とする。
【0010】
請求項5の発明は、請求項1の発明において、基準となる対象物の画像内の適宜の部分領域について画像の複雑度を求め、画像が複雑であって複雑度が規定値を越えるときには、基準となる対象物の画像内で部分領域を順に走査し、各位置において第1の部分領域の近傍で第1の部分領域に対して互いに異なる方向に離れた複数個の第2の部分領域を設定して、各第2の部分領域と第1の部分領域との相互相関値を求め、すべての方向の第2の部分領域について相互相関値が第2の閾値以下になる第1の部分領域を基準画像とし、画像が単純であって複雑度が規定値以下であるときには、基準となる対象物の画像内で部分領域を順に走査し、すべての部分領域について自己相関値を求めた後に、自己相関値の大きいほうから順に第1の部分領域の近傍で第1の部分領域に対して互いに異なる方向に離れた複数個の第2の部分領域を設定して、各第2の部分領域と第1の部分領域との相互相関値を求め、すべての方向の第2の部分領域について相互相関値が第2の閾値以下になる第1の部分領域を基準画像とすることを特徴とする。
【0011】
【作用】
請求項1の発明の構成によれば、基準の対象物の画像について一定の大きさの部分領域ごとに自己相関値を求め、自己相関値の高い第1の部分領域、すなわち比較的変化が多い部分領域を基準画像の候補として抽出し、さらに、これらの候補のうちで第1の部分領域を各方向に規定の画素数分だけ偏移させて各方向にそれぞれ設定した第2の部分領域との相互相関値が小さい部分領域、すなわち周囲の形状との差が大きい第1の部分領域を基準画像とするのである。このように、自己相関値によって基準画像の候補を求め、相互相関値によって候補が基準画像として適切か否かを検証するから、基準画像を自動的かつ再現性よく抽出することができるのである。
【0012】
請求項2の発明の構成によれば、複数台の撮像装置を用いるとともに各撮像装置ごとに基準画像を設定し、各撮像装置に対応して設定した基準画像を複合的に用いて検査対象物の画像の位置を補正するので、1つの検査対象物について複数個の基準画像を総合して位置補正を行なうことになり、結果的に位置補正の精度を高めることができる。
【0013】
請求項3の発明の構成によれば、基準の対象物の画像内で第1の部分領域を走査し、第1の部分領域の各位置ごとに基準画像の候補か否かを判定し、候補となる第1の部分領域について基準画像として適正か否かを検証するから、比較的複雑な形状の対象物であれば、適切な基準画像を短時間で決定できるのである。
請求項4の発明の構成によれば、基準の対象物の画像内で第1の部分領域をすべて走査して自己相関値を求めた後に、自己相関値の大きい第1の部分領域から順に基準画像か否かを判定し、候補となる第1の部分領域について基準画像として適正か否かを検証するから、比較的単純な形状の対象物の場合に最適な基準画像を決定できることになる。
【0014】
請求項5の発明の構成によれば、適宜位置の部分領域について複雑度を求め、複雑な画像であれば請求項3の方法によって基準画像を求め、単純な画像であれば請求項4の方法によって基準画像を求めるのであって、複雑な画像では第1の部分領域を順次走査する過程で基準画像を求めることによって、比較的よい基準画像を短時間で設定することができ、また単純な画像では第1の部分領域を走査する過程では基準画像を見つけにくいが、全領域について第1の部分領域の自己相関値を求めた後に自己相関値の大きい順に基準画像として適しているか否かを検証するから、最適な基準画像を比較的短時間で見つけることができる。
【0015】
【実施例】
(実施例1)
本実施例は、基準画像を抽出する技術を要旨とするものであって、抽出された基準画像を用いて検査対象物について位置補正を行なう技術については、従来の技術で説明した通りであるから、以下の説明では主として要旨となる部分について説明する。
【0016】
図1(a)に示すように、基準となる対象物1は撮像装置としてのCCD等を用いたTVカメラ2により撮像される。TVカメラ2より出力される画像信号はアナログ−ディジタル変換器3によりディジタル信号に変換された後、画像メモリ4に格納される。ここにおいて、TVカメラ2により得る画像は一般には白黒の濃淡画像であるが、検査対象物と基準画像とについて色情報も用いて一致度を判定するような場合には、カラー画像を用いるようにしてもよい。
【0017】
画像メモリ4に画像が格納されると、基準画像候補抽出部5は次のような手順の処理を行なう。まず、画像メモリ4に格納された画像に対して、図1(b)に示すように、一定の大きさの部分領域D0 をラスタ走査し、各部分領域D0 ごとに自己相関値を求める。図1(b)において矢印は部分領域D0 の走査方向を示している。ここにおいて、ラスタ走査の際の部分領域D0 の1回の移動量は、1画素もしくは規定の複数画素の間隔になる。また、全領域を等分割した部分領域D0 を形成し、各部分領域D0 を順に走査するようにしてもよい。基準画像候補抽出部5では自己相関値について閾値が設定されており、自己相関値が閾値を越えるときには、その部分領域D0 の中での変化が大きく特徴的な部分領域D1 (第1の部分領域)であって基準画像の候補になると判断する。
【0018】
上述のようにして基準画像の候補となる部分領域D1 が見つかると、基準画像検証部6では、部分領域D1 について上下、左右、斜めの8方向について部分領域D1 を規定の画素数分だけ偏移させた部分領域D2 (第2の部分領域)を設定する。基準画像検証部6では、両部分領域D1 ,D2 について相互相関値を求める。ここで、両部分領域D1 ,D2 の類似度(すなわち、相互相関値)が小さいほど基準画像として適していることになるから、各方向に設定したすべての部分領域D2 について相互相関値が規定の閾値以下であるときには、部分領域D1 を基準画像として用いてよいことが検証されるのである。ここにおいて、部分領域D2 のうちの1つでも相互相関値が規定の閾値を越えている場合には、基準画像としては不適と判断し、基準画像候補抽出部5によって求めた次の候補について同様の処理を行なう。このようにして、基準画像の候補を求めた後に検証を行なって基準画像となる部分領域D1 を確定すると、基準画像となる部分領域D1 をその部分領域D1 の代表点の座標位置とともに基準画像メモリ7に格納し、検査対象物との照合に用いるのである。すなわち、基準画像候補抽出部5と基準画像検証部6と基準画像メモリ7とによって、基準画像設定手段が構成されるのであって、上述した手順により人手によらず基準画像を自動的に決定することができるのである。しかも、基準画像の決定には一定法則を適用しているから、基準画像の再現性が高いのである。
【0019】
ところで、上述のような処理によって全領域について部分領域D0 を走査しても基準画像を確定できない場合がある。その場合には、基準画像候補抽出部5もしくは基準画像検証部6において、基準画像となる部分領域D1 が存在しない旨の報知信号を出力する。この報知信号によって、適切な基準画像が得られなかったことを知らせることができるのである。
【0020】
上述した、アナログ−ディジタル変換器3、画像メモリ4、基準画像候補抽出部5、基準画像検証部6、基準画像メモリ7は、図2に示すように、コンピュータ装置よりなる画像処理装置10を構成する。画像処理装置10には、撮像装置となるTVカメラ2が接続され、またマウスのようなポインティングデバイスやキーボードなどの入力装置11、および画像を表示するCRTのようなモニタ装置12が接続される。さらに、画像処理装置10には、上述のような手順によって決定され基準画像メモリ7に格納された基準画像と検査対象物についてTVカメラ2で撮像した画像とを比較して一致度を求める照合手段と、照合手段によって基準画像との一致度の高い部分領域が求められると基準画像の座標位置とその部分領域の座標位置との差に基づいて座標変換を行なう位置補正手段とが設けられている。照合手段では、基準画像の候補を求めるときと同様に、一定の大きさの部分領域をラスタ走査して周知のパターンマッチング法を用いて基準画像との一致度を求め、一致度を数値化して閾値と比較し、一致度が高ければ基準画像に対応する部分領域と判断するのである。ここで、検査対象物の画像について基準画像とは平行移動しか生じないことが確定している場合には、基準画像を代表する1点と検査対象物から抽出した部分画像の対応する1点との座標位置の差によって座標系を平行移動させればよく、また、回転移動を含む場合には2点以上の座標位置の差によって座標変換を行なえばよい。
【0021】
(実施例2)
実施例1では1台のTVカメラ2を用いていたが、本実施例では、図3に示すように、TVカメラ2a〜2dを4台用いた例を示す。各TVカメラ2a〜2dは光軸が互いに平行かつ一定の間隔で離れるように1つの保持部材13に取り付けられている。また、対象物からの各TVカメラ2a〜2dの距離は等しくなるように設定してあり、各TVカメラ2a〜2dでは1つの対象物の互いに異なる部分を撮像するようになっている。各TVカメラ2a〜2dについて、実施例1のTVカメラ2と同様の手順で各TVカメラ2a〜2dごとに基準画像が求められる。
【0022】
いま、各TVカメラ2a〜2dに対応した画像Ia〜Idが、図4に示すようになっているものとする。すなわち、TVカメラ2a,2dに対応する画像Ia,Idには特徴的な基準画像が存在せず、TVカメラ2b,2cに対応する画像Ib,Icにはそれぞれ横方向の変化が大きい部分領域D11および縦方向の変化が大きい部分領域D12が求められるものとする。このような場合には、横方向の位置補正をTVカメラ2bの画像Ibに基づいて行ない、縦方向の位置補正をTVカメラ2cの画像Icに基づいて行なうようにするのである。ここで、1つの画像Ib,Icについて位置補正を行なえば、他の画像Ia〜Idについても同様に位置補正を行なう。また、縦横両方向について変化が大きいような部分領域を検出した場合には、その画像での座標変換を他の画像にも適用して位置補正を行なうようにする。また、基準画像を求める際には、基準画像の候補について検証条件を満たすものが見つかればその時点の部分領域を基準画像とするか、各TVカメラ2a〜2dの撮像領域の中でもっとも特徴的な部分領域を基準画像とするかは適宜選択される。他の構成は実施例1と同様である。
【0023】
(実施利3)
本実施例では、図5に示すような手順で基準画像を求める例を示す。すなわち、実施例2の構成について、TVカメラ2a〜2dの撮像領域にX−Y平面を形成する直交座標系を設定し、相互相関値を求めるための部分領域D2 は、部分領域D1 に対してX軸方向およびY軸方向の正負両側と、X軸に対して45度および135度で交差する2本の直線上の正負両側との合計8方向についてずらして設定される。この場合、X軸方向について変化が少なくY軸方向には変化が大きいような部分領域D1 では、X軸方向にずらした部分領域D2 との相互相関値は大きく、Y軸方向にずらした部分領域D2 との相互相関値は小さくなる。したがって、各部分領域D1 に対応して設定したすべての部分領域D2 について相互相関値が大きくなるような部分領域D1 を基準画像として選択することができれば、X軸方向とY軸方向との位置補正を一度でできることになり、このような基準画像を選択するのが望ましいことになる。
【0024】
いま、部分領域D0 は64個で全領域を埋めることができるように設定してあるものとして、図5の手順を説明する。まず、第1のTVカメラ2aによって撮像した画像を基準画像設定手段に転送する(S1)。この画像について部分領域D0 ごとに自己相関値を求め(S3)、第1の閾値を越えている部分領域D1 であれば(S4)、上述のように部分領域D1 の近傍に設定した部分領域D2 とのパターンマッチングを行なう(S5)。このパターンマッチングは相互相関値を用いて評価し、相互相関値がX軸方向とY軸方向とについてともに第2の閾値以下であれば(S6)、2方向についての位置補正用の基準画像として採用する(S7)。また、ステップS6での条件が満たされなくてもX軸方向とY軸方向とのいずれか一方について第2の閾値以下であれば(S8)、そのデータを保留しておく(S9)。自己相関値が第1の閾値を越えない場合(S4)、相互相関値がどの方向についても第2の閾値以下にならない場合(S8)、データを保留した後(S9)のいずれの場合についても、次の部分領域D1 について上記処理を行なう。
【0025】
部分領域D1 は64個設定されているから、上記処理を64回行なうまでに(S2)、適切な基準画像が決定されていない場合には、1方向について相互相関値が第2の閾値以下になったデータが保留されているか否かを判定し(S10)、保留されていればその方向についての補正を行ない(S11)、保留されていなければ補正を行なわずに(S12)第1のTVカメラ2aについての処理を終了する。ここにおいて、2方向に補正できる場合は3、X軸方向のみの補正では2、Y軸方向の補正のみでは1、補正なしでは0などのコードを与えるようにしてもよい。
【0026】
第1のTVカメラ2aについて基準画像が見つかった場合には、他のTVカメラ2b〜2dについては第1のTVカメラ2aの基準画像による位置補正を適用できるから、他のTVカメラ2b〜2dで得た画像については位置の補正量のみを指示する。また、基準画像が見つからずに処理が終了したときには、第2のTVカメラ2b以降の各TVカメラ2b〜2dについて同様の処理を行なうのである。
【0027】
以上のような処理によって、対象物の画像について部分領域D0 を順に走査して自己相関値が第1の閾値を越えるか否かを判定し、第1の閾値を越える部分領域D1 については、部分領域D2 を設定して基準画像となるか否かを検証するのである。したがって、部分領域D0 を走査する過程で、1つでも基準画像となる部分領域D1 が見つかれば基準画像として採用するのであって、このようにして求めた基準画像は最適な基準画像ではないかも知れないが、短時間で見つけることができることになる。他の構成は実施例2と同様である。本実施例では実施例2のように複数台のTVカメラ2a〜2dを用いた例を示したが、実施例1のように1台のTVカメラ2であっても本実施例の技術思想を適用することが可能である。また、パターンマッチングの方法として、相互相関値を用いた例を示したが、マッチングの程度を数値化できればどのような値を用いてもよい。
【0028】
(実施例4)
本実施例の基本的な手順は図6に示すように実施例3と同様であって、自己相関値の大きい部分領域D1 について、X軸方向とY軸方向とについてずらした部分領域D2 を設定して相互相関値を求め、相互相関値がX軸方向とY軸方向とについてともに小さい場合に、その部分領域D1 を基準画像として採用するものである。
【0029】
ただし、本実施例では自己相関値を画像内のすべての部分領域D0 について求めた後に相互相関値を求めるようにしている点が実施例3とは相違する。すなわち、画像メモリ4からの画像を基準画像設定手段が取り込むと(S1)、各部分領域D0 について自己相関値を求め(S3)、第1の閾値と比較する(S4)点は実施例1と同様である。その後、自己相関値が第1の閾値を越えていれば、その部分領域D1 に関する自己相関値および座標位置を保存する(S5)。この処理をすべての部分領域D1 について繰り返すのである。
【0030】
すべての部分領域D0 について自己相関値および座標位置が求められると、自己相関値の大きい順にソーティングを行なう(S6)。次に、自己相関値が第1の閾値を越える部分領域D1 について自己相関値の大きいほうから順に、複数方向に部分領域D2 を設定して相互相関値を求め(S7)、各方向について相互相関値が第2の閾値よりも小さいか否かを判定する(S8)。X軸方向およびY軸方向についてともに相互相関値が第2の閾値よりも小さい場合には(S9)、この部分領域D1 を基準画像として採用する(S10)。
【0031】
一方、自己相関値の上位10個について相互相関値を求めても基準画像が決定できない場合には(S11)、残ったデータを確定し(S12)、X軸方向とY軸方向とのいずれか一方について相互相関値が第2の閾値以下になるか否かを判定する(S13)。相互相関値が第2の閾値以下になれば、1方向について位置補正が可能である基準画像として採用し(S14)、すべての相互相関値が第2の閾値を越えていれば基準画像が得られないものとして報知する(S15)。その後、他のTVカメラ2b〜2cについて同様の処理を行なうのである。他の構成は実施例3と同様である。
【0032】
(実施例5)
実施例3で示した手順は、順に走査される部分領域D0 について自己相関値が第1の閾値を越えかつ相互相関値が第2の閾値以下になるものとして最初に見つけた部分領域D1 を基準画像としているから、画像が比較的複雑な形状であるときには比較的短い時間で基準画像を決定することができる。しかしながら、画像が比較的単純な形状であれば、実施例4のように、すべての部分領域D0 について自己相関値を求めた後に、自己相関値の大きい順に相互相関値を調べるほうが最適な基準画像を確実に見つけることができることになる。
【0033】
そこで、本実施例では画像の複雑度を評価し、複雑度が規定値を越えるときには、実施例3と同様にして部分領域D0 の走査順で基準画像を決定し、複雑度が既定値以下であれば、実施例4のようにすべての部分領域D0 について自己相関値を求めた後に、自己相関値の大きい順に相互相関値の条件を満たしているか否かを評価するのである。ここにおいて、画像の複雑度については、たとえば画像の任意の2つの部分領域D0 を比較し、両部分領域D0 の相違の程度が大きいほど複雑度が大きいなどとして判定すればよい。相違の程度については通常のパターンマッチングの手法を適用することができる。
【0034】
【発明の効果】
請求項1の発明は、基準の対象物の画像について一定の大きさの部分領域ごとに自己相関値を求め、自己相関値の高い第1の部分領域、すなわち比較的変化が多い部分領域を基準画像の候補として抽出し、さらに、これらの候補のうちで第1の部分領域を各方向に規定の画素数分だけ偏移させて各方向にそれぞれ設定した第2の部分領域との相互相関値が小さい部分領域、すなわち周囲の形状との差が大きい第1の部分領域を基準画像とするのであって、自己相関値によって基準画像の候補を求め、相互相関値によって候補が基準画像として適切か否かを検証するから、人による基準画像の設定作業が不要になって基準画像を自動的かつ再現性よく抽出することができ、基準画像を自動的に登録することができるという利点がある。
【0035】
請求項2の発明は、複数台の撮像装置を用いるとともに各撮像装置ごとに基準画像を設定し、各撮像装置に対応して設定した基準画像を複合的に用いて検査対象物の画像の位置を補正するので、1つの検査対象物について複数個の基準画像を総合して位置補正を行なうことになり、結果的に位置補正の精度を高めることができるという効果を奏する。
【0036】
請求項3の発明は、基準の対象物の画像内で第1の部分領域を走査し、第1の部分領域の各位置ごとに基準画像の候補か否かを判定し、候補となる第1の部分領域について基準画像として適正か否かを検証するから、比較的複雑な形状の対象物であれば、適切な基準画像を短時間で決定できるという利点がある。
請求項4の発明は、基準の対象物の画像内で第1の部分領域をすべて走査して自己相関値を求めた後に、自己相関値の大きい第1の部分領域から順に基準画像か否かを判定し、候補となる第1の部分領域について基準画像として適正か否かを検証するから、比較的単純な形状の対象物の場合に最適な基準画像を決定できるという効果がある。
【0037】
請求項5の発明は、適宜位置の部分領域について複雑度を求め、複雑な画像であれば請求項3の方法によって基準画像を求め、単純な画像であれば請求項4の方法によって基準画像を求めるのであって、複雑な画像では第1の部分領域を順次走査する過程で基準画像を求めることによって、比較的よい基準画像を短時間で設定することができるという利点があり、また単純な画像では第1の部分領域を走査する過程では基準画像を見つけにくいが、全領域について第1の部分領域の自己相関値を求めた後に自己相関値の大きい順に基準画像として適しているか否かを検証するから、最適な基準画像を比較的短時間で見つけることができるという利点を有する。すなわち、対象物の複雑度に適した手順で基準画像を決定することができるのである。
【図面の簡単な説明】
【図1】実施例1を示し、(a)はブロック図、(b)は動作説明図である。
【図2】実施例1に用いる装置の概略構成図である。
【図3】実施例2に用いる装置の概略構成図である。
【図4】実施例2の動作説明図である。
【図5】実施例3の動作説明図である。
【図6】実施例4の動作説明図である。
【符号の説明】
1 対象物
2 TVカメラ
3 アナログ−ディジタル変換器
4 画像メモリ
5 基準画像候補抽出部
6 基準画像検証部
7 基準画像メモリ
D0 部分領域
D1 部分領域
D2 部分領域[0001]
[Industrial application fields]
The present invention obtains the degree of coincidence with a reference image set as a characteristic partial area for an image obtained by imaging an inspection object, and performs coordinate conversion based on the partial area with a high degree of coincidence, thereby The present invention relates to an image processing apparatus that corrects the position of an object image.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, a technique for inspecting a defect such as a scratch on the surface of an inspection target based on an image captured by an imaging device such as a TV camera is known. By the way, since the relative positional relationship between the inspection object and the imaging device is usually different for each inspection object, the position of the image of the inspection object is the inspection object in the coordinate system defined for the imaging device. Every thing will be different. As described above, when the position of the image of the inspection object in the prescribed coordinate system is different, there is a problem that the defect inspection cannot be performed under the same condition and the defective portion cannot be extracted accurately.
[0003]
In view of this, it is considered to perform coordinate inspection on the image of the inspection object to correct the position, and to perform defect inspection under the same conditions for any inspection object. That is, the following processing is performed for position correction. First, a characteristic partial area considered to be suitable for position correction is extracted from an image captured by an imaging device with respect to a reference object, and used as a reference image. Here, the characteristic partial region is a partial region that has a relatively large change in the partial region, and includes, for example, a partial region that includes a corner portion of the inspection object or a curved portion that has a large change. It becomes such a partial area. Next, pattern matching with the reference image is performed on the inspection object, and a partial region having a high degree of coincidence with the reference image is obtained. Since the coordinate position of the reference image in the prescribed coordinate system is already known, if coordinate conversion is performed so that the coordinate position of the partial area where the degree of coincidence with the reference image of the inspection object is high matches the coordinate position of the reference image Thus, it becomes possible to handle images of all inspection objects at the same coordinate position.
[0004]
[Problems to be solved by the invention]
In the above-described prior art, when extracting a reference image, a partial region that is considered suitable for the reference image is selected based on human judgment, and the reference image is extracted with individual differences and low reproducibility. In addition, there is a problem that empirical judgment is necessary to improve reproducibility.
[0005]
The present invention aims to solve the above problems, and automatically extracts a reference image. The reference image can be automatically registered without the need for human setting of the reference image. An image processing apparatus is to be provided.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, the first aspect of the present invention sets a reference image that is a characteristic partial region of an image obtained by imaging an inspection object with an imaging device and whose coordinate position in the image is known. The reference image setting means for matching, the matching means for obtaining the degree of coincidence with the reference image for each partial area of the image of the inspection object, and extracting the partial area having a high degree of coincidence, and the coincidence of the reference image among the images of the inspection object In the image processing apparatus including a position correction unit that performs coordinate transformation on the image of the inspection target so as to correspond to the coordinate position in the image of the reference image with reference to a partial area having a high degree, the reference image setting unit includes: A reference image candidate extraction unit that obtains an autocorrelation value for each partial area having a certain size for an image obtained by imaging an object serving as a reference with an imaging device, and a first partial area in which the autocorrelation value exceeds a first threshold value One The first partial region Te Is shifted by the specified number of pixels in each direction. A cross-correlation value with the set second partial region, and a reference image verification unit that uses the image of the first partial region as a reference image when the cross-correlation value is equal to or less than the second threshold value. Features.
[0007]
The invention of
[0008]
The invention of
[0009]
The invention of
[0010]
The invention of
[0011]
[Action]
According to the configuration of the first aspect of the present invention, the autocorrelation value is obtained for each partial region having a certain size for the image of the reference object, and the first partial region having a high autocorrelation value, that is, a relatively large change. A partial region is extracted as a candidate for the reference image, and among these candidates, The first partial area is shifted by a prescribed number of pixels in each direction, The partial area having a small cross-correlation value with the set second partial area, that is, the first partial area having a large difference from the surrounding shape is used as the reference image. In this way, the reference image candidate is obtained from the autocorrelation value, and whether or not the candidate is appropriate as the reference image is verified based on the cross-correlation value, the reference image can be extracted automatically and with good reproducibility.
[0012]
According to the configuration of the invention of
[0013]
According to the configuration of the invention of
According to the configuration of the invention of
[0014]
According to the configuration of the invention of
[0015]
【Example】
(Example 1)
The present embodiment is based on a technique for extracting a reference image, and the technique for correcting the position of an inspection object using the extracted reference image is as described in the related art. In the following description, the main part will be described.
[0016]
As shown in FIG. 1A, a
[0017]
When the image is stored in the
[0018]
As described above, the partial region D that is a candidate for the reference image 1 Is found, the reference
[0019]
By the way, the partial area D for the entire area by the above-described processing. 0 In some cases, the reference image cannot be determined even if scanning is performed. In that case, in the reference image
[0020]
The analog-
[0021]
(Example 2)
In the first embodiment, one
[0022]
Assume that the images Ia to Id corresponding to the
[0023]
(Practice interest 3)
In the present embodiment, an example in which a reference image is obtained by a procedure as shown in FIG. That is, in the configuration of the second embodiment, a partial area D for setting a Cartesian coordinate system that forms an XY plane in the imaging areas of the
[0024]
Now,
[0025]
Partial area D 1 Since 64 are set, if the appropriate reference image has not been determined until the above process is performed 64 times (S2), the data in which the cross-correlation value is less than or equal to the second threshold value in one direction Is determined to be held (S10), and if it is held, the direction is corrected (S11), and if not held, the correction is not performed (S12) for the
[0026]
If a reference image is found for the
[0027]
Through the processing as described above, the partial region D for the image of the object 0 Are sequentially scanned to determine whether or not the autocorrelation value exceeds the first threshold value, and a partial region D exceeding the first threshold value is determined. 1 For the partial region D 2 Is set to verify whether or not the image becomes a reference image. Therefore, the partial region D 0 In the process of scanning at least one partial area D to be a reference image 1 If it is found, it is adopted as a reference image. The reference image obtained in this way may not be the optimum reference image, but can be found in a short time. Other configurations are the same as those of the second embodiment. In the present embodiment, an example in which a plurality of
[0028]
(Example 4)
The basic procedure of this embodiment is the same as that of
[0029]
However, in this embodiment, the autocorrelation value is set to all the partial regions D in the image. 0 This is different from the third embodiment in that the cross-correlation value is obtained after obtaining the above. That is, when the reference image setting means captures an image from the image memory 4 (S1), each partial region D 0 The autocorrelation value is obtained for (S3) and compared with the first threshold value (S4) as in the first embodiment. After that, if the autocorrelation value exceeds the first threshold value, the partial region D 1 The autocorrelation value and the coordinate position for are stored (S5). This process is applied to all partial areas D. 1 It repeats about.
[0030]
All partial areas D 0 When the autocorrelation value and the coordinate position are obtained for, sorting is performed in descending order of the autocorrelation value (S6). Next, the partial region D in which the autocorrelation value exceeds the first threshold value 1 In order from the largest autocorrelation value, the partial region D in a plurality of directions 2 Is set to obtain a cross-correlation value (S7), and it is determined whether or not the cross-correlation value is smaller than the second threshold value for each direction (S8). When the cross-correlation value is smaller than the second threshold value in both the X-axis direction and the Y-axis direction (S9), this partial region D 1 Is adopted as a reference image (S10).
[0031]
On the other hand, if the reference image cannot be determined by obtaining cross-correlation values for the top 10 autocorrelation values (S11), the remaining data is determined (S12), and either the X-axis direction or the Y-axis direction is determined. It is determined whether or not the cross-correlation value is less than or equal to the second threshold value for one (S13). If the cross-correlation value is less than or equal to the second threshold value, it is adopted as a reference image whose position can be corrected in one direction (S14). If all the cross-correlation values exceed the second threshold value, a reference image is obtained. Notification is made that it is not possible (S15). Thereafter, the same processing is performed for the
[0032]
(Example 5)
The procedure shown in the third embodiment is the partial region D that is sequentially scanned. 0 The partial region D that was first found as having an autocorrelation value exceeding the first threshold value and a cross-correlation value being less than or equal to the second threshold value for 1 Therefore, when the image has a relatively complicated shape, the reference image can be determined in a relatively short time. However, if the image has a relatively simple shape, as in the fourth embodiment, all the partial regions D 0 After obtaining the autocorrelation value for, it is possible to reliably find the optimum reference image by examining the cross-correlation values in descending order of the autocorrelation value.
[0033]
Therefore, in this embodiment, the complexity of the image is evaluated, and when the complexity exceeds a specified value, the partial region D is processed in the same manner as in the third embodiment. 0 If the reference image is determined in the scanning order and the complexity is equal to or less than the predetermined value, all the partial areas D are as in the fourth embodiment. 0 After obtaining the autocorrelation value for, it is evaluated whether or not the condition of the cross-correlation value is satisfied in descending order of the autocorrelation value. Here, as for the complexity of the image, for example, any two partial regions D of the image 0 And comparing both partial regions D 0 The degree of complexity may be determined as the degree of difference increases. For the degree of difference, a normal pattern matching method can be applied.
[0034]
【The invention's effect】
According to the first aspect of the present invention, an autocorrelation value is obtained for each partial region having a certain size with respect to an image of a reference object, and a first partial region having a high autocorrelation value, that is, a partial region having a relatively large change is used as a reference. Extracted as image candidates, and among these candidates The first partial area is shifted by a prescribed number of pixels in each direction, A partial area having a small cross-correlation value with the set second partial area, that is, a first partial area having a large difference from the surrounding shape is used as a reference image, and a candidate for the reference image is obtained from the autocorrelation value. Because the cross-correlation value verifies whether the candidate is appropriate as the reference image, Setting work Therefore, there is an advantage that the reference image can be extracted automatically and with high reproducibility, and the reference image can be automatically registered.
[0035]
The invention of
[0036]
The invention according to
In the invention of
[0037]
The invention according to
[Brief description of the drawings]
FIGS. 1A and 1B show a first embodiment, in which FIG. 1A is a block diagram, and FIG.
2 is a schematic configuration diagram of an apparatus used in Example 1. FIG.
3 is a schematic configuration diagram of an apparatus used in Example 2. FIG.
4 is an operation explanatory diagram of
FIG. 5 is an operation explanatory diagram of the third embodiment.
FIG. 6 is an operation explanatory diagram of the fourth embodiment.
[Explanation of symbols]
1 object
2 TV camera
3 Analog-digital converter
4 Image memory
5 Reference image candidate extraction unit
6 Reference image verification unit
7 Reference image memory
D 0 Partial area
D 1 Partial area
D 2 Partial area
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP31487093A JP3627249B2 (en) | 1993-12-15 | 1993-12-15 | Image processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP31487093A JP3627249B2 (en) | 1993-12-15 | 1993-12-15 | Image processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH07168941A JPH07168941A (en) | 1995-07-04 |
JP3627249B2 true JP3627249B2 (en) | 2005-03-09 |
Family
ID=18058616
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP31487093A Expired - Fee Related JP3627249B2 (en) | 1993-12-15 | 1993-12-15 | Image processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3627249B2 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4441332B2 (en) * | 2004-06-01 | 2010-03-31 | シャープ株式会社 | Screen determination apparatus and screen determination method |
JP2008058182A (en) * | 2006-08-31 | 2008-03-13 | Mitsutoyo Corp | Determination device for detection possibility of displacement quantity, its method, and displacement detector |
EP2128793B1 (en) * | 2008-05-28 | 2012-10-17 | Pepperl + Fuchs GmbH | Method and device for inspecting print products, computer program and computer program product |
JP5441799B2 (en) * | 2010-04-08 | 2014-03-12 | 株式会社ザクティ | Electronic camera |
JP6481957B2 (en) | 2014-08-20 | 2019-03-13 | 富士ゼロックス株式会社 | Image processing apparatus and program |
JP6403196B2 (en) * | 2014-11-07 | 2018-10-10 | 日本電子株式会社 | Image evaluation method and charged particle beam apparatus |
-
1993
- 1993-12-15 JP JP31487093A patent/JP3627249B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH07168941A (en) | 1995-07-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2003244521A (en) | Information processing method and apparatus, and recording medium | |
JP7230507B2 (en) | Deposit detection device | |
JP3627249B2 (en) | Image processing device | |
JP5264457B2 (en) | Object detection device | |
JP2013254242A (en) | Image recognition device, image recognition method, and image recognition program | |
JP2010243209A (en) | Defect inspection method and defect detection apparatus | |
JPH0735699A (en) | Method and apparatus for detecting surface defect | |
JPH09245166A (en) | Pattern matching device | |
JPH11351835A (en) | Method for extracting contour line of cutting edge by processing taken image of tool | |
JPH08202878A (en) | Picture processor | |
JP2642185B2 (en) | Angle detector | |
JP2002230564A (en) | Contour extraction device and method and contour extraction program | |
JPH05113315A (en) | Center position detection method for circular image data | |
JP3552419B2 (en) | Object recognition method | |
JP3109237B2 (en) | Line segment constituent pixel extraction method and line segment judgment method in image | |
JPS6391779A (en) | Parts recognizing device | |
JPS61286704A (en) | Image border detection method | |
JPH0783614A (en) | Range image processing method | |
JPH06325156A (en) | Method and device for character shape inspection | |
JPH0410074A (en) | Picture pattern inclination detecting method | |
CN114897966A (en) | Visual identification method for large element | |
JPH01263773A (en) | Checking method for cylindrical body | |
JPH10116345A (en) | Device for extracting straight-line contours in images | |
JPH05266200A (en) | Shape determination method using chain code | |
JPH0718810B2 (en) | Pattern inspection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040706 |
|
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: 20041116 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20041129 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20071217 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081217 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081217 Year of fee payment: 4 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081217 Year of fee payment: 4 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |