JP5242335B2 - Image processing apparatus, endoscope apparatus, endoscope system, and program - Google Patents

Image processing apparatus, endoscope apparatus, endoscope system, and program Download PDF

Info

Publication number
JP5242335B2
JP5242335B2 JP2008273430A JP2008273430A JP5242335B2 JP 5242335 B2 JP5242335 B2 JP 5242335B2 JP 2008273430 A JP2008273430 A JP 2008273430A JP 2008273430 A JP2008273430 A JP 2008273430A JP 5242335 B2 JP5242335 B2 JP 5242335B2
Authority
JP
Japan
Prior art keywords
gauge
points
plane
measurement
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008273430A
Other languages
Japanese (ja)
Other versions
JP2010102113A (en
JP2010102113A5 (en
Inventor
史生 堀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Corp filed Critical Olympus Corp
Priority to JP2008273430A priority Critical patent/JP5242335B2/en
Publication of JP2010102113A publication Critical patent/JP2010102113A/en
Publication of JP2010102113A5 publication Critical patent/JP2010102113A5/ja
Application granted granted Critical
Publication of JP5242335B2 publication Critical patent/JP5242335B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、被写体を撮像して得られた映像信号を処理する画像処理装置、内視鏡装置、内視鏡システム、およびプログラムに関する。   The present invention relates to an image processing apparatus, an endoscope apparatus, an endoscope system, and a program that process a video signal obtained by imaging a subject.

工業用内視鏡は、ボイラー、タービン、エンジン、化学プラント、水道配管等の内部の傷や腐食等の観察や検査に使用されている。工業用内視鏡では、多様な観察物を観察および検査することができるようにするため、複数種類の光学アダプタが用意されており、内視鏡の先端部分は交換可能となっている。   Industrial endoscopes are used for observation and inspection of internal scratches and corrosion of boilers, turbines, engines, chemical plants, water pipes, and the like. In an industrial endoscope, a plurality of types of optical adapters are prepared so that various observation objects can be observed and inspected, and the distal end portion of the endoscope is replaceable.

上記の光学アダプタとして、観察光学系が左右2つの視野を形成するステレオ光学アダプタがある。特許文献1には、ステレオ光学アダプタを使用し、被写体像を左右の光学系で捉えたときの左右の光学系測距点の座標に基づいて、三角測量の原理を使用して被写体の三次元空間座標を求め、ライブ状態の撮影画像から被写体距離をリアルタイムでユーザに提供する内視鏡装置が記載されている。
特開2006−136706号公報
As the above optical adapter, there is a stereo optical adapter in which the observation optical system forms two left and right visual fields. In Patent Document 1, a stereo optical adapter is used, and based on the coordinates of the right and left optical system ranging points when the subject image is captured by the left and right optical systems, the three-dimensional object is obtained using the principle of triangulation. An endoscope apparatus that obtains spatial coordinates and provides a user with a subject distance in real time from a captured image in a live state is described.
JP 2006-136706 A

しかし、特許文献1に記載された内視鏡装置では、ユーザが被写体距離を知ることはできるが、実際に被写体の詳細な計測を行うまで、画像の奥行き方向の被写体の傾き(画像内で手前の方にある被写体の部分と奥の方にある被写体の部分とがなす空間的な傾き)は分からなかった。また、被写体の大きさも分からなかった。   However, in the endoscope apparatus described in Patent Document 1, the user can know the subject distance, but the inclination of the subject in the depth direction of the image (the front side in the image until the actual measurement of the subject is actually performed). The spatial inclination between the portion of the subject at the back and the portion of the subject at the back was not known. I also didn't know the size of the subject.

本発明は、上述した課題に鑑みてなされたものであって、画像の奥行き方向の被写体の傾きをユーザに知らせることができる画像処理装置、内視鏡装置、内視鏡システム、およびプログラムを提供することを第1の目的とする。また、本発明は、画像の奥行き方向の被写体の傾きと共に被写体の大きさをユーザに知らせることができる画像処理装置、内視鏡装置、内視鏡システム、およびプログラムを提供することを第2の目的とする。   The present invention has been made in view of the above-described problems, and provides an image processing device, an endoscope device, an endoscope system, and a program capable of notifying the user of the inclination of the subject in the depth direction of the image. This is the first purpose. The second aspect of the present invention also provides an image processing apparatus, an endoscope apparatus, an endoscope system, and a program capable of notifying the user of the size of the subject together with the inclination of the subject in the depth direction of the image. Objective.

本発明は、上記の課題を解決するためになされたもので、被写体を撮像して得られた画像における画像座標に対応した前記被写体上の3次元座標を算出する座標算出部と、前記座標算出部によって算出された、基準点を含む3点以上のサンプル点の3次元座標から平面を算出する平面算出部と、前記平面上の、複数のゲージ目盛り点の3次元座標に基づいて、前記基準点から所定の3次元距離を有する位置を示すゲージを表示するための表示信号を生成する表示信号生成部と、を備え、前記平面算出部は、前記3点以上のサンプル点の3次元座標から前記基準点を通る2本の空間直線を算出し、前記2本の空間直線に基づいて前記平面を算出し、前記表示信号生成部は、前記2本の空間直線の一方上に設定された、前記基準点からの3次元距離が等しい2点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成することを特徴とする画像処理装置である。 The present invention has been made to solve the above-described problem, and includes a coordinate calculation unit that calculates three-dimensional coordinates on the subject corresponding to image coordinates in an image obtained by imaging the subject, and the coordinate calculation. A plane calculation unit that calculates a plane from the three-dimensional coordinates of three or more sample points including the reference point calculated by the unit, and the reference based on the three-dimensional coordinates of a plurality of gauge scale points on the plane A display signal generation unit that generates a display signal for displaying a gauge indicating a position having a predetermined three-dimensional distance from the point, and the plane calculation unit calculates the three-dimensional coordinates of the three or more sample points. Two spatial straight lines passing through the reference point are calculated, the plane is calculated based on the two spatial straight lines, and the display signal generation unit is set on one of the two spatial straight lines. 3D distance from the reference point Based on the three-dimensional coordinates are equal two points, an image processing apparatus and generates said display signal for displaying the gauge.

また、本発明は、被写体を撮像し撮像信号を生成する電子内視鏡と、前記撮像信号に基づいて映像信号を生成する映像信号生成部と、前記映像信号に基づく画像における画像座標に対応した前記被写体上の3次元座標を算出する座標算出部と、前記座標算出部によって算出された、基準点を含む3点以上のサンプル点の3次元座標から平面を算出する平面算出部と、前記平面上の、複数のゲージ目盛り点の3次元座標に基づいて、前記基準点から所定の3次元距離を有する位置を示すゲージを表示するための表示信号を生成する表示信号生成部と、を備え、前記平面算出部は、前記3点以上のサンプル点の3次元座標から前記基準点を通る2本の空間直線を算出し、前記2本の空間直線に基づいて前記平面を算出し、前記表示信号生成部は、前記2本の空間直線の一方上に設定された、前記基準点からの3次元距離が等しい2点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成することを特徴とする内視鏡装置である。 In addition, the present invention corresponds to an electronic endoscope that images a subject and generates an imaging signal, a video signal generation unit that generates a video signal based on the imaging signal, and image coordinates in an image based on the video signal A coordinate calculation unit for calculating three-dimensional coordinates on the subject, a plane calculation unit for calculating a plane from three-dimensional coordinates of three or more sample points including a reference point calculated by the coordinate calculation unit, and the plane A display signal generation unit that generates a display signal for displaying a gauge indicating a position having a predetermined three-dimensional distance from the reference point based on the three-dimensional coordinates of the plurality of gauge scale points ; The plane calculating unit calculates two spatial straight lines passing through the reference point from three-dimensional coordinates of the three or more sample points, calculates the plane based on the two spatial straight lines, and displays the display signal. The generator is Serial set on two one space straight, based on the three-dimensional coordinates of three-dimensional distance equal two points from the reference point, generates said display signal for displaying the gauge Is an endoscope apparatus.

また、本発明は、内視鏡装置および画像処理装置を備えた内視鏡システムであって、前記内視鏡装置は、被写体を撮像し撮像信号を生成する電子内視鏡と、前記撮像信号に基づいて映像信号を生成する映像信号生成部と、前記映像信号を外部へ送信する送信部と、を有し、前記画像処理装置は、前記映像信号を受信する受信部と、前記映像信号に基づく画像における画像座標に対応した前記被写体上の3次元座標を算出する座標算出部と、前記座標算出部によって算出された、基準点を含む3点以上のサンプル点の3次元座標から平面を算出する平面算出部と、前記平面上の、複数のゲージ目盛り点の3次元座標に基づいて、前記基準点から所定の3次元距離を有する位置を示すゲージを表示するための表示信号を生成する表示信号生成部と、を有し、前記平面算出部は、前記3点以上のサンプル点の3次元座標から前記基準点を通る2本の空間直線を算出し、前記2本の空間直線に基づいて前記平面を算出し、前記表示信号生成部は、前記2本の空間直線の一方上に設定された、前記基準点からの3次元距離が等しい2点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成することを特徴とする内視鏡システムである。 The present invention is also an endoscope system including an endoscope apparatus and an image processing apparatus, wherein the endoscope apparatus images an object and generates an imaging signal; and the imaging signal A video signal generation unit that generates a video signal based on the video signal, and a transmission unit that transmits the video signal to the outside. The image processing apparatus includes: a reception unit that receives the video signal; and the video signal A coordinate calculation unit that calculates three-dimensional coordinates on the subject corresponding to image coordinates in a base image, and a plane is calculated from the three-dimensional coordinates of three or more sample points including a reference point calculated by the coordinate calculation unit And a display for generating a display signal for displaying a gauge indicating a position having a predetermined three-dimensional distance from the reference point based on three-dimensional coordinates of a plurality of gauge scale points on the plane. With signal generator Have a, the plane calculating unit calculates the two spatial straight line passing through the reference point from the three-dimensional coordinates of the three points or more sample points, calculating the plane based on the spatial straight line of the two The display signal generator is configured to display the gauge based on the three-dimensional coordinates of two points set on one of the two space straight lines and having the same three-dimensional distance from the reference point. An endoscope system that generates a display signal .

また、本発明は、被写体を撮像して得られた画像における画像座標に対応した前記被写体上の3次元座標を算出する座標算出部と、前記座標算出部によって算出された、基準点を含む3点以上のサンプル点の3次元座標から平面を算出する平面算出部と、前記平面上の、複数のゲージ目盛り点の3次元座標に基づいて、前記基準点から所定の3次元距離を有する位置を示すゲージを表示するための表示信号を生成する表示信号生成部と、としてコンピュータを機能させるためのプログラムであって、前記平面算出部は、前記3点以上のサンプル点の3次元座標から前記基準点を通る2本の空間直線を算出し、前記2本の空間直線に基づいて前記平面を算出し、前記表示信号生成部は、前記2本の空間直線の一方上に設定された、前記基準点からの3次元距離が等しい2点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成することを特徴とするプログラムである。 The present invention also includes a coordinate calculation unit that calculates three-dimensional coordinates on the subject corresponding to image coordinates in an image obtained by imaging the subject, and a reference point calculated by the coordinate calculation unit. A plane calculation unit that calculates a plane from three-dimensional coordinates of sample points that are equal to or greater than a point, and a position having a predetermined three-dimensional distance from the reference point based on the three-dimensional coordinates of a plurality of gauge scale points on the plane A display signal generation unit for generating a display signal for displaying a gauge to be displayed, and a program for causing a computer to function as the plane calculation unit, wherein the plane calculation unit calculates the reference from three-dimensional coordinates of the three or more sample points. The two spatial straight lines passing through the points are calculated, the plane is calculated based on the two spatial straight lines, and the display signal generating unit is set on one of the two spatial straight lines. Dot Based on the three-dimensional coordinates of three-dimensional distance equal two points, which is a program and generates said display signal for displaying the gauge.

上記において、括弧で括った部分の記述は、後述する本発明の実施形態と本発明の構成要素とを便宜的に対応付けるためのものであり、この記述によって本発明の内容が限定されるわけではない。   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, a display signal for displaying a figure at a position determined by a plurality of image coordinates corresponding to a plurality of spatial coordinates on a plane approximating the surface of a subject is generated. Since the shape of the graphic reflects the inclination of the subject in the depth direction of the image, the user can be informed of the inclination of the subject in the depth direction of the image.

また、本発明によれば、所定距離だけ離れた2点の空間座標に対応した画像座標の位置に図形を表示するための表示信号が生成される。この図形から把握される2点間の距離が被写体の大きさの基準となるので、被写体の大きさをユーザに知らせることができる。   In addition, according to the present invention, a display signal for displaying a graphic at the position of image coordinates corresponding to two spatial coordinates separated by a predetermined distance is generated. Since the distance between two points grasped from this figure is a reference for the size of the subject, the size of the subject can be notified to the user.

以下、図面を参照し、本発明の実施形態を説明する。図1は、本実施形態による内視鏡システムの全体構成を示している。本内視鏡システムは、内視鏡装置1と、それに搭載された挿入部2と、タービンブレード等の計測対象物3と、通信回線であるネットワーク4(LANやインターネット等)と、情報通信端末であるPC(パーソナルコンピュータ)5とから構成されている。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows the overall configuration of the endoscope system according to the present embodiment. The endoscope system includes an endoscope apparatus 1, an insertion unit 2 mounted on the endoscope apparatus 1, a measurement object 3 such as a turbine blade, a network 4 (such as a LAN or the Internet) that is a communication line, and an information communication terminal. And a PC (personal computer) 5.

本内視鏡システムによれば、挿入部2において撮像された計測対象物(被写体)の画像(以下、内視鏡画像とする)を、ネットワーク4を介して、PC5に受信させることができる。さらに、PC5に記憶されたソフトウェアを使用することで、ユーザは、受信した内視鏡画像をリアルタイムで閲覧することができ、さらにその内視鏡画像に対してゲージ計測を行うことができる。ゲージ計測とは、ステレオ計測と呼ばれる3次元計測機能を応用して、計測対象物の3次元の傾きや大きさを示すゲージ(定規)を画像上に重畳表示した状態で、ユーザがそのゲージを参照して計測対象物のサイズを測る機能のことである。ゲージ計測の詳細については、後述する。   According to the present endoscope system, an image of a measurement target (subject) (hereinafter referred to as an endoscopic image) captured by the insertion unit 2 can be received by the PC 5 via the network 4. Further, by using the software stored in the PC 5, the user can browse the received endoscopic image in real time, and can further perform gauge measurement on the endoscopic image. Gauge measurement applies a three-dimensional measurement function called stereo measurement, with a gauge (ruler) indicating the three-dimensional inclination and size of the measurement object superimposed on the image, and the user moves the gauge. It is a function to measure the size of the measurement object with reference. Details of the gauge measurement will be described later.

以下、内視鏡装置1およびPC5の構成を説明する。まず、内視鏡装置1の構成を説明する。   Hereinafter, configurations of the endoscope apparatus 1 and the PC 5 will be described. First, the configuration of the endoscope apparatus 1 will be described.

図2は、本実施形態による内視鏡装置1の構成を示している。図2に示すように、内視鏡装置1は、挿入部2と、光学アダプタ11a,11b,11cと、コントロールユニット101と、リモートコントローラ102(入力部)と、液晶モニタ103と、内視鏡ユニット104と、CCU(カメラコントロールユニット)105と、制御ユニット106とから構成されている。   FIG. 2 shows a configuration of the endoscope apparatus 1 according to the present embodiment. As shown in FIG. 2, the endoscope apparatus 1 includes an insertion unit 2, optical adapters 11a, 11b, and 11c, a control unit 101, a remote controller 102 (input unit), a liquid crystal monitor 103, and an endoscope. The unit 104, a CCU (camera control unit) 105, and a control unit 106 are included.

細長の挿入部2は、計測対象物を撮像し撮像信号を生成する電子内視鏡を構成している。挿入部2は、先端側から順に、硬質な先端部21と、例えば上下左右に湾曲可能な湾曲部22と、柔軟性を有する可撓管部23とを連設して構成されている。挿入部2の基端部は内視鏡ユニット104に接続されている。先端部21は、観察視野を2つ有するステレオ用の光学アダプタ11a,11b(以下、ステレオ光学アダプタと記載)あるいは観察視野が1つだけの通常観察光学アダプタ11c等、各種の光学アダプタが例えば螺合によって着脱自在な構成になっている。   The elongated insertion section 2 constitutes an electronic endoscope that images a measurement object and generates an imaging signal. The insertion portion 2 is configured by connecting, in order from the distal end side, a rigid distal end portion 21, a bending portion 22 that can be bent vertically and horizontally, and a flexible tube portion 23 having flexibility. A proximal end portion of the insertion portion 2 is connected to the endoscope unit 104. The distal end portion 21 is made of various optical adapters such as a stereo optical adapter 11a, 11b (hereinafter referred to as a stereo optical adapter) having two observation fields or a normal observation optical adapter 11c having only one observation field. It is configured to be detachable depending on the combination.

コントロールユニット101は、内視鏡ユニット104と、CCU105と、制御ユニット106とを内部に備えている。内視鏡ユニット104は、観察時に必要な照明光を供給する光源装置と、挿入部2を構成する湾曲部22を湾曲させる湾曲装置とを備えている。CCU105は、挿入部2の先端部21に内蔵されている固体撮像素子2aから出力された撮像信号を入力し、これをNTSC信号等の映像信号に変換して制御ユニット106に供給する。   The control unit 101 includes an endoscope unit 104, a CCU 105, and a control unit 106 inside. The endoscope unit 104 includes a light source device that supplies illumination light necessary for observation, and a bending device that bends the bending portion 22 that constitutes the insertion portion 2. The CCU 105 inputs an imaging signal output from the solid-state imaging device 2 a built in the distal end portion 21 of the insertion unit 2, converts this into a video signal such as an NTSC signal, and supplies the video signal to the control unit 106.

制御ユニット106は、音声信号処理回路107と、映像信号処理回路108と、ROM109と、RAM110と、PCカードI/F(PCカードインターフェース)111と、USB I/F(USBインターフェース)112と、RS−232C I/F(RS−232Cインターフェース)113と、計測処理部114と、ネットワークI/F(ネットワークインターフェース)115と、EEPROM116とから構成されている。   The control unit 106 includes an audio signal processing circuit 107, a video signal processing circuit 108, a ROM 109, a RAM 110, a PC card I / F (PC card interface) 111, a USB I / F (USB interface) 112, an RS -232C I / F (RS-232C interface) 113, measurement processing unit 114, network I / F (network interface) 115, and EEPROM 116.

マイク34によって集音された音声信号や、メモリカード等の記録媒体を再生して得られる音声信号、あるいは計測処理部114によって生成された音声信号が音声信号処理回路107に供給される。映像信号処理回路108は、CCU105から供給された内視鏡画像とグラフィックによる操作メニューとを合成した合成画像を表示するために、CCU105からの映像信号を、計測処理部114の制御により生成される操作メニュー等のためのグラフィック画像信号と合成する処理を行う。また、映像信号処理回路108は、液晶モニタ103の画面上に映像を表示するために合成後の映像信号に所定の処理を施して液晶モニタ103に供給する。   An audio signal collected by the microphone 34, an audio signal obtained by reproducing a recording medium such as a memory card, or an audio signal generated by the measurement processing unit 114 is supplied to the audio signal processing circuit 107. The video signal processing circuit 108 generates a video signal from the CCU 105 under the control of the measurement processing unit 114 in order to display a composite image obtained by synthesizing the endoscopic image supplied from the CCU 105 and the graphic operation menu. A process of combining with a graphic image signal for an operation menu or the like is performed. In addition, the video signal processing circuit 108 performs a predetermined process on the combined video signal to display the video on the screen of the liquid crystal monitor 103, and supplies it to the liquid crystal monitor 103.

PCカードI/F111は、PCMCIAメモリカード32やフラッシュメモリカード33等のメモリカード(記録媒体)を自由に着脱できるようになっている。メモリカードを装着することにより、計測処理部114の制御に従って、このメモリカードに記憶されている制御処理情報や、画像情報、各種光学アダプタの光学情報である光学データ等を取り込んだり、制御処理情報や、画像情報、光学データ等をメモリカードに記録したりすることができる。   The PC card I / F 111 can freely attach and detach memory cards (recording media) such as the PCMCIA memory card 32 and the flash memory card 33. By mounting the memory card, the control processing information stored in the memory card, image information, optical data that is optical information of various optical adapters, and the like are taken in according to the control of the measurement processing unit 114, or the control processing information In addition, image information, optical data, and the like can be recorded on a memory card.

USB I/F112は、コントロールユニット101とPC31とを電気的に接続するためのインターフェースである。このUSB I/F112を介してコントロールユニット101とPC31とを電気的に接続することにより、PC31側で内視鏡画像の表示の指示や計測時における画像処理等の各種の制御指示を行うことが可能となる。また、コントロールユニット101とPC31との間で各種の処理情報やデータを入出力することが可能となる。   The USB I / F 112 is an interface for electrically connecting the control unit 101 and the PC 31. By electrically connecting the control unit 101 and the PC 31 via the USB I / F 112, various control instructions such as an instruction to display an endoscope image and image processing at the time of measurement can be performed on the PC 31 side. It becomes possible. Further, various processing information and data can be input / output between the control unit 101 and the PC 31.

RS−232C I/F113には、CCU105および内視鏡ユニット104が接続されると共に、これらCCU105や内視鏡ユニット104等の制御および動作指示を行うリモートコントローラ102が接続されている。ユーザがリモートコントローラ102を操作すると、その操作内容に基づいて、CCU105および内視鏡ユニット104を動作制御する際に必要な通信が行われる。   The RS-232C I / F 113 is connected to the CCU 105 and the endoscope unit 104, and is connected to a remote controller 102 for controlling and operating the CCU 105 and the endoscope unit 104. When the user operates the remote controller 102, communication necessary for controlling the operation of the CCU 105 and the endoscope unit 104 is performed based on the operation content.

計測処理部114は、ROM109に格納されているプログラムを実行することによって、映像信号処理回路108から映像信号を取り込み、映像信号に基づいて計測処理を実行する。RAM110は、計測処理部114によって、データの一時格納用の作業領域として使用される。   The measurement processing unit 114 executes a program stored in the ROM 109 to acquire a video signal from the video signal processing circuit 108 and execute measurement processing based on the video signal. The RAM 110 is used by the measurement processing unit 114 as a work area for temporarily storing data.

ネットワークI/F115は、ネットワーク4と有線または無線で接続し、ネットワーク通信を行うためのインターフェースである。ネットワークI/F115がネットワーク4と有線で接続する場合、ネットワークI/F115に設けられたコネクタにネットワークケーブル(LANケーブルやインターネットケーブル等)を接続することによって、ネットワーク通信を行うことが可能となる。また、ネットワークI/F115がネットワーク4と無線で接続する場合は、ネットワークI/F115に設けられたアンテナ(無線LAN等)によって、ネットワーク通信を行うことが可能となる。このネットワーク4を介して、ネットワークI/F115と、後述するPC5のネットワークI/Fとを接続することにより、内視鏡装置1とPC5との間でネットワーク通信が可能となり、各種データを送受信することができる。   The network I / F 115 is an interface for connecting to the network 4 by wire or wireless and performing network communication. When the network I / F 115 is connected to the network 4 by wire, network communication can be performed by connecting a network cable (such as a LAN cable or an Internet cable) to a connector provided in the network I / F 115. When the network I / F 115 is wirelessly connected to the network 4, network communication can be performed using an antenna (such as a wireless LAN) provided in the network I / F 115. By connecting the network I / F 115 and the network I / F of the PC 5 described later via the network 4, network communication is possible between the endoscope apparatus 1 and the PC 5, and various data are transmitted and received. be able to.

内視鏡装置1とPC5との間で送受信されるデータとして、ネットワークアドレス、環境データ、画像データの3種類がある。ネットワークアドレスは、内視鏡装置ごとに割り当てられた固有のアドレスであり、文字列データとしてEEPROM116に記憶されている。内視鏡装置1は、PC5からネットワーク接続要求を受信すると、そのネットワーク接続要求に含まれるネットワークアドレスが、EEPROM116に記憶されたネットワークアドレスと一致しているか否かを確認し、さらにその応答として、接続が正常に行われたかどうかをPC5に対して送信する。   As data transmitted / received between the endoscope apparatus 1 and the PC 5, there are three types of data: a network address, environmental data, and image data. The network address is a unique address assigned to each endoscope apparatus and is stored in the EEPROM 116 as character string data. When receiving a network connection request from the PC 5, the endoscope apparatus 1 checks whether or not the network address included in the network connection request matches the network address stored in the EEPROM 116, and as a response, It transmits to the PC 5 whether or not the connection has been made normally.

環境データは、ステレオ計測を行う際に使用するデータであり、ステレオ光学アダプタの光学的歪みを補正するためのデータ等が含まれる。環境データは、特開2001−275934号公報に記載されているものと同様である。環境データもネットワークアドレスと同様にEEPROM116に記憶されている。内視鏡装置1は、PC5からの環境データ送信要求を受信すると、その応答として、EEPROM116に記憶された環境データをPC5に送信する。   The environmental data is data used when performing stereo measurement, and includes data for correcting optical distortion of the stereo optical adapter. The environmental data is the same as that described in JP-A-2001-275934. The environmental data is stored in the EEPROM 116 as well as the network address. When receiving an environmental data transmission request from the PC 5, the endoscope apparatus 1 transmits the environmental data stored in the EEPROM 116 to the PC 5 as a response.

画像データは、映像情報処理回路108から供給される1フレーム分の映像信号のデータである。内視鏡装置1は、PC5からの画像データ送信要求を受信すると、その応答として、映像情報処理回路108から供給される画像データをPC5に送信する。   The image data is video signal data for one frame supplied from the video information processing circuit 108. Upon receiving the image data transmission request from the PC 5, the endoscope apparatus 1 transmits the image data supplied from the video information processing circuit 108 to the PC 5 as a response.

次に、PC5の構成を説明する。図3はPC5の構成を示している。PC5は、PC本体501と、モニタ502と、キーボードやマウス等の操作部503とから構成されている。PC本体501には制御用コンピュータ504が内蔵されている。制御用コンピュータ504は、RAM505と、HDD506と、CPU507と、ネットワークI/F(ネットワークインターフェース)508と、USB I/F509とから構成されている。   Next, the configuration of the PC 5 will be described. FIG. 3 shows the configuration of the PC 5. The PC 5 includes a PC main body 501, a monitor 502, and an operation unit 503 such as a keyboard and a mouse. The PC main body 501 has a control computer 504 built therein. The control computer 504 includes a RAM 505, an HDD 506, a CPU 507, a network I / F (network interface) 508, and a USB I / F 509.

RAM505は、ソフトウェア動作に必要な画像情報等のデータを一時記憶するために使用される。HDD506には、PC5を制御するための一連のソフトウェア(プログラム)が記憶されており、後述するネットワーク計測ソフトもHDD506内に記憶される。CPU507は、HDD506に記憶されているソフトウェアの命令コードに従って、RAM505に記憶されたデータを用いて各種制御のための演算等を実行する。   The RAM 505 is used for temporarily storing data such as image information necessary for software operation. A series of software (programs) for controlling the PC 5 is stored in the HDD 506, and network measurement software described later is also stored in the HDD 506. The CPU 507 executes arithmetic operations for various controls using data stored in the RAM 505 in accordance with software instruction codes stored in the HDD 506.

ネットワークI/F508は、通信回線であるネットワーク4と有線または無線で接続し、ネットワーク通信を行うためのインターフェースである。ネットワークI/F508がネットワーク4と有線で接続する場合、ネットワークI/F508に設けられたコネクタにネットワークケーブル(LANケーブルやインターネットケーブル等)を接続することによって、ネットワーク通信を行うことが可能となる。また、ネットワークI/F508がネットワーク4と無線で接続する場合は、ネットワークI/F508に設けられたアンテナ(無線LAN等)によって、ネットワーク通信を行うことが可能となる。このネットワーク4を介して、ネットワークI/F508と内視鏡装置1のネットワークI/F115とを接続することにより、内視鏡装置1から送信された、映像信号を構成する各フレームの画像データをPC5で受信し、PC5に入力することができる。   The network I / F 508 is an interface for performing network communication by connecting to the network 4 that is a communication line by wire or wireless. When the network I / F 508 is connected to the network 4 by wire, network communication can be performed by connecting a network cable (such as a LAN cable or an Internet cable) to a connector provided in the network I / F 508. In addition, when the network I / F 508 is wirelessly connected to the network 4, network communication can be performed by an antenna (wireless LAN or the like) provided in the network I / F 508. By connecting the network I / F 508 and the network I / F 115 of the endoscope apparatus 1 via this network 4, the image data of each frame constituting the video signal transmitted from the endoscope apparatus 1 is obtained. It can be received by the PC 5 and input to the PC 5.

USB I/F509は、PC本体501と操作部503とを電気的に接続するためのインターフェースである。ユーザが操作部503を操作すると、操作結果に応じた信号がUSB I/F509を介してCPU507に入力される。CPU507は、この信号に基づいてPC5の各種制御を実行する。   The USB I / F 509 is an interface for electrically connecting the PC main body 501 and the operation unit 503. When the user operates the operation unit 503, a signal corresponding to the operation result is input to the CPU 507 via the USB I / F 509. The CPU 507 executes various controls of the PC 5 based on this signal.

上述したように、PC5のHDD505には、ネットワーク計測ソフトが記憶されている。ネットワーク計測ソフトをPC5で動作させることにより、ネットワーク4を介して内視鏡装置1から順次画像データを受信して画像を表示し、さらにその画像データに対して後述するゲージ計測を行うことができる。   As described above, the network measurement software is stored in the HDD 505 of the PC 5. By operating the network measurement software on the PC 5, it is possible to sequentially receive image data from the endoscope apparatus 1 via the network 4 and display an image, and to perform gauge measurement described later on the image data. .

次に、ネットワーク計測ソフトの画面および動作について説明する。まず、ネットワーク計測ソフトのメインウィンドウおよびそのGUI(グラフィカルユーザインターフェース)について説明する。   Next, the screen and operation of the network measurement software will be described. First, the main window of the network measurement software and its GUI (graphical user interface) will be described.

図4は、ネットワーク計測ソフトのメインウィンドウを示している。ユーザがネットワーク計測ソフトを起動すると、図4に示すメインウィンドウ400が表示される。メインウィンドウ400の表示は、CPU507による制御に従って行われる。CPU507は、メインウィンドウ400を表示するためのグラフィック画像信号(表示信号)を生成し、モニタ502へ出力する。また、内視鏡装置1で撮像された計測対象物の画像をメインウィンドウ400上に重畳表示する場合には、CPU507は、内視鏡装置1から受信した画像データをグラフィック画像信号に重畳する処理を行い、処理後の信号をモニタ502へ出力する。   FIG. 4 shows a main window of the network measurement software. When the user starts the network measurement software, a main window 400 shown in FIG. 4 is displayed. The display of the main window 400 is performed according to control by the CPU 507. The CPU 507 generates a graphic image signal (display signal) for displaying the main window 400 and outputs it to the monitor 502. Further, when the measurement target image captured by the endoscope apparatus 1 is displayed on the main window 400 in a superimposed manner, the CPU 507 superimposes the image data received from the endoscope apparatus 1 on the graphic image signal. The processed signal is output to the monitor 502.

ユーザは、GUI機能を利用して、操作部503を介してメインウィンドウ400を操作することにより、内視鏡画像の閲覧やゲージ計測を行うことができる。以下、各GUI機能を説明する。   The user can browse the endoscopic image and perform gauge measurement by operating the main window 400 via the operation unit 503 using the GUI function. Hereinafter, each GUI function will be described.

メインウィンドウ400の上部には、複数のツールボタン401が並んで配置されている。ツールボタン401は、ネットワーク計測ソフトの各種操作を行うためのボタンである。各ボタンの説明は以下の通りである。   In the upper part of the main window 400, a plurality of tool buttons 401 are arranged side by side. A tool button 401 is a button for performing various operations of the network measurement software. The explanation of each button is as follows.

ボタン401a(以下、[Live]ボタンもしくは[Freeze]ボタンと記載)は、内視鏡装置1とネットワーク接続を行い、さらに、内視鏡装置1に対して画像データの送信要求を行って画像データを受信し、受信した画像データを後述するピクチャボックス404に表示するためのボタンである。[Live]ボタンが押下されると、内視鏡装置1から受信した画像データが順次ピクチャボックス404に表示され、ユーザはその画像を閲覧することができる。その際、[Live]ボタンの表示は[Freeze]ボタンに切り替わる。[Live]ボタンおよび[Freeze]ボタンが押下された時のネットワーク計測ソフトによる動作の詳細については、後述する。   A button 401a (hereinafter referred to as a [Live] button or a [Freeze] button) connects to the endoscope apparatus 1 via a network, and further requests the endoscope apparatus 1 to transmit image data to send image data. Is a button for displaying the received image data in a picture box 404 described later. When the [Live] button is pressed, the image data received from the endoscope apparatus 1 is sequentially displayed in the picture box 404, and the user can view the image. At that time, the display of the [Live] button is switched to the [Freeze] button. Details of the operation of the network measurement software when the [Live] button and [Freeze] button are pressed will be described later.

ボタン401b(以下、[Stereo-On]ボタンもしくは[Stereo-Off]ボタンと記載)は、内視鏡装置1に対して環境データの送信要求を行って環境データを受信し、さらに、受信した環境データおよび画像データに基づいてゲージ計測を行うためのボタンである。[Stereo-On]ボタンが押下されると、ピクチャボックス404に表示された画像に対して、ユーザはゲージ計測を行うことができる。その際、[Stereo-On]ボタンの表示は[Stereo-Off]ボタンに切り替わる。[Stereo-On]ボタンおよび[Stereo-Off]ボタンが押下された時のネットワーク計測ソフトによる動作の詳細については、後述する。   A button 401b (hereinafter referred to as a [Stereo-On] button or a [Stereo-Off] button) makes a transmission request for environmental data to the endoscope apparatus 1 to receive environmental data, and further receives the received environment data. It is a button for performing gauge measurement based on data and image data. When the [Stereo-On] button is pressed, the user can perform gauge measurement on the image displayed in the picture box 404. At that time, the display of the [Stereo-On] button is switched to the [Stereo-Off] button. Details of the operation by the network measurement software when the [Stereo-On] button and the [Stereo-Off] button are pressed will be described later.

ボタン401c(以下、[Snap]ボタンと記載)は、受信した環境データおよび画像データを用いて、ステレオ計測用画像ファイル(以下、計測ファイルと記載)を作成し、PC5のHDD506に記録するためのボタンである。[Snap]ボタンが押下されると、計測ファイルが所定のフォルダに所定のファイル名および拡張子で保存される。[Snap]ボタンが押下された時のネットワーク計測ソフトによる動作の詳細説明については、省略する。   A button 401c (hereinafter referred to as a [Snap] button) is used to create a stereo measurement image file (hereinafter referred to as a measurement file) using the received environment data and image data, and record it in the HDD 506 of the PC 5. Button. When the [Snap] button is pressed, the measurement file is saved in a predetermined folder with a predetermined file name and extension. A detailed description of the operation by the network measurement software when the [Snap] button is pressed will be omitted.

ボタン401d(以下、[Image File]ボタンと記載)は、PC5のHDD506に記録された計測ファイルを開くためのボタンである。[Image File]ボタンが押下されると、図示しないファイルオープンダイアログが開く。そして、このファイルオープンダイアログにおいて、開きたい計測ファイルをユーザが選択すると、計測ファイルの画像がピクチャボックス404に表示され、ユーザはその画像に対してステレオ計測を行うことができる。[Image File]ボタンが押下された時のネットワーク計測ソフトによる動作の詳細説明については、省略する。   A button 401d (hereinafter referred to as an [Image File] button) is a button for opening a measurement file recorded in the HDD 506 of the PC 5. When the [Image File] button is pressed, a file open dialog (not shown) is opened. In the file open dialog, when the user selects a measurement file to be opened, an image of the measurement file is displayed in the picture box 404, and the user can perform stereo measurement on the image. A detailed description of the operation by the network measurement software when the [Image File] button is pressed will be omitted.

ボタン401e(以下、[Tool]ボタンと記載)は、ネットワーク計測ソフトの各種設定を行うためのボタンである。[Tool]ボタンが押下されると、図示しない設定ダイアログが開く。そして、この設定ダイアログにおいてユーザは、ネットワークの通信条件や、計測ファイルの保存フォルダ、ファイル名、拡張子等を設定することができる。[Tool]ボタンが押下された時のネットワーク計測ソフトによる動作の詳細説明については、省略する。   A button 401e (hereinafter referred to as a [Tool] button) is a button for performing various settings of the network measurement software. When the [Tool] button is pressed, a setting dialog (not shown) is opened. In this setting dialog, the user can set network communication conditions, a storage folder of a measurement file, a file name, an extension, and the like. A detailed description of the operation by the network measurement software when the [Tool] button is pressed will be omitted.

メインウィンドウ400の右上部には、ステータスボックス402が配置されている。ステータスボックス402は、ネットワーク計測ソフトのステータスを表示するためのボックスである。表示されるステータスの内容、および表示が切り替わるタイミングについては、後述する。   A status box 402 is arranged in the upper right part of the main window 400. A status box 402 is a box for displaying the status of the network measurement software. The contents of the displayed status and the timing for switching the display will be described later.

ツールボタン401の下には、アドレスボックス403が配置されている。アドレスボックス403は、内視鏡装置1のネットワークアドレスを入力するためのボックスである。アドレスボックス403に入力されたネットワークアドレスは、内視鏡装置1とネットワーク接続を行う際に使用される。   Below the tool button 401, an address box 403 is arranged. The address box 403 is a box for inputting the network address of the endoscope apparatus 1. The network address input in the address box 403 is used when making a network connection with the endoscope apparatus 1.

アドレスボックス403の下には、ピクチャボックス404が配置されている。ピクチャボックス404は、内視鏡装置1から受信した画像データを順次表示するためのボックスであり、ユーザはその画像を閲覧することができる。また、ユーザはピクチャボックス404上にカーソル405を移動させることにより、ステレオ計測およびゲージ計測を行うことができる。   A picture box 404 is arranged below the address box 403. The picture box 404 is a box for sequentially displaying the image data received from the endoscope apparatus 1, and the user can view the images. Further, the user can perform stereo measurement and gauge measurement by moving the cursor 405 on the picture box 404.

ネットワーク計測ソフトのステータスが、後述するライブ-ステレオ状態もしくはフリーズ-ステレオ状態であるとき、ピクチャボックス404に表示された画像406上に、計測領域407、計測アイコン408、マッチングアイコン409、およびゲージ410が重畳表示される。画像406は、ステレオ光学アダプタを通して結像された2つの被写体像に対応した左右2つの画像で構成される。以下では、左側に表示される画像を左画像と記載し、右側に表示される画像を右画像と記載する。計測領域407は、画像406内においてステレオ計測を行うことが可能な領域であり、左右一対の矩形線で表示される。計測領域407の大きさ等の情報は環境データに記録されている。以下では、左画像上の計測領域を左側計測領域と記載し、右画像上の計測領域を右側計測領域と記載する。   When the status of the network measurement software is a live-stereo state or a freeze-stereo state, which will be described later, a measurement area 407, a measurement icon 408, a matching icon 409, and a gauge 410 are displayed on the image 406 displayed in the picture box 404. It is displayed superimposed. The image 406 includes two left and right images corresponding to two subject images formed through the stereo optical adapter. Hereinafter, an image displayed on the left side is referred to as a left image, and an image displayed on the right side is referred to as a right image. The measurement area 407 is an area in which stereo measurement can be performed in the image 406, and is displayed as a pair of left and right rectangular lines. Information such as the size of the measurement area 407 is recorded in the environmental data. Hereinafter, the measurement area on the left image is referred to as a left measurement area, and the measurement area on the right image is referred to as a right measurement area.

計測アイコン408は、カーソル405が示す左側計測領域内の位置と同じ位置に×印で表示されるアイコンである。マッチングアイコン409は、右側計測領域内のマッチング点(左画像上のカーソル405が示す位置に対応する右画像上の点)の位置に×印で表示されるアイコンである。   The measurement icon 408 is an icon displayed with a cross at the same position as the position in the left measurement area indicated by the cursor 405. The matching icon 409 is an icon displayed with a cross mark at the position of a matching point (a point on the right image corresponding to the position indicated by the cursor 405 on the left image) in the right measurement region.

ゲージ410は、カーソル405が左側計測領域内にある場合に、カーソル405の周囲に表示される円状の3次元定規のことである。ユーザはこのゲージ410を用いて、計測対象物のサイズを測ることができる。ゲージ410は、カーソル405の上下左右に並んで表示されるゲージ目盛り線410aと、カーソル405の周囲に表示されるゲージ周囲線410bとから構成される。ゲージ410は、直線、線分、折れ線、曲線、円、楕円等を1または複数有する図形であればよく、その表示形態は本実施形態に限定されない。ゲージ410の算出方法および表示の詳細については、後述する。   The gauge 410 is a circular three-dimensional ruler displayed around the cursor 405 when the cursor 405 is in the left measurement region. The user can measure the size of the measurement object using the gauge 410. The gauge 410 includes a gauge scale line 410 a displayed side by side along the top, bottom, left, and right of the cursor 405 and a gauge peripheral line 410 b displayed around the cursor 405. The gauge 410 may be a figure having one or more of a straight line, a line segment, a broken line, a curve, a circle, an ellipse and the like, and the display form is not limited to this embodiment. The calculation method and display details of the gauge 410 will be described later.

ピクチャボックス404の左下には、カーソル座標ボックス411が配置されている。カーソル座標ボックス411は、カーソル405が示す座標を表示するためのボックスである。カーソル405がピクチャボックス404内にある場合に、カーソル405が示す位置のX座標とY座標(以下、カーソル座標と記載)がカーソル座標ボックス411にピクセル単位で表示される。さらに、ユーザがカーソル405を移動させると、カーソル座標ボックス411のカーソル座標がリアルタイムに更新される。カーソル座標の表示に関する、ネットワーク計測ソフトによる動作の詳細説明については、省略する。   A cursor coordinate box 411 is arranged at the lower left of the picture box 404. The cursor coordinate box 411 is a box for displaying the coordinates indicated by the cursor 405. When the cursor 405 is in the picture box 404, an X coordinate and a Y coordinate (hereinafter referred to as cursor coordinates) of the position indicated by the cursor 405 are displayed in the cursor coordinate box 411 in units of pixels. Further, when the user moves the cursor 405, the cursor coordinates in the cursor coordinate box 411 are updated in real time. The detailed description of the operation by the network measurement software regarding the display of the cursor coordinates is omitted.

ピクチャボックス404の右下には、フレームレートボックス412が配置されている。フレームレートボックス412は、フレームレートを表示するためのボックスである。ネットワーク計測ソフトのステータスがライブ状態である場合に、ピクチャボックス404に表示された画像のフレームレートがfps(frame per sec)単位でフレームレートボックス412に表示される。さらに、フレームレートボックス412に表示されたフレームレートはリアルタイムに更新される。フレームレートの算出およびフレームレートの表示に関する、ネットワーク計測ソフトによる動作の詳細説明については、省略する。   A frame rate box 412 is arranged at the lower right of the picture box 404. The frame rate box 412 is a box for displaying the frame rate. When the status of the network measurement software is live, the frame rate of the image displayed in the picture box 404 is displayed in the frame rate box 412 in units of fps (frame per sec). Further, the frame rate displayed in the frame rate box 412 is updated in real time. The detailed description of the operation by the network measurement software regarding the calculation of the frame rate and the display of the frame rate is omitted.

メインウィンドウ400の右上部には、対象物距離ボックス413が配置されている。対象物距離ボックス413は、挿入部2の先端の固体撮像素子2aの結像面から計測対象物までの距離を表示するためのボックスである。カーソル405が左側計測領域内にある場合に、カーソル405の示す位置における計測対象物の奥行き方向の距離が対象物距離として対象物距離ボックス413に表示される。対象物距離は、ステレオ計測を行うことによって算出される。さらに、ユーザがカーソル405を移動させると、対象物距離ボックス413の対象物距離がリアルタイムに更新される。対象物距離ボックス413の表示内容の詳細については、後述する。   In the upper right part of the main window 400, an object distance box 413 is arranged. The object distance box 413 is a box for displaying the distance from the imaging surface of the solid-state imaging device 2a at the tip of the insertion portion 2 to the measurement object. When the cursor 405 is in the left measurement area, the distance in the depth direction of the measurement object at the position indicated by the cursor 405 is displayed in the object distance box 413 as the object distance. The object distance is calculated by performing stereo measurement. Furthermore, when the user moves the cursor 405, the object distance in the object distance box 413 is updated in real time. Details of the display contents of the object distance box 413 will be described later.

メインウィンドウ400の右上部には、インジケータ414が配置されている。インジケータ414の表示は、対象物距離ボックス413に表示された対象物距離に応じて、9段階に切り替わる。インジケータ414の表示の詳細については、後述する。   An indicator 414 is arranged in the upper right part of the main window 400. The display of the indicator 414 is switched in 9 steps according to the object distance displayed in the object distance box 413. Details of the display of the indicator 414 will be described later.

メインウィンドウ400の右部には、ゲージ設定ボックス415が配置されている。ゲージ設定ボックス415は、ピクチャボックス404に表示されるゲージ410の各種設定を行うためのボックスである。ゲージ設定ボックス415内には、上からゲージイラスト416、ゲージ径設定ボックス417、およびゲージ目盛り設定ボックス418が配置されている。   On the right side of the main window 400, a gauge setting box 415 is arranged. The gauge setting box 415 is a box for performing various settings of the gauge 410 displayed in the picture box 404. In the gauge setting box 415, a gauge illustration 416, a gauge diameter setting box 417, and a gauge scale setting box 418 are arranged from the top.

ゲージ径設定ボックス417は、ゲージ410のゲージ周囲線410bの半径を設定するためのボックスである。ゲージ径設定ボックス417は、コンボボックス形式となっており、ユーザはマウス操作により、リストから設定項目を選択できるようになっている。ゲージ目盛り設定ボックス418は、ゲージ410のゲージ目盛り線410aの目盛り間隔を設定するためのボックスである。ゲージ目盛り設定ボックス418も、コンボボックス形式となっており、ユーザはマウス操作により、リストから設定項目を選択できるようになっている。   The gauge diameter setting box 417 is a box for setting the radius of the gauge peripheral line 410b of the gauge 410. The gauge diameter setting box 417 has a combo box format, and the user can select a setting item from the list by operating the mouse. The gauge scale setting box 418 is a box for setting the scale interval of the gauge scale line 410a of the gauge 410. The gauge scale setting box 418 is also in a combo box format, and the user can select a setting item from the list by operating the mouse.

メインウィンドウ400の右下部には、単位設定ボックス419が配置されている。単位設定ボックス419は、対象物距離ボックス413、ゲージ径設定ボックス417、およびゲージ目盛り設定ボックス418の表示単位を切り替えるためのボックスである。単位設定ボックス419内には、[mm] ラジオボタン419aおよび[inch]ラジオボタン419bが配置されており、ユーザはこれらのボタンを選択することにより、対象物距離ボックス413、ゲージ径設定ボックス417、およびゲージ目盛り設定ボックス418の表示単位をmmもしくはinchのいずれかに切り替えることができる。   A unit setting box 419 is arranged at the lower right of the main window 400. The unit setting box 419 is a box for switching display units of the object distance box 413, the gauge diameter setting box 417, and the gauge scale setting box 418. In the unit setting box 419, an [mm] radio button 419a and an [inch] radio button 419b are arranged. By selecting these buttons, the user selects an object distance box 413, a gauge diameter setting box 417, The display unit of the gauge scale setting box 418 can be switched to either mm or inch.

メインウィンドウ400の右下部には、[Exit]ボタン420が配置されている。[Exit]ボタン420は、ネットワーク計測ソフトを終了するためのボタンである。[Exit]ボタン420が押下されると、全てのソフト動作が終了し、メインウィンドウ400が閉じられる。   In the lower right part of the main window 400, an [Exit] button 420 is arranged. [Exit] button 420 is a button for terminating the network measurement software. When the [Exit] button 420 is pressed, all software operations are completed and the main window 400 is closed.

次に、ネットワーク計測ソフトのステータスについて説明する。ネットワーク計測ソフトのステータスには、未接続状態、ライブ状態、フリーズ状態、ライブ-ステレオ状態、フリーズ-ステレオ状態の5つのステータスがある。各ステータスの説明は以下の通りである。   Next, the status of the network measurement software will be described. There are five network measurement software statuses: unconnected, live, frozen, live-stereo, and freeze-stereo. The explanation of each status is as follows.

未接続状態は、ネットワーク計測ソフトの初期ステータスであり、PC5と内視鏡装置1がネットワーク接続されていない状態である。ライブ状態は、内視鏡装置1から受信した画像データがピクチャボックスに順次表示されている状態である。フリーズ状態とは、内視鏡装置1からの画像データの受信が一時停止し、ピクチャボックスに静止画が表示されている状態である。   The unconnected state is an initial status of the network measurement software, and is a state where the PC 5 and the endoscope apparatus 1 are not connected to the network. The live state is a state in which image data received from the endoscope apparatus 1 is sequentially displayed in the picture box. The freeze state is a state in which reception of image data from the endoscope apparatus 1 is temporarily stopped and a still image is displayed in the picture box.

ライブ-ステレオ状態は、内視鏡装置1から受信した画像データがピクチャボックスに順次表示されている状態であり、かつ表示された画像に対してステレオ計測およびゲージ計測を行うことが可能な状態である。フリーズ−ステレオ状態とは、内視鏡装置1からの画像データの受信が一時停止し、ピクチャボックスに静止画が表示されている状態であり、かつ表示された画像に対してステレオ計測およびゲージ計測を行うことが可能な状態である。   The live-stereo state is a state in which the image data received from the endoscope apparatus 1 is sequentially displayed in the picture box, and a stereo measurement and a gauge measurement can be performed on the displayed image. is there. The freeze-stereo state is a state in which reception of image data from the endoscope apparatus 1 is temporarily stopped and a still image is displayed in the picture box, and stereo measurement and gauge measurement are performed on the displayed image. It is a state that can be performed.

図5は、メインウィンドウ内の各種ツールボタンが押下されたときに、ネットワーク計測ソフトのステータスがどのように遷移するかを示したものである。以下に、ステータス遷移について説明する。   FIG. 5 shows how the status of the network measurement software changes when various tool buttons in the main window are pressed. The status transition will be described below.

ネットワーク計測ソフトが起動されると、ステータスは、初期ステータスである未接続状態Aとなる。未接続状態Aにおいて、アドレスボックス403に内視鏡装置1のネットワークアドレスが入力された状態で、[Live]ボタンが押下されると、ステータスはライブ状態Bに移行する。このとき、[Live]ボタンは[Freeze]ボタンに切り替わる。   When the network measurement software is activated, the status becomes an unconnected state A which is an initial status. When the [Live] button is pressed while the network address of the endoscope apparatus 1 is input to the address box 403 in the unconnected state A, the status shifts to the live state B. At this time, the [Live] button switches to the [Freeze] button.

ライブ状態Bにおいて、[Freeze]ボタンが押下されると、ステータスはフリーズ状態Cに移行する。このとき、[Freeze]ボタンは[Live]ボタンに切り替わる。また、ライブ状態Bにおいて、[Stereo-On]ボタンが押下されると、ステータスはライブ-ステレオ状態Dに移行する。このとき、[Stereo-On]ボタンは[Stereo-Off]ボタンに切り替わる。   When the [Freeze] button is pressed in the live state B, the status shifts to the freeze state C. At this time, the [Freeze] button switches to the [Live] button. When the [Stereo-On] button is pressed in the live state B, the status shifts to the live-stereo state D. At this time, the [Stereo-On] button switches to the [Stereo-Off] button.

フリーズ状態Cにおいて、[Live]ボタンが押下されると、ステータスはライブ状態Bに移行する。このとき、[Live]ボタンは[Freeze]ボタンに切り替わる。また、フリーズ状態Cにおいて、[Stereo-On]ボタンが押下されると、ステータスはフリーズ-ステレオ状態Eに移行する。このとき、[Stereo-On]ボタンは[Stereo-Off]ボタンに切り替わる。   When the [Live] button is pressed in the freeze state C, the status shifts to the live state B. At this time, the [Live] button switches to the [Freeze] button. When the [Stereo-On] button is pressed in the freeze state C, the status shifts to the freeze-stereo state E. At this time, the [Stereo-On] button switches to the [Stereo-Off] button.

ライブ-ステレオ状態Dにおいて、[Freeze]ボタンが押下されると、ステータスはフリーズ-ステレオ状態Eに移行する。このとき、[Freeze]ボタンは[Live]ボタンに切り替わる。また、ライブ-ステレオ状態Dにおいて、[Stereo-Off]ボタンが押下されると、ステータスはライブ状態Bに移行する。このとき、[Stereo-Off]ボタンは[Stereo-On]ボタンに切り替わる。   When the [Freeze] button is pressed in the live-stereo state D, the status shifts to the freeze-stereo state E. At this time, the [Freeze] button switches to the [Live] button. When the [Stereo-Off] button is pressed in the live-stereo state D, the status shifts to the live state B. At this time, the [Stereo-Off] button switches to the [Stereo-On] button.

フリーズ-ステレオ状態Eにおいて、[Live]ボタンが押下されると、ステータスはライブ-ステレオ状態Dに移行する。このとき、[Live]ボタンは[Freeze]ボタンに切り替わる。また、フリーズ-ステレオ状態Eにおいて、[Stereo-Off]ボタンが押下されると、ステータスはフリーズ状態Cに移行する。このとき、[Stereo-Off]ボタンは[Stereo-On]ボタンに切り替わる。   When the [Live] button is pressed in the freeze-stereo state E, the status shifts to the live-stereo state D. At this time, the [Live] button switches to the [Freeze] button. When the [Stereo-Off] button is pressed in the freeze-stereo state E, the status shifts to the freeze state C. At this time, the [Stereo-Off] button switches to the [Stereo-On] button.

図6は、各ステータスにおいてステータスボックスがどのように表示されるかを示したものである。ステータスボックスには、未接続状態では「Non-Connected」と表示され、ライブ状態では「Live」と表示され、フリーズ状態では「Freeze」と表示され、ライブ-ステレオ状態では「Live-Stereo」と表示され、フリーズ-ステレオ状態では「Freeze-Stereo」と表示される。   FIG. 6 shows how the status box is displayed in each status. In the status box, “Non-Connected” is displayed in the unconnected state, “Live” is displayed in the live state, “Freeze” is displayed in the frozen state, and “Live-Stereo” is displayed in the live-stereo state. In the freeze-stereo state, “Freeze-Stereo” is displayed.

次に、ネットワーク計測ソフトによる動作について説明する。図7〜図9は、ネットワーク計測ソフトが起動した後の処理の流れを示している。PC5のCPU507は、HDD506からネットワーク計測ソフトを読み出して起動した後、図7〜図9に示す手順で各種制御を実行する。   Next, the operation by the network measurement software will be described. 7 to 9 show the flow of processing after the network measurement software is activated. The CPU 507 of the PC 5 reads out the network measurement software from the HDD 506 and activates it, and then executes various controls according to the procedure shown in FIGS.

まず、ステップS0において、CPU507はステータスフラグを、ネットワーク計測ソフトの初期ステータスである「未接続状態」に設定する。ステータスフラグとは、ネットワーク計測ソフトの現在のステータスを記憶するためのフラグであり、PC5内のRAM505に記憶されている。後述するように、CPU507は、現在のステータスをチェックする場合もしくはステータスを切り替える場合に、ステータスフラグを使用する。   First, in step S0, the CPU 507 sets the status flag to “unconnected state” which is the initial status of the network measurement software. The status flag is a flag for storing the current status of the network measurement software, and is stored in the RAM 505 in the PC 5. As will be described later, the CPU 507 uses the status flag when checking the current status or switching the status.

ステップSA1〜SE6は、各ステータスにおいてユーザが各種GUI操作(主にツールボタン401の操作)を行った際の処理を示している。ステップSA1〜SA5は未接続状態における処理を示し、ステップSB1〜SB8はライブ状態における処理を示し、ステップSC1〜SC7はフリーズ状態における処理を示し、ステップSD1〜SD8はライブ-ステレオ状態における処理を示し、ステップSE1〜SE6はフリーズ-ステレオ状態における処理を示している。   Steps SA1 to SE6 show processing when the user performs various GUI operations (mainly operation of the tool button 401) in each status. Steps SA1 to SA5 show processing in the unconnected state, Steps SB1 to SB8 show processing in the live state, Steps SC1 to SC7 show processing in the freeze state, and Steps SD1 to SD8 show processing in the live-stereo state. Steps SE1 to SE6 show processing in the freeze-stereo state.

まず、未接続状態における処理の流れ(ステップSA1〜SA5)について説明する。まず、ステップSA1では、CPU507はステータスが未接続状態であるか否かを確認する。ステータスが未接続状態である場合、処理はステップSA2に移行し、ステータスが未接続状態でない場合、処理はステップSB1に移行する。   First, the flow of processing in the unconnected state (steps SA1 to SA5) will be described. First, in step SA1, the CPU 507 confirms whether or not the status is an unconnected state. If the status is not connected, the process proceeds to step SA2, and if the status is not unconnected, the process proceeds to step SB1.

ステップSA2では、CPU507は[Live]ボタンが押下されたか否かを確認する。ステップSA2およびこれ以降のステップで各ボタンの押下の有無を確認する場合、CPU507は、操作部503から出力される信号を監視することによって確認を行う。[Live]ボタンが押下された場合、処理はステップSA3に移行し、[Live]ボタンが押下されなかった場合、処理はステップSB1に移行する。   In step SA2, the CPU 507 confirms whether or not the [Live] button has been pressed. When confirming whether or not each button has been pressed in step SA2 and subsequent steps, the CPU 507 performs confirmation by monitoring a signal output from the operation unit 503. If the [Live] button is pressed, the process proceeds to step SA3. If the [Live] button is not pressed, the process proceeds to step SB1.

ステップSA3では、CPU507はPC5と内視鏡装置1とのネットワーク接続を開始する処理(接続開始処理)を行う。ステップSA3の詳細については、後述する。ステップSA3の後、処理はステップSA4に移行する。   In step SA3, the CPU 507 performs processing (connection start processing) for starting network connection between the PC 5 and the endoscope apparatus 1. Details of step SA3 will be described later. After step SA3, the process proceeds to step SA4.

ステップSA4では、CPU507は、上記ステップSA3における処理の結果、ネットワーク接続ができたか否かを確認する。ネットワーク接続ができた場合、処理はステップSA5に移行し、ネットワーク接続ができなかった場合、処理はステップSB1に移行する。   In step SA4, the CPU 507 confirms whether or not a network connection has been established as a result of the processing in step SA3. If a network connection is established, the process proceeds to step SA5. If a network connection is not established, the process proceeds to step SB1.

ステップSA5では、CPU507はステータスをライブ状態に切り替える。ステップSA5の詳細については、後述する。   In step SA5, the CPU 507 switches the status to the live state. Details of step SA5 will be described later.

次に、ライブ状態における処理の流れ(ステップSB1〜SB8)について説明する。まず、ステップSB1では、CPU507はステータスがライブ状態であるか否かを確認する。ステータスがライブ状態である場合、処理はステップSB2に移行し、ステータスがライブ状態でない場合、処理はステップSC1に移行する。   Next, the flow of processing in the live state (steps SB1 to SB8) will be described. First, in step SB1, the CPU 507 confirms whether the status is live. If the status is live, the process proceeds to step SB2. If the status is not live, the process proceeds to step SC1.

ステップSB2では、CPU507は内視鏡装置1から画像データの受信を行う。ステップSB2の詳細については、後述する。ステップSB2の後、処理はステップSB3に移行する。   In step SB2, the CPU 507 receives image data from the endoscope apparatus 1. Details of step SB2 will be described later. After step SB2, the process proceeds to step SB3.

ステップSB3では、CPU507は[Freeze]ボタンが押下されたか否かを確認する。[Freeze]ボタンが押下された場合、処理はステップSB4に移行し、[Freeze]ボタンが押下されなかった場合、処理はステップSB5に移行する。   In step SB3, the CPU 507 confirms whether or not the [Freeze] button has been pressed. If the [Freeze] button is pressed, the process proceeds to step SB4. If the [Freeze] button is not pressed, the process proceeds to step SB5.

ステップSB4では、CPU507はステータスをフリーズ状態に切り替える。ステップSB4の詳細については、後述する。ステップSB4の終了後、処理はステップ SC1に移行する。   In step SB4, the CPU 507 switches the status to the frozen state. Details of step SB4 will be described later. After step SB4 ends, the process proceeds to step SC1.

ステップSB5では、CPU507は[Stereo-On]ボタンが押下されたか否かを確認する。[Stereo-On]ボタンが押下された場合、処理はステップSB6に移行し、[Stereo-On]ボタンが押下されなかった場合、処理はステップSC1に移行する。   In step SB5, the CPU 507 confirms whether or not the [Stereo-On] button has been pressed. If the [Stereo-On] button is pressed, the process proceeds to step SB6. If the [Stereo-On] button is not pressed, the process proceeds to step SC1.

ステップSB6では、CPU507は内視鏡装置1から環境データの受信を行う。ステップSB6の詳細については、後述する。ステップSB6の後、処理はステップSB7に移行する。   In step SB6, the CPU 507 receives environment data from the endoscope apparatus 1. Details of step SB6 will be described later. After step SB6, the process proceeds to step SB7.

ステップSB7では、CPU507は、上記ステップSB6における処理の結果、環境データを受信できたか否かを確認する。環境データを受信できた場合、処理はステップSB8に移行し、環境データを受信できなかった場合、処理はステップSC1に移行する。   In step SB7, the CPU 507 confirms whether or not environmental data has been received as a result of the processing in step SB6. If the environmental data can be received, the process proceeds to step SB8. If the environmental data cannot be received, the process proceeds to step SC1.

ステップSB8では、CPU507はステータスをライブ-ステレオ状態に切り替える。ステップSB8の詳細については、後述する。   In step SB8, the CPU 507 switches the status to the live-stereo state. Details of step SB8 will be described later.

次に、フリーズ状態における処理の流れ(ステップSC1〜SC7)について説明する。まず、ステップSC1では、CPU507はステータスがフリーズ状態であるか否かを確認する。ステータスがフリーズ状態である場合、処理はステップSC2に移行し、ステータスがフリーズ状態でない場合、処理はステップSD1に移行する。   Next, the flow of processing in the freeze state (steps SC1 to SC7) will be described. First, in step SC1, the CPU 507 confirms whether the status is in a frozen state. If the status is in the frozen state, the process proceeds to step SC2, and if the status is not in the frozen state, the process proceeds to step SD1.

ステップSC2では、CPU507は[Live]ボタンが押下されたか否かを確認する。[Live]ボタンが押下された場合、処理はステップSC3に移行し、[Live]ボタンが押下されなかった場合、処理はステップSC4に移行する。   In step SC2, the CPU 507 confirms whether or not the [Live] button has been pressed. If the [Live] button is pressed, the process proceeds to step SC3. If the [Live] button is not pressed, the process proceeds to step SC4.

ステップSC3では、CPU507はステータスをライブ状態に切り替える。ステップSC3の詳細については、後述する。ステップSC3の終了後、処理はステップSD1に移行する。   In step SC3, the CPU 507 switches the status to the live state. Details of step SC3 will be described later. After step SC3 ends, the process proceeds to step SD1.

ステップSC4では、CPU507は[Stereo-On]ボタンが押下されたか否かを確認する。[Stereo-On]ボタンが押下された場合、処理はステップSC5に移行し、[Stereo-On]ボタンが押下されなかった場合、処理はステップSD1に移行する。   In step SC4, the CPU 507 confirms whether or not the [Stereo-On] button has been pressed. If the [Stereo-On] button is pressed, the process proceeds to step SC5. If the [Stereo-On] button is not pressed, the process proceeds to step SD1.

ステップSC5では、CPU507は内視鏡装置1から環境データの受信を行う。ステップSC5の詳細については、後述する。ステップSC5の後、処理はステップSC6に移行する。   In step SC <b> 5, the CPU 507 receives environment data from the endoscope apparatus 1. Details of step SC5 will be described later. After step SC5, the process proceeds to step SC6.

ステップSC6では、CPU507は、上記ステップSC5における処理の結果、環境データを受信できたか否かを確認する。環境データを受信できた場合、処理はステップSC7に移行し、環境データを受信できなかった場合、処理はステップSD1に移行する。   In step SC6, the CPU 507 confirms whether or not environmental data has been received as a result of the processing in step SC5. If the environment data can be received, the process proceeds to step SC7. If the environment data cannot be received, the process proceeds to step SD1.

ステップSC7では、CPU507はステータスをフリーズ-ステレオ状態に切り替える。ステップSC7の詳細については、後述する。   In step SC7, the CPU 507 switches the status to the freeze-stereo state. Details of step SC7 will be described later.

次に、ライブ-ステレオ状態における処理の流れ(ステップSD1〜SD8)について説明する。まず、ステップSD1では、CPU507はステータスがライブ-ステレオ状態であるか否かを確認する。ステータスがライブ-ステレオ状態である場合、処理はステップSD2に移行し、ステータスがライブ-ステレオ状態でない場合、処理はステップSE1に移行する。   Next, the process flow (steps SD1 to SD8) in the live-stereo state will be described. First, in step SD1, the CPU 507 checks whether the status is a live-stereo state. If the status is the live-stereo state, the process proceeds to step SD2, and if the status is not the live-stereo state, the process proceeds to step SE1.

ステップSD2では、CPU507は内視鏡装置1から画像データの受信を行う。ステップSD2の詳細については、後述する。ステップSD2の後、処理はステップSD3に移行する。   In step SD2, the CPU 507 receives image data from the endoscope apparatus 1. Details of step SD2 will be described later. After step SD2, the process proceeds to step SD3.

ステップSD3では、CPU507は、上記ステップSD2における処理の結果、画像データを受信できたか否かを確認する。画像データを受信できた場合、処理はステップSD4に移行し、画像データを受信できなかった場合、処理はステップSD5に移行する。   In step SD3, the CPU 507 confirms whether image data has been received as a result of the processing in step SD2. If the image data can be received, the process proceeds to step SD4. If the image data cannot be received, the process proceeds to step SD5.

ステップSD4では、CPU507は、内視鏡装置1から受信した環境データおよび画像データに基づいて、ゲージ計測を行う。ステップSD4の詳細については、後述する。ステップSD4の後、処理はステップSD5に移行する。   In step SD4, the CPU 507 performs gauge measurement based on the environmental data and image data received from the endoscope apparatus 1. Details of step SD4 will be described later. After step SD4, the process proceeds to step SD5.

ステップSD5では、CPU507は[Freeze]ボタンが押下されたか否かを確認する。[Freeze]ボタンが押下された場合、処理はステップSD6に移行し、[Freeze]ボタンが押下されなかった場合、処理はステップSD7に移行する。   In step SD5, the CPU 507 confirms whether or not the [Freeze] button has been pressed. If the [Freeze] button is pressed, the process proceeds to step SD6. If the [Freeze] button is not pressed, the process proceeds to step SD7.

ステップSD6では、CPU507はステータスをフリーズ-ステレオ状態に切り替える。ステップSD6の詳細については、後述する。ステップSD6の終了後、処理はステップSE1に移行する。   In step SD6, the CPU 507 switches the status to the freeze-stereo state. Details of step SD6 will be described later. After step SD6 ends, the process proceeds to step SE1.

ステップSD7では、CPU507は[Stereo-Off]ボタンが押下されたか否かを確認する。[Stereo-Off]ボタンが押下された場合、処理はステップSD8に移行し、[Stereo-Off]ボタンが押下されなかった場合、処理はステップSE1に移行する。   In step SD7, the CPU 507 confirms whether or not the [Stereo-Off] button has been pressed. If the [Stereo-Off] button is pressed, the process proceeds to step SD8. If the [Stereo-Off] button is not pressed, the process proceeds to step SE1.

ステップSD8では、CPU507はステータスをライブ状態に切り替える。ステップSD8の詳細については、後述する。   In step SD8, the CPU 507 switches the status to the live state. Details of step SD8 will be described later.

次に、フリーズ-ステレオ状態における処理の流れ(ステップSE1〜SE6)について説明する。まず、ステップSE1では、CPU507はステータスがフリーズ-ステレオ状態であるか否かを確認する。ステータスがフリーズ-ステレオ状態である場合、処理はステップSE2に移行し、ステータスがフリーズ-ステレオ状態でない場合、処理はステップSF1に移行する。   Next, the flow of processing in the freeze-stereo state (steps SE1 to SE6) will be described. First, in step SE1, the CPU 507 checks whether the status is a freeze-stereo state. If the status is the freeze-stereo state, the process proceeds to step SE2, and if the status is not the freeze-stereo state, the process proceeds to step SF1.

ステップSE2では、CPU507は、内視鏡装置1から受信した環境データおよび画像データに基づいて、ゲージ計測を行う。ステップSE2の詳細については、後述する。ステップSE2の終了後、処理はステップSE3に移行する。   In step SE2, the CPU 507 performs gauge measurement based on the environmental data and image data received from the endoscope apparatus 1. Details of step SE2 will be described later. After step SE2 ends, the process proceeds to step SE3.

ステップSE3では、CPU507は[Live]ボタンが押下されたか否かを確認する。[Live]ボタンが押下された場合、処理はステップSE4に移行し、[Live]ボタンが押下されなかった場合、処理はステップSE5に移行する。   In step SE3, the CPU 507 confirms whether or not the [Live] button has been pressed. If the [Live] button is pressed, the process proceeds to step SE4. If the [Live] button is not pressed, the process proceeds to step SE5.

ステップSE4では、CPU507はステータスをライブ-ステレオ状態に切り替える。ステップSE4の詳細については、後述する。ステップSE4の終了後、処理はステップSF1に移行する。   In step SE4, the CPU 507 switches the status to the live-stereo state. Details of step SE4 will be described later. After step SE4 ends, the process proceeds to step SF1.

ステップSE5では、CPU507は[Stereo-Off]ボタンが押下されたか否かを確認する。[Stereo-Off]ボタンが押下された場合、処理はステップSE6に移行し、[Stereo-Off]ボタンが押下されなかった場合、処理はステップSF1に移行する。   In step SE5, the CPU 507 confirms whether or not the [Stereo-Off] button has been pressed. If the [Stereo-Off] button is pressed, the process proceeds to step SE6. If the [Stereo-Off] button is not pressed, the process proceeds to step SF1.

ステップSE6では、CPU507はステータスをフリーズ状態に切り替える。ステップSE6の詳細については、後述する。   In step SE6, the CPU 507 switches the status to the frozen state. Details of step SE6 will be described later.

次に、上記のステップSA1〜SE6の後の処理の流れ(ステップSF1〜SF4)を説明する。まず、ステップSF1では、CPU507は[Exit]ボタンが押下されたか否かを確認する。[Exit]ボタンが押下された場合、処理はステップSF2に移行し、[Exit]ボタンが押下されなかった場合、処理は再度ステップSA1に移行する。   Next, the flow of processing after steps SA1 to SE6 (steps SF1 to SF4) will be described. First, in step SF1, the CPU 507 confirms whether or not the [Exit] button has been pressed. If the [Exit] button is pressed, the process proceeds to step SF2. If the [Exit] button is not pressed, the process proceeds to step SA1 again.

ステップSF2では、CPU507はステータスが未接続状態であるか否かを確認する。ステータスが未接続状態である場合、処理はステップSF4に移行し、ステータスが未接続状態でない場合、処理はステップSF3に移行する。   In step SF2, the CPU 507 confirms whether the status is not connected. If the status is not connected, the process proceeds to step SF4. If the status is not unconnected, the process proceeds to step SF3.

ステップSF3では、CPU507は、PC5と内視鏡装置1とのネットワーク接続を終了する処理(接続終了処理)を行う。ステップSF3の詳細については、後述する。ステップSF3の終了後、処理はステップSF4に移行する。   In step SF3, the CPU 507 performs a process (connection end process) for terminating the network connection between the PC 5 and the endoscope apparatus 1. Details of step SF3 will be described later. After step SF3 ends, the process proceeds to step SF4.

ステップSF4では、CPU507はメインウィンドウを非表示とし、ネットワーク計測ソフトによる一連の処理を終了する。   In step SF4, the CPU 507 hides the main window and ends a series of processing by the network measurement software.

次に、上述した処理において呼び出される各種処理について説明する。図10〜図13は、各ステータスの切替時の処理の流れを示している。図10はステータスをライブ状態に切り替える際の処理の流れを示し、図11はステータスをフリーズ状態に切り替える際の処理の流れを示し、図12はステータスをライブ-ステレオ状態に切り替える際の処理の流れを示し、図13はステータスをフリーズ-ステレオ状態に切り替える際の処理の流れを示している。各処理の説明は以下の通りである。   Next, various processes called in the above-described process will be described. 10 to 13 show the flow of processing when switching the statuses. FIG. 10 shows the flow of processing when the status is switched to the live state, FIG. 11 shows the flow of processing when the status is switched to the freeze state, and FIG. 12 shows the flow of processing when switching the status to the live-stereo state. FIG. 13 shows the flow of processing when the status is switched to the freeze-stereo state. The description of each process is as follows.

図10は、図7のステップSA5、図8のステップSC3,SD8で行われる処理の流れを示している。まず、ステップS100では、CPU507は[Live]ボタンの表示を[Freeze]に切り替える。   FIG. 10 shows the flow of processing performed at step SA5 in FIG. 7 and steps SC3 and SD8 in FIG. First, in step S100, the CPU 507 switches the display of the [Live] button to [Freeze].

続いて、ステップS101では、CPU507は[Stereo-On]ボタンもしくは[Stereo-Off]ボタンを有効化する。有効化とは、ボタンが押下できない状態(例えばグレー状態)から押下可能な状態に切り替えることである。ただし、このステップS101が開始される時点で、既にボタンが有効であるならば、特に有効化は行わない。   In step S101, the CPU 507 activates the [Stereo-On] button or the [Stereo-Off] button. “Activation” refers to switching from a state where the button cannot be pressed (eg, a gray state) to a state where the button can be pressed. However, if the button is already valid when this step S101 is started, no particular validation is performed.

続いて、ステップS102では、CPU507はステータスボックスの表示を「Live」に切り替える。続いて、ステップS103では、CPU507はステータスフラグを「ライブ状態」に設定し、ステータスの切替に関する処理を終了する。   In step S102, the CPU 507 switches the status box display to “Live”. Subsequently, in step S103, the CPU 507 sets the status flag to “live state” and ends the processing related to status switching.

図11は、図7のステップSB4、図9のステップSE6で行われる処理の流れを示している。まず、ステップS110では、CPU507は[Freeze]ボタンの表示を[Live]に切り替える。続いて、ステップS111では、CPU507はステータスボックスの表示を「Freeze」に切り替える。続いて、ステップS112では、CPU507はステータスフラグを「フリーズ状態」に設定し、ステータスの切替に関する処理を終了する。   FIG. 11 shows the flow of processing performed in step SB4 in FIG. 7 and step SE6 in FIG. First, in step S110, the CPU 507 switches the display of the [Freeze] button to [Live]. In step S111, the CPU 507 switches the status box display to “Freeze”. Subsequently, in step S112, the CPU 507 sets the status flag to “freeze state”, and ends the processing related to status switching.

図12は、図7のステップSB8、図9のステップSE4で行われる処理の流れを示している。まず、ステップS120では、CPU507は[Live]ボタンの表示を[Freeze]に切り替える。ただし、このステップS120が開始される時点で、既にボタンが[Freeze]の表示になっているならば、特に表示の切り替えは行わない。   FIG. 12 shows the flow of processing performed in step SB8 in FIG. 7 and step SE4 in FIG. First, in step S120, the CPU 507 switches the display of the [Live] button to [Freeze]. However, if the button is already displayed as [Freeze] at the time when this step S120 is started, the display is not particularly switched.

続いて、ステップS121では、CPU507は[Stereo-On]ボタンの表示を[Stereo-Off]に切り替える。ただし、このステップS121が開始される時点で、既にボタンが[Stereo-Off]の表示になっているならば、特に表示の切り替えは行わない。   Subsequently, in step S121, the CPU 507 switches the display of the [Stereo-On] button to [Stereo-Off]. However, if the button is already displayed as [Stereo-Off] at the time when this step S121 is started, the display is not particularly switched.

続いて、ステップS122では、CPU507はステータスボックスの表示を「Live-Stereo」に切り替える。続いて、ステップS123では、CPU507はステータスフラグを「ライブ-ステレオ状態」に設定し、ステータスの切替に関する処理を終了する。   In step S122, the CPU 507 switches the status box display to “Live-Stereo”. Subsequently, in step S123, the CPU 507 sets the status flag to “live-stereo state”, and ends the processing related to status switching.

図13は、図8のステップSC7,SD6で行われる処理の流れを示している。まず、ステップS130では、CPU507は[Freeze]ボタンの表示を[Live]に切り替える。ただし、このステップS130が開始される時点で、既にボタンが[Freeze]の表示になっているならば、特に表示の切り替えは行わない。   FIG. 13 shows the flow of processing performed in steps SC7 and SD6 of FIG. First, in step S130, the CPU 507 switches the display of the [Freeze] button to [Live]. However, if the button is already displayed as [Freeze] at the time when this step S130 is started, the display is not particularly switched.

続いて、ステップS131では、CPU507は[Stereo-On]ボタンの表示を[Stereo-Off]に切り替える。ただし、このステップS131が開始される時点で、既にボタンが[Stereo-Off]の表示になっているならば、特に表示の切り替えは行わない。   Subsequently, in step S131, the CPU 507 switches the display of the [Stereo-On] button to [Stereo-Off]. However, if the button is already displayed as [Stereo-Off] at the time when this step S131 is started, the display is not particularly switched.

続いて、ステップS132では、CPU507はステータスボックスの表示を「Freeze-Stereo」に切り替える。続いて、ステップS133では、CPU507はステータスフラグを「フリーズ-ステレオ状態」に設定し、ステータスの切替に関する処理を終了する。   In step S132, the CPU 507 switches the status box display to “Freeze-Stereo”. Subsequently, in step S133, the CPU 507 sets the status flag to “freeze-stereo state”, and ends the processing related to status switching.

図14〜図17は、通信時の処理の流れを示している。図14は内視鏡装置1とのネットワーク接続を開始する際の処理の流れを示し、図15は内視鏡装置1から環境データを受信する際の処理の流れを示し、図16は内視鏡装置1から画像データを受信する際の処理の流れを示し、図17は内視鏡装置1とのネットワーク接続を終了する際の処理の流れを示している。各処理の説明は以下の通りである。   14 to 17 show the flow of processing during communication. 14 shows the flow of processing when starting network connection with the endoscope apparatus 1, FIG. 15 shows the flow of processing when receiving environmental data from the endoscope apparatus 1, and FIG. FIG. 17 shows a process flow when the network connection with the endoscope apparatus 1 is terminated. FIG. 17 shows a process flow when receiving image data from the mirror apparatus 1. The description of each process is as follows.

図14は、図7のステップSA3で行われる処理の流れを示している。まず、ステップS140では、CPU507は、アドレスボックス403に入力されたネットワークアドレスを取得する。続いて、ステップS141では、CPU507は、ネットワーク4を介して内視鏡装置1に対してネットワーク接続要求を送信する。ネットワーク接続要求には、ネットワークアドレスの文字列データも含まれる。続いて、ステップS142では、CPU507は、ネットワーク4を介して内視鏡装置1から受信した、ネットワーク接続要求に対する応答の内容を確認する。   FIG. 14 shows the flow of processing performed in step SA3 of FIG. First, in step S140, the CPU 507 acquires the network address input to the address box 403. Subsequently, in step S <b> 141, the CPU 507 transmits a network connection request to the endoscope apparatus 1 via the network 4. The network connection request includes character string data of the network address. Subsequently, in step S142, the CPU 507 confirms the content of the response to the network connection request received from the endoscope apparatus 1 via the network 4.

続いて、ステップS143では、CPU507は、ネットワーク接続要求に対する応答の内容に基づいて、内視鏡装置1と正常に接続されたか否かを確認する。内視鏡装置1と正常に接続できた場合、CPU507は、ネットワーク接続の開始に関する処理を終了する。また、内視鏡装置1と正常に接続できなかった場合、処理はステップS144に移行する。ステップS144では、CPU507は、ネットワーク接続に失敗したことを、図示しないエラーメッセージボックスに表示する処理を行う。エラーメッセージボックスが閉じられると、CPU507は、ネットワーク接続の開始に関する処理を終了する。   Subsequently, in step S143, the CPU 507 confirms whether or not the endoscope apparatus 1 is normally connected based on the content of the response to the network connection request. When the endoscope apparatus 1 can be normally connected, the CPU 507 ends the process related to the start of the network connection. If the endoscope apparatus 1 cannot be connected normally, the process proceeds to step S144. In step S <b> 144, the CPU 507 performs processing for displaying that the network connection has failed in an error message box (not shown). When the error message box is closed, the CPU 507 ends the process related to the start of the network connection.

図15は、図7のステップSB6、図8のステップSC5で行われる処理の流れを示している。まず、ステップS150では、CPU507は、ネットワーク4を介して内視鏡装置1に対して環境データ送信要求を送信する。続いて、ステップS151では、CPU507は、ネットワーク4を介して内視鏡装置1から受信した環境データの内容を確認する。   FIG. 15 shows the flow of processing performed in step SB6 in FIG. 7 and step SC5 in FIG. First, in step S <b> 150, the CPU 507 transmits an environmental data transmission request to the endoscope apparatus 1 via the network 4. Subsequently, in step S <b> 151, the CPU 507 confirms the content of the environmental data received from the endoscope apparatus 1 via the network 4.

続いて、ステップS152では、CPU507は、内視鏡装置1から環境データを正常に受信できたか否かを確認する。環境データを正常に受信できた場合、処理はステップS153に移行する。ステップS153では、CPU507は、受信した環境データをRAM505に記憶し、環境データの受信に関する処理を終了する。また、環境データを正常に受信できなかった場合、処理はステップS154に移行する。ステップS154では、CPU507は、環境データの受信に失敗したことを、図示しないエラーメッセージボックスに表示する処理を行う。エラーメッセージボックスが閉じられると、CPU507は、環境データの受信に関する処理を終了する。   Subsequently, in step S152, the CPU 507 confirms whether or not the environmental data has been normally received from the endoscope apparatus 1. If the environmental data has been successfully received, the process proceeds to step S153. In step S153, the CPU 507 stores the received environment data in the RAM 505, and ends the process related to reception of the environment data. If the environmental data cannot be received normally, the process proceeds to step S154. In step S154, the CPU 507 performs processing for displaying in a not-illustrated error message box that environmental data reception has failed. When the error message box is closed, the CPU 507 ends the process related to reception of the environmental data.

図16は、図7のステップSB2、図8のステップSD2で行われる処理の流れを示している。まず、ステップS160では、CPU507は、ネットワーク4を介して内視鏡装置1に対して画像データ送信要求を送信する。続いて、ステップS161では、CPU507は、内視鏡装置1から受信した画像データの内容を確認する。   FIG. 16 shows the flow of processing performed in step SB2 of FIG. 7 and step SD2 of FIG. First, in step S <b> 160, the CPU 507 transmits an image data transmission request to the endoscope apparatus 1 via the network 4. Subsequently, in step S <b> 161, the CPU 507 confirms the content of the image data received from the endoscope apparatus 1.

続いて、ステップS162では、CPU507は、内視鏡装置1から画像データを正常に受信できたか否かを確認する。画像データを正常に受信できた場合、処理はステップS163に移行する。ステップS163では、CPU507は、受信した画像データをRAM505に記憶する。RAM505に既に画像データが記憶されている場合には、CPU507は画像データを上書きで記憶する。   Subsequently, in step S <b> 162, the CPU 507 confirms whether image data has been normally received from the endoscope apparatus 1. If the image data has been successfully received, the process proceeds to step S163. In step S163, the CPU 507 stores the received image data in the RAM 505. When image data is already stored in the RAM 505, the CPU 507 stores the image data by overwriting.

続いて、ステップS164では、CPU507は、受信した画像データをピクチャボックスに表示する処理を行い、画像データの受信に関する処理を終了する。また、ステップS162において、画像データを正常に受信できなかったと判定した場合も、CPU507は、画像データの受信に関する処理を終了する。画像データの受信は連続して行われるため、受信に失敗した場合でも、その度にエラーメッセージボックスを表示することはしない。   Subsequently, in step S164, the CPU 507 performs processing for displaying the received image data in the picture box, and ends processing related to reception of the image data. Also, when it is determined in step S162 that the image data has not been received normally, the CPU 507 ends the processing related to the reception of the image data. Since image data is received continuously, an error message box is not displayed each time reception fails.

図17は、図9のステップSF3で行われる処理の流れを示している。まず、ステップS170では、CPU507は、ネットワーク4を介して内視鏡装置1に対してネットワーク接続終了要求を送信する。続いて、ステップS171では、CPU507は、内視鏡装置1から受信した、ネットワーク接続終了要求に対する応答の内容を確認する。   FIG. 17 shows the flow of processing performed in step SF3 of FIG. First, in step S <b> 170, the CPU 507 transmits a network connection end request to the endoscope apparatus 1 via the network 4. Subsequently, in step S171, the CPU 507 confirms the content of the response to the network connection end request received from the endoscope apparatus 1.

続いて、ステップS172では、CPU507は、ネットワーク接続要求に対する応答の内容に基づいて、内視鏡装置1とのネットワーク接続が正常に終了したか否かを確認する。ネットワーク接続が正常に終了した場合、CPU507は、ネットワーク接続の終了に関する処理を終了する。また、ネットワーク接続が正常に終了しなかった場合、処理はステップS173に移行する。ステップS173では、CPU507は、ネットワーク接続に失敗したことを、図示しないエラーメッセージボックスに表示する処理を行う。エラーメッセージボックスが閉じられると、CPU507は、ネットワーク接続の終了に関する処理を終了する。   Subsequently, in step S172, the CPU 507 confirms whether or not the network connection with the endoscope apparatus 1 has been normally terminated based on the content of the response to the network connection request. When the network connection ends normally, the CPU 507 ends the process related to the end of the network connection. If the network connection has not been terminated normally, the process proceeds to step S173. In step S173, the CPU 507 performs processing for displaying that the network connection has failed in an error message box (not shown). When the error message box is closed, the CPU 507 ends the process related to the end of the network connection.

次に、図8および図9に示した処理において呼び出されるゲージ計測について説明する。図18は、図8のステップSD4、図9のステップSE2で行われる処理の流れを示している。ゲージ計測では、モニタ502の画面にメインウィンドウが表示され、このメインウィンドウ内に、内視鏡装置1で撮像された計測対象物の画像やゲージ等が表示される。前述したように、ゲージ等を含むメインウィンドウを表示する場合、CPU507は、メインウィンドウを表示するためのグラフィック画像信号(表示信号)に、内視鏡装置1から受信した画像データを重畳する処理を行い、処理後の信号をモニタ502へ出力する。   Next, gauge measurement called in the processing shown in FIGS. 8 and 9 will be described. FIG. 18 shows a flow of processing performed in step SD4 in FIG. 8 and step SE2 in FIG. In the gauge measurement, a main window is displayed on the screen of the monitor 502, and an image, a gauge, and the like of the measurement object captured by the endoscope apparatus 1 are displayed in the main window. As described above, when displaying a main window including a gauge or the like, the CPU 507 performs a process of superimposing the image data received from the endoscope apparatus 1 on the graphic image signal (display signal) for displaying the main window. The processed signal is output to the monitor 502.

図18に示すゲージ計測において、まず、ステップS200では、CPU507は、RAM505に記憶されている環境データを読み込む。続いて、ステップS201では、CPU507は、RAM505に記憶されている画像データを読み込む。続いて、ステップS202では、CPU507は、環境データに記録された計測領域を線としてメインウィンドウに表示する処理を行う。続いて、ステップS203では、CPU507は、操作部503から出力される信号に基づいてカーソル座標を取得する。   In the gauge measurement shown in FIG. 18, first, in step S <b> 200, the CPU 507 reads environment data stored in the RAM 505. In step S <b> 201, the CPU 507 reads image data stored in the RAM 505. Subsequently, in step S202, the CPU 507 performs a process of displaying the measurement area recorded in the environmental data as a line on the main window. Subsequently, in step S <b> 203, the CPU 507 acquires cursor coordinates based on a signal output from the operation unit 503.

続いて、ステップS204では、CPU507は、カーソル座標が左側計測領域内にあるか否かを確認する。カーソル座標が左側計測領域内にある場合、処理はステップS205に移行し、カーソル座標が左側計測領域内にない場合、CPU507は、ゲージ計測に関する処理を終了する。以下では、左側計測領域内のカーソル座標に位置する点を計測点と記載する。   Subsequently, in step S204, the CPU 507 confirms whether or not the cursor coordinates are within the left measurement area. If the cursor coordinates are in the left measurement area, the process proceeds to step S205. If the cursor coordinates are not in the left measurement area, the CPU 507 ends the process related to gauge measurement. Hereinafter, a point located at the cursor coordinates in the left measurement area is referred to as a measurement point.

続いて、ステップS205では、CPU507は、環境データに基づいて画像データの補正処理を行う。この補正処理は、特開平10−248806号公報に記載されているものと同様である。続いて、ステップS206では、CPU507は、画像データに基づいて、左側計測領域内の計測点の画像座標(以下、計測点座標と記載)に対応した、右側計測領域内のマッチング点の画像座標(以下、マッチング点座標と記載)を算出する。より具体的には、CPU507は、計測点座標に基づいてパターンマッチング処理を実行し、左右2画像の対応点であるマッチング点座標を算出する。このパターンマッチング処理の方法は、特開2004−49638号公報に記載されたものと同様である。   Subsequently, in step S205, the CPU 507 performs image data correction processing based on the environmental data. This correction processing is the same as that described in JP-A-10-248806. Subsequently, in step S206, the CPU 507, based on the image data, matches the image coordinates of matching points in the right measurement area (hereinafter referred to as measurement point coordinates) corresponding to the image coordinates of the measurement points in the left measurement area (hereinafter referred to as measurement point coordinates). Hereinafter, the matching point coordinates are calculated. More specifically, the CPU 507 executes pattern matching processing based on the measurement point coordinates, and calculates matching point coordinates that are corresponding points of the left and right two images. The pattern matching processing method is the same as that described in Japanese Patent Application Laid-Open No. 2004-49638.

続いて、ステップS207では、CPU507は、計測点座標およびそのマッチング点座標に基づいて、空間座標(現実の空間上の3次元座標)を算出する。空間座標の計算方法は、特開2004−49638号公報に記載されているものと同様である。この空間座標のZ方向の座標が、挿入部2の先端の固体撮像素子2aの結像面から計測対象物までの距離(対象物距離)となる。   Subsequently, in step S207, the CPU 507 calculates spatial coordinates (three-dimensional coordinates in the real space) based on the measurement point coordinates and the matching point coordinates. The method for calculating the spatial coordinates is the same as that described in Japanese Patent Application Laid-Open No. 2004-49638. The coordinate in the Z direction of the spatial coordinates is the distance (object distance) from the imaging surface of the solid-state imaging device 2a at the tip of the insertion portion 2 to the measurement object.

続いて、ステップS208では、CPU507は、左側計測領域内の計測点座標の位置に計測アイコンを表示し、右側計測領域内のマッチング点座標にマッチングアイコンを表示する処理を行う。続いて、ステップS209では、CPU507は、ステップS207で算出した対象物距離に基づいて、インジケータ数を算出する。インジケータ数とは、表示するインジケータの数であり、1〜9の値をもつ。   Subsequently, in step S208, the CPU 507 performs a process of displaying a measurement icon at the position of the measurement point coordinates in the left measurement area and displaying a matching icon at the matching point coordinates in the right measurement area. Subsequently, in step S209, the CPU 507 calculates the number of indicators based on the object distance calculated in step S207. The number of indicators is the number of indicators to be displayed and has a value of 1 to 9.

続いて、ステップS210では、CPU507は、インジケータ数に基づいてインジケータを表示する処理を行う。続いて、ステップS211では、CPU507は、ステップS207で算出した対象物距離に基づいて、対象物距離を表示する処理を行う。上記のインジケータの表示(ステップS210)および対象物距離の表示(ステップS211)の詳細については、後述する。   Subsequently, in step S210, the CPU 507 performs a process of displaying an indicator based on the number of indicators. Subsequently, in step S211, the CPU 507 performs a process of displaying the object distance based on the object distance calculated in step S207. Details of the indicator display (step S210) and the object distance display (step S211) will be described later.

続いて、ステップS212では、CPU507は、ゲージ計測を行うためのサンプル点の画像座標(以下、サンプル点座標と記載)を算出する。サンプル点座標は、例えば図19に示すように、計測点1900から見て上下左右の方向に、10、20、30、40pixel離れた点(計16点)の座標として算出される。以下では、計測点の上側に並んだサンプル点を上側サンプル点(図19の点1910)と記載し、計測点の下側に並んだサンプル点を下側サンプル点(図19の点1920)と記載し、計測点の左側に並んだサンプル点を左側サンプル点(図19の点1930)と記載し、計測点の右側に並んだサンプル点を右側サンプル点(図19の点1940)と記載する。サンプル点は、計測対象物の表面を近似する平面(後述するゲージ平面)を算出するために必要なものなので、3点以上のサンプル点を用いることが望ましい。また、サンプル点は、特にピクチャボックス404上には表示されない。   Subsequently, in step S212, the CPU 507 calculates image coordinates of sample points (hereinafter referred to as sample point coordinates) for performing gauge measurement. For example, as shown in FIG. 19, the sample point coordinates are calculated as coordinates of points (a total of 16 points) separated by 10, 20, 30, and 40 pixels in the vertical and horizontal directions when viewed from the measurement point 1900. Hereinafter, the sample points arranged above the measurement points are referred to as upper sample points (point 1910 in FIG. 19), and the sample points arranged below the measurement points are referred to as lower sample points (point 1920 in FIG. 19). The sample point that is written and arranged on the left side of the measurement point is described as the left sample point (point 1930 in FIG. 19), and the sample point that is arranged on the right side of the measurement point is described as the right sample point (point 1940 in FIG. 19). . Since the sample points are necessary for calculating a plane (gauge plane described later) that approximates the surface of the measurement object, it is desirable to use three or more sample points. Further, the sample points are not particularly displayed on the picture box 404.

続いて、ステップS213では、CPU507は、左側計測領域内のサンプル点座標に対応した、右側計測領域内のマッチング点座標を算出する。続いて、ステップS214では、CPU507は、サンプル点座標およびそのマッチング点座標に基づいて空間座標を算出する。   Subsequently, in step S213, the CPU 507 calculates matching point coordinates in the right measurement area corresponding to the sample point coordinates in the left measurement area. Subsequently, in step S214, the CPU 507 calculates spatial coordinates based on the sample point coordinates and the matching point coordinates.

続いて、ステップS215では、CPU507は、計測点の空間座標およびサンプル点の空間座標に基づいて、ゲージ平面を算出する。ゲージ平面は、ゲージの属する空間平面であり、計測対象物の表面を近似する平面である。後述するゲージ目盛り点およびゲージ周囲点の空間座標は、このゲージ平面上に位置する。ゲージ平面およびその算出方法の詳細については、後述する。   Subsequently, in step S215, the CPU 507 calculates a gauge plane based on the spatial coordinates of the measurement points and the spatial coordinates of the sample points. The gauge plane is a space plane to which the gauge belongs, and is a plane that approximates the surface of the measurement object. Spatial coordinates of gauge scale points and gauge surrounding points, which will be described later, are located on this gauge plane. Details of the gauge plane and its calculation method will be described later.

続いて、ステップS216では、CPU507は、ゲージ径設定ボックスに設定されたゲージ半径を取得し、RAM505に記憶する。続いて、ステップS217では、CPU507は、ゲージ目盛り設定ボックスに設定されたゲージ目盛り間隔を取得し、RAM505に記憶する。   Subsequently, in step S <b> 216, the CPU 507 acquires the gauge radius set in the gauge diameter setting box and stores it in the RAM 505. Subsequently, in step S217, the CPU 507 acquires the gauge scale interval set in the gauge scale setting box and stores it in the RAM 505.

続いて、ステップS218では、CPU507は、ゲージ平面、ゲージ半径、およびゲージ目盛り間隔に基づいて、ゲージ目盛り点の空間座標を算出する。ゲージ目盛り点は、ゲージ目盛り線を構成する点である。ゲージ目盛り点の空間座標の算出方法の詳細については、後述する。   Subsequently, in step S218, the CPU 507 calculates the spatial coordinates of the gauge scale points based on the gauge plane, the gauge radius, and the gauge scale interval. A gauge scale point is a point constituting a gauge scale line. Details of the method for calculating the spatial coordinates of the gauge scale points will be described later.

続いて、ステップS219では、CPU507は、ゲージ平面およびゲージ半径に基づいて、ゲージ周囲点の空間座標を算出する。ゲージ周囲点は、ゲージ周囲線を構成する点である。ゲージ周囲点の空間座標の算出方法の詳細については、後述する。   Subsequently, in step S219, the CPU 507 calculates the spatial coordinates of the gauge peripheral point based on the gauge plane and the gauge radius. A gauge peripheral point is a point constituting a gauge peripheral line. Details of the method of calculating the spatial coordinates of the gauge peripheral point will be described later.

続いて、ステップS220では、CPU507は、ゲージ目盛り点およびゲージ周囲点の空間座標に基づいて、空間上のゲージ目盛り点およびゲージ周囲点を左側計測領域内の画像平面に投影した点の画像座標を算出する。投影座標は、3次元空間から、挿入部2の先端の固体撮像素子2aが位置する撮像平面(結像面)への透視変換によって算出することができる。   Subsequently, in step S220, the CPU 507 calculates the image coordinates of the points obtained by projecting the gauge scale points and the gauge surrounding points in the space onto the image plane in the left measurement area based on the space coordinates of the gauge scale points and the gauge surrounding points. calculate. The projected coordinates can be calculated by perspective transformation from the three-dimensional space to the imaging plane (imaging plane) where the solid-state imaging device 2a at the tip of the insertion section 2 is located.

続いて、ステップS221では、CPU507は、ゲージ目盛り点の画像座標に基づいて、左側計測領域内の画像上にゲージ目盛り線を重畳表示する処理を行う。ゲージ目盛り線の表示の詳細については、後述する。続いて、ステップS222では、CPU507は、ゲージ周囲点の画像座標に基づいて、左側計測領域内の画像上にゲージ周囲線を重畳表示する処理を行う。ゲージ周囲線の表示の詳細については、後述する。ステップS222の後、CPU507は、ゲージ計測に関する処理を終了する。   Subsequently, in step S221, the CPU 507 performs a process of superimposing and displaying the gauge scale line on the image in the left measurement area based on the image coordinates of the gauge scale point. Details of the display of the gauge scale line will be described later. Subsequently, in step S222, the CPU 507 performs a process of superimposing and displaying the gauge peripheral line on the image in the left measurement area based on the image coordinates of the gauge peripheral point. Details of the display of the gauge peripheral line will be described later. After step S222, the CPU 507 ends the process related to gauge measurement.

次に、図20を用いて、ステップS210,S211における、インジケータおよび対象物距離の表示の詳細を説明する。前述したように、インジケータ数は、対象物距離に比例して変化し、1〜9の値をもつ。   Next, details of display of the indicator and the object distance in steps S210 and S211 will be described with reference to FIG. As described above, the number of indicators varies in proportion to the object distance and has a value of 1 to 9.

図20(a)は、対象物距離が小さい場合(例えば15mm以下)のインジケータおよび対象物距離の表示例である。この場合、インジケータ数は、対象物距離に比例して1〜3の値をもつ。インジケータ2000aおよび対象物距離2010aの背景は、例えば緑色となっている。これは、対象物距離が小さく、計測対象物の画像がステレオ計測およびゲージ計測に適している状態にあることを示している。   FIG. 20A is a display example of an indicator and an object distance when the object distance is small (for example, 15 mm or less). In this case, the number of indicators has a value of 1 to 3 in proportion to the object distance. The background of the indicator 2000a and the object distance 2010a is, for example, green. This indicates that the object distance is small and the image of the measurement object is suitable for stereo measurement and gauge measurement.

図20(b)は、対象物距離が少し大きい場合(例えば15mm〜30mm)のインジケータおよび対象物距離の表示例である。この場合、インジケータ数は、対象物距離に比例して4〜6の値をもつ。インジケータ2000bおよび対象物距離2010bの背景は、例えば黄色となっている。これは、対象物距離が少し大きく、ステレオ計測およびゲージ計測にあまり適さない状態にあることを示している。   FIG. 20B is a display example of the indicator and the object distance when the object distance is slightly larger (for example, 15 mm to 30 mm). In this case, the number of indicators has a value of 4 to 6 in proportion to the object distance. The background of the indicator 2000b and the object distance 2010b is yellow, for example. This indicates that the object distance is slightly large and is not so suitable for stereo measurement and gauge measurement.

図20(c)は、対象物距離が非常に大きい場合(例えば30mm以上)のインジケータおよび対象物距離の表示例である。この場合、インジケータ数は、対象物距離に比例して7〜9の値をもつ。インジケータ2000cおよび対象物距離2010cの背景は、例えば赤色となっている。これは、対象物距離が非常に大きく、ステレオ計測およびゲージ計測に適さない状態にあることを示している。   FIG. 20C is a display example of the indicator and the object distance when the object distance is very large (for example, 30 mm or more). In this case, the number of indicators has a value of 7 to 9 in proportion to the object distance. The background of the indicator 2000c and the object distance 2010c is, for example, red. This indicates that the object distance is very large and is not suitable for stereo measurement and gauge measurement.

次に、ステップS215における、ゲージ平面およびその算出方法の詳細を説明する。ゲージ平面は、計測点の空間点を通り、かつサンプル点の空間点から算出される2本の空間直線(空間直線L,Lとする)を含む平面として算出される。 Next, details of the gauge plane and its calculation method in step S215 will be described. The gauge plane is calculated as a plane that passes through the spatial point of the measurement point and includes two spatial straight lines (referred to as spatial straight lines L 1 and L 2 ) calculated from the spatial point of the sample point.

まず、図21を用いて、空間直線Lの算出方法を説明する。空間直線Lは、計測点の空間点、左側サンプル点の空間点、および右側サンプル点の空間点から求まる。図21(a)には、計測点の空間点P、4つの左側サンプル点の空間点Sl1〜Sl4、4つの右側サンプル点の空間点Sr1〜Sr4が示されている。図21(b)には、点Sl1〜Sl4から点PへのベクトルVl1〜Vl4、および点Pから点Sr1〜Sr4へのベクトルVr1〜Vr4が示されている。 First, with reference to FIG. 21, for explaining the method of calculating the spatial straight line L 1. Spatial straight line L 1, the spatial point of the measurement point, the spatial point of the left sample point, and obtained from the spatial point of the right sample points. FIG. 21A shows space points P of measurement points, four left sample point space points S 11 to S 14 , and four right sample point space points S r1 to S r4 . FIG. 21 (b) the point S l1 to S vector V l1 from l4 to point P ~V l4, and the vector V r1 ~V r4 from point P to point S r1 to S r4 are shown.

点P、点Sl1〜Sl4、および点Sr1〜Sr4の空間座標をそれぞれ(P,P,P)、(Slxi,Slyi,Slzi)、(Srxi,Sryi,Srzi)とすると(i=1〜4)、ベクトルVl1〜Vl4,Vr1〜Vr4の式は、以下の(1)式および(2)式のようになる。
li=(P−Slxi,P−Slyi,P−Slzi) ・・・(1)
ri=(Srxi−P,Sryi−P,Srzi−P) ・・・(2)
The spatial coordinates of the point P, the points S l1 to S 14 , and the points S r1 to S r4 are respectively (P x , P y , P z ), (S lxi , S lyi , S lzi ), (S rxi , S rii). , S rzi ) (i = 1 to 4), the expressions of the vectors V 11 to V 14 and V r1 to V r4 are as shown in the following expressions (1) and (2).
V li = (P x -S lxi , P y -S lyi, P z -S lzi) ··· (1)
V ri = (S rxi -P x , S ryi -P y, S rzi -P z) ··· (2)

図21(c)には、ベクトルVl1〜Vl4,Vr1〜Vr4を平均化した平均ベクトルVa1が示されている。平均ベクトルVa1は、以下の(3)式のようになる。 FIG. 21C shows an average vector V a1 obtained by averaging the vectors V l1 to V l4 and V r1 to V r4 . The average vector V a1 is expressed by the following equation (3).

Figure 0005242335
Figure 0005242335

図21(d)には、点Pを通り、かつベクトルVa1に平行な空間直線Lが示されている。ベクトルVa1を(Va1x,Va1y,Va1z)とすると、空間直線Lの式は、以下の(4)式のようになる。 FIG. 21D shows a spatial straight line L 1 that passes through the point P and is parallel to the vector V a1 . Assuming that the vector V a1 is (V a1x , V a1y , V a1z ), the expression of the space straight line L 1 is as the following expression (4).

Figure 0005242335
Figure 0005242335

次に、図22を用いて、空間直線Lの算出方法を説明する。空間直線Lは、計測点の空間点、上側サンプル点の空間点、および下側サンプル点の空間点から求まる。図22(a)には、計測点の空間点P、4つの上側サンプル点の空間点Su1〜Su4、4つの下側サンプル点の空間点Sd1〜Sd4が示されている。図22(b)には、点Pから点Su1〜Su4へのベクトルVu1〜Vu4、および点Sd1〜Sd4から点PへのベクトルVd1〜Vd4が示されている。 Next, with reference to FIG. 22, for explaining the method of calculating the spatial straight line L 2. Spatial straight line L 2, the spatial point of the measurement point, the spatial point of the upper sample point, and obtained from the spatial point of the lower sample points. In FIG. 22A, the spatial point P of the measurement point, the spatial points S u1 to S u4 of the four upper sample points, and the spatial points S d1 to S d4 of the four lower sample points are shown. In FIG. 22 (b) the vector V u1 ~V u4 from point P to point S u1 to S u4, and the vector V d1 ~V d4 from the point S d1 to S d4 to the point P is shown.

点P、点Su1〜Su4、および点Sd1〜Sd4の空間座標をそれぞれ(P,P,P)、(Suxi,Suyi,Suzi)、(Sdxi,Sdyi,Sdzi)とすると(i=1〜4)、ベクトルVu1〜Vu4,Vd1〜Vd4の式は、以下の(5)式および(6)式のようになる。
ui=(Suxi−P,Suyi−P,Suzi−P) ・・・(5)
di=(P−Sdxi,P−Sdyi,P−Sdzi) ・・・(6)
Point P, the point S u1 to S u4, and the spatial coordinates of the point S d1 to S d4, respectively (P x, P y, P z), (S uxi, S uyi, S uzi), (S dxi, S dyi , S dzi ) (i = 1 to 4), the expressions of vectors V u1 to V u4 and V d1 to V d4 are as shown in the following expressions (5) and (6).
V ui = (S uxi -P x , S uyi -P y, S uzi -P z) ··· (5)
V di = (P x -S dxi , P y -S dyi, P z -S dzi) ··· (6)

図22(c)には、ベクトルVu1〜Vu4,Vd1〜Vd4を平均化した平均ベクトルVa2が示されている。平均ベクトルVa2は、以下の(7)式のようになる。 FIG. 22C shows an average vector V a2 obtained by averaging the vectors V u1 to V u4 and V d1 to V d4 . The average vector V a2 is expressed by the following equation (7).

Figure 0005242335
Figure 0005242335

図22(d)には、点Pを通り、かつベクトルVa2に平行な空間直線Lが示されている。ベクトルVa2を(Va2x,Va2y,Va2z)とすると、空間直線Lの式は、以下の(8)式のようになる。 FIG 22 (d), and through the point P, and the spatial straight line L 2 parallel to the vector V a2 are shown. Assuming that the vector V a2 is (V a2x , V a2y , V a2z ), the expression of the space straight line L 2 is as the following expression (8).

Figure 0005242335
Figure 0005242335

図23(a)には、計測点の空間点P、上記のようにして算出した空間直線L,L、ゲージ平面Sが示されている。上述したように、ゲージ平面Sは、点Pを通り、かつ空間直線L,Lを含む平面として算出される。以下にその算出方法を示す。 FIG. 23A shows the spatial point P of the measurement point, the spatial straight lines L 1 and L 2 calculated as described above, and the gauge plane S. As described above, the gauge plane S is calculated as a plane that passes through the point P and includes the spatial straight lines L 1 and L 2 . The calculation method is shown below.

まず、ゲージ平面Sの式を以下の(9)式のように定義する。
S:Ax+By+Cz=1 ・・・(9)
First, the equation of the gauge plane S is defined as the following equation (9).
S: Ax + By + Cz = 1 (9)

ゲージ平面は点Pを通るので、以下の(10)式が成り立つ。
A・P+B・P+C・P=1 ・・・(10)
Since the gauge plane passes through the point P, the following equation (10) is established.
A * Px + B * Py + C * Pz = 1 (10)

また、ゲージ平面Sの法線ベクトルVは(A,B,C)である。図23(b)より、ベクトルVは空間直線Lの方向ベクトルに垂直であると共に空間直線Lの方向ベクトルにも垂直であることがわかる。空間直線L,Lの方向ベクトルは、上記のようにして算出した平均ベクトルVa1,Va2であり、ベクトルVと平均ベクトルVa1,Va2との内積が0であることから、以下の(11)式および(12)式が成り立つ。
A・Va1x+B・Va1y+C・Va1z=0 ・・・(11)
A・Va2x+B・Va2y+C・Va2z=0 ・・・(12)
Further, the normal vector V p of the gauge plane S is (A, B, C). FIG. 23B shows that the vector V p is perpendicular to the direction vector of the space line L 1 and is also perpendicular to the direction vector of the space line L 2 . The direction vectors of the space straight lines L 1 and L 2 are the average vectors V a1 and V a2 calculated as described above, and the inner product of the vector V p and the average vectors V a1 and V a2 is 0. The following formulas (11) and (12) hold.
A · V a1x + B · V a1y + C · V a1z = 0 (11)
A · V a2x + B · V a2y + C · V a2z = 0 (12)

(10)式〜(12)式より、A,B,Cを求めることで、ゲージ平面Sを算出することができる。   The gauge plane S can be calculated by obtaining A, B, and C from the equations (10) to (12).

次に、ステップS218における、ゲージ目盛り点の空間座標の算出方法の詳細を説明する。まず、図24を用いて、左右に並んだゲージ目盛り点の空間座標の算出方法を説明する。左右に並んだゲージ目盛り点の空間座標は、計測点の空間点P、空間直線L、およびゲージ目盛り間隔から求まる。 Next, details of the method of calculating the spatial coordinates of the gauge scale points in step S218 will be described. First, a method for calculating the spatial coordinates of the gauge scale points arranged side by side will be described with reference to FIG. The spatial coordinates of the gauge scale points arranged side by side are obtained from the spatial point P of the measurement point, the space straight line L 1 , and the gauge scale interval.

図24(a)には、計測点の空間点P、空間直線L、左右に並んだゲージ目盛り点の空間点D,D、ゲージ平面Sが示されている。点D,Dは、空間直線L上にあり、かつ点Pからゲージ目盛り間隔Rだけ離れた位置にある2点である。 FIG. 24A shows a spatial point P of the measurement point, a spatial straight line L 1 , spatial points D 1 and D r of gauge scale points arranged on the left and right, and a gauge plane S. The points D 1 and D r are two points on the space straight line L 1 and located at a position separated from the point P by the gauge scale interval R.

このような点を求める場合は、図24(b)のように、点Pを中心とし、かつゲージ目盛り間隔Rを半径とする球Oを設定する。そして、この球Oと空間直線Lとの交点が点D,Dとなる。球Oの式は、以下の(13)式のようになる。 When obtaining such a point, as shown in FIG. 24B, a sphere O having a point P as the center and a gauge scale interval R as a radius is set. The intersection of the sphere O and spatial straight line L 1 is the point of D l, D r. The equation of the sphere O is as the following equation (13).

Figure 0005242335
Figure 0005242335

点D,Dの空間座標は、(4)式および(13)式によって算出することができる。ここで、Rの値を変更することによって、複数のゲージ目盛り点の空間座標を算出することができる。例えば、ユーザが設定したゲージ半径が2.0mm、ゲージ目盛り間隔が0.5mmであった場合、Rの値を0.5mm間隔で0.5、1.0、1.5、2.0mmに設定することで、図24(c)のように、合計8点のゲージ目盛り点の空間座標を算出することができる。 The spatial coordinates of the points D 1 and D r can be calculated by the equations (4) and (13). Here, by changing the value of R, the spatial coordinates of a plurality of gauge scale points can be calculated. For example, when the gauge radius set by the user is 2.0 mm and the gauge scale interval is 0.5 mm, the value of R is set to 0.5, 1.0, 1.5, and 2.0 mm at intervals of 0.5 mm, so that FIG. Thus, the spatial coordinates of a total of 8 gauge scale points can be calculated.

次に、図25を用いて、上下に並んだゲージ目盛り点の空間座標の算出方法を説明する。上下に並んだゲージ目盛り点は、計測点の空間点P、空間直線L、およびゲージ目盛り間隔から求まる。 Next, a method for calculating the spatial coordinates of the gauge scale points arranged vertically will be described with reference to FIG. The gauge scale points arranged vertically are obtained from the space point P of the measurement point, the space straight line L 2 , and the gauge scale interval.

図25(a)には、計測点の空間点P、空間直線L、左右に並んだゲージ目盛り点の空間点D,D、ゲージ平面Sが示されている。点D,Dは、空間直線L上にあり、かつ点Pからゲージ目盛り間隔Rだけ離れた位置にある2点である。 FIG. 25A shows the space point P of the measurement point, the space line L 2 , the space points D u and D d of the gauge scale points arranged on the left and right, and the gauge plane S. The points D u and D d are two points on the space straight line L 2 and at a position separated from the point P by the gauge scale interval R.

点D,Dの空間座標は、(8)式および(13)式によって算出することができる。ここで、Rの値を変更することによって、複数のゲージ目盛り点の空間座標を算出することができる。例えば、上記と同様に、ユーザが設定したゲージ目盛り間隔が0.5mm、ゲージ半径が2.0mmであった場合、Rの値を0.5mm間隔で0.5、1.0、1.5、2.0mmに設定することで、図25(b)のように、合計8点のゲージ目盛り点の空間座標を算出することができる。 The spatial coordinates of the points D u and D d can be calculated by the equations (8) and (13). Here, by changing the value of R, the spatial coordinates of a plurality of gauge scale points can be calculated. For example, in the same way as above, when the gauge scale interval set by the user is 0.5 mm and the gauge radius is 2.0 mm, by setting the value of R to 0.5, 1.0, 1.5, 2.0 mm at intervals of 0.5 mm, As shown in FIG. 25B, the spatial coordinates of a total of 8 gauge scale points can be calculated.

次に、図26および図27を用いて、ステップS219における、ゲージ周囲点の空間座標の算出方法の詳細を説明する。ゲージ周囲点は、計測点の空間点P、空間直線L1,L2、およびゲージ半径rから求まる。   Next, the details of the method of calculating the spatial coordinates of the gauge peripheral point in step S219 will be described using FIG. 26 and FIG. The gauge peripheral point is obtained from the space point P of the measurement point, the space straight lines L1 and L2, and the gauge radius r.

図26(a)には、計測点の空間点P、空間直線L,L、上下左右に並んだゲージ周囲点の空間点R,R,R,R、ゲージ平面Sが示されている。点R,Rは、空間直線L上にあり、かつ点Pからゲージ半径rだけ離れた位置にある2点である。点R,Rの空間座標は、(4)式と、(13)式の右辺のRをrとした式とによって算出することができる。また、点R,Rは、空間直線L上にあり、かつ点Pからゲージ半径rだけ離れた位置にある2点である。点R,Rの空間座標は、(8)式および(13)式によって算出することができる。そして、これらの4点R,R,R,Rに基づいて、ゲージ周囲点の空間点をより細かい間隔で求めていく。 In FIG. 26 (a), the space point P of the measurement point, the space straight lines L 1 and L 2 , the space points R 1 , R r , R u , R d , and the gauge plane S of the gage surrounding points aligned vertically and horizontally It is shown. The points R 1 and R r are two points on the space straight line L 1 and at a position separated from the point P by the gauge radius r. The spatial coordinates of the points R 1 and R r can be calculated by the equation (4) and the equation in which R on the right side of the equation (13) is r. The points R u and R d are two points that are on the space straight line L 2 and are separated from the point P by the gauge radius r. The spatial coordinates of the points R u and R d can be calculated by the equations (8) and (13). Then, based on these four points R 1 , R r , R u , R d , the spatial points around the gauge are obtained at finer intervals.

図26(b)には、点Pから点R,RへのベクトルVRl,VRuが示されている。点R,Rの空間座標をそれぞれ(Rlx,Rly,Rlz)、(Rux,Ruy,Ruz)とすると、ベクトルVRl,VRuは、以下の(14)式および(15)式のようになる。
Rl=(Rlx−P,Rly−P,Rlz−P) ・・・(14)
Ru=(Rux−P,Ruy−P,Ruz−P) ・・・(15)
FIG. 26B shows vectors V Rl and V Ru from the point P to the points R l and R u . Point R l, the spatial coordinates of R u respectively (R lx, R ly, R lz), (R ux, R uy, R uz) When the vector V Rl, V Ru, the following equation (14) and It becomes like (15) Formula.
V Rl = (R lx -P x , R ly -P y , R lz -P z ) (14)
V Ru = (R ux −P x , R ui −P y , R uz −P z ) (15)

図26(c)には、ベクトルVRl,VRuを平均化した平均ベクトルVが示されている。平均ベクトルVは、 以下の(16)式のようになる。 FIG. 26C shows an average vector V A obtained by averaging the vectors V Rl and V Ru . The average vector V A is expressed by the following equation (16).

Figure 0005242335
Figure 0005242335

図26(d)には、点Pを通り、かつ平均ベクトルVを方向ベクトルとしてもつ空間直線Lが示されている。ベクトルVA1を(VAx,VAy,VAz)とすると、空間直線Lの式は、以下の(17)式のようになる。 FIG. 26D shows a spatial straight line L A that passes through the point P and has the average vector V A as a direction vector. The vector V A1 (V Ax, V Ay , V Az) When the formula of the spatial straight line L A is given by the following equation (17).

Figure 0005242335
Figure 0005242335

図27(a)には、空間直線L上にあり、かつ点Pからゲージ半径r分だけ離れた空間点Rlu,Rrdが示されている。点Rlu,Rrdの空間座標は、(13)式の右辺のRをrとした式と(17)式とによって算出することができる。これにより、点R,Rの間に位置するゲージ周囲点の空間点Rlu、および点R,Rの間に位置するゲージ周囲点の空間点Rrdを算出することができる。さらに、これらのゲージ周囲点の空間点Rlu,Rrdに基づいて、ゲージ周囲点の空間点をより細かい間隔で求めていく。 In FIG. 27 (a) is located in a space straight line L A, and spatial point R lu away from the point P by the gauge radius r min, R rd is shown. The spatial coordinates of the points R lu and R rd can be calculated by the equation where R on the right side of the equation (13) is r and the equation (17). Thus, it is possible to calculate the points R l, spatial point of the gauge circumference point located between R u R lu, and the point R r, the spatial point R rd gauge peripheral points located between R d. Further, based on the spatial points Rlu and Rrd of the gauge peripheral points, the spatial points of the gauge peripheral points are obtained at finer intervals.

図27(b)には、点Pから点RluへのベクトルVRluが示されている。ベクトルVRl,VRuおよびベクトルVRluを用いて、上記と同様の方法で、ゲージ周囲点の空間点を求めると、図27(c)のように、点R,Rluの間に位置するゲージ周囲点の空間点Rllu、および点Rlu,Rの間に位置するゲージ周囲点の空間点Rluuを算出することができる。このような処理を繰り返すことで、最終的に、図27(d)のように、合計32点のゲージ周囲点の空間点が求められ、その空間座標が算出される。なお、ここでは合計32点のゲージ周囲点の空間点が示されているが、より多くの点を求めても良い。 FIG. 27B shows a vector V Rlu from the point P to the point R lu . Using the vectors V Rl and V Ru and the vector V Rlu in the same manner as described above, the spatial point of the gauge surrounding point is obtained, as shown in FIG. 27 (c), between the points R l and R lu. spatial point of the gauge circumference point R llu, and point R lu, the spatial point R luu gauge peripheral points located between R u can be calculated to be. By repeating such processing, finally, as shown in FIG. 27D, a total of 32 spatial points around the gauge are obtained, and the spatial coordinates are calculated. Here, a total of 32 spatial points around the gauge are shown, but more points may be obtained.

次に、図28を用いて、ステップS221,S222における、ゲージ目盛り線およびゲージ周囲線の表示の詳細を説明する。上下方向に並んだゲージ目盛り線に関しては、図28(a)のように、ゲージ目盛り点2800を中心に所定の長さの直線2810が左右方向に描画される。また、左右方向に並んだゲージ目盛り線に関しては、図28(b)のように、ゲージ目盛り点2800を中心に所定の長さの直線2820が上下方向に描画される。このように、ゲージ目盛り点上に描画された直線がゲージ目盛り線となる。   Next, details of display of the gauge scale lines and the gauge peripheral lines in steps S221 and S222 will be described with reference to FIG. With respect to the gauge scale lines arranged in the vertical direction, as shown in FIG. 28A, a straight line 2810 having a predetermined length around the gauge scale point 2800 is drawn in the horizontal direction. As for the gauge scale lines arranged in the left-right direction, a straight line 2820 having a predetermined length is drawn in the vertical direction with the gauge scale point 2800 as the center, as shown in FIG. Thus, the straight line drawn on the gauge scale points becomes the gauge scale line.

また、ゲージ周囲線に関しては、図28(c)のように、隣り合うゲージ周囲点2830を互いにつなぐように線2840(例えば直線)が描画される。このように、ゲージ周囲点を互いにつないで描画された線が、図28(d)に示すゲージ周囲線2850となる。   Regarding the gauge peripheral line, as shown in FIG. 28C, a line 2840 (for example, a straight line) is drawn so as to connect adjacent gauge peripheral points 2830 to each other. In this way, a line drawn by connecting gauge peripheral points to each other is a gauge peripheral line 2850 shown in FIG.

図29は、計測アイコン2910、ゲージ目盛り線2920、ゲージ周囲線2930を含むゲージ2900の全体を示している。実際に左側計測領域内の画像上に表示されるのは図29のようなゲージであり、図28のようなゲージ目盛り点およびゲージ周囲点は表示されない。   FIG. 29 shows the entire gauge 2900 including a measurement icon 2910, a gauge scale line 2920, and a gauge peripheral line 2930. The gauge as shown in FIG. 29 is actually displayed on the image in the left measurement area, and the gauge scale points and the gauge surrounding points as shown in FIG. 28 are not displayed.

また、対象物距離に応じてインジケータおよび対象物距離の背景が変化するのと同様に、対象物距離に応じてゲージの表示色が変化する。表示色を変化させる理由は、インジケータおよび対象物距離の背景の表示色を変化させる理由と同様である。対象物距離が小さい場合(例えば15mm以下)、ゲージは緑色となる。対象物距離が少し大きい場合(例えば15mm〜30mm)、ゲージは黄色となる。対象物距離が非常に大きい場合(例えば30mm以上)、ゲージは赤色となる。   In addition, the display color of the gauge changes according to the object distance in the same manner as the indicator and the background of the object distance change according to the object distance. The reason for changing the display color is the same as the reason for changing the display color of the indicator and the background of the object distance. When the object distance is small (for example, 15 mm or less), the gauge is green. When the object distance is slightly large (for example, 15 mm to 30 mm), the gauge is yellow. When the object distance is very large (for example, 30 mm or more), the gauge is red.

また、計測点周辺の計測対象物の3次元的な形状や傾きに応じてゲージの形状が変化する。ゲージの形状が変化するのは、計測点周辺のサンプル点の空間座標に応じて、ゲージ平面の傾きが変化するためである。   In addition, the shape of the gauge changes according to the three-dimensional shape and inclination of the measurement object around the measurement point. The gauge shape changes because the inclination of the gauge plane changes according to the spatial coordinates of the sample points around the measurement point.

図30(a)は、計測点周辺の計測対象物の表面が、挿入部2の先端に位置する固体撮像素子2aの結像面に対してほぼ平行である場合(正対視)のゲージを示している。この場合、ゲージ平面も固体撮像素子2aの結像面に対してほぼ平行となるため、ゲージ目盛り線3000はほぼ等間隔に並んでおり、かつゲージ周囲線3010もほぼ円状になっている。   FIG. 30A shows a gauge when the surface of the measurement object around the measurement point is substantially parallel to the imaging surface of the solid-state imaging device 2a located at the distal end of the insertion portion 2 (facing). Show. In this case, since the gauge plane is also substantially parallel to the imaging surface of the solid-state imaging device 2a, the gauge scale lines 3000 are arranged at substantially equal intervals, and the gauge peripheral line 3010 is also substantially circular.

図30(b)は、計測点周辺の計測対象物の表面が、固体撮像素子2aの結像面に対して傾いている場合のゲージを示している。より具体的には、計測点周辺の計測対象物の上側に向かうほど、対象物距離が大きくなっている場合である。この場合、上下方向に並んだゲージ目盛り線3020は、上側に向かうほど間隔が小さくなっており、かつゲージ周囲線3030も、上側に向かうほど楕円状につぶれた形状になっている。   FIG. 30B shows a gauge when the surface of the measurement object around the measurement point is tilted with respect to the imaging surface of the solid-state imaging device 2a. More specifically, this is a case where the object distance increases toward the upper side of the measurement object around the measurement point. In this case, the intervals between the gauge scale lines 3020 arranged in the vertical direction become smaller toward the upper side, and the gauge peripheral line 3030 also has an elliptical shape toward the upper side.

図30(c)も、計測点周辺の計測対象物の表面が、固体撮像素子2aの結像面に対して傾いている場合のゲージを示している。より具体的には、計測点周辺の計測対象物の左側に向かうほど、対象物距離が大きくなっている場合である。この場合、左右方向に並んだゲージ目盛り線3040は、左側に向かうほど間隔が小さくなっており、かつゲージ周囲線3050も、左側に向かうほど楕円状につぶれた形状になっている。   FIG. 30C also shows a gauge when the surface of the measurement object around the measurement point is inclined with respect to the imaging surface of the solid-state imaging device 2a. More specifically, this is a case where the object distance increases toward the left side of the measurement object around the measurement point. In this case, the intervals between the gauge scale lines 3040 arranged in the left-right direction are smaller toward the left side, and the gauge peripheral line 3050 is also a shape that is crushed into an ellipse toward the left side.

また、メインウィンドウでユーザが設定したゲージ半径およびゲージ目盛り間隔に応じて、ゲージのサイズが変化する。図31(a)は、ゲージ半径が2.0mm、ゲージ目盛り間隔が0.5mm場合のゲージを示している。図31(b)は、ゲージ半径が4.0mm、ゲージ目盛り間隔が1.0mm場合のゲージを示している。図31(a)の場合と比べて、ゲージ周囲線が広がり、かつゲージ目盛り間隔も大きくなっていることがわかる。図31(c)は、ゲージ半径が1.0mm、ゲージ目盛り間隔が0.2mm場合のゲージを示している。図31(a)の場合と比べて、ゲージ周囲線が縮まり、かつゲージ目盛り間隔も小さくなっていることがわかる。   In addition, the size of the gauge changes according to the gauge radius and gauge scale interval set by the user in the main window. FIG. 31A shows a gauge when the gauge radius is 2.0 mm and the gauge scale interval is 0.5 mm. FIG. 31B shows a gauge when the gauge radius is 4.0 mm and the gauge scale interval is 1.0 mm. Compared to the case of FIG. 31A, it can be seen that the gauge peripheral line is widened and the gauge scale interval is also increased. FIG. 31 (c) shows a gauge when the gauge radius is 1.0 mm and the gauge scale interval is 0.2 mm. Compared to the case of FIG. 31A, it can be seen that the gauge peripheral line is reduced and the gauge scale interval is also reduced.

上述したように、本実施形態によれば、計測対象物の表面を近似する平面上の複数点の空間座標に対応した複数点の画像座標で決まる位置にゲージが表示される。このゲージの形状は、画像の奥行き方向の計測対象物の傾きを反映したものとなるので、画像の奥行き方向の被写体の傾きをユーザに知らせることができる。   As described above, according to the present embodiment, a gauge is displayed at a position determined by a plurality of image coordinates corresponding to a plurality of spatial coordinates on a plane approximating the surface of the measurement object. Since the shape of the gauge reflects the inclination of the measurement object in the depth direction of the image, the user can be notified of the inclination of the subject in the depth direction of the image.

また、本実施形態によれば、ゲージ目盛り間隔だけ離れた2点(ゲージ目盛り点)の空間座標に対応した画像座標の位置にゲージ目盛り線が表示される。さらに、計測点の空間座標に対応した画像座標の位置に計測アイコンが表示され、計測点からゲージ半径だけ離れた点(ゲージ周囲点)の空間座標に対応した画像座標の位置にゲージ周囲線が表示される。ゲージ目盛り線やゲージ周囲線から把握される距離は計測対象物の大きさの基準となるので、計測対象物の大きさをユーザに知らせることができる。また、ゲージ目盛り間隔やゲージ半径はメインウィンドウ内の所定位置に表示されるため、ユーザはゲージ目盛り間隔やゲージ半径を知ることが可能である。したがって、ユーザは、そのゲージ目盛り間隔やゲージ半径を頼りに計測対象物の大きさを計測することができる。   Further, according to the present embodiment, the gauge scale line is displayed at the position of the image coordinates corresponding to the spatial coordinates of two points (gauge scale points) separated by the gauge scale interval. Furthermore, a measurement icon is displayed at the position of the image coordinate corresponding to the spatial coordinate of the measurement point, and a gauge peripheral line is displayed at the position of the image coordinate corresponding to the spatial coordinate of the point (gauge peripheral point) that is separated from the measurement point by the gauge radius Is displayed. Since the distance grasped from the gauge graduation line or the gauge peripheral line is a reference for the size of the measurement object, the user can be informed of the size of the measurement object. Further, since the gauge scale interval and gauge radius are displayed at predetermined positions in the main window, the user can know the gauge scale interval and gauge radius. Therefore, the user can measure the size of the measurement object by relying on the gauge scale interval and the gauge radius.

また、本実施形態によれば、以下の効果も得られる。従来の内視鏡装置では、搭載されるCPUの性能やRAMの容量の限界から、内視鏡装置上で動画像を用いてリアルタイムに計測を行うことが困難であった。しかし、本実施形態によれば、内視鏡装置1からネットワーク経由で動画像をPC5に伝送し、PC5上でリアルタイムに計測を行うことができる。本実施形態では、PC5上でゲージ計測を行うようにしているが、CPUの性能やRAMの容量が十分であれば、内視鏡装置1の計測処理部114が、本実施形態と同様のゲージ計測に関する処理を行うようにしてもよい。   Moreover, according to this embodiment, the following effects are also acquired. In the conventional endoscope apparatus, it is difficult to perform measurement in real time using a moving image on the endoscope apparatus because of the performance of the CPU mounted and the limit of the capacity of the RAM. However, according to this embodiment, a moving image can be transmitted from the endoscope apparatus 1 to the PC 5 via a network, and measurement can be performed on the PC 5 in real time. In the present embodiment, the gauge measurement is performed on the PC 5, but if the CPU performance and the RAM capacity are sufficient, the measurement processing unit 114 of the endoscope apparatus 1 can perform the same gauge as the present embodiment. You may make it perform the process regarding measurement.

次に、本実施形態の変形例を説明する。まず、第1の変形例を説明する。上記では、ゲージの角度(傾き)は固定であったが、本変形例ではゲージの角度を任意に変更することができる。   Next, a modification of this embodiment will be described. First, a first modification will be described. In the above, the angle (tilt) of the gauge is fixed, but in this modification, the angle of the gauge can be arbitrarily changed.

図32は、本変形例におけるゲージ計測で行われる処理の流れを示している。図18に示した処理と異なるのは、ステップS230,S231,S232が追加されていることと、ステップS212のサンプル点座標の算出方法が異なっていることである。これらのステップの処理について、以下に説明する。   FIG. 32 shows the flow of processing performed in gauge measurement in this modification. What is different from the processing shown in FIG. 18 is that steps S230, S231, and S232 are added, and the calculation method of the sample point coordinates in step S212 is different. The processing of these steps will be described below.

ステップS230では、CPU507は、カーソルが左側計測領域内にある状態で、操作部503の有するマウスが左クリックされたか否かを確認する。マウスが左クリックされた場合、処理はステップS231に移行し、マウスが左クリックされなかった場合、処理はステップS205に移行する。ステップS231では、CPU507は、RAM505に記憶されたゲージ角度をインクリメント(増加)する。ゲージ角度の初期値は0deg(0°)であり、本変形例では例えばゲージ角度が30deg単位でインクリメントされる。   In step S230, the CPU 507 confirms whether or not the mouse included in the operation unit 503 has been left-clicked in a state where the cursor is in the left measurement area. If the mouse is left clicked, the process proceeds to step S231. If the mouse is not left clicked, the process proceeds to step S205. In step S231, the CPU 507 increments (increases) the gauge angle stored in the RAM 505. The initial value of the gauge angle is 0 deg (0 °), and in this modification, for example, the gauge angle is incremented in units of 30 deg.

ステップS232では、CPU507は、RAM505に記憶されたゲージ角度を読み込む。続いて、ステップS212では、CPU507は、ゲージ計測を行うためのサンプル点座標を算出する。図19では、計測点から上下左右に見た方向に並んだ点をサンプル点としていた。これに対して、本変形例では、図33のように、図19のサンプル点を、計測点を中心にゲージ角度だけ時計回りに回転させた点をサンプル点としている。   In step S232, the CPU 507 reads the gauge angle stored in the RAM 505. Subsequently, in step S212, the CPU 507 calculates sample point coordinates for performing gauge measurement. In FIG. 19, the points arranged in the direction viewed from the top, bottom, left, and right from the measurement points are used as sample points. On the other hand, in this modified example, as shown in FIG. 33, the sample point in FIG. 19 is a point that is rotated clockwise by the gauge angle around the measurement point.

上下左右の4方向を基準方向とすると、図33(a)では、計測点3300を中心に、基準方向から30deg分、時計回りに回転した方向にサンプル点3310が並んでいることがわかる。また、ステップS230において、再度マウスが左クリックされた場合は、ステップS231において、再度ゲージ角度が30degインクリメントされるので、ゲージ角度は60degとなる。この場合、図33(b)のように、計測点3320を中心に、上下左右の基準方向から60deg分、時計回りに回転した方向にサンプル点3330が並んでいることがわかる。   Assuming that the four directions of up, down, left and right are the reference directions, it can be seen in FIG. 33A that the sample points 3310 are arranged around the measurement point 3300 in a direction rotated clockwise by 30 degrees from the reference direction. If the mouse is left-clicked again in step S230, the gauge angle is incremented by 30 degrees again in step S231, so the gauge angle is 60 degrees. In this case, as shown in FIG. 33B, it can be seen that the sample points 3330 are arranged around the measurement point 3320 in a direction rotated clockwise by 60 deg from the vertical and horizontal reference directions.

さらに、ステップS230において、再度マウスが左クリックされた場合は、ステップS231において、再度ゲージ角度が30degインクリメントされるので、ゲージ角度は90degとなる。この場合、図33(b)のように、計測点3340を中心に、上下左右の基準方向から90deg分、時計回りに回転した方向にサンプル点3350が並ぶことになるが、見た目上は、ゲージ角度が0degの状態に戻ることになる。   Furthermore, when the mouse is left-clicked again in step S230, the gauge angle is incremented by 30 deg again in step S231, so the gauge angle is 90 deg. In this case, as shown in FIG. 33 (b), sample points 3350 are arranged in the direction rotated clockwise by 90 deg from the reference direction of the top, bottom, left and right with the measurement point 3340 as the center. The angle will return to 0deg.

計測点座標を中心にサンプル点座標が回転するということは、それに伴って、算出される空間直線L,Lおよびゲージ平面も3次元空間上で回転するということである。そのため、ゲージも、計測点を中心に回転して表示されることになる。 The fact that the sample point coordinates rotate around the measurement point coordinates means that the calculated space straight lines L 1 and L 2 and the gauge plane also rotate in the three-dimensional space. Therefore, the gauge is also displayed by rotating around the measurement point.

図34(a)は、ゲージ角度が30degの場合に左側計測領域内の画像上に表示されたゲージを示している。計測点を中心にしてゲージが回転していることがわかる。図34(b)は、ゲージ角度が60degの場合に左側計測領域内の画像上に表示されたゲージを示している。計測点を中心にしてゲージが図34(a)の場合よりもさらに回転していることがわかる。図34(c)は、ゲージ角度が90degの場合に左側計測領域内の画像上に表示されたゲージを示している。計測点を中心にしてゲージが図34(b)の場合よりもさらに回転し、元の角度に戻っていることがわかる。   FIG. 34A shows a gauge displayed on the image in the left measurement area when the gauge angle is 30 deg. It can be seen that the gauge rotates around the measurement point. FIG. 34B shows the gauge displayed on the image in the left measurement area when the gauge angle is 60 deg. It can be seen that the gauge rotates further around the measurement point than in the case of FIG. FIG. 34C shows the gauge displayed on the image in the left measurement area when the gauge angle is 90 deg. It can be seen that the gauge rotates further around the measurement point than in the case of FIG. 34 (b) and returns to the original angle.

このように、ゲージの角度を任意に変更することで、画面に写っている計測対象物の角度に合わせて、ゲージによるサイズ計測を行うことができる。本変形例では、ゲージ角度を30degずつインクリメントさせていたが、他の角度を用いてもでも良い。ただし、インクリメントする角度は、15deg、30deg、45degなど、90degの約数を用いると良い。そうすれば、ゲージ角度をインクリメントしていくと、ゲージ角度はいずれ90degとなり、見た目上は、ゲージ角度が0degの状態に戻ることになる。   In this way, by arbitrarily changing the angle of the gauge, it is possible to perform size measurement using the gauge in accordance with the angle of the measurement object shown on the screen. In this modification, the gauge angle is incremented by 30 degrees, but other angles may be used. However, the increment angle may be a divisor of 90 deg, such as 15 deg, 30 deg, or 45 deg. Then, as the gauge angle is incremented, the gauge angle will eventually become 90 deg, and the gauge angle will return to the 0 deg state.

本変形例によれば、計測対象物が所定の方向に対して傾いて映っていた場合でも、ユーザは、ゲージを任意に回転させることで、精度の高いゲージ計測を行うことができる。   According to the present modification, even when the measurement object is reflected with respect to a predetermined direction, the user can perform highly accurate gauge measurement by arbitrarily rotating the gauge.

次に、本実施形態の第2の変形例を説明する。本変形例では、対象物距離が変化しても、ゲージ半径、ゲージ目盛り間隔が常に適切なサイズで表示されるように、ネットワーク計測ソフトがゲージ半径、ゲージ目盛り間隔の設定を自動的に変更する機能を備えている。本実施形態では、ユーザがゲージ設定ボックスにより設定するゲージ半径、ゲージ目盛り間隔は、3次元空間上の固定された長さであるため、対象物距離に応じて、2次元平面(固体撮像素子2aの結像面)に投影したそれらの長さが以下のように変化する。   Next, a second modification of the present embodiment will be described. In this modification, the network measurement software automatically changes the settings of the gauge radius and gauge scale interval so that the gauge radius and gauge scale interval are always displayed in an appropriate size even if the object distance changes. It has a function. In the present embodiment, the gauge radius and gauge scale interval set by the user using the gauge setting box is a fixed length in the three-dimensional space, and therefore, a two-dimensional plane (solid-state imaging device 2a) according to the object distance. Their lengths projected on the image plane) change as follows.

