JP4373038B2 - Measurement program - Google Patents

Measurement program Download PDF

Info

Publication number
JP4373038B2
JP4373038B2 JP2001264849A JP2001264849A JP4373038B2 JP 4373038 B2 JP4373038 B2 JP 4373038B2 JP 2001264849 A JP2001264849 A JP 2001264849A JP 2001264849 A JP2001264849 A JP 2001264849A JP 4373038 B2 JP4373038 B2 JP 4373038B2
Authority
JP
Japan
Prior art keywords
measurement
image
calibration data
data
stereo
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001264849A
Other languages
Japanese (ja)
Other versions
JP2003070720A (en
JP2003070720A5 (en
Inventor
政義 横田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus Corp
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 Olympus Corp filed Critical Olympus Corp
Priority to JP2001264849A priority Critical patent/JP4373038B2/en
Priority to US10/232,422 priority patent/US6945930B2/en
Publication of JP2003070720A publication Critical patent/JP2003070720A/en
Publication of JP2003070720A5 publication Critical patent/JP2003070720A5/ja
Application granted granted Critical
Publication of JP4373038B2 publication Critical patent/JP4373038B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Closed-Circuit Television Systems (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Studio Devices (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Endoscopes (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は内視鏡画像を用いて画像処理により計測を行う計測内視鏡装置で記録された計測画像をパソコン上で取り扱うことができる計測用プログラムに関する。
【0002】
【従来の技術】
一般に、内視鏡によって被検物をさらに詳細に調べるためには、その被検物を計測することが必要であり、このような要求を満足するために、従来から内視鏡を用いて被検物の計測が可能な計測手段が様々な提案によって開示されている。
【0003】
例えば、特開平10−248806号公報に記載の提案では、ステレオ計測による計測内視鏡装置が示されている。また、本出願人が先に出願した特願2000−101122号に記載の提案では、光学アダプタの種類によって異なる計測手法を、光学アダプタの種類に応じて自動的に選択して実行する計測内視鏡装置が示されている。
【0004】
前者の特開平10−248806号公報に記載の計測内視鏡装置では、内視鏡本体に、被検物を撮像して計測を行うのに必要な2つの光学系を有する光学アダプタを着脱自在に設け、光学アダプタ内の2つのレンズ系の画像を1つの撮像素子上に結像し、少なくともこの得られた内視鏡画像を用いた画像処理により計測を行うもので、光学アダプタの光学データを記録した記録媒体から情報を読み込む処理と、内視鏡本体の撮像系の位置誤差を基に光学データを補正する処理と、補正した光学データを基に計測する画像を座標変換する処理と、座標変換された2つの画像を基に2画像のマッチングにより任意の点の3次元座標を求める処理と、を行う計測処理手段を有して構成されている
上記構成の計測内視鏡装置においては、前記光学アダプタを介して撮像素子により取り込まれた被検物(被写体)の2つの画像を座標変換して求めた2つの画像情報を基に、2画像のマッチングにより被検物上の任意の点の3次元座標を求める。これにより、安価でしかも計測精度の優れた計測内視鏡装置の実現を可能にしている。
【0005】
一方、後者の特願2000−101122号に記載の計測内視鏡装置は、内視鏡先端部に設けられた接続部と、前記接続部に着脱可能な被写体像を撮像素子に結像させる複数種の光学アダプタと、前記光学アダプタの1つを接続し、前記撮像素子の画像信号を画像処理により計測を行う計測内視鏡装置において、前記複数の光学アダプタに予め関係付けられた表示データにて、選択操作するメニュー表示処理と、前記メニュー表示処理による選択結果に基づいて、計測処理を行う計測処理手段とを有して構成されている。
【0006】
上記構成の計測内視鏡装置においては、前記メニュー上で光学アダプタを選択すると、その光学アダプタに対応した計測方法が自動的に選択され、計測を実行する場合は内視鏡操作部に設けた計測実行スイッチを押下するのみで、前記選択された計測方法に対応した計測処理を実行させることが可能となる。
【0007】
また、上記公報にある実施例の中で複数の光学アダプタそれぞれについてキャリブレーション処理を行なった結果を外部記憶媒体であるコンパクトフラッシュ(R)メモリカードに計測環境データとして保存しておき、前記メニュー上で適切な光学アダプタを選択することで該当する光学アダプタに合った前記計測環境データが使用される構成が開示されている。
【0008】
【発明が解決しようとする課題】
通常、計測画像は、ビデオ内視鏡本体、対物レンズを有する計測用光学アダプター、ビデオ内視鏡から出力される信号をTV信号に変換するためのカメラコントロールユニツト(CCU)、TV信号をデジタル信号に変換して記録するための記録装置の種類あるいは個体の違いによって画像の写り具合の特性が変化する。このために、計測内視鏡装置の設定を、計測画像を撮影したときのそれぞの装置の組み合わせに適した状態になるようにさまざまな計測環境の設定を行なわなければ、正しく計測を行うことができない。
【0009】
したがって、計測を行う装置やシステムでは、実際に計測値を算出する処理の前に、計測画像を補正するために必要なデータを作成する処理も重要であり、またこの処理は画像を記録する装置に依存する特性があることから、画像を記録する装置に上記の計測に関する処理が組み込まれていたので、従来では、一旦記録された画像で再計測を行おうとした場合、この装置上でしか計測を行うことができなかった。あるいは、記録装置の個体差が無い場合には、他の装置で記録した画像を別の装置上で計測することも可能であったが、やはり計測内視鏡装置上で再計測を行うことに限られていた。
【0010】
また、最近では、さまざまな計測の用途に合うように、内視鏡本体、光学アダプタやCCUや画像記録装置などの種類も増えてきたのに伴って、さまざまな装置の組み合わせ(計測環境)で記録された計測画像で再計測を行なう機会が増えてきている。
【0011】
また、記録した画像をパソコンに取り込んだり、表示したりするだけでなく、これらの動作が簡単にできるようなパソコン用のソフトウェアも数多く商品化されている。
【0012】
よって、多数種にわたる計測画像もこのようなパソコン用のソフトウェアで管理することが一般的になってきているが、パソコン上で計測環境の設定を行えるようにする手段と処理が無かったために、パソコンに取り込まれた計測画像をパソコン上で再計測させることはできなかった。
【0013】
本発明は、上記事情に鑑みてなされたものであり、計測内視鏡装置で記録された計測画像をパソコン上で再計測を行なえるようにして、検査の作業効率を向上させることのできる計測用プログラムを提供することを目的としている。
【0014】
また、パソコンにはさまざまな計測環境で記録された画像が取り込まれ、それに適した計測環境の設定にする必要があるが、誤った計測環境で計測を行なってしまうことを防止することができるとともに、簡単な操作で正しい計測環境で再計測ができるようにすることによって、計測環境を意識しなくてもすぐに再計測が行え、その時の操作性を向上させることができる計測用プログラムを提供することも目的とする。
【0015】
【課題を解決するための手段】
本発明の計測用プログラムは、ステレオ計測アダプタを介して撮像された視差を有する二枚の画像を備えたステレオ画像データと、前記ステレオ計測アダプタの光学特性を示す校正データと、前記校正データの種類を示す計測環境情報と、を有する画像ファイルを取得可能な画像取得ステップと、前記画像取得ステップによって取り込まれた画像ファイルに校正データが付加されているか否かを判別する判別ステップと、前記判別ステップが、前記画像取得ステップによって取り込まれた画像ファイルに校正データが付加されていると判別したとき、前記判別ステップによって校正データが付加されていると判別された画像ファイルに付加されている校正データを、前記画像取得ステップによって取り込まれた画像ファイルから読み出すステップと、前記判別ステップが、前記画像取得ステップによって取り込まれた画像ファイルに校正データが付加されていないと判別したとき、前記計測環境情報を参照して、前記計測環境情報に対応した校正データが、少なくとも1つの任意の校正データが記録されている記録媒体に記録されているか否かを判断するステップと、前記計測環境情報に対応した校正データが前記記録媒体に記録されていると判断されたとき、前記計測環境情報に対応した校正データを前記記録媒体から読み出すステップと、読み出した校正データに基づいて、前記画像取得ステップによって取り込まれた画像ファイルが有する前記ステレオ画像データに含まれる幾何学的歪みを補正して補正ステレオ画像データを生成するステップと、前記補正ステレオ画像データが備えた前記二枚の画像間におけるマッチング処理を行うステップと、前記マッチング処理の結果と前記読み出した校正データとに基づいて前記補正ステレオ画像データの任意の点における三次元座標を算出するステップと、前記三次元座標を用いて被写体を計測するステップとを備えて構成される。
【0016】
【発明の実施の形態】
以下、図面を参照しながら本発明の実施の形態について述べる。
【0017】
図1ないし図15は本発明の一実施の形態に係わり、図1は計測内視鏡装置のシステム構成を示す斜視図、図2は図1の計測内視鏡装置の電気的回路構成を示すブロック図、図3は図1のリモートコントローラの構成を示す斜視図、図4はステレオ計測アダプタを付けた図1の内視鏡挿入部の内視鏡先端部の構成を示す斜視図、図5は図4のA−A線断面図、図6は図4のステレオ計測アダプタを付けた内視鏡画像を示す図、図7は図4のステレオ計測アダプタのマスク形状の画像を示す図、図8は通常光学アダプタを付けた図1の内視鏡挿入部の内視鏡先端部の構成を示す斜視図、図9は図8のA−A線断面図、図10は図9の通常光学アダプタを付けた内視鏡画像を示す図、図11はサムネイル画面の表示例を示す図、図12はステレオ光学アダプタによる計測画面の表示例を示す図、図13は通常光学アダプタによる計測画面の表示例を示す図、図14は本計測ソフトウェアの特徴となる制御動作例を示す第1のフローチャート、図15は本計測ソフトウェアの特徴となる制御動作例を示す第2のフローチャートである。
【0018】
(構成)
本実施の形態の計測内視鏡装置10のシステム構成を説明すると、該計測内視鏡装置10は、図1に示すように、撮像素子を内蔵し複数のステレオ計測用光学アダプタと通常計測用光学アダプタを着脱自在に構成された内視鏡挿入部11と、該内視鏡挿入部11を収納するコントロールユニット12と、該計測内視鏡装置10のシステム全体の各種動作制御を実行するのに必要な操作を行うリモートコントローラ13と、内視鏡画像、あるいは操作制御内容(例えば処理メニュー)等の表示を行う液晶モニタ(以下、LCDと記載)14と、通常の内視鏡画像、あるいはその内視鏡画像を擬似的にステレオ画像として立体視可能なフェイスマウントディスプレイ(以下、FMDと記載)17及び該FMD17に画像データを供給するFMDアダプタ18とを含んで構成されている。
【0019】
さらに図2を参照しながら該装置のシステム構成を詳細に説明する。図2に示すように、前記内視鏡挿入部11は、内視鏡ユニット24に接続され、この内視鏡ユニット24は、例えば図1に示すようにコントロールユニット12内に搭載される。この内視鏡ユニット24は、図示はしないが撮像時に必要な照明光を得るための光源装置と、前記内視鏡挿入部11を電気的に自在に湾曲させるための電動湾曲装置とを含んで構成されている。
【0020】
内視鏡挿入部先端の固体撮像素子43(図5参照)からの撮像信号は、カメラコントロールユニット(以下、CCUと記載)25に入力される。該CCU25は、供給された撮像信号をNTSC信号等の映像信号に変換し、前記コントロールユニット12内の主要処理回路群へと供給する。
【0021】
前記コントロールユニット12内に搭載された主要回路群は、例えば図2に示すように、主要プログラムに基づき各種機能を実行し動作させるように制御を行うCPU26,ROM27,RAM28,PCカードインターフェイス(以下、PCカードI/Fと記載)30,USBインターフェイス(以下、USBI/Fと記載)31,RS−232Cインターフェイス(以下、RS−232CI/Fと記載)29,音声信号処理回路32及び映像信号処理回路33とを含んで構成されている。
【0022】
前記RS−232CI/F29は、CCU25,内視鏡ユニット24及びリモートコントローラ13にそれぞれ接続され、CCU25,内視鏡ユニット24の制御及び、動作指示を行うリモートコントローラ13による操作に基づく動作制御するのに必要な通信をそれぞれ行うためのものである。
【0023】
前記USBI/F21は、該コントロールユニット12とパーソナルコンピュータ21とを電気的に接続するためのインターフェイスであり、該USBI/F21を介して接続した場合には、パーソナルコンピュータ21側でもコントロールユニット12における内視鏡画像の表示指示や計測時における画像処理等の各種の指示制御を行うことが可能であり、またコントロールユニット12,パーソナルコンピュータ21間とで各種の処理に必要な制御情報やデータ等の入出力を行うことが可能である。
【0024】
また、前記PCカードI/F30は、PCMCIAメモリカード22及びコンパクトフラッシュ(R)メモリカード23が着脱自由に接続されるようになっている。つまり、上記いずれかのメモリカードが装着された場合には、CPU26による制御によって、記録媒体としてのメモリーカードに記憶された制御処理情報や画像情報等のデータを再生し、該PCカードI/F30を介してコントロールユニット内に取り込むことができ、あるいは制御処理情報や画像情報等のデータを該PCカードI/F30を介してメモリカードに供給して記録することができる。
【0025】
前記映像信号処理回路33は、CCU25から供給された内視鏡画像とグラフィックによる操作メニューとを合成した合成画像を表示するように、CCU25からの映像信号とCPU26の制御により生成される操作メニューに基づく表示信号とを合成処理し、さらにLCD14の画面上に表示するのに必要な処理を施してLCD14に供給することにより、内視鏡画像と操作メニューとの合成画像がLCD14に表示される。なお、映像信号処理回路33では、単に内視鏡画像、あるいは操作メニュー等の画像を単独で表示するための処理を行うことも可能である。
【0026】
前記音声信号処理回路32は、マイク20により集音されて生成され、メモリカード等の記録媒体に記録する音声信号、あるいはメモリカード等の記録媒体の再生によって得られた音声信号が供給され、供給された音声信号に再生するのに必要な処理(増幅処理等)を施し、スピーカ19に出力する。これにより、スピーカ19によって音声信号が再生される。
【0027】
前記CPU26は、ROM27に格納されているプログラムを実行し、目的に応じた処理を行うように各種の回路部を制御してシステム全体の動作制御を行う。
【0028】
次に、図3を参照しながらリモートコントローラ13の構成とその操作に基づくCPU26のプログラム動作制御例を説明する。
【0029】
本実施の形態の計測内視鏡装置10に用いられるリモートコントローラ13は、計測時等の使用時における操作性をより向上させるための改良がなされている。
【0030】
リモートコントローラ13は、図3に示すようにジョイスティック47,レバースイッチ48,フリーズスイッチ49,ストアースイッチ50及び計測実行スイッチ51を少なくとも上面に併設して構成され、つまり、使用者にとって操作し易い配置形態が採用されている。
上記構成のリモートコントローラ13において、ジョイスティック47は内視鏡先端部の湾曲動作を行うスイッチであり、360度のいずれの方向に自在に操作指示を与えることが可能である。また、レバースイッチ48は、グラフィック表示される各種メニュー操作や計測を行う場合のポインター操作を行うためのスイッチであり、前記ジョイスティックスイッチ47と略同形状に構成されたものである。フリーズスイッチ49は、LCD14に表示された内視鏡動画画像を静止画像として表示する際に用いられるスイッチである。ストアースイッチ50は、前記フリーズスイッチ49の押下によって静止画像を表示した場合に、該静止画像をPCMCIAメモリカード22(図2参照)に記録する場合に用いられるスイッチである。また、計測実行スイッチ51は、計測ソフトを実行する際に用いられるスイッチである。
【0031】
なお、前記フリーズスイッチ49,ストアースイッチ50及び計測実行スイッチ51は、例えばオン/オフの押下式を採用して構成されている。また、前記レバースイッチ48には、上記以外の機能を割り当てることも可能である。
【0032】
例えば、レバースイッチ48を右に倒すと画像のズームUP機能、レバーを左に倒すとズームDOWN機能を実行することができるようにこれらの機能を該レバースイッチ48に割り当てて構成しても良い。また、通常、ズーム画像で計測を行った場合は画像の倍率が変化しているため正しく計測できない。このような場合は、前記計測実行スイッチ51を押下すると、CPU26はこの操作信号を受け、瞬時ズーム機能を解除して、画像をフリーズしてから計測を実行するように制御する。なお、これ以外の方法としては、ズーム倍率を考慮して画像のまま計測できるように制御するようにしても良い。
【0033】
次に、本実施の形態の計測内視鏡装置10に用いられるステレオ計測アダプタの構成を図4ないし図6を参照しながら説明する。
【0034】
図4及び図5はステレオ計測アダプタ37を内視鏡先端部39に取り付けた状態を示しており、該ステレオ計測アダプタ37は、固定リング38の雌ねじ53により内視鏡先端部39の雄ねじ54と螺合することによって固定されるようになっている。
【0035】
また、ステレオ計測アダプタ37の先端には、一対の照明レンズ36と2つの対物レンズ34,対物レンズ35が設けられている。2つの対物レンズ34,35は、内視鏡先端部39内に配設された撮像素子43上に2つの画像を結像する。この得られた撮像信号は、電気的に接続された信号線43a,内視鏡ユニット24を介してCCU25に供給され、該CCU25により映像信号に変換された後に映像信号処理回路33に供給されることにより、その結果、例えば図6に示すような画像がLCD14に表示される。
【0036】
本実施の形態の計測内視鏡装置10は、ステレオ計測を行う場合、図7に示すような白い被写体を撮像した内視鏡画像を用いて、例えばステレオ計測アダプタ37の光学データを記録した記録媒体(例えばコンパクトフラッシュ(R)メモリカード)から取り込まれた光学データに基づき被計測物のステレオ計測処理を実行する。
【0037】
該計測内視鏡装置10によるステレオ計測は、前記ステレオ計測アダプタ37の光学データを記録した記録媒体(例えばコンパクトフラッシュ(R)メモリカード)から光学情報を読み込む第1の処理と、前記内視鏡先端部39の撮像素子43とステレオ計測アダプタ37との位置情報を読み込む第2の処理と、前記位置情報と生産時に求めた主となる内視鏡と当ステレオ計測アダプタ37の位置情報から位置誤差を求める第3の処理と、前記位置誤差から前記光学データを補正する第4の処理と、前記補正した光学データを基に計測する画像を座標変換する第5の処理と、座標変換された画像を基に2画像のマッチングにより任意の点三次元座標を求める第6の処理とを少なくとも実行することにより行われる。
【0038】
CPU26は、例えば前記第1〜第4の処理をステレオ計測アダプタ37に対して一度実行し、結果をコンパクトフラッシュ(R)メモリカード23上に計測環境データとして記録しておくように制御する。これ以降に、ステレオ計測を実行するときは、CPU26は、前記計測環境データをRAM上にロードして前記第5,第6,第7の処理を実行するように制御する。
【0039】
なお、前記内視鏡先端39の撮像素子43とステレオ光学アダプタ37との位置情報を読み込む第2の処理を行う場合は、図7に示すように図示しない光学アダプタに設けたマスクの形状を取り込み、生産時のマスクの形状と位置を比較することにより行う。この場合、前記マスク形状の取り込みは、白い画像を取り込む(白い紙などを映す)ことにより行う。このときの白色画像の明るさは、CCU25のゲインとシャッター速度で決まる。
【0040】
通常はCCU25のゲイン及び撮像素子43のシャッター速度が自動的に最適な条件となるように制御されているが、前記マスク形状を取り込む場合はCCU25のゲインは低く、撮像素子43のシャッター速度が速く設定されてしまう傾向があり、画像が暗くなりマスク形状がはっきりと撮れなくなり、計測精度に悪影響を及ぼしてしまう。よって、本実施の形態では、CCU25のゲインとシャッター速度を固定させるようにCPU26の制御によって実施するようにしている。これにより、確実にマスクの形状を撮り込むことができ、計測精度が低下しない。
【0041】
計測の準備が整うと、例えば図6上のクラック44の長さを測る場合には、左画像上でクラック44の上を折れ線でなぞるように計測点を指定する。CPU26は、新たな計測点が指定されるごとに右画像上でそれぞれの対応点を探索し、計測点と対応点の座標から各点での三次元座標を求め、それらの三次元座標から隣り合う二点間の距離を計算し、それらの合計を算出することでクラック44の全長としてその長さをLCD14上に表示する。
【0042】
次に、本実施の形態の計測内視鏡装置10に用いられる通常光学アダプタの構成を図8ないし図10を参照しながら説明する。
【0043】
図8及び図9は通常光学アダプタ42を内視鏡先端部39に取り付けた状態を示しており、該通常光学アダプタ42は、固定リング38の雌ねじ53により内視鏡先端部39の雄ねじ54と螺合することによって固定されるようになっている。
【0044】
また、通常光学アダプタ42の先端には、一対の照明レンズ41と対物レンズ40が設けられている。対物レンズ40は、内視鏡先端部39内に配設された撮像素子43上に画像を結像する。この得られた撮像信号は、前記ステレオ計測アダプタ37と同様に電気的に接続された信号線43a,内視鏡ユニット24を介してCCU25に供給され、該CCU25により映像信号に変換された後に映像信号処理回路33に供給されることにより、その結果、例えば図10に示すような画像がLCD14に表示される。
【0045】
本実施の形態の計測内視鏡装置10は、通常光学アダプタを用いた計測を行う場合、比較計測による方法を用いることによって行う。つまり、比較計測は、画面の中にある解っている寸法を基準にして計測する方法である。
【0046】
例えば、図10に示す円の直径がわかっている場合には、円の直径の両端にポインターを置き2点間の長さL1 45を入力する。知りたい寸法L2 46は、L1の画面上の大きさからCPU26による演算処理によって比率で求める。また、このときにレンズのディストーション特性の情報を基に、ディストーション補正を行い、より正確に寸法を求めるように調整される。レンズのディストーション特性は、予めROM27上に記録しておき、CPU26は、選択された通常光学アダプタ42に対応したデータをRAM2上にロードするようにして比較計測が実行される。
【0047】
また、本計測内視鏡では、複数のステレオ計測アダプタの設定を保存しておくために、前記計測環境データを脱着自在なコンパクトフラッシュ(R)メモリカード23上に記録するように制御される。
【0048】
この計測環境データには、計測環境情報と校正データと変換テーブルと逆変換テーブルで構成されている。
【0049】
計測環境情報には、計測環境データの種類、つまり校正データや変換テーブルの種類を示す情報であるため、例えば以下のような情報が含まれている。
【0050】
・ステレオ計測アダプタの種類および個体識別番号
・内視鏡挿入部の種類および個体識別番号
・NTSCなどのTVタイプ
・CCUの種類
・ビデオキャプチャー回路の種類
CCUの種類、ビデオキャプチャー回路の種類は、計測内視鏡装置の一モジユールとして装備されていることが多いので、この場合はこれらを計測内視鏡装置の種類と読み替えてもよい。
【0051】
校正データには、ステレオ計測アダプタの生産工程で測定された光学特性を示す光学データを、実際に計測で使用する計測内視鏡に適した情報に補正したもので構成されているため、以下の内容が含まれている。
【0052】
・生産工程のデータ測定で使用した内視鐘とこの光学アダプタとの組み合わせにおける取り付け具合の位置情報・実際に計測で使用する内視鏡とこの光学アダプタとの組み合わせにおける取り付け具合の位置情報
・生産工程のデータ測定で求められた2つの光学系の幾何学的歪み補正式に対して、上記2つの取り付け具合の位置情報から位置ずれ補正が行われた補正式
・生産工程のデータ測定で求められた2つのレンズにおける光軸の位置座標に対して、上記2つの取り付け具合の位置情報から位置ずれ補正が行われた光軸の位置座標
・生産工程のデータ測定で求められた2つのレンズにおける光軸間の距離
・生産工程のデータ測定で求められた2つのレンズ系の焦点距離
計測環境データに含まれる変換テーブルとは、上記校正データを用いて、木内視鏡装置で撮影した計測画像に対して幾何学的歪み補正を行うための変換テーブルのことであり、このテーブルを用いると歪み補正後の補正画像を作成できる。
【0053】
また、計測環境データに含まれる逆変換テーブルとは、前記補正画像上の座標に対する補正前の元画像上の座標を求めるための逆変換テーブルのことである。
【0054】
さらに、本計測内視鏡では、撮影した画像をCPU26の制御によってPCMCIAメモリカード22上に、計測で使用する校正データと計測環境情報とともに記録する。
【0055】
また、本計測内視鏡では、本装置に登録されている複数の計測環境データの中から選択したものに含まれる校正データと計測環境情報を、画像を記録するための前記PCMCIAメモリカード22や、前記計測環境データを記録するための前記コンパクトフラッシュ(R)メモリカードとは別の着脱自在なメモリカード上に記録することもできる。
【0056】
本実施の形態は、計測内視鏡装置でPCMCIAメモリカード22上に記録され、校正データと計測環境情報が付いている計測画像をパソコン上に取り込み、この画像を撮影したときの計測内視鏡装置と同じ計測環境の設定をパソコン上で行って、パソコン上でも同じ計測を行うことができるソフトウェアに関するものであり、この形態について以下に説明する。
【0057】
本実施の形態におけるパソコン用のソフトウェアは、計測内視鏡装置10で記録された画像をパソコンの中に取り込んで管理する第一の処理と、管理している画像の中から1枚を選択して計測機能を呼び出す第二の処理と、記録媒体に記録されている校正データと計測環境情報をパソコンの中で管理する第三の処理と、計測画像に適した校正データを関連付ける第四の処理と、画像に含まれる幾何学的歪みを補正するための変換テーブルを作成する第五の処理と、計測用に撮影した画像を変換テーブルを用いて座標変換をおこない補正画像を作成する第六の処理と、補正画像を基にして任意の点で左右2画像のマッチングを行う第七の処理と、マッチングによって求まった左右2つの座標と光軸の位置座標と焦点距離から三次元座標を求める第ハの処理と、任意の複数点の三次元座標からある二点間距離や面積などの計測値を求める第九の処理とで構成されており、これらを実行することにより計測が行われる。
【0058】
パソコンに計測画像が記録されたメモリカードを装着して、本ソフトウェアでこの中の画像を選択すると、前記第1の処理によって、本ソフトウェアで管理しているパソコン内のフォルダの中にこれらの画像が複製される。この処理が終了すると、図11に示すような本ソフトウェアのサムネイル画面の中に、先ほど複製した画像のサムネイル55が表示される。また、複製した画像ファイルのヘッダにステレオ計測用の画像か比較計測用の画像を示す記号が記録されている場合には、それに応じてステレオ計測アイコン56や比較計測アイコン57が各サムネイル55上に表示される。
【0059】
そして、サムネイル画面上の中から計測したい画像を選択して、メニューバー58の中から図示はしないが計測実行メニューを選択したり、ツールバー59の中から計測実行ボタン60を押したり、サムネイル上のステレオ計測アイコン56や比較計測アイコン57を押すと、前記第2の処理によって各計測機能が呼び出され、計測の準備が整うと、図12に示すようなステレオ計測画面や、図13に示すような比較計測画面になる。
【0060】
図12は、各種計測機能を実行するための各種メニューボタン61や、操作に関するメッセージ等を表示するメッセージ表示欄63や、計測を行った結果(数値)を表示する各種数値表示欄62、さらに計測画像上から左右2つの計測可能な視野領域64を切り取り、この計測画面上に貼り付けて表示されている例を示している。
【0061】
図13は、図12と同様に、各種メニューボタン65、メッセージ表示欄67、各種数値表示欄66、及び計測画像68が表示されている例を示している。
【0062】
計測内視鏡装置では複数の計測環境データを登録しており、これらの各計測環境データに含まれる変換テーブルと逆変換テープルの総容量は、例えば12Mbyteになる。したがって、ステレオ計測アダプタを本装置に3つ登録すると、12Mbyte×3=36Mbyteとなる。計測内視鏡装置では、CPUなどの制約から計測環境データの作成に時間がかかり、また、数種類の光学アダプタを用いながらさまざまな計測を行うという場合が多いことから、計測内視鏡装置に搭載されているフラッシュROMやコンパクトフラッシュ(R)メモリカードの容量の範囲内で記録できるだけの数個の計測環境データをあらかじめ作成していた。
【0063】
これに対して、最近市販されているパソコンの処理速度は、計測内視鏡装置と比較すると数倍〜数十倍速い。これにより、パソコンで計測環境データを作成すると、数秒から数十秒で完了する。また、PCでは数多くの画像を管理しておくという性格上、かなり多くの種類の計測環境データを取り扱う必要がある。よって、画像を選択して計測を実行するたびに、画像に付いている校正データから計測環境データを作成するようにすることで、一つ分の計測環境データの容量を確保しておくだけでよくなる。
【0064】
さらに、計測環境データの作成に必要な校正データは、数十Kbyteときわめて小容量である場合が多いので、複数の校正データをパソコン内に保存しておきやすくなり、これにより多数の計測環境を登録しておくことが可能となる。したがって、たとえ画像に校正データが付いていなかったとしても、校正データのリストから適当なものを選択することで計測環境データを作り出し再計測が可能になるという利便性がある。
【0065】
ここで、パソコン内に登録されている複数の計測環境データと校正データは、以下の2つの方法によって簡単に登録できる。
【0066】
一つ目の方法は、計測環境情報と校正データが付いている計測画像を選択して計測を実行するときに、既に登録されている計測環境データの中に選択した画像と同じ計測環境のものが存在するかどうかを検索し、同じものが登録されていないならば、画像に付いている計測環境情報と校正データを自動的に本ソフトウェアが管理しているフォルダの中に複製してこれを登録する。
【0067】
二つ目の方法では、計測内視鏡装置でここに登録されている計測環境データの中から適当なものを選択して、着脱自在な記録媒体に計測環境情報と校正データを記録したものをあらかじめ用意する。あるいは、本ソフトウェアで登録されている計測環境の中から適当なものを選択して、着脱自在な記録媒体に計測環境情報と校正データを記録したものを用意する。このように準備した記録媒体をパソコンに装着し、本ソフトウェアでここに記録されている適当な計測環境情報と校正データを選択して、本ソフトウェアが管理しているフォルダの中に複製してこれを登録する。
【0068】
以上により、本ソフトウェアで対応している計測環境ならば、さまざまな計測内視鏡装置で記録したどんな計測画像でも簡単に計測環境の設定を行うことができ、迅速に再計測を行えるようになる。
【0069】
(作用)
図14、図15を参照して、本実施形態のソフトウェアの特徴となる制御動作を詳細に説明する。
【0070】
計測内視鏡装置で記録された計測画像を本ソフトウェアで取り込み、図11の画面からマウスやキー操作などによって適当なサムネイルを1枚選択する。そして、メニューバー58の中の計測実行メニューを選択したり、ツールバー59の中から計測実行ボタン60を押したり、またはサムネイル上のステレオ計測アイコン56や比較計測アイコン57を押すと、図14に示すルーチンのプログラムが実行される。
【0071】
図14に示すルーチンが実行されたら、ステップS111の判断処理で、選択した画像ファイルのヘッダを参照して計測内視鏡装置で記録された画像か否かの判断を行い、計測内視鏡装置で記録された画像である場合にはステップS112判断処理でその画像がステレオ計測画像か否かの判断を画像のヘッダを参照して行う。
【0072】
ここで、ステレオ計測画像である場合は、ステップS113の判断処理でこの画像ファイルのヘッダに計測環境情報が付いているか否かの判断を行い、これが記録されている場合には、ステップS114の判断処理で画像に付いている校正データが本ソフトウェアで対応しているか否かを判断し、対応している場合にはステップS116の処理へ進む。ステップS114の判断処理で画像に付いている校正データが本ソフトウェアで対応していない場合は、ステレオ計測を行うことができないことを表示して、別の画像を選択するように図11の画面に戻る。
【0073】
また、ステップS116の判断処理で、パソコンの中に既に登録されている計測環境データベースの中に記録されている計測環境データの中にこの画像と同じ計測環境情報のものがあるか否かを判断して、同じものがある場合にはステップS118へ進む。ステップS116の判断処理で、同じものがない場合には画像に付いている計測環境情報と校正データをデータベースの中に登録してからステップS118へ進む。
【0074】
ステップS118の判断処理で、現在既に作成され設定されている計測環境データと同じ計測環境情報か否かを判断し、同じであればステップS119の判断処理で、画像に付いている校正データの中に含まれている視野領域の位置情報と、現在の計測環境データに含まれる視野領域の位置情報の差があらかじめ定めた閾値よりも小さいかどうかを判断する。
【0075】
ステップS119の処理で閾値よりも小さい場合は、現在の設定の計測環境データを読み込んで、ステップS121のステレオ計測処理を行うようにする。
【0076】
また、ステップS118の判断処理で現在の計測環境データとは異なる場合や、ステップS119の判断処理で閾値よりも大きい場合は、この画像ファイルのヘッダに付いている校正データを使用して計測環境データを新しく作成しなおして、ステップS121のステレオ計測処理を行うようにする。
【0077】
ステップS121でステレオ計測の準備が完了すると、図12の画面で待機状態になり、この画面で計測を行うとその計測結果が表示される。
【0078】
また、この画面を閉じると、図11の画面に戻り、別の画像を選択できるようになる。
【0079】
一方、ステップS113の判断処理で計測画像に計測環境情報と校正データが付いていない場合には、この画像に適した計測環境データを手動で選択して計測できる状態にするためにS123へ進み、図15に示すルーチンのプログラムが実行される。
【0080】
ステップS201で、既に登録されている校正データの中から適当なものを選択するか、別の記録媒体に記録されている校正データを使用するか、または計測を終了するかをユーザに選択させる。
【0081】
既に登録されている校正データの中から適当なものを選択する場合は、ステップS203で計測環境データベースの中に登録されている校正データのリストを表示し、ステップS204でユーザにその中から適当なものを選択させる。次に、ステップS205で、画像に計測環境情報が付いているか否かを判別し、付いていればステップS206の判断処理で画像ファイルに記録されている計測環境情報の内容と、ユーザが選択した校正データの計測環境情報の内容とが一致しているか否かを判別する。ステップS206で一致していれば、ステップS209に進む。
【0082】
また、ステップS206で一致していなければ、選択した校正データを使用することはできないことを表示し、別の校正データを選択させるようにするためにステップS201へ戻る。
【0083】
一方、ステップS205で、画像に計測環境情報が付いていない場合には、選択した校正データにおける計測環境情報を内容をユーザに再確認させてステップS209へ進む。
【0084】
そして、ステップS209で、リストから選択した校正データを使用して計測環境データを作成してステレオ計測処理を実行する。
【0085】
また、ステップS201で、データベースからではなく別の記録媒体に記録されている校正データを使用するとした場合は、校正データが記録されている記録媒体をパソコンに挿入し、ステップS212でその中にある校正データのリストを表示する。
【0086】
そして、ユーザがこの中から適当なものを選択した後で、ステップS214の判断処理で選択した校正データが本ソフトウェアに対応しているかどうかを判断する。ステップS214で対応している場合は、ステップS215で画像に計測環境情報が付いているか否かを判別し、付いていればステップS217の判断処理で画像ファイルに記録されている計測環境情報の内容と、ユーザが選択した校正データの計測環境情報の内容とが一致しているか否かを判別する。ステップS217で一致していれば、ステップS219に進む。
【0087】
また、ステップS215で画像に計測環境情報が付いていない場合には、選択した校正データにおける計測環境情報を内容をユーザに再確認させてステップS219へ進む。
【0088】
そして、ステップS219で選択した校正データと計測環境情報をデータベースに登録し、S220でこの校正データを使用して計測環境データを作成してステレオ計測処理を実行する。
【0089】
一方、ステップS214で選択した校正データが本ソフトウェアで対応していない場合や、ステップS217で画像の中の計測環境情報の内容と選択した校正データの計測環境情報の内容が一致していない場合には、選択した校正データを使用することはできないことを表示し、別の校正データを選択させるようにするためにステップS201へ戻る。
【0090】
また、ステップS209やステップS220が完了すると、ステレオ計測を実行する前に、ユーザの希望に応じてその画像ファイルのヘッダに計測環境情報および校正データを記録するようにしてもよい。
【0091】
さらに、図14のステップS112で選択した画像がステレオ計測の画像でなかった場合、ステップS124の判断処理でこの画像が比較計測かどうかを画像のヘッダを参照して判断し、比較計測画像である場合は、ステップS125で画像に付いている光学アダプタの歪み補正情報を読み込み、比較計測処理を実行する。
【0092】
一方、ステップS124の判断処理で、選択した画像がステレオ計測画像でも比較計測画像でもない場合には、計測処理を終了して別の画像を選択させるために図11の画面に戻すか、ステップS127でユーザに計測手法を選択させる。
【0093】
ステップS127で選択した計測手法が比較計測の場合は、初期値の歪み補正情報を読み込んで比較計測処理を実行する。
【0094】
また、ステップS127でステレオ計測を選択した場合は、ステップS123に進み図15のプログラムを実行して、適当な校正データをリストから選択して計測が行えるようにする。
【0095】
なお、ステップS111で選択した画像が計測内視鏡装置で記録された画像でない場合や、ステップS128で計測を終了させる場合には、図11の画面に戻り別の画像が選択できるように待機状態にする。
【0096】
(効果1)
本実施の形態では、計測画像を選択して、計測を実行させるだけで、計測に必要な正しい情報を読み込んで計測環境の設定を行い、計測内視鏡装置上ではなく一般のパソコン上でも正しい計測が可能となる。
【0097】
また、計測画像を選択して、計測の種類に関係無く、計測実行メニユーや計測ボタンを押すだけで、適切な計測プログラムが実行する。
【0098】
(効果2)
計測環境情報と校正データが付いている画像で計測を行う場合に、画像を撮影するときに使用した機器の種類を示した計測環境情報が現在の設定に一致しているときに現在の設定を使つて計測を行つたとすると、視野領域の位置を検査するために撮影する自い画像の写り具合が何らかの原因で変化し、これに伴つて位置関係の情報も変化したのが原因で計測精度が低下することがある。
【0099】
本実施の形態では、画像を撮影するときに使用した機器の種類を示した計測環境情報が現在の設定に一致している場合でも、視野領域の位置情報が変化しているかどうかを確認しているので、このような原因で精度が低下するケースを低減するだけでなく、画像にあらかじめ付いている校正データを使用して自動的に計測環境の設定を行つて計測できるようにしているので、安全性が高く、しかも迅速で、簡便に計測を行う準備を整えることができる。
【0100】
(効果3)
校正データの容量は数十Kbyte、計測環境情報は数Kbyteであることが多いので、一つの画像ファイルを小さくするために、計測環境情報だけを画像に記録するようにしておきたいこともある。
【0101】
また、画像ファイルとは別のファイルに計測環境情報や校正データが記録されていると、何らかの原因で画像に関連付けられて記録されていた計測環境情報や校正データのファイルが紛失したり削除されてしまったりすることも考えられる。
【0102】
従来の計測内視鏡システムならこのような画像では装置上でも再計測を行うことができないか、または実際に再計測を行うまでの計測環境の設定作業が煩雑であった。
【0103】
これに対して、本実施例では、既に登録されている計測環境データのリストや、別のメモリカードに記録されている校正データのリストからそれらを選択するだけでパソコン上でも簡単に計測環境の設定が行え、迅速に再計測を行うことができる。
【0104】
さらに、リストから選択したデータが計測したい画像に適合しているかどうかの確認がおこなわれるので、不整合な状態で計測を行ってしまうケースを少なくする効果もある。
【0105】
上記実施の形態による本発明では、計測内視鏡装置で着脱自在の記録媒体に記録された画像に対して、パソコン上で計測環境の設定を行って再計測を行うことができるとともに、この場合、計測用の画像ではない画像で計測を実行することを防止することができる。そして、ユーザーは光学アダプタの機器の種類などを気にすることなく、簡単な操作で正しい光学アダプタに対応した計測を実行させることが可能となり、再計測時における操作性を向上させ、検査効率を向上させることが可能となる。
【0106】
また、さまざまな計測環境に対応しているが計測環境データを必要に応じて作成しなおしているので、1セット分の計測環境データの容量のみパソコン内の記録媒体(HD)に確保されていればよいので、このためにパソコンのHDの仕様を特に限定する必要はない。
【0107】
また、初めての種類の校正データが付いている計測画像で計測を行う場合には、その校正データが管理されている校正データ群の中に自動的に取り込むことができるので、ユーザーは校正データの存在をあまり意識することなく再計測を行うことができる。
【0108】
なお、計測画像とは別に校正データだけを記録媒体に記録したり、またそれをパソコンの中に取り込んだりすることもできるため、校正データが付いていない画像でも再計測を行うことも可能となる。
【0109】
さらに、画像を実際に撮影した装置上で再計測を行う必然性がないので、画像が記録されている記録媒体を別の装置に装着して同様の簡単な操作によって、別の装置上でも再計測を行うことが可能となる。
【0110】
これにより、さまざまな計測内視鏡装置内の計測環境の状態を、一台のパソコン内で再現させることができるので、検査者が使い慣れたパソコン上で容易に計測画像を再計測することができ、さらにコンピューターのネットワークシステムを利用することで、画像や計測結果のデータを複数の検査者で容易にデータを共有することが可能になり、検査環境が格段に向上する。
【0111】
すなわち、本発明によれば、計測画像を計測環境情報と校正データと共にパソコンに取り込み、保存されているこれらの複数の画像から適当な画像を選択し、ステレオ計測機能を実行させるだけで、計測画像に付いている計測環境情報や校正データから自動的に計測環境の設定が行われ、直ちにパソコン上で計測処理を実行することが可能となる。このとき、画像に付いていた計測環境情報と校正データは、校正データ群のデータベースの中に自動的に複製され、画像とは別に管理される。
【0112】
また、計測画像に記録されている計測環境情報を参照してパソコンの中に既に管理されている校正データ群の中から同じものを検索する予段と、前記検索結果のデータを使用して自動的に計測環境の設定を変更する手段を設けたことによって、画像を記録する媒体の容量などに理由により校正データが付いていない画像で計測を行う場合は、選択した計測画像と同じ計測情報である計測環境データが装置の中に存在していれば、既に存在する校正データから計測環境データを自動的に作成し、これを使用することで計測処理を実行することが可能となる。
【0113】
さらに、計測画像に記録されている計測環境情報を参照して現在の計測環境の設定と一致しているかを判断する手段を設けたことによって、あらためて計測環境データを作成することなく、現在の設定されている計測環境データを使用して計測処理を実行することができ、計測の準備を行なう時間を短縮させることが可能となる。
【0114】
さらに、なんらかの理由で計測画像に計測環境情報や校正データが記録されていなかったとしても、それを告知する手段を設けているので、計測者は選択した画像の計測環境が記録されているかどうかを意識することなく計測作業を行なうことができ、またこの場合には既にパソコンの中に存在している校正データの一覧を表示させて、この中から適当なものを選択すると計測を行なうことが可能となる。
【0115】
また、画像の記録媒体への書き出しや記録媒体からの取り込みとは別に、パソコンの中にある校正データを記録媒体に複製したり、記録媒体の中の校正データをパソコンの中のデータベースに取り込んだりすることもできるので、校正データだけを独立して管理できるデーターベースを構築することが可能となる。これにより、校正データと計測環境データが付いていない画像で再計測を行なう場合でも、このデータベースの中に適当な校正データを記録媒体経由で取り込めば、このような画像でも再計測を容易に行なうことが可能となる。
【0116】
【発明の効果】
以上説明したように本発明によれば、計測内視鏡装置で記録された計測画像をパソコン上で再計測を行なえるようにして、検査の作業効率を向上させることができるという効果がある。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態に係る計測内視鏡装置のシステム構成を示す斜視図
【図2】図1の計測内視鏡装置の電気的回路構成を示すブロック図
【図3】図1のリモートコントローラの構成を示す斜視図
【図4】ステレオ計測アダプタを付けた図1の内視鏡挿入部の内視鏡先端部の構成を示す斜視図
【図5】図4のA−A線断面図
【図6】図4のステレオ計測アダプタを付けた内視鏡画像を示す図
【図7】図4のステレオ計測アダプタのマスク形状の画像を示す図
【図8】通常光学アダプタを付けた図1の内視鏡挿入部の内視鏡先端部の構成を示す斜視図
【図9】図8のA−A線断面図
【図10】図9の通常光学アダプタを付けた内視鏡画像を示す図
【図11】サムネイル画面の表示例を示す図
【図12】ステレオ光学アダプタによる計測画面の表示例を示す図
【図13】通常光学アダプタによる計測画面の表示例を示す図
【図14】本計測ソフトウェアの特徴となる制御動作例を示す第1のフローチャート
【図15】本計測ソフトウェアの特徴となる制御動作例を示す第2のフローチャート
【符号の説明】
10…計測内視鏡装置
11…内視鏡挿入部
12…コントロールユニット
13…リモートコントローラ
14…液晶モニタ(LCD)
17…フェイスマントデイスプレイ(FMD)
18…FMDアダプタ
19…スピーカ
20…マイク
21…パーソナルコンピュータ
22…PCMCIAメモリーカード
23…コンパクトフラッシュ(R)メモリーカード
24…内視鏡ユニット
25…カメラコントロールユニット(CCU)
26…CPU(制御部)
27…ROM
28…RAM
29…RS−232CI/F
30…PCカードI/F
31…USBI/F
32…音声信号処理回路
33…映像信号処理回路
34,35,40…対物レンズ系
36,41…照明レンズ
37…ステレオ光学アダプタ
38…固定リング
39…内視鏡先端部
42…通常光学アダプタ
43…撮像素子
44…クラック
45…L1(既知の寸法)
46…L2(未知の寸法)
47…ジョイスティック
48…レバースイッチ
49…フリーズスイッチ
50…ストアースイッチ
51…計測実行スイッチ
53…雌ねじ
54…雄ねじ
55…サムネイル
56…ステレオ計測アイコン
57…比較計測アイコン
58…メニューバー
59…ツールバー
60…計測実行ボタン
61,65…各種メニューボタン
62,66…各種数値表示欄
63,67…メッセージ表示欄
64…計測可能な視野領域
68…計測画像
[0001]
BACKGROUND OF THE INVENTION
The present invention , Measurement images recorded by a measurement endoscope device that performs measurement by image processing using endoscopic images can be handled on a personal computer. Measurement program About.
[0002]
[Prior art]
In general, in order to examine a test object in more detail with an endoscope, it is necessary to measure the test object, and in order to satisfy such a requirement, a conventional test using an endoscope is required. Various proposals for measuring means capable of measuring a specimen are disclosed.
[0003]
For example, in the proposal described in Japanese Patent Laid-Open No. 10-248806, a measurement endoscope apparatus using stereo measurement is shown. In addition, in the proposal described in Japanese Patent Application No. 2000-101122 filed earlier by the present applicant, a measurement endoscope that automatically selects and executes a different measurement method depending on the type of the optical adapter. A mirror device is shown.
[0004]
In the measurement endoscope apparatus described in the former Japanese Patent Laid-Open No. 10-248806, an optical adapter having two optical systems necessary for imaging and measuring a test object can be attached to and detached from the endoscope body. The image data of the two lens systems in the optical adapter is formed on one image sensor, and measurement is performed by image processing using at least the obtained endoscopic image. Optical data of the optical adapter Processing for reading information from a recording medium on which recording is performed, processing for correcting optical data based on the position error of the imaging system of the endoscope main body, processing for converting the coordinates of an image measured based on the corrected optical data, And a measurement processing means for performing processing for obtaining three-dimensional coordinates of an arbitrary point by matching two images based on the two images that have undergone coordinate conversion.
In the measurement endoscope apparatus having the above configuration, two images are obtained on the basis of two pieces of image information obtained by coordinate conversion of two images of a test object (subject) captured by the image sensor via the optical adapter. The three-dimensional coordinates of an arbitrary point on the test object are obtained by the matching of This makes it possible to realize a measurement endoscope apparatus that is inexpensive and has excellent measurement accuracy.
[0005]
On the other hand, the measurement endoscope apparatus described in the latter Japanese Patent Application No. 2000-101122 has a plurality of connecting portions provided at the distal end portion of the endoscope and a plurality of subject images that can be attached to and detached from the connecting portions. In a measurement endoscope apparatus that connects one type of optical adapter and one of the optical adapters and measures an image signal of the image sensor by image processing, display data associated with the plurality of optical adapters in advance The menu display process for performing the selection operation and the measurement processing means for performing the measurement process based on the selection result of the menu display process are provided.
[0006]
In the measurement endoscope apparatus configured as described above, when an optical adapter is selected on the menu, a measurement method corresponding to the optical adapter is automatically selected. It is possible to execute measurement processing corresponding to the selected measurement method only by pressing the measurement execution switch.
[0007]
In addition, the result of performing the calibration process for each of the plurality of optical adapters in the embodiment described in the above publication is stored as measurement environment data in a compact flash (R) memory card, which is an external storage medium. A configuration in which the measurement environment data suitable for the corresponding optical adapter is used by selecting an appropriate optical adapter is disclosed.
[0008]
[Problems to be solved by the invention]
Usually, a measurement image is a video endoscope body, a measurement optical adapter having an objective lens, a camera control unit (CCU) for converting a signal output from the video endoscope into a TV signal, and a TV signal as a digital signal. Depending on the type of recording device or the individual used for converting to and recording, the characteristics of the image appearance change. For this reason, the measurement endoscope device must be set correctly without making various measurement environment settings so that it is suitable for the combination of the devices when the measurement image is taken. I can't.
[0009]
Therefore, in an apparatus or system that performs measurement, it is also important to create data necessary for correcting the measurement image before the process of actually calculating the measurement value, and this process is an apparatus that records the image. Since the processing related to the measurement described above has been incorporated in the image recording device because it has a characteristic that depends on the image, conventionally, when re-measurement is performed on a recorded image, measurement is performed only on this device. Could not do. Or, if there is no individual difference of the recording device, it was possible to measure the image recorded by another device on another device, but again to perform re-measurement on the measurement endoscope device It was limited.
[0010]
Recently, as the types of endoscope bodies, optical adapters, CCUs, and image recording devices have increased to suit various measurement applications, various combinations of devices (measurement environments) Opportunities to perform remeasurement with recorded measurement images are increasing.
[0011]
There are also many commercial software programs for PCs that not only capture and display recorded images on a personal computer, but also facilitate these operations.
[0012]
Therefore, it has become common to manage many types of measurement images with such PC software, but since there was no means and processing to enable measurement environment settings on a PC, It was not possible to remeasure the measurement image captured on the computer.
[0013]
The present invention has been made in view of the above circumstances, and the measurement image recorded by the measurement endoscope apparatus can be re-measured on a personal computer to improve the work efficiency of the inspection. Measurement program The purpose is to provide.
[0014]
In addition, it is necessary to set the measurement environment suitable for the images recorded in various measurement environments to the personal computer, but it is possible to prevent measurement in the wrong measurement environment. By enabling re-measurement in a correct measurement environment with simple operation, re-measurement can be performed immediately without being aware of the measurement environment, and the operability at that time can be improved. Measurement program It is also intended to provide.
[0015]
[Means for Solving the Problems]
The measurement program of the present invention includes stereo image data including two images having parallax imaged through a stereo measurement adapter, and calibration data indicating optical characteristics of the stereo measurement adapter; Measurement environment information indicating the type of the calibration data; Image file with Acquireable image acquisition Step and A determination step for determining whether or not calibration data is added to the image file captured by the image acquisition step, and the determination step includes adding the calibration data to the image file captured by the image acquisition step. When determining that the calibration data has been added by the determination step, reading the calibration data added to the image file from the image file captured by the image acquisition step, and the determination step However, when it is determined that the calibration data is not added to the image file captured by the image acquisition step, the calibration data corresponding to the measurement environment information is at least one arbitrary reference with reference to the measurement environment information. The calibration data is recorded on the recording medium. Determining whether or not calibration data corresponding to the measurement environment information is recorded on the recording medium, and reading calibration data corresponding to the measurement environment information from the recording medium. Read out Based on the calibration data, The image file captured by the image acquisition step has Correcting the geometric distortion included in the stereo image data to generate corrected stereo image data; performing a matching process between the two images included in the corrected stereo image data; and the matching process And the results of Read out The method includes a step of calculating three-dimensional coordinates at an arbitrary point of the corrected stereo image data based on the calibration data, and a step of measuring a subject using the three-dimensional coordinates.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0017]
1 to 15 relate to an embodiment of the present invention, FIG. 1 is a perspective view showing a system configuration of a measurement endoscope apparatus, and FIG. 2 shows an electrical circuit configuration of the measurement endoscope apparatus of FIG. FIG. 3 is a perspective view showing the configuration of the remote controller of FIG. 1, FIG. 4 is a perspective view showing the configuration of the endoscope tip portion of the endoscope insertion portion of FIG. 1 with a stereo measurement adapter, and FIG. 4 is a cross-sectional view taken along line AA in FIG. 4, FIG. 6 is a diagram showing an endoscopic image with the stereo measurement adapter in FIG. 4, and FIG. 7 is a diagram showing a mask shape image of the stereo measurement adapter in FIG. 8 is a perspective view showing a configuration of the endoscope distal end portion of the endoscope insertion portion of FIG. 1 with a normal optical adapter attached, FIG. 9 is a cross-sectional view taken along line AA of FIG. 8, and FIG. FIG. 11 is a diagram showing an example of a thumbnail screen displayed, and FIG. 12 is a stereo image. FIG. 13 is a diagram showing a display example of a measurement screen by a normal optical adapter, FIG. 14 is a first flowchart showing an example of a control operation characteristic of this measurement software, and FIG. These are the 2nd flowcharts which show the example of control operation which becomes the feature of this measurement software.
[0018]
(Constitution)
The system configuration of the measurement endoscope apparatus 10 according to the present embodiment will be described. As shown in FIG. 1, the measurement endoscope apparatus 10 incorporates an imaging element and a plurality of stereo measurement optical adapters and a normal measurement use. An endoscope insertion unit 11 configured to be detachably mountable with an optical adapter, a control unit 12 that houses the endoscope insertion unit 11, and various operation controls of the entire system of the measurement endoscope apparatus 10 are executed. A remote controller 13 for performing necessary operations, a liquid crystal monitor (hereinafter referred to as LCD) 14 for displaying an endoscopic image or operation control content (for example, a processing menu), and a normal endoscopic image, or A face mount display (hereinafter referred to as FMD) 17 capable of stereoscopically viewing the endoscopic image as a pseudo stereo image, and an FMD display for supplying image data to the FMD 17. It is configured to include a descriptor 18.
[0019]
Further, the system configuration of the apparatus will be described in detail with reference to FIG. As shown in FIG. 2, the endoscope insertion portion 11 is connected to an endoscope unit 24, and this endoscope unit 24 is mounted in the control unit 12, for example, as shown in FIG. Although not shown, the endoscope unit 24 includes a light source device for obtaining illumination light necessary for imaging, and an electric bending device for bending the endoscope insertion portion 11 electrically freely. It is configured.
[0020]
An imaging signal from the solid-state imaging device 43 (see FIG. 5) at the distal end of the endoscope insertion portion is input to a camera control unit (hereinafter referred to as CCU) 25. The CCU 25 converts the supplied imaging signal into a video signal such as an NTSC signal and supplies it to a main processing circuit group in the control unit 12.
[0021]
The main circuit group mounted in the control unit 12 includes, for example, as shown in FIG. 2, a CPU 26, a ROM 27, a RAM 28, a PC card interface (hereinafter, referred to as a CPU card) that controls various functions based on the main program. PC card I / F) 30, USB interface (hereinafter referred to as USB I / F) 31, RS-232C interface (hereinafter referred to as RS-232CI / F) 29, audio signal processing circuit 32 and video signal processing circuit 33.
[0022]
The RS-232CI / F 29 is connected to the CCU 25, the endoscope unit 24, and the remote controller 13, respectively, and controls the operation of the CCU 25, the endoscope unit 24 and the operation based on the operation by the remote controller 13 that gives an operation instruction. It is for performing communication necessary for each.
[0023]
The USB I / F 21 is an interface for electrically connecting the control unit 12 and the personal computer 21. When the USB I / F 21 is connected via the USB I / F 21, the personal computer 21 side also includes an internal unit in the control unit 12. It is possible to perform various instruction control such as an instruction to display an endoscopic image and image processing at the time of measurement, and input of control information and data necessary for various processes between the control unit 12 and the personal computer 21. Output can be performed.
[0024]
The PC card I / F 30 is configured such that a PCMCIA memory card 22 and a compact flash (R) memory card 23 are detachably connected. That is, when any one of the above memory cards is inserted, the control processing by the CPU 26 reproduces data such as control processing information and image information stored in the memory card as a recording medium, and the PC card I / F 30 Or data such as control processing information or image information can be supplied to the memory card via the PC card I / F 30 and recorded.
[0025]
The video signal processing circuit 33 displays the video signal from the CCU 25 and the operation menu generated by the control of the CPU 26 so as to display a composite image obtained by synthesizing the endoscopic image supplied from the CCU 25 and the graphic operation menu. By combining the display signal based on the display signal and performing processing necessary for display on the screen of the LCD 14 and supplying it to the LCD 14, a composite image of the endoscopic image and the operation menu is displayed on the LCD 14. In the video signal processing circuit 33, it is also possible to simply perform processing for displaying an endoscopic image or an image such as an operation menu alone.
[0026]
The audio signal processing circuit 32 is supplied with an audio signal that is generated by being collected by the microphone 20 and recorded on a recording medium such as a memory card, or an audio signal obtained by reproducing the recording medium such as a memory card. Processing (amplification processing or the like) necessary for reproducing the audio signal is performed and output to the speaker 19. Thereby, an audio signal is reproduced by the speaker 19.
[0027]
The CPU 26 executes a program stored in the ROM 27 and controls various circuit units so as to perform processing according to the purpose, thereby controlling the operation of the entire system.
[0028]
Next, the configuration of the remote controller 13 and an example of the program operation control of the CPU 26 based on the operation will be described with reference to FIG.
[0029]
The remote controller 13 used in the measurement endoscope apparatus 10 of the present embodiment has been improved to further improve operability during use such as measurement.
[0030]
As shown in FIG. 3, the remote controller 13 includes a joystick 47, a lever switch 48, a freeze switch 49, a store switch 50, and a measurement execution switch 51 on at least the upper surface. In other words, the remote controller 13 is easy to operate for the user. Is adopted.
In the remote controller 13 having the above-described configuration, the joystick 47 is a switch that performs a bending operation of the endoscope distal end portion, and can give an operation instruction freely in any direction of 360 degrees. The lever switch 48 is a switch for performing a pointer operation when performing various menu operations for graphic display and measurement, and is configured in substantially the same shape as the joystick switch 47. The freeze switch 49 is a switch used when displaying the endoscope moving image displayed on the LCD 14 as a still image. The store switch 50 is a switch used to record the still image on the PCMCIA memory card 22 (see FIG. 2) when the still image is displayed by pressing the freeze switch 49. The measurement execution switch 51 is a switch used when executing measurement software.
[0031]
The freeze switch 49, the store switch 50, and the measurement execution switch 51 are configured to employ, for example, an on / off pressing type. Further, functions other than those described above can be assigned to the lever switch 48.
[0032]
For example, these functions may be assigned to the lever switch 48 so that the zoom up function of the image can be executed when the lever switch 48 is tilted to the right and the zoom DOWN function can be executed when the lever is tilted to the left. Also, normally, when measurement is performed with a zoom image, measurement cannot be performed correctly because the magnification of the image changes. In such a case, when the measurement execution switch 51 is pressed, the CPU 26 receives this operation signal, cancels the instantaneous zoom function, and controls to execute the measurement after the image is frozen. As another method, control may be performed so that the image can be measured as it is in consideration of the zoom magnification.
[0033]
Next, the configuration of the stereo measurement adapter used in the measurement endoscope apparatus 10 of the present embodiment will be described with reference to FIGS.
[0034]
4 and 5 show a state in which the stereo measurement adapter 37 is attached to the endoscope front end 39. The stereo measurement adapter 37 is connected to the male screw 54 of the endoscope front end 39 by the female screw 53 of the fixing ring 38. It is fixed by screwing.
[0035]
In addition, a pair of illumination lenses 36, two objective lenses 34, and an objective lens 35 are provided at the tip of the stereo measurement adapter 37. The two objective lenses 34 and 35 form two images on the image sensor 43 provided in the endoscope distal end portion 39. The obtained imaging signal is supplied to the CCU 25 through the electrically connected signal line 43a and the endoscope unit 24, converted into a video signal by the CCU 25, and then supplied to the video signal processing circuit 33. As a result, for example, an image as shown in FIG. 6 is displayed on the LCD 14.
[0036]
The measurement endoscope apparatus 10 according to the present embodiment, when performing stereo measurement, uses, for example, a recording in which optical data of the stereo measurement adapter 37 is recorded using an endoscope image obtained by imaging a white subject as illustrated in FIG. Stereo measurement processing of the object to be measured is executed based on optical data taken from a medium (for example, a compact flash (R) memory card).
[0037]
Stereo measurement by the measurement endoscope apparatus 10 includes first processing for reading optical information from a recording medium (for example, a compact flash (R) memory card) on which optical data of the stereo measurement adapter 37 is recorded, and the endoscope. A position error is calculated from the second process for reading the position information of the image pickup device 43 and the stereo measurement adapter 37 at the distal end portion 39, and the position information and the position information of the main endoscope and the stereo measurement adapter 37 obtained at the time of production. A fourth process for correcting the optical data from the position error, a fifth process for converting the coordinates of an image measured based on the corrected optical data, and a coordinate-converted image This is performed by executing at least a sixth process for obtaining an arbitrary point three-dimensional coordinate by matching two images based on the above.
[0038]
For example, the CPU 26 executes the first to fourth processes once for the stereo measurement adapter 37 and controls the result to be recorded on the compact flash (R) memory card 23 as measurement environment data. Thereafter, when performing stereo measurement, the CPU 26 controls to load the measurement environment data on the RAM and execute the fifth, sixth, and seventh processes.
[0039]
When performing the second process of reading the positional information between the imaging device 43 and the stereo optical adapter 37 at the endoscope tip 39, the shape of the mask provided on the optical adapter (not shown) is captured as shown in FIG. This is done by comparing the shape and position of the mask during production. In this case, the capture of the mask shape is performed by capturing a white image (projecting white paper or the like). The brightness of the white image at this time is determined by the gain of the CCU 25 and the shutter speed.
[0040]
Normally, the gain of the CCU 25 and the shutter speed of the image sensor 43 are controlled so as to automatically become optimum conditions. However, when capturing the mask shape, the gain of the CCU 25 is low and the shutter speed of the image sensor 43 is high. It tends to be set, and the image becomes dark and the mask shape cannot be taken clearly, which adversely affects the measurement accuracy. Therefore, in the present embodiment, the control is performed by the CPU 26 so that the gain of the CCU 25 and the shutter speed are fixed. Thereby, the shape of the mask can be captured reliably, and the measurement accuracy does not deteriorate.
[0041]
When preparation for measurement is completed, for example, when measuring the length of the crack 44 in FIG. 6, the measurement point is designated so that the crack 44 is traced by a broken line on the left image. Each time a new measurement point is designated, the CPU 26 searches for the corresponding point on the right image, obtains a three-dimensional coordinate at each point from the coordinate of the measurement point and the corresponding point, and is adjacent to the three-dimensional coordinate. The distance between two matching points is calculated, and the total of them is calculated to display the length of the crack 44 on the LCD 14 as the total length.
[0042]
Next, the configuration of the normal optical adapter used in the measurement endoscope apparatus 10 of the present embodiment will be described with reference to FIGS.
[0043]
8 and 9 show a state in which the normal optical adapter 42 is attached to the endoscope distal end portion 39. The normal optical adapter 42 is connected to the male screw 54 of the endoscope distal end portion 39 by the female screw 53 of the fixing ring 38. It is fixed by screwing.
[0044]
In addition, a pair of illumination lens 41 and objective lens 40 are provided at the tip of the normal optical adapter 42. The objective lens 40 forms an image on the image sensor 43 provided in the endoscope front end 39. The obtained image pickup signal is supplied to the CCU 25 through the signal line 43a and the endoscope unit 24 that are electrically connected in the same manner as the stereo measurement adapter 37, and is converted into a video signal by the CCU 25 before the video. By being supplied to the signal processing circuit 33, for example, an image as shown in FIG.
[0045]
The measurement endoscope apparatus 10 according to the present embodiment normally performs a measurement using an optical adapter by using a method based on comparative measurement. In other words, the comparative measurement is a method of measuring with reference to the understood dimensions in the screen.
[0046]
For example, when the diameter of the circle shown in FIG. 10 is known, a pointer is placed at both ends of the diameter of the circle and a length L1 45 between the two points is input. The dimension L2 46 to be obtained is obtained as a ratio by the arithmetic processing by the CPU 26 from the size on the screen of L1. At this time, the distortion correction is performed based on the information of the distortion characteristic of the lens, and adjustment is performed so as to obtain the dimension more accurately. The distortion characteristics of the lens are recorded in advance on the ROM 27, and the CPU 26 performs comparative measurement by loading data corresponding to the selected normal optical adapter 42 onto the RAM 2.
[0047]
Further, in this measurement endoscope, in order to save the settings of a plurality of stereo measurement adapters, the measurement environment data is controlled to be recorded on a removable removable flash memory card 23.
[0048]
The measurement environment data includes measurement environment information, calibration data, a conversion table, and an inverse conversion table.
[0049]
Since the measurement environment information is information indicating the type of measurement environment data, that is, the type of calibration data or conversion table, for example, the following information is included.
[0050]
・ Stereo measurement adapter type and individual identification number
・ Type of endoscope insertion part and individual identification number
・ TV type such as NTSC
・ CCU type
・ Video capture circuit types
Since the type of CCU and the type of video capture circuit are often provided as a module of the measurement endoscope apparatus, in this case, these may be read as the type of the measurement endoscope apparatus.
[0051]
The calibration data consists of optical data indicating the optical characteristics measured in the production process of the stereo measurement adapter, corrected to information suitable for the measurement endoscope actually used in the measurement. Contains content.
[0052]
・ Position information for the combination of the endoscope bell used in the production process data measurement and this optical adapter ・ Position information for the combination of the endoscope actually used for measurement and this optical adapter
A correction formula in which displacement correction is performed from the position information of the above two mounting conditions with respect to the geometric distortion correction formulas of the two optical systems obtained by data measurement in the production process.
The position coordinates of the optical axis in which the positional deviation correction has been performed based on the position information of the two mounting conditions described above with respect to the position coordinates of the optical axes of the two lenses obtained by the data measurement in the production process.
・ Distance between the optical axes of two lenses determined by data measurement in the production process
・ Focal distance of two lens systems obtained by data measurement of production process
The conversion table included in the measurement environment data is a conversion table for performing geometric distortion correction on a measurement image photographed by the tree endoscope apparatus using the calibration data, and this table is used. And a corrected image after distortion correction can be created.
[0053]
The inverse conversion table included in the measurement environment data is an inverse conversion table for obtaining coordinates on the original image before correction with respect to the coordinates on the corrected image.
[0054]
Further, in this measurement endoscope, the captured image is recorded on the PCMCIA memory card 22 together with calibration data and measurement environment information used for measurement under the control of the CPU 26.
[0055]
Further, in this measurement endoscope, the PCMCIA memory card 22 for recording an image of calibration data and measurement environment information included in one selected from a plurality of measurement environment data registered in the apparatus, It is also possible to record on a removable memory card that is separate from the Compact Flash (R) memory card for recording the measurement environment data.
[0056]
In the present embodiment, a measurement endoscope recorded on a PCMCIA memory card 22 by a measurement endoscope apparatus, capturing a measurement image with calibration data and measurement environment information on a personal computer, and taking the image is measured. The present invention relates to software that can perform the same measurement on a personal computer by setting the same measurement environment as the apparatus, and this embodiment will be described below.
[0057]
The software for the personal computer according to the present embodiment selects the first process for capturing and managing the image recorded by the measurement endoscope apparatus 10 into the personal computer, and selecting one of the managed images. The second process for calling the measurement function, the third process for managing the calibration data recorded on the recording medium and the measurement environment information in the personal computer, and the fourth process for associating the calibration data suitable for the measurement image And a fifth process for creating a conversion table for correcting geometric distortion included in the image, and a sixth process for creating a corrected image by performing coordinate conversion on the image taken for measurement using the conversion table Seventh processing for matching the left and right two images at an arbitrary point based on the corrected image, and obtaining the three-dimensional coordinates from the two left and right coordinates obtained by the matching, the position coordinates of the optical axis, and the focal length And processing the wafer, which is constituted by a ninth process of obtaining a measurement of distance and area between two points in the three-dimensional coordinates of a plurality of arbitrary points, the measurement is performed by executing these.
[0058]
When a memory card with recorded measurement images is attached to a personal computer and images are selected by this software, these images are stored in folders on the personal computer managed by this software by the first process. Is duplicated. When this process ends, the thumbnail 55 of the image copied earlier is displayed in the thumbnail screen of the software as shown in FIG. If a symbol indicating a stereo measurement image or a comparative measurement image is recorded in the header of the copied image file, a stereo measurement icon 56 and a comparative measurement icon 57 are displayed on each thumbnail 55 accordingly. Is displayed.
[0059]
Then, an image to be measured is selected from the thumbnail screen, a measurement execution menu (not shown) is selected from the menu bar 58, the measurement execution button 60 is pressed from the toolbar 59, or the thumbnail is displayed. When the stereo measurement icon 56 or the comparative measurement icon 57 is pressed, each measurement function is called by the second process, and when preparation for measurement is completed, a stereo measurement screen as shown in FIG. 12 or as shown in FIG. The comparative measurement screen is displayed.
[0060]
FIG. 12 shows various menu buttons 61 for executing various measurement functions, a message display field 63 for displaying messages concerning operations, various numerical value display fields 62 for displaying measurement results (numerical values), and measurement. An example is shown in which two measurable visual field areas 64 are cut out from the image and pasted and displayed on this measurement screen.
[0061]
FIG. 13 shows an example in which various menu buttons 65, a message display field 67, various numerical value display fields 66, and a measurement image 68 are displayed as in FIG.
[0062]
The measurement endoscope apparatus registers a plurality of measurement environment data, and the total capacity of the conversion table and the inverse conversion table included in each measurement environment data is, for example, 12 Mbytes. Therefore, if three stereo measurement adapters are registered in this apparatus, 12 Mbytes × 3 = 36 Mbytes. In measurement endoscope devices, it takes time to create measurement environment data due to restrictions such as the CPU, and various measurements are often performed using several types of optical adapters. Several pieces of measurement environment data that can be recorded within the capacity range of a flash ROM or a compact flash (R) memory card that has been created have been created in advance.
[0063]
On the other hand, the processing speed of a commercially available personal computer is several times to several tens of times faster than a measurement endoscope apparatus. Thus, when measurement environment data is created on a personal computer, it is completed in several seconds to several tens of seconds. In addition, because of the nature of managing a large number of images on a PC, it is necessary to handle a large number of types of measurement environment data. Therefore, every time you select an image and perform measurement, you can create measurement environment data from the calibration data attached to the image, so you only have to secure the capacity of one measurement environment data. Get better.
[0064]
In addition, the calibration data required for creating measurement environment data is often very small in size, such as several tens of Kbytes, making it easy to save multiple calibration data in a personal computer. It becomes possible to register. Therefore, even if calibration data is not attached to an image, there is a convenience that measurement environment data can be created and remeasured by selecting an appropriate one from the calibration data list.
[0065]
Here, a plurality of measurement environment data and calibration data registered in the personal computer can be easily registered by the following two methods.
[0066]
The first method is to select a measurement image with measurement environment information and calibration data, and execute the measurement with the same measurement environment as the selected image in the already registered measurement environment data. If the same file is not registered, the measurement environment information and calibration data attached to the image are automatically copied into the folder managed by this software. sign up.
[0067]
In the second method, the measurement endoscope apparatus selects an appropriate measurement environment data registered here, and records the measurement environment information and calibration data on a removable recording medium. Prepare in advance. Alternatively, an appropriate one selected from the measurement environments registered by this software is prepared, and the measurement environment information and calibration data recorded on a removable recording medium are prepared. Mount the recording medium prepared in this way on a personal computer, select the appropriate measurement environment information and calibration data recorded here with this software, copy it to the folder managed by this software, and copy it. Register.
[0068]
As described above, if the measurement environment is supported by this software, you can easily set the measurement environment for any measurement image recorded by various measurement endoscope devices, and you can perform remeasurement quickly. .
[0069]
(Function)
With reference to FIG. 14 and FIG. 15, a control operation that is a feature of the software of the present embodiment will be described in detail.
[0070]
A measurement image recorded by the measurement endoscope apparatus is captured by this software, and one appropriate thumbnail is selected from the screen of FIG. 11 by a mouse or key operation. Then, when the measurement execution menu in the menu bar 58 is selected, the measurement execution button 60 is pressed from the toolbar 59, or the stereo measurement icon 56 or the comparative measurement icon 57 on the thumbnail is pressed, as shown in FIG. The routine program is executed.
[0071]
When the routine shown in FIG. 14 is executed, in the determination process of step S111, it is determined whether or not the image is recorded by the measurement endoscope apparatus with reference to the header of the selected image file. If it is an image recorded in step S112, it is determined in step S112 whether or not the image is a stereo measurement image by referring to the header of the image.
[0072]
Here, in the case of a stereo measurement image, it is determined whether or not measurement environment information is attached to the header of this image file in the determination process of step S113. If this is recorded, the determination of step S114 is performed. It is determined whether or not the calibration data attached to the image is supported by this software in the process, and if it is supported, the process proceeds to step S116. If the calibration data attached to the image in the determination process of step S114 is not supported by this software, it is displayed on the screen of FIG. 11 to display that stereo measurement cannot be performed and to select another image. Return.
[0073]
In the determination process in step S116, it is determined whether or not the measurement environment data recorded in the measurement environment database already registered in the personal computer has the same measurement environment information as this image. If there is the same item, the process proceeds to step S118. If it is determined in step S116 that there is no same item, the measurement environment information and the calibration data attached to the image are registered in the database, and the process proceeds to step S118.
[0074]
In the determination process in step S118, it is determined whether or not the measurement environment data is the same as the measurement environment data that has already been created and set. If the measurement environment information is the same, in the determination process in step S119, It is determined whether or not the difference between the position information of the visual field area included in and the position information of the visual field area included in the current measurement environment data is smaller than a predetermined threshold value.
[0075]
If it is smaller than the threshold value in step S119, the currently set measurement environment data is read, and the stereo measurement process in step S121 is performed.
[0076]
If the determination process in step S118 is different from the current measurement environment data, or if the determination process in step S119 is greater than the threshold value, the measurement environment data is obtained using the calibration data attached to the header of the image file. Is newly created, and the stereo measurement process of step S121 is performed.
[0077]
When preparation for stereo measurement is completed in step S121, the screen of FIG. 12 enters a standby state. When measurement is performed on this screen, the measurement result is displayed.
[0078]
When this screen is closed, the screen returns to the screen of FIG. 11 and another image can be selected.
[0079]
On the other hand, when the measurement environment information and the calibration data are not attached to the measurement image in the determination process in step S113, the process proceeds to S123 in order to manually select the measurement environment data suitable for this image so that the measurement can be performed. The routine program shown in FIG. 15 is executed.
[0080]
In step S201, the user selects whether to select appropriate data from already registered calibration data, use calibration data recorded on another recording medium, or end the measurement.
[0081]
When selecting an appropriate calibration data from already registered calibration data, a list of calibration data registered in the measurement environment database is displayed in step S203, and an appropriate one is displayed to the user in step S204. Let them choose one. Next, in step S205, it is determined whether or not the measurement environment information is attached to the image. If so, the content of the measurement environment information recorded in the image file in the determination process in step S206 and the user selected It is determined whether or not the content of the measurement environment information in the calibration data matches. If they match in step S206, the process proceeds to step S209.
[0082]
If they do not match in step S206, it is displayed that the selected calibration data cannot be used, and the flow returns to step S201 to select another calibration data.
[0083]
On the other hand, if the measurement environment information is not attached to the image in step S205, the user reconfirms the content of the measurement environment information in the selected calibration data, and the process proceeds to step S209.
[0084]
In step S209, measurement environment data is created using the calibration data selected from the list, and stereo measurement processing is executed.
[0085]
If it is determined in step S201 that the calibration data recorded in another recording medium, not from the database, is used, the recording medium in which the calibration data is recorded is inserted into the personal computer, and is stored in step S212. Display a list of calibration data.
[0086]
Then, after the user selects an appropriate one from these, it is determined whether or not the calibration data selected in the determination process in step S214 corresponds to this software. If it is determined in step S214, it is determined whether or not measurement environment information is attached to the image in step S215. If so, the content of the measurement environment information recorded in the image file in the determination process in step S217. And whether or not the content of the measurement environment information of the calibration data selected by the user matches. If they match in step S217, the process proceeds to step S219.
[0087]
If the measurement environment information is not attached to the image in step S215, the user reconfirms the content of the measurement environment information in the selected calibration data, and the process proceeds to step S219.
[0088]
Then, the calibration data and measurement environment information selected in step S219 are registered in the database, and in step S220, the measurement environment data is created using the calibration data, and the stereo measurement process is executed.
[0089]
On the other hand, when the calibration data selected in step S214 is not supported by this software, or when the content of the measurement environment information in the image does not match the content of the measurement environment information of the selected calibration data in step S217. Displays that the selected calibration data cannot be used, and returns to step S201 to select another calibration data.
[0090]
When step S209 or step S220 is completed, measurement environment information and calibration data may be recorded in the header of the image file as desired by the user before performing stereo measurement.
[0091]
Furthermore, if the image selected in step S112 in FIG. 14 is not a stereo measurement image, it is determined in the determination process in step S124 whether the image is a comparative measurement by referring to the header of the image, and is a comparative measurement image. In this case, the distortion correction information of the optical adapter attached to the image is read in step S125, and comparison measurement processing is executed.
[0092]
On the other hand, if it is determined in step S124 that the selected image is neither a stereo measurement image nor a comparative measurement image, the measurement process is ended and the screen shown in FIG. 11 is returned to select another image, or step S127 is selected. Let the user select a measurement method.
[0093]
If the measurement method selected in step S127 is comparative measurement, the initial value distortion correction information is read and comparative measurement processing is executed.
[0094]
If stereo measurement is selected in step S127, the process proceeds to step S123, and the program shown in FIG. 15 is executed to select appropriate calibration data from the list so that measurement can be performed.
[0095]
Note that if the image selected in step S111 is not an image recorded by the measurement endoscope apparatus, or if the measurement is terminated in step S128, the screen returns to the screen in FIG. 11 so that another image can be selected. To.
[0096]
(Effect 1)
In this embodiment, just by selecting a measurement image and executing measurement, the correct information necessary for measurement is read and the measurement environment is set, and it is correct on a general personal computer, not on a measurement endoscope device. Measurement is possible.
[0097]
Moreover, an appropriate measurement program is executed simply by selecting a measurement image and pressing a measurement execution menu or a measurement button regardless of the type of measurement.
[0098]
(Effect 2)
When performing measurement using images with measurement environment information and calibration data, the current setting is used when the measurement environment information indicating the type of device used to capture the image matches the current setting. If it is used for measurement, the accuracy of the self-image taken to inspect the position of the field of view changes for some reason, and the positional relationship information also changes accordingly. May decrease.
[0099]
In the present embodiment, even if the measurement environment information indicating the type of device used to capture the image matches the current setting, it is confirmed whether the position information of the visual field area has changed. Therefore, not only reduces the case where the accuracy is reduced due to such a cause, but also allows the measurement environment to be automatically set and measured using calibration data attached to the image beforehand. It is safe, quick, and ready to make measurements easily.
[0100]
(Effect 3)
Since the calibration data has a capacity of several tens of Kbytes and the measurement environment information is often several Kbytes, it may be desired to record only the measurement environment information in the image in order to reduce one image file.
[0101]
Also, if measurement environment information or calibration data is recorded in a file other than the image file, the measurement environment information or calibration data file recorded in association with the image for some reason is lost or deleted. It is also possible to be trapped.
[0102]
In the case of a conventional measurement endoscope system, such an image cannot be remeasured even on the apparatus, or the measurement environment setting operation until actual remeasurement is complicated.
[0103]
On the other hand, in this embodiment, the measurement environment can be easily set on a personal computer simply by selecting from a list of already registered measurement environment data or a list of calibration data recorded on another memory card. Settings can be made and remeasurement can be performed quickly.
[0104]
Furthermore, since it is confirmed whether or not the data selected from the list is compatible with the image to be measured, there is an effect of reducing the case where measurement is performed in an inconsistent state.
[0105]
In the present invention according to the above embodiment, the measurement environment can be set on the personal computer and re-measurement can be performed on the image recorded on the removable recording medium by the measurement endoscope apparatus. Therefore, it is possible to prevent the measurement from being performed on an image that is not a measurement image. The user can perform measurement corresponding to the correct optical adapter with a simple operation without worrying about the type of equipment of the optical adapter, improving operability at the time of re-measurement and improving inspection efficiency. It becomes possible to improve.
[0106]
Although it supports various measurement environments, measurement environment data is recreated as needed, so only one set of measurement environment data capacity can be secured on the recording medium (HD) in the PC. Therefore, it is not necessary to specifically limit the specifications of the personal computer HD for this purpose.
[0107]
In addition, when performing measurement with a measurement image with the first type of calibration data, the calibration data can be automatically loaded into the managed calibration data group. Re-measurement can be performed without much awareness of existence.
[0108]
In addition to the measurement image, only the calibration data can be recorded on the recording medium, or it can be imported into a personal computer, so it is possible to remeasure even an image without calibration data. .
[0109]
In addition, there is no need to perform re-measurement on the device that actually captured the image, so re-measurement can be performed on another device by attaching the recording medium on which the image is recorded to another device and performing the same simple operation. Can be performed.
[0110]
As a result, the state of the measurement environment in various measurement endoscope devices can be reproduced on a single personal computer, so the measurement image can be easily re-measured on the personal computer familiar to the inspector. Furthermore, by using a computer network system, it becomes possible to easily share data of images and measurement results among a plurality of inspectors, and the inspection environment is greatly improved.
[0111]
In other words, according to the present invention, a measurement image is taken into a personal computer together with measurement environment information and calibration data, an appropriate image is selected from the plurality of stored images, and a stereo measurement function is executed. The measurement environment is automatically set from the measurement environment information and calibration data attached to the, and the measurement process can be immediately executed on the personal computer. At this time, the measurement environment information and the calibration data attached to the image are automatically duplicated in the calibration data group database and managed separately from the image.
[0112]
In addition, a process of searching for the same calibration data group already managed in the personal computer by referring to the measurement environment information recorded in the measurement image, and automatically using the search result data. If measurement is performed with an image that does not have calibration data due to the capacity of the medium on which the image is recorded, etc., by providing a means to change the setting of the measurement environment, the same measurement information as the selected measurement image is used. If certain measurement environment data exists in the apparatus, measurement environment data can be automatically created from already existing calibration data, and measurement processing can be executed by using this.
[0113]
Furthermore, by providing a means to determine whether it matches the current measurement environment setting by referring to the measurement environment information recorded in the measurement image, the current setting can be made without creating measurement environment data again. Measurement processing can be executed using the measured measurement environment data, and the time for preparation for measurement can be shortened.
[0114]
Furthermore, even if measurement environment information and calibration data are not recorded in the measurement image for some reason, a measure is provided so that the measurer can check whether the measurement environment of the selected image is recorded. Measurement can be performed without consciousness. In this case, a list of calibration data already existing in the personal computer can be displayed, and measurement can be performed by selecting an appropriate one from the list. It becomes.
[0115]
In addition to exporting the image to the recording medium and importing from the recording medium, the calibration data in the personal computer can be copied to the recording medium, or the calibration data in the recording medium can be imported to the database in the personal computer. Therefore, it is possible to construct a database that can manage only the calibration data independently. As a result, even when re-measurement is performed on an image without calibration data and measurement environment data, re-measurement can be easily performed on such an image if appropriate calibration data is loaded into the database via a recording medium. It becomes possible.
[0116]
【The invention's effect】
As described above, according to the present invention, the measurement image recorded by the measurement endoscope apparatus can be re-measured on the personal computer, and the work efficiency of the inspection can be improved.
[Brief description of the drawings]
FIG. 1 is a perspective view showing a system configuration of a measurement endoscope apparatus according to a first embodiment of the present invention.
2 is a block diagram showing an electrical circuit configuration of the measurement endoscope apparatus of FIG. 1. FIG.
3 is a perspective view showing the configuration of the remote controller of FIG. 1. FIG.
4 is a perspective view showing a configuration of an endoscope distal end portion of the endoscope insertion portion of FIG. 1 with a stereo measurement adapter attached. FIG.
5 is a cross-sectional view taken along line AA in FIG.
6 is a view showing an endoscopic image with the stereo measurement adapter of FIG. 4 attached. FIG.
7 is a diagram showing an image of a mask shape of the stereo measurement adapter of FIG. 4;
8 is a perspective view showing a configuration of an endoscope distal end portion of the endoscope insertion portion of FIG. 1 with a normal optical adapter attached thereto.
9 is a cross-sectional view taken along line AA in FIG.
10 is a view showing an endoscopic image with the normal optical adapter of FIG. 9 attached. FIG.
FIG. 11 is a diagram showing a display example of a thumbnail screen
FIG. 12 is a diagram showing a display example of a measurement screen by a stereo optical adapter
FIG. 13 is a diagram showing a display example of a measurement screen by a normal optical adapter
FIG. 14 is a first flowchart showing a control operation example that is a feature of the measurement software;
FIG. 15 is a second flowchart showing a control operation example that is a feature of the measurement software;
[Explanation of symbols]
10. Measurement endoscope device
11 ... Endoscope insertion part
12 ... Control unit
13 ... Remote controller
14 ... Liquid crystal monitor (LCD)
17 ... Face cloak display (FMD)
18 ... FMD adapter
19 ... Speaker
20 ... Microphone
21 ... Personal computer
22 ... PCMCIA memory card
23 ... Compact Flash (R) memory card
24 ... Endoscope unit
25 ... Camera Control Unit (CCU)
26 ... CPU (control unit)
27 ... ROM
28 ... RAM
29 ... RS-232CI / F
30 ... PC card I / F
31 ... USB I / F
32. Audio signal processing circuit
33 ... Video signal processing circuit
34, 35, 40 ... Objective lens system
36, 41 ... Illumination lens
37 ... Stereo optical adapter
38 ... Fixing ring
39 ... End of endoscope
42 ... Normal optical adapter
43 ... Image sensor
44 ... Crack
45 ... L1 (known dimensions)
46 ... L2 (unknown dimension)
47 ... Joystick
48 ... Lever switch
49 ... Freeze switch
50 ... Store switch
51 ... Measurement execution switch
53 ... Female thread
54 ... Male thread
55 ... Thumbnail
56 ... Stereo measurement icon
57 ... Comparison measurement icon
58 ... Menu bar
59 ... Toolbar
60 ... Measurement execution button
61, 65 ... various menu buttons
62, 66 ... Various numerical value display fields
63, 67 ... Message display field
64 ... Measurable field of view
68 ... Measurement image

Claims (4)

ステレオ計測アダプタを介して撮像された視差を有する二枚の画像を備えたステレオ画像データと、前記ステレオ計測アダプタの光学特性を示す校正データと、前記校正データの種類を示す計測環境情報と、を有する画像ファイルを取得可能な画像取得ステップと
前記画像取得ステップによって取り込まれた画像ファイルに校正データが付加されているか否かを判別する判別ステップと、
前記判別ステップが、前記画像取得ステップによって取り込まれた画像ファイルに校正データが付加されていると判別したとき、前記判別ステップによって校正データが付加されていると判別された画像ファイルに付加されている校正データを、前記画像取得ステップによって取り込まれた画像ファイルから読み出すステップと、
前記判別ステップが、前記画像取得ステップによって取り込まれた画像ファイルに校正データが付加されていないと判別したとき、前記計測環境情報を参照して、前記計測環境情報に対応した校正データが、少なくとも1つの任意の校正データが記録されている記録媒体に記録されているか否かを判断するステップと、
前記計測環境情報に対応した校正データが前記記録媒体に記録されていると判断されたとき、前記計測環境情報に対応した校正データを前記記録媒体から読み出すステップと、
読み出した校正データに基づいて、前記画像取得ステップによって取り込まれた画像ファイルが有する前記ステレオ画像データに含まれる幾何学的歪みを補正して補正ステレオ画像データを生成するステップと、
前記補正ステレオ画像データが備えた前記二枚の画像間におけるマッチング処理を行うステップと、
前記マッチング処理の結果と前記読み出した校正データとに基づいて前記補正ステレオ画像データの任意の点における三次元座標を算出するステップと、
前記三次元座標を用いて被写体を計測するステップとを有することを特徴とする計測用プログラム。
Stereo image data including two images having parallax imaged through a stereo measurement adapter, calibration data indicating the optical characteristics of the stereo measurement adapter, and measurement environment information indicating the type of the calibration data An image acquisition step capable of acquiring an image file having ;
A determination step for determining whether or not calibration data is added to the image file captured by the image acquisition step;
When the determination step determines that the calibration data is added to the image file captured by the image acquisition step, the determination step is added to the image file that is determined to have the correction data added. Reading calibration data from the image file captured by the image acquisition step;
When the determination step determines that calibration data is not added to the image file captured by the image acquisition step, the calibration data corresponding to the measurement environment information is at least 1 with reference to the measurement environment information. Determining whether or not two arbitrary calibration data are recorded on a recording medium, and
When it is determined that calibration data corresponding to the measurement environment information is recorded on the recording medium, reading calibration data corresponding to the measurement environment information from the recording medium;
Correcting the geometric distortion included in the stereo image data included in the image file captured by the image acquisition step based on the read calibration data, and generating corrected stereo image data;
Performing a matching process between the two images included in the corrected stereo image data;
Calculating three-dimensional coordinates at an arbitrary point of the corrected stereo image data based on the result of the matching process and the read calibration data;
And a step of measuring a subject using the three-dimensional coordinates.
前記補正ステレオ画像データを生成する前記ステップは、
前記読み出した校正データから、前記ステレオ画像データにおける座標変換に用いられる変換テーブルを作成するステップと、
前記変換テーブルに基づいて、前記ステレオ画像データを、前記ステレオ画像データから幾何学的歪みを除くように座標変換するステップとを有することを特徴とする請求項1に記載の計測用プログラム。
The step of generating the corrected stereo image data includes:
Creating a conversion table used for coordinate conversion in the stereo image data from the read calibration data;
The measurement program according to claim 1, further comprising: converting the stereo image data based on the conversion table so as to remove geometric distortion from the stereo image data.
前記判別ステップによって校正データが付加されていると判別された画像ファイルに付加されている校正データは、前記ステレオ計測アダプタの生産工程で測定された光学特性が、前記ステレオ計測アダプタが接続される内視鏡挿入部に適した光学特性として補正されたものであることを特徴とする請求項1または請求項2に記載の計測用プログラム。The calibration data added to the image file that has been determined that the calibration data has been added in the determination step has the optical characteristics measured in the production process of the stereo measurement adapter within the connection of the stereo measurement adapter. 3. The measuring program according to claim 1, wherein the measuring program is corrected as an optical characteristic suitable for an endoscope insertion portion. 前記ステレオ画像データに対して実行可能な計測処理の種類を判別するステップと、Determining the type of measurement process executable on the stereo image data;
判別された前記種類に応じた計測処理を前記補正ステレオ画像データに対して実行するステップとを有することを特徴とする請求項1〜請求項3の何れか1項に記載の計測用プログラム。The measurement program according to claim 1, further comprising a step of executing a measurement process corresponding to the determined type on the corrected stereo image data.
JP2001264849A 2001-08-31 2001-08-31 Measurement program Expired - Fee Related JP4373038B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2001264849A JP4373038B2 (en) 2001-08-31 2001-08-31 Measurement program
US10/232,422 US6945930B2 (en) 2001-08-31 2002-08-27 Environment adaptable measurement endoscope

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001264849A JP4373038B2 (en) 2001-08-31 2001-08-31 Measurement program

Publications (3)

Publication Number Publication Date
JP2003070720A JP2003070720A (en) 2003-03-11
JP2003070720A5 JP2003070720A5 (en) 2008-10-16
JP4373038B2 true JP4373038B2 (en) 2009-11-25

Family

ID=19091389

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001264849A Expired - Fee Related JP4373038B2 (en) 2001-08-31 2001-08-31 Measurement program

Country Status (1)

Country Link
JP (1) JP4373038B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4663246B2 (en) * 2004-02-16 2011-04-06 キヤノン株式会社 Camera, camera system and lens apparatus
JP2005181356A (en) 2003-12-15 2005-07-07 Canon Inc Camera system, camera, accessary, and photographing lens
JP2006180934A (en) * 2004-12-24 2006-07-13 Olympus Corp Endoscope apparatus
JP2008302073A (en) * 2007-06-08 2008-12-18 Olympus Corp Endoscopic image display device and endoscopic image display program
FI123049B (en) * 2007-09-03 2012-10-15 Mapvision Ltd Oy Recording Machine Vision System
JP5980611B2 (en) * 2012-07-25 2016-08-31 オリンパス株式会社 Measurement endoscope apparatus and program
JP6214233B2 (en) * 2013-06-21 2017-10-18 キヤノン株式会社 Information processing apparatus, information processing system, information processing method, and program.

Also Published As

Publication number Publication date
JP2003070720A (en) 2003-03-11

Similar Documents

Publication Publication Date Title
JP4468544B2 (en) Endoscope device
US6945930B2 (en) Environment adaptable measurement endoscope
JP4373037B2 (en) Measuring endoscope device
JP4873794B2 (en) Image processing measuring apparatus and measuring endoscope apparatus
JP4632577B2 (en) Measuring endoscope device
US7443488B2 (en) Endoscope apparatus, method of operating the endoscope apparatus, and program to be executed to implement the method
US20120274762A1 (en) Obtaining distance between different points on an imaged object
JP5113990B2 (en) Endoscope device for measurement
US11321861B2 (en) Method of operating measurement device, measurement device, measurement system, three-dimensional shape restoration device, and recording medium
JP4373038B2 (en) Measurement program
JP2006329684A (en) Image measuring instrument and method
JP5079973B2 (en) Endoscope device for measurement and program for endoscope device for measurement
US11941749B2 (en) Image display method, display control device, and recording medium for displaying shape image of subject and coordinates estimated from two-dimensional coordinates in reference image projected thereon
JP4759184B2 (en) Measuring endoscope device
JP5307407B2 (en) Endoscope apparatus and program
US20080027277A1 (en) Endoscope apparatus
JPH09305796A (en) Image information processor
CN110873717A (en) Image acquisition device and method for operating image acquisition device
US20100315496A1 (en) Endoscope apparatus, method and system
JP4011888B2 (en) Measuring endoscope device
JP4266736B2 (en) Image processing method and apparatus
JP4975417B2 (en) Endoscope apparatus and endoscope image distortion correction method
JP2005279054A (en) Device and method for displaying conversion image, and endoscope apparatus for industrial use
JP4266737B2 (en) Image processing method and apparatus
JP2005050033A (en) Image processing method and image generating device

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080828

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080828

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20080828

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20081014

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081021

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090310

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090511

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090811

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090903

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

Free format text: PAYMENT UNTIL: 20120911

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120911

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130911

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees