JP2004354320A - Recognition verification system for imaging object - Google Patents

Recognition verification system for imaging object Download PDF

Info

Publication number
JP2004354320A
JP2004354320A JP2003154826A JP2003154826A JP2004354320A JP 2004354320 A JP2004354320 A JP 2004354320A JP 2003154826 A JP2003154826 A JP 2003154826A JP 2003154826 A JP2003154826 A JP 2003154826A JP 2004354320 A JP2004354320 A JP 2004354320A
Authority
JP
Japan
Prior art keywords
distance
target article
objective
electronic camera
line segment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003154826A
Other languages
Japanese (ja)
Inventor
Shoji Yagi
章志 八木
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.)
Mitsubishi Electric Engineering Co Ltd
Original Assignee
Mitsubishi Electric Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Engineering Co Ltd filed Critical Mitsubishi Electric Engineering Co Ltd
Priority to JP2003154826A priority Critical patent/JP2004354320A/en
Publication of JP2004354320A publication Critical patent/JP2004354320A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To determine a distance between an electronic camera and an object to enhance efficiency for recognition verification by collation with CAD data. <P>SOLUTION: The object 110 is imaged by the electronic camera 105 interlocked with a multi-axis drive control mechanism 106, and the CAD data F of a three-dimensional pattern of the object 110 is stored in a memory medium 102 together with an imaging data E. An arithmetic unit 101 generates a magnification-variable plane pattern of the object 110 viewed from an optional direction, using the CAD data F, and retrieves and identifies the plane pattern and the picked-up image by the electronic camera 105. An image line segment a is calculated in the picked-up image, the identified pattern is retrieved to extract a real object line segment length A, and an objective reference distance Z0 (=f×A/a) is calculated to be stored, based on a focal distance f of a lens. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
この発明は、電子カメラと対象物品との対物距離を判定し、電子カメラによる対象物品の撮像平面画像と、対象物品に関する3次元図形のCADデータから検索された平面図形とを照合することにより、高精度な対物距離測定を実現して認識検定の効率を向上させるとともに、対象物品の外観検査およびロボットハンドによる適正位置の把持を可能にした撮像対象物品の認識検定システムに関するものである。
【0002】
【従来の技術】
一般に、撮像対象物品の認識検定システムは、多軸駆動制御機構と連動して可変相対位置から対象物品を撮像する電子カメラと、対象物品に関して任意方向から観察した可変倍率の平面図形を生成する3次元図形のCADデータが格納されたメモリ媒体と、CADデータに基づく平面図形が対象物品に対する撮像画像の外観と一致するように合同図形の検索・同定を行う演算装置とを備えている。
【0003】
従来の撮像対象物品の認識検定システムによれば、検査対象物に関するCAD/CAMなどから設計データを入手し、また、センサおよび照明系さらには画像処理系で検査対象物の特徴を抽出して検査対象物の同定・認識を行い、同定された検査対象物に対して実行すべき計測法および検査法を決定し、センサおよび照明系の位置・姿勢を制御して、検査を自動的に実行するようになっている(たとえば、特許文献1参照)。
【0004】
また、この種の認識検定技術は種々提案されており、他の従来システムによれば、複数の対象物の各CAD情報から各対象物を所定方向の直交面に投影して導いたCAD図形特徴量を算出し、カメラが所定方向から捉えた特定の対象物から得られる2次元画像におけるカメラ図形特徴量を算出し、CAD図形特徴量とカメラ図形特徴量とを比較し、カメラが捉えた特定の対象物の種類・姿勢などを判別し、ロボットハンドによる対象物の把持方向を判別するようになっている(たとえば、特許文献2参照)。
【0005】
一方、上記認識検定システムに関連する技術として、従来の距離測定方法および移動装置によれば、目標物に対して撮像装置を前進または後退させ、このときの撮像装置の少なくとも2箇所の移動位置での撮像装置における目標物の各投影像の大きさを求め、これら投影像の大きさに基づいて撮像装置から目標物までの距離を求めるようになっている(たとえば、特許文献3参照)。
【0006】
【特許文献1】
特開平7−98217号公報
【特許文献2】
特開平9−167234号公報(特許第3101674号)
【特許文献3】
特開平9−170920号公報
【0007】
【発明が解決しようとする課題】
従来の撮像対象物品の認識検定システムは以上のように、特許文献1、2によれば、3次元図形のCADデータを有効活用しながら、電子カメラを備えた多軸ロボットを制御することにより、対象物品の認識把持および外観検査・異品検定などを実行しているので、電子カメラと対象物品との間の対物距離に関しては特段の留意が払われていないという問題点があった。
【0008】
また、特許文献3によれば、2眼カメラや1眼移動カメラにより対物距離を測定しているので、2眼カメラを用いた場合には、測定精度の確保のために2眼の視差を十分大きく設定すると装置が大型化して高価になるうえ、対象物品の特徴部分の同定が必要となり、1眼移動カメラを用いた場合には、移動距離を大きく設定することにより十分な視差が確保されるものの、測定誤差が発生し易い遠隔位置での測定データを活用しながら、接近位置での距離を測定することになり、接近位置での測定誤差が大きくなるという問題点があった。
【0009】
この発明は上記のような問題点を解決するためになされたもので、対象物品に関する3次元図形のCADデータを活用しながら、1眼カメラによって高精度な対物距離測定を実現した撮像対象物品の認識検定システムを得ることを目的とする。
また、この発明は、高精度な対物距離情報を用いて、対象物品とCADデータで示された対象物品との同一性を高速・高精度に判定することのできる撮像対象物品の認識検定システムを得ることを目的とする。
【0010】
【課題を解決するための手段】
この発明に係る撮像対象物品の認識検定システムは、可変相対位置から対象物品を撮像するためのレンズを有する電子カメラと、電子カメラと対象物品との相対位置を制御する多軸駆動制御機構と、対象物品に関して任意の方向から観察した可変倍率の平面図形を生成するための3次元図形のCADデータおよび検索・同定プログラムが格納されたメモリ媒体と、検索・同定プログラムによってCADデータに基づく平面図形が対象物品に対する撮像画像の形状と一致するように合同図形の検索・同定を行う演算装置とを備え、演算装置は、少なくとも対象物品の認識検定面の全体が撮像画像内に包含される限界内で、対象物品に接近して対象物品の接近画像を撮像する初期移動撮像手段と、接近画像の中の特定線分に対する画像線分長aを算出するとともに、同定図形を検索して特定線分に対するCADデータ上の実物線分長Aを抽出し、画像線分長aおよび実物線分長Aと既知数であるレンズの焦点距離fとに基づいて、対物基準距離Z0を、以下の式(1)、
Z0=f×A/a ・・・(1)
により算出して記憶する対物基準距離測定手段と、特定線分として複数の特定線分を定め、複数の特定線分に基づいて、式(1)から算出された各対物基準距離の平均値を、認識検定面に対する最終的な対物基準距離として算定する平均化演算手段とを含むものである。
【0011】
また、この発明に係る撮像対象物品の認識検定システムは、可変相対位置から対象物品を撮像するためのレンズを有する電子カメラと、電子カメラと対象物品との相対位置を制御する多軸駆動制御機構と、対象物品に関して任意の方向から観察した可変倍率の平面図形を生成するための3次元図形のCADデータおよび検索・同定プログラムが格納されたメモリ媒体と、検索・同定プログラムによってCADデータに基づく平面図形が対象物品に対する撮像画像の形状と一致するように合同図形の検索・同定を行う演算装置とを備え、演算装置は、少なくとも対象物品の認識検定面の全体が撮像画像内に包含される限界内で、対象物品に接近した第1位置で対象物品を撮像し、所定長よりも短い線分長の特定線分を決定するとともに、同定図形を検索して特定線分に対するCADデータ上の実物線分長Aを抽出する初期移動撮像手段と、特定線分の全体が包含される限界内で、対象物品に接近した第2位置で特定線分を撮像する接近移動撮像手段と、第2位置で撮像された特定線分に対する画像線分長aを算出するとともに、実物線分長Aおよび画像線分長aと既知数であるレンズの焦点距離fとに基づいて、対物基準距離Z0を、以下の式(1)、
Z0=f×A/a ・・・(1)
により算出して記憶する対物基準距離測定手段とを含むものである。
【0012】
また、この発明に係る撮像対象物品の認識検定システムは、可変相対位置から対象物品を撮像するためのレンズを有する電子カメラと、電子カメラと対象物品との相対位置を制御する多軸駆動制御機構と、対象物品に関して任意の方向から観察した可変倍率の平面図形を生成するための3次元図形のCADデータおよび検索・同定プログラムが格納されたメモリ媒体と、検索・同定プログラムによってCADデータに基づく平面図形が対象物品に対する撮像画像の形状と一致するように合同図形の検索・同定を行う演算装置とを備え、演算装置は、対象物品の各部の検索・同定の操作に先立って、電子カメラおよび対象物品が特定位置にあるときの距離を基準距離として定めるとともに、基準距離が定められた後は、多軸駆動制御機構の各軸の位置検出出力に応答して、対象物品に関する対物距離を常時監視測定する対物距離測定手段と、電子カメラによる撮像画像の全体または特定部分と、CADデータから得られる平面図形の全体または特定部分とが一致するように、CADデータによる平面図形に対する視線および倍率を検索するとともに、視線および倍率の検索による一致の度合いが第1の所定適合率以上に達した場合に、合同図形を同定する第1の検索・同定手段と、電子カメラによる撮像画像の全体または特定部分と、CADデータから得られる平面図形の全体または特定部分とが一致するように、CADデータによる平面図形に対する視線を検索するとともに、対物距離測定手段により測定された対物距離に応じた一定倍率を平面図形に対する倍率として適用し、視線の検索による一致の度合いが第2の所定適合率以上に達した場合に、合同図形を同定する第2の検索・同定手段とを含み、第2の検索・同定手段は、対物距離が既知の場合に高速同定するために適用され、第1の検索・同定手段は、対物距離が未確定の場合と、第2の検索・同定手段による検索・同定後に倍率を微小増減して、さらに高精度な同定が必要な場合に適用されるものである。
【0013】
【発明の実施の形態】
実施の形態1.
以下、図面を参照しながら、この発明の実施の形態1について詳細に説明する。
図1はこの発明の実施の形態1を概略的に示すブロック構成図である。
図2は対象物品110と電子カメラのレンズ105aとの相対位置関係を側面図で示す説明図であり、(a)はレンズ105aの光軸105bが対象物品110の中心部と一致している状態を示し、(b)はレンズ105aの座標位置を平面移動させて光軸105bが対象物品110の中心部から遠ざかった状態を示している。
【0014】
図3はレンズ105aの光軸105bに対して直交しない認識検定面111aを直交面111bとともに斜視図で示す説明図、図4は画像線分長aの算出要領を示す説明図、図5は同定誤差面積を最小化するための図形移動の概念を示す説明図である。
また、図6および図7はこの発明の実施の形態1による具体的な動作を示すフローチャートであり、図6は距離測定プログラム、図7は検索・同定プログラムにそれぞれ対応している。
【0015】
図1において、対象物品110の認識検定システムの本体となる演算装置101は、マイクロプロセッサを主体として構成されている。
演算装置101には、RAMメモリやハードディスクからなるメモリ媒体102が搭載されている。
メモリ媒体102には、各種プログラムおよびCADデータを含む各種データが格納されており、たとえば、距離測定プログラム(図6参照)や検索・同定プログラム(図7参照)に加えて、システム稼動プログラムや入出力通信プログラムなどの基本的なプログラム(図示せず)が格納されている。
【0016】
演算装置101には、キーボードやマウスなどの操作入力機器103と、CRTまたは液晶などの表示機器104とが接続されている。
また、演算装置101には、対象物品110を撮像するCCDカメラなどの電子カメラ105と、電子カメラ105を少なくとも3軸(X軸、Y軸、Z軸)方向に移動させるための多軸駆動制御機構106と、多軸駆動制御機構106の各軸に設けられたサーボモータ(図示せず)の回転位置を検出するエンコーダ107と、電子カメラ105により撮像される対象物品110に関する3次元図形のCADデータFが格納された保存媒体108とが接続されている。
【0017】
電子カメラ105は、演算装置101から撮像指示が与えられる毎に、平面配置された多数の画素に対応した撮像データE(少なくとも、輝度情報)を、演算装置101に対して順次シリアル送信するように構成されている。
多軸駆動制御機構106は、演算装置101からの制御指令に応答してサーボモータを駆動するための多軸コントローラおよびサーボアンプ(図示せず)を含む。
エンコーダ107の検出信号(位置検出出力)は、電子カメラ105の座標位置を測定する情報として、演算装置101に入力されている。
保存媒体108に格納されたCADデータは、演算装置101を介して、メモリ媒体102にあらかじめ転送格納されている。
【0018】
メモリ媒体102には、距離測定プログラム(図6参照)で適用される校正データテーブル(後述する)と、対象物品番号を付した3次元図形のCADデータや各部の実寸法を算出するための基準寸法データとが格納されている。
また、メモリ媒体102には、基準面位置データおよび間隔距離寸法データとともに、電子カメラ105の初期移動位置データなどの設置情報データや、検定撮像位置データなどが格納されている。ただし、対象物品110が同じであっても、複数の認識検定面を有する場合には、メモリ媒体102内の格納データは、認識検定面番号別に格納されるようになっている。
【0019】
さらに、メモリ媒体102には、電子カメラ105からの画像データすなわち撮像データE(画素対応の輝度情報)と、保存媒体108からのCADデータFとに基づく平面図形変換データ(対象物品110を所定方向から見た画像データ)が格納されている。
メモリ媒体102内の撮像データEや平面図形変換データは、演算装置101を介して、可変倍率で表示機器104に表示されるようになっている。
【0020】
図2(a)において、対象物品110の上面には、輪郭形状が台形形状を成す認識検定面110aが形成され、対象物品110の下面には、輪郭形状が矩形形状を成す設置背面すなわち基準面110bが形成されている(対象物品110の輪郭形状については、撮像画像110cを参照)。
対象物品110は、各寸法として、上面の長手方向の実物線分長A、下面の長手方向の実物線分長W、高さの実物寸法D(間隔距離)を有する。
また、図2(a)には示されないが、対象物品110は、下面の短寸幅の実物線分長Bを有している。
【0021】
電子カメラ105(図1参照)には、対象物品110を撮像するためのレンズ105aが設けられている。
レンズ105aは、光軸105b上に焦点距離fを有し、光軸105bと直交し且つ焦点距離fの位置に仮想画面105cを形成する。
仮想画面105cには、対象物品110の撮像画像110cが投影される。撮像画像110cの画像線分長aは、対象物品110の実物線分長Aに対応する。同様に、対象物品110の下面の短寸幅の画像線分長B(図示せず)は、撮像画像110cの画像線分長bに対応付けられる。
【0022】
対象物品110の認識検定面110aは、レンズ105aの中心位置から対物距離Zだけ離れた位置にあり、基準面(設置背面)110bは、レンズ105aの中心位置から距離Hだけ離れた位置にある。
ここで、対物距離Zおよび下面までの距離Hは、焦点距離f、実物線分長A、B、画像線分長a、bおよび実物寸法Dを用いて、以下の式(2)、(3)により算出される。
【0023】
Z=f×A/a ・・・(2)
H=f×B/b、Z=H±D ・・・(3)
【0024】
ただし、式(3)において、実物寸法Dに付された「正負記号」のうち、正記号は、レンズ105aから見て、基準面110b側の特定線分となる実物線分長Bが認識検定面110aよりも接近位置にある場合に適用され、負記号は、実物線分長Bが認識検定面110aよりも遠方にある場合に適用される。図2(a)の場合には、式(3)内の「負記号」が用いられることになる。
なお、対象物品110を含む電子カメラ105の全移動空間に対しては、図2(b)のように、直交座標(X軸、Y軸、Z軸)が定められている。たとえば、設置基準面110bに対する法線方向をZ軸(縦軸)として、設置基準面110bの位置をZ軸の原点とし、電子カメラ105(レンズ105a)の移動可能平面の中心点を、平面座標の座標原点Poとして定義する。
図2(a)において、対象物品110の中心は、平面座標の原点位置Poと一致する位置に設定されている。
【0025】
図2(b)のように、電子カメラ105(レンズ105a)の座標位置をX軸方向に平面移動させて、光軸105bが対象物品110の中心部(座標原点Po)から遠ざかった場合、画像線分長aと実物線分長Aに対するZ軸方向成分(対物距離Z)との関係は、上記式(2)と同様であり、式(3)についても、同様である。
【0026】
図3において、認識検定面111aは、光軸105bに対して直交せずに傾斜している。
ここで、光軸105bと認識検定面111aとの交点105dを含む平面として、光軸105bに対する直交面111b(2点鎖線参照)を考慮すると、認識検定面111aは、直交面111bに対して傾斜角αだけ傾いている。
また、認識検定面111a上において、傾斜面による高さ変動が生じない位置にある第1の特定線分112a(実線参照)と、第1の特定線分112aを直交面111bに投影した第1の仮想特定線分112b(破線参照)と、傾斜面による高さ変動が最も大きく影響する位置にある第2の特定線分113a(実線参照)と、第2の特定線分113aを直交面111bに投影した第2の仮想特定線分113b(破線参照)とが定義される。
【0027】
ここで、第1の特定線分112aと第1の仮想特定線分112bとの間の落差ΔDは、高さの実物寸法Dに対応した奥行き寸法として、CADデータFから算出可能な値である。
したがって、落差寸法ΔDを有する場合、第1の仮想特定線分112bに対する対物距離Zは、前述の式(2)に対して、第1の特定線分112aに対する実物線分長Aと、第1の特定線分112aに対する画像線分長aとを用い、また、落差寸法ΔDを付加して、以下の式(4)で示されることになる。
【0028】
Z=f×A/a±ΔD・・・・・・(4)
【0029】
ただし、式(4)において、落差寸法ΔDに付された「正負記号」において、「正記号」は、第1の特定線分112aが第1の仮想特定線分112bよりも接近位置にある場合に適用され、「負記号」は、第1の特定線分112aが第1の仮想特定線分112bよりも遠方にある場合に適用される。
なお、第2の特定線分113aについても、式(4)と同様に、落差寸法を補正することが可能であるが、この場合は、実物線分長Aに代えて、第2の特定線分113aに対する実物線分長Aの直交面111bへの投影線分長Acosαが用いられ、また、第2の特定線分113aの位置に応じた落差寸法ΔDを算定する必要がある。
【0030】
図4において、撮像仮想画面105cには多数の画素が平面配置されている。
撮像仮想画面105c内に撮像される画像線分長aは、画素間隔pと、画像線分長aに対応した左右方向の画素数Nxおよび上下方向の画素数Nyとを用いて、以下の式(5)により算出される。
【0031】
a=p×√(Nx+Ny)・・・・・(5)
【0032】
図5において、比較用仮想画面120は、たとえば表示機器104上に表示され、同定誤差面積を最小化するための図形移動時に用いられる。
比較用仮想画面120内において、撮像輪郭画像121a(実線参照)は、長手方向の中心線122aに関して対称な台形形状を成しており、中心位置123aを有する。
CAD輪郭図形121b(2点鎖線参照)は、撮像輪郭画像121aに対応したCADデータFに基づいて形成され、長手方向の中心線122bに関して対称な台形形状を成しており、中心位置123bを有する。
【0033】
中心線122a、122bは、たとえば、最小慣性モーメントを得るための仮想回転軸に相当する慣性主軸である。また、中心位置123a、123bは、図形重心点として、公知技術により算出される。
なお、慣性主軸(中心線122a、122b)に代えて、撮像輪郭画像121aやCAD輪郭図形121bに対する最小面積の外接四角形を検索し、この外接四角形の長手方向の中心線を、撮像輪郭画像121aやCAD輪郭図形121bに対する中心線と見なすこともできる。
同様に、最小面積の外接四角形の対角線の交点を、撮像輪郭画像121aやCAD輪郭図形121bに対する中心位置と見なすことができる。
【0034】
次に、図6を参照しながら、図1に示したこの発明の実施の形態1による対物距離測定動作について説明する。
図6において、まず、演算装置101により、対物距離の測定動作が開始すると(ステップ600)、既に校正マップが作成済みであるか否かを判定する(ステップ601)。
ステップ601において、校正マップが未作成である(すなわち、NO)と判定されれば、実物線分長A、画像線分長aおよび対物距離Z(図1、図2参照)に関する校正マップを作成し、校正データテーブルとしてメモリ媒体102に格納する(ステップ602)。
一方、ステップ601において、既に校正マップが作成済みである(すなわち、YES)と判定されれば、マップ作成ステップ602は実行されない。
【0035】
上記校正データテーブルは、実物線分長A、画像線分長aおよび対物距離Zに関する比例係数Kのマップからなり、演算装置101内の対物基準位置測定手段を構成する第1の演算部によって算出される。
各比例係数Kは、種々の既知の実物線分長Aを有する針状のサンプル物品を、種々の対物距離Zとなる位置に配置して撮像し、各画像を実測して得られる画像線分長aに基づいて算出され、比例係数K(=Z×a/A)として、メモリ媒体102(図1参照)に格納される。
これにより、校正データテーブル上で、任意の対物距離Zおよび実物線分長Aを指定することができ、比例係数Kを逆算して求めることができる。
【0036】
こうして校正マップが作成されると、続いて、対象物品110の識別番号(対象物品番号)が既に入力済みであるか否かを判定し(ステップ603)、対象物品番号が未入力である(すなわち、NO)と判定されれば、操作入力機器103を介して対象物品番号を入力する(ステップ604)。
一方、ステップ603において、既に対象物品番号が入力済みである(すなわち、YES)と判定されれば、番号入力ステップ604は実行されない。
【0037】
こうして対象物品番号が入力されると、続いて、対象物品110に関するCADデータFが登録済みであるか否かを判定し(ステップ605)、CADデータFが未登録である(すなわち、NO)と判定されれば、保存媒体108からメモリ媒体102にCADデータFを転送登録する(ステップ606)。
一方、ステップ605において、既にCADデータFが入力済みである(すなわち、YES)と判定されれば、データ入力ステップ606は実行されない。
なお、メモリ媒体102に格納されるCADデータFは、各種CADツールに対する共通中間言語で登録される。
【0038】
こうしてCADデータFが入力されると、続いて、対象物品110の認識検定面を変更するか否かを判定し(ステップ607)、認識検定面を変更する(すなわち、YES)と判定されれば、認識検定面を新たに選択して設定するか、または、認識検定面を更新して変更する(ステップ608)。
一方、ステップ607において、認識検定面を変更しない(すなわち、NO)と判定されれば、認識検定面の変更ステップ608は実行されない。
判定ステップ607は、指定された認識検定面に関する検索・同定が完了したときに、次の認識検定面への切換えを指示するために実行される。
【0039】
こうして認識検定面が設定されると、続いて、多軸駆動制御装置106により電子カメラ105を駆動し、メモリ媒体102に書込み指定されている初期移動位置に電子カメラ105を移動させて、対象物品110の認識検定面を撮像する(ステップ610)。ここでは、代表的に、レンズ105aの光軸105bに直交する認識検定面110a(図2参照)を撮像する場合を例にとって説明する。
なお、電子カメラ105の初期移動位置は、対象物品110の中心位置123a(図5参照)の直上にあって、認識検定面110aの全体が最も大きく見える最接近位置に設定されている。
【0040】
次に、撮像ステップ610に続いて、認識検定面110aの撮像時点における光軸105bの方向を距離座標軸として設定記憶し、電子カメラ105の距離座標上の現在位置を基準座標値として記憶するとともに、撮像画面から輪郭画像を抽出して2値化し、慣性主軸や図形重心点の位置とともに、画像輪郭面積を算出する(ステップ611)。
【0041】
また、算出ステップ611に続いて、メモリ媒体102に格納されているCADデータFから種々の視点および倍率の平面図形を検索し、CADデータFの視点および倍率を調整(フィッティング)することにより、ステップ611で記憶された2値化輪郭画像と合同となる平面図形を抽出する(ステップ612)。
なお、フィッティング図形抽出ステップ612の詳細については、図7(第1の検索・同定手段719)を参照しながら、後述する。
【0042】
次に、ステップ612に続いて、所定の適合率以上(適合率が正常)の同定図形が抽出できたか否かを判定し(ステップ613)、所定精度以上であって正常適合率の同定図形が抽出できた(すなわち、YES)と判定されれば、CADデータF上であらかじめ決定しておいた複数の特定線分と、ステップ611による算出結果(撮像画像中の撮像線分)との対応を判定する(ステップ614)。
また、ステップ614で対応付けられた各特定線分に関して、画像線分長aを測定するとともに、CADデータFの中から実物線分長Aを抽出し、前述の各式(2)〜(4)から、直交面位置に換算した対物基準距離Z0を算出する(ステップ615)。
【0043】
また、ステップ602で作成した校正データテーブルから、実物線分長Aと対物基準距離Z0における比例係数Kとを抽出するとともに、以下の式(6)〜(8)により、校正された対物基準距離Z0を算出し、さらに、対物基準距離の相加平均を算出して、これを第1の対物基準距離Z1として記憶する(ステップ616)。
【0044】
Z0=K×A/a ・・・・・・・・・(6)
H=K×B/b、Z0=H±D ・・・(7)
Z0=K×A/a±ΔD ・・・・・・(8)
【0045】
次に、ステップ616で校正された複数の対物基準距離の変動バラツキが適正範囲にあるか否かを判定し(ステップ617)、距離バラツキ変動幅(対物基準距離の変動バラツキ)が適正範囲にある(すなわち、YES)と判定されれば、メモリ媒体102から設置情報データを抽出する(ステップ620)。
このとき読み出される設置情報は、基準面位置データおよび間隔距離寸法データであり、たとえば図2(a)の場合、基準面位置データは、座標原点Po(0、0、0)となり、認識検定面110aと基準面110bとの間隔距離寸法データは、奥行き寸法Dとなる。
【0046】
次に、データ抽出ステップ620に続いて、ステップ611で記憶された電子カメラ105の基準位置座標P(x、y、z)に基づいて、第2の対物基準距離Z2を算出する(ステップ621)。
第2の対物基準距離Z2は、たとえば図2(a)のように、電子カメラのレンズ105aの位置が基準位置である場合には、光軸105b(Z軸)上の基準面距離Hの座標値から、間隔寸法データ(奥行き寸法)Dを減算した値(=H−D)となる。
【0047】
続いて、ステップ616で算出された第1の対物基準距離Z1と、ステップ621で算出された第2の対物基準距離Z2とを比較して、比較偏差ΔZ(=|Z1−Z2|)を求め、比較偏差ΔZが所定値βよりも過大(異常)であるか否かを判定する(ステップ622)。
ステップ622において、比較偏差ΔZが適正であって、ΔZ≦β(すなわち、NO)と判定されれば、対物基準距離として第1の対物基準距離Z1または第2の対物基準距離Z2のいずれか一方、または両者の平均値として決定記憶する(ステップ623)。
【0048】
判定ステップ622および対物基準距離決定ステップ623は、何らかの手違いによる大幅な相違の有無を確認するための手段として機能しており、たとえば、対象物品110が間欠駆動のコンベア上にあって、その設置基準面110b(図2参照)が上下に変動し易い不安定なものである場合には、ステップ623において、第1の対物基準距離Z1が選択されるようになっている。
【0049】
また、判定ステップ622および対物基準距離決定ステップ623は、搬送治具の取り違えなどの異常な手違いの有無を確認するための手段として機能しており、たとえば、上記とは逆に、対象物品110の設置基準面110bおよび間隔距離寸法Dが、本来通りに極めて正確に安定している場合には、第2の対物基準距離Z2が選択されるようになっている。
さらに、第1の対物基準距離Z1および第2の対物基準距離Z2がともに同程度に信頼できる値であって、両者の平均値を採用することが望ましい場合には、各対物基準距離Z1、Z2の平均値を採用することをあらかじめ決定しておけばよい。
【0050】
次に、ステップ623に続いて、多軸駆動制御機構106に設けられたエンコーダ107からの位置検出出力に基づいて、電子カメラ105の現在位置(座標値)を検出する(ステップ624)。
また、ステップ624に続いて、電子カメラ105の現在座標値と、ステップ611で記憶された基準座標値との差分に、ステップ623で決定記憶された対物基準距離Z0を加算することによって、現在の電子カメラ105の位置における対物距離Zを算出し(ステップ625)、図6の処理ルーチンを終了する(ステップ627)。
【0051】
一方、ステップ613において、同定適合率が適正でなく、正常適合率の同定図形が抽出できない(すなわち、NO)と判定された場合、ステップ617において、距離バラツキ範囲が異常(すなわち、NO)と判定された場合、または、ステップ622において、比較偏差ΔZが所定値βよりも過大であって、ΔZ>β(すなわち、YES)と判定された場合には、いずれの場合も、直ちに、異品判定報知出力処理(ステップ626)を実行して、図6の処理ルーチンを終了する(ステップ627)。
【0052】
ステップ626においては、異品判定が実行されて、その報知出力が発生される。
なお、演算装置101は、動作終了ステップ627に続いて、他の制御動作を実行し、他の制御動作の実行後に、再度、動作開始ステップ600に復帰し、上記ステップ600〜627を繰り返し実行する。
【0053】
上記(図6参照)の距離測定用の処理動作を概括すると、電子カメラ105は多軸駆動制御機構106により自由移動可能に構成されており、最初に、全景撮像位置に初期移動して撮像を行い、演算装置101は、複数の特定線分の画像線分長aおよび実物線分長Aを対比して対物基準距離Z0を算出し、これを校正・平均化することにより、高精度な第1の対物基準距離Z1を得るようになっている。
また、上記特定線分の画像線分長aと実物線分長Aとの対応を判定するために、3次元図形のCADデータFによる検索・同定操作と、基準寸法データによる実物線分長Aの抽出とが行われる。
【0054】
また、対象物品110の設置基準面110bの位置データや、設置面110bと認識検定面110aとの間の間隔距離寸法データDなどの設置情報データとに基づいて、第2の対物基準距離Z2を取得し、これを第1の対物基準距離Z1と対比することによって、設置上の異常の有無が判定される。
また、第1の対物基準距離Z1と第2の対物基準距離Z2との間に特段の乖離が認められない場合には、どちらを信頼するかをあらかじめ決定しておき、第1の対物基準距離Z1または第2の対物基準距離Z2のいずれか一方、または、両者の平均値を、最終的な対物基準距離として採用するようになっている。
さらに、一旦、対物基準距離が算出されると、その後は、多軸駆動制御機構106に設けられたエンコーダ107の位置検出出力により、任意の電子カメラ位置での対物距離Zを常時監視・測定するようになっている。
【0055】
なお、図6において、撮像ステップ610は、初期移動撮像手段として機能し、算出ステップ611は、距離座標軸認識手段および画像特徴量算出手段(慣性主軸・画像重心点位置・輪郭面積などの算出手段)として機能し、フィッティング図形抽出ステップ612は、検索・同定手段として機能し、適合率判定ステップ613は、異品判定手段として機能し、距離算出ステップ615は、厚み補正手段および対物基準距離測定手段として機能し、ステップ616は、測定距離校正手段および平均化演算手段として機能している。
【0056】
また、距離バラツキ判定ステップ617は、距離バラツキ異常判定手段として機能し、距離算出ステップ621は、第2の対物基準距離測定手段として機能し、偏差判定ステップ622および異品判定報知ステップ626は、第2の異品判定手段として機能し、ステップ623は、対物基準距離確定手段として機能し、ステップ624は、現在値検出手段として機能し、ステップ625は、対物距離測定手段として機能し、ステップ626は、報知出力発生手段として機能している。
【0057】
次に、図7のフローチャートを参照しながら、図1に示したこの発明の実施の形態1による検索・同定用の処理動作について説明する。
図7において、まず、演算装置101により、検索・同定操作に関する動作が開始すると(ステップ700)、検索・同定を行うべき対象物品110の認識検定面110a(図2参照)を撮像し、撮像データEから輪郭画像を抽出して2値化し(ステップ701)、続いて、2値化された輪郭画像の画像特徴量(慣性主軸、画像重心点位置および輪郭画像面積S0など)を算出する(ステップ702)。
【0058】
なお、画像抽出ステップ701および特徴量算出ステップ702は、公知技術により実行可能である。
ただし、輪郭画像面積S0は、比較用仮想表示画面に換算した面積値であり、比較用仮想表示画面は、実際の撮像画像に比べて、たとえばR1倍の寸法比を有している。
【0059】
続いて、図6と同様の要領で、既に対物距離Zが測定可能な状態であって対物距離Zが測定済みであるか否かを判定し(ステップ703)、対物距離Zが未測定であって対物距離Zが未知である(すなわち、NO)と判定されれば、第1の検索・同定手段719内のタイマ設定ステップ710に移行する。
一方、ステップ703において、既に対物距離Zが測定済みであって対物距離Zが既知である(すなわち、YES)と判定されれば、第2の検索・同定手段729内のタイマ設定ステップ720に移行する。
【0060】
ステップ710においては、メモリ媒体102に格納されている3次元図形のCADデータFから抽出する平面図形の仮の視線方向が決定(選択および変更)されるとともに、タイムアウトチェック用のタイマが起動される。
続いて、チェック用のタイマがタイムアップ(検索完了)したか否かを判定し(ステップ711)、タイムアウトした(すなわち、YES)と判定されれば、異品判定報知出力処理(ステップ730)を実行して、図7の処理ルーチンを終了する(ステップ731)。
【0061】
一方、ステップ711において、タイムアウトしていない(すなわち、NO)と判定されれば、ステップ710で選択した視線方向であって且つ仮の倍率による平面図形を生成し、この平面図形の輪郭図形面積S1を算出する(ステップ712)。
ただし、輪郭図形面積S1は、上記比較用仮想表示画面に表示したときの面積である。
【0062】
続いて、ステップ702で算出された輪郭画像面積S0と、ステップ712で算出された輪郭図形面積S1とを比較して、両者が一致しているか否かを判定し(ステップ713)、両者が不一致である(すなわち、NO)と判定されれば、ステップ712に復帰して図形の倍率を変更し、比較判定ステップ713を再度実行する。
なお、ステップ712で変更される倍率は、ステップ713で比較された輪郭画像面積S0と輪郭図形面積S1との比率の平方根を乗算することにより、一義的に決定することができる。
【0063】
一方、ステップ713において、輪郭画像面積S0と輪郭図形面積S1とがほぼ等しい状態であって、両者が一致している(すなわち、YES)と判定されれば、CADデータFによる等価輪郭面積の平面図形に関して、慣性主軸および図形重心点の位置を算出する(ステップ714)。
続いて、CADデータFによる平面図形の慣性主軸および図形重心点の位置と、ステップ702で作成された輪郭画像の慣性主軸および画像重心点の位置とを重ね合わせて、電子カメラ105による輪郭画像と、CADデータFによる輪郭図形との重合面積Sを算出する(ステップ715)。
【0064】
続いて、ステップ715で算出された重合面積Sと、ステップ702で算出された輪郭画像面積S0との比率S/S0(適合率)の最大値が発見されたか否かを判定する(ステップ716)。
ステップ716において、適合率の最大値が未発見である(すなわち、NO)と判定されれば、ステップ715に復帰して、輪郭画像および輪郭図形の画像重心点の位置や慣性主軸の方向を相対的にずらしながら、再度、重合面積Sを算出し、判定ステップ716を再度実行する。
【0065】
一方、ステップ716において、適合率(重合面積Sと輪郭画像面積S0との比率S/S0)が最大となって最大値を示した(すなわち、YES)と判定されれば、続いて、最大の適合率が所定の閾値以上(適正)であるか否かを判定する(ステップ717)。
ステップ717において、まだ適正な適合率が得られておらず、適合率が適正でない(すなわち、NO)と判定されれば、ステップ710に復帰して、CADデータFから抽出する平面図形の視線方向を変更調整し、再度、上記処理ステップ710〜717を繰り返す。
【0066】
一方、ステップ717において、適正な適合率の平面図形が得られ、適合率が適正である(すなわち、YES)と判定されれば、ステップ710で起動されたタイマをリセットして(ステップ718)、図7の処理ルーチンを終了する(ステップ731)。
また、ステップ717で適正適合率の平面図形が得られる前に、タイマがタイムアップした場合には、ステップ711において、タイムアウトした(すなわち、NO)と判定され、前述のように、異品判定報知ステップ730に移行する。
なお、第1の検索・同定手段719は、上記ステップ710〜ステップ718により構成されている。
【0067】
ステップ703において、対物距離Zが既知である(すなわち、YES)と判定された場合には、第2の検索・同定手段729内のステップ720に移行し、メモリ媒体102に格納されている3次元図形のCADデータFから抽出する平面図形の仮の視線方向を決定するとともに、タイムアウトチェック用のタイマを起動する。
第2の検索・同定手段729は、第1の検索・同定手段719内のステップ710〜718とほぼ同様の処理ステップ720〜728で構成されており、タイマ設定ステップ720に続いて、タイムアップ判定ステップ721を実行する。
【0068】
ステップ721において、タイムアウトした(すなわち、YES)と判定されれば、異品判定報知ステップ730に移行し、タイムアウトしていない(すなわち、NO)と判定されれば、ステップ720で選択した視線方向であって且つ既に決定されている倍率R2による平面図形を生成し、この平面図形の輪郭図形面積S1を算出する(ステップ722)。
上記倍率R2は、実寸法によるCAD図形を上記比較用仮想表示画面に表示するときの倍率であり、以下の式(9)によって決定される。
【0069】
R2=R1×f/Z・・・・・・(9)
【0070】
ただし、式(9)において、fはレンズの焦点距離、Zは法線方向の対物距離、R1は電子カメラ105による撮像画像を比較用画面に表示するときの倍率である。
続いて、ステップ702で算出された輪郭画像面積S0と、ステップ722で算出された輪郭図形面積S1とを比較して、両者が一致しているか否かを判定し(ステップ723)、不一致である(すなわち、NO)と判定されれば、ステップ720に復帰して、CADデータFから抽出する平面図形の視線方向を変更設定し、ステップ720〜723を再度実行する。
【0071】
一方、ステップ723において、各輪郭面積がほぼ等しい状態となって一致した(すなわち、YES)と判定されれば、CADデータFによる等価輪郭面積の平面図形に関して、慣性主軸および図形重心点の位置を算出し(ステップ724)、続いて、CADデータFによる慣性主軸および図形重心点の位置と、ステップ702で作成された輪郭画像の慣性主軸および画像重心点の位置とを重ね合わせて、電子カメラ105による輪郭画像とCADデータFによる輪郭図形との重合面積Sを算出する(ステップ725)。
【0072】
続いて、ステップ725で算出された重合面積Sと、ステップ702で算出された輪郭画像面積S0との比率S/S0(適合率)の最大値が発見されたか否かを判定し(ステップ726)、最大値が発見されていない(すなわち、NO)と判定されれば、ステップ725に復帰して、輪郭画像および輪郭図形の重心点位置や慣性主軸の方向を相対的にずらしながら、再度、重合面積Sを算出し、判定ステップ726を再度実行する。
【0073】
ステップ726において、適合率(比率S/S0)が最大になった(すなわち、YES)と判定されれば、続いて、この適合率が所定の閾値以上(適正)であるか否かを判定し(ステップ727)、適正でない(すなわち、NO)と判定されれば、ステップ720に復帰して、CADデータFから抽出する平面図形の視線方向を変更調整し、再度、上記処理ステップ720〜727を繰り返す。
一方、ステップ727において、適合率が適正である(すなわち、YES)と判定されれば、ステップ720で起動されたタイマをリセットして(ステップ728)、図7の処理ルーチンを終了する(ステップ731)。
【0074】
ステップ727で適正適合率の平面図形が得られる前に、タイマがタイムアップしたときには、ステップ721において、タイムアウト(すなわち、NO)と判定され、前述の異品判定報知ステップ730に移行する。
【0075】
異品判定報知ステップ730は、上記のように、ステップ710、720で起動されたタイマが適正平面図形の取得前にタイムアップした場合、または、種々の視線変更後および倍率調整後に適正平面図形が取得されなかった場合に実行され、対象物品110とCAD図形とが一致していない異品であると見なして報知出力を発生する。
また、動作終了ステップ731は、ステップ718、728または730に続いて実行される。演算装置101は、ステップ731に続いて、他の制御動作を実行し、他の制御動作の実行後に、再度、開始ステップ700に移行して、次の認識検定面に関する検索・同定処理(ステップ700〜731)を繰り返し実行する。
【0076】
なお、第1の検索・同定手段719(図6内のフィッティング抽出ステップ612に相当)において、ステップ710および712は、1次調整手段として機能し、ステップ715は、2次調整手段として機能し、ステップ717は、適合率判定手段として機能する。
同様に、第2の検索・同定手段729において、ステップ720は、1次調整手段として機能し、ステップ725は、2次調整手段として機能し、ステップ727は、適合率判定手段として機能する。
また、ステップ730は、報知出力発生手段として機能する。
【0077】
ただし、図6内のフィッティング抽出ステップ612は、画像線分長aと実物線分長Aとを対応付けるために実行された同定処理であるのに対し、図7内の第1の検索・同定手段719は、対象物品110の全体または特定部分に関して、撮像された認識検定面の全体を同定処理するための処理である。
【0078】
上記(図7参照)の検索・同定用の処理動作は、概括すると、対物距離Zが既知であるか未知であるかによって、以下のように分かれている。
まず、対物距離Zが未知である一般的な場合には、第1の検索・同定手段719内のステップ710、712からなる1次調整手段は、比較用仮想画面上において、電子カメラ105による撮像輪郭画像の関連面積S0と、CADデータFに基づく輪郭図形の輪郭関連面積S1とを算出し、輪郭の形状を問わずに、単に各関連面積S0、S1が一致するようにCAD図形の倍率および視線を調整する。ここで、各関連面積としては、輪郭画像および輪郭図形の内部面積または最小外接四角形の面積などの対象物品110の平面的な大きさを表す特徴量が使用される。
【0079】
この場合、ステップ715からなる2次調整手段715は、撮像データEに基づく撮像輪郭画像と、CADデータFに基づく輪郭図形との重なり合った部分の重合面積Sを算出し、重合面積Sが最大となるように、輪郭画像または輪郭図形の中心位置と中心線の傾斜角度とを移動調整する。ここで、中心位置および中心線としては、たとえば、画像や図形の重心点や慣性主軸、または最小外接四角形の対角線の交点や長手方向中心線が使用される。
【0080】
一方、対物距離Zが既知である場合には、第2の検索・同定手段729内のステップ720からなる1次調整手段は、比較用仮想画面上において電子カメラ105による撮像輪郭画像の関連面積S0と、CADデータFに基づく輪郭図形の輪郭関連面積S1とを算出し、輪郭の形状を問わずに、単に各関連面積が一致するようにCAD図形の視線を調整する。ここで、CAD図形の倍率は、既知である対物距離Zに関連した固定値が使用される。
この場合、ステップ725からなる2次調整手段は、対物距離が未知である場合と同様に、撮像輪郭画像とCADデータFに基づく輪郭図形との重なり合った部分の重合面積Sを算出し、重合面積Sが最大となるように、輪郭画像または輪郭図形の中心位置と中心線の傾斜角度とを移動調整する。
【0081】
また、ステップ717、727からなる適合率判定手段は、CAD図形に対する視線を変更調整しながら、重合面積Sと輪郭図形の内部面積S0との比率S/S0(適合率)が所定の閾値以上となったときに同定を決定し、同定されなかったときには、異品判定を実行して異常報知出力を発生する。
【0082】
なお、第1の検索・同定手段719においては、ステップ710(1次調整手段)で視線調整された図形形状が実際の画像と全く異なっていても、ステップ712(1次調整手段)の倍率調整で無理やり輪郭面積を一致させる。その後、ステップ715(2次調整手段)で図形位置調整を行い、所定の適正適合率が得られない場合には、再度、ステップ710(1次調整手段)に戻って、視線方向を変更する処理動作を繰り返すことになる。
【0083】
一方、第2の検索・同定手段729においては、ステップ720(1次調整手段)で視線調整された図形形状が実際の画像と全く異なっていても、まずは、固定倍率の輪郭図形面積S1と輪郭画像面積S0とが一致する視線方向を定めてから、ステップ725(2次調整手段)で図形位置調整を行う。その後、所定の適正適合率が得られなければ、再度、ステップ720(1次調整手段)に戻って、視線方向を変更する処理動作を繰り返すようになっている。
このとき、各面積S1、S0の倍率が固定されているので、検索・同定の所要時間を大幅に短縮することができる。
【0084】
以上の通り、この発明の実施の形態1によれば、2眼カメラや移動カメラを用いることなく、1眼の電子カメラ105を用いて対物距離Zを測定することができる。
また、画像データEに基づく複数の特定線分に関する画像線分長aと、CADデータFに基づく実物線分長Aとを対比して、その平均値によって対物基準距離Z0を測定することにより、高精度な対物基準距離の測定を実現することができる。また、検出された対物基準距離Z0を、対象物品110とCADデータ図形の各部の検索・同定の参考情報として付加することができる。
【0085】
また、演算装置101は、バラツキ異常判定手段を含み、複数の特定線分に対応した対物基準距離の変動幅が過大であることを判定することにより、異常報知出力を発生することができ、各部の検索・同定制御を行う前に異品を除去することができる。
また、演算装置101は、距離座標軸認識手段、現在位置検出手段および対物距離測定手段を含み、検出された対物距離Zを参考情報として付加することにより、対象物品110とCADデータ図形の各部との検索・同定を行うことができる。また、一旦、対物基準距離を測定しておけば、その後は、現在の電子カメラ105の位置または対象物品110の位置に対応した対物距離を、常時監視測定することができ、その結果を各部の検索・同定制御に利用することができる。
【0086】
また、初期移動撮像手段における撮像位置は、対象物品番号に加えて、認識検定面の識別番号を指定することによって特定されるので、順次指定される認識検定面の変更に応答して、電子カメラ105による対象物品110の撮像面とCAD図形の読出し図形面とが同じ部位を示すように連動させることにより、速やかに対物基準距離を測定することができる。
【0087】
また、対物基準距離測定手段は、校正データテーブルおよび測定距離校正手段を含み、レンズ105aの歪を補正可能に構成されているので、さらに高精度な対物基準距離を測定することができる。
また、対物基準距離測定手段は、厚み補正手段を含み、特定線分が認識検定面の光軸位置よりも遠い法線距離位置にあれば奥行き寸法Dを減算し、特定線分が認識検定面の光軸位置よりも近い法線距離位置にあれば奥行き寸法Dを加算することにより、測定された対物基準距離Z0を、認識検定面の光軸位置における光軸直行面に対する電子カメラ105との法線距離に換算するようになっているので、認識検定面が斜面になっている場合や、立体奥行き線分が画像表示されている場合であっても、認識検定面の中央部における光軸直交面に換算して、対物基準距離を測定することができる。
【0088】
また、設置情報データ、第2の対物距離測定手段、第2の異品判定手段および対物基準距離確定手段を備え、対物基準距離から算出した第1の対物距離Z1または設置情報データから算出した第2の対物距離Z2とのいずれか一方を選択するか、または両者の平均値を算出し、対象物品110の設置基準面が変動し易い不安定なものである場合には、第1の対物距離Z1を選択し、対象物品110の設置基準面および間隔距離寸法が、本来は極めて正確に安定している場合には、第2の対物距離Z2を選択し、各対物距離Z1、Z2がともに同程度に信頼できる値であって、両者の平均値を採用するのが望ましい場合には、平均値を採用することができる。また、第1の対物距離Z1は、異常な手違い(搬送治具の取り違いなど)の有無を確認する手段に活用することもできる。
さらに、第2の異品判定手段により、各部の検索・同定制御を実行する前に、異品を除去することができる。
【0089】
実施の形態2.
なお、上記実施の形態1では、多軸駆動制御機構106を用いて電子カメラ105を移動させたが、対象物品110を移動させてもよい。
以下、図8〜図10を参照しながら、この発明の実施の形態2について説明する。
【0090】
図8はこの発明の実施の形態2を概略的に示すブロック構成図であり、前述(図1参照)と同様のものについては、前述と同一符号を付して、または符号の後に「A」を付して、詳述を省略する。
図9および図10はこの発明の実施の形態2による動作を示すフローチャートであり、図9は距離測定プログラムを示し、図10は全体動作プログラムを示している。
【0091】
図8において、多軸駆動制御機構106Aは、演算装置101Aからの制御指令出力に応答する多軸コントローラおよびサーボアンプを含み、対象物品110を少なくとも3軸方向に移動させるように構成されている。
この場合、多軸駆動制御機構106Aの各軸に設けられたエンコーダ107は、対象物品110の座標位置を測定するための位置検出情報を演算装置101Aに入力する。
【0092】
メモリ媒体102Aには、距離測定プログラム(図9参照)と、全体動作プログラム(図10参照)による検索・同定プログラム、基本的なプログラム(図示しないシステム稼動プログラムや入出力通信プログラムなど)と、距離測定プログラム(図9参照)で適用される校正データテーブルと、対象物品番号を付した3次元図形のCADデータFや各部の実寸法を算出するための基準寸法データと、対象物品110の遠隔退避位置データや検定撮像位置データと、電子カメラ105による撮像データEと、3次元図形のCADデータFに基づいて対象物品110を所定方向から見た平面図形変換データとが格納されている。
ただし、対象物品110が同じであっても、複数の認識検定面を有する場合には、メモリ媒体102の格納データは、認識検定面番号別に格納されている。また、撮像データや平面図形変換データは、可変倍率で表示機器104に表示されるようになっている。
【0093】
次に、図9のフローチャートを参照しながら、図8に示したこの発明の実施の形態2による対物距離測定動作について説明する。
図9において、ステップ900〜914および923〜927は、前述(図6参照)のステップ600〜614および623〜627に、それぞれ対応している。
【0094】
まず、演算装置101Aによる対物距離測定の処理動作が開始すると(ステップ900)、校正マップが作成済みか否かを判定し(ステップ901)、校正マップが未作成であれば、校正マップを作成して校正データテーブルとしてメモリ媒体102Aに格納する(ステップ902)。
校正データテーブルは、種々の既知の実物線分長Aの針状サンプル物品を、種々の対物距離Zの位置に置いて実測した画像線分長aに基づいて算出され、比例係数K(=Z×a/A)としてメモリ媒体102Aに格納されており、任意の対物距離Zおよび実物線分長Aを指定することによって比例係数Kの逆算を可能にしている。
【0095】
続いて、対象物品110の識別番号(対象物品番号)が入力済みか否かを判定して(ステップ903)、対象物品番号が未入力であれば、操作入力機器103から対象物品番号を入力し(ステップ904)、対象物品110に関するCADデータFが登録済みか否かを判定して(ステップ905)、CADデータFが未登録であれば、保存媒体108からメモリ媒体102AにCADデータFを転送登録し(ステップ906)、認識検定面を変更するか否かを判定して(ステップ907)、変更する場合には、認識検定面を新たに設定したり、または更新変更する(ステップ908)。
【0096】
次に、多軸駆動制御機構106Aにより対象物品110を駆動し、メモリ媒体102Aに書込み指定されている遠隔退避位置に対象物品110を移動させて、対象物品110の認識検定面を遠隔撮像し、撮像データEに基づく画像中心および画像の大きさから判断して、認識検定面の全体が最大表示される位置を算定する(ステップ909)。
【0097】
続いて、多軸駆動制御機構106Aにより対象物品110を駆動し、ステップ909で算出された初期移動位置に対象物品110を移動させて、対象物品110の認識検定面を撮像する(ステップ110)。
ここで、初期移動位置は、対象物品110の中心位置の直上にあって認識検定面全体が最も大きく見える接近位置に設定されている。
続いて、撮像画面から輪郭画像を抽出し且つ2値化して、慣性主軸や重心位置および画像輪郭面積を算出し(ステップ911)、また、メモリ媒体102Aに格納されているCADデータFにより種々の視点および倍率の平面図形を検索して、ステップ911で記憶された2値化輪郭画像と合同となる平面図形を抽出する(ステップ912)。
ステップ912は、前述(図7参照)の第1の検索・同定手段719に相当する。
【0098】
続いて、所定の適合率以上の同定図形が抽出できたか否かを判定し(ステップ913)、所定精度の同定図形が抽出できた場合には、CADデータF上であらかじめ決定しておいた比較的短小の特定線分と、ステップ911による撮像画像中の撮像線分との対応を判定する(ステップ914)。
次に、短小特定線分が最大表示されるように、対象物品110を接近移動させてから撮像を行う(ステップ915)。ここで、ステップ915による撮像画面は、認識検定面の一部を拡大撮像したものとなる。
【0099】
続いて、ステップ915による撮像時点におけるレンズ105aの光軸方向を距離座標軸として設定記憶し、対象物品110の距離座標上の現在位置を基準座標値として記憶するとともに、対応付けられた短小特定線分に関して、前述の式(6)により画像線分長aを測定し、CADデータFの中から実物線分長Aを抽出し、前述の式(2)〜(4)により、直交面位置に換算した対物基準距離Z0を算出する(ステップ916)。
【0100】
次に、実物線分長Aと対物基準距離Z0における比例係数Kとを、ステップ902で作成した校正データテーブルから抽出するとともに、前述の式(6)〜(8)によって校正された対物基準距離Z0を算出し、これを対物基準距離Z0として決定記憶する(ステップ923)。
【0101】
続いて、多軸駆動制御機構106Aに設けられたエンコーダ107からの位置検出出力により、対象物品110の現在座標値を検出し(ステップ924)、また、現在座標値とステップ916で記憶された基準座標値との差分に、ステップ923で決定記憶された対物基準距離Z0を加算することにより、対象物品110の現在位置における対物距離Zを算出し(ステップ925)、図9の処理ルーチンを終了する。
【0102】
一方、ステップ913での判定結果が「NO」であって、同定適合率が適正ではなかった場合には、異品判定して報知出力を発生させ(ステップ926)、動作終了ステップ927に移行する。
演算装置101Aは、動作終了ステップ927において、他の制御動作を実行した後に、再度、動作開始ステップ900に復帰するようになっている。
【0103】
上記(図9参照)の距離測定動作を概括すると、対象物品110は、多軸駆動制御機構106Aにより自由移動可能に構成されており、まず、電子カメラ105との衝突を避けて遠隔退避位置に移動し、続いて、認識検定面全体が最大表示される第1位置に接近移動する。ここで、演算装置101Aは、短小特定線分を定めて実物線分長AをCADデータFから抽出し、また、対象物品110を第2位置に接近移動させて短小特定線分が最大表示される位置で画像線分長aを測定し、実物線分長Aと対比することによって対物基準距離Z0を算出する。
このように、接近測定を実行することにより、検出精度を向上させることができる。
【0104】
また、このとき、特定線分の画像線分長aと実物線分長Aとの対応を判定するために、3次元図形のCADデータFによる検索・同定操作と、基準寸法データによる実物線分長の抽出とが実行される。
また、一旦、対物基準距離Z0が算出されると、その後は、多軸駆動制御機構106Aに設けられたエンコーダ107の位置検出出力によって、任意の対象物品110の位置での対物距離Zを常時監視・測定することができる。
【0105】
なお、図9において、ステップ910は、初期移動撮像手段として機能し、ステップ911は、慣性主軸・重心位置・輪郭面積などの画像特徴量算出手段として機能し、ステップ912は、検索・同定手段として機能し、ステップ913は、異品判定手段として機能し、ステップ915は、接近移動撮像手段として機能し、ステップ916は、距離座標軸認識手段、厚み補正手段および対物基準距離測定手段として機能し、ステップ923は、測定距離校正手段および対物基準距離確定手段として機能し、ステップ924は、現在値検出手段として機能し、ステップ925は、対物距離測定手段として機能し、ステップ926は、報知出力発生手段として機能している。
【0106】
次に、図10を参照しながら、図8に示したこの発明の実施の形態2による全体動作について説明する。
図10において、まず、演算装置101Aにより対物距離測定および検索・同定操作に関する全体動作が開始すると(ステップ950)、指定された物品番号に関する対象物品110の認識検定動作の開始指令が出力されているか否かを判定する(ステップ951)。
【0107】
ステップ951において、動作開始指令が与えられていない(すなわち、NO)と判定されれば、図10の処理ルーチンを直ちに終了し(ステップ977)、動作開始指令が与えられている(すなわち、YES)と判定されれば、続いて、認識検定面の指定(または、更新指定)を実行するか否かを判定する(ステップ952)。
ステップ952において、認識検定面の指定または更新指定を実行しない(すなわち、NO)と判定されれば、ステップ958(後述する)に移行し、認識検定面の指定または更新指定を実行する(すなわち、YES)と判定されれば、以下のステップ953〜956を実行する。
【0108】
まず、認識検定面番号を順次選択して更新指定し(ステップ953)、続いて、対物距離の測定が完了しているか否かを判定し(ステップ954a)、対物距離が未測定である(すなわち、NO)と判定されれば、距離測定用の処理動作(図6、図9参照)を実行する(ステップ955a)。
また、対象物品110(または、前述のように電子カメラ105)を検定面撮像位置に移動して、この認識検定面に対応したCAD図形面を読み出し、表示機器104に表示させ(ステップ956)、ステップ958に移行する。
【0109】
一方、ステップ954aにおいて、対物距離の測定が完了している(すなわち、YES)と判定されれば、続いて、CADデータFを参照し、ステップ953で選択・更新された認識検定面の高さ位置が、前回の認識検定面の高さ位置に比べて変化しているか否かを判定する(ステップ954b)。
ステップ954bにおいて、認識検定面の高さ位置が変更されている(すなわち、YES)と判定されれば、認識検定面の高さの差分を、対物距離測定手段で測定される対物距離Zに代数加算することにより、対物距離の対象となる認識検定面を切換え補正して(ステップ955b)、ステップ956に移行する。認識検定面の高さの差分は、CADデータFから算出される。
また、ステップ954bにおいて、認識検定面の高さ位置が変更されていない(すなわち、NO)と判定されれば、ステップ955bを実行せずに、ステップ956に移行する。
上記ステップ952〜956は、連動切換手段957を構成している。
【0110】
ステップ958において、演算装置101Aは、対象物品110を撮像し、輪郭画像を抽出して2値化する。続いて、ステップ958で得られた輪郭画像の慣性主軸や重心点、または輪郭画像面積などの画像特徴量を算出する(ステップ959)。
続いて、演算装置101Aからの指示の有無に基づき、高精度な検索・同定が必要か否かを判定する(ステップ960)。このとき、ステップ960による判定結果は、たとえば、認識検定面番号に付随する識別番号によって指示される。
【0111】
ステップ960において、高精度な検索・同定が不要である(すなわち、NO)と判定されれば、前述(図7参照)の第2の検索・同定手段729に異品判定報知ステップ730を付加したフィッティング処理(ステップ961)を実行し、ステップ964に移行する。
一方、ステップ960において、高精度な検索・同定が必要である(すなわち、YES)と判定されれば、ステップ961と同様のフィッティング処理(ステップ962)を実行し、続いて、前述(図7参照)の第1の検索・同定手段719(図7参照)にステップ730を付加したフィッティング処理(ステップ963)を実行し、ステップ964に移行する。
各ステップ961、962においては対物距離Zが使用されるのに対し、ステップ963においては、対物距離Zは使用されていない。
【0112】
ステップ964において、演算装置101Aは、電子カメラ105の光軸方向(視線方向)を変更して適合判定を行う必要があるか否かを判定する。このとき、ステップ964の判定基準は、たとえば、認識検定面の番号に付随してメモリ媒体102Aの中で指定されているものとする。
ステップ964において、視線方向の変更が不要である(すなわち、NO)と判定されれば、直ちに図10の処理ルーチンを終了する(ステップ977)。
【0113】
一方、ステップ964において、視線変更が必要である(すなわち、YES)と判定されれば、電子カメラ105の平面座標位置を所定量だけ移動するとともに、光軸方向を元の注目点を見つめる方向に変更する(ステップ965)。
また、CAD図形の視点および視線方向を、ステップ965による電子カメラの移動調整と連動して移動調整し、同じ位置から同じ視界を観察する状態にする(ステップ966)。
上記ステップ965および966は、連動調整手段967を構成している。
【0114】
また、ステップ966に続いて、ステップ965で移動調整された対象物品110を撮像して、慣性主軸・重心位置・輪郭画像面積などの画像特徴量を算出し(ステップ970)、続いて、ステップ966で連動調整された視点および視線方向によるCAD平面図形の慣性主軸・重心位置・輪郭図形面積などの図形特徴量を算出する(ステップ971)。
【0115】
次に、ステップ970で算出された輪郭画像面積と、ステップ971で算出された輪郭図形面積とが適正一致しているか否かを判定し(ステップ972)、適正一致していない(すなわち、NO)と判定されれば、異品判定報知ステップ976に移行する。
一方、ステップ972において、適正一致している(すなわち、YES)と判定されれば、輪郭画像および輪郭図形の各重心点および慣性主軸方向を一致させたときに重なり合う重合面積を算出する(ステップ973)。
続いて、重合面積と輪郭面積との比率(適合率)が正常か否かを判定し(ステップ974)、適合率が正常である(すなわち、YES)と判定されれば、直ちに図10の処理ルーチンを終了し(ステップ977)、適合率が正常でない(すなわち、NO)と判定されれば、異品判定報知ステップ976に移行する。
上記ステップ970〜974は、総合適合判定手段975を構成している。
【0116】
異品判定報知ステップ976は、ステップ972の判定結果が「NO」(輪郭面積が適正一致していない)の場合、または、ステップ974の判定結果が「NO」(適合率が正常でない)の場合に作用し、異品判定による報知出力を発生する。
動作終了ステップ977は、ステップ951の判定結果が「NO」(動作開始指令が与えられていない)の場合、ステップ964の判定結果が「NO」(視線変更の必要がない)の場合、または、ステップ974の判定結果が「YES」(適合率が正常である)の場合に作用する。
動作終了ステップ977において、演算装置101Aは、他の制御を実行した後に再度開始ステップ950に移行し、次の認識検定面に関する検索・同定を実行するようになっている。
【0117】
また、図10において、ステップ961および962は、第2の検索・同定手段として機能し、ステップ963は、第1の検索・同定手段として機能し、ステップ972は、面積判定手段として機能し、ステップ974は、重合度判定手段として機能し、ステップ976は、報知出力発生手段として機能している。
【0118】
上記(図9、図10参照)の処理動作を概括すると、検索・同定において、連動切換手段957は、順次指定される認識検定面の変更に応答して、電子カメラ105による対象物品110の撮像面とCAD図形の読出し図形面とが同じ部位を示すように連動するので、第1または第2の検索・同定手段における図形検索の範囲が限定される。これにより、検索・同定に要する時間を大幅に短縮することができる。
また、第2の検索・同定手段(ステップ961、962)は、対物距離が既知の場合に、高速同定するための手段として適用することができる。
また、第1の検索・同定手段(ステップ963)は、対物距離が未確定の場合、および、第2の検索・同定手段によって検索・同定された後に倍率を微小増減してさらに高精度に同定する必要がある場合に、適用することができる。
【0119】
さらに、第1または第2の検索同定手段によって所定の撮像画面の検索・同定を実行した後に、電子カメラ105の位置および光軸方向を移動調整するとともに、CAD図形の視点および視線方向をも連動して移動調整し、同じ位置から同じ視界を観察する状態にして、認識検定面の斜視状態における適合性を総合的に確認判定することができる。
【0120】
以上の通り、この発明の実施の形態2によれば、CADデータFは、任意の線分に関する実寸法を算定するための基準寸法データを含み、また、演算装置101Aは、初期移動撮像手段、接近移動撮像手段および対物基準距離測定手段を含み、特定線分に関する画像線分長aとCADデータFに基づく実物線分長Aとを対比して対物基準距離Z0を測定するので、前述と同様に、2眼カメラや移動カメラを用いることなく、1眼の電子カメラ105を用いて対物距離Zを測定することができる。
特に、短小特定線分に関する接近撮像の画像線分長aと、CADデータFに基づく実物線分長Aとを対比して、対物基準距離Z0を測定するので、さらに高精度な対物基準距離を測定することができる。
【0121】
また、前述の作用効果に加えて、検出された対物基準距離を、対象物品110とCADデータ図形との各部の検索・同定用の参考情報として、付加することができる。
また、演算装置101Aは、距離座標軸認識手段、現在位置検出手段および対物距離測定手段を含み、検出された対物距離が参考情報として付加されて、対象物品110とCADデータ図形との各部の検索・同定を行うので、一旦、対物基準距離を測定しておけば、その後は、電子カメラ105の現在位置または対象物品110の現在位置に対応した対物距離を常時監視測定することができ、その結果を、各部の検索・同定制御に利用することができる。
【0122】
また、初期移動撮像手段(撮像ステップ610、910)は、遠隔退避位置を経由して初期位置に移動するようになっているので、対象物品110が搬入されたときに電子カメラ105に衝突することはない。
また、対物基準距離測定手段における同定図形の検索は、CADデータFに基づく平面図形の輪郭が電子カメラ105による撮像輪郭画像と重なり合うように視線および倍率を検索して実行されるとともに、演算装置101Aは、異品判定手段を含み、対象物品110が異品である場合に報知出力を発生するので、各部の検索・同定制御を実行する前に異品を除去することができる。
【0123】
また、演算装置101Aは、対物距離測定手段と第1および第2の検索・同定手段とを含み、対物距離が未知かまたは既知かに応じて第1または第2の検索同定手段を使い分けることにより、第1の検索・同定手段を対物基準距離の測定手段として適用し、対物距離が既知となった後は第2の検索・同定手段を用いて高速同定することができる。
また、第2の検索・同定手段によって概略の検索・同定を実行した後に、第1の検索・同定手段を併用して、対物距離の測定誤差の範囲で検索・同定の倍率を微小増減することにより、さらに高精度な同定を効率的に行うことができる。
【0124】
また、CADデータFは、任意の線分に関する実寸法を算定するための基準寸法データを含み、演算装置101Aは、現在位置検出手段と、対物基準距離測定手段と、第1または第2の対物距離測定手段の少なくとも一方とを含み、第1または第2の対物距離測定手段のいずれか一方、または、両者の平均値が対物距離測定手段として適用することにより、対象物品110の設置基準面が変動し易い不安定な場合には第1の対物距離測定手段を選択し、対象物品110の設置基準面と間隔距離寸法が、本来は極めて正確に安定している場合には、第2の対物距離測定手段を選択することができる。また、第1の対物距離測定手段は、異常な手違い(搬送治具の取り違えなど)の有無を確認するための手段として活用することができる。
【0125】
また、第1、第2の検索・同定手段は、それぞれ、撮像輪郭画像の関連面積とCADデータFに基づく輪郭図形の輪郭関連面積とを一致させるための1次調整手段と、撮像輪郭画像とCADデータFに基づく輪郭図形との重合面積を最大化するための2次調整手段と、適合率判定手段とを含み、第2の検索・同定手段において、1次調整手段は、CAD図形の倍率が対物距離に応じて決定される固定値となっているので、対物距離が既知である場合には、種々の図形倍率に置ける2次調整を必要とせず、検索・同定のための所要時間を大幅に短縮することができる。
また、所定の適合率が得られなかったときには、異品異常報知を発生して、無駄な検索・同定操作を打ち切ることができる。
【0126】
また、1次調調整手段におけるCAD図形の視線の調整は、単に、視線の平面位置を移動させるものであり、視線の方向は、常に認識検定面と直交する電子カメラ105の光軸方向と同一であり、この状態で検索・同定を実行した後に連動調整手段により電子カメラ105の位置および光軸方向を移動調整するとともに、CAD図形の視点および視線方向をも連動して移動調整し、同じ位置から同じ視界を観察する状態にして、連動調整手段により移動調整された電子カメラ105による輪郭画像とCADデータFによる輪郭図形との一致度合いを判定して、異品判定報知出力を発生するので、まずは、平面的な一致判定を実行してから、必要に応じて、斜視・立体的な一致判定を実行することにより、高効率且つ高精度な検索・同定を実現することができる。
【0127】
さらに、演算装置101Aは、連動切換手段および対物距離補正手段を含み、順次指定される認識検定面の変更に応答して、電子カメラ105による対象物品110の撮像面と、CAD図形の読出し図形面とが同じ部位を示すように連動するので、第1または第2の検索・同定手段における図形検索の範囲が限定され、検索・同定の所要時間を大幅に短縮することができる。
【0128】
実施の形態3.
以上の説明から明らかなように、この発明は、対象物品110に関する3次元図形のCADデータFを活用しながら、1眼の電子カメラ105によって高精度に対物距離Zを測定するとともに、高精度な対物距離情報を用いることにより、CADデータFで示された対象物品と実際の対象物品110との同一性を高速且つ高精度に判定するものであり、この目的を達成可能な技術範囲内で種々の変形例を採用することができる。
【0129】
すなわち、電子カメラ105と対象物品110との相対位置移動手段として、上記実施の形態1、2では、多軸駆動制御機構106または106Aにより、電子カメラ105または対象物品110の一方のみを移動させたが、混合駆動方式を採用してもよい。
たとえば、間欠駆動されるコンベア(図示せず)により、対象物品110を電子カメラ105の下に移動させるとともに、対象物品110の位置をコンベア駆動用サーボモータにより任意に制御可能に構成し、電子カメラ105を上下方向およびコンベアの直交方向のみに移動可能に構成することもできる。
【0130】
また、対象物品110の設置状況として、上記実施の形態1では、対象物品110を床面設置して、対象物品110の上面を認識検定面110aとしたが、床面設置した状態で対象物品110の側面を認識検定面としてもよく、または、対象物品110を壁面設置して、壁面との平行面を認識検定面としてもよく、種々の借置き設置形態が想定される。
特に、対象物品110の認識検定面が、電子カメラ105の光軸方向に対して斜面となっている場合(図3参照)には、電子カメラ105の光軸方向を調整して、斜面と直交する光軸となるように自動調整することも可能であり、この場合の傾斜角αは、CADデータFから読み出すことによって、自動設定することができる。
【0131】
また、対象物品110の輪郭画像の検出精度に関して、上記実施の形態1、2では、電子カメラ105として白黒カメラを用いた場合について説明したが、カラーカメラを使用すれば、対象物品110内の色違いの特定部分について、輪郭画像を容易に抽出することができる。
また、上記実施の形態2において、多数の短小特定線分を選択して、上記実施の形態1と同様に、各対物基準距離を平均化して算出して、高精度化を実現することもできる。
【0132】
さらに、この発明の用途例として、上記実施の形態1、2では、詳細に言及しなかったが、たとえば、電子基板の組み立て工程で使用した場合に、CADデータFを部品単位で構築しておくことにより、実装部品の欠品・異品組付けなどの外観検査に有効に使用することができる。
【0133】
【発明の効果】
以上のように、この発明によれば、可変相対位置から対象物品を撮像するためのレンズを有する電子カメラと、電子カメラと対象物品との相対位置を制御する多軸駆動制御機構と、対象物品に関して任意の方向から観察した可変倍率の平面図形を生成するための3次元図形のCADデータおよび検索・同定プログラムが格納されたメモリ媒体と、検索・同定プログラムによってCADデータに基づく平面図形が対象物品に対する撮像画像の形状と一致するように合同図形の検索・同定を行う演算装置とを備え、演算装置は、少なくとも対象物品の認識検定面の全体が撮像画像内に包含される限界内で、対象物品に接近して対象物品の接近画像を撮像する初期移動撮像手段と、接近画像の中の特定線分に対する画像線分長aを算出するとともに、同定図形を検索して特定線分に対するCADデータ上の実物線分長Aを抽出し、画像線分長aおよび実物線分長Aと既知数であるレンズの焦点距離fとに基づいて、対物基準距離Z0を、以下の式(1)、
Z0=f×A/a ・・・(1)
により算出して記憶する対物基準距離測定手段と、特定線分として複数の特定線分を定め、複数の特定線分に基づいて、式(1)から算出された各対物基準距離の平均値を、認識検定面に対する最終的な対物基準距離として算定する平均化演算手段とを含むので、対象物品に関する3次元図形のCADデータを活用しながら、1眼カメラによって高精度な対物距離測定を実現した撮像対象物品の認識検定システムが得られる効果がある。
【図面の簡単な説明】
【図1】この発明の実施の形態1を示すブロック構成図である。
【図2】この発明の実施の形態1によるレンズと対象物品との相対位置関係を示す説明図である。
【図3】この発明の実施の形態1によるレンズと傾斜した対象物品との相対位置関係を示す説明図である。
【図4】この発明の実施の形態1による画像線分長の算出処理を示す説明図である。
【図5】この発明の実施の形態1による検索・同定処理を示す説明図である。
【図6】この発明の実施の形態1による距離測定動作を示すフローチャートである。
【図7】この発明の実施の形態1による検索・同定動作を示すフローチャートである。
【図8】この発明の実施の形態2を示すブロック構成図である。
【図9】この発明の実施の形態2による距離測定動作を示すフローチャートである。
【図10】この発明の実施の形態2による全体動作を示すフローチャートである。
【符号の説明】
101、101A 演算装置、102、102A メモリ媒体、105 電子カメラ、105a レンズ、105b 光軸、105c 仮想画面、106、106A 多軸駆動制御機構、107 エンコーダ、108 保存媒体、110 対象物品、110a、111a 認識検定面(上面)、110b 基準面(設置背面)、111b 直交面、112a 第1の特定線分、112b 第1の仮想特定線分、113a 第2の特定線分、113b 第2の仮想特定線分、120比較用仮想画面、121a 撮像輪郭画像、121b CAD輪郭図形、122a、122b 中心線、123a、123b 中心位置、a 画像線分長、A実物線分長(上面)、D 奥行き寸法(間隔距離)、ΔD 落差寸法、E 撮像データ、f 焦点距離、F CADデータ、H 基準面距離、Nx 左右方向画素数、Ny 上下方向画素数、p 画素間隔、Z 対物距離、α 傾斜角、610 初期移動撮像手段、611 距離座標軸認識・画像特徴量算出手段、612 検索・同定手段、613 異品判定手段、615 厚み補正・対物基準距離測定手段、616 測定距離校正・平均化演算手段、617 バラツキ異常判定手段、621 第2の対物基準距離測定手段、622 第2の異品判定手段、623 対物基準距離確定手段、624 現在値検出手段、625 対物距離測定手段、626 報知出力発生手段、710、712、720 1次調整手段、715、725 2次調整手段、717、727 適合率判定手段、719 第1の検索・同定手段、729 第2の検索・同定手段、730 報知出力発生手段、910 初期移動撮像手段、911 画像特徴量算出手段、912 検索・同定手段、913 異品判定手段、915 接近移動撮像手段、916 距離座標軸認識・厚み補正・対物基準距離測定手段、923 測定距離校正・対物基準距離確定手段、924 現在値検出手段、925 対物距離測定手段、926 報知出力発生手段、955b 対物距離補正手段、957 連動切換手段、961 第2の検索・同定手段、962 第2の検索・同定手段、963 第1の検索・同定手段、967 連動調整手段、972 面積判定手段、974 重合度判定手段、975 総合適合判定手段、976 報知出力発生手段。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention determines an object distance between an electronic camera and a target article, and compares a plane image captured by the electronic camera with a plane image retrieved from CAD data of a three-dimensional figure related to the target article, BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a recognition test system for an object to be imaged, which realizes highly accurate objective distance measurement to improve the efficiency of the recognition test, and enables the visual inspection of the target object and the holding of an appropriate position by a robot hand.
[0002]
[Prior art]
In general, a recognition test system for an object to be imaged generates an electronic camera that images the object from a variable relative position in conjunction with a multi-axis drive control mechanism, and generates a planar figure of variable magnification observed from an arbitrary direction with respect to the object. A memory medium in which CAD data of a dimensional figure is stored, and an arithmetic unit for searching and identifying a joint figure so that a plane figure based on the CAD data matches the appearance of a captured image of a target article.
[0003]
According to a conventional recognition and verification system for an object to be imaged, design data is obtained from CAD / CAM or the like relating to the object to be inspected, and a feature of the object to be inspected is extracted by a sensor, an illumination system, and an image processing system. Performs inspection automatically by identifying and recognizing the object, determining the measurement method and inspection method to be performed on the identified inspection object, and controlling the position and orientation of the sensor and the illumination system. (For example, see Patent Document 1).
[0004]
In addition, various types of recognition verification techniques of this type have been proposed, and according to other conventional systems, a CAD graphic feature obtained by projecting each object on a plane orthogonal to a predetermined direction from each piece of CAD information of the plurality of objects. Calculate the amount, calculate the camera figure feature in the two-dimensional image obtained from the specific object captured by the camera from the predetermined direction, compare the CAD figure feature with the camera figure feature, The type and posture of the target object are determined, and the gripping direction of the target object by the robot hand is determined (for example, see Patent Document 2).
[0005]
On the other hand, as a technique related to the recognition test system, according to the conventional distance measuring method and the moving device, the imaging device is moved forward or backward with respect to the target, and at least two moving positions of the imaging device at this time. The size of each projected image of the target in the imaging device is calculated, and the distance from the imaging device to the target is calculated based on the size of the projected image (for example, see Patent Document 3).
[0006]
[Patent Document 1]
JP-A-7-98217
[Patent Document 2]
JP-A-9-167234 (Japanese Patent No. 3101674)
[Patent Document 3]
JP-A-9-170920
[0007]
[Problems to be solved by the invention]
As described above, according to Patent Documents 1 and 2, the conventional recognition and verification system for an object to be imaged controls a multi-axis robot equipped with an electronic camera while effectively utilizing CAD data of a three-dimensional figure. Since the recognition and grasping of the target article, the appearance inspection, the inspection of a different article, and the like are performed, no special attention has been paid to the objective distance between the electronic camera and the target article.
[0008]
Further, according to Patent Document 3, since the object distance is measured by a twin-lens camera or a single-lens moving camera, when the twin-lens camera is used, the parallax of the two eyes is sufficiently increased to secure the measurement accuracy. If the setting is large, the apparatus becomes large and expensive, and it is necessary to identify the characteristic portion of the target article. When a single-lens moving camera is used, sufficient parallax is secured by setting the moving distance large. However, the distance at the approach position is measured while utilizing the measurement data at a remote position where a measurement error is likely to occur, and there is a problem that the measurement error at the approach position increases.
[0009]
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and utilizes a three-dimensional graphic CAD data relating to a target article while achieving high-precision objective distance measurement with a single-lens camera. The aim is to obtain a recognition test system.
Further, the present invention provides an imaging target article recognition / testing system capable of determining the identity of a target article and a target article indicated by CAD data at high speed and high accuracy by using highly accurate object distance information. The purpose is to get.
[0010]
[Means for Solving the Problems]
The recognition test system of the imaging target article according to the present invention, an electronic camera having a lens for imaging the target article from the variable relative position, a multi-axis drive control mechanism for controlling the relative position between the electronic camera and the target article, A memory medium storing CAD data of a three-dimensional figure and a search / identification program for generating a variable magnification plane figure observed from an arbitrary direction with respect to the target article, and a plane figure based on the CAD data by the search / identification program. An arithmetic unit that searches for and identifies a congruent figure so as to match the shape of the captured image for the target article, and the arithmetic unit is provided at least within the limit that the entire recognition verification surface of the target article is included in the captured image. An initial movement imaging unit that approaches the target article and captures an approach image of the target article; and an image line segment length a for a specific line segment in the approach image. At the same time, the identification figure is searched to extract the actual line segment length A on the CAD data for the specific line segment, and the image line segment length a and the actual line segment length A and the known focal length f of the lens are calculated. The objective reference distance Z0 is calculated based on the following equation (1) based on:
Z0 = f × A / a (1)
And a plurality of specific line segments determined as specific line segments, and based on the plurality of specific line segments, an average value of each object reference distance calculated from the equation (1) is calculated based on the plurality of specific line segments. Averaging operation means for calculating the final objective reference distance to the recognition test surface.
[0011]
Further, a recognition test system for an object to be imaged according to the present invention includes an electronic camera having a lens for imaging the object from a variable relative position, and a multi-axis drive control mechanism for controlling a relative position between the electronic camera and the object. And a memory medium storing CAD data of a three-dimensional figure and a search / identification program for generating a plane figure of variable magnification observed from an arbitrary direction with respect to the target article, and a plane based on the CAD data by the search / identification program An arithmetic unit that searches for and identifies a congruent graphic so that the graphic matches the shape of the captured image of the target article, wherein the arithmetic unit has a limit that at least the entire recognition verification surface of the target article is included in the captured image. Within, the target article is imaged at the first position close to the target article, a specific line segment having a line segment shorter than a predetermined length is determined, and the identification diagram is displayed. Moving image pickup means for extracting the actual line segment length A on the CAD data with respect to the specific line segment, and the specific line at the second position close to the target article within the limit including the entire specific line segment Approaching moving image pickup means for picking up an image of a segment, calculating an image line segment length a with respect to a specific line segment picked up at the second position, and calculating the actual line segment length A and the image line segment length a and the focal point of a lens having a known number Based on the distance f, the objective reference distance Z0 is calculated by the following equation (1):
Z0 = f × A / a (1)
And an objective reference distance measuring means which calculates and stores the reference distance.
[0012]
Further, a recognition test system for an object to be imaged according to the present invention includes an electronic camera having a lens for imaging the object from a variable relative position, and a multi-axis drive control mechanism for controlling a relative position between the electronic camera and the object. And a memory medium storing CAD data of a three-dimensional figure and a search / identification program for generating a plane figure of variable magnification observed from an arbitrary direction with respect to the target article, and a plane based on the CAD data by the search / identification program An arithmetic unit that searches for and identifies a congruent figure so that the figure matches the shape of a captured image of the target article.The arithmetic apparatus includes an electronic camera and an object camera before searching and identifying each part of the target article. The distance when the article is at the specific position is determined as the reference distance, and after the reference distance is determined, each axis of the multi-axis drive control mechanism is determined. Object distance measuring means for constantly monitoring and measuring the object distance of the target article in response to the position detection output, the whole or specific part of the image captured by the electronic camera, and the whole or specific part of the plane figure obtained from the CAD data. A search is performed for a line of sight and a magnification with respect to a plane figure based on CAD data so as to match, and when the degree of matching by the search for the line of sight and the magnification has reached a first predetermined matching rate or more, a first joint identifying a congruent figure is performed. A search / identification means for retrieving a line of sight to the planar figure by the CAD data so that the whole or specific part of the image taken by the electronic camera matches the whole or specific part of the planar figure obtained from the CAD data; A constant magnification according to the object distance measured by the distance measuring means is applied as a magnification to the plane figure, and And a second search / identification unit for identifying a congruent figure when the degree of coincidence by the search of the second or higher reaches a second predetermined precision rate or more, wherein the second search / identification unit has a known objective distance. The first search / identification means is used for high-speed identification in a case where the objective distance is undetermined and the first search / identification means slightly increases / decreases the magnification after the search / identification by the second search / identification means, thereby achieving higher accuracy. This is applied when accurate identification is required.
[0013]
BEST MODE FOR CARRYING OUT THE INVENTION
Embodiment 1 FIG.
Hereinafter, Embodiment 1 of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram schematically showing a first embodiment of the present invention.
FIG. 2 is a side view illustrating the relative positional relationship between the target article 110 and the lens 105a of the electronic camera. FIG. 2A illustrates a state in which the optical axis 105b of the lens 105a matches the center of the target article 110. (B) shows a state in which the coordinate position of the lens 105a is moved in a plane and the optical axis 105b moves away from the center of the target article 110.
[0014]
FIG. 3 is an explanatory diagram showing a perspective view of a recognition test surface 111a that is not orthogonal to the optical axis 105b of the lens 105a together with the orthogonal surface 111b, FIG. 4 is an explanatory diagram showing a procedure for calculating the image segment length a, and FIG. FIG. 9 is an explanatory diagram showing a concept of figure movement for minimizing an error area.
6 and 7 are flowcharts showing specific operations according to the first embodiment of the present invention. FIG. 6 corresponds to a distance measurement program, and FIG. 7 corresponds to a search / identification program.
[0015]
In FIG. 1, an arithmetic unit 101 serving as a main body of a recognition test system for a target article 110 is mainly configured by a microprocessor.
The arithmetic unit 101 has a memory medium 102 including a RAM memory and a hard disk.
The memory medium 102 stores various programs and various data including CAD data. For example, in addition to a distance measurement program (see FIG. 6) and a search / identification program (see FIG. 7), a system operation program and input data are stored. A basic program (not shown) such as an output communication program is stored.
[0016]
An operation input device 103 such as a keyboard and a mouse, and a display device 104 such as a CRT or a liquid crystal are connected to the arithmetic device 101.
The arithmetic unit 101 includes an electronic camera 105 such as a CCD camera for imaging the target article 110 and a multi-axis drive control for moving the electronic camera 105 in at least three axes (X, Y, and Z axes). A mechanism 106, an encoder 107 for detecting a rotational position of a servomotor (not shown) provided on each axis of the multi-axis drive control mechanism 106, and a CAD of a three-dimensional figure related to the target article 110 imaged by the electronic camera 105. The storage medium 108 storing the data F is connected.
[0017]
The electronic camera 105 serially transmits imaging data E (at least, luminance information) corresponding to a large number of pixels arranged in a plane to the arithmetic device 101 each time an imaging instruction is given from the arithmetic device 101. It is configured.
The multi-axis drive control mechanism 106 includes a multi-axis controller and a servo amplifier (not shown) for driving a servo motor in response to a control command from the arithmetic unit 101.
The detection signal (position detection output) of the encoder 107 is input to the arithmetic unit 101 as information for measuring the coordinate position of the electronic camera 105.
The CAD data stored in the storage medium 108 is transferred and stored in advance in the memory medium 102 via the arithmetic unit 101.
[0018]
The memory medium 102 includes a calibration data table (described later) applied by the distance measurement program (see FIG. 6), a CAD data of a three-dimensional figure to which an object article number is attached, and a reference for calculating actual dimensions of each part. Dimension data is stored.
In addition, the memory medium 102 stores installation information data such as initial movement position data of the electronic camera 105, verification imaging position data, and the like, along with reference plane position data and interval distance dimension data. However, even if the target article 110 is the same, if it has a plurality of recognition test surfaces, the data stored in the memory medium 102 is stored for each recognition test surface number.
[0019]
Further, the memory medium 102 stores planar graphic conversion data (target article 110 in a predetermined direction) based on image data from the electronic camera 105, that is, image data E (luminance information corresponding to pixels) and CAD data F from the storage medium 108. Image data).
The imaging data E and the plane graphic conversion data in the memory medium 102 are displayed on the display device 104 at a variable magnification via the arithmetic unit 101.
[0020]
In FIG. 2A, a recognition test surface 110 a having a trapezoidal contour is formed on the upper surface of the target article 110, and an installation rear surface, ie, a reference plane having a rectangular contour is formed on the lower surface of the target article 110. 110b is formed (for the outline shape of the target article 110, see the captured image 110c).
The target article 110 has, as dimensions, a real line segment length A in the longitudinal direction of the upper surface, a real line segment length W in the longitudinal direction of the lower surface, and a real dimension D (interval distance) of the height.
Although not shown in FIG. 2A, the target article 110 has a real line segment length B of a short width on the lower surface.
[0021]
The electronic camera 105 (see FIG. 1) is provided with a lens 105a for imaging the target article 110.
The lens 105a has a focal length f on the optical axis 105b, and forms a virtual screen 105c at a position orthogonal to the optical axis 105b and at the focal length f.
A captured image 110c of the target article 110 is projected on the virtual screen 105c. The image line segment length a of the captured image 110c corresponds to the actual line segment length A of the target article 110. Similarly, the image line segment length B (not shown) of the short width of the lower surface of the target article 110 is associated with the image line segment length b of the captured image 110c.
[0022]
The recognition verification surface 110a of the target article 110 is located at a position away from the center position of the lens 105a by the object distance Z, and the reference surface (backside of installation) 110b is located at a position away from the center position of the lens 105a by a distance H.
Here, the objective distance Z and the distance H to the lower surface are calculated by using the following formulas (2) and (3) using the focal length f, the actual line segment lengths A and B, the image line segment lengths a and b, and the actual dimension D. ).
[0023]
Z = f × A / a (2)
H = f × B / b, Z = H ± D (3)
[0024]
However, in the expression (3), among the “positive / negative signs” added to the physical dimension D, the positive symbol is a real line segment length B which is a specific line segment on the side of the reference plane 110b when viewed from the lens 105a. The negative sign is applied when the actual object segment length B is farther than the recognition verification surface 110a. In the case of FIG. 2A, the “negative sign” in Expression (3) is used.
Note that, for the entire moving space of the electronic camera 105 including the target article 110, rectangular coordinates (X axis, Y axis, Z axis) are defined as shown in FIG. For example, the normal direction to the installation reference plane 110b is defined as the Z axis (vertical axis), the position of the installation reference plane 110b is defined as the origin of the Z axis, and the center point of the movable plane of the electronic camera 105 (lens 105a) is defined as plane coordinates. Is defined as the coordinate origin Po.
In FIG. 2A, the center of the target article 110 is set at a position that matches the origin position Po of the plane coordinates.
[0025]
As shown in FIG. 2B, when the coordinate position of the electronic camera 105 (the lens 105a) is moved in the X-axis direction in a plane, and the optical axis 105b moves away from the center of the target article 110 (the coordinate origin Po), an image is displayed. The relationship between the line segment length a and the Z-axis direction component (objective distance Z) with respect to the actual line segment length A is the same as the above equation (2), and the same applies to the equation (3).
[0026]
In FIG. 3, the recognition test surface 111a is inclined without being orthogonal to the optical axis 105b.
Here, considering a plane 111b (see a two-dot chain line) orthogonal to the optical axis 105b as a plane including an intersection 105d between the optical axis 105b and the recognition verification plane 111a, the recognition verification plane 111a is inclined with respect to the orthogonal plane 111b. It is inclined by the angle α.
In addition, on the recognition verification surface 111a, a first specific line segment 112a (see a solid line) located at a position where the height change does not occur due to the inclined surface, and a first specific line segment 112a projected on the orthogonal surface 111b. The virtual specific line segment 112b (see the broken line), the second specific line segment 113a (see the solid line) at the position where the height variation due to the inclined surface has the greatest influence, and the second specific line segment 113a are orthogonal surfaces 111b. Is defined as a second virtual specific line segment 113b (see a broken line) projected on the second virtual specific line segment 113b.
[0027]
Here, the drop ΔD between the first specific line segment 112a and the first virtual specific line segment 112b is a value that can be calculated from the CAD data F as a depth dimension corresponding to the real height dimension D. .
Therefore, in the case of having the drop dimension ΔD, the objective distance Z with respect to the first virtual specific line segment 112b is, in accordance with the above equation (2), a real line segment length A with respect to the first specific line segment 112a and the first Using the image line segment length a for the specific line segment 112a and adding the drop dimension ΔD, the following equation (4) is obtained.
[0028]
Z = f × A / a ± ΔD (4)
[0029]
However, in the expression (4), in the “positive / negative sign” given to the head dimension ΔD, the “positive sign” indicates that the first specific line segment 112a is closer to the first virtual specific line segment 112b. The “minus sign” is applied when the first specific line segment 112a is farther than the first virtual specific line segment 112b.
Note that the drop dimension can be corrected for the second specific line segment 113a in the same manner as in equation (4). In this case, instead of the actual line segment length A, the second specific line 113a is used. The projection line segment length Acosα of the real object line segment length A to the orthogonal plane 111b with respect to the segment 113a is used, and it is necessary to calculate the drop size ΔD according to the position of the second specific line segment 113a.
[0030]
In FIG. 4, a large number of pixels are arranged in a plane on the imaging virtual screen 105c.
The image line segment length a imaged in the imaged virtual screen 105c is expressed by the following equation using the pixel interval p and the number Nx of pixels in the horizontal direction and the number Ny of pixels in the vertical direction corresponding to the image line segment length a. It is calculated by (5).
[0031]
a = p × √ (Nx 2 + Ny 2 ) ・ ・ ・ ・ ・ (5)
[0032]
In FIG. 5, a virtual screen for comparison 120 is displayed, for example, on the display device 104, and is used when moving a figure for minimizing an identification error area.
In the comparison virtual screen 120, the captured outline image 121a (see the solid line) has a trapezoidal shape that is symmetric with respect to the longitudinal center line 122a, and has a center position 123a.
The CAD contour graphic 121b (see a two-dot chain line) is formed based on the CAD data F corresponding to the captured contour image 121a, has a trapezoidal shape symmetric with respect to a longitudinal center line 122b, and has a center position 123b. .
[0033]
The center lines 122a and 122b are, for example, main axes of inertia corresponding to virtual rotation axes for obtaining a minimum moment of inertia. Further, the center positions 123a and 123b are calculated by a known technique as graphic center of gravity points.
In addition, instead of the principal axes of inertia (center lines 122a and 122b), a circumscribed rectangle having a minimum area with respect to the captured contour image 121a and the CAD contour graphic 121b is searched, and the center line of the circumscribed rectangle in the longitudinal direction is determined as the captured contour image 121a or It can be regarded as the center line for the CAD contour figure 121b.
Similarly, the intersection of the diagonal lines of the circumscribed rectangle having the minimum area can be regarded as the center position with respect to the captured contour image 121a and the CAD contour graphic 121b.
[0034]
Next, the operation of measuring the objective distance according to the first embodiment of the present invention shown in FIG. 1 will be described with reference to FIG.
In FIG. 6, first, when the operation of measuring the object distance is started by the arithmetic unit 101 (step 600), it is determined whether a calibration map has already been created (step 601).
If it is determined in step 601 that the calibration map has not been created (that is, NO), a calibration map relating to the actual line segment length A, the image line segment length a, and the object distance Z (see FIGS. 1 and 2) is created. Then, it is stored in the memory medium 102 as a calibration data table (step 602).
On the other hand, if it is determined in step 601 that the calibration map has already been created (that is, YES), map creation step 602 is not executed.
[0035]
The calibration data table is composed of a map of the proportionality coefficient K with respect to the actual line segment length A, the image line segment length a, and the objective distance Z, and is calculated by the first arithmetic unit constituting the objective reference position measuring means in the arithmetic unit 101. Is done.
Each proportional coefficient K is an image line segment obtained by arranging and imaging needle-like sample articles having various known real line segment lengths A at positions having various object distances Z, and actually measuring each image. It is calculated based on the length a, and stored in the memory medium 102 (see FIG. 1) as a proportional coefficient K (= Z × a / A).
As a result, an arbitrary object distance Z and an actual object segment length A can be designated on the calibration data table, and the proportional coefficient K can be obtained by back calculation.
[0036]
After the calibration map is created in this way, it is subsequently determined whether or not the identification number (target article number) of the target article 110 has already been input (step 603), and the target article number has not been input (that is, the target article number has not been input). , NO), the target article number is input via the operation input device 103 (step 604).
On the other hand, if it is determined in step 603 that the target article number has already been input (that is, YES), the number input step 604 is not executed.
[0037]
When the target article number is input in this manner, subsequently, it is determined whether or not the CAD data F relating to the target article 110 has been registered (step 605), and it is determined that the CAD data F has not been registered (ie, NO). If determined, the CAD data F is transferred and registered from the storage medium 108 to the memory medium 102 (step 606).
On the other hand, if it is determined in step 605 that CAD data F has already been input (ie, YES), data input step 606 is not executed.
The CAD data F stored in the memory medium 102 is registered in a common intermediate language for various CAD tools.
[0038]
When the CAD data F is input in this way, subsequently, it is determined whether or not to change the recognition test surface of the target article 110 (step 607), and if it is determined that the recognition test surface is to be changed (ie, YES). Then, a new recognition test surface is selected and set, or the recognition test surface is updated and changed (step 608).
On the other hand, if it is determined in step 607 that the recognition test surface is not changed (that is, NO), the change step 608 of the recognition test surface is not executed.
The determination step 607 is executed to instruct a switch to the next recognition test surface when the search / identification on the specified recognition test surface is completed.
[0039]
When the recognition verification surface is set in this manner, the electronic camera 105 is subsequently driven by the multi-axis drive control device 106, and the electronic camera 105 is moved to the initial movement position specified to be written in the memory medium 102. An image of the recognition verification plane 110 is taken (step 610). Here, a case will be described as an example where the recognition test surface 110a (see FIG. 2) orthogonal to the optical axis 105b of the lens 105a is typically taken as an example.
Note that the initial movement position of the electronic camera 105 is set immediately above the center position 123a (see FIG. 5) of the target article 110, and is set to the closest approach position where the entire recognition verification surface 110a looks largest.
[0040]
Next, following the imaging step 610, the direction of the optical axis 105b at the time of imaging of the recognition test surface 110a is set and stored as a distance coordinate axis, and the current position on the distance coordinate of the electronic camera 105 is stored as a reference coordinate value. The contour image is extracted from the imaged screen and binarized, and the image contour area is calculated together with the position of the principal axis of inertia and the center of gravity of the figure (step 611).
[0041]
Subsequent to the calculation step 611, a planar figure having various viewpoints and magnifications is searched from the CAD data F stored in the memory medium 102, and the viewpoint and magnification of the CAD data F are adjusted (fitting). A plane figure congruent with the binarized contour image stored in 611 is extracted (step 612).
The details of the fitting figure extraction step 612 will be described later with reference to FIG. 7 (first search / identification means 719).
[0042]
Next, following step 612, it is determined whether or not an identification graphic having a predetermined precision or higher (the precision is normal) can be extracted (step 613). If it is determined that the extraction has been completed (that is, YES), the correspondence between the plurality of specific line segments determined in advance on the CAD data F and the calculation result in step 611 (the imaging line segment in the captured image) is determined. A determination is made (step 614).
In addition, for each specific line segment associated in step 614, the image line segment length a is measured, and the actual line segment length A is extracted from the CAD data F, and the above-described equations (2) to (4) ), The objective reference distance Z0 converted into the orthogonal plane position is calculated (step 615).
[0043]
Further, the actual object segment length A and the proportional coefficient K at the objective reference distance Z0 are extracted from the calibration data table created at step 602, and the calibrated objective reference distance is calculated by the following equations (6) to (8). Calculate Z0, further calculate the arithmetic mean of the objective reference distance, and store this as the first objective reference distance Z1 (step 616).
[0044]
Z0 = K × A / a (6)
H = K × B / b, Z0 = H ± D (7)
Z0 = K × A / a ± ΔD (8)
[0045]
Next, it is determined whether or not the variation in the plurality of objective reference distances calibrated in step 616 is within an appropriate range (step 617), and the variation range of the distance (variation in the objective reference distance) is within the appropriate range. If it is determined (ie, YES), installation information data is extracted from the memory medium 102 (step 620).
The installation information read out at this time is reference plane position data and interval distance dimension data. For example, in the case of FIG. 2A, the reference plane position data is the coordinate origin Po (0, 0, 0) and the recognition verification plane The distance data of the distance between the reference plane 110b and the reference plane 110b is the depth dimension D.
[0046]
Next, following the data extraction step 620, a second objective reference distance Z2 is calculated based on the reference position coordinates P (x, y, z) of the electronic camera 105 stored in step 611 (step 621). .
When the position of the lens 105a of the electronic camera is the reference position, for example, as shown in FIG. 2A, the second objective reference distance Z2 is the coordinate of the reference surface distance H on the optical axis 105b (Z axis). The value (= HD) is obtained by subtracting the interval dimension data (depth dimension) D from the value.
[0047]
Subsequently, the first objective reference distance Z1 calculated in step 616 is compared with the second objective reference distance Z2 calculated in step 621 to obtain a comparison deviation ΔZ (= | Z1−Z2 |). Then, it is determined whether or not the comparison deviation ΔZ is larger (abnormal) than the predetermined value β (step 622).
If it is determined in step 622 that the comparison deviation ΔZ is appropriate and ΔZ ≦ β (that is, NO), one of the first objective reference distance Z1 and the second objective reference distance Z2 is used as the objective reference distance. Or as an average value of both (Step 623).
[0048]
The determination step 622 and the objective reference distance determination step 623 function as means for confirming whether there is a significant difference due to some mistake. For example, when the target article 110 is on an intermittently driven conveyor, If the surface 110b (see FIG. 2) is unstable and easily fluctuates up and down, the first objective reference distance Z1 is selected in step 623.
[0049]
In addition, the determination step 622 and the objective reference distance determination step 623 function as means for confirming whether or not there is an abnormal mistake such as a mistake in a transfer jig. If the installation reference plane 110b and the interval distance dimension D are extremely accurate and stable as originally expected, the second objective reference distance Z2 is selected.
Further, when both the first objective reference distance Z1 and the second objective reference distance Z2 are values that are equally reliable, and it is desirable to use the average value of both, each objective reference distance Z1, Z2 May be determined in advance to adopt the average value of.
[0050]
Next, following step 623, the current position (coordinate value) of the electronic camera 105 is detected based on the position detection output from the encoder 107 provided in the multi-axis drive control mechanism 106 (step 624).
Further, following step 624, by adding the objective reference distance Z0 determined and stored in step 623 to the difference between the current coordinate value of the electronic camera 105 and the reference coordinate value stored in step 611, the current The object distance Z at the position of the electronic camera 105 is calculated (step 625), and the processing routine of FIG. 6 ends (step 627).
[0051]
On the other hand, if it is determined in step 613 that the identification matching rate is not appropriate and an identification figure with a normal matching rate cannot be extracted (that is, NO), in step 617, it is determined that the range of distance variation is abnormal (that is, NO). If the comparison is made, or if the comparison deviation ΔZ is larger than the predetermined value β and it is determined in step 622 that ΔZ> β (that is, YES), in any case, the different product is immediately determined. The notification output processing (step 626) is executed, and the processing routine of FIG. 6 ends (step 627).
[0052]
In step 626, a different product determination is performed, and a notification output is generated.
Note that the arithmetic unit 101 executes another control operation following the operation end step 627, returns to the operation start step 600 again after executing the other control operation, and repeatedly executes the steps 600 to 627. .
[0053]
To summarize the processing operation for distance measurement described above (see FIG. 6), the electronic camera 105 is configured to be freely movable by a multi-axis drive control mechanism 106. First, the electronic camera 105 is initially moved to a full-view imaging position to perform imaging. Then, the arithmetic unit 101 calculates the object reference distance Z0 by comparing the image line segment length a and the real object line segment length A of the plurality of specific line segments, and calibrates and averages them to obtain a highly accurate second line segment. One objective reference distance Z1 is obtained.
In addition, in order to determine the correspondence between the image line segment length a and the actual line segment length A of the specific line segment, a search / identification operation using CAD data F of a three-dimensional figure and an actual line segment length A based on reference dimension data are performed. Is extracted.
[0054]
Further, the second objective reference distance Z2 is set based on the position data of the installation reference surface 110b of the target article 110 and the installation information data such as the distance data D between the installation surface 110b and the recognition verification surface 110a. By acquiring and comparing this with the first objective reference distance Z1, the presence or absence of an abnormality in the installation is determined.
If there is no particular difference between the first objective reference distance Z1 and the second objective reference distance Z2, which one to trust is determined in advance, and the first objective reference distance Z1 is determined. One of Z1 and the second objective reference distance Z2, or an average value of both, is adopted as a final objective reference distance.
Further, once the object reference distance is calculated, thereafter, the object distance Z at any electronic camera position is constantly monitored and measured by the position detection output of the encoder 107 provided in the multi-axis drive control mechanism 106. It has become.
[0055]
In FIG. 6, an imaging step 610 functions as an initial movement imaging unit, and a calculation step 611 is a distance coordinate axis recognizing unit and an image feature amount calculating unit (a calculating unit for calculating a principal axis of inertia, an image centroid position, a contour area, etc.) The fitting figure extraction step 612 functions as search / identification means, the matching rate determination step 613 functions as foreign article determination means, and the distance calculation step 615 functions as thickness correction means and objective reference distance measurement means. Step 616 functions as a measuring distance calibrating means and an averaging calculating means.
[0056]
Further, the distance variation determination step 617 functions as a distance variation abnormality determination unit, the distance calculation step 621 functions as a second objective reference distance measurement unit, and the deviation determination step 622 and the different product determination notification step 626 include Step 623 functions as an object reference distance determining unit, Step 624 functions as a current value detecting unit, Step 625 functions as an object distance measuring unit, and Step 626 functions as an objective distance measuring unit. Function as a notification output generating means.
[0057]
Next, the processing operation for search and identification according to the first embodiment of the present invention shown in FIG. 1 will be described with reference to the flowchart in FIG.
In FIG. 7, when the operation related to the search / identification operation is started by the arithmetic unit 101 (step 700), the recognition test surface 110a (see FIG. 2) of the target article 110 to be searched / identified is imaged, and the image data is acquired. The contour image is extracted from E and binarized (step 701), and then the image feature amounts (inertial principal axis, image centroid position, contour image area S0, etc.) of the binarized contour image are calculated (step 701). 702).
[0058]
Note that the image extraction step 701 and the feature amount calculation step 702 can be executed by a known technique.
However, the contour image area S0 is an area value converted into a virtual display screen for comparison, and the virtual display screen for comparison has a dimensional ratio, for example, R1 times that of an actual captured image.
[0059]
Subsequently, in the same manner as in FIG. 6, it is determined whether or not the object distance Z is already measurable and the object distance Z has been measured (step 703). If it is determined that the object distance Z is unknown (that is, NO), the process proceeds to the timer setting step 710 in the first search / identification means 719.
On the other hand, if it is determined in step 703 that the object distance Z has already been measured and the object distance Z is known (that is, YES), the process proceeds to the timer setting step 720 in the second search / identification means 729. I do.
[0060]
In step 710, the tentative line-of-sight direction of the planar figure to be extracted from the CAD data F of the three-dimensional figure stored in the memory medium 102 is determined (selected and changed), and a timer for timeout check is started. .
Subsequently, it is determined whether or not the check timer has timed out (the search has been completed) (step 711). If it is determined that the time has expired (that is, YES), the different product determination notification output process (step 730) is performed. After execution, the processing routine of FIG. 7 ends (step 731).
[0061]
On the other hand, if it is determined in step 711 that the time-out has not occurred (that is, NO), a plane figure in the viewing direction selected in step 710 and with the provisional magnification is generated, and the contour figure area S1 of this plane figure is generated. Is calculated (step 712).
However, the contour figure area S1 is an area when displayed on the comparison virtual display screen.
[0062]
Subsequently, the contour image area S0 calculated in step 702 and the contour graphic area S1 calculated in step 712 are compared to determine whether or not they match (step 713). (Ie, NO), the process returns to step 712 to change the magnification of the figure, and executes the comparison determination step 713 again.
The magnification changed in step 712 can be uniquely determined by multiplying the square root of the ratio between the outline image area S0 and the outline figure area S1 compared in step 713.
[0063]
On the other hand, if it is determined in step 713 that the contour image area S0 is substantially equal to the contour figure area S1 and the two are coincident (that is, YES), the plane of the equivalent contour area based on the CAD data F is determined. For the figure, the positions of the principal axis of inertia and the center of gravity of the figure are calculated (step 714).
Subsequently, the position of the principal axis of inertia and the center of gravity of the figure based on the CAD data F and the position of the principal axis of inertia and the position of the center of gravity of the contour image created in step 702 are superimposed on the contour image by the electronic camera 105. , The overlapping area S with the contour figure based on the CAD data F is calculated (step 715).
[0064]
Subsequently, it is determined whether or not the maximum value of the ratio S / S0 (adaptation rate) between the overlapping area S calculated in step 715 and the contour image area S0 calculated in step 702 has been found (step 716). .
If it is determined in step 716 that the maximum value of the matching rate has not been found (that is, NO), the process returns to step 715, and the position of the center of gravity point of the contour image and the contour figure and the direction of the principal axis of inertia are relatively determined. The overlapping area S is calculated again while shifting the position, and the determination step 716 is executed again.
[0065]
On the other hand, if it is determined in step 716 that the matching rate (the ratio S / S0 between the overlapping area S and the contour image area S0) is the maximum and indicates the maximum value (ie, YES), then the maximum It is determined whether or not the matching rate is equal to or more than a predetermined threshold (appropriate) (step 717).
If it is determined in step 717 that the appropriate precision has not been obtained yet and the precision is not appropriate (that is, NO), the process returns to step 710, and the line-of-sight direction of the planar graphic extracted from the CAD data F is returned. Is changed and adjusted, and the above processing steps 710 to 717 are repeated again.
[0066]
On the other hand, if it is determined in step 717 that a plane figure having an appropriate matching rate is obtained and the matching rate is determined to be appropriate (that is, YES), the timer started in step 710 is reset (step 718). The processing routine of FIG. 7 ends (step 731).
If the timer times out before a plane figure having an appropriate matching rate is obtained in step 717, it is determined in step 711 that a time-out has occurred (that is, NO). Move to step 730.
The first search / identification means 719 is constituted by the above steps 710 to 718.
[0067]
If it is determined in step 703 that the objective distance Z is known (that is, YES), the process proceeds to step 720 in the second search / identification means 729, and the three-dimensional data stored in the memory medium 102 is stored. A temporary line-of-sight direction of the planar figure to be extracted from the CAD data F of the figure is determined, and a timer for timeout check is started.
The second search / identification means 729 is composed of processing steps 720 to 728 which are almost the same as steps 710 to 718 in the first search / identification means 719. Step 721 is executed.
[0068]
If it is determined in step 721 that a timeout has occurred (that is, YES), the process proceeds to a different product determination notification step 730, and if it is determined that the timeout has not occurred (that is, NO), the gaze direction selected in step 720 is used. Then, a plane figure is generated based on the existing and already determined magnification R2, and the contour figure area S1 of this plane figure is calculated (step 722).
The magnification R2 is a magnification for displaying a CAD figure having an actual size on the virtual display screen for comparison, and is determined by the following equation (9).
[0069]
R2 = R1 × f / Z (9)
[0070]
In Equation (9), f is the focal length of the lens, Z is the objective distance in the normal direction, and R1 is the magnification when the image captured by the electronic camera 105 is displayed on the comparison screen.
Subsequently, the contour image area S0 calculated in step 702 and the contour figure area S1 calculated in step 722 are compared to determine whether or not they match (step 723). If determined to be NO, the process returns to step 720 to change and set the line-of-sight direction of the plane figure extracted from the CAD data F, and execute steps 720 to 723 again.
[0071]
On the other hand, if it is determined in step 723 that the contour areas are substantially equal and coincide with each other (that is, YES), the positions of the principal axes of inertia and the center of gravity of the figure with respect to the plane figure having the equivalent contour area based on the CAD data F are determined. Then, the position of the principal axis of inertia and the center of gravity of the figure based on the CAD data F and the position of the principal axis of inertia and the center of image of the contour image created in step 702 are superimposed, and the electronic camera 105 is calculated. The overlapping area S between the contour image based on the above and the contour figure based on the CAD data F is calculated (step 725).
[0072]
Subsequently, it is determined whether or not the maximum value of the ratio S / S0 (adaptation rate) between the overlapping area S calculated in step 725 and the contour image area S0 calculated in step 702 has been found (step 726). If it is determined that the maximum value has not been found (that is, NO), the process returns to step 725, and the superimposition is performed again while relatively shifting the position of the center of gravity of the contour image and the contour graphic and the direction of the principal axis of inertia. The area S is calculated, and the determination step 726 is executed again.
[0073]
If it is determined in step 726 that the matching rate (ratio S / S0) has become maximum (that is, YES), then it is determined whether or not this matching rate is equal to or more than a predetermined threshold (proper). (Step 727) If it is determined that it is not appropriate (that is, NO), the process returns to Step 720 to change and adjust the line-of-sight direction of the planar graphic extracted from the CAD data F, and repeat the above-described processing steps 720 to 727. repeat.
On the other hand, if it is determined in step 727 that the matching rate is appropriate (that is, YES), the timer started in step 720 is reset (step 728), and the processing routine of FIG. 7 ends (step 731). ).
[0074]
If the timer expires before a plane figure having an appropriate matching rate is obtained in step 727, it is determined in step 721 that a timeout has occurred (that is, NO), and the process proceeds to the above-described different product determination notification step 730.
[0075]
As described above, the different product determination notification step 730 is performed when the timer started in steps 710 and 720 times out before the acquisition of the appropriate plane figure, or after the various line-of-sight changes and the magnification adjustment, the appropriate plane figure is displayed. The process is executed when not acquired, and the notification output is generated by regarding the target article 110 and the CAD figure as different products that do not match.
The operation end step 731 is executed following step 718, 728 or 730. The arithmetic unit 101 executes another control operation following step 731, and after executing the other control operation, returns to the start step 700 again to search and identify the next recognition test surface (step 700). To 731) are repeatedly executed.
[0076]
In the first search / identification means 719 (corresponding to the fitting extraction step 612 in FIG. 6), steps 710 and 712 function as primary adjustment means, and step 715 functions as secondary adjustment means. Step 717 functions as a matching rate determination unit.
Similarly, in the second search / identification unit 729, step 720 functions as a primary adjustment unit, step 725 functions as a secondary adjustment unit, and step 727 functions as a matching rate determination unit.
Step 730 functions as a notification output generator.
[0077]
However, the fitting extraction step 612 in FIG. 6 is an identification process executed for associating the image line segment length a with the real line segment length A, whereas the first search / identification means in FIG. Reference numeral 719 denotes a process for identifying the whole of the recognition test surface imaged with respect to the entire target object 110 or a specific portion.
[0078]
The processing operations for search / identification described above (see FIG. 7) are roughly divided as follows depending on whether the objective distance Z is known or unknown.
First, in a general case where the object distance Z is unknown, the primary adjustment unit including the steps 710 and 712 in the first search / identification unit 719 performs image capture by the electronic camera 105 on the comparison virtual screen. The related area S0 of the contour image and the contour related area S1 of the contour figure based on the CAD data F are calculated, and regardless of the shape of the contour, the magnification and the magnification of the CAD figure are simply adjusted so that the related areas S0 and S1 match. Adjust your gaze. Here, as each related area, a feature amount representing the planar size of the target article 110 such as the inner area of the contour image and the contour figure or the area of the minimum circumscribed rectangle is used.
[0079]
In this case, the secondary adjustment unit 715 including step 715 calculates the overlap area S of the overlapping portion of the captured contour image based on the captured data E and the contour figure based on the CAD data F, and determines that the overlap area S is the maximum. The center position and the inclination angle of the center line of the contour image or the contour figure are moved and adjusted so as to be as follows. Here, as the center position and the center line, for example, the center of gravity or the principal axis of inertia of an image or a figure, or the intersection of the diagonal lines of a minimum circumscribed rectangle and the center line in the longitudinal direction are used.
[0080]
On the other hand, if the objective distance Z is known, the primary adjustment means consisting of step 720 in the second search / identification means 729 determines the related area S0 of the contour image captured by the electronic camera 105 on the virtual screen for comparison. And the contour related area S1 of the contour figure based on the CAD data F, and adjusts the line of sight of the CAD figure so that each related area simply matches, regardless of the shape of the contour. Here, a fixed value related to the known objective distance Z is used as the magnification of the CAD figure.
In this case, the secondary adjusting means consisting of step 725 calculates the overlapping area S of the overlapping portion of the captured contour image and the contour figure based on the CAD data F, as in the case where the object distance is unknown, and calculates the overlapping area. The center position and the inclination angle of the center line of the outline image or outline figure are moved and adjusted so that S is maximized.
[0081]
Further, the matching rate determining means including steps 717 and 727 changes and adjusts the line of sight with respect to the CAD figure, and determines that the ratio S / S0 (matching rate) between the overlapping area S and the internal area S0 of the contour figure is equal to or greater than a predetermined threshold. When the identification has been completed, the identification is determined. When the identification has not been performed, a different product judgment is executed and an abnormality notification output is generated.
[0082]
In the first search / identification unit 719, even if the figure shape adjusted in the line of sight in step 710 (primary adjustment unit) is completely different from the actual image, the magnification adjustment in step 712 (primary adjustment unit) is performed. To force the contour areas to match. Thereafter, the graphic position is adjusted in step 715 (secondary adjusting means), and if a predetermined appropriate matching rate cannot be obtained, the process returns to step 710 (primary adjusting means) again to change the line-of-sight direction. The operation will be repeated.
[0083]
On the other hand, in the second search / identification means 729, even if the figure shape adjusted in the line of sight in step 720 (primary adjustment means) is completely different from the actual image, first, the contour figure area S1 at the fixed magnification and the contour figure area After determining the line of sight direction in which the image area S0 coincides, figure position adjustment is performed in step 725 (secondary adjustment means). Thereafter, if a predetermined appropriate matching rate is not obtained, the process returns to step 720 (primary adjusting means) again to repeat the processing operation of changing the line-of-sight direction.
At this time, since the magnification of each of the areas S1 and S0 is fixed, the time required for search and identification can be greatly reduced.
[0084]
As described above, according to the first embodiment of the present invention, the objective distance Z can be measured using the single-lens electronic camera 105 without using the twin-lens camera or the moving camera.
Further, by comparing the image line segment length a for a plurality of specific line segments based on the image data E with the actual line segment length A based on the CAD data F, and measuring the objective reference distance Z0 by the average value, A highly accurate measurement of the object reference distance can be realized. Further, the detected object reference distance Z0 can be added as reference information for searching and identifying each part of the target article 110 and the CAD data graphic.
[0085]
In addition, the arithmetic unit 101 includes a variation abnormality determination unit, and can generate an abnormality notification output by determining that the fluctuation range of the objective reference distance corresponding to the plurality of specific line segments is excessive. Before performing the search / identification control, the foreign product can be removed.
In addition, the arithmetic unit 101 includes a distance coordinate axis recognition unit, a current position detection unit, and an object distance measurement unit. By adding the detected object distance Z as reference information, the arithmetic unit 101 can connect the target article 110 to each part of the CAD data graphic. Search and identification can be performed. Also, once the object reference distance has been measured, thereafter, the object distance corresponding to the current position of the electronic camera 105 or the position of the target article 110 can be constantly monitored and measured, and the result can be used for each part. It can be used for search and identification control.
[0086]
Further, since the imaging position in the initial movement imaging means is specified by designating the identification number of the recognition verification surface in addition to the target article number, the electronic camera responds to the sequentially changed recognition verification surface. By interlocking the imaging surface of the target article 110 by the 105 and the CAD graphic read graphic surface so as to indicate the same part, the objective reference distance can be quickly measured.
[0087]
Further, the objective reference distance measuring means includes a calibration data table and a measurement distance calibrating means, and is configured to be able to correct the distortion of the lens 105a. Therefore, it is possible to measure the objective reference distance with higher accuracy.
Further, the objective reference distance measuring means includes a thickness correcting means, and if the specific line segment is located at a normal distance position farther than the optical axis position of the recognition test surface, the depth dimension D is subtracted. If it is located at a normal distance closer to the optical axis position than the optical axis position, the measured objective reference distance Z0 is added to the electronic camera 105 with respect to the plane perpendicular to the optical axis at the optical axis position of the recognition verification plane by adding the depth dimension D. Since the distance is converted to the normal distance, the optical axis at the center of the recognition test surface is used even if the recognition test surface is sloped or the stereoscopic depth line is displayed as an image. The object reference distance can be measured in terms of an orthogonal plane.
[0088]
The apparatus further includes setting information data, a second objective distance measuring means, a second foreign object determining means, and an objective reference distance determining means, and the first objective distance Z1 calculated from the objective reference distance or the first objective distance Z1 calculated from the setting information data. Either one of the two objective distances Z2 is selected, or the average value of the two is calculated, and if the installation reference plane of the target article 110 is unstable and easily fluctuates, the first objective distance If Z1 is selected and the installation reference plane and the distance dimension of the target article 110 are originally extremely accurate and stable, the second objective distance Z2 is selected, and both the objective distances Z1 and Z2 are the same. If the values are so reliable that it is desirable to use the average value of both, the average value can be used. Further, the first objective distance Z1 can also be used as a means for confirming the presence or absence of an abnormal mistake (such as a wrong transfer jig).
Further, the second foreign article judging means can remove the foreign article before executing the search / identification control of each section.
[0089]
Embodiment 2 FIG.
Although the electronic camera 105 is moved using the multi-axis drive control mechanism 106 in the first embodiment, the target article 110 may be moved.
Hereinafter, a second embodiment of the present invention will be described with reference to FIGS.
[0090]
FIG. 8 is a block diagram schematically showing a second embodiment of the present invention. The same components as those described above (see FIG. 1) are given the same reference numerals as those described above, or are followed by “A” And the detailed description is omitted.
9 and 10 are flowcharts showing the operation according to the second embodiment of the present invention. FIG. 9 shows a distance measurement program, and FIG. 10 shows an entire operation program.
[0091]
8, the multi-axis drive control mechanism 106A includes a multi-axis controller and a servo amplifier that respond to a control command output from the arithmetic device 101A, and is configured to move the target article 110 in at least three axial directions.
In this case, the encoder 107 provided on each axis of the multi-axis drive control mechanism 106A inputs position detection information for measuring the coordinate position of the target article 110 to the arithmetic device 101A.
[0092]
The memory medium 102A includes a distance measurement program (see FIG. 9), a search / identification program based on an overall operation program (see FIG. 10), basic programs (such as a system operation program and an input / output communication program not shown), A calibration data table applied by the measurement program (see FIG. 9), CAD data F of a three-dimensional figure with a target article number, reference dimension data for calculating actual dimensions of each part, and remote retreat of the target article 110 The position data and the verification imaging position data, the imaging data E of the electronic camera 105, and the plane graphic conversion data of the target article 110 viewed from a predetermined direction based on the CAD data F of the three-dimensional graphic are stored.
However, even if the target article 110 is the same, if it has a plurality of recognition verification surfaces, the data stored in the memory medium 102 is stored for each recognition verification surface number. Further, the imaging data and the plane figure conversion data are displayed on the display device 104 at a variable magnification.
[0093]
Next, the operation of the objective distance measurement according to the second embodiment of the present invention shown in FIG. 8 will be described with reference to the flowchart of FIG.
9, steps 900 to 914 and 923 to 927 correspond to steps 600 to 614 and 623 to 627 described above (see FIG. 6), respectively.
[0094]
First, when the processing operation of the object distance measurement by the arithmetic unit 101A starts (step 900), it is determined whether or not a calibration map has been created (step 901). If a calibration map has not been created, a calibration map is created. Stored in the memory medium 102A as a calibration data table (step 902).
The calibration data table is calculated based on the image line segment length a actually measured by placing various known real line segment length A needle-shaped sample articles at various object distance Z positions, and a proportional coefficient K (= Z Xa / A) is stored in the memory medium 102A, and the inverse calculation of the proportionality coefficient K is enabled by designating an arbitrary objective distance Z and an actual segment length A.
[0095]
Subsequently, it is determined whether or not the identification number (target article number) of the target article 110 has been input (step 903). If the target article number has not been input, the target input article number is input from the operation input device 103. (Step 904), it is determined whether the CAD data F relating to the target article 110 has been registered (Step 905). If the CAD data F has not been registered, the CAD data F is transferred from the storage medium 108 to the memory medium 102A. It is registered (step 906), and it is determined whether or not to change the recognition test surface (step 907). If it is changed, the recognition test surface is newly set or updated (step 908).
[0096]
Next, the target article 110 is driven by the multi-axis drive control mechanism 106A, the target article 110 is moved to the remote retreat position designated to be written in the memory medium 102A, and the recognition verification surface of the target article 110 is remotely imaged, Judging from the image center and the size of the image based on the imaging data E, the position where the entire recognition test surface is displayed at the maximum is calculated (step 909).
[0097]
Subsequently, the target article 110 is driven by the multi-axis drive control mechanism 106A, the target article 110 is moved to the initial movement position calculated in step 909, and the recognition verification surface of the target article 110 is imaged (step 110).
Here, the initial movement position is set to an approach position that is located immediately above the center position of the target article 110 and in which the entire recognition verification surface is most visible.
Subsequently, the contour image is extracted from the imaged screen and binarized to calculate the principal axis of inertia, the position of the center of gravity, and the image contour area (step 911). Further, various CAD data F stored in the memory medium 102A are used. A plane figure having a viewpoint and a magnification is searched to extract a plane figure that is congruent with the binarized contour image stored in step 911 (step 912).
Step 912 corresponds to the first search / identification means 719 described above (see FIG. 7).
[0098]
Subsequently, it is determined whether or not an identified figure having a predetermined precision or higher can be extracted (step 913). If an identified figure with a predetermined accuracy can be extracted, a comparison determined in advance on the CAD data F is performed. The correspondence between the specific line segment of the target length and the imaging line segment in the captured image in step 911 is determined (step 914).
Next, an image is taken after moving the target article 110 closer so that the short and small specific line segment is displayed maximally (step 915). Here, the imaging screen in step 915 is an enlarged image of a part of the recognition test surface.
[0099]
Subsequently, the direction of the optical axis of the lens 105a at the time of imaging in step 915 is set and stored as a distance coordinate axis, the current position on the distance coordinate of the target article 110 is stored as a reference coordinate value, and the associated short and short specific line segment is stored. , The image line segment length a is measured by the above equation (6), the actual line segment length A is extracted from the CAD data F, and converted to the orthogonal plane position by the above equations (2) to (4). The calculated objective reference distance Z0 is calculated (step 916).
[0100]
Next, the actual line segment length A and the proportional coefficient K at the objective reference distance Z0 are extracted from the calibration data table created at step 902, and the objective reference distance calibrated by the above-described equations (6) to (8). Z0 is calculated, and this is determined and stored as the objective reference distance Z0 (step 923).
[0101]
Subsequently, the current coordinate value of the target article 110 is detected based on the position detection output from the encoder 107 provided in the multi-axis drive control mechanism 106A (step 924), and the current coordinate value and the reference stored in step 916 are stored. The objective distance Z at the current position of the target article 110 is calculated by adding the objective reference distance Z0 determined and stored in step 923 to the difference from the coordinate value (step 925), and the processing routine in FIG. 9 ends. .
[0102]
On the other hand, if the determination result in step 913 is “NO” and the identification matching rate is not appropriate, a different product is determined and a notification output is generated (step 926), and the operation proceeds to the operation end step 927. .
The arithmetic unit 101A returns to the operation start step 900 again after executing another control operation in the operation end step 927.
[0103]
In summary of the distance measuring operation described above (see FIG. 9), the target article 110 is configured to be freely movable by the multi-axis drive control mechanism 106A, and is first moved to the remote retreat position to avoid collision with the electronic camera 105. Then, it moves closer to the first position where the entire recognition test surface is displayed at the maximum. Here, the arithmetic unit 101A determines the short / small specific line segment, extracts the real line segment length A from the CAD data F, and moves the target article 110 closer to the second position to display the short / small specific line segment at maximum. The object reference distance Z0 is calculated by measuring the image line segment length a at a certain position and comparing it with the actual line segment length A.
As described above, by performing the proximity measurement, the detection accuracy can be improved.
[0104]
At this time, in order to determine the correspondence between the image line segment length a of the specific line segment and the actual line segment length A, a search / identification operation based on the CAD data F of the three-dimensional figure and an actual line segment based on the reference dimension data are performed. Length extraction is performed.
Further, once the object reference distance Z0 is calculated, thereafter, the object distance Z at any position of the target article 110 is constantly monitored by the position detection output of the encoder 107 provided in the multi-axis drive control mechanism 106A.・ Can be measured.
[0105]
In FIG. 9, step 910 functions as an initial movement imaging unit, step 911 functions as an image feature amount calculation unit such as an inertia principal axis, a center of gravity position, and a contour area, and step 912 functions as a search / identification unit. Step 913 functions as a foreign object determination unit, Step 915 functions as an approach movement imaging unit, and Step 916 functions as a distance coordinate axis recognition unit, a thickness correction unit, and an object reference distance measurement unit. 923 functions as a measurement distance calibrating means and an object reference distance determining means, step 924 functions as a current value detecting means, step 925 functions as an object distance measuring means, and step 926 serves as a notification output generating means. It is functioning.
[0106]
Next, the overall operation according to the second embodiment of the present invention shown in FIG. 8 will be described with reference to FIG.
In FIG. 10, first, when the overall operation related to the measurement of the object distance and the search / identification operation is started by the arithmetic unit 101A (step 950), whether a command to start the recognition test operation of the target article 110 related to the specified article number is output or not. It is determined whether or not it is (step 951).
[0107]
If it is determined in step 951 that the operation start command has not been given (ie, NO), the processing routine of FIG. 10 is immediately terminated (step 977), and the operation start command has been given (ie, YES). Then, it is determined whether or not designation (or update designation) of a recognition test surface is to be executed (step 952).
If it is determined in step 952 that designation or update designation of the recognition test surface is not executed (that is, NO), the process proceeds to step 958 (described later), and designation or update designation of the recognition test surface is executed (that is, If the determination is YES, the following steps 953 to 956 are executed.
[0108]
First, the recognition test surface number is sequentially selected and designated for update (step 953). Subsequently, it is determined whether or not the measurement of the object distance has been completed (step 954a). , NO), the processing operation for distance measurement (see FIGS. 6 and 9) is executed (step 955a).
Further, the target article 110 (or the electronic camera 105 as described above) is moved to the verification plane imaging position, the CAD graphic plane corresponding to the recognition verification plane is read, and displayed on the display device 104 (step 956). Move to step 958.
[0109]
On the other hand, if it is determined in step 954a that the measurement of the object distance has been completed (that is, YES), subsequently, the CAD data F is referred to, and the height of the recognition test surface selected and updated in step 953 is determined. It is determined whether the position has changed compared to the previous height position of the recognition test surface (step 954b).
If it is determined in step 954b that the height position of the recognition test surface has been changed (ie, YES), the difference between the heights of the recognition test surface is algebraically converted to the object distance Z measured by the object distance measuring means. By performing the addition, the recognition test surface to be the object of the object distance is switched and corrected (step 955b), and the process proceeds to step 956. The difference in the height of the recognition test surface is calculated from the CAD data F.
If it is determined in step 954b that the height position of the recognition test surface has not been changed (that is, NO), the process proceeds to step 956 without executing step 955b.
The above steps 952 to 956 constitute the interlocking switching means 957.
[0110]
In step 958, the arithmetic unit 101A captures an image of the target article 110, extracts a contour image, and binarizes the contour image. Subsequently, the image feature amount such as the principal axis of inertia or the center of gravity of the contour image obtained in step 958, or the contour image area is calculated (step 959).
Subsequently, it is determined whether high-precision search / identification is necessary based on the presence or absence of an instruction from the arithmetic unit 101A (step 960). At this time, the determination result in step 960 is indicated by, for example, an identification number attached to the recognition test surface number.
[0111]
If it is determined in step 960 that high-precision search / identification is unnecessary (that is, NO), a different product determination notification step 730 is added to the second search / identification means 729 described above (see FIG. 7). The fitting process (step 961) is executed, and the process proceeds to step 964.
On the other hand, if it is determined in step 960 that high-precision search / identification is required (that is, YES), the same fitting processing as in step 961 (step 962) is executed, and then the above-described fitting processing is performed (see FIG. 7). ), A fitting process (step 963) in which step 730 is added to the first search / identification means 719 (see FIG. 7), and the flow proceeds to step 964.
In steps 961 and 962, the objective distance Z is used, whereas in step 963, the objective distance Z is not used.
[0112]
In step 964, the arithmetic unit 101A determines whether or not it is necessary to change the optical axis direction (line of sight) of the electronic camera 105 to perform the matching determination. At this time, it is assumed that the criterion of step 964 is specified in the memory medium 102A, for example, in association with the number of the recognition test surface.
If it is determined in step 964 that the line-of-sight direction does not need to be changed (that is, NO), the processing routine in FIG. 10 ends immediately (step 977).
[0113]
On the other hand, if it is determined in step 964 that the line of sight needs to be changed (that is, YES), the plane coordinate position of the electronic camera 105 is moved by a predetermined amount, and the optical axis direction is changed to the direction in which the original point of interest is viewed. Change (step 965).
Further, the viewpoint and the direction of the line of sight of the CAD figure are moved and adjusted in conjunction with the movement adjustment of the electronic camera in step 965, and the same view is observed from the same position (step 966).
The above steps 965 and 966 constitute the interlocking adjustment means 967.
[0114]
Further, following step 966, the target article 110 whose movement has been adjusted in step 965 is imaged, and image features such as the principal axis of inertia, the center of gravity position, and the area of the contour image are calculated (step 970). The graphic features such as the principal axis of inertia, the position of the center of gravity, the area of the contour figure, etc. of the CAD plane figure based on the viewpoint and the line of sight adjusted in conjunction with (1) are calculated (step 971).
[0115]
Next, it is determined whether or not the contour image area calculated in step 970 and the contour graphic area calculated in step 971 are properly matched (step 972), and are not properly matched (that is, NO). , The process proceeds to a different product determination notification step 976.
On the other hand, if it is determined in step 972 that they are properly matched (that is, YES), the overlapping area is calculated when the center of gravity point and the direction of the principal axis of inertia of the contour image and the contour figure are matched (step 973). ).
Subsequently, it is determined whether or not the ratio (adaptation rate) between the overlap area and the contour area is normal (step 974). If it is determined that the adaptation rate is normal (that is, YES), the processing in FIG. The routine ends (step 977), and if it is determined that the matching rate is not normal (that is, NO), the process proceeds to a different product determination notification step 976.
The above steps 970 to 974 constitute the overall conformity determination means 975.
[0116]
The different product determination notification step 976 is performed when the determination result at step 972 is “NO” (the contour areas do not match properly) or when the determination result at step 974 is “NO” (the conformity rate is not normal). To generate a notification output based on the different product determination.
The operation end step 977 is performed when the determination result in step 951 is “NO” (the operation start command is not given), when the determination result in step 964 is “NO” (there is no need to change the line of sight), or It operates when the determination result of step 974 is “YES” (the matching rate is normal).
In the operation end step 977, the arithmetic unit 101A executes another control and then returns to the start step 950 to execute search / identification on the next recognition test surface.
[0117]
In FIG. 10, steps 961 and 962 function as second search / identification means, step 963 functions as first search / identification means, and step 972 functions as area determination means. Step 974 functions as a degree-of-polymerization determining means, and step 976 functions as a notification output generating means.
[0118]
To summarize the processing operations described above (see FIGS. 9 and 10), in the search / identification, the interlocking switching unit 957 captures the image of the target article 110 by the electronic camera 105 in response to the sequentially changed recognition test surface. Since the surface and the read graphic surface of the CAD graphic are linked so as to indicate the same part, the range of graphic search by the first or second search / identification means is limited. As a result, the time required for search / identification can be significantly reduced.
The second search / identification means (steps 961 and 962) can be applied as means for high-speed identification when the object distance is known.
Further, the first search / identification means (step 963) further increases / decreases the magnification slightly after the object distance has been determined / searched / identified by the second search / identification means and identifies the object with higher accuracy. It can be applied if necessary.
[0119]
Further, after the search or identification of the predetermined image screen is executed by the first or second search and identification means, the position and the optical axis direction of the electronic camera 105 are moved and adjusted, and the viewpoint and the line of sight of the CAD figure are also linked. By adjusting the movement of the recognition test surface and observing the same field of view from the same position, the suitability of the recognition verification surface in the oblique state can be comprehensively determined.
[0120]
As described above, according to Embodiment 2 of the present invention, CAD data F includes reference dimension data for calculating actual dimensions for an arbitrary line segment. The method includes the approach movement imaging means and the objective reference distance measuring means, and measures the objective reference distance Z0 by comparing the image line segment length a for the specific line segment with the real line segment length A based on the CAD data F. In addition, the object distance Z can be measured by using the single-lens electronic camera 105 without using a twin-lens camera or a moving camera.
In particular, the object reference distance Z0 is measured by comparing the image line segment length a of the close-up imaging related to the short and small specific line segment with the real object line segment length A based on the CAD data F. Can be measured.
[0121]
Further, in addition to the above-described functions and effects, the detected object reference distance can be added as reference information for searching and identifying each part of the target article 110 and the CAD data graphic.
The arithmetic unit 101A also includes a distance coordinate axis recognizing unit, a current position detecting unit, and an object distance measuring unit. The detected object distance is added as reference information to search / retrieve each part of the target article 110 and the CAD data graphic. Since the identification is performed, once the object reference distance is measured, the object distance corresponding to the current position of the electronic camera 105 or the current position of the target article 110 can be constantly monitored and measured. Can be used for search / identification control of each unit.
[0122]
In addition, since the initial movement imaging means (imaging steps 610 and 910) moves to the initial position via the remote evacuation position, it may collide with the electronic camera 105 when the target article 110 is carried in. There is no.
The search for the identification figure by the objective reference distance measuring means is executed by searching for the line of sight and the magnification so that the outline of the plane figure based on the CAD data F overlaps with the outline image captured by the electronic camera 105, and is executed. Includes a different product judging means and generates a notification output when the target article 110 is a different product. Therefore, the different product can be removed before executing the search / identification control of each unit.
[0123]
Further, the arithmetic unit 101A includes an objective distance measuring unit and first and second search / identification units, and selectively uses the first or second search / identification unit depending on whether the objective distance is unknown or known. The first search / identification means is applied as a means for measuring the objective reference distance, and after the objective distance is known, high-speed identification can be performed using the second search / identification means.
Further, after the rough search / identification is executed by the second search / identification means, the first search / identification means is used together to slightly increase / decrease the magnification of the search / identification within the range of the measurement error of the object distance. Thus, more accurate identification can be efficiently performed.
[0124]
Further, the CAD data F includes reference dimension data for calculating an actual dimension regarding an arbitrary line segment, and the arithmetic unit 101A includes a current position detecting unit, an objective reference distance measuring unit, a first or second objective unit. By including at least one of the distance measuring means, and either one of the first or second objective distance measuring means, or an average value of both of them being applied as the objective distance measuring means, the installation reference plane of the target article 110 can be adjusted. The first object distance measuring means is selected in the case of unstable fluctuation which is likely to fluctuate. If the distance between the installation reference plane of the target article 110 and the interval distance is originally extremely accurate and stable, the second object distance measuring means is selected. Distance measuring means can be selected. Further, the first objective distance measuring means can be used as a means for confirming the presence or absence of an abnormal mistake (such as a wrong transfer jig).
[0125]
The first and second search / identification means are respectively a primary adjustment means for matching a related area of the captured contour image with a contour related area of the contour figure based on the CAD data F; The second search / identification means includes a secondary adjustment means for maximizing an overlapping area with the contour figure based on the CAD data F, and a matching rate determination means. Is a fixed value determined according to the object distance, so if the object distance is known, the secondary adjustment at various graphic magnifications is not required, and the time required for search and identification is reduced. It can be greatly reduced.
Further, when the predetermined matching rate is not obtained, the notification of the abnormal product is generated and the useless search / identification operation can be terminated.
[0126]
In addition, the adjustment of the line of sight of the CAD figure by the primary tone adjustment means simply moves the plane position of the line of sight, and the direction of the line of sight is always the same as the optical axis direction of the electronic camera 105 orthogonal to the recognition verification plane. In this state, after performing the search and identification, the position and the optical axis direction of the electronic camera 105 are moved and adjusted by the interlocking adjustment means, and the viewpoint and the line of sight of the CAD figure are also moved and adjusted in conjunction with each other. Since the same field of view is observed from and the degree of coincidence between the contour image of the electronic camera 105, which has been moved and adjusted by the interlocking adjustment means, and the contour figure based on the CAD data F is determined, and a different product determination notification output is generated. First, a planar match decision is made, and then, if necessary, a perspective / three-dimensional match decision is made to realize highly efficient and accurate search / identification. Rukoto can.
[0127]
Further, the arithmetic unit 101A includes an interlocking switching unit and an objective distance correcting unit, and responds to the sequentially specified change of the recognition verification surface, and in response to the change of the recognition verification surface, the imaging surface of the target article 110 by the electronic camera 105 and the reading graphic surface of the CAD graphic. Are linked so as to indicate the same part, the range of the figure search by the first or second search / identification means is limited, and the time required for search / identification can be greatly reduced.
[0128]
Embodiment 3 FIG.
As is apparent from the above description, the present invention measures the object distance Z with high accuracy using the single-lens electronic camera 105 while utilizing the CAD data F of the three-dimensional figure relating to the target article 110, By using the object distance information, the identity of the target article indicated by the CAD data F and the actual target article 110 is determined at high speed and with high accuracy. Can be adopted.
[0129]
That is, in the first and second embodiments, only one of the electronic camera 105 and the target article 110 is moved by the multi-axis drive control mechanism 106 or 106A as a relative position moving unit between the electronic camera 105 and the target article 110. However, a mixed drive system may be adopted.
For example, an intermittently driven conveyor (not shown) moves the target article 110 under the electronic camera 105, and the position of the target article 110 can be arbitrarily controlled by a conveyor driving servomotor. 105 may be configured to be movable only in the vertical direction and the direction perpendicular to the conveyor.
[0130]
In the first embodiment, the target article 110 is installed on the floor, and the upper surface of the target article 110 is used as the recognition verification surface 110a in the first embodiment. May be used as a recognition test surface, or the target article 110 may be installed on a wall surface and a plane parallel to the wall surface may be used as a recognition test surface, and various borrowing installation modes are assumed.
In particular, when the recognition verification surface of the target article 110 is inclined with respect to the optical axis direction of the electronic camera 105 (see FIG. 3), the optical axis direction of the electronic camera 105 is adjusted to be orthogonal to the inclined surface. The inclination angle α in this case can be automatically set by reading from the CAD data F.
[0131]
Further, with respect to the detection accuracy of the contour image of the target article 110, in the first and second embodiments, the case where a monochrome camera is used as the electronic camera 105 has been described. A contour image can be easily extracted for a specific part having a difference.
Further, in the second embodiment, it is also possible to select a large number of short and small specific line segments and average and calculate each objective reference distance in the same manner as in the first embodiment, thereby realizing high accuracy. .
[0132]
Further, as an application example of the present invention, although not described in detail in the first and second embodiments, for example, when used in an electronic board assembling process, CAD data F is constructed in units of parts. Thereby, it can be effectively used for an appearance inspection such as a missing part of a mounted component or an assembly of a different part.
[0133]
【The invention's effect】
As described above, according to the present invention, an electronic camera having a lens for imaging a target article from a variable relative position, a multi-axis drive control mechanism for controlling a relative position between the electronic camera and the target article, and a target article A memory medium storing CAD data of a three-dimensional figure and a search / identification program for generating a variable-magnification plane figure observed from an arbitrary direction, and a plane figure based on the CAD data by the search / identification program. An arithmetic unit for searching for and identifying a congruent figure so as to match the shape of the captured image with respect to the target image. Initial movement imaging means for approaching the article and capturing an approach image of the target article, and calculating an image line segment length a for a specific line segment in the approach image The identification figure is searched to extract the actual line segment length A on the CAD data for the specific line segment. Based on the image line segment length a and the actual line segment length A and the focal length f of the lens which is a known number, the objective The reference distance Z0 is calculated by the following equation (1):
Z0 = f × A / a (1)
And a plurality of specific line segments determined as specific line segments, and based on the plurality of specific line segments, an average value of each object reference distance calculated from the equation (1) is calculated based on the plurality of specific line segments. Averaging operation means for calculating the final objective reference distance with respect to the recognition test surface, thereby achieving highly accurate objective distance measurement with a single-lens camera while utilizing CAD data of a three-dimensional figure relating to the target article. There is an effect that a recognition test system for the article to be imaged can be obtained.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a first embodiment of the present invention.
FIG. 2 is an explanatory diagram showing a relative positional relationship between a lens and a target article according to the first embodiment of the present invention.
FIG. 3 is an explanatory diagram showing a relative positional relationship between a lens and an inclined target object according to the first embodiment of the present invention;
FIG. 4 is an explanatory diagram showing an image line segment length calculation process according to the first embodiment of the present invention;
FIG. 5 is an explanatory diagram illustrating a search / identification process according to the first embodiment of the present invention;
FIG. 6 is a flowchart showing a distance measuring operation according to the first embodiment of the present invention.
FIG. 7 is a flowchart showing a search / identification operation according to the first embodiment of the present invention.
FIG. 8 is a block diagram showing a second embodiment of the present invention.
FIG. 9 is a flowchart showing a distance measuring operation according to Embodiment 2 of the present invention.
FIG. 10 is a flowchart showing an overall operation according to Embodiment 2 of the present invention.
[Explanation of symbols]
101, 101A arithmetic unit, 102, 102A memory medium, 105 electronic camera, 105a lens, 105b optical axis, 105c virtual screen, 106, 106A multi-axis drive control mechanism, 107 encoder, 108 storage medium, 110 target article, 110a, 111a Recognition verification surface (upper surface), 110b reference surface (installation back surface), 111b orthogonal surface, 112a first specified line segment, 112b first virtual specified line segment, 113a second specified line segment, 113b second virtual specified Line segment, 120 comparison virtual screen, 121a captured contour image, 121b CAD contour figure, 122a, 122b center line, 123a, 123b center position, a image line segment length, A real line segment length (top surface), D depth dimension ( Spacing distance), ΔD head dimension, E imaging data, f focal length, F CAD data, H reference plane distance, Nx Number of horizontal pixels, Ny Number of vertical pixels, p pixel interval, Z objective distance, α tilt angle, 610 initial movement imaging means, 611 distance coordinate axis recognition / image feature quantity calculation means, 612 search / identification means, 613 Means, 615 thickness correction / objective reference distance measuring means, 616 measuring distance calibration / averaging calculating means, 617 variation abnormality judging means, 621 second objective reference distance measuring means, 622 second foreign article judging means, 623 objective reference Distance determining means, 624 Current value detecting means, 625 Object distance measuring means, 626 Notification output generating means, 710, 712, 720 Primary adjusting means, 715, 725 Secondary adjusting means, 717, 727 Matching rate determining means, 719 1 search / identification means, 729 second search / identification means, 730 notification output generation means, 910 initial movement imaging means, 911 image features Calculation means, 912 Search / identification means, 913 Different article determination means, 915 Approaching movement imaging means, 916 Distance coordinate axis recognition / thickness correction / objective reference distance measuring means, 923 Measurement distance calibration / objective reference distance determining means, 924 Current value detection Means, 925 objective distance measuring means, 926 notification output generating means, 955b objective distance correcting means, 957 interlock switching means, 961 second searching / identifying means, 962 second searching / identifying means, 963 first searching / identifying Means, 967 interlocking adjustment means, 972 area judgment means, 974 degree of polymerization judgment means, 975 comprehensive suitability judgment means, 976 notification output generation means.

Claims (16)

可変相対位置から対象物品を撮像するためのレンズを有する電子カメラと、
前記電子カメラと前記対象物品との相対位置を制御する多軸駆動制御機構と、
前記対象物品に関して任意の方向から観察した可変倍率の平面図形を生成するための3次元図形のCADデータおよび検索・同定プログラムが格納されたメモリ媒体と、
前記検索・同定プログラムによって前記CADデータに基づく平面図形が前記対象物品に対する撮像画像の形状と一致するように合同図形の検索・同定を行う演算装置とを備え、
前記演算装置は、
少なくとも前記対象物品の認識検定面の全体が撮像画像内に包含される限界内で、前記対象物品に接近して前記対象物品の接近画像を撮像する初期移動撮像手段と、
前記接近画像の中の特定線分に対する画像線分長aを算出するとともに、同定図形を検索して前記特定線分に対するCADデータ上の既知の実物線分長Aを抽出し、前記画像線分長aおよび前記実物線分長Aと既知数である前記レンズの焦点距離fとに基づいて、対物基準距離Z0を、以下の式(1)、
Z0=f×A/a ・・・(1)
により算出して記憶する対物基準距離測定手段と、
前記特定線分として複数の特定線分を定め、前記複数の特定線分に基づいて、前記式(1)から算出された各対物基準距離の平均値を、前記認識検定面に対する最終的な対物基準距離として算定する平均化演算手段と
を含むことを特徴とする撮像対象物品の認識検定システム。
An electronic camera having a lens for imaging the target article from the variable relative position,
A multi-axis drive control mechanism for controlling a relative position between the electronic camera and the target article,
A memory medium storing CAD data of a three-dimensional figure and a search / identification program for generating a plane figure of variable magnification observed from an arbitrary direction with respect to the target article;
An arithmetic unit for performing search / identification of a congruent graphic by the search / identification program so that a planar graphic based on the CAD data matches the shape of a captured image of the target article;
The arithmetic device,
Initial movement imaging means for capturing an approaching image of the target article by approaching the target article, at least within a limit that the entire recognition verification surface of the target article is included in the captured image,
The image line length a for the specific line segment in the approach image is calculated, and the known graphic line length A on the CAD data for the specific line segment is extracted by searching for the identification figure, and the image line segment is extracted. The objective reference distance Z0 is calculated based on the length a, the actual segment length A, and the focal length f of the lens, which is a known number, by the following equation (1):
Z0 = f × A / a (1)
Object reference distance measuring means calculated and stored by:
A plurality of specific line segments are determined as the specific line segments, and an average value of the respective object reference distances calculated from the expression (1) is determined based on the plurality of specific line segments, thereby obtaining a final objective with respect to the recognition test surface. A recognition test system for an article to be imaged, comprising: averaging operation means for calculating a reference distance.
前記演算装置は、前記対物基準距離のバラツキ異常を判定するバラツキ異常判定手段を含み、
前記バラツキ異常判定手段は、前記複数の特定線分に対応して前記式(1)により算出された各対物基準距離の変動幅が、所定変動幅よりも過大であると判定された場合に、異常報知出力を発生することを特徴とする請求項1に記載の撮像対象物品の認識検定システム。
The arithmetic unit includes a variation abnormality determining unit that determines a variation abnormality of the objective reference distance,
The variation abnormality determining means is configured to determine, when it is determined that the variation width of each of the objective reference distances calculated by the equation (1) corresponding to the plurality of specific line segments is larger than a predetermined variation width. The recognition test system for an article to be imaged according to claim 1, wherein an abnormality notification output is generated.
前記演算装置は、距離座標軸認識手段、現在位置検出手段および対物距離測定手段を含み、
前記距離座標軸認識手段は、前記式(1)により前記対物基準距離が測定された測定時点での前記電子カメラの光軸方向を距離座標軸として設定記憶するとともに、前記測定時点での前記電子カメラと前記対象物品との相対位置に関する前記距離座標軸上の値を基準座標値として記憶し、
前記現在位置検出手段は、前記多軸駆動制御機構の各軸の位置検出出力に応答して、前記電子カメラまたは前記対象物品の現在位置に関する前記距離座標軸上の現在座標値を検出し、
前記対物距離測定手段は、前記式(1)から算出された対物基準距離に、前記現在座標値と前記基準座標値との差分を加算することにより、前記現在位置における対物距離を算出することを特徴とする請求項1または請求項2に記載の撮像対象物品の認識検定システム。
The arithmetic device includes a distance coordinate axis recognition unit, a current position detection unit, and an object distance measurement unit,
The distance coordinate axis recognizing means sets and stores, as a distance coordinate axis, an optical axis direction of the electronic camera at a measurement time point at which the objective reference distance is measured according to the equation (1), and A value on the distance coordinate axis related to the relative position with the target article is stored as a reference coordinate value,
The current position detecting means, in response to the position detection output of each axis of the multi-axis drive control mechanism, detects a current coordinate value on the distance coordinate axis regarding the current position of the electronic camera or the target article,
The objective distance measuring means calculates an objective distance at the current position by adding a difference between the current coordinate value and the reference coordinate value to an objective reference distance calculated from the equation (1). The recognition verification system for an article to be imaged according to claim 1 or 2, wherein
可変相対位置から対象物品を撮像するためのレンズを有する電子カメラと、
前記電子カメラと前記対象物品との相対位置を制御する多軸駆動制御機構と、
前記対象物品に関して任意の方向から観察した可変倍率の平面図形を生成するための3次元図形のCADデータおよび検索・同定プログラムが格納されたメモリ媒体と、
前記検索・同定プログラムによって前記CADデータに基づく平面図形が前記対象物品に対する撮像画像の形状と一致するように合同図形の検索・同定を行う演算装置とを備え、
前記演算装置は、
少なくとも前記対象物品の認識検定面の全体が撮像画像内に包含される限界内で、前記対象物品に接近した第1位置で前記対象物品を撮像し、所定長よりも短い線分長の特定線分を決定するとともに、同定図形を検索して前記特定線分に対するCADデータ上の既知の実物線分長Aを抽出する初期移動撮像手段と、
前記特定線分の全体が包含される限界内で、前記対象物品に接近した第2位置で前記特定線分を撮像する接近移動撮像手段と、
前記第2位置で撮像された前記特定線分に対する画像線分長aを算出するとともに、前記実物線分長Aおよび前記画像線分長aと既知数であるレンズの焦点距離fとに基づいて、対物基準距離Z0を、以下の式(1)、
Z0=f×A/a ・・・(1)
により算出して記憶する対物基準距離測定手段と
を含むことを特徴とする撮像対象物品の認識検定システム。
An electronic camera having a lens for imaging the target article from the variable relative position,
A multi-axis drive control mechanism for controlling a relative position between the electronic camera and the target article,
A memory medium storing CAD data of a three-dimensional figure and a search / identification program for generating a plane figure of variable magnification observed from an arbitrary direction with respect to the target article;
An arithmetic unit for performing search / identification of a congruent graphic by the search / identification program so that a planar graphic based on the CAD data matches the shape of a captured image of the target article;
The arithmetic device,
At least within a limit that the entire recognition verification surface of the target article is included in the captured image, the target article is imaged at a first position close to the target article, and a specific line having a line segment shorter than a predetermined length Initial moving imaging means for determining a segment, searching for an identification figure, and extracting a known real line segment length A on CAD data for the specific line segment;
Within a limit that the entirety of the specific line segment is included, an approach movement imaging unit that images the specific line segment at a second position close to the target article;
An image line segment length a for the specific line segment imaged at the second position is calculated, and based on the actual line segment length A, the image line segment length a, and a known focal length f of the lens. , The object reference distance Z0 by the following equation (1):
Z0 = f × A / a (1)
And an object reference distance measuring means for calculating and storing the object reference distance.
前記演算装置は、
前記第2位置での前記電子カメラの光軸方向を距離座標軸として設定記憶するとともに、前記第2位置での前記電子カメラと前記対象物品との相対位置に関する前記距離座標軸上の値を基準座標値として記憶する距離座標軸認識手段と、
前記多軸駆動制御機構の各軸の位置検出出力に応答して、前記電子カメラまたは前記対象物品の現在位置に関する前記距離座標軸上の現在座標値を検出する現在位置検出手段と、
前記式(1)から算出された対物基準距離に、前記現在座標値と前記基準座標値の差分を加算することにより、前記現在位置における対物距離を算出する対物距離測定手段と
を含むことを特徴とする請求項4に記載の撮像対象物品の認識検定システム。
The arithmetic device,
The optical axis direction of the electronic camera at the second position is set and stored as a distance coordinate axis, and a value on the distance coordinate axis regarding a relative position between the electronic camera and the target article at the second position is a reference coordinate value. Distance coordinate axis recognition means stored as
In response to the position detection output of each axis of the multi-axis drive control mechanism, current position detection means for detecting a current coordinate value on the distance coordinate axis regarding the current position of the electronic camera or the target article,
Object distance measuring means for calculating an object distance at the current position by adding a difference between the current coordinate value and the reference coordinate value to the object reference distance calculated from the equation (1). The recognition test system for an article to be imaged according to claim 4.
前記初期移動撮像手段による撮像位置は、前記対象物品の番号と前記認識検定面の識別番号とを指定することによって特定される初期位置であり、順次指定される前記認識検定面の変更に応答して、前記電子カメラによる前記対象物品の撮像面と、前記CADデータの読出し図形面とが同じ部位を示すように連動していることを特徴とする請求項1または請求項2または請求項4に記載の撮像対象物品の認識検定システム。The imaging position by the initial movement imaging means is an initial position specified by designating the number of the target article and the identification number of the recognition test surface, and responds to the sequentially specified change of the recognition test surface. The imaging surface of the target article by the electronic camera and the read graphic surface of the CAD data are linked so as to indicate the same part. A recognition test system for an article to be imaged according to the above description. 前記初期移動撮像手段による撮像位置は、前記対象物品の番号と前記認識検定面の識別番号とを指定することにより特定される遠隔退避位置を経由して、前記対象物品が最大表示される位置に接近移動した位置であり、順次指定される前記認識検定面の変更に応答して、前記電子カメラによる前記対象物品の撮像面と、前記CADデータの読出し図形面とが同じ部位を示すように連動していることを特徴とする請求項1または請求項2または請求項4に記載の撮像対象物品の認識検定システム。The imaging position by the initial movement imaging means is via a remote retreat position specified by designating the number of the target article and the identification number of the recognition test surface, at a position where the target article is displayed maximally. In response to a change in the recognition verification surface sequentially specified, the imaging surface of the target article by the electronic camera and the CAD data readout graphic surface are linked so as to indicate the same part. The recognition test system for an object to be imaged according to claim 1, wherein the recognition test is performed. 前記対物基準距離測定手段は、
前記実物線分長Aのサンプル物品を対物距離Zの位置に設置して実測することにより画像線分長aを求め、前記実物線分長A、前記対物距離Zおよび前記画像線分長aに基づいて、比例係数Kを、以下の式、
K=Z×a/A
から算出し、前記比例係数Kを前記メモリ媒体に格納する第1の演算部と、
任意の対物距離Zおよび実物線分長Aを指定することによって前記比例係数Kを逆算して算出するための校正データテーブルと、
前記実物線分長Aにおける比例係数Kを、前記校正データテーブルから抽出して算出するとともに、前記比例係数Kを校正された焦点距離として前記式(1)に代入することにより、校正された対物基準距離Z0を、以下の式、
Z0=K×A/a
により算出する測定距離校正手段と
を含むことを特徴とする請求項1または請求項2または請求項4に記載の撮像対象物品の認識検定システム。
The objective reference distance measuring means,
The image line segment length a is obtained by placing and measuring the sample article having the actual line segment length A at the position of the object distance Z, and calculating the image line segment length A, the object distance Z, and the image line segment length a. Based on the proportional coefficient K,
K = Z × a / A
A first computing unit that calculates the proportional coefficient K in the memory medium,
A calibration data table for calculating the inverse of the proportionality coefficient K by designating an arbitrary objective distance Z and a real line segment length A;
A proportional coefficient K in the actual segment length A is calculated by extracting the proportional coefficient K from the calibration data table, and substituting the proportional coefficient K into the equation (1) as a calibrated focal length. The reference distance Z0 is calculated by the following equation:
Z0 = K × A / a
5. The recognition test system for an article to be imaged according to claim 1, further comprising: a measuring distance calibrating means for calculating the distance according to the following formula.
前記対物基準距離測定手段は、
定められた特定線分が前記認識検定面とは異なる距離位置である場合、または前記認識検定面が前記電子カメラの光軸方向に対して傾斜している場合に、前記CADデータから抽出された前記特定線分に関する奥行き寸法Dを前記式(1)に付加することにより、補正された対物基準距離Z0を、以下の式、
Z0=f×A/a±D
により補正算出する厚み補正手段を含み、
前記特定線分が前記認識検定面の光軸位置よりも遠い法線距離位置にある場合には、前記奥行き寸法Dを減算補正し、
前記特定線分が前記認識検定面の光軸位置よりも近い法線距離位置にある場合には、前記奥行き寸法Dを加算補正し、
前記補正された対物基準距離Z0は、前記認識検定面の光軸位置における前記光軸方向との直行面に対する前記電子カメラとの間の法線距離に換算されていることを特徴とする請求項1または請求項2または請求項4に記載の撮像対象物品の認識検定システム。
The objective reference distance measuring means,
When the determined specific line segment is located at a different distance from the recognition verification surface, or when the recognition verification surface is inclined with respect to the optical axis direction of the electronic camera, the CAD data is extracted from the CAD data. By adding the depth dimension D relating to the specific line segment to the equation (1), the corrected objective reference distance Z0 is calculated by the following equation:
Z0 = f × A / a ± D
Including a thickness correction means for calculating the correction by
If the specific line segment is located at a normal distance position farther than the optical axis position of the recognition verification surface, the depth dimension D is subtracted and corrected,
If the specific line segment is located at a normal distance position closer to the optical axis position of the recognition verification surface, the depth dimension D is added and corrected,
The corrected objective reference distance Z0 is converted into a normal distance between the electronic camera and a plane perpendicular to the optical axis direction at the optical axis position of the recognition verification plane. The recognition verification system for an article to be imaged according to claim 1 or claim 2 or claim 4.
前記対物基準距離測定手段は、前記CADデータに基づく平面図形の輪郭が、前記電子カメラによる撮像輪郭画像と重なり合うような視線および倍率を検索することによって、前記同定図形を検索し、
前記演算装置は、異品判定手段を含み、
前記異品判定手段は、前記撮像輪郭画像と同定された平面図形との輪郭形状の重なり状態を判定し、重ならない部分の面積と重なる部分の面積との比率が所定値を超過している場合に、前記対象物品が異品であることを判定して異品判定報知出力を発生することを特徴とする請求項1または請求項4に記載の撮像対象物品の認識検定システム。
The objective reference distance measuring means, by searching for the line of sight and magnification such that the outline of the plane figure based on the CAD data overlaps with the outline image captured by the electronic camera, to search for the identification figure,
The arithmetic device includes a different product determination unit,
The different article determination unit determines an overlapping state of the contour shape between the captured contour image and the identified planar figure, and when a ratio of an area of the non-overlapping part to an area of the overlapping part exceeds a predetermined value. 5. The system according to claim 1, wherein the target article is determined to be a different article, and a different article determination notification output is generated.
前記メモリ媒体は、前記認識検定面に対する背景面を基準面としたときの基準面位置データと、前記基準面と前記対象物品の認識検定面との間の間隔距離寸法データとを格納し、
前記演算装置は、第2の対物距離測定手段、異品判定手段および対物基準距離確定手段を含み、
前記第2の対物距離測定手段は、前記基準面位置データおよび前記間隔距離寸法データに基づいて前記対象物品の認識検定面の座標位置を算定するとともに、前記多軸駆動制御機構の各軸の位置検出出力に応答して、前記電子カメラまたは前記対象物品の現在位置座標を算定し、前記認識検定面と前記現在位置座標との座標位置の差分として第2の対物距離を測定し、
前記異品判定手段は、前記対物距離測定手段により前記対物基準距離に基づいて測定された対物距離と前記第2の対物距離との相対誤差が所定値よりも過大である場合に、前記対象物品または設置治具が異品であることを判定して異品判定報知出力を発生し、
前記対物基準距離確定手段は、前記対物距離または前記第2の対物距離のいずれか一方を最終的な対物距離として選択するか、または、前記対物距離および前記第2の対物距離の平均値を算出して最終的な対物距離とすることを特徴とする請求項3または請求項5に記載の撮像対象物品の認識検定システム。
The memory medium stores reference plane position data when a background plane with respect to the recognition verification plane is set as a reference plane, and interval distance dimension data between the reference plane and the recognition verification plane of the target article.
The arithmetic unit includes a second objective distance measuring unit, a foreign object determining unit, and an objective reference distance determining unit,
The second objective distance measuring means calculates a coordinate position of a recognition verification surface of the target article based on the reference surface position data and the distance data, and a position of each axis of the multi-axis drive control mechanism. In response to the detection output, calculate the current position coordinates of the electronic camera or the target article, measure a second object distance as a difference between the coordinate position of the recognition test surface and the current position coordinates,
The foreign object determination unit is configured to, when a relative error between the object distance measured by the object distance measurement unit based on the object reference distance and the second object distance is greater than a predetermined value, Or, determine that the installation jig is a different product and generate a different product determination notification output,
The objective reference distance determining means selects one of the objective distance and the second objective distance as a final objective distance, or calculates an average value of the objective distance and the second objective distance The recognition test system for an article to be imaged according to claim 3 or 5, wherein the final object distance is obtained.
可変相対位置から対象物品を撮像するためのレンズを有する電子カメラと、
前記電子カメラと前記対象物品との相対位置を制御する多軸駆動制御機構と、
前記対象物品に関して任意の方向から観察した可変倍率の平面図形を生成するための3次元図形のCADデータおよび検索・同定プログラムが格納されたメモリ媒体と、
前記検索・同定プログラムによって前記CADデータに基づく平面図形が前記対象物品に対する撮像画像の形状と一致するように合同図形の検索・同定を行う演算装置とを備え、
前記演算装置は、
前記対象物品の各部の検索・同定の操作に先立って、前記電子カメラおよび前記対象物品が特定位置にあるときの距離を基準距離として定めるとともに、前記基準距離が定められた後は、前記多軸駆動制御機構の各軸の位置検出出力に応答して、前記対象物品に関する対物距離を常時監視測定する対物距離測定手段と、
前記電子カメラによる撮像画像の全体または特定部分と、前記CADデータから得られる平面図形の全体または特定部分とが一致するように、前記CADデータによる平面図形に対する視線および倍率を検索するとともに、前記視線および倍率の検索による一致の度合いが第1の所定適合率以上に達した場合に、前記合同図形を同定する第1の検索・同定手段と、
前記電子カメラによる撮像画像の全体または特定部分と、前記CADデータから得られる平面図形の全体または特定部分とが一致するように、前記CADデータによる平面図形に対する視線を検索するとともに、前記対物距離測定手段により測定された対物距離に応じた一定倍率を前記平面図形に対する倍率として適用し、前記視線の検索による一致の度合いが第2の所定適合率以上に達した場合に、前記合同図形を同定する第2の検索・同定手段とを含み、
前記第2の検索・同定手段は、前記対物距離が既知の場合に高速同定するために適用され、
前記第1の検索・同定手段は、前記対物距離が未確定の場合と、前記第2の検索・同定手段による検索・同定後に倍率を微小増減して、さらに高精度な同定が必要な場合に適用されることを特徴とする撮像対象物品の認識検定システム。
An electronic camera having a lens for imaging the target article from the variable relative position,
A multi-axis drive control mechanism for controlling a relative position between the electronic camera and the target article,
A memory medium storing CAD data of a three-dimensional figure and a search / identification program for generating a plane figure of variable magnification observed from an arbitrary direction with respect to the target article;
An arithmetic unit for performing search / identification of a congruent graphic by the search / identification program so that a planar graphic based on the CAD data matches the shape of a captured image of the target article;
The arithmetic device,
Prior to the search / identification operation of each part of the target article, a distance when the electronic camera and the target article are at a specific position is determined as a reference distance, and after the reference distance is determined, the multi-axis In response to the position detection output of each axis of the drive control mechanism, objective distance measuring means for constantly monitoring and measuring the object distance of the target article,
Searching for the line of sight and magnification for the plane figure based on the CAD data, so that the entire or specific part of the image captured by the electronic camera matches the whole or specific part of the plane figure obtained from the CAD data; And a first search / identification means for identifying the congruent graphic when the degree of matching by the search for the magnification reaches a first predetermined precision rate or higher;
Searching for a line of sight to the plane figure based on the CAD data and measuring the object distance so that the whole or specific part of the image captured by the electronic camera matches the whole or specific part of the plane figure obtained from the CAD data. A constant magnification corresponding to the object distance measured by the means is applied as a magnification to the plane figure, and when the degree of matching by the line-of-sight search reaches a second predetermined precision or more, the joint figure is identified. Second search / identification means,
The second search / identification means is applied for high-speed identification when the object distance is known,
The first search / identification means is used when the objective distance is undetermined, and when the magnification is slightly increased / decreased after the search / identification by the second search / identification means, and more accurate identification is required. A recognition test system for an article to be imaged, which is applied.
前記演算装置は、
前記多軸駆動制御機構の各軸の位置検出出力に応答して、前記電子カメラまたは前記対象物品の現在位置に関する現在座標値を検出する現在位置検出手段と、
前記電子カメラによる撮像画像の中の特定線分に対する画像線分長aを算出するとともに、同定図形を検索して前記特定線分に対するCADデータ上の実物線分長Aを抽出し、前記画像線分長aおよび前記実物線分長Aと既知数である前記レンズの焦点距離fとに基づいて、対物基準距離Z0を、以下の式(1)、
Z0=f×A/a ・・・(1)
により算出して記憶する対物基準距離測定手段と、
前記対物基準距離Z0を算出したときの現在値座標である基準座標値と前記現在座標値との差分を、前記対物基準距離Z0に加算することによって、前記電子カメラまたは前記対象物品の現在位置における対物距離Zを算出する第1の対物距離測定手段と、あらかじめ入力設定された既知の座標位置にある対象物品の設置面または背景面を基準面として、前記基準面の座標位置と前記CADデータの中から抽出した間隔距離寸法とに基づいて前記対象物品の認識検定面の座標位置を算定し、前記電子カメラまたは前記対象物品の現在位置座標と前記認識検定面の座標位置との差分として対物距離を測定する第2の対物距離測定手段との少なくとも一方の手段とを含み、
前記対物距離測定手段は、前記第1または第2の対物距離測定手段のいずれか一方、または前記第1および第2の対物距離測定手段の平均値を適用することを特徴とする請求項12に記載の撮像対象物品の認識検定システム。
The arithmetic device,
In response to the position detection output of each axis of the multi-axis drive control mechanism, current position detection means for detecting a current coordinate value related to the current position of the electronic camera or the target article,
The image line length a for the specific line segment in the image captured by the electronic camera is calculated, and the identification graphic is searched to extract the actual line segment length A on the CAD data for the specific line segment. Based on the division length a and the real line segment length A and the focal length f of the lens which is a known number, the objective reference distance Z0 is calculated by the following equation (1):
Z0 = f × A / a (1)
Object reference distance measuring means calculated and stored by:
By adding the difference between the reference coordinate value, which is the current value coordinate when the objective reference distance Z0 is calculated, and the current coordinate value to the objective reference distance Z0, the current position of the electronic camera or the target article at the current position A first object distance measuring means for calculating an object distance Z, and a coordinate position of the reference surface and the CAD data, wherein an installation surface or a background surface of the target article at a known coordinate position input and set in advance is used as a reference surface. The coordinate position of the recognition test surface of the target article is calculated based on the interval distance dimension extracted from the object distance, and the object distance is calculated as the difference between the current camera position of the electronic camera or the target product and the coordinate position of the recognition test surface. And at least one of second objective distance measuring means for measuring
13. The apparatus according to claim 12, wherein the objective distance measuring means applies one of the first and second objective distance measuring means or an average value of the first and second objective distance measuring means. A recognition test system for an article to be imaged according to the above description.
前記第1および第2の検索・同定手段は、それぞれ、
比較用仮想画面上において前記電子カメラによる撮像輪郭画像の関連面積と前記CADデータに基づく輪郭図形の輪郭関連面積とを算出して、輪郭の形状に依存せずに単に前記関連面積と前記輪郭関連面積とが一致するように、CAD図形の倍率および視線を調整する1次調整手段と、
前記撮像輪郭画像と前記CADデータに基づく輪郭図形との重なり合った重合面積を算出して、前記重合面積が最大となるように、前記撮像輪郭画像または前記輪郭図形の中心位置および中心線の傾斜角度を移動調整する2次調整手段と、
前記CAD図形に対する視線を変更調整しながら、前記重合面積と前記輪郭図形の内部面積との比率が所定の閾値以上となったときに、前記合同図形の同定を決定する適合率判定手段とを含み、
前記関連面積は、前記輪郭画像と前記輪郭図形の内部面積または最小外接四角形面積とによる前記対象物品の平面的な大きさを表す特徴量に対応し、
前記第2の検索・同定手段においては、前記1次調整手段によるCAD図形の倍率が固定値であり、前記適合率判定手段によって同定されなかった場合には、前記対象物品または設置治具が異品であることを判定して異品判定報知出力を発生することを特徴とする請求項12または請求項13に記載の撮像対象物品の認識検定システム。
The first and second search / identification means, respectively,
The related area of the contour image captured by the electronic camera and the contour related area of the contour figure based on the CAD data are calculated on the comparison virtual screen, and the related area and the contour related area are simply determined without depending on the shape of the contour. Primary adjustment means for adjusting the magnification and the line of sight of the CAD figure so that the area matches the area;
Calculating an overlapping area of the captured contour image and the contour figure based on the CAD data, and calculating the center position and the inclination angle of the center line of the captured contour image or the contour figure so that the overlapping area is maximized. Secondary adjustment means for moving and adjusting
A matching rate determination unit for determining the identification of the congruent graphic when the ratio between the overlap area and the internal area of the contour graphic becomes equal to or greater than a predetermined threshold while changing and adjusting the line of sight to the CAD graphic. ,
The related area corresponds to a feature amount representing a planar size of the target article by the contour image and an inner area or a minimum circumscribed square area of the contour figure,
In the second search / identification means, if the magnification of the CAD figure by the primary adjustment means is a fixed value, and if it is not identified by the matching rate judgment means, the target article or the installation jig may be different. 14. The recognition verification system for an object to be imaged according to claim 12, wherein a different product determination notification output is generated by determining that the product is a product.
前記1次調調整手段による前記CAD図形の視線の調整操作は、単に視線の平面位置を移動させるのみであり、
前記視線の方向は、前記対象物品の認識検定面と直交する前記電子カメラの光軸方向と常に同一であり、
前記演算装置は、前記第1または第2の検索同定手段による所定の撮像画面の検索・同定後に、前記電子カメラの位置および光軸方向を移動調整し、これと同時に、前記CAD図形の視点および視線方向を連動して移動調整して同じ位置から同じ視界を観察する状態に設定するための連動調整手段と、
前記連動調整手段によって移動調整された電子カメラによる輪郭画像面積とCADデータによる輪郭図形面積の一致度合いを判定する面積判定手段、または前記輪郭画像面積と輪郭図形面積の重合度合いを判定する重合度判定手段の少なくとも一方の手段による総合適合判定手段とを含み、
前記総合適合判定手段が不適合を判定した場合には、前記異品判定報知出力を発生することを特徴とする請求項14に記載の撮像対象物品の認識検定システム。
The operation of adjusting the line of sight of the CAD graphic by the primary tone adjusting means merely moves the plane position of the line of sight,
The direction of the line of sight is always the same as the optical axis direction of the electronic camera orthogonal to the recognition verification surface of the target article,
The arithmetic unit moves and adjusts the position and the optical axis direction of the electronic camera after searching and identifying a predetermined imaging screen by the first or second searching and identifying means. Interlocking adjustment means for setting the state of observing the same field of view from the same position by moving and adjusting the line of sight interlockingly,
Area determining means for determining the degree of coincidence between the contour image area of the electronic camera, which has been moved and adjusted by the interlocking adjusting means, and the contour graphic area based on the CAD data, or overlapping degree determination for determining the degree of overlap between the contour image area and the contour graphic area Means for determining overall conformity by at least one of the means,
15. The system according to claim 14, wherein when the overall conformity determination unit determines that the product is incompatible, the different product determination notification output is generated.
前記演算装置は、
順次指定される認識検定面の変更に応答して、前記電子カメラによる前記対象物品の撮像面と、前記CADデータの読出し図形面とが同じ部位を示すように連動する前記認識検定面の連動切換手段と、
前記認識検定面の前回の高さ位置と今回変更指定された高さ位置との高さ差分を前記CADデータから読み出し、前記対物距離測定手段によって測定される対物距離に前記高さ差分を代数加算することにより、前記認識検定面に対する今回の測定距離に換算補正する対物距離補正手段と
を含むことを特徴とする請求項12から請求項15までのいずれか1項に記載の撮像対象物品の認識検定システム。
The arithmetic device,
In response to the sequentially changed recognition test surface, the interlocking switching of the recognition test surface, in which the imaging surface of the target article by the electronic camera and the read graphic surface of the CAD data are linked so as to indicate the same part. Means,
The height difference between the previous height position of the recognition test surface and the currently changed height position is read from the CAD data, and the height difference is algebraically added to the object distance measured by the object distance measuring means. The object recognition apparatus according to any one of claims 12 to 15, further comprising: an objective distance correction unit configured to perform correction by conversion into a current measurement distance with respect to the recognition verification surface. Test system.
JP2003154826A 2003-05-30 2003-05-30 Recognition verification system for imaging object Pending JP2004354320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003154826A JP2004354320A (en) 2003-05-30 2003-05-30 Recognition verification system for imaging object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003154826A JP2004354320A (en) 2003-05-30 2003-05-30 Recognition verification system for imaging object

Publications (1)

Publication Number Publication Date
JP2004354320A true JP2004354320A (en) 2004-12-16

Family

ID=34049380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003154826A Pending JP2004354320A (en) 2003-05-30 2003-05-30 Recognition verification system for imaging object

Country Status (1)

Country Link
JP (1) JP2004354320A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010538286A (en) * 2007-09-03 2010-12-09 オーユー マプヴィジョン エルテーデー Recording machine vision system
WO2011062178A1 (en) * 2009-11-18 2011-05-26 三菱重工業株式会社 Inspection method, method for producing composite material components, inspection device, and device for producing composite material components
KR101496051B1 (en) 2013-11-28 2015-02-25 세메스 주식회사 Method of displaying a die bonding position
JP2015201124A (en) * 2014-04-10 2015-11-12 日本電信電話株式会社 Subject area detection device, subject area detection method, and subject area detection program
JP2016091407A (en) * 2014-11-07 2016-05-23 セコム株式会社 Position matching device and program
JP2017059207A (en) * 2015-09-18 2017-03-23 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Image recognition method
CN106548127A (en) * 2015-09-18 2017-03-29 松下电器(美国)知识产权公司 Image-recognizing method
JP2020032520A (en) * 2018-08-31 2020-03-05 ファナック株式会社 Detection system
JP2020173211A (en) * 2019-04-12 2020-10-22 俊雄 川口 Angle measuring device, distance measuring device, speed measuring device, altitude measuring device, coordinate measuring device, angle measuring method, and program

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010538286A (en) * 2007-09-03 2010-12-09 オーユー マプヴィジョン エルテーデー Recording machine vision system
WO2011062178A1 (en) * 2009-11-18 2011-05-26 三菱重工業株式会社 Inspection method, method for producing composite material components, inspection device, and device for producing composite material components
KR101496051B1 (en) 2013-11-28 2015-02-25 세메스 주식회사 Method of displaying a die bonding position
JP2015201124A (en) * 2014-04-10 2015-11-12 日本電信電話株式会社 Subject area detection device, subject area detection method, and subject area detection program
JP2016091407A (en) * 2014-11-07 2016-05-23 セコム株式会社 Position matching device and program
JP2017059207A (en) * 2015-09-18 2017-03-23 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Image recognition method
CN106548127A (en) * 2015-09-18 2017-03-29 松下电器(美国)知识产权公司 Image-recognizing method
JP2020032520A (en) * 2018-08-31 2020-03-05 ファナック株式会社 Detection system
CN110871442A (en) * 2018-08-31 2020-03-10 发那科株式会社 Detection system
US11141864B2 (en) 2018-08-31 2021-10-12 Fanuc Corporation Detection system
JP2020173211A (en) * 2019-04-12 2020-10-22 俊雄 川口 Angle measuring device, distance measuring device, speed measuring device, altitude measuring device, coordinate measuring device, angle measuring method, and program
JP7282578B2 (en) 2019-04-12 2023-05-29 俊雄 川口 Angle measuring device, distance measuring device, speed measuring device, altitude measuring device, coordinate measuring device, angle measuring method, and program