図35は、本実施形態における、対象物距離に応じたゲージの表示サイズの変化を示している。図35(a)は、対象物距離が小さい場合のゲージの表示例である。この場合、表示されたゲージ3500のゲージ半径、ゲージ目盛り間隔が共に非常に大きくなっている。このようなゲージ3500は、ゲージ目盛り間隔が大きすぎて計測対象物のサイズを詳細に測れなかったり、ゲージ3500が計測領域3510からはみ出したりするなど、必ずしも計測対象物のサイズを測る上で有効ではないことがある。   FIG. 35 shows a change in the display size of the gauge according to the object distance in the present embodiment. FIG. 35 (a) is a display example of the gauge when the object distance is small. In this case, the gauge radius and gauge scale interval of the displayed gauge 3500 are both very large. Such a gauge 3500 is not necessarily effective in measuring the size of the measurement object, for example, the gauge scale interval is too large to measure the size of the measurement object in detail, or the gauge 3500 protrudes from the measurement region 3510. There may not be.

図35(b)は、対象物距離が少し大きい場合のゲージの表示例である。この場合、表示されたゲージ3520のゲージ半径、ゲージ目盛り間隔が適切な大きさとなっている。図35(c)は、対象物距離が非常に大きい場合のゲージの表示例である。この場合、表示されたゲージ3530のゲージ半径、ゲージ目盛り間隔が共に非常に小さくなっている。このようなゲージ3530は、計測対象物のサイズを測る上で明らかに有効ではない。   FIG. 35B is a display example of a gauge when the object distance is slightly larger. In this case, the gauge radius and gauge scale interval of the displayed gauge 3520 are appropriate. FIG. 35C is a display example of the gauge when the object distance is very large. In this case, the gauge radius and gauge scale interval of the displayed gauge 3530 are both very small. Such a gauge 3530 is clearly not effective in measuring the size of the measurement object.

