JP2009258427A - Endoscope device and program - Google Patents
Endoscope device and program Download PDFInfo
- Publication number
- JP2009258427A JP2009258427A JP2008107939A JP2008107939A JP2009258427A JP 2009258427 A JP2009258427 A JP 2009258427A JP 2008107939 A JP2008107939 A JP 2008107939A JP 2008107939 A JP2008107939 A JP 2008107939A JP 2009258427 A JP2009258427 A JP 2009258427A
- Authority
- JP
- Japan
- Prior art keywords
- measurement
- image
- unit
- mask
- optical
- 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.)
- Granted
Links
Images
Landscapes
- Closed-Circuit Television Systems (AREA)
- Instruments For Viewing The Inside Of Hollow Bodies (AREA)
- Endoscopes (AREA)
Abstract
Description
本発明は、電子内視鏡を用いて撮像した画像に基づいて計測対象物の計測処理を行う内視鏡装置、およびその動作を制御するためのプログラムに関する。 The present invention relates to an endoscope apparatus that performs measurement processing of a measurement object based on an image captured using an electronic endoscope, and a program for controlling the operation thereof.
一般に、電子内視鏡によって計測対象物(被検体)を詳細に調べるには、その計測対象物の位置を計測する必要がある。このような要求を満足するために、電子内視鏡を用いて、ステレオ計測により計測対象物の3次元計測を行う計測用内視鏡装置が開示されている(例えば特許文献1〜3参照)。
計測用内視鏡装置で撮像された画像には光学系による光学的歪みが含まれており、この光学的歪みを補正する必要がある。この補正には、光学系の光学特性を示す光学データが使用される。一方、計測用内視鏡装置には、計測対象物の内部に挿入する挿入部に接続する、光学アダプタと呼ばれる観察光学系を交換することが可能なタイプがある。このタイプの計測用内視鏡装置では、製造段階で光学データが生成される。 An image captured by the measurement endoscope apparatus includes optical distortion due to the optical system, and it is necessary to correct this optical distortion. For this correction, optical data indicating the optical characteristics of the optical system is used. On the other hand, there is a type that can replace an observation optical system called an optical adapter that is connected to an insertion portion that is inserted into a measurement object in the measurement endoscope apparatus. In this type of measuring endoscope apparatus, optical data is generated at the manufacturing stage.
製造段階で光学データの生成時に製造者が使用する挿入部と、計測時にユーザが使用する挿入部とが異なる場合があるため、光学データの生成時と計測時とで同一の光学アダプタが使用されたとしても、光学アダプタと挿入部との位置関係が異なる場合がある。このため、ユーザ側では、光学アダプタと挿入部との位置関係に応じて光学データを補正した環境データが生成される。この環境データを生成するための一連の処理はキャリブレーションと呼ばれている。計測時には、環境データを用いて光学的歪みが補正される。 Since the insertion part used by the manufacturer when generating optical data at the manufacturing stage may be different from the insertion part used by the user during measurement, the same optical adapter is used when generating optical data and during measurement. Even in this case, the positional relationship between the optical adapter and the insertion portion may be different. For this reason, on the user side, environmental data in which optical data is corrected according to the positional relationship between the optical adapter and the insertion portion is generated. A series of processes for generating this environmental data is called calibration. At the time of measurement, the optical distortion is corrected using the environmental data.
しかしながら、キャリブレーションでは画像処理が行われるため、キャリブレーションに時間がかかるという問題がある。そのため、通常、キャリブレーションを繰り返し行うことはせず、一旦生成された環境データが繰り返し使用される。しかし、計測時の光学アダプタと挿入部との位置関係が環境データ生成時の位置関係と異なっていると、計測精度が低下するという問題がある。 However, since image processing is performed in calibration, there is a problem that it takes time for calibration. For this reason, normally, the calibration is not repeatedly performed, and the once generated environment data is repeatedly used. However, if the positional relationship between the optical adapter and the insertion portion at the time of measurement is different from the positional relationship at the time of environment data generation, there is a problem that the measurement accuracy decreases.
本発明は、上述した課題に鑑みてなされたものであって、計測精度の低下を防止することができる内視鏡装置およびプログラムを提供することを目的とする。 The present invention has been made in view of the above-described problems, and an object thereof is to provide an endoscope apparatus and a program that can prevent a decrease in measurement accuracy.
本発明は、上記の課題を解決するためになされたもので、光学系(後述するステレオ光学アダプタに対応)によって結像された被写体像に基づく撮像信号を生成する電子内視鏡を有し、前記光学系を交換可能な挿入部と、前記撮像信号に基づいて映像信号を生成する映像信号生成部と、前記映像信号に基づいて前記光学系と前記挿入部との位置関係(後述するマスク位置情報に対応)を検出する位置関係検出部と、計測対象の被写体を撮像したときに検出された前記位置関係に基づいて、前記光学系の光学特性を示す情報(後述する歪補正テーブルに対応)を補正する光学特性補正部と、補正された前記情報に基づいて、前記計測対象の被写体を撮像したときの前記映像信号に含まれる光学的歪みを補正する映像信号補正部と、補正後の前記映像信号に基づいて計測処理を行う計測処理部とを備えたことを特徴とする内視鏡装置である(後述する第1〜第5の実施形態に対応)。 The present invention has been made to solve the above problems, and has an electronic endoscope that generates an imaging signal based on a subject image formed by an optical system (corresponding to a stereo optical adapter described later), An insertion unit that can exchange the optical system, a video signal generation unit that generates a video signal based on the imaging signal, and a positional relationship between the optical system and the insertion unit based on the video signal (mask position to be described later) Information corresponding to information), and information indicating optical characteristics of the optical system based on the positional relationship detected when the subject to be measured is imaged (corresponding to a distortion correction table described later) An optical characteristic correction unit that corrects optical distortion, a video signal correction unit that corrects optical distortion included in the video signal when the subject to be measured is imaged based on the corrected information, and the corrected An endoscope apparatus characterized by comprising a measurement processing portion that performs measurement processing based on the image signal (corresponding to the first to fifth embodiments described later).
また、本発明の内視鏡装置は、前記光学系の光学特性を示す第1の情報(後述する歪補正テーブルに対応)と、前記光学系と所定の挿入部との位置関係を示す第2の情報(後述するマスク位置情報に対応)とを含む光学データを記憶する記録媒体から前記光学データを読み出す読出部をさらに備え、前記光学特性補正部は、計測対象の被写体を撮像したときに検出された前記位置関係と、前記光学データに含まれる前記第2の情報とに基づいて、前記光学データに含まれる前記第1の情報を補正することを特徴とする(後述する第1〜第5の実施形態に対応)。 The endoscope apparatus according to the present invention also includes first information indicating the optical characteristics of the optical system (corresponding to a distortion correction table described later) and a second relationship indicating the positional relationship between the optical system and a predetermined insertion portion. And a reading unit that reads the optical data from a recording medium that stores optical data including the following information (corresponding to mask position information to be described later), and the optical characteristic correcting unit detects when the subject to be measured is imaged The first information included in the optical data is corrected based on the positional relationship and the second information included in the optical data (first to fifth described later). Corresponding to the embodiment).
また、本発明の内視鏡装置は、前記光学系の光学特性を示す第1の情報(後述する歪補正テーブルに対応)と、前記光学系と所定の挿入部との位置関係を示す第2の情報(後述するマスク位置情報に対応)とを含む光学データを記憶する記録媒体から前記光学データを読み出す読出部と、所定の被写体を撮像したときに検出された前記位置関係を示す第3の情報(後述するマスク位置情報に対応)および前記第2の情報に基づいて、前記光学データに含まれる前記第1の情報を補正し、補正後の前記第1の情報と前記第3の情報を含む環境データを生成する環境データ生成部とをさらに備え、前記光学特性補正部は、計測対象の被写体を撮像したときに検出された前記位置関係と前記第3の情報とに基づいて、前記環境データに含まれる前記第1の情報を補正することを特徴とする(後述する第1〜第5の実施形態に対応)。 The endoscope apparatus according to the present invention also includes first information indicating the optical characteristics of the optical system (corresponding to a distortion correction table described later) and a second relationship indicating the positional relationship between the optical system and a predetermined insertion portion. A reading unit that reads out the optical data from a recording medium that stores optical data including the following information (corresponding to mask position information described later), and a third relationship that indicates the positional relationship detected when a predetermined subject is imaged Based on information (corresponding to mask position information described later) and the second information, the first information included in the optical data is corrected, and the corrected first information and third information are obtained. An environment data generation unit that generates environment data including the environment data generation unit, wherein the optical characteristic correction unit is configured to generate the environment based on the positional relationship detected when the subject to be measured is imaged and the third information. Included in the data And correcting the first information (corresponding to the first to fifth embodiments described later).
また、本発明の内視鏡装置において、前記位置関係検出部は、計測対象の被写体を撮像したときの前記映像信号に基づいて、前記光学系の所定の位置に形成された構造物を検出し、画像における前記構造物の位置に基づいて前記光学系と前記挿入部との位置関係を検出することを特徴とする(後述する第1〜第5の実施形態に対応)。 In the endoscope apparatus according to the present invention, the positional relationship detection unit detects a structure formed at a predetermined position of the optical system based on the video signal when the subject to be measured is imaged. The positional relationship between the optical system and the insertion portion is detected based on the position of the structure in the image (corresponding to first to fifth embodiments described later).
また、本発明の計測用内視鏡装置において、前記構造物は、前記光学系に入射した光を遮光するマスクに形成されたマークであることを特徴とする(後述する第1の実施形態に対応)。 In the measuring endoscope apparatus of the present invention, the structure is a mark formed on a mask that blocks light incident on the optical system (in a first embodiment described later). Correspondence).
また、本発明の計測用内視鏡装置において、前記挿入部を介して被写体に照射する光を発生する光源をさらに有し、前記光学系は、前記光源からの光を前記マークに照射する構造を有することを特徴とする(後述する第2の実施形態に対応)。 The measurement endoscope apparatus according to the present invention further includes a light source that generates light to be emitted to the subject via the insertion portion, and the optical system irradiates the mark with light from the light source. (Corresponding to a second embodiment to be described later).
また、本発明の計測用内視鏡装置において、前記光学系は、前記マークに光を照射する光源を有することを特徴とする(後述する第3の実施形態に対応)。 In the measurement endoscope apparatus of the present invention, the optical system includes a light source that irradiates light to the mark (corresponding to a third embodiment described later).
また、本発明の計測用内視鏡装置において、前記構造物は、前記光学系に入射した光を遮光するマスク上または前記マスクの近傍に配置された発光体であることを特徴とする(後述する第4の実施形態に対応)。 In the measuring endoscope apparatus according to the present invention, the structure is a light emitter disposed on or near a mask that blocks light incident on the optical system (described later). Corresponding to the fourth embodiment).
また、本発明の計測用内視鏡装置において、前記光学系はプリズムであり、前記構造物は、前記プリズムに形成されたマークであることを特徴とする(後述する第5の実施形態に対応)。 In the measurement endoscope apparatus of the present invention, the optical system is a prism, and the structure is a mark formed on the prism (corresponding to a fifth embodiment to be described later). ).
また、本発明の計測用内視鏡装置は、前記計測対象の被写体を撮像したときの前記映像信号のダイナミックレンジを変換するダイナミックレンジ変換部をさらに備えたことを特徴とする(後述する第6の実施形態に対応)。 In addition, the measurement endoscope apparatus of the present invention further includes a dynamic range conversion unit that converts a dynamic range of the video signal when the subject to be measured is imaged (sixth to be described later). Corresponding to the embodiment).
また、本発明の計測用内視鏡装置は、前記計測対象の被写体を複数回撮像したときの複数の前記映像信号を合成する合成部をさらに備えたことを特徴とする(後述する第7の実施形態に対応)。 The measuring endoscope apparatus according to the present invention further includes a combining unit that combines a plurality of the video signals when the subject to be measured is imaged a plurality of times (seventh described later). Corresponding to the embodiment).
また、本発明の計測用内視鏡装置において、前記光学系は、同一の被写体に関する複数の被写体像を結像する構造を有し、前記位置関係検出部は、前記計測対象の被写体を撮像したときの前記映像信号に基づいて、画像における前記複数の被写体像の位置を検出し、当該位置に基づいて前記位置関係を検出することを特徴とする(後述する第8の実施形態に対応)。 In the measurement endoscope apparatus of the present invention, the optical system has a structure that forms a plurality of subject images related to the same subject, and the positional relationship detection unit images the subject to be measured. The position of the plurality of subject images in the image is detected based on the video signal at that time, and the positional relationship is detected based on the position (corresponding to an eighth embodiment described later).
また、本発明の計測用内視鏡装置において、前記映像信号補正部は、画像において計測位置を含む所定領域に対応した前記映像信号の前記光学的歪みを補正することを特徴とする(後述する第9の実施形態に対応)。 In the measurement endoscope apparatus of the present invention, the video signal correction unit corrects the optical distortion of the video signal corresponding to a predetermined region including a measurement position in an image (described later). Corresponding to the ninth embodiment).
また、本発明は、光学系によって結像された被写体像に基づく撮像信号を生成する電子内視鏡を有し、前記光学系を交換可能な挿入部と、前記撮像信号に基づいて映像信号を生成する映像信号生成部とを備えた内視鏡装置を制御するコンピュータを、前記映像信号に基づいて前記光学系と前記挿入部との位置関係を検出する位置関係検出部と、計測対象の被写体を撮像したときに検出された前記位置関係に基づいて、前記光学系の光学特性を示す情報を補正する光学特性補正部と、補正された前記情報に基づいて、前記計測対象の被写体を撮像したときの前記映像信号に含まれる光学的歪みを補正する映像信号補正部と、補正後の前記映像信号に基づいて計測処理を行う計測処理部と、として機能させるためのプログラムである。 In addition, the present invention includes an electronic endoscope that generates an imaging signal based on a subject image formed by an optical system, an insertion unit that can replace the optical system, and a video signal based on the imaging signal. A computer that controls an endoscope apparatus including a video signal generation unit that generates a positional relationship detection unit that detects a positional relationship between the optical system and the insertion unit based on the video signal, and a subject to be measured An optical characteristic correction unit that corrects information indicating the optical characteristics of the optical system based on the positional relationship detected when the image is captured, and the subject to be measured is imaged based on the corrected information This is a program for functioning as a video signal correction unit that corrects an optical distortion included in the video signal and a measurement processing unit that performs a measurement process based on the corrected video signal.
上記において、括弧で括った部分の記述は、後述する本発明の実施形態と本発明の構成要素とを便宜的に対応付けるためのものであり、この記述によって本発明の内容が限定されるわけではない。 In the above description, the description in parentheses is for the purpose of associating the embodiment of the present invention described later with the components of the present invention for convenience, and the contents of the present invention are not limited by this description. Absent.
本発明によれば、計測対象の被写体を撮像したときに検出された位置関係に基づいて、光学系の光学特性を示す情報を補正することによって、計測精度の低下を防止することができるという効果が得られる。 According to the present invention, it is possible to prevent a decrease in measurement accuracy by correcting information indicating optical characteristics of an optical system based on a positional relationship detected when a subject to be measured is imaged. Is obtained.
(各実施形態の共通事項)
以下、図面を参照し、本発明の実施形態を説明する。まず、後述する本発明の各実施形態で共通となる計測用内視鏡装置の構成(図1参照)を説明する。図1に示すように、計測用内視鏡装置1は、内視鏡2と、コントロールユニット3と、リモートコントローラ4と、液晶モニタ5と、フェイスマウントディスプレイ(FMD)6と、FMDアダプタ6aと、光学アダプタ7a,7b,7cと、内視鏡ユニット8と、カメラコントロールユニット9と、制御ユニット10とから構成されている。
(Common items of each embodiment)
Hereinafter, embodiments of the present invention will be described with reference to the drawings. First, the configuration of a measurement endoscope apparatus (see FIG. 1) that is common to each embodiment of the present invention described later will be described. As shown in FIG. 1, a
計測対象物を撮像し撮像信号を生成する内視鏡2(電子内視鏡)は細長の挿入部20を備えている。挿入部20は、先端側から順に、硬質な先端部21と、例えば上下左右に湾曲可能な湾曲部22と、柔軟性を有する可撓管部23とを連設して構成されている。挿入部20の基端部は内視鏡ユニット8に接続されている。先端部21は、観察視野を2つ有するステレオ用の光学アダプタ7a,7b(以下、ステレオ光学アダプタと記載する)あるいは観察視野が1つだけの通常観察光学アダプタ7c等、各種の光学アダプタが例えば螺合によって着脱自在な構成になっている。
An endoscope 2 (electronic endoscope) that captures an image of a measurement object and generates an imaging signal includes an
コントロールユニット3は、内視鏡ユニット8、画像処理手段であるカメラコントロールユニット(以下、CCUと記載する。)9、および制御装置である制御ユニット10を内部に備えている。内視鏡ユニット8は、観察時に必要な照明光を供給する光源装置と、挿入部20を構成する湾曲部22を湾曲させる湾曲装置とを備えている。CCU9は、挿入部20の先端部21に内蔵されている固体撮像素子2aから出力された撮像信号を入力し、これをNTSC信号等の映像信号に変換して制御ユニット10に供給する。
The
制御ユニット10は、音声信号処理回路11と、映像信号処理回路12(映像信号生成部)と、ROM13と、RAM14と、PCカードインターフェース(以下、PCカードI/Fと記載する。)15と、USBインターフェース(以下、USB I/Fと記載する。)16と、RS−232Cインターフェース(以下、RS−232C I/Fと記載する。)17と、計測処理部18とから構成されている。
The
マイク34によって集音された音声信号や、メモリカード等の記録媒体を再生して得られる音声信号、あるいは計測処理部18によって生成された音声信号が音声信号処理回路11に供給される。映像信号処理回路12は、CCU9から供給された内視鏡画像とグラフィックによる操作メニューとを合成した合成画像を表示するために、CCU9からの映像信号を、計測処理部18の制御により生成される操作メニュー等のための表示信号と合成する処理を行う。また、映像信号処理回路12は、液晶モニタ5の画面上に映像を表示するために合成後の映像信号に所定の処理を施して液晶モニタ5に供給する。
An audio signal collected by the
PCカードI/F15は、PCMCIAメモリカード32やフラッシュメモリカード33等のメモリカード(記録媒体)を自由に着脱できるようになっている。メモリカードを装着することにより、計測処理部18の制御に従って、このメモリカードに記憶されている制御処理情報や、画像情報、光学データ等を取り込んだり、制御処理情報や、画像情報、光学データ等をメモリカードに記録したりすることができる。
The PC card I /
USB I/F16は、コントロールユニット3とパーソナルコンピュータ31とを電気的に接続するためのインターフェースである。このUSB I/F16を介してコントロールユニット3とパーソナルコンピュータ31とを電気的に接続することにより、パーソナルコンピュータ31側で内視鏡画像の表示の指示や計測時における画像処理等の各種の制御指示を行うことが可能となる。また、コントロールユニット3とパーソナルコンピュータ31との間で各種の処理情報やデータを入出力することが可能となる。
The USB I /
RS−232C I/F17には、CCU9および内視鏡ユニット8が接続されると共に、これらCCU9や内視鏡ユニット8等の制御および動作指示を行うリモートコントローラ4が接続されている。ユーザがリモートコントローラ4を操作すると、その操作内容に基づいて、CCU9および内視鏡ユニット8を動作制御する際に必要な通信が行われる。
The RS-232C I /
計測処理部18は、映像信号処理回路12から映像信号を取り込み、映像信号に基づいて計測処理を実行する。また、計測処理部18は、PCカードI/F15を介してPCMCIAメモリカード32やフラッシュメモリカード33等のメモリカードにアクセスし、計測処理に必要な光学データをメモリカードから読み出す処理や、光学データから環境データを生成する処理等も実行する。
The
以下で使用する光学データは、観察光学系(ステレオ光学アダプタ内に設けられる対物光学系、ステレオ光学アダプタと挿入部20との双方に設けられる光学系からなる像伝送光学系)の光学特性を示す下記の(a1)〜(d)と、光学系と挿入部20との位置関係を示す下記の(e)とを含んでいる。下記の(a1)〜(d)の詳細は特許文献3等に記載されているので、その説明を省略する。また、下記の(e)の詳細は後述する。
(a1)2つの対物光学系の幾何学的歪補正テーブル
(a2)像伝送光学系の幾何学的歪補正テーブル
(b)左右の結像光学系それぞれの焦点距離
(c)左右の結像光学系の主点間の距離
(d)左右の結像光学系それぞれの画像上での光軸位置座標(歪中心)
(e)マスク位置情報(マスク角度、マスク中心)
The optical data used below indicates optical characteristics of an observation optical system (an objective optical system provided in the stereo optical adapter, an image transmission optical system including an optical system provided in both the stereo optical adapter and the insertion unit 20). The following (a1) to (d) and the following (e) showing the positional relationship between the optical system and the
(A1) Geometric distortion correction table of the two objective optical systems (a2) Geometric distortion correction table of the image transmission optical system (b) Focal lengths of the left and right imaging optical systems (c) Left and right imaging optics (D) Optical axis position coordinates (center of distortion) on the images of the left and right imaging optical systems
(E) Mask position information (mask angle, mask center)
(従来の光学データおよび環境データの生成方法)
次に、各実施形態の前提となる従来の光学データおよび環境データの生成方法を説明する。図2は計測処理部18の構成を示している。図2に示すように計測処理部18は、制御部18aと、画像取得部18bと、計測点指定部18cと、マッチング演算部18dと、3次元座標演算部18eと、記憶部18fと、マスク形状抽出部18gと、マスク位置演算部18hと、歪補正テーブル演算部18iとから構成されている。
(Conventional optical data and environmental data generation method)
Next, a conventional method for generating optical data and environmental data, which is a premise of each embodiment, will be described. FIG. 2 shows the configuration of the
制御部18aは計測処理部18内の各部を制御する。また、制御部18aは、液晶モニタ5またはフェイスマウントディスプレイ6に計測結果や操作メニュー等を表示させるための表示信号を生成して映像信号処理回路12へ出力する機能も有している。画像取得部18bは、映像信号を構成する1フレーム単位の画像データを映像信号処理回路12から取得する。
The
計測点指定部18cは、リモートコントローラ4あるいはPC31から入力される信号に基づいて、計測対象物上の計測位置を示す計測点を指定する。ユーザが、液晶モニタ5あるいはフェイスマウントディスプレイ6に表示された計測対象物の画像を見ながら所望の計測点を入力すると、その2次元座標が計測点指定部18cによって算出される。
The measurement
マッチング演算部18dは、計測点指定部18cによって指定された計測点に基づいて、マッチング点の2次元座標を算出する。観察視野を2つ有するステレオ光学アダプタを使用した場合、内視鏡2が撮像した画像には左右2つの被写体像(以下、左画像および右画像と記載する)が含まれている。これら2つの被写体像の一方に対して計測点が指定されると、マッチング演算部18dは、この計測点に対応するマッチング点をもう一方の被写体像から検出し、その2次元座標を算出する。
The matching
3次元座標演算部18eは、計測点の2次元座標とマッチング点の2次元座標とに基づいて、計測点に対応した被写体上の位置の3次元座標を算出する。記憶部18fは、計測処理部18内で処理される各種情報を記憶する。記憶部18fに格納された情報は、適宜制御部18aによって読み出されて各部へ出力される。
The three-dimensional coordinate
マスク形状抽出部18gは、内視鏡2が撮像した画像から画像処理によってマスクの形状を抽出する。マスク位置演算部18hは、マスク形状抽出部18gが抽出したマスクの形状に基づいて、画像内におけるマスクの位置を算出する。マスクは、光学系に入射した光(特に光学的歪みの多い光)を遮光するための構造物であり、マスクによって左画像と右画像が仕切られている。上記の算出結果であるマスク位置情報には、画像を基準としたマスクの角度とマスクの中心位置とが含まれる。歪補正テーブル演算部18iは、光学データの生成時には歪補正テーブル(前述した(a1)、(a2))を算出し、環境データの生成時には歪補正テーブルを補正する。
The mask
以下、光学データの生成方法を説明する。図3に示すように、製造段階において挿入部20の先端部21にステレオ光学アダプタが接続される(ステップS1)。続いて、白画像の撮像が開始され、画像取得部18bは映像信号処理回路12から画像データを取得する(ステップS2)。白画像とは、マスクの形状をはっきりとさせるために、白い紙や専用の治具を撮像した画像である。画像取得部18bが取得した画像データは、制御部18aによってマスク形状抽出部18gへ出力される。
Hereinafter, a method for generating optical data will be described. As shown in FIG. 3, the stereo optical adapter is connected to the
マスク形状抽出部18gは、画像データに基づく白画像からマスクの形状を抽出する(ステップS3)。ステップS3の処理の詳細は後述する。マスク形状抽出部18gが抽出したマスク形状の情報は、制御部18aによってマスク位置演算部18hへ出力される。マスク位置演算部18hは、マスク形状の情報に基づいてマスク位置情報を生成する(ステップS4)。ステップS4の処理の詳細は後述する。マスク位置演算部18hが生成したマスク位置情報は、制御部18aによって記憶部18fに格納される。
The mask
続いて、チャート画像の撮像が開始され、画像取得部18bは映像信号処理回路12から画像データを取得する(ステップS5)。チャート画像とは、格子状のチャートを撮像した画像である。画像取得部18bが取得した画像データは、制御部18aによって歪補正テーブル演算部18iへ出力される。
Subsequently, imaging of the chart image is started, and the
歪補正テーブル演算部18iは、画像データに基づくチャート画像から格子点を抽出する(ステップS6)。ステップS6の処理の詳細は後述する。続いて、歪補正テーブル演算部18iは、ステップS6で抽出した格子点の情報を用いて歪補正テーブルを生成する(ステップS7)。ステップS7の処理の詳細は後述する。歪補正テーブル演算部18iが生成した歪補正テーブルの情報は、制御部18aによって記憶部18fに格納される。制御部18aは、マスク位置情報や歪補正テーブルの情報等を記憶部18fから読み出して光学データを生成し、PCカードI/F15を介してメモリカードに光学データを格納する(ステップS8)。光学データに含まれる他の情報(歪中心等の情報)は、予め記憶部18fに格納されているものとする。
The distortion correction
以下、図4および図5を参照しながら、ステップS3およびステップS4の処理内容を説明する。図4(a)は、光学データ生成時に撮像される白画像を示している。白画像内の領域400,410はそれぞれ左画像、右画像が表示される領域であり、領域420はマスクによって遮光される領域である。マスク形状抽出部18gは、白画像の中央部に位置する画像処理領域430(図4(b))で2値化やテンプレートマッチング等の画像処理を行い、マスクの形状を抽出する。画像処理領域430の位置やサイズの情報は予め記憶部18fに格納されているものとする。以上がステップS3の処理内容である。
Hereinafter, the processing content of step S3 and step S4 is demonstrated, referring FIG. 4 and FIG. FIG. 4A shows a white image captured when optical data is generated. The
続いて、マスク位置演算部18hは左右の2本のマスクライン500a,500bおよび左右の4つのマスク端点510a,510b,510c,510d(図5(a))を求める。マスク位置演算部18hは左右の4つのマスク端点510a,510b,510c,510dの重心点をマスク中心520(図5(b))とする。さらに、マスク位置演算部18hは、左右の2本のマスクライン500a,500bが所定の基準に対して有する角度の平均の角度を有し、かつマスク中心520を通る直線をマスクライン530(図5(b))とする。上記のマスク中心520の座標およびマスクライン530の角度がマスク位置情報として記憶部18fに格納される。以上がステップS4の処理内容である。
Subsequently, the mask
以下、図6および図7を参照しながら、ステップS6およびステップS7の処理内容を説明する。図6(a)は、光学データ生成時に撮像されるチャート画像を示している。チャートの格子線600は、本来、直線であるが、ステレオ光学アダプタの光学特性により、形状が歪んでいる。歪補正テーブル演算部18iは画像全体におけるチャートの格子線600を抽出し、各格子線600が交わる格子点610(図6(b))を抽出する。以上がステップS6の処理内容である。
Hereinafter, the processing content of step S6 and step S7 is demonstrated, referring FIG. 6 and FIG. FIG. 6A shows a chart image that is captured when optical data is generated. The
続いて、歪補正テーブル演算部18iは、チャートの格子点の位置に基づいて、格子線の歪みが最も少ない点を探索し、左右の歪み中心700a,700b(図7(a))の座標を算出する。さらに、歪補正テーブル演算部18iは、チャートの格子点の座標に基づいて、格子点毎に左右の被写体像における対応関係を調べる。これによって、各被写体像内の位置の対応関係が分かる。例えば、図7(b)に示すように、左画像内の点P1は右画像内の点P1’に対応することが分かる。左右の被写体像内の全ての位置について対応関係を調べることによって、左右の光学的歪みを考慮した歪座標系710a,710b(図7(b))を算出することが可能となる。歪補正テーブルは、歪みのない場合の本来の左右の被写体像内の各位置と歪座標系710a,710bの各座標との対応関係を示すテーブルとして算出される。以上がステップS7の処理内容である。
Subsequently, the distortion correction
以下、環境データの生成方法を説明する。図8に示すように、ユーザによって挿入部20の先端部21にステレオ光学アダプタが接続される(ステップS9)。続いて、制御部18aは、PCカードI/F15を介してメモリカードから光学データを読み出し、記憶部18fに格納する(ステップS10)。続いて、白画像の撮像が開始され、画像取得部18bは映像信号処理回路12から画像データを取得する(ステップS11)。画像取得部18bが取得した画像データは、制御部18aによってマスク形状抽出部18gおよび歪補正テーブル演算部18iへ出力される。続いて、環境データを生成するキャリブレーションが実行される(ステップS12)。ステップS12の処理内容は後述する。制御部18aは、キャリブレーションによって生成された環境データを記憶部18fに格納する(ステップS13)。
Hereinafter, a method for generating environment data will be described. As shown in FIG. 8, the stereo optical adapter is connected to the
図9はステップS12の処理内容を示している。マスク形状抽出部18gは、画像データに基づく白画像からマスクの形状を抽出する(ステップS121)。ステップS121の処理内容は後述する。マスク形状抽出部18gが抽出したマスク形状の情報は、制御部18aによってマスク位置演算部18hへ出力される。マスク位置演算部18hは、マスク形状の情報に基づいてマスク位置情報を生成する(ステップS122)。ステップS122の処理内容は後述する。マスク位置演算部18hが生成したマスク位置情報は、制御部18aによって歪補正テーブル演算部18iへ出力されると共に環境データの一部として記憶部18fに格納される。
FIG. 9 shows the processing content of step S12. The mask
ステップS121およびステップS122の処理内容は図3のステップS3およびステップS4の処理内容と同様である。しかし、光学データの生成時と環境データの生成時とで、ステレオ光学アダプタと挿入部20との位置関係が異なる場合がある。例えば、環境データの生成時において、図10(a)に示す白画像が得られたとする。この白画像を光学データ生成時の白画像(図4(a))と比較すると、マスクの位置が異なっていることが分かる。すなわち、マスクによって遮光される領域同士を比較すると、図4の領域420に対して、図10の領域1000は回転していることが分かる。
The processing contents of steps S121 and S122 are the same as the processing contents of steps S3 and S4 in FIG. However, the positional relationship between the stereo optical adapter and the
マスク形状抽出部18gは、白画像の中央部に位置する画像処理領域1010(図10(b))で2値化やテンプレートマッチング等の画像処理を行い、マスクの形状を抽出する。画像処理領域1010の位置やサイズの情報は予め記憶部18fに格納されているものとする。以上がステップS121の処理内容である。
The mask
続いて、マスク位置演算部18hは左右の2本のマスクライン1100a,1100bおよび左右の4つのマスク端点1110a,1110b,1110c,1110d(図11(a))を求める。マスク位置演算部18hは左右の4つのマスク端点1110a,1110b,1110c,1110dの重心点をマスク中心1120(図11(b))とする。さらに、マスク位置演算部18hは、左右の2本のマスクライン1100a,1100bが所定の基準に対して有する角度の平均の角度を有し、かつマスク中心1120を通る直線をマスクライン1130(図11(b))とする。上記のマスク中心1120の座標およびマスクライン1130の角度がマスク位置情報として記憶部18fに格納される。上記のように、光学データに含まれるマスク位置情報がキャリブレーション時(環境データ生成時)に補正されることになる。以上がステップS122の処理内容である。
Subsequently, the mask
ステップS122に続いて、歪補正テーブル演算部18iは、ステップS122で生成されたマスク位置情報に基づいて歪補正テーブルの再計算を行う(ステップS123)。ステップS123の処理内容は後述する。歪補正テーブル演算部18iが生成した歪補正テーブルは、制御部18aによって環境データの一部として記憶部18fに格納される。上記のように、光学データに含まれる歪補正テーブルがキャリブレーション時(環境データ生成時)に補正されることになる。
Subsequent to step S122, the distortion correction
以下、図12を参照しながら、ステップS123の処理内容を説明する。図12は計測画像を示している。まず、歪補正テーブル演算部18iは、光学データに含まれる歪補正テーブルに基づいて左歪座標系1200aおよび右歪座標系1200b(図12(a))を設定する。ここで、光学データの生成時と環境データの生成時とでマスクの位置が異なっているため、左歪座標系1200a上の点P1に対応する右歪座標系1200b上の点は、同じ座標上の点P1’ではないことが分かる。そこで、歪補正テーブル演算部18iは、光学データに含まれるマスク位置情報と、ステップS122で生成したマスク位置情報とに基づいて、歪補正テーブルを再計算する。
Hereinafter, the processing content of step S123 will be described with reference to FIG. FIG. 12 shows a measurement image. First, the distortion correction
図12では、光学データの生成時と比較して、左画像が上方向に移動し、右画像が下方向に移動している。このため、歪補正テーブル演算部18iは、左歪座標系1200aを矢印1210aが示す方向に移動させるように補正すると共に、右歪座標系1200bを矢印1210bが示す方向に移動させるように補正する(図12(b))。このようにして、左歪座標系1220aおよび右歪座標系1220bが算出される。歪補正テーブルの再計算後には、左歪座標系1220a上の点P1に対応する右歪座標系1220b上の点は、同じ座標上の点P1’であることが分かる。
In FIG. 12, the left image has moved upward and the right image has moved downward compared to when optical data is generated. Therefore, the distortion correction
(従来の計測方法)
次に、各実施形態の前提となる従来の計測方法を説明する。図13に示すように、ユーザによって挿入部20の先端部21にステレオ光学アダプタが接続される(ステップS14)。続いて、制御部18aは、ステレオ光学アダプタに対応した環境データを記憶部18fから読み出す(ステップS15)。記憶部18fから読み出された環境データは、制御部18aによってマッチング演算部18dへ出力される。続いて、計測対象物を被写体とした画像(以下、計測画像とする)の撮像が開始され、画像取得部18bは映像信号処理回路12から画像データを取得する(ステップS16)。画像取得部18bが取得した画像データは、制御部18aによって、適宜、計測点指定部18c、マッチング演算部18d、3次元座標演算部18e、および歪補正テーブル演算部18iへ出力される。
(Conventional measurement method)
Next, a conventional measurement method that is a premise of each embodiment will be described. As shown in FIG. 13, the stereo optical adapter is connected to the
ユーザによって、ステレオ計測機能の起動指示が入力される(ステップS17)と、ステレオ計測が実行される(ステップS18)。ステップS18の処理内容は後述する。ユーザによって、ステレオ計測機能の終了指示が入力される(ステップS19)と、計測が終了する。 When the user inputs a start instruction for the stereo measurement function (step S17), stereo measurement is executed (step S18). The processing content of step S18 will be described later. When the user inputs an instruction to end the stereo measurement function (step S19), the measurement ends.
図14は、計測起動時に表示される計測画面を示している。計測情報として、左画面1400には計測対象物の左画像が表示され、右画面1410には計測対象物の右画像が表示される。また、左画面1400および右画面1410を除く計測画面上の領域には他の計測情報として、光学アダプタ名称情報1420、時間情報1421、メッセージ情報1422、アイコン1423a,1423b,1423c,1423d,1423e、およびズームウィンドウ1424が表示される。
FIG. 14 shows a measurement screen displayed when measurement is started. As measurement information, a left image of the measurement object is displayed on the
光学アダプタ名称情報1420と時間情報1421は共に計測条件を示す情報である。光学アダプタ名称情報1420は、現在使用しているステレオ光学アダプタの名称を示す文字情報である。時間情報1421は現在の日付と時刻を示す文字情報である。メッセージ情報1422は、ユーザへの操作指示を示す文字情報と、計測条件の1つである計測点の座標を示す文字情報とを含んでいる。
Both the optical
アイコン1423a〜1423eは、ユーザが計測モードの切替や計測結果のクリア等の操作指示を入力するための操作メニューを構成している。ユーザがリモートコントローラ4あるいはPC31を操作し、カーソル1425をアイコン1423a〜1423eのいずれかの上に移動させてクリック等の操作を行うと、その操作に応じた信号が計測処理部18に入力される。制御部18aは、その信号に基づいてユーザからの操作指示を認識し、計測処理を制御する。また、ズームウィンドウ1424には計測対象物の拡大画像(例えばカーソル1425周囲における拡大画像)が表示される。
The
以下、図15を参照しながら、ステップS18の処理内容を説明する。まず、液晶モニタ5またはフェイスマウントディスプレイ6に表示された計測画面上において、リモートコントローラ4あるいはPC31の操作により、ユーザが計測点を指定すると、指定された計測点の情報が計測処理部18に入力される(ステップS181)。図16は、計測点が指定されたときの計測画面を示している。左画面1600上でカーソル1610が示す位置が計測点であり、計測点を示す図形1620(×)がその位置に表示されている。
Hereinafter, the processing content of step S18 will be described with reference to FIG. First, when the user designates a measurement point on the measurement screen displayed on the liquid crystal monitor 5 or the
計測点指定部18cは、入力された計測点の情報に基づいて計測点の2次元座標を算出する。計測点指定部18cが算出した計測点の2次元座標は、制御部18aによってマッチング演算部18dへ出力される。マッチング演算部18dは、画像取得部18bが取得した画像データと環境データを用いて、公知のマッチング処理により、左画像上の計測点に対応する右画像上のマッチング点の2次元座標を算出する(ステップS182)。ステップS182の処理内容は後述する。計測点およびマッチング点の2次元座標は、制御部18aによって3次元座標演算部18eへ出力される。
The measurement
3次元座標演算部18eは、計測点およびマッチング点の2次元座標に基づいて、計測点に対応した被写体上の位置の3次元座標を算出する(ステップS183)。ステップS183の処理内容は後述する。制御部18aは、3次元座標演算部18eが算出した3次元座標の情報を含むグラフィックデータを生成し、映像信号処理部12へ出力する。これによって、計測画面に計測結果が表示される(ステップS184)。図17は、3次元座標の算出が終了したときの計測画面を示している。計測結果1700は、3次元座標に対応したZ方向の位置を示している。
Based on the two-dimensional coordinates of the measurement point and the matching point, the three-dimensional coordinate
以下、図18および図19を参照しながら、マッチング処理の詳細を説明する。図18(a)は計測画像を示している。左歪座標系1800aの点P1に対応する右歪座標系1800bの点は点P1’であるが、これは仮の対応点である。以下のマッチング処理によって、厳密な真の対応点が求まる。まず、マッチング演算部18dは、環境データに含まれる歪補正テーブルを用いて歪補正処理を実行する。歪補正後の画像では点P1,P1’はそれぞれ点P2,P2’(図18(b))に対応する。また、歪補正によって、左歪座標系1800aおよび右歪座標系1800bはそれぞれ左座標系1810aおよび右座標系1810bに変換される。
Hereinafter, details of the matching process will be described with reference to FIGS. 18 and 19. FIG. 18A shows a measurement image. The point in the right distorted coordinate
マッチング演算部18dは、左座標系1810a上の点P2を含むテンプレート画像領域1820(図18(c))を設定する。続いて、マッチング演算部18dは、テンプレート画像領域1820の画像と、テンプレート画像領域1820よりも広いマッチング画像領域1830(図18(c))の画像とのテンプレートマッチング処理(正規化相互相関処理)を実行する。
The matching
このとき、マッチング演算部18dは、テンプレート画像領域1900(図19(a))のテンプレート画像と、マッチング画像領域1910(図19(a))の画像のうちテンプレート画像と同じサイズの画像との間で、画像の位置をずらしながら各位置で相関処理を行う。画像同士の相関が最も高い位置M(図19(a))が真の対応点となる。図19(b)において、点P2’’は、点P2に対応した真の対応点である。マッチング演算部18dは、歪補正の逆変換を行い、点P2’’に対応した点P1’’(図19(c))を求める。この点P1’’は、点P1に対応した真の対応点である。
At this time, the matching
以下、図20を参照しながら、3次元座標の算出原理を説明する。図20は、x,y,z軸をもつ3次元空間座標系上の左右の2画像の位置関係を示している。この図20には、被写体上の点Pが固体撮像素子2aの右結像面28Rおよび左結像面28L上に結像した状態が示されている。図20において、点OR,OLを対物光学系の主点とし、距離fを焦点距離とし、点QR,QLを点Pの結像位置とし、距離Lを点OR−点OL間の距離とする。
Hereinafter, the calculation principle of the three-dimensional coordinates will be described with reference to FIG. FIG. 20 shows the positional relationship between two left and right images on a three-dimensional spatial coordinate system having x, y, and z axes. FIG. 20 shows a state in which the point P on the subject is imaged on the
図20において、直線QR−ORから(1)式が成立する。
x/xR={y−(L/2)}/{yR−(L/2)}=z/(−f) ・・・(1)
また、直線QL−OLから(2)式が成立する。
x/xL={y+(L/2)}/{yL+(L/2)}=z/(−f) ・・・(2)
この式をx,y,zについて解けば、点Pの3次元座標が得られる。実際には、ステレオ光学アダプタと挿入部20の先端部21との双方に設けられる光学系からなる像伝送光学系の効果により、左右2つの像の光線は折り曲げられて右結像面28Rと左結像面28Lの間隔はもっと小さくなるが、ここでは図を簡略にするために像伝送光学系の効果を省いて図示している。
In FIG. 20, equation (1) is established from the straight line QR-OR.
x / xR = {y− (L / 2)} / {yR− (L / 2)} = z / (− f) (1)
Moreover, Formula (2) is materialized from the straight line QL-OL.
x / xL = {y + (L / 2)} / {yL + (L / 2)} = z / (− f) (2)
If this equation is solved for x, y, z, the three-dimensional coordinates of the point P can be obtained. Actually, due to the effect of the image transmission optical system including the optical system provided at both the stereo optical adapter and the
(ステレオ光学アダプタと挿入部20との位置関係による計測精度への影響)
次に、ステレオ光学アダプタと挿入部20との位置関係が計測精度に及ぼす影響を説明する。図67は、ステレオ計測の精度を示すグラフである。いずれのグラフも、チャート画像を用いた計測の精度を示している。具体的には各グラフは、図68に示すチャート画像内の左画像6800および右画像6810の中心付近にある格子点6820(図68(a))について、隣り合う格子点間の距離6830(図68(b))をステレオ計測によって測定した結果に基づいている。各グラフの縦軸は、この結果と実際の格子点間隔との間の誤差を集計し、%単位(絶対値)で表したものである。
(Influence on measurement accuracy due to positional relationship between stereo optical adapter and insertion section 20)
Next, the influence of the positional relationship between the stereo optical adapter and the
また、各グラフの横軸はキャリブレーション時(環境データ生成時)のマスク角度と計測時のマスク角度(それぞれ前述したマスク位置情報に含まれている)との差である。具体的には、環境データ内に保存されたキャリブレーション時のマスク角度を意図的に編集した上で計測を行っており、編集後のマスク角度と編集前のマスク角度との差分が上記のマスク角度の差である。例えば、横軸が0(deg)のときは、計測時において、キャリブレーション時と同じマスク角度に設定したことになる。すなわち、環境データ内のマスク角度を編集することによってステレオ光学アダプタと挿入部20との位置関係を変化させた場合の計測精度を示すのが図67の各グラフである。
The horizontal axis of each graph represents the difference between the mask angle at the time of calibration (when environmental data is generated) and the mask angle at the time of measurement (each included in the mask position information described above). Specifically, the measurement is performed after intentionally editing the calibration mask angle saved in the environment data, and the difference between the edited mask angle and the unedited mask angle is the above mask. It is the difference in angle. For example, when the horizontal axis is 0 (deg), the same mask angle as that used during calibration is set during measurement. That is, each graph of FIG. 67 shows the measurement accuracy when the positional relationship between the stereo optical adapter and the
図67(a)は、所定の内視鏡およびステレオ光学アダプタの組み合わせを使用した場合の計測精度を示している。マスク角度の差が約±1(deg)の範囲内では、計測誤差は3%以内に収まっているのに対して、マスク角度の差が±1(deg)の範囲外では、計測誤差が急激に大きくなり、計測精度が格段に低下することが分かる。図67(b)、(c)は、図67(a)で用いた内視鏡およびステレオ光学アダプタの組み合わせとは異なる組み合わせを使用した場合の計測精度を示している。いずれも、図67(a)が示す傾向と同様の傾向を示していることがわかる。 FIG. 67A shows the measurement accuracy when a combination of a predetermined endoscope and stereo optical adapter is used. When the mask angle difference is within about ± 1 (deg), the measurement error is within 3%, whereas when the mask angle difference is outside the range of ± 1 (deg), the measurement error is abrupt. It can be seen that the measurement accuracy is greatly reduced. 67 (b) and 67 (c) show measurement accuracy when a combination different from the combination of the endoscope and the stereo optical adapter used in FIG. 67 (a) is used. It can be seen that all show the same tendency as the tendency shown in FIG.
上記のようにマスク角度の差が一定範囲を超えると計測精度が急激に低下する理由は、マッチング処理では、図18(c)に示したように、左画像のテンプレート画像領域と右画像のマッチング画像領域が一定の範囲に限られており、マスク角度の差が大きくなると、左画像上の計測点に対応する右画像上のマッチング点が上記の領域から外れてしまい、相関値が高い位置を見つけることができないためであると考えられる。 As described above, when the mask angle difference exceeds a certain range, the measurement accuracy sharply decreases. In the matching process, as shown in FIG. 18C, the template image region of the left image matches the right image. If the image area is limited to a certain range and the mask angle difference is large, the matching point on the right image corresponding to the measurement point on the left image is out of the above area, and the position where the correlation value is high. This is thought to be because it cannot be found.
図67に示す各グラフから、ステレオ光学アダプタと挿入部20との位置関係が計測精度に及ぼす影響が非常に大きいことが分かる。言い換えると、ステレオ光学アダプタと挿入部20との位置関係のずれを検知し、そのずれを補正する技術は、計測精度を維持する上で非常に重要であるといえる。
From the respective graphs shown in FIG. 67, it can be seen that the influence of the positional relationship between the stereo optical adapter and the
(第1の実施形態)
次に、本発明の第1の実施形態を説明する。図21は、本実施形態による計測処理部18の構成を示している。図2に示した構成と同一の構成には同一の符号を付与し、説明を省略する。本実施形態では、内視鏡2が撮像した画像から画像処理によってアライメントマークの形状を抽出するアライメントマーク抽出部18jが設けられている。
(First embodiment)
Next, a first embodiment of the present invention will be described. FIG. 21 shows a configuration of the
アライメントマークは、マスクの所定位置に形成された、特徴的な形状を有するマークである。図22に示すように、マスクの上部および下部に丸型のアライメントマーク2200a,2200bが形成されている。アライメントマーク2200a,2200bは、マスクを貫通する穴であり、ステレオ光学アダプタに入射した光がアライメントマーク2200a,2200bを通過して固体撮像素子2aの撮像面に入射する。
The alignment mark is a mark having a characteristic shape formed at a predetermined position of the mask. As shown in FIG. 22,
本実施形態では、図8に示した処理によって既に環境データが生成されているものとする。以下、本実施形態の計測方法を説明する。図23に示すように、ユーザによって挿入部20の先端部21にステレオ光学アダプタが接続される(ステップS21)。続いて、制御部18aは、ステレオ光学アダプタに対応した環境データを記憶部18fから読み出す(ステップS22)。記憶部18fから読み出された環境データは、制御部18aによって歪補正テーブル演算部18iへ出力される。続いて、計測対象物を被写体とした計測画像の撮像が開始され、画像取得部18bは映像信号処理回路12から画像データを取得する(ステップS23)。画像取得部18bが取得した画像データは、制御部18aによって、適宜、計測点指定部18c、マッチング演算部18d、3次元座標演算部18e、歪補正テーブル演算部18i、およびアライメントマーク抽出部18jへ出力される。
In the present embodiment, it is assumed that environmental data has already been generated by the processing shown in FIG. Hereinafter, the measurement method of this embodiment will be described. As shown in FIG. 23, the stereo optical adapter is connected to the
ユーザによって、ステレオ計測機能の起動指示が入力される(ステップS24)と、計測時のステレオ光学アダプタと挿入部20との位置関係に応じて環境データを補正するキャリブレーションが実行される(ステップS25)。ステップS25の処理内容は後述する。続いて、ステレオ計測が実行される(ステップS26)。ステップS26の処理内容は図13のステップS18の処理内容と同様である。ユーザによって、ステレオ計測機能の終了指示が入力される(ステップS27)と、計測が終了する。
When the user inputs a start instruction for the stereo measurement function (step S24), calibration for correcting environmental data according to the positional relationship between the stereo optical adapter and the
図24はステップS25の処理内容を示している。アライメントマークの形状を抽出する画像処理を行う領域である画像処理領域の位置やサイズの情報は予め記憶部18fに格納されているものとする。制御部18aは記憶部18fから画像処理領域の情報を読み出し、アライメントマーク抽出部18jへ出力する(ステップS251)。本実施形態以降の実施形態では、ステップS251の処理の説明を省略するものとする。アライメントマーク抽出部18jは、画像データに基づく画像のうち画像処理領域の画像からアライメントマークの形状を抽出する(ステップS252)。ステップS252の処理内容は後述する。アライメントマーク抽出部18jが抽出したアライメントマークの情報は、制御部18aによってマスク位置演算部18hへ出力される。
FIG. 24 shows the processing content of step S25. It is assumed that information on the position and size of the image processing area, which is an area for performing image processing for extracting the shape of the alignment mark, is stored in the
マスク位置演算部18hは、アライメントマークの情報に基づいてマスク位置情報を生成する(ステップS253)。ステップS253の処理内容は後述する。マスク位置演算部18hが生成したマスク位置情報は、制御部18aによって歪補正テーブル演算部18iへ出力されると共に環境データの一部として記憶部18fに格納される。上記のように、環境データに含まれるマスク位置情報が、計測時の再度のキャリブレーションにより補正されることになる。
The mask
歪補正テーブル演算部18iは、ステップS253で生成されたマスク位置情報に基づいて歪補正テーブルの再計算を行う(ステップS254)。ステップS254の処理内容は図9のステップS123の処理内容と同様である。歪補正テーブル演算部18iが生成した歪補正テーブルは、制御部18aによって環境データの一部として記憶部18fに格納される。上記のように、環境データに含まれる歪補正テーブルが、計測時の再度のキャリブレーションにより補正されることになる。
The distortion correction
また、従来のキャリブレーションによって生成された環境データを計測時のキャリブレーションによって補正してもよいが、従来のキャリブレーションを行わずに、光学データに含まれる歪補正テーブルを計測時のキャリブレーションによって補正して歪補正を行ってもよい。以降の全ての実施形態においても同様である。 In addition, environmental data generated by conventional calibration may be corrected by calibration at the time of measurement, but the distortion correction table included in the optical data can be corrected by calibration at the time of measurement without performing conventional calibration. You may correct | amend and perform distortion correction. The same applies to all subsequent embodiments.
以下、図25を参照しながら、ステップS252およびステップS253の処理内容を説明する。図25は計測画像を示している。アライメントマーク抽出部18jは、アライメントマークの位置に対応して予め設定された画像処理領域2500a,2500b(図25(a))で2値化やテンプレートマッチング等の画像処理を行い、2つのアライメントマーク2510a,2510bを抽出する。図4に示した計測以前の環境データの生成時における画像処理領域430と比較すると、画像処理領域2500a,2500bは小さくなっているため、画像処理に要する時間を短縮することができる。以上がステップS252の処理内容である。
Hereinafter, the processing contents of steps S252 and S253 will be described with reference to FIG. FIG. 25 shows a measurement image. The alignment
続いて、マスク位置演算部18hは2つのアライメントマーク2510a,2510bの中心点2520a,2520bを求める(図25(b))。続いて、マスク位置演算部18hは、中心点2520a,2520bを通る直線をマスクライン2530とする(図25(c))。さらに、マスク位置演算部18hは、2つのアライメントマーク2510a,2510bの中点をマスク中心2540とする。上記のマスクライン2530の角度およびマスク中心2540の座標がマスク位置情報として記憶部18fに格納される。2つのアライメントマーク2510a,2510bの位置は、実際のマスク中心との位置関係が上記となるように予め設計されている。以上がステップS253の処理内容である。
Subsequently, the mask
次に、本実施形態の変形例を説明する。図26はアライメントマークの他の形状例を示している。図26に示すように、マスクの中央部に十字型のアライメントマーク2600が形成されている。アライメントマーク2600は、マスクを貫通する穴であり、ステレオ光学アダプタに入射した光がアライメントマーク2600を通過して固体撮像素子2aの撮像面に入射する。
Next, a modification of this embodiment will be described. FIG. 26 shows another example of the shape of the alignment mark. As shown in FIG. 26, a
以下、図27を参照しながら、図26に示したアライメントマーク2600に対するステップS252およびステップS253の処理内容を説明する。図27は計測画像を示している。アライメントマーク抽出部18jは、アライメントマークの位置に対応して予め設定された画像処理領域2710(図27(a))で2値化やテンプレートマッチング等の画像処理を行い、アライメントマーク2700を抽出する。図4に示した計測以前の環境データの生成時における画像処理領域430と比較すると、画像処理領域2710は小さくなっているため、画像処理に要する時間を短縮することができる。
Hereinafter, with reference to FIG. 27, the processing contents of steps S252 and S253 for the
続いて、マスク位置演算部18hはアライメントマーク2700の4つの端点2720a,2720b,2720c,2720dを求める(図27(b))。続いて、マスク位置演算部18hは、端点2720a,2720bを通る直線をマスクライン2730とする(図27(c)、図27(d))。さらに、マスク位置演算部18hは、端点2720c,2720dを通る直線(図示せず)とマスクライン2730の交点をマスク中心2740とする。上記のマスクライン2730の角度およびマスク中心2740の座標がマスク位置情報として記憶部18fに格納される。アライメントマーク2700の位置は、実際のマスク中心との位置関係が上記となるように予め設計されている。
Subsequently, the mask
上述したように、本実施形態によれば、計測対象の被写体を撮像したときの映像信号から、マスク位置情報および歪補正テーブルを補正した新たな環境データが生成され、この環境データに基づいて、映像信号に含まれる光学的歪みが補正される。これによって、最初のキャリブレーション後にステレオ光学アダプタと挿入部20との位置関係に変化が生じた場合でも、計測精度の低下を防止することができる。
As described above, according to the present embodiment, new environment data in which the mask position information and the distortion correction table are corrected is generated from the video signal when the subject to be measured is imaged. Based on this environment data, Optical distortion included in the video signal is corrected. Thereby, even when the positional relationship between the stereo optical adapter and the
また、本実施形態によれば、キャリブレーション時に所定の被写体を撮像したときの映像信号のうち、アライメントマークの位置に対応した、従来よりも小さな画像処理領域の画像に対応した映像信号から環境データが生成される。これによって、画像処理に要する時間が短縮されるので、キャリブレーションを高速化することができる。アライメントマークの形状は、本実施形態で説明した形状に限らず、各種の形状とすることが可能である。 Further, according to the present embodiment, the environmental data is obtained from the video signal corresponding to the image of the image processing area smaller than the conventional one corresponding to the position of the alignment mark among the video signals when the predetermined subject is imaged at the time of calibration. Is generated. As a result, the time required for image processing is shortened, so that the calibration can be speeded up. The shape of the alignment mark is not limited to the shape described in the present embodiment, and various shapes can be used.
(第2の実施形態)
次に、本発明の第2の実施形態を説明する。図28は、本実施形態による計測処理部18の構成を示している。図21に示した構成と同一の構成には同一の符号を付与し、説明を省略する。本実施形態では、マスクに対する照明を制御するマスク照明制御部18kが設けられている。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. FIG. 28 shows the configuration of the
図29は、ステレオ光学アダプタを上面から見たときの断面図である。また、図30は、ステレオ光学アダプタを側面から見たときの断面図である。ステレオ光学アダプタの先端部はカバーガラス40で閉塞されている。カバーガラス40とレンズ枠41の内側には、右画像用の対物光学系42aと左画像用の対物光学系42bからなる対物光学系42が配置されている。この対物光学系42にはマスク43が挿入されている。また、対物光学系42a,42bの光学的後方には光学系44a,44bからなる像伝送光学系44が配置されている。
FIG. 29 is a cross-sectional view of the stereo optical adapter as viewed from above. FIG. 30 is a cross-sectional view of the stereo optical adapter as viewed from the side. The front end of the stereo optical adapter is closed with a
また、被写体に照射する照明光を伝送するライトガイドファイバ45が設けられている。図1に示した内視鏡ユニット8に設けられた光源装置からの光は、ライトガイドファイバ45を通してステレオ光学アダプタの先端部から被写体に照射される。この光の一部は、ライトガイドファイバ45から枝分かれしたライトガイドファイバ46を通してマスク43にも照射される。
In addition, a
図31は図30の位置Aにおける断面図であり、図32は図30の位置Bにおける断面図である。また、図33はステレオ光学アダプタの正面図である。図30に示したライトガイドファイバ46を通った光は図31の領域310の位置に照射される。図31は、ステレオ光学アダプタを光学的前方から見た状態を示しており、実際には光はステレオ光学アダプタの光学的後方から照射される。上記の構造により、マスク43の下部を照明することが可能となっている。
31 is a cross-sectional view at position A in FIG. 30, and FIG. 32 is a cross-sectional view at position B in FIG. FIG. 33 is a front view of the stereo optical adapter. Light passing through the
図34に示すように、本実施形態ではマスクの下部に丸型のアライメントマーク3400a,3400bが形成されている。アライメントマーク3400a,3400bは、マスクの表面を鏡面処理することなどにより光反射率が高くなるように形成したものである。上記のライトガイドファイバ46を通して照射された光がアライメントマーク3400a,3400bによって反射され、固体撮像素子2aの撮像面に入射する。このため、撮像した画像ではアライメントマーク3400a,3400bがはっきりと映る。
As shown in FIG. 34, in this embodiment,
以下、本実施形態の計測方法を説明する。図35に示すように、ユーザによって挿入部20の先端部21にステレオ光学アダプタが接続される(ステップS31)。続いて、制御部18aは、ステレオ光学アダプタに対応した環境データを記憶部18fから読み出す(ステップS32)。記憶部18fから読み出された環境データは、制御部18aによって歪補正テーブル演算部18iへ出力される。続いて、マスク照明制御部18kは、照明をONとするための信号を、RS−232C I/F17を介して内視鏡ユニット8へ出力し、内視鏡ユニット8内の光源装置の駆動を開始させる(ステップS33)。
Hereinafter, the measurement method of this embodiment will be described. As shown in FIG. 35, the stereo optical adapter is connected to the
続いて、計測対象物を被写体とした計測画像の撮像が開始され、画像取得部18bは映像信号処理回路12から画像データを取得する(ステップS34)。画像取得部18bが取得した画像データは、制御部18aによって、適宜、計測点指定部18c、マッチング演算部18d、3次元座標演算部18e、歪補正テーブル演算部18i、およびアライメントマーク抽出部18jへ出力される。続いて、マスク照明制御部18kは、照明をOFFとするための信号を、RS−232C I/F17を介して内視鏡ユニット8へ出力し、内視鏡ユニット8内の光源装置の駆動を停止させる(ステップS35)。
Subsequently, imaging of a measurement image using the measurement object as a subject is started, and the
ユーザによって、ステレオ計測機能の起動指示が入力される(ステップS36)と、計測時のステレオ光学アダプタと挿入部20との位置関係に応じて環境データを補正するキャリブレーションが実行される(ステップS37)。ステップS37の処理内容は後述する。続いて、ステレオ計測が実行される(ステップS38)。ステップS38の処理内容は図13のステップS18の処理内容と同様である。ユーザによって、ステレオ計測機能の終了指示が入力される(ステップS39)と、計測が終了する。
When the user inputs a start instruction for the stereo measurement function (step S36), calibration for correcting environment data according to the positional relationship between the stereo optical adapter and the
図36はステップS37の処理内容を示している。アライメントマークの形状を抽出する画像処理を行う領域である画像処理領域の位置やサイズの情報は予め記憶部18fに格納されているものとする。アライメントマーク抽出部18jは、画像データに基づく画像のうち画像処理領域の画像からアライメントマークの形状を抽出する(ステップS371)。ステップS371の処理内容は後述する。アライメントマーク抽出部18jが抽出したアライメントマークの情報は、制御部18aによってマスク位置演算部18hへ出力される。
FIG. 36 shows the processing content of step S37. It is assumed that information on the position and size of the image processing area, which is an area for performing image processing for extracting the shape of the alignment mark, is stored in the
マスク位置演算部18hは、アライメントマークの情報に基づいてマスク位置情報を生成する(ステップS372)。ステップS372の処理内容は後述する。マスク位置演算部18hが生成したマスク位置情報は、制御部18aによって歪補正テーブル演算部18iへ出力されると共に環境データの一部として記憶部18fに格納される。上記のように、環境データに含まれるマスク位置情報が、計測時の再度のキャリブレーションにより補正されることになる。
The mask
歪補正テーブル演算部18iは、ステップS372で生成されたマスク位置情報に基づいて歪補正テーブルの再計算を行う(ステップS373)。ステップS373の処理内容は図24のステップS254の処理内容と同様である。歪補正テーブル演算部18iが生成した歪補正テーブルは、制御部18aによって環境データの一部として記憶部18fに格納される。上記のように、環境データに含まれる歪補正テーブルが、計測時の再度のキャリブレーションにより補正されることになる。
The distortion correction
以下、図37を参照しながら、ステップS371およびステップS372の処理内容を説明する。図37は計測画像を示している。アライメントマーク抽出部18jは、アライメントマークの位置に対応して予め設定された画像処理領域3700(図37(a))で2値化やテンプレートマッチング等の画像処理を行い、2つのアライメントマーク3710a,3710bを抽出する。図4に示した計測以前の環境データの生成時における画像処理領域430と比較すると、画像処理領域3700は小さくなっているため、画像処理に要する時間を短縮することができる。
Hereinafter, the processing contents of steps S371 and S372 will be described with reference to FIG. FIG. 37 shows a measurement image. The alignment
続いて、マスク位置演算部18hは2つのアライメントマーク3710a,3710bの中心点3720a,3720b、およびそれらを結ぶ直線3730を求める(図37(b))。続いて、マスク位置演算部18hは、中心点3720a,3720b間の中点3740を算出すると共に、中心点3720a,3720b間の長さLを算出する(図37(c)。続いて、マスク位置演算部18hは、中点3740を通り、直線3730に垂直な直線をマスクライン3750とする(図37(d))。さらに、マスク位置演算部18hは、中点3740から距離2Lだけ離れたマスクライン3750上の点をマスク中心3760とする。上記のマスクライン3750の角度およびマスク中心3760の座標がマスク位置情報として記憶部18fに格納される。2つのアライメントマーク3710a,3710bの位置は、実際のマスク中心との位置関係が上記となるように予め設計されている。
Subsequently, the mask
上述したように、本実施形態によれば、第1の実施形態と同様に、最初のキャリブレーション後にステレオ光学アダプタと挿入部20との位置関係に変化が生じた場合でも、計測精度の低下を防止することができる。また、本実施形態によれば、キャリブレーション時に所定の被写体を撮像したときの映像信号のうち、アライメントマークの位置に対応した、従来よりも小さな画像処理領域の画像に対応した映像信号から環境データが生成される。これによって、画像処理に要する時間が短縮されるので、キャリブレーションを高速化することができる。
As described above, according to the present embodiment, similarly to the first embodiment, even when the positional relationship between the stereo optical adapter and the
また、アライメントマークに照明光を照射することによって、アライメントマークの形状がはっきりするので、キャリブレーションの精度を向上することができる。さらに、取得できる画像が白画像でなくてもキャリブレーションを行うことができる。 Moreover, since the shape of the alignment mark becomes clear by irradiating the alignment mark with illumination light, the calibration accuracy can be improved. Furthermore, calibration can be performed even if the image that can be acquired is not a white image.
アライメントマークの形状は、本実施形態で説明した形状に限らず、各種の形状とすることが可能である。また、本実施形態では、アライメントマークに照明光を照射し、アライメントマークで反射させる構造を採用しているが、アライメントマークを第1の実施形態と同様の穴として形成し、マスクの光学的前方から照明光を照射する構造を採用してもよい。 The shape of the alignment mark is not limited to the shape described in the present embodiment, and various shapes can be used. In this embodiment, a structure is employed in which the alignment mark is irradiated with illumination light and reflected by the alignment mark. However, the alignment mark is formed as a hole similar to the first embodiment, and the optical front of the mask is formed. Alternatively, a structure for irradiating illumination light may be employed.
(第3の実施形態)
次に、本発明の第3の実施形態を説明する。本実施形態による計測処理部18の構成は、図21に示した構成と同様である。本実施形態では、第2の実施形態と同様にマスクに照明光を照射する構造を採用している。ただし、第2の実施形態では、ライトガイドを通して伝送された照明光をマスクに照射していたが、本実施形態では、ステレオ光学アダプタ内に設けたLED照明によって照明光をマスクに照射する。
(Third embodiment)
Next, a third embodiment of the present invention will be described. The configuration of the
図38は、ステレオ光学アダプタを上面から見たときの断面図である。また、図39は、ステレオ光学アダプタを側面から見たときの断面図である。図29および図30に示した構成と同一の構成には同一の符号を付与し、説明を省略する。 FIG. 38 is a cross-sectional view of the stereo optical adapter as viewed from above. FIG. 39 is a cross-sectional view of the stereo optical adapter as viewed from the side. The same components as those illustrated in FIGS. 29 and 30 are denoted by the same reference numerals, and description thereof is omitted.
本実施形態では、被写体に照明光を照射するLED照明47a,47b、およびマスク43に照明光を照射するLED照明48a,48bが設けられている。ステレオ光学アダプタ内には、LED照明47a,47b,48a,48bと、図1に示した内視鏡ユニット8とを電気的に接続するための配線(図示せず)も設けられている。
In the present embodiment,
図40は図39の位置Cにおける断面図であり、図41は図39の位置Dにおける断面図である。また、図42はステレオ光学アダプタの正面図である。LED照明48a,48bからの光はそれぞれ図40の領域400a,400bの位置に照射される。図41は、ステレオ光学アダプタを光学的前方から見た状態を示しており、実際には光はステレオ光学アダプタの光学的後方から照射される。上記の構造により、マスク43の上部および下部を照明することが可能となっている。
40 is a cross-sectional view at position C in FIG. 39, and FIG. 41 is a cross-sectional view at position D in FIG. FIG. 42 is a front view of the stereo optical adapter. The lights from the
本実施形態ではマスクの上部および下部に2つのアライメントマーク(図示せず)が形成されている。これらのアライメントマークは、マスクの表面を鏡面処理することなどにより光反射率が高くなるように形成したものである。上記のLED照明48a,48bから照射された光がアライメントマークによって反射され、固体撮像素子2aの撮像面に入射する。このため、撮像した画像ではアライメントマークがはっきりと映る。
In this embodiment, two alignment marks (not shown) are formed on the upper and lower portions of the mask. These alignment marks are formed so that the light reflectivity is increased by, for example, mirror-treating the surface of the mask. The light emitted from the
本実施形態の計測方法は第2の実施形態と同様である。また、本実施形態によれば、第2の実施形態と同様の効果を得ることができる。 The measurement method of this embodiment is the same as that of the second embodiment. Moreover, according to this embodiment, the same effect as 2nd Embodiment can be acquired.
(第4の実施形態)
次に、本発明の第4の実施形態を説明する。本実施形態では、マスク上またはマスクに近接して配置した発光体をアライメントマークとして検出する。図43は、ステレオ光学アダプタを側面から見たときの断面図である。図39に示した構成と同一の構成には同一の符号を付与し、説明を省略する。
(Fourth embodiment)
Next, a fourth embodiment of the present invention will be described. In the present embodiment, a light emitter disposed on or close to the mask is detected as an alignment mark. FIG. 43 is a cross-sectional view of the stereo optical adapter as viewed from the side. The same components as those illustrated in FIG. 39 are denoted by the same reference numerals, and description thereof is omitted.
本実施形態では、発光体49a,49bがマスク43と近接して配置されている。発光体49a,49bとして、例えば無機または有機ELシートを使用することが可能である。ステレオ光学アダプタ内には、発光体49a,49bと、図1に示した内視鏡ユニット8とを電気的に接続するための配線(図示せず)も設けられている。
In the present embodiment, the
図44は図43の位置Eにおける断面図である。本実施形態ではマスクの上部および下部に発光体49a,49bが配置されている。発光体49a,49bから照射された光は固体撮像素子2aの撮像面に入射する。このため、図45に示すように、撮像した画像では、発光体49a,49bがマスク43の上部および下部のアライメントマーク4500a,4500bとして検出される。
44 is a cross-sectional view at position E in FIG. In the present embodiment,
本実施形態の計測方法は第2の実施形態と同様である。また、本実施形態によれば、第2の実施形態と同様の効果を得ることができる。 The measurement method of this embodiment is the same as that of the second embodiment. Moreover, according to this embodiment, the same effect as 2nd Embodiment can be acquired.
(第5の実施形態)
次に、本発明の第5の実施形態を説明する。本実施形態による計測処理部18の構成は、図21に示した構成と同様である。図46は、本実施形態における光学系の構成を示している。図46(a)に示すように、ステレオ光学アダプタ51は、視差を有する2つの被写体像を結像するための、プリズム形状を有する対物光学系51aおよびアダプタ側像伝送光学系51bを備えている。対物光学系51aおよびアダプタ側像伝送光学系51bからの光は、挿入部20の先端部21に設けられた内視鏡側像伝送光学系52によって結像され、固体撮像素子2aの撮像面に入射する。このとき、図46(b)に示すように、プリズム形状を有する対物光学系51aによって2つの被写体像が形成され、固体撮像素子2aに入射する。
(Fifth embodiment)
Next, a fifth embodiment of the present invention will be described. The configuration of the
プリズム形状の対物光学系51aを用いることにより、被写体像には光学的歪みが存在しないので、本実施形態ではマスク(すなわち絞り)が必ずしも必要ではない。このため、マスクとは別の手段によってステレオ光学アダプタと挿入部20との位置関係を検出する必要がある。そこで、図46(c)に示すように、対物光学系51aには切り欠き状のアライメントマーク53a,53bが形成されている。本実施形態では、撮像した画像からアライメントマーク53a,53bを検出することによって、ステレオ光学アダプタと挿入部20との位置関係を検出する。
By using the prism-shaped objective
以下、図47を参照しながら、ステレオ光学アダプタと挿入部20との位置関係を検出する方法を説明する。図47は計測画像を示している。アライメントマーク抽出部18jは、アライメントマークの位置に対応して予め設定された画像処理領域4710a,4710b(図47(a))で2値化やテンプレートマッチング等の画像処理を行い、アライメントマーク4700a,4700bを抽出する。図4に示した計測以前の環境データの生成時における画像処理領域430と比較すると、画像処理領域4710a,4710bは小さくなっているため、画像処理に要する時間を短縮することができる。
Hereinafter, a method for detecting the positional relationship between the stereo optical adapter and the
続いて、マスク位置演算部18hはアライメントマーク4700a,4700bの端点4720a,4720bを求め(図47(b))、端点4720a,4720bの中点4730aを求める(図47(c))。同様にして、マスク位置演算部18hは中点4730bを求める(図47(d))。続いて、マスク位置演算部18hは、中点4730a,4730bを通る直線4740を、前述したマスクラインに相当する直線とする。さらに、マスク位置演算部18hは、中点4730a,4730bの中点4750を、前述したマスク中心に相当する点とする。上記の直線4740の角度および点4750の座標が、前述したマスク位置情報に相当する情報として記憶部18fに格納される。アライメントマーク4700a,4700bの位置は、実際のプリズム中心との位置関係が上記となるように予め設計されている。
Subsequently, the mask
本実施形態の計測方法は第2の実施形態と同様である。また、本実施形態によれば、第2の実施形態と同様の効果を得ることができる。 The measurement method of this embodiment is the same as that of the second embodiment. Moreover, according to this embodiment, the same effect as 2nd Embodiment can be acquired.
(第6の実施形態)
次に、本発明の第6の実施形態を説明する。図48は、本実施形態による計測処理部18の構成を示している。図2に示した構成と同一の構成には同一の符号を付与し、説明を省略する。本実施形態では、画像データのダイナミックレンジ(階調)を変換するダイナミックレンジ変換処理部18lが設けられている。
(Sixth embodiment)
Next, a sixth embodiment of the present invention will be described. FIG. 48 shows a configuration of the
以下、本実施形態の計測方法を説明する。図49に示すように、ユーザによって挿入部20の先端部21にステレオ光学アダプタが接続される(ステップS41)。続いて、制御部18aは、ステレオ光学アダプタに対応した環境データを記憶部18fから読み出す(ステップS42)。記憶部18fから読み出された環境データは、制御部18aによって歪補正テーブル演算部18iへ出力される。続いて、計測対象物を被写体とした計測画像の撮像が開始され、画像取得部18bは映像信号処理回路12から画像データを取得する(ステップS43)。画像取得部18bが取得した画像データは、制御部18aによって、適宜、計測点指定部18c、マッチング演算部18d、3次元座標演算部18e、歪補正テーブル演算部18i、およびダイナミックレンジ変換処理部18lへ出力される。
Hereinafter, the measurement method of this embodiment will be described. As shown in FIG. 49, the stereo optical adapter is connected to the
ユーザによって、ステレオ計測機能の起動指示が入力される(ステップS44)と、制御部18aは、変換前の画像の輝度と変換後の画像の輝度の対応関係を示すテーブル(例えばルックアップテーブル)を記憶部18fから読み出してダイナミックレンジ変換処理部18lへ出力する(ステップS45)。記憶部18fには予めこのテーブルが格納されているものとする。ダイナミックレンジ変換処理部18lは、上記のテーブルに基づいてダイナミックレンジ変換処理を実行する(ステップS46)。ステップS46の処理内容は後述する。
When the activation instruction for the stereo measurement function is input by the user (step S44), the
続いて、計測時のステレオ光学アダプタと挿入部20との位置関係に応じて環境データを補正するキャリブレーションが実行される(ステップS47)。ステップS47の処理内容は図23のステップS25の処理内容と同様である。ただし、本実施形態では、アライメントマークではなく、マスク形状抽出部18gが抽出したマスクの形状に基づいて処理が実行される。続いて、ステレオ計測が実行される(ステップS48)。ステップS48の処理内容は図13のステップS18の処理内容と同様である。ユーザによって、ステレオ計測機能の終了指示が入力される(ステップS49)と、計測が終了する。
Subsequently, calibration is performed to correct the environmental data according to the positional relationship between the stereo optical adapter and the
以下、ステップS46の処理内容を説明する。図50は、本実施形態で使用するダイナミックレンジ変換用のテーブルの内容を示している。横軸は変換前の画像(入力画像)の輝度(0〜255)を示し、縦軸は変換後の画像(出力画像)の輝度(0〜255)を示している。低輝度領域はマスク領域と計測領域(低輝度)に分けられている。マスク領域とは、計測画像内に映ったマスクの領域のことであり、ほとんど0に近い輝度で占められている。計測領域(低輝度)とは、計測画像内に映ったマスク領域以外の計測領域のうち、低輝度側に属する領域のことである。ダイナミックレンジ変換処理によって、マスク領域の輝度が引き下げられ、計測領域(低輝度)の輝度が持ち上げられる。低輝度領域以外の高輝度領域は、計測画像内に映った計測領域のうち、高輝度側に属する領域である。 Hereinafter, the processing content of step S46 is demonstrated. FIG. 50 shows the contents of a dynamic range conversion table used in the present embodiment. The horizontal axis represents the luminance (0-255) of the image (input image) before conversion, and the vertical axis represents the luminance (0-255) of the image (output image) after conversion. The low brightness area is divided into a mask area and a measurement area (low brightness). The mask area is an area of the mask reflected in the measurement image, and is almost occupied with a luminance close to zero. The measurement area (low luminance) is an area belonging to the low luminance side among measurement areas other than the mask area shown in the measurement image. By the dynamic range conversion process, the brightness of the mask area is lowered, and the brightness of the measurement area (low brightness) is raised. The high brightness area other than the low brightness area is an area belonging to the high brightness side among the measurement areas shown in the measurement image.
図51(a)はダイナミックレンジ変換処理前の計測画像を示し、図51(b)はダイナミックレンジ変換処理後の計測画像を示している。図51(a)では左画像5100aおよび右画像5100bの背景の輝度は、図50に示した計測領域(低輝度)に属する。このため、ダイナミックレンジ変換処理により、図51(b)に示すように、左画像5100aおよび右画像5100bの背景の輝度が持ち上げられる。この結果、マスク5110と左画像5100aおよび右画像5100bの境界がはっきりする。この計測画像を用いることにより、白画像と同様に、マスクの形状を抽出することが可能となる。
FIG. 51A shows a measurement image before dynamic range conversion processing, and FIG. 51B shows a measurement image after dynamic range conversion processing. In FIG. 51A, the luminance of the background of the
上述したように、本実施形態によれば、第1の実施形態等と同様に、最初のキャリブレーション後にステレオ光学アダプタと挿入部20との位置関係に変化が生じた場合でも、計測精度の低下を防止することができる。また、ダイナミックレンジ変換処理によって、マスクの形状をはっきりさせることが可能となるので、キャリブレーションの精度を向上することができる。さらに、取得できる画像が白画像でなくてもキャリブレーションを実行することができる。さらに、本実施形態は、従来の内視鏡装置に対するソフトウェアの変更のみで実現することができる。
As described above, according to the present embodiment, similarly to the first embodiment and the like, even when the positional relationship between the stereo optical adapter and the
本実施形態では計測画像からマスク形状を抽出しているが、第2〜第5の実施形態と同様に計測画像からアライメントマークを抽出してもよい。 In the present embodiment, the mask shape is extracted from the measurement image, but the alignment mark may be extracted from the measurement image as in the second to fifth embodiments.
(第7の実施形態)
次に、本発明の第7の実施形態を説明する。図52は、本実施形態による計測処理部18の構成を示している。図2に示した構成と同一の構成には同一の符号を付与し、説明を省略する。本実施形態では、複数枚の計測画像(学習用画像)の重ね合わせ処理(合成処理)を実行する重ね合わせ処理部18mが設けられている。
(Seventh embodiment)
Next, a seventh embodiment of the present invention will be described. FIG. 52 shows a configuration of the
以下、本実施形態の計測方法を説明する。図53に示すように、ユーザによって挿入部20の先端部21にステレオ光学アダプタが接続される(ステップS51)。続いて、制御部18aは、ステレオ光学アダプタに対応した環境データを記憶部18fから読み出す(ステップS52)。記憶部18fから読み出された環境データは、制御部18aによって歪補正テーブル演算部18iへ出力される。続いて、計測対象物を被写体とした計測画像の撮像が開始され、画像取得部18bは映像信号処理回路12から画像データを取得する(ステップS53)。制御部18aは、画像取得部18bが取得した画像データを学習用画像データとして記憶部18fに格納する(ステップS54)。
Hereinafter, the measurement method of this embodiment will be described. As shown in FIG. 53, the stereo optical adapter is connected to the
続いて、制御部18aは、計測画像の撮像を終了するか否かを判断する(ステップS55)。このステップS55では、より具体的には、例えば計測画像の重ね合わせ処理に必要な所定枚数を基準として、所定枚数の計測画像を撮像したか否かの判断が行われる。計測画像の撮像を終了しないと判断した場合には、制御部18aはステップS53に処理を移行させる。また、計測画像の撮像を終了すると判断した場合には、制御部18aは、ユーザによるステレオ計測機能の起動指示の入力待ち状態となる。本実施形態では、複数枚の計測画像を取得するが、各計測画像を取得するときに、撮像する被写体の箇所や、アングル、照明条件を変えることがより望ましい。
Subsequently, the
計測画像の撮像が終了した後、ユーザによって、ステレオ計測機能の起動指示が入力される(ステップS56)と、計測時のステレオ光学アダプタと挿入部20との位置関係に応じて環境データを補正するキャリブレーションが実行される(ステップS57)。ステップS57の処理内容は後述する。続いて、ステレオ計測が実行される(ステップS58)。ステップS58の処理内容は図13のステップS18の処理内容と同様である。ユーザによって、ステレオ計測機能の終了指示が入力される(ステップS59)と、計測が終了する。
After the measurement image is captured, when the user inputs a start instruction for the stereo measurement function (step S56), the environmental data is corrected according to the positional relationship between the stereo optical adapter and the
図54はステップS57の処理内容を示している。マスクの形状を抽出する画像処理を行う領域である画像処理領域の位置やサイズの情報は予め記憶部18fに格納されているものとする。制御部18aは、複数の学習用画像データを記憶部18fから読み出して重ね合わせ処理部18mへ出力する(ステップS571)。重ね合わせ処理部18mは、これらの学習用画像データを合成する重ね合わせ処理を実行する(ステップS572)。ステップS572の処理内容は後述する。重ね合わせ処理によって生成された画像データは、制御部18aによって、適宜、計測点指定部18c、マッチング演算部18d、3次元座標演算部18e、マスク形状抽出部18g、および歪補正テーブル演算部18iへ出力される。
FIG. 54 shows the processing content of step S57. It is assumed that information on the position and size of an image processing area that is an area for performing image processing for extracting the shape of the mask is stored in the
マスク形状抽出部18gは、画像データに基づく画像のうち画像処理領域の画像からマスクの形状を抽出する(ステップS573)。マスク形状抽出部18kが抽出したマスク形状の情報は、制御部18aによってマスク位置演算部18hへ出力される。マスク位置演算部18hは、マスク形状の情報に基づいてマスク位置情報を生成する(ステップS574)。ステップS574の処理内容は図24のステップS253の処理内容と同様である。マスク位置演算部18hが生成したマスク位置情報は、制御部18aによって歪補正テーブル演算部18iへ出力されると共に環境データの一部として記憶部18fに格納される。上記のように、環境データに含まれるマスク位置情報が、計測時の再度のキャリブレーションにより補正されることになる。
The mask
歪補正テーブル演算部18iは、ステップS574で生成されたマスク位置情報に基づいて歪補正テーブルの再計算を行う(ステップS575)。ステップS575の処理内容は図24のステップS254の処理内容と同様である。歪補正テーブル演算部18iが生成した歪補正テーブルは、制御部18aによって環境データの一部として記憶部18fに格納される。上記のように、環境データに含まれる歪補正テーブルが、計測時の再度のキャリブレーションにより補正されることになる。
The distortion correction
図55はステップS572の処理内容を示している。学習用画像5500aでは左画像および右画像の左上部で背景が明るく、学習用画像5500bでは、左画像および右画像の右上部で背景が明るく、学習用画像5500cでは、左画像および右画像の下部で背景が明るい。背景が明るい部分では、マスクと左画像および右画像との境界がはっきりしている。一方、背景が暗い部分では、マスクと左画像および右画像との境界がはっきりしない。学習用画像5500a,5500b,5500cのいずれにおいても、マスクと左画像および右画像との境界がはっきりしない部分がある。
FIG. 55 shows the processing content of step S572. The
画像5510は、学習用画像5500a,5500b,5500cを重ね合わせた(合成した)画像である。重ね合わせ処理の際には、いずれかの学習用画像を基準画像として、他の学習用画像から所定の閾値以上の輝度を有する画素のみを取り出し、基準画像の同位置の画素の輝度に対して、取り出した画素の輝度を加算する。また、加算により輝度が飽和した画素は白画素とする。このようにして生成した画像5510では、マスクと左画像および右画像との全体の境界がはっきりしている。この画像5510を用いることにより、白画像と同様に、マスクの形状を抽出することが可能となる。
An
上述したように、本実施形態によれば、第1の実施形態等と同様に、最初のキャリブレーション後にステレオ光学アダプタと挿入部20との位置関係に変化が生じた場合でも、計測精度の低下を防止することができる。また、重ね合わせ処理によって、マスクの形状をはっきりさせることが可能となるので、キャリブレーションの精度を向上することができる。さらに、取得できる画像が白画像でなくてもキャリブレーションを実行することができる。さらに、本実施形態は、従来の内視鏡装置に対するソフトウェアの変更のみで実現することができる。
As described above, according to the present embodiment, similarly to the first embodiment and the like, even when the positional relationship between the stereo optical adapter and the
本実施形態では計測画像からマスク形状を抽出しているが、第2〜第5の実施形態と同様に計測画像からアライメントマークを抽出してもよい。 In the present embodiment, the mask shape is extracted from the measurement image, but the alignment mark may be extracted from the measurement image as in the second to fifth embodiments.
(第8の実施形態)
次に、本発明の第8の実施形態を説明する。図56は、本実施形態による計測処理部18の構成を示している。図2に示した構成と同一の構成には同一の符号を付与し、説明を省略する。本実施形態では、計測画像から、後述するマッチングラインを算出するマッチングライン演算部18nが設けられている。
(Eighth embodiment)
Next, an eighth embodiment of the present invention will be described. FIG. 56 shows a configuration of the
図57を参照しながら、前述した光学データについて再度説明する。光学データには、光学データ生成時の左側光学系5700aおよび右側光学系5700bの歪中心5710a,5710b(図57(a))が含まれている。また、光学データには、光学データ生成時のマスクライン5720(図57(a))の情報がマスク位置情報として含まれている。
The above-described optical data will be described again with reference to FIG. The optical data includes the distortion centers 5710a and 5710b (FIG. 57A) of the left
ここで、本実施形態における第1の仮定および第2の仮定を説明する。左右の光学系とマスクはステレオ光学アダプタ内で固定されているので、ステレオ光学アダプタと挿入部20との位置関係に関わらず、左右の光学系とマスクとの位置関係は一定である。このため、歪中心5710a,5710bを通るセンターライン5730(図57(b))とマスクライン5720が成す角度θ(センターライン5730−マスクライン5720間の角度θ)は常に一定であると考えられる。以上が第1の仮定である。本実施形態では、この角度θの値も光学データに含まれているものとする。
Here, the first assumption and the second assumption in the present embodiment will be described. Since the left and right optical systems and the mask are fixed in the stereo optical adapter, the positional relationship between the left and right optical systems and the mask is constant regardless of the positional relationship between the stereo optical adapter and the
また、ステレオ光学アダプタと挿入部20の先端部21は共にねじ構造を有しており、ステレオ光学アダプタと挿入部20との間に発生する位置ずれは回転方向の位置ずれである。このため、図58に示すマスク中心5800の位置は、ステレオ光学アダプタと挿入部20との位置関係に関わらず、常に一定であると考えられる。以上が第2の仮定である。
Further, both the stereo optical adapter and the
本実施形態における計測方法は、図23に示した、第1の実施形態における計測方法と同様である。ただし、キャリブレーション方法が第1の実施形態とは異なる。 The measurement method in this embodiment is the same as the measurement method in the first embodiment shown in FIG. However, the calibration method is different from that of the first embodiment.
図59は、本実施形態におけるキャリブレーションの内容を示している。制御部18aは計測領域内のサンプル点の座標を記憶部18fから読み出し、マッチング演算部18dおよびマッチングライン演算部18nへ出力する(ステップS601)。サンプル点は、例えば図60(a)に示すサンプル点P1,P2,P3,P4のように左画像内の計測領域の中央付近に設定すればよい。図60(a)ではサンプル点は4つであるが、9点や16点など、サンプル点の数はさらに多くてもよい。上記のサンプル点の座標は予め記憶部18fに格納されているものとする。
FIG. 59 shows the contents of calibration in the present embodiment. The
マッチング演算部18dは、前述したマッチング処理により、左画像内の計測領域のサンプル点P1,P2,P3,P4に対応した右画像内の計測領域のサンプル点P1’,P2’,P3’,P4’の座標を算出する(ステップS602)。マッチング演算部18dによって算出されたサンプル点P1’,P2’,P3’,P4’の座標は、制御部18aによってマッチングライン演算部18nへ出力される。マッチングライン演算部18nは、サンプル点P1,P2,P3,P4,P1’,P2’,P3’,P4’の座標に基づいてマッチングラインを算出する(ステップS603)。
The matching
具体的には、マッチングライン演算部18nは以下の演算を実行する。まず、マッチングライン演算部18nはサンプル点P1,P2,P3,P4の重心P0およびサンプル点P1’,P2’,P3’,P4’の重心P0’の座標を算出する(図60(b))。続いて、マッチングライン演算部18nは、重心P0,P0’を通るマッチングライン6000を算出する(図60(c))。マッチングライン6000の情報は、制御部18aによってマスク位置演算部18hへ出力される。
Specifically, the matching
ここで、本実施形態の第3の仮定を説明する。上述したマッチングラインは、左右の計測領域の対応点同士を結んだ直線であるので、計測時の左右の光学系の歪中心を結んだセンターラインとほぼ同じ角度を有すると考えられる。また、前述した第1の仮定より、センターライン−マスクライン間の角度は常に一定であると考えられる。したがって、光学データ生成時のセンターライン−マスクライン間の角度と計測時のマッチングラインの角度(≒計測時のセンターラインの角度)とから、計測時のマスクラインの角度を求めることができると考えられる。以上が本実施形態の第3の仮定である。 Here, the 3rd assumption of this embodiment is demonstrated. Since the above-described matching line is a straight line connecting corresponding points in the left and right measurement areas, it is considered that the matching line has substantially the same angle as the center line connecting the distortion centers of the left and right optical systems at the time of measurement. Further, from the first assumption described above, it is considered that the angle between the center line and the mask line is always constant. Therefore, the angle of the mask line at the time of measurement can be obtained from the angle between the center line and the mask line at the time of optical data generation and the angle of the matching line at the time of measurement (≈the angle of the center line at the time of measurement). It is done. The above is the third assumption of the present embodiment.
上述したステップS603に続く処理の内容は以下の通りである。制御部18aは、記憶部18fに格納されている光学データからセンターライン−マスクライン間の角度を読み出し、マスク位置演算部18hへ出力する(ステップS604)。また、制御部18aは、記憶部18fに格納されている光学データからマスク中心の座標を読み出し、マスク位置演算部18hへ出力する(ステップS605)。
The contents of the processing following step S603 described above are as follows. The
マスク位置演算部18hは、上記の情報からマスク位置情報を生成する(ステップS606)。具体的には、マスク位置情報は以下のようにして生成される。前述した第3の仮定に基づいて、光学データ生成時のセンターライン−マスクライン間の角度6030(図60(d))と計測時のマッチングライン6000の角度とから、計測時のマスクライン6020の角度が求められる。
The mask
角度6030として、ステップS604で読み出されたセンターライン−マスクライン間の角度が使用される。また、前述した第2の仮定よりマスク中心6040の座標は一定であるため、計測時のマスクライン6020は、マスク中心6040を通ると共に、計測時のマッチングライン6000に対して、角度6030を有する直線として算出される。計測時のマスク中心の座標(=光学データ生成時のマスク中心6040の座標)およびマスクラインの角度を含むマスク位置情報は、制御部18aによって歪補正テーブル演算部18iへ出力されると共に環境データの一部として記憶部18fに格納される。上記のように、環境データに含まれるマスク位置情報が、計測時の再度のキャリブレーションにより補正されることになる。
As the
歪補正テーブル演算部18iは、ステップS563で生成されたマスク位置情報に基づいて歪補正テーブルの再計算を行う(ステップS606)。ステップS606の処理内容は図24のステップS254の処理内容と同様である。歪補正テーブル演算部18iが生成した歪補正テーブルは、制御部18aによって環境データの一部として記憶部18fに格納される。上記のように、環境データに含まれる歪補正テーブルが、計測時の再度のキャリブレーションにより補正されることになる。
The distortion correction
本実施形態におけるマスク位置情報の生成方法は、前述した3つの仮定に基づいているが、本方法が有効であることが、実験的にも確かめられている。図61(a)はタービンブレードの計測結果を示し、図61(b)はパイプ内部の変色部の計測結果を示し、図61(c)はパイプ内部の陥没部の計測結果を示している。 The method for generating mask position information in this embodiment is based on the above three assumptions, but it has been experimentally confirmed that this method is effective. 61 (a) shows the measurement result of the turbine blade, FIG. 61 (b) shows the measurement result of the discolored portion inside the pipe, and FIG. 61 (c) shows the measurement result of the depressed portion inside the pipe.
補正前の計測結果は、ステレオ光学アダプタと挿入部20との位置関係にずれが生じている状態で、環境データを補正せずに計測を行った結果を示している。また、補正後の計測結果は、同じずれが生じている状態で本実施形態の方法により生成した環境データを用いて計測を行った結果を示している。また、理想値の計測結果は、従来の方法により生成した環境データを用いて計測を行った結果を示している。各計測結果は、同じ計測画像上の同じ計測点を指定して2点間距離を算出した結果を示している。全ての計測結果において、補正前と補正後の計測結果が大きく異なっているが、補正後の計測結果は理想値に近づくことが分かる。よって、本実施形態におけるマスク位置情報の補正方法は実際に有効であると言える。
The measurement result before correction shows the result of measurement without correcting the environmental data in a state where the positional relationship between the stereo optical adapter and the
上述したように、本実施形態によれば、第1の実施形態等と同様に、最初のキャリブレーション後にステレオ光学アダプタと挿入部20との位置関係に変化が生じた場合でも、計測精度の低下を防止することができる。また、本実施形態は、従来の内視鏡装置に対するソフトウェアの変更のみで実現することができる。
As described above, according to the present embodiment, similarly to the first embodiment and the like, even when the positional relationship between the stereo optical adapter and the
(第9の実施形態)
次に、本発明の第9の実施形態を説明する。本実施形態は、キャリブレーションを高速化するものであり、上記の各実施形態で説明した計測方法に本実施形態を適用することが可能である。また、従来の計測方法に本実施形態を適用することも可能である。本実施形態による計測処理部18の構成は、例えば図2に示した構成と同様である。
(Ninth embodiment)
Next, a ninth embodiment of the present invention will be described. This embodiment speeds up the calibration, and this embodiment can be applied to the measurement methods described in the above embodiments. Also, the present embodiment can be applied to a conventional measurement method. The configuration of the
以下、本実施形態の計測方法を説明する。図62に示すように、ユーザによって挿入部20の先端部21にステレオ光学アダプタが接続される(ステップS71)。続いて、制御部18aは、ステレオ光学アダプタに対応した環境データを記憶部18fから読み出す(ステップS72)。記憶部18fから読み出された環境データは、制御部18aによってマッチング演算部18dへ出力される。続いて、計測画像の撮像が開始され、画像取得部18bは映像信号処理回路12から画像データを取得する(ステップS73)。画像取得部18bが取得した画像データは、制御部18aによって、適宜、計測点指定部18c、マッチング演算部18d、3次元座標演算部18e、および歪補正テーブル演算部18iへ出力される。
Hereinafter, the measurement method of this embodiment will be described. As shown in FIG. 62, the stereo optical adapter is connected to the
ユーザによって、ステレオ計測機能の起動指示が入力される(ステップS74)と、計測時のステレオ光学アダプタと挿入部20との位置関係に応じて環境データを補正するキャリブレーションが実行される(ステップS75)。ステップS75の処理内容は、前述したキャリブレーションのいずれかと同様である。ただし、ステップS75では歪補正テーブルの再計算は行われない。続いて、ステレオ計測が実行される(ステップS76)。ステップS76においては、歪補正テーブルの再計算も行われる。ユーザによって、ステレオ計測機能の終了指示が入力される(ステップS77)と、計測が終了する。
When the user inputs a start instruction for the stereo measurement function (step S74), calibration for correcting environment data according to the positional relationship between the stereo optical adapter and the
以下、図63を参照しながら、ステップS76の処理内容を説明する。まず、液晶モニタ5またはフェイスマウントディスプレイ6に表示された計測画面上において、リモートコントローラ4あるいはPC31の操作により、ユーザが計測点を指定すると、指定された計測点の情報が計測処理部18に入力される(ステップS761)。
Hereinafter, the processing content of step S76 will be described with reference to FIG. First, when the user designates a measurement point on the measurement screen displayed on the liquid crystal monitor 5 or the
計測点指定部18cは、入力された計測点の情報に基づいて計測点の2次元座標を算出する。計測点指定部18cが算出した計測点の2次元座標は、制御部18aによってマッチング演算部18dおよび歪補正テーブル演算部18iへ出力される。歪補正テーブル演算部18iは、ステップS75で生成されたマスク位置情報に基づいて歪補正テーブルの再計算を行う(ステップS762)。ステップS762の処理内容は後述する。このとき、歪補正テーブルの再計算は、計測領域全体に対してではなく、指定された計測点の周囲の領域に対してのみ行われる。これによって、歪補正テーブルの再計算を行う領域は、後述するテンプレートマッチング処理に必要な分だけに抑えられる。
The measurement
続いて、マッチング演算部18dは、画像取得部18bが取得した画像データと環境データを用いて、前述したマッチング処理により、左画像上の計測点に対応する右画像上のマッチング点の2次元座標を算出する(ステップS763)。ステップS763の処理内容は後述する。計測点およびマッチング点の2次元座標は、制御部18aによって3次元座標演算部18eへ出力される。3次元座標演算部18eは、計測点およびマッチング点の2次元座標に基づいて、計測点に対応した被写体上の位置の3次元座標を算出する(ステップS764)。制御部18aは、3次元座標演算部18eが算出した3次元座標の情報を含むグラフィックデータを生成し、映像信号処理部12へ出力する。これによって、計測画面に計測結果が表示される(ステップS765)。
Subsequently, the matching
以下、図64を参照しながら、ステップS762の処理内容を説明する。図64は計測画像を示している。まず、歪補正テーブル演算部18iは、環境データに含まれる歪補正テーブルに基づいて左歪座標系6400aおよび右歪座標系6400b(図64(a))を設定する。環境データの生成時と計測時とでマスクの位置が異なっているため、左歪座標系6400a上の点P1に対応する右歪座標系6400b上の点は、同じ座標上の点P1’ではないことが分かる。そこで、歪補正テーブル演算部18iは、環境データに含まれるマスク位置情報と、ステップS75で生成したマスク位置情報とに基づいて、歪補正テーブルを再計算する。
Hereinafter, the processing content of step S762 will be described with reference to FIG. FIG. 64 shows a measurement image. First, the distortion correction
図64では、環境データの生成時と比較して、左画像が上方向に移動し、右画像が下方向に移動している。このため、歪補正テーブル演算部18iは、左歪座標系6400aを矢印6410aが示す方向に移動させるように補正すると共に、右歪座標系6400bを矢印6410bが示す方向に移動させるように補正する。このようにして、左歪座標系6420aおよび右歪座標系6420bが算出される。歪補正テーブルの再計算後には、左歪座標系6420a上の点P1に対応する右歪座標系6420b上の点は、同じ座標上の点P1’であることが分かる(図64(b))。また、歪座標系の計算および歪補正テーブルの再計算は、点P1,P1’の周囲の領域6430a,6430bでのみ行われる(図64(c))。
In FIG. 64, the left image has moved upward and the right image has moved downward compared to when environment data is generated. Therefore, the distortion correction
以下、図65および図66を参照しながら、ステップS763の処理内容を説明する。図65(a)は計測画像を示している。左歪座標系6500aの点P1に対応する右歪座標系6500bの点は点P1’であるが、これは仮の対応点である。以下のマッチング処理によって、厳密な真の対応点が求まる。まず、マッチング演算部18dは、環境データに含まれる歪補正テーブルを用いて歪補正処理を実行する。歪補正後の画像では点P1,P1’はそれぞれ点P2,P2’(図65(b))に対応する。また、歪補正によって、左歪座標系6500aおよび右歪座標系6500bはそれぞれ左座標系6510aおよび右座標系6510bに変換される。
Hereinafter, the processing content of step S763 will be described with reference to FIGS. 65 and 66. FIG. 65A shows a measurement image. The point in the right distorted coordinate
マッチング演算部18dは、左座標系6510a上の点P2を含むテンプレート画像領域6520(図65(c))を設定する。続いて、マッチング演算部18dは、テンプレート画像領域6520のテンプレート画像と、テンプレート画像領域6520よりも広いマッチング画像領域6530(図65(c))の画像とのテンプレートマッチング処理(正規化相互相関処理)を実行する。
The matching
このとき、マッチング演算部18dは、上記のテンプレート画像領域のテンプレート画像6600(図66(a))と、マッチング画像領域6610(図66(a))の画像のうちテンプレート画像と同じサイズの画像との間で、画像の位置をずらしながら各位置で相関処理を行う。画像同士の相関が最も高い位置M(図66(a))が真の対応点となる。図66(b)において、点P2’’は、点P2に対応した真の対応点である。マッチング演算部18dは、歪補正の逆変換を行い、点P2’’に対応した点P1’’(図66(c))を求める。この点P1’’は、点P1に対応した真の対応点である。
At this time, the matching
上述したように、本実施形態によれば、第1の実施形態等と同様に、最初のキャリブレーション後にステレオ光学アダプタと挿入部20との位置関係に変化が生じた場合でも、計測精度の低下を防止することができる。また、指定された計測点の周囲の領域(マッチング処理対象の領域)についてのみ歪補正テーブルの再計算を行うことによって、画像処理に要する時間が短縮されるので、キャリブレーションを高速化することができる。
As described above, according to the present embodiment, similarly to the first embodiment and the like, even when the positional relationship between the stereo optical adapter and the
以上、図面を参照して本発明の実施形態について詳述してきたが、具体的な構成は上記の実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。例えば、上記の各実施形態の方法により計測時にキャリブレーションを実行し、環境データを補正する内容を説明したが、光学データから環境データを生成するキャリブレーションに対して、上記の各実施形態の方法を適用してもよい。 As described above, the embodiments of the present invention have been described in detail with reference to the drawings. However, the specific configuration is not limited to the above-described embodiments, and includes design changes and the like without departing from the gist of the present invention. . For example, the content of correcting the environmental data by executing calibration at the time of measurement by the method of each of the above embodiments has been described. However, the method of each of the above embodiments for the calibration for generating the environmental data from the optical data. May be applied.
1・・・計測用内視鏡装置、18・・・計測処理部、18a・・・制御部(読出部)、18b・・・画像取得部、18c・・・計測点指定部、18d・・・マッチング演算部(映像信号補正部)、18e・・・3次元座標演算部(計測処理部)、18f・・・記憶部、18g・・・マスク形状抽出部、18h・・・マスク位置演算部(位置関係検出部)、18i・・・歪補正テーブル演算部(光学特性補正部、環境データ生成部)、18j・・・アライメントマーク抽出部、18k・・・マスク照明制御部、18l・・・ダイナミックレンジ変換処理部(ダイナミックレンジ変換部)、18m・・・重ね合わせ処理部(合成部)、18n・・・マッチングライン演算部
DESCRIPTION OF
Claims (14)
前記撮像信号に基づいて映像信号を生成する映像信号生成部と、
前記映像信号に基づいて前記光学系と前記挿入部との位置関係を検出する位置関係検出部と、
計測対象の被写体を撮像したときに検出された前記位置関係に基づいて、前記光学系の光学特性を示す情報を補正する光学特性補正部と、
補正された前記情報に基づいて、前記計測対象の被写体を撮像したときの前記映像信号に含まれる光学的歪みを補正する映像信号補正部と、
補正後の前記映像信号に基づいて計測処理を行う計測処理部と、
を備えたことを特徴とする内視鏡装置。 An electronic endoscope that generates an imaging signal based on a subject image formed by the optical system, and an insertion unit that can replace the optical system;
A video signal generation unit that generates a video signal based on the imaging signal;
A positional relationship detection unit that detects a positional relationship between the optical system and the insertion unit based on the video signal;
An optical characteristic correction unit that corrects information indicating the optical characteristic of the optical system based on the positional relationship detected when the subject to be measured is imaged;
A video signal correction unit that corrects optical distortion included in the video signal when the subject to be measured is imaged based on the corrected information;
A measurement processing unit that performs measurement processing based on the corrected video signal;
An endoscope apparatus comprising:
前記光学特性補正部は、計測対象の被写体を撮像したときに検出された前記位置関係と、前記光学データに含まれる前記第2の情報とに基づいて、前記光学データに含まれる前記第1の情報を補正する
ことを特徴とする請求項1に記載の内視鏡装置。 A reading unit that reads out the optical data from a recording medium that stores optical data including first information indicating the optical characteristics of the optical system and second information indicating a positional relationship between the optical system and a predetermined insertion unit Further comprising
The optical characteristic correction unit is configured to detect the first information included in the optical data based on the positional relationship detected when the subject to be measured is imaged and the second information included in the optical data. The endoscope apparatus according to claim 1, wherein the information is corrected.
所定の被写体を撮像したときに検出された前記位置関係を示す第3の情報および前記第2の情報に基づいて、前記光学データに含まれる前記第1の情報を補正し、補正後の前記第1の情報と前記第3の情報を含む環境データを生成する環境データ生成部とをさらに備え、
前記光学特性補正部は、計測対象の被写体を撮像したときに検出された前記位置関係と前記第3の情報とに基づいて、前記環境データに含まれる前記第1の情報を補正する
ことを特徴とする請求項1に記載の内視鏡装置。 A reading unit that reads out the optical data from a recording medium that stores optical data including first information indicating the optical characteristics of the optical system and second information indicating a positional relationship between the optical system and a predetermined insertion unit When,
The first information included in the optical data is corrected based on the third information indicating the positional relationship detected when the predetermined subject is imaged and the second information, and the corrected first information is corrected. An environment data generation unit that generates environment data including the information of 1 and the third information;
The optical characteristic correction unit corrects the first information included in the environmental data based on the positional relationship detected when the subject to be measured is imaged and the third information. The endoscope apparatus according to claim 1.
前記光学系は、前記光源からの光を前記マークに照射する構造を有することを特徴とする請求項5に記載の内視鏡装置。 A light source that generates light to be irradiated to the subject through the insertion unit;
The endoscope apparatus according to claim 5, wherein the optical system has a structure for irradiating the mark with light from the light source.
前記位置関係検出部は、前記計測対象の被写体を撮像したときの前記映像信号に基づいて、画像における前記複数の被写体像の位置を検出し、当該位置に基づいて前記位置関係を検出する
ことを特徴とする請求項1〜請求項3のいずれかに記載の内視鏡装置。 The optical system has a structure for forming a plurality of subject images related to the same subject,
The positional relationship detection unit detects positions of the plurality of subject images in an image based on the video signal when the subject to be measured is imaged, and detects the positional relationship based on the positions. The endoscope apparatus according to any one of claims 1 to 3, wherein the endoscope apparatus is characterized.
前記映像信号に基づいて前記光学系と前記挿入部との位置関係を検出する位置関係検出部と、
計測対象の被写体を撮像したときに検出された前記位置関係に基づいて、前記光学系の光学特性を示す情報を補正する光学特性補正部と、
補正された前記情報に基づいて、前記計測対象の被写体を撮像したときの前記映像信号に含まれる光学的歪みを補正する映像信号補正部と、
補正後の前記映像信号に基づいて計測処理を行う計測処理部と、
として機能させるためのプログラム。 An insertion unit having an electronic endoscope for generating an imaging signal based on a subject image formed by an optical system, the video system generating an image signal based on the imaging signal, and an insertion unit capable of exchanging the optical system A computer for controlling an endoscope apparatus comprising:
A positional relationship detection unit that detects a positional relationship between the optical system and the insertion unit based on the video signal;
An optical characteristic correction unit that corrects information indicating the optical characteristic of the optical system based on the positional relationship detected when the subject to be measured is imaged;
A video signal correction unit that corrects optical distortion included in the video signal when the subject to be measured is imaged based on the corrected information;
A measurement processing unit that performs measurement processing based on the corrected video signal;
Program to function as.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008107939A JP5231075B2 (en) | 2008-04-17 | 2008-04-17 | Endoscope apparatus and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008107939A JP5231075B2 (en) | 2008-04-17 | 2008-04-17 | Endoscope apparatus and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009258427A true JP2009258427A (en) | 2009-11-05 |
JP5231075B2 JP5231075B2 (en) | 2013-07-10 |
Family
ID=41385937
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008107939A Active JP5231075B2 (en) | 2008-04-17 | 2008-04-17 | Endoscope apparatus and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5231075B2 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012139446A (en) * | 2011-01-05 | 2012-07-26 | Konica Minolta Advanced Layers Inc | Diagnostic package and probe adjusting jig |
JP2014026217A (en) * | 2012-07-30 | 2014-02-06 | Olympus Corp | Endoscope apparatus and program |
JP2016186662A (en) * | 2016-07-20 | 2016-10-27 | オリンパス株式会社 | Endoscope apparatus and program |
WO2018012278A1 (en) * | 2016-07-12 | 2018-01-18 | オリンパス株式会社 | Endoscope device |
EP3296959A1 (en) * | 2016-09-16 | 2018-03-21 | XION GmbH | Adjusting system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003070719A (en) * | 2001-08-31 | 2003-03-11 | Olympus Optical Co Ltd | Measurement endoscope |
JP2004354257A (en) * | 2003-05-29 | 2004-12-16 | Olympus Corp | Calibration slippage correction device, and stereo camera and stereo camera system equipped with the device |
-
2008
- 2008-04-17 JP JP2008107939A patent/JP5231075B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003070719A (en) * | 2001-08-31 | 2003-03-11 | Olympus Optical Co Ltd | Measurement endoscope |
JP2004354257A (en) * | 2003-05-29 | 2004-12-16 | Olympus Corp | Calibration slippage correction device, and stereo camera and stereo camera system equipped with the device |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012139446A (en) * | 2011-01-05 | 2012-07-26 | Konica Minolta Advanced Layers Inc | Diagnostic package and probe adjusting jig |
JP2014026217A (en) * | 2012-07-30 | 2014-02-06 | Olympus Corp | Endoscope apparatus and program |
WO2018012278A1 (en) * | 2016-07-12 | 2018-01-18 | オリンパス株式会社 | Endoscope device |
US11452432B2 (en) | 2016-07-12 | 2022-09-27 | Olympus Corporation | Endoscope device and method for causing still image file with measurement correction data written and moving image file to be associated with each other |
JP2016186662A (en) * | 2016-07-20 | 2016-10-27 | オリンパス株式会社 | Endoscope apparatus and program |
EP3296959A1 (en) * | 2016-09-16 | 2018-03-21 | XION GmbH | Adjusting system |
US11115643B2 (en) | 2016-09-16 | 2021-09-07 | Xion Gmbh | Alignment system |
Also Published As
Publication number | Publication date |
---|---|
JP5231075B2 (en) | 2013-07-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6692440B2 (en) | Endoscope system | |
JP4811272B2 (en) | Image processing apparatus and image processing method for performing three-dimensional measurement | |
JP5231075B2 (en) | Endoscope apparatus and program | |
US8272746B2 (en) | Projection display apparatus and display method | |
RU2560996C2 (en) | Measuring method based on structuring light | |
JP7289653B2 (en) | Control device, endoscope imaging device, control method, program and endoscope system | |
WO2018051679A1 (en) | Measurement assistance device, endoscope system, processor for endoscope system, and measurement assistance method | |
JP6104493B1 (en) | Imaging system | |
JP2004049638A (en) | Endoscope apparatus | |
JP2010050542A (en) | Projection display apparatus, and display method | |
JP2011069965A (en) | Image capturing apparatus, image display method, and recording medium with image display program recorded thereon | |
US9826884B2 (en) | Image processing device for correcting captured image based on extracted irregularity information and enhancement level, information storage device, and image processing method | |
JP6644899B2 (en) | Measurement support device, endoscope system, and processor of endoscope system | |
US20190320886A1 (en) | Endoscope apparatus | |
JP6956853B2 (en) | Diagnostic support device, diagnostic support program, and diagnostic support method | |
JP2007312290A (en) | Observation unit | |
CN110461204B (en) | Measurement support device, endoscope system, and processor | |
US20060176321A1 (en) | Endoscope apparatus | |
CN113168699A (en) | Computer program, information processing method, and processor for endoscope | |
US20060178561A1 (en) | Endoscope apparatus | |
JP2010223676A (en) | Observation device | |
JP2005348870A (en) | Measurement endoscope | |
JP7016681B2 (en) | Endoscope system | |
JP4674093B2 (en) | Endoscope apparatus and program | |
WO2019203006A1 (en) | Endoscope device, endoscope processor device, and endoscope image display method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110208 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120316 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20121030 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121211 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20130130 Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130130 |
|
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: 20130312 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130321 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160329 Year of fee payment: 3 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |