JP5791989B2 - Endoscope apparatus and program - Google Patents
Endoscope apparatus and program Download PDFInfo
- Publication number
- JP5791989B2 JP5791989B2 JP2011163107A JP2011163107A JP5791989B2 JP 5791989 B2 JP5791989 B2 JP 5791989B2 JP 2011163107 A JP2011163107 A JP 2011163107A JP 2011163107 A JP2011163107 A JP 2011163107A JP 5791989 B2 JP5791989 B2 JP 5791989B2
- Authority
- JP
- Japan
- Prior art keywords
- measurement
- image
- variation
- positions
- estimated value
- 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.)
- Active
Links
Images
Description
本発明は、計測機能を有する内視鏡装置に関する。また、本発明は、内視鏡装置における計測機能をコンピュータ上で実現するためのプログラムにも関する。 The present invention relates to an endoscope apparatus having a measurement function. The present invention also relates to a program for realizing a measurement function in an endoscope apparatus on a computer.
近年、ボイラー、タービン、エンジン、化学プラントなどの検査において、内部の傷や腐食を観察するのに工業用内視鏡が広く用いられている。工業用内視鏡の例として、内視鏡の先端に2個の光学系を設け、三角測量の原理を利用したステレオ計測により3次元計測を実現した計測内視鏡装置(例えば特許文献1参照)がある。検査で検査対象物の内部に傷などの不具合箇所を発見した際に、このような計測内視鏡装置を用いて傷の大きさ等を計測することで、検査対象物の分解・修理の必要性を判断することができる。また、ステレオ計測以外にも、先端にパターン光を投影する手段を設け、被写体に映ったパターンを解析して3次元計測を行う装置も用いられている。 In recent years, industrial endoscopes have been widely used to observe internal scratches and corrosion in inspection of boilers, turbines, engines, chemical plants, and the like. As an example of an industrial endoscope, a measurement endoscope apparatus that provides two optical systems at the tip of an endoscope and realizes three-dimensional measurement by stereo measurement using the principle of triangulation (see, for example, Patent Document 1) ) When a defect such as a scratch is found inside the inspection object during inspection, it is necessary to disassemble and repair the inspection object by measuring the size of the wound using such a measurement endoscope device. Sex can be judged. In addition to stereo measurement, there is also used an apparatus that provides a means for projecting pattern light at the tip and analyzes a pattern reflected on a subject to perform three-dimensional measurement.
一般的に、3次元計測の計測値(測定値)の不確かさは、被写体との距離(以下、物体距離という)が近いほど小さく、物体距離が遠いほど大きくなる性質がある。ここで、不確かさとは、計測値からどの程度の範囲内に真の値があるかを示す尺度である。したがって、精度よく3次元計測を行うためには内視鏡の先端を被写体にできるだけ近づける必要がある。しかし、ユーザが内視鏡の画像を見るだけで、内視鏡が被写体に十分近づいているかどうかを判断することは困難だった。このため、特許文献2,3では、被写体を観察しながら物体距離をユーザに知らせることができる計測内視鏡装置が開示されている。
In general, the uncertainty of the measurement value (measurement value) of the three-dimensional measurement has a property that the smaller the distance from the subject (hereinafter referred to as the object distance), the smaller the uncertainty, and the greater the object distance, the larger the uncertainty. Here, the uncertainty is a scale indicating how much the true value is within the measured value. Therefore, in order to perform three-dimensional measurement with high accuracy, it is necessary to bring the tip of the endoscope as close as possible to the subject. However, it is difficult for the user to determine whether or not the endoscope is sufficiently close to the subject simply by looking at the image of the endoscope. For this reason,
しかし、ユーザが観察中に物体距離を知ることができても、物体距離に応じた不確かさを推定することは難しい。なぜなら、不確かさは物体距離だけで決まるわけではないからである。ステレオ計測では被写体の画像のコントラストが十分でない場合にはマッチング(一方の光学系を通した光に基づく画像における被写体の位置に対応する、他方の光学系を通した光に基づく画像における被写体の位置を検出する処理)が不正確となり、不確かさが大きくなる。パターン光を投影する方式では、表面の拡散反射率が小さいと、被写体に映るパターンの画質が低下し、不確かさが大きくなる。したがって、物体距離は、不確かさを推定する目安になるものの、ユーザが希望する精度が得られるかどうかが判然としない問題があった。 However, even if the user can know the object distance during observation, it is difficult to estimate the uncertainty according to the object distance. This is because uncertainty is not determined only by the object distance. When the contrast of the subject image is not sufficient in stereo measurement, matching (the position of the subject in the image based on the light through the other optical system, corresponding to the position of the subject in the image based on the light through one optical system) ) Is inaccurate and the uncertainty is increased. In the method of projecting pattern light, if the diffuse reflectance of the surface is small, the image quality of the pattern reflected on the subject is lowered and the uncertainty is increased. Therefore, although the object distance is a standard for estimating the uncertainty, there is a problem that it is not clear whether or not the accuracy desired by the user can be obtained.
本発明は、上述した課題に鑑みてなされたものであって、計測値の精度をユーザに知らせることができる内視鏡装置およびプログラムを提供することを目的とする。 The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an endoscope apparatus and program capable of notifying the user of the accuracy of measurement values.
本発明は、上記の課題を解決するためになされたもので、被写体を撮像して画像データを生成する撮像部と、入力装置を介して入力される指示に基づいて、前記画像データに基づく画像における計測位置を指定する指定部と、前記計測位置に対応する3次元座標を計算する第1の計算部と、前記計測位置に対応する3次元座標に基づいて前記被写体のサイズを計測する計測部と、前記画像における複数の位置のそれぞれに対応する3次元座標のばらつきの推定値を計算し、前記3次元座標のばらつきの推定値に基づいて、前記複数の位置のそれぞれについて、前記被写体のサイズを計測した場合の計測値のばらつきの推定値を計算する第2の計算部と、前記計測値のばらつきの推定値に基づいて、前記計測値のばらつきを示す情報を表示する表示部と、を備え、前記第2の計算部は、前記複数の位置のそれぞれを基準位置とする複数の領域を設定し、前記領域内で前記基準位置を基準とする他の位置の3次元座標に基づいて、前記被写体の表面を近似する平面を計算し、前記領域内で前記基準位置を基準とする他の位置と前記平面との距離のばらつきから前記領域内の前記基準位置の3次元座標のばらつきの推定値を計算することを特徴とする内視鏡装置である。 The present invention has been made in order to solve the above-described problem, and an image based on the image data based on an imaging unit that captures an image of the subject and generates image data and an instruction input via the input device. A designating unit for designating a measurement position, a first calculation unit for calculating three-dimensional coordinates corresponding to the measurement position, and a measurement unit for measuring the size of the subject based on the three-dimensional coordinates corresponding to the measurement position And an estimated value of variation in three-dimensional coordinates corresponding to each of the plurality of positions in the image, and the size of the subject for each of the plurality of positions based on the estimated value of variation in the three-dimensional coordinates. A second calculation unit that calculates an estimated value of the measured value variation when the measurement value is measured, and information indicating the measured value variation is displayed based on the estimated value of the measured value variation It includes a radical 113, a second calculating unit, each of the plurality of positions to set a plurality of areas as a reference position, 3-dimensional other locations with respect to the reference position in the region Based on the coordinates, a plane that approximates the surface of the subject is calculated, and the three-dimensional of the reference position in the region is calculated from the variation in the distance between the other position based on the reference position and the plane in the region. An endoscope apparatus characterized by calculating an estimated value of variation in coordinates .
また、本発明の内視鏡装置において、前記表示部は、前記複数の位置のそれぞれについての前記計測値のばらつきの推定値に基づく表示形態で前記画像を表示することを特徴とする。 In the endoscope apparatus according to the present invention, the display unit displays the image in a display form based on an estimated value of variation in the measurement values for each of the plurality of positions.
また、本発明の内視鏡装置において、前記表示部は、前記複数の位置のそれぞれについての前記計測値のばらつきの推定値と、入力装置を介して入力される基準値とに基づく表示形態で前記画像を表示することを特徴とする。 Further, in the endoscope apparatus according to the present invention, the display unit has a display form based on an estimated value of the variation of the measurement value for each of the plurality of positions and a reference value input via the input device. The image is displayed.
また、本発明の内視鏡装置において、前記表示形態は色であることを特徴とする。 In the endoscope apparatus of the present invention, the display form is a color.
また、本発明は、入力装置を介して入力される指示に基づいて、被写体の画像データに基づく画像における計測位置を指定する指定部と、前記計測位置に対応する3次元座標を計算する第1の計算部と、前記計測位置に対応する3次元座標に基づいて前記被写体のサイズを計測する計測部と、前記画像における複数の位置のそれぞれに対応する3次元座標のばらつきの推定値を計算し、前記3次元座標のばらつきの推定値に基づいて、前記複数の位置のそれぞれについて、前記被写体のサイズを計測した場合の計測値のばらつきの推定値を計算する第2の計算部と、前記計測値のばらつきの推定値に基づいて、前記計測値のばらつきを示す情報を表示する表示部と、としてコンピュータを機能させるためのプログラムであって、前記第2の計算部は、前記複数の位置のそれぞれを基準位置とする複数の領域を設定し、前記領域内で前記基準位置を基準とする他の位置の3次元座標に基づいて、前記被写体の表面を近似する平面を計算し、前記領域内で前記基準位置を基準とする他の位置と前記平面との距離のばらつきから前記領域内の前記基準位置の3次元座標のばらつきの推定値を計算するプログラムである。 According to the present invention, a designation unit that designates a measurement position in an image based on image data of a subject based on an instruction input via an input device, and a first unit that calculates a three-dimensional coordinate corresponding to the measurement position. A calculation unit that calculates the size of the subject based on the three-dimensional coordinates corresponding to the measurement position, and an estimated value of variation in the three-dimensional coordinates corresponding to each of the plurality of positions in the image. A second calculation unit that calculates an estimated value of the variation of the measured value when the size of the subject is measured for each of the plurality of positions based on the estimated value of the variation of the three-dimensional coordinates; and the measurement based on the estimated value of the variation values, a program for causing a computer to function as a display unit, for displaying information indicating the variation of the measured value, said second meter The unit sets a plurality of regions with the plurality of positions as reference positions, and approximates the surface of the subject based on the three-dimensional coordinates of other positions with the reference position as a reference within the region. A program for calculating a plane and calculating an estimated value of a variation in three-dimensional coordinates of the reference position in the region from a variation in distance between the plane and another position based on the reference position in the region. .
本発明によれば、画像における複数の位置のそれぞれについて、被写体のサイズを計測した場合の計測値のばらつきの推定値を計算し、この計測値のばらつきの推定値に基づいて、計測値のばらつきを示す情報を表示することによって、計測値の精度をユーザに知らせることができる。 According to the present invention, for each of a plurality of positions in the image, an estimated value variation of the measured value when the size of the subject is measured is calculated, and based on the estimated value of the measured value variation, the measured value variation By displaying the information indicating, the accuracy of the measurement value can be notified to the user.
以下、図面を参照し、本発明の実施形態を説明する。図1は、本発明の一実施形態による内視鏡装置の全体構成を示している。図1に示すように、内視鏡装置1は、細長な挿入部20を有する内視鏡2と、この内視鏡2の挿入部20を収納する収納部を備えた制御装置であるコントロールユニット3と、装置全体の各種動作制御を行う際に必要な操作を行うためのリモートコントローラ4と、内視鏡画像や操作制御内容(例えば処理メニュー)等の表示を行う表示装置であるLCD5(液晶モニタ)とを含んで構成されている。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows an overall configuration of an endoscope apparatus according to an embodiment of the present invention. As shown in FIG. 1, an
挿入部20は硬質な先端部21と、柔軟性を有する可撓管部と(例えば上下左右に湾曲可能な湾曲部22(図2))を連設して構成されている。先端部21には、観察視野を2つ有するステレオ光学アダプタ7a,7b、あるいは観察視野が1つの通常観察光学アダプタ7c等、各種光学アダプタが着脱自在になっている。
The
図2に示すように、コントロールユニット3内には、内視鏡ユニット8、CCU9(カメラコントロールユニット)、および制御ユニット10が設けられており、挿入部20の基端部は内視鏡ユニット8に接続されている。内視鏡ユニット8は、観察時に必要な照明光を供給する光源装置(不図示)と、挿入部20を構成する湾曲部22を湾曲させる湾曲装置(不図示)とを備えて構成されている。
As shown in FIG. 2, an
挿入部20の先端部21には固体撮像素子2a(図4参照)が内蔵されている。固体撮像素子2aは、被写体を撮像して撮像信号を生成する。すなわち、固体撮像素子2aは、光学アダプタを介して結像された被写体像を光電変換し、撮像信号を生成する。CCU9には、固体撮像素子2aから出力された撮像信号が入力される。この撮像信号は、CCU9内で画像データに変換されて、制御ユニット10へ供給される。
A solid-
制御ユニット10内には、音声信号処理回路11、映像信号が入力される画像処理回路12、ROM13、RAM14、PCカードI/F15(PCカードインターフェイス)、USB I/F16(USBインターフェイス)、RS−232C I/F17(RS−232Cインターフェイス)、およびCPU18が設けられている。
In the
RS−232C I/F17には、CCU9および内視鏡ユニット8が接続されると共に、これらCCU9や内視鏡ユニット8等の制御および動作指示を行うリモートコントローラ4が接続されている。ユーザがリモートコントローラ4を操作すると、その操作内容に基づいて、CCU9および内視鏡ユニット8を動作制御する際に必要な通信が行われる。
The RS-232C I / F 17 is connected to the CCU 9 and the
USB I/F16は、コントロールユニット3とパーソナルコンピュータ31とを電気的に接続するためのインターフェイスである。このUSB I/F16を介してコントロールユニット3とパーソナルコンピュータ31とを接続することによって、パーソナルコンピュータ31側で内視鏡画像の表示指示や、計測時における画像処理等の各種の指示制御を行うことが可能になると共に、コントロールユニット3とパーソナルコンピュータ31との間での各種の処理に必要な制御情報やデータ等の入出力を行うことが可能になる。
The USB I / F 16 is an interface for electrically connecting the
また、PCカードI/F15には、PCMCIAメモリカード32やフラッシュメモリカード33等の記憶媒体である、いわゆるメモリカードが自由に着脱されるようになっている。メモリカードをPCカードI/F15に装着することにより、CPU18による制御によって、このメモリカードに記憶されている制御処理情報や画像情報等のデータのコントロールユニット3への取り込み、あるいは制御処理情報や画像情報等のデータのメモリカードへの記録を行うことが可能になる。
Further, a so-called memory card, which is a storage medium such as the PCMCIA
画像処理回路12は、内視鏡2で撮像した被写体の画像と、グラフィックによる操作メニューや各種GUI部品(カーソル等)とを合成した合成画像を表示するため、操作メニューや各種GUI部品に基づくグラフィックデータと、CCU9からの画像データとを合成する処理や、LCD5の画面上に表示するのに必要な画像処理等を行い、処理後のデータをLCD5に供給する。
The
計測時には先端部21にステレオ光学アダプタが装着されるため、画像処理回路12からの画像データに基づく画像には、計測対象である同一被写体に関する複数の被写体像が含まれる。本実施形態では、一例として、左右の一対の被写体像が含まれるものとする。
Since the stereo optical adapter is attached to the
音声信号処理回路11には、マイク34によって集音されて生成された、メモリカード等の記憶媒体に記録する音声信号、メモリカード等の記憶媒体の再生によって得られた音声信号、あるいはCPU18によって生成された音声信号が供給される。この音声信号処理回路11は、供給された音声信号を再生するのに必要な増幅処理等の処理を施してスピーカ35に出力する。このことによって、スピーカ35から音声が出力される。
In the audio
CPU18は、ROM13に格納されているプログラムを実行することによって、目的に応じた処理を行うように各種回路部等を制御して、システム全体の動作制御を行う。RAM14は、CPU18によって、データの一時格納用の作業領域として使用される。
The
図3は、画像処理回路12の構成を示している。画像処理回路12は、3次元座標計算部12a、計測部12b、不確かさ推定部12c、および画像合成部12dを有する。
FIG. 3 shows the configuration of the
3次元座標計算部12aは、画像処理回路12に入力される画像データに基づく画像上で指定された位置に対応する3次元座標を計算する。3次元座標を計算する位置は、画像内でユーザが指定する計測位置(計測点)、および画像内の予め設定されている所定位置である。ユーザが指定する計測点の3次元座標は、被写体の3次元形状のサイズ(二点間距離や面積等)を求めるために使用される。所定位置の3次元座標は、被写体の計測を行った場合の計測値自体の不確かさを求めるために使用される。この不確かさは、被写体の計測を行った場合の計測値のばらつきの推定値に相当する。
The three-dimensional coordinate
計測部12bは、3次元座標計算部12aが計算した計測点の3次元座標に基づいて、被写体の3次元形状のサイズ(計測値)を計算する。不確かさ推定部12cは、3次元座標計算部12aが計算した画像内の所定位置の3次元座標に基づいて、その3次元座標のばらつきの推定値を計算する。また、不確かさ推定部12cは、計算した3次元座標のばらつきの推定値に基づいて、被写体の計測を行った場合の計測値自体の不確かさを計算する。計測結果の精度を間接的に示す物体距離のような指標ではなく、計測値自体の不確かさを推定し、ユーザに通知することによって、計測値のより正確な精度をユーザに知らせることができる。
The
画像合成部12dは、CCU9から入力される画像データあるいはCPU18によってメモリカード等から読み出された画像データに対して、計測部12bが計算した計測値や不確かさ推定部12cが計算した不確かさを表示するための情報を合成する処理を行い、処理後の画像データをLCD5へ出力する。不確かさに関しては、ユーザが希望する精度(これを不確かさで定義した値を基準不確かさとする)で計測を行うことができるかどうかを画像から判断できるようにするため、画像合成部12dは、不確かさが基準不確かさよりも大きい領域と小さい領域とで画像の表示形態を変える。本実施形態の例では、LCD5に表示される画像において、不確かさが基準不確かさよりも大きい領域と小さい領域とが異なる色で表示される。
The
上記の構成を有する画像処理回路12には、CPU18から計測点および基準不確かさの情報が入力される。CPU18は、ユーザが入力装置として使用するリモートコントローラ4からの信号に基づいて照準の移動指示を検出し、移動後の照準の画像上の位置を計算する。また、ユーザがリモートコントローラ4を介して計測点の指定指示(確定指示)を入力した場合、CPU18は、計算した照準の位置を計測点の位置として指定(認識)し、指定した計測点の位置情報(画素位置)を画像処理回路12へ出力する。また、ユーザがリモートコントローラ4を介して基準不確かさの情報を入力した場合、CPU18はその情報を画像処理回路12へ出力する。
Information on measurement points and reference uncertainties is input from the
図4および図5は、本実施形態の内視鏡装置1で用いられる光学アダプタの1つであるステレオ光学アダプタ7aの一例の構成を示している。図4および図5に示すように、直視型のステレオ光学アダプタ7aの先端面には、一対の照明レンズ51,52と2つの対物レンズ系53,54とが設けられており、図5に示すように、固定リング50の雌ねじ50aを、先端部21に形成されている雄ねじ21aに螺合することによって一体的に固定されるようになっている。
4 and 5 show a configuration of an example of a stereo
図5に示すように、2つの対物レンズ系53,54により、先端部21内に配設された固体撮像素子2aの撮像面上に2つの光学像が結像される。そして、この固体撮像素子2aで光電変換された撮像信号は、電気的に接続された信号線2bおよび内視鏡ユニット8を介してCCU9に供給されて画像データに変換され、その後、画像処理回路12に供給される。
As shown in FIG. 5, two optical images are formed on the imaging surface of the solid-
次に、図6を参照し、ステレオ計測による3次元座標の求め方を説明する。3次元座標計算部12aは、左側および右側の光学系で撮像された左画像・右画像を用いて、三角測量の方法により、画像上の点60の3次元座標(X,Y,Z)を計算する。まず、3次元座標計算部12aは、例えば左画像上の点61の位置に対応した右画像上の点62の位置を画像のパターンマッチングにより計算する。点61は、ユーザが指定した計測点、または計測値自体の不確かさを計算するための所定位置の点である。
Next, with reference to FIG. 6, how to obtain the three-dimensional coordinates by stereo measurement will be described. The three-dimensional coordinate
続いて、3次元座標計算部12aは、点60の3次元座標(X,Y,Z)を以下の(A)式〜(C)式により計算する。ただし、歪み補正が施された左右の画像上の点61、点62の座標をそれぞれ(XL,YL)、(XR,YR)とし、左側と右側の光学中心63,64の距離をDとし、焦点距離をFとし、t=D/(XL−XR)とする。
X=t×XR+D/2 ・・・(A)
Y=t×YR ・・・(B)
Z=t×F ・・・(C)
Subsequently, the three-dimensional coordinate
X = t × X R + D / 2 (A)
Y = t × Y R (B)
Z = t × F (C)
いくつかの計測点の3次元座標を求めることによって、2点間の距離、2点を結ぶ線と1点の距離、面積、深さ、表面形状等の様々な計測を行うことが可能である。また、左側の光学中心63、または右側の光学中心64から被写体までの距離(物体距離)を求めることも可能となる。上記のステレオ計測を行うためには、先端部21とステレオ光学アダプタを含む光学系の特性を示す光学データが必要である。なお、光学データの詳細は、例えば特開2004−49638号公報に記載されているので、その説明を省略する。
By obtaining the three-dimensional coordinates of several measurement points, it is possible to perform various measurements such as the distance between two points, the distance between two points and the distance between one point, area, depth, and surface shape. . It is also possible to obtain the distance (object distance) from the left
上記では、ステレオ計測により3次元座標を計算しているが、被写体にパターン光を投影して撮像したパターン画像を解析することによって3次元座標を計算することも可能である。 In the above description, three-dimensional coordinates are calculated by stereo measurement. However, it is also possible to calculate three-dimensional coordinates by analyzing a pattern image captured by projecting pattern light onto a subject.
次に、本実施形態における計測の手順を説明する。まず、ユーザが希望する精度で計測を行うことができるかどうかをユーザに通知するため、内視鏡装置は計測値の不確かさを推定し、推定した不確かさの情報を含む不確かさ推定画像を表示する。図7は不確かさの推定と不確かさ推定画像の表示の手順を示している。図7に示す処理に先立って、ユーザが希望する精度に対応する基準不確かさ(uとする)が予め入力されているものとする。 Next, the measurement procedure in this embodiment will be described. First, in order to notify the user whether or not the measurement can be performed with the accuracy desired by the user, the endoscope apparatus estimates the uncertainty of the measurement value, and generates an uncertainty estimation image including information on the estimated uncertainty. indicate. FIG. 7 shows a procedure for estimation of uncertainty and display of an uncertainty estimation image. Prior to the processing shown in FIG. 7, it is assumed that a reference uncertainty (u) corresponding to the accuracy desired by the user is input in advance.
まず、CCU9からの画像データあるいはCPU18によってメモリカード等から読み出された画像データが画像処理回路12に入力される(ステップS100)。続いて、画像処理回路12は、入力された画像データに基づく画像内の画素毎に3次元座標のばらつきの推定値を計算し、さらに計測値のばらつきの推定値である不確かさを画素毎に計算する(ステップS110)。
First, image data from the CCU 9 or image data read from a memory card or the like by the
以下ではステップS110の詳細を説明する。まず、画像処理回路12は、入力された画像データに基づく画像の所定領域(例えば画像全体の領域あるいは予め設定された一部の領域)の画素毎に3次元座標のばらつきの推定値を計算する。具体的には、画像処理回路12は以下のようにして3次元座標のばらつきの推定値を計算する。図8に示すように、基準画素(基準位置)となる画素P(x,y)とその周囲の8画素を含む矩形の領域Bにおいて、領域B内の各画素をPij(x+i,y+j)∈B、−1≦i,j≦1とする。領域Bは小さいので領域Bに対応する被写体表面の範囲も小さく、領域B内では被写体表面の形状を平面で近似しても構わない。被写体表面を近似する平面を平面Cとする。
Details of step S110 will be described below. First, the
3次元座標計算部12aは、領域B内の各画素の位置で3次元座標を計算する。不確かさ推定部12cは、3次元座標計算部12aが計算した各画素の3次元座標から平面Cを計算する。画素Pijの位置で計算した3次元座標をQij(Xij,Yij,Zij)、平面Cの方程式をaX+bY+cZ+d=0とすると、3次元座標計算部12aは、以下の(1)式で示されるeを最小化する係数a,b,c,dを最小自乗法で計算することで、平面Cを近似する。
The three-dimensional coordinate
画素Pの位置で3次元座標を計算したときのばらつきは、点Qijから平面Cまでの距離のばらつきから求められる。点Qijから平面Cまでの距離はX方向、Y方向、Z方向の成分で求められるが、これらのばらつきは一般的には異なるので、不確かさ推定部12cは各方向のばらつきを次のように別々に計算する。すなわち、点Qijから平面Cに下ろした垂線の方向ベクトルをnij=(nijx,nijy,nijz)とし、nijx,nijy,nijzのそれぞれの標準偏差をσX(P),σY(P),σZ(P)とする。不確かさ推定部12cは、これら3つの標準偏差を計算し、画素Pに対応する3次元座標のばらつきの推定値とする。
The variation when the three-dimensional coordinate is calculated at the position of the pixel P is obtained from the variation in the distance from the point Q ij to the plane C. The distance from the point Q ij to the plane C is obtained by components in the X direction, the Y direction, and the Z direction. However, since these variations are generally different, the
上記の計算は、画像の所定領域の画素毎に行われる。つまり、3次元座標計算部12aは画像の所定領域の画素毎にその画素を基準位置とする領域Bを設定し、領域B内の各画素の位置で3次元座標を計算する。不確かさ推定部12cは画像の所定領域の画素毎に、その画素を基準位置とする領域B内の各画素の3次元座標に基づいて上記3つの標準偏差を計算し、3次元座標のばらつきの推定値とする。
The above calculation is performed for each pixel in a predetermined area of the image. That is, the three-dimensional coordinate
画像の所定領域の各画素において3次元座標のばらつきの推定値を計算した後、画像処理回路12は、画像の所定領域の各画素で計測を行った場合の計測値の不確かさを計算する。具体的には、画像処理回路12は以下のようにして計測値の不確かさを計算する。以下では、2個の点P1と点P2の間で2点間距離を計測する場合の計測値の不確かさを計算する例を説明する。
After calculating the estimated value of the three-dimensional coordinate variation at each pixel in the predetermined region of the image, the
任意の点P1と点P2の間で2点間距離を計測する場合の計測値の不確かさσ2(P1,P2)は、3次元座標のばらつきの推定値を用いて以下の(2)式で与えられる。 Uncertainty σ 2 (P1, P2) of the measured value when measuring the distance between two points between an arbitrary point P1 and point P2 is expressed by the following equation (2) using an estimated value of variation in three-dimensional coordinates. Given in.
計測値の不確かさσ2(P1,P2)が基準不確かさuよりも小さくなる条件を考える。以下の(3)式かつ(4)式が満たされれば、明らかにσ2(P1,P2)<uとなる。 Consider a condition in which the uncertainty σ 2 (P1, P2) of the measured value is smaller than the reference uncertainty u. If the following expressions (3) and (4) are satisfied, σ 2 (P1, P2) <u clearly holds.
以下の(5)式のように定義すると、計測値の不確かさσ2(P1,P2)が基準不確かさuよりも小さくなる条件は、σ(P1)<u/2かつσ(P2)<u/2と表せる。 When defined as the following equation (5), the condition that the uncertainty σ 2 (P1, P2) of the measurement value is smaller than the reference uncertainty u is σ (P1) <u / 2 and σ (P2) < It can be expressed as u / 2.
σ(P1)<u/2かつσ(P2)<u/2であれば、σ2(P1,P2)<uとなり、ユーザが希望する基準不確かさuよりも計測値の不確かさが小さくなる。このため、点P1と点P2の間で2点間距離を計測した場合に、ユーザが希望する精度が得られることになる。したがって、本実施形態では、(5)式で定義されるσ(P)を各画素の計測値の不確かさとする。不確かさ推定部12cは、画像処理回路12に入力された画像データに基づく画像の所定領域の各画素Pについてσ(P)を計算する。以上が、ステップS110の詳細である。
If σ (P1) <u / 2 and σ (P2) <u / 2, then σ 2 (P1, P2) <u, and the uncertainty of the measured value is smaller than the reference uncertainty u desired by the user. . For this reason, when the distance between two points is measured between the points P1 and P2, the accuracy desired by the user can be obtained. Therefore, in this embodiment, σ (P) defined by equation (5) is used as the uncertainty of the measured value of each pixel. The
ステップS110に続いて、画像処理回路12は、計測値の不確かさσ(P)と基準不確かさuを比較し、比較結果に基づいて画素の色を設定した不確かさ推定画像を生成する(ステップS120)。以下ではステップS120の詳細を説明する。画像合成部12dは、不確かさ推定部12cが計算した各画素Pのσ(p)と基準不確かさuを比較する。σ(p)<u/2である場合、画像合成部12dは画素Pの色を例えば緑色に設定する。また、σ(p)≧u/2である場合、画像合成部12dは画素Pの色を例えば赤色に設定する。
Subsequent to step S110, the
また、画素によっては、原理的に3次元座標を計算できない場合がある。例えば、ステレオ計測であれば、左画像上の点に対応する右画像上の点が撮影できていない場合がある。このように3次元座標を計算することができなかった画素については、画像合成部12dは画素の色を例えば灰色に設定する。画像合成部12dは、画像処理回路12に入力された画像データに対して、上記に従って画素の色を設定することにより、計測値の不確かさの情報を色の情報として含む不確かさ推定画像を生成する。以上が、ステップS120の詳細である。
Further, depending on the pixel, there are cases where the three-dimensional coordinates cannot be calculated in principle. For example, in the case of stereo measurement, a point on the right image corresponding to a point on the left image may not be captured. As described above, for the pixel for which the three-dimensional coordinates cannot be calculated, the
ステップS120に続いて、画像処理回路12は、生成した不確かさ推定画像をLCD5へ出力し、LCD5は不確かさ推定画像を表示する(ステップS130)。図9は不確かさ推定画像の一例を示している。図9に示す不確かさ推定画像は、例えば左画像として表示される。領域S1の各画素ではσ(p)<u/2であり、領域S1の各画素は緑色で表示される。領域S2の各画素ではσ(p)≧u/2であり、領域S1の各画素は赤色で表示される。領域S3の各画素では3次元座標が計算されず、領域S3の各画素は灰色で表示される。
Subsequent to step S120, the
ユーザは2点間の距離を計測する場合、LCD5に表示された不確かさ推定画像に基づいて次のような判断を行うことができる。計測を行う2点がいずれも緑色で表示されていれば、所望の精度で計測を行えると判断することができる。一方、計測を行う2点のいずれかあるいは両方が赤色で表示されていれば、所望の精度で計測を行えないので、内視鏡2を被写体により近づける必要があると判断することができる。また、計測を行う2点のいずれかあるいは両方が灰色で表示されていれば、計測を行えないことが分かるので、被写体を撮影する角度を変えたり、内視鏡2を被写体により近づけたりする必要があると判断することができる。
When measuring the distance between two points, the user can make the following determination based on the uncertainty estimation image displayed on the
上記では不確かさ推定画像を表示する際に画像の色を設定しているが、画像の明るさ等を設定したり、計測値の不確かさσ(P)と基準不確かさuを比較した結果に基づく情報を画像に重畳して表示したりしてもよい。 In the above, the color of the image is set when the uncertainty estimation image is displayed. However, the brightness of the image is set, or the measurement value uncertainty σ (P) is compared with the reference uncertainty u. The based information may be displayed superimposed on the image.
不確かさ推定画像の表示後、ユーザがリモートコントローラ4を介して計測指示を入力した場合、以下の手順で計測値の計算が行われる。以下では、2点間の距離を計測する例を説明する。計測指示が入力されると、CPU18による制御に従って、CCU9からの画像データあるいはCPU18によってメモリカード等から読み出された画像データが画像処理回路12に入力される。画像データを新たに入力せずに、計測値の不確かさの推定と不確かさ推定画像の生成に用いた画像データを使用して計測値の計算を行ってもよい。画像処理回路12に入力された画像データは、画像合成部12dを経由してLCD5へ出力され、LCD5に画像が表示される。
When the user inputs a measurement instruction via the remote controller 4 after displaying the uncertainty estimation image, the measurement value is calculated according to the following procedure. Below, the example which measures the distance between two points is demonstrated. When a measurement instruction is input, image data from the CCU 9 or image data read from a memory card or the like by the
ユーザは、LCD5に表示された画像上で2個の計測点を指定する。ユーザがリモートコントローラ4を介して計測点の指定指示を入力すると、CPU18は計測点の画素位置を画像処理回路12へ出力する。画像処理回路12の3次元座標計算部12aは、2個の計測点の画素位置のそれぞれに対応する3次元座標を計算し、計測点の画素位置とともに3次元座標を計測部12bへ出力する。計測部12bは、2個の計測点の3次元座標の距離を計算し、計測点の画素位置とともに計算結果を画像合成部12dへ出力する。画像合成部12dは、画像処理回路12に入力された画像データに対して、計測点の位置および計測結果を表示するためのデータを合成し、LCD5へ出力する。LCD5は、計測点の位置および計測結果を含む画像を表示する。
The user designates two measurement points on the image displayed on the
本実施形態では、画像処理回路12が計測値の不確かさの推定と不確かさ推定画像の生成を行っているが、CPU18が画像処理回路12から画像データを取り込み、あるいはメモリカードから画像データを読み出し、画像データに対して計測値の不確かさの推定と不確かさ推定画像の生成を行ってもよい。この場合、計測値の不確かさの推定と不確かさ推定画像の生成を含む計測の全体の手順を規定したプログラムをROM13に予め格納しておき、CPU18がこのプログラムをROM13から読み出してRAM14に展開し、このプログラムに従って計測の制御を行ってもよい。
In this embodiment, the
上述したように、本実施形態によれば、画像における所定領域の画素毎に計測値のばらつきの推定値である不確かさを計算し、この不確かさに基づいて、計測値のばらつきを示す情報を表示することによって、計測を行った場合の計測値の精度を事前にユーザに知らせることができる。また、計測値自体の不確かさを推定し、ユーザに通知することによって、計測値のより正確な精度をユーザに知らせることができる。 As described above, according to the present embodiment, the uncertainty that is the estimated value of the measurement value variation is calculated for each pixel in the predetermined region in the image, and the information indicating the measurement value variation is calculated based on the uncertainty. By displaying, it is possible to inform the user in advance of the accuracy of the measured value when the measurement is performed. Further, by estimating the uncertainty of the measurement value itself and notifying the user, the user can be informed of the more accurate accuracy of the measurement value.
前述した特許文献2,3の技術では、画像上に配置された限られた数の照準の位置でしか物体距離を知ることができないので、計測したい位置にユーザが照準を合わせる必要があり、操作に時間と手間がかかる問題があった。これに対して、本実施形態では、画像における所定領域の各画素で計測値の不確かさを計算するため、ユーザは照準を合わせる必要がなく、所望の精度が得られるかどうかの判断を短時間で簡単に行うことができる。
In the techniques of
また、画像における所定領域の画素毎に計算した不確かさに基づく表示形態で画像を表示することによって、計測を行った場合の計測値の精度を視覚的に分かりやすくユーザに知らせることができる。さらに、画像における所定領域の画素毎に計算した不確かさと、ユーザが指定した基準不確かさuとに基づく表示形態で画像を表示することによって、ユーザが希望する計測値の精度が得られるかどうかを視覚的に分かりやすくユーザに知らせることができる。 Further, by displaying the image in a display form based on the uncertainty calculated for each pixel in the predetermined area in the image, it is possible to visually inform the user of the accuracy of the measured value when the measurement is performed. Further, whether or not the accuracy of the measurement value desired by the user can be obtained by displaying the image in a display form based on the uncertainty calculated for each pixel in the predetermined region in the image and the reference uncertainty u specified by the user. It is possible to inform the user visually and easily.
以上、図面を参照して本発明の実施形態について詳述してきたが、具体的な構成は上記の実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。 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. .
1・・・内視鏡装置、2・・・内視鏡、2a・・・固体撮像素子(撮像部)、4・・・リモートコントローラ、5・・・LCD(表示部)、8・・・内視鏡ユニット、9・・・CCU(撮像部)、12・・・画像処理回路、12a・・・3次元座標計算部(第1の計算部、第2の計算部)、12b・・・計測部、12c・・・不確かさ推定部(第2の計算部)、12d・・・画像合成部、18・・・CPU(指定部)
DESCRIPTION OF
Claims (5)
入力装置を介して入力される指示に基づいて、前記画像データに基づく画像における計測位置を指定する指定部と、
前記計測位置に対応する3次元座標を計算する第1の計算部と、
前記計測位置に対応する3次元座標に基づいて前記被写体のサイズを計測する計測部と、
前記画像における複数の位置のそれぞれに対応する3次元座標のばらつきの推定値を計算し、前記3次元座標のばらつきの推定値に基づいて、前記複数の位置のそれぞれについて、前記被写体のサイズを計測した場合の計測値のばらつきの推定値を計算する第2の計算部と、
前記計測値のばらつきの推定値に基づいて、前記計測値のばらつきを示す情報を表示する表示部と、
を備え、
前記第2の計算部は、前記複数の位置のそれぞれを基準位置とする複数の領域を設定し、前記領域内で前記基準位置を基準とする他の位置の3次元座標に基づいて、前記被写体の表面を近似する平面を計算し、前記領域内で前記基準位置を基準とする他の位置と前記平面との距離のばらつきから前記領域内の前記基準位置の3次元座標のばらつきの推定値を計算する
ことを特徴とする内視鏡装置。 An imaging unit that images a subject and generates image data;
A designation unit for designating a measurement position in an image based on the image data based on an instruction input via an input device;
A first calculation unit for calculating three-dimensional coordinates corresponding to the measurement position;
A measurement unit that measures the size of the subject based on three-dimensional coordinates corresponding to the measurement position;
An estimated value of three-dimensional coordinate variation corresponding to each of the plurality of positions in the image is calculated, and the size of the subject is measured for each of the plurality of positions based on the estimated value of the three-dimensional coordinate variation. A second calculation unit for calculating an estimated value of variation in the measured value when
A display unit for displaying information indicating the variation of the measurement value based on the estimated value of the variation of the measurement value;
Equipped with a,
The second calculation unit sets a plurality of regions with the plurality of positions as reference positions, and the subject based on the three-dimensional coordinates of other positions with the reference position as a reference within the region. A plane that approximates the surface of the region is calculated, and an estimated value of the variation in the three-dimensional coordinates of the reference position in the region is calculated from the variation in the distance between the other position with reference to the reference position in the region and the plane. An endoscope apparatus characterized by calculating .
前記計測位置に対応する3次元座標を計算する第1の計算部と、
前記計測位置に対応する3次元座標に基づいて前記被写体のサイズを計測する計測部と、
前記画像における複数の位置のそれぞれに対応する3次元座標のばらつきの推定値を計算し、前記3次元座標のばらつきの推定値に基づいて、前記複数の位置のそれぞれについて、前記被写体のサイズを計測した場合の計測値のばらつきの推定値を計算する第2の計算部と、
前記計測値のばらつきの推定値に基づいて、前記計測値のばらつきを示す情報を表示する表示部と、
としてコンピュータを機能させるためのプログラムであって、
前記第2の計算部は、前記複数の位置のそれぞれを基準位置とする複数の領域を設定し、前記領域内で前記基準位置を基準とする他の位置の3次元座標に基づいて、前記被写体の表面を近似する平面を計算し、前記領域内で前記基準位置を基準とする他の位置と前記平面との距離のばらつきから前記領域内の前記基準位置の3次元座標のばらつきの推定値を計算する
プログラム。 A designation unit for designating a measurement position in an image based on image data of a subject based on an instruction input via an input device;
A first calculation unit for calculating three-dimensional coordinates corresponding to the measurement position;
A measurement unit that measures the size of the subject based on three-dimensional coordinates corresponding to the measurement position;
An estimated value of three-dimensional coordinate variation corresponding to each of the plurality of positions in the image is calculated, and the size of the subject is measured for each of the plurality of positions based on the estimated value of the three-dimensional coordinate variation. A second calculation unit for calculating an estimated value of variation in the measured value when
A display unit for displaying information indicating the variation of the measurement value based on the estimated value of the variation of the measurement value;
A program for causing a computer to function as,
The second calculation unit sets a plurality of regions with the plurality of positions as reference positions, and the subject based on the three-dimensional coordinates of other positions with the reference position as a reference within the region. A plane that approximates the surface of the region is calculated, and an estimated value of the variation in the three-dimensional coordinates of the reference position in the region is calculated from the variation in the distance between the other position with reference to the reference position in the region and the plane. calculate
Program .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011163107A JP5791989B2 (en) | 2011-07-26 | 2011-07-26 | Endoscope apparatus and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011163107A JP5791989B2 (en) | 2011-07-26 | 2011-07-26 | Endoscope apparatus and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013025292A JP2013025292A (en) | 2013-02-04 |
JP5791989B2 true JP5791989B2 (en) | 2015-10-07 |
Family
ID=47783648
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011163107A Active JP5791989B2 (en) | 2011-07-26 | 2011-07-26 | Endoscope apparatus and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5791989B2 (en) |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3438937B2 (en) * | 1994-03-25 | 2003-08-18 | オリンパス光学工業株式会社 | Image processing device |
JP2002153421A (en) * | 2000-08-23 | 2002-05-28 | Toshiba Corp | Endoscope system |
WO2002024051A2 (en) * | 2000-09-23 | 2002-03-28 | The Board Of Trustees Of The Leland Stanford Junior University | Endoscopic targeting method and system |
JP4885479B2 (en) * | 2004-10-12 | 2012-02-29 | オリンパス株式会社 | Endoscope device for measurement and program for endoscope |
JP5024785B2 (en) * | 2007-03-29 | 2012-09-12 | オリンパスメディカルシステムズ株式会社 | Arm system mounted on an endoscopic device |
JP5361517B2 (en) * | 2009-04-27 | 2013-12-04 | オリンパス株式会社 | Endoscope apparatus and measuring method |
-
2011
- 2011-07-26 JP JP2011163107A patent/JP5791989B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013025292A (en) | 2013-02-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7443488B2 (en) | Endoscope apparatus, method of operating the endoscope apparatus, and program to be executed to implement the method | |
JP5530225B2 (en) | Endoscope apparatus and program | |
US8496575B2 (en) | Measuring endoscope apparatus, program and recording medium | |
JP5073564B2 (en) | Endoscope device for measurement and program | |
JP4873794B2 (en) | Image processing measuring apparatus and measuring endoscope apparatus | |
US8248465B2 (en) | Measuring endoscope apparatus and program | |
US20110187824A1 (en) | Endoscope apparatus and measurement method | |
JP5113990B2 (en) | Endoscope device for measurement | |
JP5231173B2 (en) | Endoscope device for measurement and program | |
US20190104921A1 (en) | Endoscopic system | |
JP5186286B2 (en) | Endoscope device for measurement and program | |
JP4790223B2 (en) | Endoscope device for measurement | |
JP5307407B2 (en) | Endoscope apparatus and program | |
JP2011170276A (en) | Endoscope device and program | |
US9113806B2 (en) | Endoscope apparatus for measuring a spatial characteristic | |
JP6789899B2 (en) | Measuring device and operating method of measuring device | |
CN110858397A (en) | Measuring device, method for operating measuring device, and storage medium | |
JP5791989B2 (en) | Endoscope apparatus and program | |
JP6400767B2 (en) | Measuring endoscope device | |
JP5602449B2 (en) | Endoscope device | |
JP2005279054A (en) | Device and method for displaying conversion image, and endoscope apparatus for industrial use | |
WO2017199657A1 (en) | Endoscope device, measurement method, and program | |
JP5042550B2 (en) | Endoscope device | |
US20120100512A1 (en) | Inspection apparatus and inspection method | |
JP2007167630A (en) | Endoscope device, and endoscope image distortion correction method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140723 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150320 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150421 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150619 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20150622 |
|
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: 20150714 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150805 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5791989 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
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 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R371 | Transfer withdrawn |
Free format text: JAPANESE INTERMEDIATE CODE: R371 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R371 | Transfer withdrawn |
Free format text: JAPANESE INTERMEDIATE CODE: R371 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
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 |