このように、本実施形態では、対象物距離に応じて、ゲージ半径、ゲージ目盛り間隔の大きさが変化してしまうため、計測対象物のサイズを測る上で必ずしも有効ではないことがあった。そこで、本変形例では、対象物距離が変化しても、ゲージ半径、ゲージ目盛り間隔が常に適切なサイズで表示されるように、ネットワーク計測ソフトがゲージ半径、ゲージ目盛り間隔の設定を自動的に変更する機能を備えている。   Thus, in this embodiment, the size of the gauge radius and the gauge scale interval changes according to the object distance, and therefore it may not always be effective in measuring the size of the measurement object. Therefore, in this modification, the network measurement software automatically sets the gauge radius and gauge scale interval so that the gauge radius and gauge scale interval are always displayed in the appropriate size even if the object distance changes. It has a function to change.

図36は、本変形例におけるゲージ設定ボックスを示している。ゲージ設定ボックスの下側には、前述したゲージ径設定ボックス3600、ゲージ目盛り設定ボックス3610に加えて、pixel単位で長さを設定するゲージ半径設定ボックス3620、ゲージ目盛り設定ボックス3630が配置されている。   FIG. 36 shows a gauge setting box in this modification. Below the gauge setting box, in addition to the above-described gauge diameter setting box 3600 and gauge scale setting box 3610, a gauge radius setting box 3620 and a gauge scale setting box 3630 for setting the length in pixel units are arranged. .

