[go: up one dir, main page]

JP3627249B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

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
Application number
JP31487093A
Other languages
Japanese (ja)
Other versions
JPH07168941A (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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP31487093A priority Critical patent/JP3627249B2/en
Publication of JPH07168941A publication Critical patent/JPH07168941A/en
Application granted granted Critical
Publication of JP3627249B2 publication Critical patent/JP3627249B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

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)に示すように、一定の大きさの部分領域Dをラスタ走査し、各部分領域Dごとに自己相関値を求める。図1(b)において矢印は部分領域Dの走査方向を示している。ここにおいて、ラスタ走査の際の部分領域Dの1回の移動量は、1画素もしくは規定の複数画素の間隔になる。また、全領域を等分割した部分領域Dを形成し、各部分領域Dを順に走査するようにしてもよい。基準画像候補抽出部5では自己相関値について閾値が設定されており、自己相関値が閾値を越えるときには、その部分領域Dの中での変化が大きく特徴的な部分領域D(第1の部分領域)であって基準画像の候補になると判断する。
【0018】
上述のようにして基準画像の候補となる部分領域Dが見つかると、基準画像検証部6では、部分領域Dについて上下、左右、斜めの8方向について部分領域Dを規定の画素数分だけ偏移させた部分領域D(第2の部分領域)を設定する。基準画像検証部6では、両部分領域D,Dについて相互相関値を求める。ここで、両部分領域D,Dの類似度(すなわち、相互相関値)が小さいほど基準画像として適していることになるから、各方向に設定したすべての部分領域Dについて相互相関値が規定の閾値以下であるときには、部分領域Dを基準画像として用いてよいことが検証されるのである。ここにおいて、部分領域Dのうちの1つでも相互相関値が規定の閾値を越えている場合には、基準画像としては不適と判断し、基準画像候補抽出部5によって求めた次の候補について同様の処理を行なう。このようにして、基準画像の候補を求めた後に検証を行なって基準画像となる部分領域Dを確定すると、基準画像となる部分領域Dをその部分領域Dの代表点の座標位置とともに基準画像メモリ7に格納し、検査対象物との照合に用いるのである。すなわち、基準画像候補抽出部5と基準画像検証部6と基準画像メモリ7とによって、基準画像設定手段が構成されるのであって、上述した手順により人手によらず基準画像を自動的に決定することができるのである。しかも、基準画像の決定には一定法則を適用しているから、基準画像の再現性が高いのである。
【0019】
ところで、上述のような処理によって全領域について部分領域Dを走査しても基準画像を確定できない場合がある。その場合には、基準画像候補抽出部5もしくは基準画像検証部6において、基準画像となる部分領域Dが存在しない旨の報知信号を出力する。この報知信号によって、適切な基準画像が得られなかったことを知らせることができるのである。
【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平面を形成する直交座標系を設定し、相互相関値を求めるための部分領域Dは、部分領域Dに対してX軸方向およびY軸方向の正負両側と、X軸に対して45度および135度で交差する2本の直線上の正負両側との合計8方向についてずらして設定される。この場合、X軸方向について変化が少なくY軸方向には変化が大きいような部分領域Dでは、X軸方向にずらした部分領域Dとの相互相関値は大きく、Y軸方向にずらした部分領域Dとの相互相関値は小さくなる。したがって、各部分領域Dに対応して設定したすべての部分領域Dについて相互相関値が大きくなるような部分領域Dを基準画像として選択することができれば、X軸方向とY軸方向との位置補正を一度でできることになり、このような基準画像を選択するのが望ましいことになる。
【0024】
いま、部分領域Dは64個で全領域を埋めることができるように設定してあるものとして、図5の手順を説明する。まず、第1のTVカメラ2aによって撮像した画像を基準画像設定手段に転送する(S1)。この画像について部分領域Dごとに自己相関値を求め(S3)、第1の閾値を越えている部分領域Dであれば(S4)、上述のように部分領域Dの近傍に設定した部分領域Dとのパターンマッチングを行なう(S5)。このパターンマッチングは相互相関値を用いて評価し、相互相関値がX軸方向とY軸方向とについてともに第2の閾値以下であれば(S6)、2方向についての位置補正用の基準画像として採用する(S7)。また、ステップS6での条件が満たされなくてもX軸方向とY軸方向とのいずれか一方について第2の閾値以下であれば(S8)、そのデータを保留しておく(S9)。自己相関値が第1の閾値を越えない場合(S4)、相互相関値がどの方向についても第2の閾値以下にならない場合(S8)、データを保留した後(S9)のいずれの場合についても、次の部分領域Dについて上記処理を行なう。
【0025】
部分領域Dは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】
以上のような処理によって、対象物の画像について部分領域Dを順に走査して自己相関値が第1の閾値を越えるか否かを判定し、第1の閾値を越える部分領域Dについては、部分領域Dを設定して基準画像となるか否かを検証するのである。したがって、部分領域Dを走査する過程で、1つでも基準画像となる部分領域Dが見つかれば基準画像として採用するのであって、このようにして求めた基準画像は最適な基準画像ではないかも知れないが、短時間で見つけることができることになる。他の構成は実施例2と同様である。本実施例では実施例2のように複数台のTVカメラ2a〜2dを用いた例を示したが、実施例1のように1台のTVカメラ2であっても本実施例の技術思想を適用することが可能である。また、パターンマッチングの方法として、相互相関値を用いた例を示したが、マッチングの程度を数値化できればどのような値を用いてもよい。
【0028】
(実施例4)
本実施例の基本的な手順は図6に示すように実施例3と同様であって、自己相関値の大きい部分領域Dについて、X軸方向とY軸方向とについてずらした部分領域Dを設定して相互相関値を求め、相互相関値がX軸方向とY軸方向とについてともに小さい場合に、その部分領域Dを基準画像として採用するものである。
【0029】
ただし、本実施例では自己相関値を画像内のすべての部分領域Dについて求めた後に相互相関値を求めるようにしている点が実施例3とは相違する。すなわち、画像メモリ4からの画像を基準画像設定手段が取り込むと(S1)、各部分領域Dについて自己相関値を求め(S3)、第1の閾値と比較する(S4)点は実施例1と同様である。その後、自己相関値が第1の閾値を越えていれば、その部分領域Dに関する自己相関値および座標位置を保存する(S5)。この処理をすべての部分領域Dについて繰り返すのである。
【0030】
すべての部分領域Dについて自己相関値および座標位置が求められると、自己相関値の大きい順にソーティングを行なう(S6)。次に、自己相関値が第1の閾値を越える部分領域Dについて自己相関値の大きいほうから順に、複数方向に部分領域Dを設定して相互相関値を求め(S7)、各方向について相互相関値が第2の閾値よりも小さいか否かを判定する(S8)。X軸方向およびY軸方向についてともに相互相関値が第2の閾値よりも小さい場合には(S9)、この部分領域Dを基準画像として採用する(S10)。
【0031】
一方、自己相関値の上位10個について相互相関値を求めても基準画像が決定できない場合には(S11)、残ったデータを確定し(S12)、X軸方向とY軸方向とのいずれか一方について相互相関値が第2の閾値以下になるか否かを判定する(S13)。相互相関値が第2の閾値以下になれば、1方向について位置補正が可能である基準画像として採用し(S14)、すべての相互相関値が第2の閾値を越えていれば基準画像が得られないものとして報知する(S15)。その後、他のTVカメラ2b〜2cについて同様の処理を行なうのである。他の構成は実施例3と同様である。
【0032】
(実施例5)
実施例3で示した手順は、順に走査される部分領域Dについて自己相関値が第1の閾値を越えかつ相互相関値が第2の閾値以下になるものとして最初に見つけた部分領域Dを基準画像としているから、画像が比較的複雑な形状であるときには比較的短い時間で基準画像を決定することができる。しかしながら、画像が比較的単純な形状であれば、実施例4のように、すべての部分領域Dについて自己相関値を求めた後に、自己相関値の大きい順に相互相関値を調べるほうが最適な基準画像を確実に見つけることができることになる。
【0033】
そこで、本実施例では画像の複雑度を評価し、複雑度が規定値を越えるときには、実施例3と同様にして部分領域Dの走査順で基準画像を決定し、複雑度が既定値以下であれば、実施例4のようにすべての部分領域Dについて自己相関値を求めた後に、自己相関値の大きい順に相互相関値の条件を満たしているか否かを評価するのである。ここにおいて、画像の複雑度については、たとえば画像の任意の2つの部分領域Dを比較し、両部分領域Dの相違の程度が大きいほど複雑度が大きいなどとして判定すればよい。相違の程度については通常のパターンマッチングの手法を適用することができる。
【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 基準画像メモリ
部分領域
部分領域
部分領域
[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 claim 2 is claimed in claim 1 departure In light, the optical axes are substantially parallel to each other, and each of the imaging devices includes a plurality of imaging devices each having a part of the inspection object as an imaging region. When a partial area with a large change in the vertical direction and a partial area with a large change in the horizontal direction are required The reference image is set by the reference image setting means. For each partial area Set and position correction means is the position coordinates of the image of the inspection object For each one direction where the change in each partial area is large Coordinate conversion is performed so as to match the position coordinates of each reference image.
[0008]
The invention of claim 3 is claimed in claim 1's In the invention, the partial areas are sequentially scanned in the image of the reference object, and a plurality of second areas separated from each other in different directions with respect to the first partial area in the vicinity of the first partial area at each position. A partial area is set, a cross-correlation value between each second partial area and the first partial area is obtained, and the first cross-correlation value is equal to or lower than a second threshold value for the second partial areas in all directions. The partial region is used as a reference image.
[0009]
The invention of claim 4 is claimed in claim 1's In the invention, after the partial areas are scanned in order within the image of the reference object, and the autocorrelation values are obtained for all the partial areas, the first in the vicinity of the first partial area in descending order of the autocorrelation values. A plurality of second partial areas separated from each other in different directions are set, cross-correlation values between the second partial areas and the first partial areas are obtained, The first partial area in which the cross-correlation value of the two partial areas is equal to or less than the second threshold is used as a reference image.
[0010]
The invention of claim 5 claims 1's In the invention, the complexity of the image is obtained for an appropriate partial area in the image of the reference object, and when the image is complicated and the complexity exceeds a specified value, the partial area in the image of the reference object And sequentially setting a plurality of second partial areas separated from each other in a different direction with respect to the first partial area in the vicinity of the first partial area at each position. A cross-correlation value with the first partial region is obtained, and the first partial region in which the cross-correlation value is equal to or less than the second threshold for the second partial region in all directions is set as a reference image, and the image is simple. When the complexity is equal to or less than the specified value, the partial areas are scanned in order in the image of the reference object, and the autocorrelation values are obtained for all the partial areas. Pair with the first partial area in the vicinity of the partial area A plurality of second partial areas separated in different directions are set, cross-correlation values between the second partial areas and the first partial areas are obtained, and the second partial areas in all directions are obtained. A first partial region having a cross-correlation value equal to or lower than a second threshold is used as a reference image.
[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 claim 2, a plurality of image pickup devices are used, a reference image is set for each image pickup device, and an inspection object is used by combining the reference images set corresponding to each image pickup device. Therefore, the position correction is performed by combining a plurality of reference images for one inspection object, and as a result, the accuracy of the position correction can be improved.
[0013]
According to the configuration of the invention of claim 3, the first partial area is scanned in the image of the reference object, it is determined whether or not each position of the first partial area is a reference image candidate, Since it is verified whether or not the first partial region is appropriate as a reference image, an appropriate reference image can be determined in a short time if the object has a relatively complicated shape.
According to the configuration of the invention of claim 4, after all the first partial regions are scanned in the image of the reference object to obtain the autocorrelation value, the reference is sequentially performed from the first partial region having the largest autocorrelation value. Since it is determined whether or not it is an image and whether or not the candidate first partial region is appropriate as a reference image, an optimal reference image can be determined for an object having a relatively simple shape.
[0014]
According to the configuration of the invention of claim 5, the complexity is appropriately obtained for the partial region at the position, and if it is a complex image, the reference image is obtained by the method of claim 3, and if it is a simple image, the method of claim 4 is obtained. In a complicated image, a relatively good reference image can be set in a short time by obtaining a reference image in the process of sequentially scanning the first partial area. In the process of scanning the first partial area, it is difficult to find the reference image, but after obtaining the autocorrelation values of the first partial area for all areas, it is verified whether the reference image is suitable in descending order of autocorrelation values. Therefore, the optimum reference image can be found in a relatively short time.
[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 reference object 1 is imaged by a TV camera 2 using a CCD or the like as an imaging device. The image signal output from the TV camera 2 is converted into a digital signal by the analog-digital converter 3 and then stored in the image memory 4. Here, the image obtained by the TV camera 2 is generally a black and white grayscale image. However, when the degree of coincidence is determined using color information for the inspection object and the reference image, a color image is used. May be.
[0017]
When the image is stored in the image memory 4, the reference image candidate extraction unit 5 performs the following procedure. First, with respect to the image stored in the image memory 4, as shown in FIG. 0 Is raster-scanned and each partial area D is scanned. 0 Each time an autocorrelation value is obtained. In FIG. 1B, the arrow indicates the partial region D. 0 The scanning direction is shown. Here, the partial area D during raster scanning 0 The one-time movement amount is one pixel or a predetermined interval between a plurality of pixels. Further, a partial area D obtained by equally dividing the entire area 0 And forming each partial region D 0 May be sequentially scanned. In the reference image candidate extraction unit 5, a threshold is set for the autocorrelation value. When the autocorrelation value exceeds the threshold, the partial region D 0 Partial region D with large variation in 1 It is determined that it is a (first partial region) and is a candidate for a reference image.
[0018]
As described above, the partial region D that is a candidate for the reference image 1 Is found, the reference image verification unit 6 uses the partial region D. 1 Partial area D for vertical, horizontal and diagonal directions 1 Is a partial area D shifted by a predetermined number of pixels. 2 (Second partial area) is set. In the reference image verification unit 6, both partial regions D 1 , D 2 A cross-correlation value is obtained for. Here, both partial regions D 1 , D 2 The smaller the similarity (that is, the cross-correlation value) is, the more suitable as the reference image, all the partial regions D set in each direction. 2 When the cross-correlation value is less than or equal to a prescribed threshold value, the partial region D 1 It is verified that can be used as a reference image. Here, the partial region D 2 If the cross-correlation value exceeds one of the threshold values, it is determined that the reference image is unsuitable, and the same processing is performed on the next candidate obtained by the reference image candidate extraction unit 5. In this way, after obtaining a candidate for the reference image, verification is performed, and a partial area D that becomes the reference image 1 Is determined, the partial area D to be the reference image 1 The subregion D 1 Are stored in the reference image memory 7 together with the coordinate positions of the representative points and used for collation with the inspection object. That is, the reference image candidate extraction unit 5, the reference image verification unit 6, and the reference image memory 7 constitute reference image setting means, and the reference image is automatically determined by the above-described procedure regardless of the manual operation. It can be done. In addition, since a certain rule is applied to the determination of the reference image, the reproducibility of the reference image is high.
[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 candidate extraction unit 5 or the reference image verification unit 6, the partial region D to be the reference image 1 A notification signal indicating that there is no data is output. This notification signal can notify that an appropriate reference image has not been obtained.
[0020]
The analog-digital converter 3, the image memory 4, the reference image candidate extraction unit 5, the reference image verification unit 6, and the reference image memory 7 described above constitute an image processing device 10 composed of a computer device as shown in FIG. To do. The image processing apparatus 10 is connected to a TV camera 2 as an imaging apparatus, and is connected to a pointing device such as a mouse, an input device 11 such as a keyboard, and a monitor device 12 such as a CRT for displaying an image. Further, the image processing apparatus 10 compares the reference image determined by the procedure as described above and stored in the reference image memory 7 with the image captured by the TV camera 2 for the inspection object and obtains a matching degree. And a position correction means for performing coordinate conversion based on the difference between the coordinate position of the reference image and the coordinate position of the partial area when a partial area having a high degree of coincidence with the reference image is obtained by the collating means. . As in the case of obtaining the reference image candidate, the matching unit raster scans a partial area of a certain size, obtains the degree of coincidence with the reference image using a known pattern matching method, and quantifies the degree of coincidence. If the degree of coincidence is high compared with the threshold value, it is determined as a partial region corresponding to the reference image. Here, when it is determined that the translation of the image of the inspection target object is only parallel to the reference image, one point representing the reference image and one corresponding point of the partial image extracted from the inspection target object The coordinate system may be translated in accordance with the difference between the coordinate positions, and in the case of including rotational movement, the coordinate conversion may be performed based on the difference between two or more coordinate positions.
[0021]
(Example 2)
In the first embodiment, one TV camera 2 is used. However, in this embodiment, as shown in FIG. 3, an example in which four TV cameras 2a to 2d are used is shown. Each of the TV cameras 2a to 2d is attached to one holding member 13 so that the optical axes thereof are parallel to each other and separated from each other at a constant interval. In addition, the distances of the TV cameras 2a to 2d from the object are set to be equal, and the TV cameras 2a to 2d are configured to capture different portions of one object. For each TV camera 2a to 2d, a reference image is obtained for each TV camera 2a to 2d in the same procedure as the TV camera 2 of the first embodiment.
[0022]
Assume that the images Ia to Id corresponding to the TV cameras 2a to 2d are as shown in FIG. That is, there is no characteristic reference image in the images Ia and Id corresponding to the TV cameras 2a and 2d, and the partial regions D having large lateral changes in the images Ib and Ic corresponding to the TV cameras 2b and 2c, respectively. 11 And a partial region D having a large change in the vertical direction 12 Is required. In such a case, the horizontal position correction is performed based on the image Ib of the TV camera 2b, and the vertical position correction is performed based on the image Ic of the TV camera 2c. Here, if position correction is performed for one image Ib, Ic, position correction is similarly performed for the other images Ia to Id. In addition, when a partial region having a large change in both the vertical and horizontal directions is detected, the position correction is performed by applying the coordinate conversion in the image to other images. When obtaining a reference image, if a candidate for the reference image that satisfies the verification condition is found, the partial area at that time is used as the reference image, or the most characteristic of the imaging areas of the TV cameras 2a to 2d. It is appropriately selected whether to use a partial area as a reference image. Other configurations are the same as those of the first embodiment.
[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 TV cameras 2a to 2d and obtaining a cross-correlation value. 2 Is a partial region D 1 In contrast, the positive and negative sides in the X-axis direction and the Y-axis direction and the positive and negative sides on two straight lines that intersect at 45 degrees and 135 degrees with respect to the X-axis are set to be shifted in a total of eight directions. In this case, the partial region D has a small change in the X-axis direction and a large change in the Y-axis direction. 1 Then, the partial region D shifted in the X-axis direction 2 The cross-correlation value between and the partial region D shifted in the Y-axis direction 2 The cross-correlation value with is small. Therefore, each partial region D 1 All partial areas D set for 2 A partial region D for which the cross-correlation value increases 1 Can be selected as the reference image, the position correction in the X-axis direction and the Y-axis direction can be performed at once, and it is desirable to select such a reference image.
[0024]
Now, partial area D 0 5 will be described assuming that 64 are set so that the entire area can be filled. First, an image captured by the first TV camera 2a is transferred to the reference image setting means (S1). Partial area D for this image 0 For each region, an autocorrelation value is obtained (S3), and the partial region D exceeds the first threshold value. 1 If (S4), the partial region D as described above 1 Partial region D set in the vicinity of 2 Pattern matching is performed (S5). This pattern matching is evaluated using a cross-correlation value, and if the cross-correlation value is equal to or smaller than the second threshold value in both the X-axis direction and the Y-axis direction (S6), as a reference image for position correction in the two directions Adopt (S7). Even if the condition in step S6 is not satisfied, if either the X-axis direction or the Y-axis direction is less than or equal to the second threshold value (S8), the data is reserved (S9). Whether the autocorrelation value does not exceed the first threshold (S4), the cross-correlation value does not fall below the second threshold in any direction (S8), or after the data is suspended (S9) , Next partial area D 1 The above processing is performed for.
[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 first TV camera 2a. Terminate the process. Here, a code such as 3 when correction is possible in two directions, 2 for correction only in the X-axis direction, 1 for correction only in the Y-axis direction, and 0 for no correction may be given.
[0026]
If a reference image is found for the first TV camera 2a, position correction based on the reference image of the first TV camera 2a can be applied to the other TV cameras 2b to 2d. For the obtained image, only the position correction amount is instructed. In addition, when the process ends without finding the reference image, the same process is performed for each of the TV cameras 2b to 2d after the second TV camera 2b.
[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 TV cameras 2a to 2d are used as in the second embodiment is shown. However, the technical idea of the present embodiment is not limited to a single TV camera 2 as in the first embodiment. It is possible to apply. Moreover, although the example using a cross-correlation value was shown as a pattern matching method, any value may be used as long as the degree of matching can be quantified.
[0028]
(Example 4)
The basic procedure of this embodiment is the same as that of Embodiment 3 as shown in FIG. 1 The partial region D shifted with respect to the X-axis direction and the Y-axis direction 2 When the cross-correlation value is small in both the X-axis direction and the Y-axis direction, the partial region D is obtained. 1 Is used as a reference image.
[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 other TV cameras 2b to 2c. Other configurations are the same as those of the third embodiment.
[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 claim 2 uses a plurality of imaging devices, sets a reference image for each imaging device, and uses the reference image set corresponding to each imaging device in combination to position the image of the inspection object. Therefore, the position correction is performed by combining a plurality of reference images for one inspection object, and as a result, the accuracy of the position correction can be improved.
[0036]
The invention according to claim 3 scans the first partial area in the image of the reference object, determines whether or not it is a reference image candidate for each position of the first partial area, and becomes the first candidate Since it is verified whether or not the partial area is appropriate as the reference image, there is an advantage that an appropriate reference image can be determined in a short time if the object has a relatively complicated shape.
In the invention of claim 4, after all the first partial areas are scanned in the image of the reference object to obtain the autocorrelation value, it is determined whether or not the reference image is in order from the first partial area having the largest autocorrelation value. Therefore, it is verified whether the candidate first partial region is appropriate as the reference image, so that an optimum reference image can be determined for an object having a relatively simple shape.
[0037]
The invention according to claim 5 finds the complexity of a partial region at an appropriate position. If it is a complex image, the reference image is obtained by the method of claim 3, and if it is a simple image, the reference image is obtained by the method of claim 4. In a complex image, there is an advantage that a relatively good reference image can be set in a short time by obtaining a reference image in the process of sequentially scanning the first partial region, and a simple image In the process of scanning the first partial area, it is difficult to find the reference image. Therefore, there is an advantage that the optimum reference image can be found in a relatively short time. That is, the reference image can be determined by a procedure suitable for the complexity of the object.
[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 Embodiment 2. FIG.
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)

検査対象物を撮像装置により撮像した画像のうちの特徴的な部分領域であって画像内での座標位置が既知である基準画像を設定する基準画像設定手段と、検査対象物の画像の各部分領域について基準画像との一致度を求め一致度の高い部分領域を抽出する照合手段と、検査対象物の画像のうち基準画像との一致度が高い部分領域を基準として基準画像の画像内での座標位置に対応するように検査対象物の画像について座標変換を行なう位置補正手段とを備えた画像処理装置において、基準画像設定手段は、基準となる対象物を撮像装置により撮像した画像について一定の大きさの部分領域ごとに自己相関値を求める基準画像候補抽出部と、自己相関値が第1の閾値を越える第1の部分領域について第1の部分領域を各方向に規定の画素数分だけ偏移させて各方向にそれぞれ設定した第2の部分領域との相互相関値を求め、相互相関値が第2の閾値以下であるときに第1の部分領域の画像を基準画像とする基準画像検証部とを具備することを特徴とする画像処理装置。Reference image setting means for setting a reference image which is a characteristic partial region of an image obtained by imaging an inspection object by an imaging device and whose coordinate position in the image is known, and each part of the image of the inspection object A matching means for obtaining a degree of coincidence with the reference image for the region and extracting a partial region having a high degree of coincidence, and a partial region having a high degree of coincidence with the reference image among the images of the inspection object in the image of the reference image In an image processing apparatus including a position correction unit that performs coordinate transformation on an image of an inspection target so as to correspond to a coordinate position, the reference image setting unit is configured to perform a constant operation on an image obtained by capturing an image of the reference object with the imaging device. a reference image candidate extracting unit for determining an autocorrelation value for each size of the partial region, but the number of pixels of the autocorrelation values defining a first partial region for a first partial area beyond the first threshold value in each direction By shift obtains a cross-correlation value between the second partial area set respectively in each direction, the reference image an image of a first partial region and the reference image when the cross-correlation value is less than the second threshold value An image processing apparatus comprising: a verification unit. 光軸が互いに略平行であってそれぞれ検査対象物の一部分を撮像領域とする複数台の撮像装置を備え、少なくとも2台の撮像装置において画像内の縦方向の変化が大きい部分領域と横方向の変化が大きい部分領域が求められる場合に基準画像設定手段により基準画像を各部分領域ごとに設定し、位置補正手段は検査対象物の画像の位置座標を各基準画像の設定に用いた各部分領域での変化が大きい各一方向について各基準画像の位置座標に一致させるように座標変換することを特徴とする請求項1記載の画像処理装置。Comprising a plurality of imaging devices embed a imaging region of each inspection target optical axis A substantially parallel to each other, the horizontal and vertical change is large partial region in Oite image into at least two imaging apparatus When a partial area having a large change in direction is obtained, a reference image is set for each partial area by the reference image setting means, and the position correction means uses the position coordinates of the image of the inspection object for setting each reference image. The image processing apparatus according to claim 1, wherein coordinate conversion is performed so that each one direction having a large change in the partial region matches the position coordinate of each reference image. 基準となる対象物の画像内で部分領域を順に走査し、各位置において第1の部分領域の近傍で第1の部分領域に対して互いに異なる方向に離れた複数個の第2の部分領域を設定して、各第2の部分領域と第1の部分領域との相互相関値を求め、すべての方向の第2の部分領域について相互相関値が第2の閾値以下になる第1の部分領域を基準画像とすることを特徴とする請求項1記載の画像処理装置。A plurality of second partial regions are sequentially scanned in the image of the reference object, and a plurality of second partial regions separated from each other in a direction different from the first partial region in the vicinity of the first partial region at each position. A first partial region in which the cross-correlation value between each second partial region and the first partial region is set and the cross-correlation value is equal to or less than the second threshold value for the second partial region in all directions. the image processing apparatus according to claim 1 Symbol mounting, characterized in that the reference image. 基準となる対象物の画像内で部分領域を順に走査し、すべての部分領域について自己相関値を求めた後に、自己相関値の大きいほうから順に第1の部分領域の近傍で第1の部分領域に対して互いに異なる方向に離れた複数個の第2の部分領域を設定して、各第2の部分領域と第1の部分領域との相互相関値を求め、すべての方向の第2の部分領域について相互相関値が第2の閾値以下になる第1の部分領域を基準画像とすることを特徴とする請求項1記載の画像処理装置。After the partial areas are sequentially scanned in the image of the reference object and the autocorrelation values are obtained for all the partial areas, the first partial areas in the vicinity of the first partial area in descending order of the autocorrelation values A plurality of second partial areas separated from each other in different directions are set, cross-correlation values between the second partial areas and the first partial areas are obtained, and the second parts in all directions are obtained. claim 1 Symbol mounting image processing apparatus, characterized in that the reference image of the first partial area cross-correlation value is less than a second threshold for region. 基準となる対象物の画像内の適宜の部分領域について画像の複雑度を求め、画像が複雑であって複雑度が規定値を越えるときには、基準となる対象物の画像内で部分領域を順に走査し、各位置において第1の部分領域の近傍で第1の部分領域に対して互いに異なる方向に離れた複数個の第2の部分領域を設定して、各第2の部分領域と第1の部分領域との相互相関値を求め、すべての方向の第2の部分領域について相互相関値が第2の閾値以下になる第1の部分領域を基準画像とし、画像が単純であって複雑度が規定値以下であるときには、基準となる対象物の画像内で部分領域を順に走査し、すべての部分領域について自己相関値を求めた後に、自己相関値の大きいほうから順に第1の部分領域の近傍で第1の部分領域に対して互いに異なる方向に離れた複数個の第2の部分領域を設定して、各第2の部分領域と第1の部分領域との相互相関値を求め、すべての方向の第2の部分領域について相互相関値が第2の閾値以下になる第1の部分領域を基準画像とすることを特徴とする請求項1記載の画像処理装置。The complexity of the image is obtained for an appropriate partial area in the image of the reference object, and when the image is complex and the complexity exceeds a specified value, the partial areas are scanned in order in the image of the reference object. In each position, a plurality of second partial regions are set in the vicinity of the first partial region and separated from each other in different directions with respect to the first partial region. A cross-correlation value with the partial area is obtained, and the first partial area where the cross-correlation value is equal to or smaller than the second threshold value for the second partial area in all directions is used as a reference image, and the image is simple and has a high degree of complexity. When the value is equal to or less than the predetermined value, the partial areas are scanned in order in the image of the reference object, and the autocorrelation values are obtained for all the partial areas. Different from each other with respect to the first partial region A plurality of second partial areas separated in the direction are set, cross-correlation values between the second partial areas and the first partial areas are obtained, and cross-correlation values are obtained for the second partial areas in all directions. There the image processing apparatus according to claim 1 Symbol mounting, characterized in that the reference image of the first partial region to be smaller than the second threshold value.
JP31487093A 1993-12-15 1993-12-15 Image processing device Expired - Fee Related JP3627249B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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