Similar Documents

Publication Publication Date Title
US9672630B2 (en) Contour line measurement apparatus and robot system
JP6280525B2 (en) System and method for runtime determination of camera miscalibration
CN108965690B (en) Image processing system, image processing apparatus, and computer-readable storage medium
JP5812599B2 (en) Information processing method and apparatus
JP4889351B2 (en) Image processing apparatus and processing method thereof
US8095237B2 (en) Method and apparatus for single image 3D vision guided robotics
JP5671281B2 (en) Position / orientation measuring apparatus, control method and program for position / orientation measuring apparatus
US11625842B2 (en) Image processing apparatus and image processing method
JP2011083882A (en) Robot system
JP2011112401A (en) Calibration method for three-dimensional measurement and three-dimensional visual sensor
JP4193519B2 (en) Object identification method and object identification apparatus
JP7353757B2 (en) Methods for measuring artifacts
JP2002215655A (en) Information retrieval method, information retrieval device and robot movement control device
TW201627818A (en) Interactive system, remote controller and operating method thereof
JP2004354320A (en) Recognition verification system for imaging object
JPH10240934A (en) Object extractor
JP2003065737A (en) System and method for measuring surface shape and system for illustrating surface condition
Li et al. A camera on-line recalibration framework using SIFT
WO2020075213A1 (en) Measurement apparatus, measurement method, and microscopic system
Lu et al. Image-based system for measuring objects on an oblique plane and its applications in 2-D localization
JP3516668B2 (en) Three-dimensional shape recognition method, apparatus and program
JPH11194027A (en) Three-dimensional coordinate measuring instrument
JP3548652B2 (en) Apparatus and method for restoring object shape
JPH10318732A (en) Shape measuring device and image formation apparatus of shape measurement
JPH1137736A (en) Method and device for measuring 3-dimentional shape