さらにゲージ設定ボックスの左側には、ラジオボタン3640,3650も配置されている。ユーザは、これらのラジオボタン3640,4650によって、ゲージ半径およびゲージ目盛り間隔をmm(もしくはinch)単位で設定するか、pixel単位で設定するかを選択することができる。   Further, radio buttons 3640 and 3650 are also arranged on the left side of the gauge setting box. With these radio buttons 3640 and 4650, the user can select whether to set the gauge radius and gauge scale interval in units of mm (or inches) or in units of pixels.

ユーザが上側のラジオボタン3640を選択した場合、ゲージ設定ボックスは図36(a)のような状態となり、ネットワーク計測ソフトの動作モードは、ゲージ半径およびゲージ目盛り間隔をmm(もしくはinch)単位で設定するモードとなる。pixel単位で設定するゲージ径設定ボックス3620、ゲージ目盛り設定ボックス3630は無効状態となり、数値も表示されない。これは、本実施形態と同じモードである。   When the user selects the upper radio button 3640, the gauge setting box is in a state as shown in FIG. 36A, and the operation mode of the network measurement software sets the gauge radius and the gauge scale interval in units of mm (or inch). Mode. The gauge diameter setting box 3620 and the gauge scale setting box 3630 set in pixel units are disabled, and no numerical value is displayed. This is the same mode as this embodiment.

一方、ユーザが下側のラジオボタン3650を選択した場合、ゲージ設定ボックスは図36(b)のような状態となり、ネットワーク計測ソフトの動作モードは、ゲージ半径およびゲージ目盛り間隔をpixel単位で設定する状態となる。mm(もしくはinch)単位で設定するゲージ径設定ボックス3600、ゲージ目盛り設定ボックス3610は無効状態となる。ただし、数値は表示される。本変形例では、このモードを選択する。   On the other hand, when the user selects the lower radio button 3650, the gauge setting box is in a state as shown in FIG. 36B, and the operation mode of the network measurement software sets the gauge radius and the gauge scale interval in pixels. It becomes a state. The gauge diameter setting box 3600 and the gauge scale setting box 3610 set in units of mm (or inch) are disabled. However, numerical values are displayed. In this modification, this mode is selected.

図37は、本変形例におけるゲージ計測で行われる処理の流れを示している。図18に示したゲージ計測で行われる処理と異なるのは、単位長さの算出(ステップS240)とゲージ半径およびゲージ目盛り間隔の表示(ステップS243,S244)が追加されていること、ステップS216,S217の代わりにゲージ半径およびゲージ目盛り間隔をpixel単位で取得する(ステップS241,S242)ようになっていること、ゲージ目盛り点およびゲージ周囲点の空間座標の算出方法(ステップS218,S219)である。これらのステップについて、以下に説明する。   FIG. 37 shows the flow of processing performed in gauge measurement in this modification. 18 is different from the process performed in the gauge measurement shown in FIG. 18 in that a unit length calculation (step S240) and display of gauge radius and gauge scale interval (steps S243 and S244) are added, step S216. Instead of S217, the gauge radius and the gauge scale interval are acquired in units of pixels (steps S241 and S242), and the spatial coordinate calculation method of the gauge scale points and gauge peripheral points (steps S218 and S219). . These steps are described below.

まず、図38を用いて、ステップS240における単位長さの算出方法を説明する。単位長さとは、計測画面における1pixelに対応した、空間上におけるmm(もしくはinch)単位の長さのことであり、後述するゲージ目盛り点およびゲージ周囲点の空間座標を算出する際に使用する。単位長さは、対象物距離に応じて変化する。概して、対象物距離が大きいほど単位長さは小さくなり、対象物距離が小さいほど単位長さは大きくなる。   First, the unit length calculation method in step S240 will be described with reference to FIG. The unit length is the length in mm (or inch) unit in space corresponding to 1 pixel on the measurement screen, and is used when calculating the space coordinates of the gauge scale points and the gauge surrounding points described later. The unit length changes according to the object distance. In general, the unit length decreases as the object distance increases, and the unit length increases as the object distance decreases.

図38(a)には、計測点の空間点P、4つの左側サンプル点の空間点Sl1〜Sl4、4つの右側サンプル点の空間点Sr1〜Sr4が示されている。図38(b)には、点Sl1〜Sl4と点Pとの距離Ll1〜Ll4、および点Sr1〜Sr4と点Pとの距離Lr1〜Lr4が示されている。点P、点Sl1〜Sl4、および点Sr1〜Sr4の空間座標をそれぞれ(P,P,P)、(Slxi,Slyi,Slzi)、(Srxi,Sryi,Srzi)とすると(i=1〜4)、距離Ll1〜Ll4,Lr1〜Lr4の式は、以下の(18)式および(19)式のようになる。 FIG. 38A shows space points P of measurement points, four left sample point space points S 11 to S 14 , and four right sample point space points S r1 to S r4 . Figure 38 (b) is the point S l1 to S l4 and the distance L l1 ~L l4 between the point P, and the point S r1 to S r4 and the distance L r1 ~L r4 between the point P is shown. The spatial coordinates of the point P, the points S l1 to S 14 , and the points S r1 to S r4 are represented by (P x , P y , P z ), (S lxi , S lyi , S lzi ), (S rxi , S rii ), respectively. , S rzi ) (i = 1 to 4), the expressions of the distances L 11 to L 14 and L r1 to L r4 are as shown in the following expressions (18) and (19).

Figure 0005242335
Figure 0005242335

Figure 0005242335
Figure 0005242335

ここで、距離Ll1は点Sl1と点Pとの距離であり、点Sl1は計測点から10pixel離れたサンプル点から算出された空間点であるので、単位長さはLl1/10となる。また、距離Ll2は点Sl2と点Pとの距離であり、点Sl2は計測点から20pixel離れたサンプル点から算出された空間点であるので、単位長さはLl2/20となる。同様に、距離Ll3、Ll4については、単位長さはそれぞれLl3/30、Ll4/40となる。さらに、距離Lr1〜Lr4については、単位長さはそれぞれLr1/10、Lr2/20、Lr3/30、Lr4/40となる。これらの平均を取ることにより、左側サンプル点および右側サンプル点の空間点から求めた単位長さLlrpは、以下の(20)式のようになる。 Here, the distance L 11 is a distance between the point S 11 and the point P, and the point S 11 is a spatial point calculated from a sample point 10 pixels away from the measurement point, so the unit length is L 11/10. Become. The distance L l2 is the distance between the point S l2 and the point P, since the point S l2 is a spatial point calculated from the sample points away 20pixel from the measurement point, the unit length becomes L l2 / 20 . Similarly, for the distances L 13 and L 14 , the unit lengths are L 13/30 and L 14/40 , respectively. Further, for the distances L r1 to L r4 , the unit lengths are L r1 / 10, L r2 / 20, L r3 / 30, and L r4 / 40, respectively. By taking these averages, the unit length L lrp obtained from the spatial points of the left sample point and the right sample point is expressed by the following equation (20).

Figure 0005242335
Figure 0005242335

図38(c)には、計測点の空間点P、4つの上側サンプル点の空間点Su1〜Su4、4つの下側サンプル点の空間点Sd1〜Sd4が示されている。図38(d)には、点Su1〜Su4と点Pとの距離Lu1〜Lu4、および点Sd1〜Sd4と点Pとの距離Ld1〜Ld4が示されている。点Su1〜Su4,点Sd1〜Sd4の空間座標をそれぞれ(Suxi,Suyi,Suzi)、(Sdxi,Sdyi,Sdzi)とすると(i=1〜4)、距離Lu1〜Lu4,Ld1〜Ld4の式は、以下の(21)式および(22)式のようになる。 FIG. 38C shows the spatial points P of the measurement points, the spatial points S u1 to S u4 of the four upper sample points, and the spatial points S d1 to S d4 of the four lower sample points. FIG. 38D shows the distances L u1 to L u4 between the points S u1 to S u4 and the point P, and the distances L d1 to L d4 between the points S d1 to S d4 and the point P. Point S u1 to S u4, the spatial coordinates of the point S d1 to S d4, respectively (S uxi, S uyi, S uzi), (S dxi, S dyi, S dzi) When (i = 1~4), the distance Expressions of L u1 to L u4 and L d1 to L d4 are as shown in the following expressions (21) and (22).

Figure 0005242335
Figure 0005242335

Figure 0005242335
Figure 0005242335

また、上記と同様に、上側サンプル点および下側サンプル点の空間点から求めた単位長さLudpは、以下の(23)式のようになる。 Similarly to the above, the unit length L udp obtained from the space points of the upper sample point and the lower sample point is expressed by the following equation (23).

Figure 0005242335
Figure 0005242335

上記において求めた単位長さLlrp,Ludpのうち、より大きい方を採用し、これを単位長さLとする。これは、単位長さが大きいほうが、上下方向に並んだサンプル点の空間点、および左右方向に並んだサンプル点の空間点のうち、挿入部2の先端に位置する固体撮像素子2aの結像面に対して、より平行に近い方向に並んでいると考えられるからである。言い換えると、上下方向に並んだサンプル点の空間点、および左右方向に並んだサンプル点の空間点のうち、単位長さが大きいほうに対応した空間点のほうが、挿入部2の先端に位置する固体撮像素子2aの結像面に対して、より平行に近い方向に並んでいると考えられるからである。 Of the unit lengths L lrp and L udp determined above, the larger one is adopted, and this is defined as the unit length L p . This is because the larger the unit length, the imaging of the solid-state imaging device 2a located at the tip of the insertion portion 2 among the spatial points of the sample points arranged in the vertical direction and the spatial points of the sample points arranged in the horizontal direction. This is because they are considered to be arranged in a direction closer to parallel to the surface. In other words, among the spatial points of the sample points arranged in the vertical direction and the spatial points of the sample points arranged in the horizontal direction, the spatial point corresponding to the larger unit length is positioned at the distal end of the insertion portion 2. This is because it is considered that they are arranged in a direction closer to parallel to the imaging surface of the solid-state imaging device 2a.

ステップS241では、CPU507は、pixel単位のゲージ径設定ボックス3620に設定されたゲージ半径を取得し、RAM505に記憶する。ステップS242では、CPU507は、pixel単位のゲージ目盛り設定ボックス3630に設定されたゲージ目盛り間隔を取得し、RAM505に記憶する。   In step S <b> 241, the CPU 507 acquires the gauge radius set in the gauge diameter setting box 3620 in pixel units, and stores it in the RAM 505. In step S <b> 242, the CPU 507 acquires the gauge scale interval set in the pixel scale gauge scale setting box 3630 and stores it in the RAM 505.

ステップS218では、CPU507は、ゲージ平面、ゲージ半径、およびゲージ目盛り間隔に基づいて、ゲージ目盛り点の空間座標を算出する。ただし、ステップS241,S242で取得したゲージ半径およびゲージ目盛り間隔はpixel単位であるので、CPU507は、これらに単位長さLを乗算して、mm(もしくはinch)単位に変換する。これ以降、CPU507は、前述した方法と同様の方法でゲージ目盛り点の空間座標を算出する。 In step S218, the CPU 507 calculates the spatial coordinates of the gauge scale points based on the gauge plane, the gauge radius, and the gauge scale interval. However, since the gauge radius and gauge scale interval obtained in step S241, S242 are pixel units, CPU 507 multiplies these to unit length L p, converted to mm (or inch) units. Thereafter, the CPU 507 calculates the spatial coordinates of the gauge scale points by the same method as described above.

ステップS219では、CPU507は、ゲージ平面およびゲージ半径に基づいて、ゲージ周囲点の空間座標を算出する。ただし、ステップS241で取得したゲージ半径はpixel単位であるので、CPU507は、これに単位長さLを乗算して、mm(もしくはinch)単位に変換する。これ以降、CPU507は、前述した方法と同様の方法でゲージ周囲点の空間座標を算出する。 In step S219, the CPU 507 calculates the spatial coordinates of the gauge peripheral point based on the gauge plane and the gauge radius. However, since the gauge radius obtained in step S241 it is pixel unit, CPU 507, This in units multiplied by the length L p, converted to mm (or inch) units. Thereafter, the CPU 507 calculates the spatial coordinates of the gauge surrounding points by the same method as described above.

ステップS243では、CPU507は、mm(もしくはinch)単位に変換されたゲージ半径をmm(もしくはinch)単位のゲージ径設定ボックス3600に表示する処理を行う。ステップS244では、CPU507は、mm(もしくはinch)単位に変換されたゲージ目盛り間隔をmm(もしくはinch)単位のゲージ目盛り設定ボックス3610に表示する処理を行う。   In step S243, the CPU 507 performs a process of displaying the gauge radius converted into mm (or inch) units in the gauge diameter setting box 3600 in mm (or inch) units. In step S244, the CPU 507 performs processing for displaying the gauge scale interval converted to mm (or inch) unit in the gauge scale setting box 3610 in mm (or inch) unit.

図39は、本変形例における、対象物距離に応じたゲージの表示サイズの変化を示している。図39(a)は、対象物距離が小さい場合のゲージの表示例である。図39(b)は、対象物距離が図39(a)の場合よりも少し大きい場合のゲージの表示例である。図39(c)は、図39(a)の場合よりも対象物距離が非常に大きい場合のゲージの表示例である。図39(a)〜(c)に示すように、対象物距離が変化してもゲージ3900の表示サイズは変化せず、ほぼ一定である。これは、対象物距離が変化しても、pixel単位のゲージ半径およびゲージ目盛り間隔が一定になるように、mm(もしくはinch)単位のゲージ半径およびゲージ目盛り間隔が変更されるからである。   FIG. 39 shows a change in the display size of the gauge according to the object distance in the present modification. FIG. 39A shows an example of gauge display when the object distance is small. FIG. 39B is a display example of a gauge when the object distance is slightly larger than that in FIG. FIG. 39C is a display example of a gauge when the object distance is much larger than in the case of FIG. As shown in FIGS. 39A to 39C, even if the object distance changes, the display size of the gauge 3900 does not change and is almost constant. This is because the gauge radius and the gauge scale interval in mm (or inch) are changed so that the gauge radius and the gauge scale interval in pixel units become constant even if the object distance changes.

図40は、本変形例における、対象物距離に応じたゲージ設定ボックスの表示の変化を示している。図40(a)、(b)、(c)は、それぞれ対象物距離が小さい場合、少し大きい場合、非常に大きい場合のゲージ設定ボックスの表示例である。対象物距離に応じて、mm(もしくはinch)単位のゲージ径設定ボックス4000、ゲージ目盛り設定ボックス4010の値が変化することがわかる。   FIG. 40 shows a change in display of the gauge setting box according to the object distance in the present modification. 40A, 40 </ b> B, and 40 </ b> C are display examples of the gauge setting box when the object distance is small, slightly large, or very large. It can be seen that the values of the gauge diameter setting box 4000 and the gauge scale setting box 4010 in mm (or inch) units change according to the object distance.

本変形例によれば、対象物距離が変化しても、ゲージ半径、ゲージ目盛り間隔が常に適切なサイズで表示されるので、ユーザは、ゲージを用いて、効率的に計測対象物のサイズを測ることができる。   According to this modified example, even if the object distance changes, the gauge radius and the gauge scale interval are always displayed in appropriate sizes, so the user can use the gauge to efficiently measure the size of the measurement object. Can be measured.

次に、本実施形態の第3の変形例を説明する。本実施形態では、サンプル点間隔は常に一定であったが、本変形例では、ユーザがサンプル点間隔を任意に変更することができる。さらに、本変形例では、対象物距離に応じて、ネットワーク計測ソフトがサンプル点間隔を自動的に変更する機能を備えている。   Next, a third modification of the present embodiment will be described. In the present embodiment, the sample point interval is always constant, but in the present modification, the user can arbitrarily change the sample point interval. Furthermore, in this modification, the network measurement software has a function of automatically changing the sample point interval according to the object distance.

本実施形態では、サンプル点間隔は常に一定であった。そのため、図41(a)のように、丸くくぼんだ領域4100をもつ計測対象物に対してゲージ計測を行う際、カーソルの位置によっては、図41(b)のように、サンプル点4110が、くぼんだ領域4100とそうでない領域とにまたがって設定され、正確なゲージ平面を算出できないことがあった。そこで、サンプル点として用いる範囲を設定できるように、本変形例では、ユーザがサンプル点間隔を任意に変更することができる。   In this embodiment, the sample point interval is always constant. Therefore, when gauge measurement is performed on a measurement object having a rounded and recessed area 4100 as shown in FIG. 41A, depending on the position of the cursor, the sample point 4110 as shown in FIG. It is set across the recessed area 4100 and the other area, and an accurate gauge plane may not be calculated. Therefore, in this modification, the user can arbitrarily change the sample point interval so that the range used as sample points can be set.

ゲージ計測中に、ユーザが左側計測領域内でマウスを右クリックすると、一定期間ゲージが非表示となり、図42(a)のように、サンプル点4200が表示される。この状態で、ユーザがマウスを一定期間右クリックしないままでおくと、サンプル点4200が非表示となり、ゲージが再度表示される。   When the user right-clicks the mouse in the left measurement area during the gauge measurement, the gauge is not displayed for a certain period of time, and the sample point 4200 is displayed as shown in FIG. In this state, if the user does not right click the mouse for a certain period, the sample point 4200 is hidden and the gauge is displayed again.

図42(a)の状態から、ユーザがマウスを右クリックすると、図42(b)のように、サンプル点間隔が小さくなって、サンプル点4200が表示される。この状態で、ユーザがマウスを一定期間右クリックしないままでおくと、サンプル点が非表示となり、ゲージが再度表示される。このとき、間隔が小さくなったサンプル点を用いて、ゲージの計算が行われる。   When the user right-clicks the mouse from the state of FIG. 42A, the sample point interval is reduced and the sample point 4200 is displayed as shown in FIG. In this state, if the user does not right-click the mouse for a certain period, the sample point is hidden and the gauge is displayed again. At this time, the gauge is calculated using the sample points with a small interval.

図42(b)の状態から、ユーザがマウスを右クリックすると、図42(c)のように、サンプル点間隔が大きくなって、サンプル点4200が表示される。この状態で、ユーザがマウスを一定期間右クリックしないままでおくと、サンプル点が非表示となり、ゲージが再度表示される。このとき、間隔が大きくなったサンプル点を用いて、ゲージの計算が行われる。図42(c)の状態から、再度ユーザがマウスを右クリックすると、図42(d)のように、サンプル点間隔が元に戻り、図42(a)と同じ状態になる。   When the user right-clicks the mouse from the state of FIG. 42B, the sample point interval is increased and the sample point 4200 is displayed as shown in FIG. In this state, if the user does not right-click the mouse for a certain period, the sample point is hidden and the gauge is displayed again. At this time, the gauge is calculated using the sample points having a large interval. When the user right-clicks the mouse again from the state shown in FIG. 42C, the sample point interval is restored to the original state as shown in FIG.

このように、ユーザが左側計測領域内でマウスを右クリックすることにより、サンプル点間隔を任意に変更することができる。CPU507は、ユーザによるマウスの操作結果に応じて操作部503から出力される信号に基づいてサンプル点間隔を設定する。なお、上記の例では、サンプル点間隔は3段階しか変化していないが、より多くの段階にサンプル点間隔を変化させることができるようにしても良い。   Thus, the sample point interval can be arbitrarily changed by the user right-clicking the mouse in the left measurement area. The CPU 507 sets the sample point interval based on a signal output from the operation unit 503 in accordance with the mouse operation result by the user. In the above example, the sample point interval changes only in three steps, but the sample point interval may be changed in more steps.

上記の方法では、ユーザがサンプル点間隔を任意に変更していたが、他の方法として、対象物距離に応じて、ネットワーク計測ソフトがサンプル点間隔を自動的に変更する機能を備えていても良い。この方法を以下に説明する。   In the above method, the user arbitrarily changed the sample point interval. However, as another method, the network measurement software may have a function of automatically changing the sample point interval according to the object distance. good. This method will be described below.

図43は、ネットワーク計測ソフトが保持しているサンプル点間隔テーブルの一例を示している。サンプル点間隔テーブルは、対象物距離とサンプル点間隔との関係を示したものである。サンプル点間隔テーブルでは、対象物距離が大きくなるに従って、サンプル点間隔が大きくなっていることがわかる。   FIG. 43 shows an example of the sample point interval table held by the network measurement software. The sample point interval table shows the relationship between the object distance and the sample point interval. In the sample point interval table, it can be seen that the sample point interval increases as the object distance increases.

一般的に、対象物距離に関係なく、サンプル点の空間点は、空間上においてできるだけ一定の大きさの領域に分布していることが望ましい。そのほうが、ゲージ平面の算出条件が、対象物距離によって変化しないからである。そのため、サンプル点間隔テーブルでは、対象物距離が大きくなるに従って、サンプル点間隔が大きくなるように設定されている。   In general, it is desirable that the spatial points of the sample points are distributed in a region having a constant size as much as possible in the space regardless of the object distance. This is because the calculation condition of the gauge plane does not change depending on the object distance. Therefore, in the sample point interval table, the sample point interval is set to increase as the object distance increases.

図44は、サンプル点間隔テーブルを用いた場合に、サンプル点間隔がどのように変化するかを示している。図44(a)は、対象物距離が小さい場合のサンプル点であり、サンプル点間隔は大きくなっている。図44(b)は、対象物距離が少し大きい場合のサンプル点間隔であり、サンプル点間隔は中くらいである。図44(c)は、対象物距離が非常に大きい場合のサンプル点間隔であり、サンプル点間隔は小さくなっている。図44では、サンプル点を表示しているが、実際には、サンプル点は表示されない。このように、対象物距離に応じて、ネットワーク計測ソフトがサンプル点間隔を自動的に変更する機能を備えているので、ユーザはマウスカーソルを移動させるだけで、適切なサンプル点間隔を設定することができる。   FIG. 44 shows how the sample point interval changes when the sample point interval table is used. FIG. 44A shows sample points when the object distance is small, and the sample point interval is large. FIG. 44B shows sample point intervals when the object distance is slightly large, and the sample point interval is medium. FIG. 44C shows sample point intervals when the object distance is very large, and the sample point intervals are small. In FIG. 44, sample points are displayed, but actually no sample points are displayed. In this way, the network measurement software has a function to automatically change the sample point interval according to the object distance, so the user can set an appropriate sample point interval simply by moving the mouse cursor. Can do.

本変形例によれば、ユーザがサンプル点間隔を任意に変更する、または、対象物距離に応じて、ネットワーク計測ソフトがサンプル点間隔を自動的に変更することによって、ユーザは、ゲージを用いて、効率的にかつ精度良く計測対象物のサイズを測ることができる。   According to this modification, the user can change the sample point interval arbitrarily, or the network measurement software can automatically change the sample point interval according to the object distance, so that the user can use the gauge. The size of the measurement object can be measured efficiently and accurately.

以上、図面を参照して本発明の実施形態について詳述してきたが、具体的な構成は上記の実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。   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. .

本発明の一実施形態による内視鏡システムの構成を示す構成図である。It is a block diagram which shows the structure of the endoscope system by one Embodiment of this invention. 本発明の一実施形態による内視鏡装置の構成を示すブロック図である。It is a block diagram which shows the structure of the endoscope apparatus by one Embodiment of this invention. 本発明の一実施形態によるパーソナルコンピュータの構成を示すブロック図である。It is a block diagram which shows the structure of the personal computer by one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトのメインウィンドウを示す参考図である。It is a reference figure showing the main window of network measurement software in one embodiment of the present invention. 本発明の一実施形態におけるネットワーク計測ソフトのステータス遷移を示す参考図である。It is a reference figure which shows the status transition of the network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトのメインウィンドウ内に表示されるステータスボックスの表示状態を示す参考図である。It is a reference figure which shows the display state of the status box displayed in the main window of the network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによる処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process by the network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによる処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process by the network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによる処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process by the network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによるステータス切替時の処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process at the time of the status switch by network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによるステータス切替時の処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process at the time of the status switch by network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによるステータス切替時の処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process at the time of the status switch by network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによるステータス切替時の処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process at the time of the status switch by network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによる通信時の処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process at the time of communication by the network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによる通信時の処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process at the time of communication by the network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによる通信時の処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process at the time of communication by the network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによる通信時の処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process at the time of communication by the network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるネットワーク計測ソフトによるゲージ計測時の処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process at the time of the gauge measurement by network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるサンプル点を示す参考図である。It is a reference figure which shows the sample point in one Embodiment of this invention. 本発明の一実施形態におけるインジケータおよび対象物距離の表示状態を示す参考図である。It is a reference figure showing the indicator and the display state of object distance in one embodiment of the present invention. 本発明の一実施形態におけるゲージ平面の算出方法を説明するための参考図である。It is a reference figure for explaining the calculation method of the gauge plane in one embodiment of the present invention. 本発明の一実施形態におけるゲージ平面の算出方法を説明するための参考図である。It is a reference figure for explaining the calculation method of the gauge plane in one embodiment of the present invention. 本発明の一実施形態におけるゲージ平面の算出方法を説明するための参考図である。It is a reference figure for explaining the calculation method of the gauge plane in one embodiment of the present invention. 本発明の一実施形態におけるゲージ目盛り点の算出方法を説明するための参考図である。It is a reference figure for demonstrating the calculation method of the gauge scale point in one Embodiment of this invention. 本発明の一実施形態におけるゲージ目盛り点の算出方法を説明するための参考図である。It is a reference figure for demonstrating the calculation method of the gauge scale point in one Embodiment of this invention. 本発明の一実施形態におけるゲージ周囲点の算出方法を説明するための参考図である。It is a reference figure for demonstrating the calculation method of the gauge surrounding point in one Embodiment of this invention. 本発明の一実施形態におけるゲージ周囲点の算出方法を説明するための参考図である。It is a reference figure for demonstrating the calculation method of the gauge surrounding point in one Embodiment of this invention. 本発明の一実施形態におけるゲージ目盛り線およびゲージ周囲線の表示方法を説明するための参考図である。It is a reference figure for demonstrating the display method of the gauge scale line and gauge surrounding line in one Embodiment of this invention. 本発明の一実施形態におけるゲージの表示方法を説明するための参考図である。It is a reference figure for demonstrating the display method of the gauge in one Embodiment of this invention. 本発明の一実施形態におけるゲージの形状が変化する様子を示す参考図である。It is a reference figure which shows a mode that the shape of the gauge in one Embodiment of this invention changes. 本発明の一実施形態におけるゲージの大きさが変化する様子を示す参考図である。It is a reference figure which shows a mode that the magnitude | size of the gauge in one Embodiment of this invention changes. 本発明の一実施形態におけるネットワーク計測ソフトによるゲージ計測時の処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process at the time of the gauge measurement by network measurement software in one Embodiment of this invention. 本発明の一実施形態におけるサンプル点の変化を示す参考図である。It is a reference figure showing change of a sample point in one embodiment of the present invention. 本発明の一実施形態におけるゲージの角度の変化を示す参考図である。It is a reference figure which shows the change of the angle of the gauge in one Embodiment of this invention. 本発明の一実施形態におけるゲージの表示サイズの変化を示す参考図である。It is a reference figure showing change of a display size of a gauge in one embodiment of the present invention. 本発明の一実施形態におけるゲージ設定ボックスを示す参考図である。It is a reference figure showing a gauge setting box in one embodiment of the present invention. 本発明の一実施形態におけるネットワーク計測ソフトによるゲージ計測時の処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process at the time of the gauge measurement by network measurement software in one Embodiment of this invention. 本発明の一実施形態における単位長さの算出方法を説明するための参考図である。It is a reference figure for demonstrating the calculation method of the unit length in one Embodiment of this invention. 本発明の一実施形態におけるゲージの表示サイズの変化を示す参考図である。It is a reference figure showing change of a display size of a gauge in one embodiment of the present invention. 本発明の一実施形態におけるゲージ設定ボックスの変化を示す参考図である。It is a reference figure showing change of a gauge setting box in one embodiment of the present invention. 本発明の一実施形態におけるサンプル点の設定の様子を示す参考図である。It is a reference figure which shows the mode of the setting of the sample point in one Embodiment of this invention. 本発明の一実施形態におけるサンプル点の設定方法を説明するための参考図である。It is a reference figure for explaining the setting method of the sample point in one embodiment of the present invention. 本発明の一実施形態におけるサンプル点間隔テーブルの内容を示す参考図である。It is a reference figure which shows the content of the sample point space | interval table in one Embodiment of this invention. 本発明の一実施形態におけるサンプル点間隔の変化を示す参考図である。It is a reference figure showing change of sample point interval in one embodiment of the present invention.

符号の説明Explanation of symbols

1・・・内視鏡装置、2・・・挿入部(電子内視鏡)、3・・・計測対象物、4・・・ネットワーク、5・・・PC(画像処理装置)、105・・・CCU(映像信号生成部)、108・・・映像信号処理回路(表示信号生成部)、114・・・計測処理部(座標算出部、平面算出部)、115・・・ネットワークI/F(送信部)、507・・・CPU(座標算出部、平面算出部、表示信号生成部)、508・・・ネットワークI/F(受信部)   DESCRIPTION OF SYMBOLS 1 ... Endoscope apparatus, 2 ... Insertion part (electronic endoscope), 3 ... Measurement object, 4 ... Network, 5 ... PC (image processing apparatus), 105 ... CCU (video signal generation unit), 108 ... video signal processing circuit (display signal generation unit), 114 ... measurement processing unit (coordinate calculation unit, plane calculation unit), 115 ... network I / F ( (Transmission unit), 507... CPU (coordinate calculation unit, plane calculation unit, display signal generation unit), 508... Network I / F (reception unit)

Claims (11)

被写体を撮像して得られた画像における画像座標に対応した前記被写体上の3次元座標を算出する座標算出部と、
前記座標算出部によって算出された、基準点を含む3点以上のサンプル点の3次元座標から平面を算出する平面算出部と、
前記平面上の、複数のゲージ目盛り点の3次元座標に基づいて、前記基準点から所定の3次元距離を有する位置を示すゲージを表示するための表示信号を生成する表示信号生成部と、
を備え
前記平面算出部は、前記3点以上のサンプル点の3次元座標から前記基準点を通る2本の空間直線を算出し、前記2本の空間直線に基づいて前記平面を算出し、
前記表示信号生成部は、前記2本の空間直線の一方上に設定された、前記基準点からの3次元距離が等しい2点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成する
ことを特徴とする画像処理装置。
A coordinate calculation unit that calculates three-dimensional coordinates on the subject corresponding to image coordinates in an image obtained by imaging the subject;
A plane calculation unit that calculates a plane from three-dimensional coordinates of three or more sample points including a reference point calculated by the coordinate calculation unit;
A display signal generating unit that generates a display signal for displaying a gauge indicating a position having a predetermined three-dimensional distance from the reference point, based on three-dimensional coordinates of a plurality of gauge scale points on the plane;
Equipped with a,
The plane calculation unit calculates two spatial straight lines passing through the reference point from three-dimensional coordinates of the three or more sample points, calculates the plane based on the two spatial straight lines ,
The display signal generating unit is configured to display the gauge based on the three-dimensional coordinates of two points set on one of the two space straight lines and having the same three-dimensional distance from the reference point. An image processing apparatus that generates a signal.
前記表示信号生成部は、前記2本の空間直線の一方上に等間隔に設定された前記複数のゲージ目盛り点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成することを特徴とする請求項に記載の画像処理装置。 The display signal generation unit generates the display signal for displaying the gauge based on the three-dimensional coordinates of the plurality of gauge scale points set at equal intervals on one of the two space straight lines. The image processing apparatus according to claim 1 . 前記表示信号生成部は、前記2本の空間直線の他方上に設定された、前記基準点からの3次元距離が等しい2点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成することを特徴とする請求項または請求項に記載の画像処理装置。 The display signal generating unit is configured to display the gauge based on the three-dimensional coordinates of two points set on the other of the two space straight lines and having the same three-dimensional distance from the reference point. the image processing apparatus according to claim 1 or claim 2, characterized in that to generate the signal. 前記表示信号生成部は、前記2本の空間直線の他方上に等間隔に設定された前記複数のゲージ目盛り点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成することを特徴とする請求項に記載の画像処理装置。 The display signal generation unit generates the display signal for displaying the gauge based on three-dimensional coordinates of the plurality of gauge scale points set at equal intervals on the other of the two space straight lines. The image processing apparatus according to claim 3 . 前記表示信号生成部は、前記平面上で前記基準点から所定の3次元距離を有する複数のゲージ周囲点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成することを特徴とする請求項〜請求項のいずれかに記載の画像処理装置。 The display signal generation unit generates the display signal for displaying the gauge based on three-dimensional coordinates of a plurality of gauge peripheral points having a predetermined three-dimensional distance from the reference point on the plane. the image processing apparatus according to any one of claims 1 to 4, characterized. 前記表示信号生成部は、前記3点以上のサンプル点の3次元座標の少なくともいずれかに基づく前記被写体までの距離に基づいて、前記複数のゲージ目盛り点の間隔を設定することを特徴とする請求項または請求項に記載の画像処理装置。 The display signal generation unit sets intervals between the plurality of gauge scale points based on a distance to the subject based on at least one of three-dimensional coordinates of the three or more sample points. Item 5. The image processing device according to Item 2 or Item 4 . 前記ゲージは、前記2本の空間直線の一方における前記複数のゲージ目盛り点に基づく直線、前記2本の空間直線の他方における前記複数のゲージ目盛り点に基づく直線、及び前記複数のゲージ周囲点をつなぐ線を有することを特徴とする請求項に記載の画像処理装置。 The gauge includes a straight line based on the plurality of gauge scale points in one of the two spatial straight lines, a straight line based on the plurality of gauge scale points in the other of the two spatial straight lines, and the plurality of gauge peripheral points. The image processing apparatus according to claim 5 , further comprising a connecting line. 前記表示信号生成部は、ユーザからの指示に基づいて、前記ゲージの角度を設定することを特徴とする請求項1〜請求項のいずれかに記載の画像処理装置。 The display signal generation unit, based on an instruction from the user, the image processing apparatus according to any one of claims 1 to 7, characterized in that setting the angle of the gauge. 被写体を撮像し撮像信号を生成する電子内視鏡と、
前記撮像信号に基づいて映像信号を生成する映像信号生成部と、
前記映像信号に基づく画像における画像座標に対応した前記被写体上の3次元座標を算出する座標算出部と、
前記座標算出部によって算出された、基準点を含む3点以上のサンプル点の3次元座標から平面を算出する平面算出部と、
前記平面上の、複数のゲージ目盛り点の3次元座標に基づいて、前記基準点から所定の3次元距離を有する位置を示すゲージを表示するための表示信号を生成する表示信号生成部と、
を備え
前記平面算出部は、前記3点以上のサンプル点の3次元座標から前記基準点を通る2本の空間直線を算出し、前記2本の空間直線に基づいて前記平面を算出し、
前記表示信号生成部は、前記2本の空間直線の一方上に設定された、前記基準点からの3次元距離が等しい2点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成する
ことを特徴とする内視鏡装置。
An electronic endoscope for imaging a subject and generating an imaging signal;
A video signal generation unit that generates a video signal based on the imaging signal;
A coordinate calculation unit that calculates three-dimensional coordinates on the subject corresponding to image coordinates in an image based on the video signal;
A plane calculation unit that calculates a plane from three-dimensional coordinates of three or more sample points including a reference point calculated by the coordinate calculation unit;
A display signal generating unit that generates a display signal for displaying a gauge indicating a position having a predetermined three-dimensional distance from the reference point, based on three-dimensional coordinates of a plurality of gauge scale points on the plane;
Equipped with a,
The plane calculation unit calculates two spatial straight lines passing through the reference point from three-dimensional coordinates of the three or more sample points, calculates the plane based on the two spatial straight lines,
The display signal generating unit is configured to display the gauge based on the three-dimensional coordinates of two points set on one of the two space straight lines and having the same three-dimensional distance from the reference point. An endoscope apparatus characterized by generating a signal .
内視鏡装置および画像処理装置を備えた内視鏡システムであって、
前記内視鏡装置は、
被写体を撮像し撮像信号を生成する電子内視鏡と、
前記撮像信号に基づいて映像信号を生成する映像信号生成部と、
前記映像信号を外部へ送信する送信部と、を有し、
前記画像処理装置は、
前記映像信号を受信する受信部と、
前記映像信号に基づく画像における画像座標に対応した前記被写体上の3次元座標を算出する座標算出部と、
前記座標算出部によって算出された、基準点を含む3点以上のサンプル点の3次元座標から平面を算出する平面算出部と、
前記平面上の、複数のゲージ目盛り点の3次元座標に基づいて、前記基準点から所定の3次元距離を有する位置を示すゲージを表示するための表示信号を生成する表示信号生成部と、を有し、
前記平面算出部は、前記3点以上のサンプル点の3次元座標から前記基準点を通る2本の空間直線を算出し、前記2本の空間直線に基づいて前記平面を算出し、
前記表示信号生成部は、前記2本の空間直線の一方上に設定された、前記基準点からの3次元距離が等しい2点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成する
ことを特徴とする内視鏡システム。
An endoscope system including an endoscope device and an image processing device,
The endoscope apparatus is
An electronic endoscope for imaging a subject and generating an imaging signal;
A video signal generation unit that generates a video signal based on the imaging signal;
A transmission unit for transmitting the video signal to the outside,
The image processing apparatus includes:
A receiver for receiving the video signal;
A coordinate calculation unit that calculates three-dimensional coordinates on the subject corresponding to image coordinates in an image based on the video signal;
A plane calculation unit that calculates a plane from three-dimensional coordinates of three or more sample points including a reference point calculated by the coordinate calculation unit;
A display signal generating unit that generates a display signal for displaying a gauge indicating a position having a predetermined three-dimensional distance from the reference point, based on three-dimensional coordinates of a plurality of gauge scale points on the plane; Yes, and
The plane calculation unit calculates two spatial straight lines passing through the reference point from three-dimensional coordinates of the three or more sample points, calculates the plane based on the two spatial straight lines,
The display signal generating unit is configured to display the gauge based on the three-dimensional coordinates of two points set on one of the two space straight lines and having the same three-dimensional distance from the reference point. An endoscope system characterized by generating a signal .
被写体を撮像して得られた画像における画像座標に対応した前記被写体上の3次元座標を算出する座標算出部と、
前記座標算出部によって算出された、基準点を含む3点以上のサンプル点の3次元座標から平面を算出する平面算出部と、
前記平面上の、複数のゲージ目盛り点の3次元座標に基づいて、前記基準点から所定の3次元距離を有する位置を示すゲージを表示するための表示信号を生成する表示信号生成部と、
としてコンピュータを機能させるためのプログラムであって、
前記平面算出部は、前記3点以上のサンプル点の3次元座標から前記基準点を通る2本の空間直線を算出し、前記2本の空間直線に基づいて前記平面を算出し、
前記表示信号生成部は、前記2本の空間直線の一方上に設定された、前記基準点からの3次元距離が等しい2点の3次元座標に基づいて、前記ゲージを表示するための前記表示信号を生成することを特徴とするプログラム
A coordinate calculation unit that calculates three-dimensional coordinates on the subject corresponding to image coordinates in an image obtained by imaging the subject;
A plane calculation unit that calculates a plane from three-dimensional coordinates of three or more sample points including a reference point calculated by the coordinate calculation unit;
A display signal generating unit that generates a display signal for displaying a gauge indicating a position having a predetermined three-dimensional distance from the reference point, based on three-dimensional coordinates of a plurality of gauge scale points on the plane;
A program for causing a computer to function as,
The plane calculation unit calculates two spatial straight lines passing through the reference point from three-dimensional coordinates of the three or more sample points, calculates the plane based on the two spatial straight lines,
The display signal generating unit is configured to display the gauge based on the three-dimensional coordinates of two points set on one of the two space straight lines and having the same three-dimensional distance from the reference point. A program characterized by generating a signal .
JP2008273430A 2008-10-23 2008-10-23 Image processing apparatus, endoscope apparatus, endoscope system, and program Expired - Fee Related JP5242335B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008273430A JP5242335B2 (en) 2008-10-23 2008-10-23 Image processing apparatus, endoscope apparatus, endoscope system, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008273430A JP5242335B2 (en) 2008-10-23 2008-10-23 Image processing apparatus, endoscope apparatus, endoscope system, and program

Publications (3)

Publication Number Publication Date
JP2010102113A JP2010102113A (en) 2010-05-06
JP2010102113A5 JP2010102113A5 (en) 2011-12-08
JP5242335B2 true JP5242335B2 (en) 2013-07-24

Family

ID=42292813

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008273430A Expired - Fee Related JP5242335B2 (en) 2008-10-23 2008-10-23 Image processing apparatus, endoscope apparatus, endoscope system, and program

Country Status (1)

Country Link
JP (1) JP5242335B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5530225B2 (en) 2010-03-09 2014-06-25 オリンパス株式会社 Endoscope apparatus and program
US8903144B2 (en) 2010-12-01 2014-12-02 Olympus Corporation Endoscope apparatus and method of measuring object
JP6120537B2 (en) * 2012-11-22 2017-04-26 オリンパス株式会社 Measuring endoscope device
WO2016039292A1 (en) * 2014-09-11 2016-03-17 オリンパス株式会社 Endoscope system
JP6335839B2 (en) * 2015-05-11 2018-05-30 オリンパス株式会社 Medical device, medical image generation method, and medical image generation program
JP6373322B2 (en) * 2016-09-23 2018-08-15 オリンパス株式会社 Endoscope apparatus and program
JP6400767B2 (en) * 2017-03-28 2018-10-03 オリンパス株式会社 Measuring endoscope device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2778739B2 (en) * 1989-05-10 1998-07-23 オリンパス光学工業株式会社 Measurement endoscope device
JPH06339454A (en) * 1993-06-01 1994-12-13 Olympus Optical Co Ltd Measuring endoscope device
JP4590087B2 (en) * 2000-11-21 2010-12-01 オリンパス株式会社 Endoscope apparatus and scale display method
JP2005087468A (en) * 2003-09-17 2005-04-07 Shoji Kawahito Image pickup device provided with distance image measurement function and endoscopic apparatus

Also Published As

Publication number Publication date
JP2010102113A (en) 2010-05-06

Similar Documents

Publication Publication Date Title
JP5242335B2 (en) Image processing apparatus, endoscope apparatus, endoscope system, and program
JP5073564B2 (en) Endoscope device for measurement and program
JP5530225B2 (en) Endoscope apparatus and program
US8496575B2 (en) Measuring endoscope apparatus, program and recording medium
US8004560B2 (en) Endoscope apparatus
US8558879B2 (en) Endoscope apparatus and measuring method
JP5980611B2 (en) Measurement endoscope apparatus and program
JP5231173B2 (en) Endoscope device for measurement and program
JP5186286B2 (en) Endoscope device for measurement and program
JP5026769B2 (en) Endoscope device for measurement, program, and recording medium
JP5307407B2 (en) Endoscope apparatus and program
JP2011170276A (en) Endoscope device and program
JP5153381B2 (en) Endoscope device
JP6081209B2 (en) Endoscope apparatus and program
JP5253109B2 (en) Endoscope apparatus and endoscopic image program
JP2005173336A (en) Industrial endoscope device and shape dimension measuring method using the same
JP2005077832A (en) Industrial endoscope system
JP2014026217A (en) Endoscope apparatus and program
JP2013027433A (en) Image processing device and image processing method
JP6426215B2 (en) Endoscope apparatus and program
JP5791989B2 (en) Endoscope apparatus and program
JP2023018984A (en) Insertion support system, insertion support method and program
JP2022052467A (en) Examination support device, examination support method, and examination support program
JP2022073020A (en) Image display method, display control apparatus, and program
JP2021064264A (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111024

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111024

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120309

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130219

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20130219

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: 20130319

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130403

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

Free format text: PAYMENT UNTIL: 20160412

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 5242335

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20160412

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

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

LAPS Cancellation because of no payment of annual fees