JP5127302B2 - Endoscope device for measurement and program - Google Patents

Endoscope device for measurement and program Download PDF

Info

Publication number
JP5127302B2
JP5127302B2 JP2007141685A JP2007141685A JP5127302B2 JP 5127302 B2 JP5127302 B2 JP 5127302B2 JP 2007141685 A JP2007141685 A JP 2007141685A JP 2007141685 A JP2007141685 A JP 2007141685A JP 5127302 B2 JP5127302 B2 JP 5127302B2
Authority
JP
Japan
Prior art keywords
measurement
defect
image
point
contour
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
JP2007141685A
Other languages
Japanese (ja)
Other versions
JP2008295512A (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 JP2007141685A priority Critical patent/JP5127302B2/en
Priority to US12/011,741 priority patent/US8200042B2/en
Publication of JP2008295512A publication Critical patent/JP2008295512A/en
Application granted granted Critical
Publication of JP5127302B2 publication Critical patent/JP5127302B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Endoscopes (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Instruments For Viewing The Inside Of Hollow Bodies (AREA)

Description

本発明は、電子内視鏡を用いて撮像した画像に基づいて計測対象物の計測処理を行う計測用内視鏡装置、およびその動作を制御するためのプログラムに関する。   The present invention relates to a measurement endoscope apparatus that performs measurement processing of a measurement object based on an image captured using an electronic endoscope, and a program for controlling the operation thereof.

主に航空機に使われるガスタービンでは、異物等の侵入により、タービンブレードあるいはコンプレッサブレードのエッジに欠損が生じることがある。このブレードの欠損サイズはブレードの交換を判断する条件のひとつであり、その検査は極めて重要なものである。このような状況に対して、従来の計測用内視鏡においては、タービンブレードあるいはコンプレッサブレードの欠損のエッジを仮想曲線および仮想点で近似し、それらを元に欠損サイズを計測していた(例えば特許文献1参照)。
特開2005−204724号公報
In a gas turbine mainly used for an aircraft, the edge of a turbine blade or a compressor blade may be damaged due to entry of foreign matter or the like. The defect size of the blade is one of the conditions for judging the replacement of the blade, and its inspection is extremely important. In such a situation, in the conventional measuring endoscope, the defect edge of the turbine blade or the compressor blade is approximated by a virtual curve and a virtual point, and the defect size is measured based on the approximation (for example, Patent Document 1).
JP-A-2005-204724

しかし、従来の方法では、欠損のエッジをパラメトリック曲線で近似していたため、1つの仮想曲線を算出するために少なくとも3点の基準点を指定する必要があり、また、算出された仮想曲線を手動で調整してエッジの形状変更を行う必要があったため、操作が煩雑になるという問題があった。また、角の頂点を含む計測対象物の角に形成された欠損に対しては、角の欠損のエッジを、1つの仮想曲線とその曲線上の仮想点とで近似していたため、少なくとも4点の基準点を指定する必要があり、ここでも操作が煩雑になるという問題があった。   However, in the conventional method, since the missing edge is approximated by a parametric curve, it is necessary to designate at least three reference points in order to calculate one virtual curve, and manually calculate the calculated virtual curve. There is a problem in that the operation becomes complicated because it is necessary to adjust the shape of the edge by adjusting the position. In addition, with respect to the defect formed at the corner of the measurement object including the vertex of the corner, the edge of the corner defect is approximated by one virtual curve and a virtual point on the curve. In this case, there is a problem that the operation becomes complicated.

本発明は、上述した課題に鑑みてなされたものであって、操作の煩わしさを低減し操作性を向上することができる計測用内視鏡装置およびプログラムを提供することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an endoscope apparatus for measurement and a program that can reduce the troublesomeness of the operation and improve the operability.

本発明は、上記の課題を解決するためになされたもので、計測対象物を撮像し撮像信号を生成する電子内視鏡と、前記撮像信号に基づいて映像信号を生成する画像処理手段と、前記映像信号に基づいて前記計測対象物の計測処理を行う計測処理手段と、前記映像信号に基づいた画像を表示する表示手段とを備えた計測用内視鏡装置において、前記計測処理手段は、前記計測対象物上の2つの基準点を指定する基準点指定手段と、前記2つの基準点のうち、一方の基準点に基づき前記計測対象物の輪郭を近似する第1の輪郭近似線を算出すると共に、他方の基準点に基づき前記計測対象物の輪郭を近似する第2の輪郭近似線を算出する輪郭近似算出手段と、前記2つの基準点、前記第1の輪郭近似線、および第2の輪郭近似線に基づいて、前記計測対象物に形成された欠損の輪郭を構成する欠損構成点を算出する欠損構成点算出手段と、前記第1の輪郭近似線と第2の輪郭近似線とのなす角度に応じて前記欠損の種類を判別する欠損種類判別手段と、前記欠損構成点に基づいて前記欠損のサイズを計測する欠損計測手段と、前記映像信号に基づいた画像の階調を削減する階調削減手段と、を備え、前記表示手段はさらに、前記階調削減手段によって階調の削減された画像を表示することを特徴とする計測用内視鏡装置である。 The present invention has been made in order to solve the above-described problems. An electronic endoscope that images a measurement object and generates an imaging signal, an image processing unit that generates a video signal based on the imaging signal, In a measurement endoscope apparatus comprising a measurement processing unit that performs measurement processing of the measurement object based on the video signal, and a display unit that displays an image based on the video signal, the measurement processing unit includes: A reference point designating unit for designating two reference points on the measurement object, and a first contour approximation line that approximates the contour of the measurement object based on one of the two reference points. And a contour approximation calculating means for calculating a second contour approximation line that approximates the contour of the measurement object based on the other reference point, the two reference points, the first contour approximation line, and a second contour approximation line. based on the contour approximation line, the And defect structure point calculation means for calculating the defect configuration points forming the contour of the defect formed on the measured object, the defect in accordance with an angle between the first contour approximation line and the second contour approximation line A defect type determining means for determining a type; a defect measuring means for measuring the size of the defect based on the defect constituent points; and a gradation reducing means for reducing the gradation of an image based on the video signal. The display means is an endoscope apparatus for measurement, further displaying an image whose gradation is reduced by the gradation reducing means.

また、本発明の計測用内視鏡装置において、前記欠損計測手段は、前記欠損のサイズを示すパラメータとして、前記欠損の種類に応じた前記パラメータを算出することを特徴とする。   Moreover, in the endoscope apparatus for measurement according to the present invention, the defect measuring means calculates the parameter corresponding to the type of defect as a parameter indicating the size of the defect.

また、本発明の計測用内視鏡装置において、前記欠損構成点算出手段は、前記第1の輪郭近似線と前記第2の輪郭近似線との交点を前記欠損構成点の1つとして算出することを特徴とする。 Moreover, in the endoscope apparatus for measurement according to the present invention, the missing component point calculating means calculates an intersection point of the first contour approximate line and the second contour approximate line as one of the missing component points. It is characterized by that.

また、本発明の計測用内視鏡装置において、前記欠損計測手段は、前記欠損のサイズを示すパラメータとして、少なくとも2種類の前記パラメータを算出することを特徴とする。   In the measurement endoscope apparatus according to the present invention, the defect measurement means calculates at least two types of parameters as parameters indicating the size of the defect.

また、本発明の計測用内視鏡装置において、前記輪郭近似線算出手段は、前記一方の基準点の周辺にある前記計測対象物の輪郭線上の少なくとも2つの特徴点を算出し、当該少なくとも2つの特徴点に基づいて前記第1の輪郭近似線を算出すると共に、前記他方の基準点の周辺にある前記計測対象物の輪郭線上の少なくとも2つの特徴点を算出し、当該少なくとも2つの特徴点に基づいて前記第2の輪郭近似線を算出することを特徴とする。 In the measuring endoscope apparatus according to the present invention, the contour approximate line calculation means calculates at least two feature points on the contour line of the measurement object around the one reference point, and the at least 2 The first contour approximate line is calculated based on one feature point, and at least two feature points on the contour line of the measurement object around the other reference point are calculated, and the at least two feature points The second contour approximation line is calculated based on the above .

また、本発明の計測用内視鏡装置において、前記階調削減手段は、前記映像信号に基づいた画像を、信号レベルを2値化した2値化画像に変換することを特徴とする。   In the measurement endoscope apparatus according to the present invention, the gradation reduction unit converts the image based on the video signal into a binarized image in which the signal level is binarized.

また、本発明の計測用内視鏡装置において、前記階調削減手段によって階調の削減された画像を少なくとも表示する第1の状態と、前記階調削減手段によって階調の削減された画像を表示せずに、前記階調削減手段によって階調の削減される前の画像を表示する第2の状態との間で表示状態を切り替える切替手段をさらに備え、前記表示手段は、前記第1の状態と前記第2の状態との間で表示状態を切り替え可能であって、前記切替手段によって切り替えられた表示状態で画像を表示することを特徴とする。 In the measurement endoscope apparatus according to the present invention, a first state in which at least an image whose gradation is reduced by the gradation reduction means is displayed, and an image whose gradation is reduced by the gradation reduction means are displayed. The display means further includes a switching means for switching a display state between a second state in which an image before the gradation is reduced by the gradation reduction means is displayed without being displayed, and the display means includes the first The display state can be switched between the state and the second state, and an image is displayed in the display state switched by the switching unit .

また、本発明の計測用内視鏡装置は、前記表示状態を切り替えるタイミングをユーザが入力する入力手段をさらに備え、前記切替手段は、前記入力手段に入力された前記タイミングで前記表示状態を切り替えることを特徴とする。   The measurement endoscope apparatus of the present invention further includes input means for a user to input timing for switching the display state, and the switching means switches the display state at the timing input to the input means. It is characterized by that.

また、本発明の計測用内視鏡装置は、予め設定された時間を計測する時間計測手段をさらに備え、前記切替手段は、前記表示状態を切り替えた第1のタイミングから、前記時間計測手段によって計測された時間が経過した第2のタイミングで前記表示状態を再度切り替えることを特徴とする。
また、本発明の計測用内視鏡装置において、前記切替手段は、前記欠損のサイズが計測された後、前記表示状態を前記第1の表示状態に切り替えることを特徴とする。
In addition, the measuring endoscope apparatus according to the present invention further includes a time measuring unit that measures a preset time, and the switching unit starts from the first timing when the display state is switched by the time measuring unit. The display state is switched again at a second timing when the measured time has elapsed.
In the measurement endoscope apparatus of the present invention, the switching unit switches the display state to the first display state after the size of the defect is measured.

また、本発明の計測用内視鏡装置において、前記表示手段は、画像を表示可能な第1および第2の画像表示領域を有しており、前記階調削減手段によって階調の削減された画像を前記第1および第2の画像表示領域の一方または両方に表示することを特徴とする。   In the measurement endoscope apparatus according to the present invention, the display means includes first and second image display areas in which an image can be displayed, and the gradation is reduced by the gradation reduction means. An image is displayed in one or both of the first and second image display areas.

また、本発明、計測対象物を撮像し撮像信号を生成する電子内視鏡と、前記撮像信号に基づいて映像信号を生成する画像処理手段と、前記映像信号に基づいて前記計測対象物の計測処理を行う計測処理手段と、前記映像信号に基づいた画像を表示する表示手段とを備えた計測用内視鏡装置の動作を制御するためのプログラムにおいて、前記計測処理手段は、前記計測対象物上の2つの基準点を指定する基準点指定手段と、前記2つの基準点のうち、一方の基準点に基づき前記計測対象物の輪郭を近似する第1の輪郭近似線を算出すると共に、他方の基準点に基づき前記計測対象物の輪郭を近似する第2の輪郭近似線を算出する輪郭近似算出手段と、前記2つの基準点、前記第1の輪郭近似線、および第2の輪郭近似線に基づいて、前記計測対象物に形成された欠損の輪郭を構成する欠損構成点を算出する欠損構成点算出手段と、前記第1の輪郭近似線と第2の輪郭近似線とのなす角度に応じて前記欠損の種類を判別する欠損種類判別手段と、前記欠損構成点に基づいて前記欠損のサイズを計測する欠損計測手段と、前記映像信号に基づいた画像の階調を削減する階調削減手段と、を備え、前記表示手段はさらに、前記階調削減手段によって階調の削減された画像を表示することを特徴とするプログラムである。 Further, the present invention provides an electronic endoscope that images a measurement object and generates an imaging signal, an image processing unit that generates a video signal based on the imaging signal, and the measurement object based on the video signal. In a program for controlling an operation of a measurement endoscope apparatus including a measurement processing unit that performs measurement processing and a display unit that displays an image based on the video signal, the measurement processing unit includes the measurement target A reference point specifying means for specifying two reference points on the object, and calculating a first contour approximation line that approximates the contour of the measurement object based on one of the two reference points, A contour approximation calculating means for calculating a second contour approximation line that approximates the contour of the measurement object based on the other reference point; the two reference points; the first contour approximation line; and a second contour approximation. based on the line, the measuring And defect structure point calculation means for calculating the defect configuration points forming the contour of the defect formed on the elephant product, the type of the defect in accordance with an angle between the first contour approximation line and the second contour approximation line A defect type determining means for determining, a defect measuring means for measuring the size of the defect based on the defect constituent points, and a gradation reducing means for reducing the gradation of the image based on the video signal, The display means is a program further displaying an image whose gradation is reduced by the gradation reduction means.

本発明によれば、2つの基準点を指定すれば欠損サイズの計測が可能となるので、操作の煩わしさを低減し操作性を向上することができるという効果が得られる。   According to the present invention, since it is possible to measure the defect size by designating two reference points, it is possible to reduce the inconvenience of the operation and improve the operability.

以下、図面を参照し、本発明の実施形態を説明する。図1は、本発明の一実施形態による計測用内視鏡装置の構成を示している。図1に示すように、本実施形態による計測用内視鏡装置は、内視鏡2と、コントロールユニット3と、リモートコントローラ4(入力手段)と、液晶モニタ5と、フェイスマウントディスプレイ(FMD)6と、FMDアダプタ6aと、光学アダプタ7a,7b,7cと、内視鏡ユニット8と、カメラコントロールユニット9と、制御ユニット10とから構成されている。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows the configuration of a measuring endoscope apparatus according to an embodiment of the present invention. As shown in FIG. 1, the measurement endoscope apparatus according to the present embodiment includes an endoscope 2, a control unit 3, a remote controller 4 (input means), a liquid crystal monitor 5, and a face mount display (FMD). 6, an FMD adapter 6 a, optical adapters 7 a, 7 b and 7 c, an endoscope unit 8, a camera control unit 9, and a control unit 10.

計測対象物を撮像し撮像信号を生成する内視鏡2(電子内視鏡)は細長の挿入部20を備えている。挿入部20は、先端側から順に、硬質な先端部21と、例えば上下左右に湾曲可能な湾曲部22と、柔軟性を有する可撓管部23とを連設して構成されている。挿入部20の基端部は内視鏡ユニット8に接続されている。先端部21は、観察視野を2つ有するステレオ用の光学アダプタ7a,7bあるいは観察視野が1つだけの通常観察光学アダプタ7c等、各種の光学アダプタが例えば螺合によって着脱自在な構成になっている。   An endoscope 2 (electronic endoscope) that captures an image of a measurement object and generates an imaging signal includes an elongated insertion unit 20. The insertion portion 20 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 20 is connected to the endoscope unit 8. The distal end portion 21 is configured such that various optical adapters such as stereo optical adapters 7a and 7b having two observation fields or a normal observation optical adapter 7c having only one observation field can be attached and detached by, for example, screwing. Yes.

コントロールユニット3は、内視鏡ユニット8、画像処理手段であるカメラコントロールユニット(以下、CCUと記載する。)9、および制御装置である制御ユニット10を内部に備えている。内視鏡ユニット8は、観察時に必要な照明光を供給する光源装置と、挿入部20を構成する湾曲部22を湾曲させる湾曲装置とを備えている。CCU9は、挿入部20の先端部21に内蔵されている固体撮像素子2aから出力された撮像信号を入力し、これをNTSC信号等の映像信号に変換して制御ユニット10に供給する。   The control unit 3 includes an endoscope unit 8, a camera control unit (hereinafter referred to as CCU) 9 that is an image processing unit, and a control unit 10 that is a control device. The endoscope unit 8 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 20. The CCU 9 receives an imaging signal output from the solid-state imaging device 2 a built in the distal end portion 21 of the insertion unit 20, converts this into a video signal such as an NTSC signal, and supplies the video signal to the control unit 10.

制御ユニット10は、音声信号処理回路11と、映像信号処理回路12と、ROM13と、RAM14と、PCカードインターフェース(以下、PCカードI/Fと記載する。)15と、USBインターフェース(以下、USB I/Fと記載する。)16と、RS−232Cインターフェース(以下、RS−232C I/Fと記載する。)17と、計測処理部18とから構成されている。   The control unit 10 includes an audio signal processing circuit 11, a video signal processing circuit 12, a ROM 13, a RAM 14, a PC card interface (hereinafter referred to as PC card I / F) 15, and a USB interface (hereinafter referred to as USB). (Described as I / F) 16, an RS-232C interface (hereinafter referred to as RS-232C I / F) 17, and a measurement processing unit 18.

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

PCカードI/F15は、PCMCIAメモリカード32やフラッシュメモリカード33等のメモリカード(記録媒体)を自由に着脱できるようになっている。メモリカードを装着することにより、計測処理部18の制御に従って、このメモリカードに記憶されている制御処理情報や画像情報等を取り込んだり、制御処理情報や画像情報等をメモリカードに記録したりすることができる。   The PC card I / F 15 can freely attach and detach a memory card (recording medium) such as the PCMCIA memory card 32 and the flash memory card 33. By mounting the memory card, the control processing information and image information stored in the memory card are taken in, or the control processing information and image information are recorded on the memory card according to the control of the measurement processing unit 18. be able to.

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

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

図2は計測処理部18の構成を示している。図2に示すように計測処理部18は、制御部18aと、基準点指定部18bと、基準曲線算出部18cと、欠損構成点算出部18dと、欠損種類判別部18eと、欠損サイズ算出部18fと、記憶部18gと、階調削減部18hと、時間計測部18iとから構成されている。計測処理部18内の各構成が計測処理専用のハードウェアとして構成されていてもよいし、ROM13に格納されているプログラムをCPUが実行することによって、計測処理部18内の各構成に相当する機能をCPUが実行してもよい。   FIG. 2 shows the configuration of the measurement processing unit 18. As shown in FIG. 2, the measurement processing unit 18 includes a control unit 18a, a reference point specifying unit 18b, a reference curve calculating unit 18c, a missing component point calculating unit 18d, a defect type determining unit 18e, and a defect size calculating unit. 18f, a storage unit 18g, a gradation reduction unit 18h, and a time measurement unit 18i. Each configuration in the measurement processing unit 18 may be configured as hardware dedicated to the measurement processing, or corresponds to each configuration in the measurement processing unit 18 by the CPU executing a program stored in the ROM 13. The function may be executed by the CPU.

制御部18a(制御手段、切替手段)は計測処理部18内の各部を制御する。また、制御部18aは、液晶モニタ5またはフェイスマウントディスプレイ6(表示手段)に計測結果や操作メニュー等を表示させるための表示信号を生成して映像信号処理回路12へ出力する機能も有している。   The control unit 18a (control unit, switching unit) controls each unit in the measurement processing unit 18. The control unit 18 a also has a function of generating a display signal for displaying a measurement result, an operation menu, and the like on the liquid crystal monitor 5 or the face mount display 6 (display unit) and outputting the display signal to the video signal processing circuit 12. Yes.

基準点指定部18b(基準点指定手段)は、リモートコントローラ4あるいはパーソナルコンピュータ31から入力される信号に基づいて、計測対象物上の基準点(基準点の詳細は後述する)を指定する。ユーザが、液晶モニタ5あるいはフェイスマウントディスプレイ6に表示された計測対象物の画像を見ながら所望の基準点を2点入力すると、それらの座標が基準点指定部18bによって算出される。   The reference point specifying unit 18b (reference point specifying means) specifies a reference point (details of the reference point will be described later) on the measurement object based on a signal input from the remote controller 4 or the personal computer 31. When the user inputs two desired reference points while looking at the image of the measurement object displayed on the liquid crystal monitor 5 or the face mount display 6, the coordinates are calculated by the reference point designating unit 18b.

基準曲線算出部18c(輪郭近似線算出手段)は、基準点指定部18bによって指定された基準点に基づいて、計測対象物の輪郭を近似する輪郭近似線に相当する基準曲線(基準曲線の詳細は後述する)を算出する。欠損構成点算出部18d(欠損構成点算出手段)は、基準点および基準曲線に基づいて、計測対象物に形成された欠損の輪郭(エッジ)を構成する欠損構成点(欠損構成点の詳細は後述する)を算出する。   The reference curve calculation unit 18c (contour approximate line calculation means) is based on the reference point designated by the reference point designation unit 18b, and the reference curve corresponding to the contour approximation line that approximates the contour of the measurement object (details of the reference curve) Is calculated later). The missing component point calculating unit 18d (missing component point calculating means) is configured to construct a defect outline (edge) formed on the measurement object based on the reference point and the reference curve. (To be described later).

欠損種類判別部18e(欠損種類判別手段)は、基準点指定部18bによって指定された2つの基準点に対応した2本の基準曲線がなす角度を算出し、その角度に応じて欠損の種類を判別する。欠損サイズ算出部18f(欠損計測手段)は、欠損構成点に基づいて欠損のサイズを計測する。記憶部18gは、計測処理部18内で処理される各種情報を記憶する。記憶部18gに格納された情報は、適宜制御部18aによって読み出されて各部へ出力される。   The defect type discriminating unit 18e (defect type discriminating means) calculates an angle formed by two reference curves corresponding to the two reference points designated by the reference point designating unit 18b, and determines the type of the defect according to the angle. Determine. The defect size calculation unit 18f (defect measurement means) measures the size of the defect based on the defect constituent points. The storage unit 18g stores various types of information processed in the measurement processing unit 18. Information stored in the storage unit 18g is appropriately read out by the control unit 18a and output to each unit.

階調削減部18h(階調削減手段)は、映像信号に基づいた画像の階調を削減する処理を実行する。より具体的には、階調削減部18hは画像から輝度データを取り出し、例えば256値の輝度からなるグレースケール画像を生成し、そのグレースケール画像を、2値、4値、あるいは8値等の輝度からなる画像に変換する。以下では、階調削減部18hが、撮像した画像の信号レベルを2値化し、画像を2値化画像(白黒化画像)に変換するものとして説明を行う。時間計測部18i(時間計測手段)は、制御部18aからの指示に従って時間の計測を実行する。   The gradation reduction unit 18h (gradation reduction means) executes processing for reducing the gradation of the image based on the video signal. More specifically, the gradation reduction unit 18h takes out luminance data from the image, generates a grayscale image having, for example, 256 levels of luminance, and converts the grayscale image into binary, quaternary, or 8-level. Convert to luminance image. In the following description, it is assumed that the gradation reduction unit 18h binarizes the signal level of the captured image and converts the image into a binarized image (monochrome image). The time measuring unit 18i (time measuring unit) performs time measurement according to an instruction from the control unit 18a.

次に、本実施形態で使用する用語の内容を説明する。まず、図3を参照し、基準点、基準曲線、および基準点エリアを説明する。基準点301,302は、表示される計測画面上においてユーザが実際に指定する点であり、図3のように欠損300の両側に位置し、かつ欠損の存在しないエッジ上の点である。   Next, the contents of terms used in the present embodiment will be described. First, a reference point, a reference curve, and a reference point area will be described with reference to FIG. The reference points 301 and 302 are points that the user actually designates on the displayed measurement screen, and are points on the edge that are located on both sides of the defect 300 and do not have a defect as shown in FIG.

基準曲線311,312は、計測対象物の輪郭(エッジ)を近似する曲線であり、2つの基準点301,302に基づいて算出される。本実施形態では特に、内視鏡2の先端(先端部21内)に設置された撮像光学系、および内視鏡2の先端に別途装着される撮像光学系(光学アダプタ7a,7b,7c)の歪みを補正した歪補正曲線として基準曲線が算出される。   The reference curves 311 and 312 are curves that approximate the contour (edge) of the measurement object, and are calculated based on the two reference points 301 and 302. In the present embodiment, in particular, the imaging optical system installed at the distal end of the endoscope 2 (in the distal end portion 21) and the imaging optical system separately attached to the distal end of the endoscope 2 (optical adapters 7a, 7b, 7c). A reference curve is calculated as a distortion correction curve obtained by correcting the distortion.

基準点エリア321,322は、基準曲線311,312を求める際に基準点周囲のエッジを抽出するための画像範囲である。基準点エリア321,322のサイズは、歪補正曲線の算出に適した値に設定するのが良い。   The reference point areas 321 and 322 are image ranges for extracting edges around the reference point when the reference curves 311 and 312 are obtained. The sizes of the reference point areas 321 and 322 are preferably set to values suitable for the calculation of the distortion correction curve.

次に、図4〜図5を参照し、欠損の種類、欠損始点・終点・頂点、および欠損構成点を説明する。本実施形態で計測対象となる欠損には、辺の欠損と角の欠損の2種類がある。辺の欠損は図4の欠損400のように計測対象のエッジの辺上に形成された欠損であり、角の欠損は図5の欠損500のように計測対象のエッジの角に形成された欠損である。   Next, with reference to FIG. 4 to FIG. 5, types of defects, defect start points / end points / vertices, and defect component points will be described. There are two types of defects to be measured in the present embodiment: edge defects and corner defects. The side defect is a defect formed on the edge of the measurement target edge like the defect 400 in FIG. 4, and the corner defect is the defect formed in the edge of the measurement target edge like the defect 500 in FIG. It is.

欠損始点401,501は、表示される計測画面上において、後述する欠損計算で欠損を構成する点として最初に認識される点である。欠損終点402,502は、欠損を構成する点として最後に認識される点である。欠損頂点503は、角の欠損500において、2つの基準曲線521,522の交点として認識される点である。欠損構成点410,510は、計測対象物に形成された欠損のエッジを構成する点であり、欠損始点・欠損終点・欠損頂点を含む。   The defect start points 401 and 501 are points that are first recognized as points constituting a defect in the defect calculation described later on the displayed measurement screen. The defect end points 402 and 502 are points that are finally recognized as points constituting the defect. The missing vertex 503 is a point that is recognized as an intersection of the two reference curves 521 and 522 in the corner defect 500. The missing component points 410 and 510 are points that constitute the edge of the defect formed on the measurement object, and include a defect start point, a defect end point, and a defect vertex.

次に、図6〜図7を参照し、欠損サイズを説明する。欠損サイズとは、検出された欠損の大きさを表すパラメータである。本実施形態で計算される欠損サイズは、辺の欠損では欠損の幅、深さ、面積であり、角の欠損では欠損の幅、辺の長さ、面積である。より具体的には、欠損の幅は欠損始点−欠損終点間の空間距離である。欠損の深さは、所定の欠損構成点から、欠損始点と欠損終点を結んだ直線までの空間距離である。欠損の辺は欠損頂点−欠損始点間の空間距離および欠損頂点−欠損終点間の空間距離である。欠損の面積は、全ての欠損構成点で囲まれた領域の空間面積である。   Next, the defect size will be described with reference to FIGS. The defect size is a parameter representing the size of the detected defect. The defect size calculated in the present embodiment is the width, depth, and area of the defect in the defect of the side, and the width, length, and area of the defect in the defect of the corner. More specifically, the width of the defect is a spatial distance between the defect start point and the defect end point. The depth of the defect is a spatial distance from a predetermined defect constituent point to a straight line connecting the defect start point and the defect end point. The missing edges are the spatial distance between the missing vertex and the missing start point and the spatial distance between the missing vertex and the missing end point. The area of the defect is a spatial area of a region surrounded by all the defect composing points.

図6は辺の欠損サイズを示しており、欠損の幅600は、後述する欠損計算で欠損始点611と欠損終点612の空間距離として算出される。欠損の深さ601は所定の欠損構成点613から、欠損始点611と欠損終点612を結んだ直線までの空間距離として算出される。欠損の面積は、図示していない欠損構成点を含む全ての欠損構成点で囲まれた領域620の空間面積として算出される。   FIG. 6 shows the defect size of the side, and the defect width 600 is calculated as a spatial distance between the defect start point 611 and the defect end point 612 by the defect calculation described later. The defect depth 601 is calculated as a spatial distance from a predetermined defect constituent point 613 to a straight line connecting the defect start point 611 and the defect end point 612. The area of the defect is calculated as a spatial area of a region 620 surrounded by all the defect component points including a defect component point (not shown).

図7は角の欠損サイズを示しており、欠損の幅700は、後述する欠損計算で欠損始点711と欠損終点712の空間距離として算出される。欠損の辺701は欠損頂点713と欠損始点711の空間距離として算出され、欠損の辺702は欠損頂点713と欠損終点712の空間距離として算出される。欠損の面積は、図示していない欠損構成点を含む全ての欠損構成点で囲まれた領域720の空間面積として算出される。   FIG. 7 shows a corner defect size, and a defect width 700 is calculated as a spatial distance between a defect start point 711 and a defect end point 712 by a defect calculation described later. The missing side 701 is calculated as the spatial distance between the missing vertex 713 and the missing start point 711, and the missing side 702 is calculated as the spatial distance between the missing vertex 713 and the missing end point 712. The area of the defect is calculated as a spatial area of a region 720 surrounded by all the defect component points including a defect component point (not shown).

次に、図8を参照し、計測点および計測点エリアを説明する。計測点801は、表示される計測画面上における計測対象物のエッジ上の点であり、後述する欠損計算で第1の基準点802から第2の基準点803に向かう方向(方向T8)に順次サーチ(探索)される。さらに、サーチされた計測点の一部は、欠損構成点として認識される。   Next, measurement points and measurement point areas will be described with reference to FIG. The measurement point 801 is a point on the edge of the measurement object on the displayed measurement screen, and sequentially in the direction (direction T8) from the first reference point 802 to the second reference point 803 in the defect calculation described later. Searched. Furthermore, some of the searched measurement points are recognized as missing constituent points.

計測点エリア804は、計測点801をサーチする際に、計測点周囲のエッジを抽出するための画像範囲である。計測点エリア804のサイズは、エッジ抽出を行うのに適した値に設定するのが良い。   The measurement point area 804 is an image range for extracting an edge around the measurement point when searching for the measurement point 801. The size of the measurement point area 804 is preferably set to a value suitable for edge extraction.

次に、図9〜図10を参照し、特徴点を説明する。特徴点901,902および特徴点1001,1002は、基準点903を含む基準点エリア910および計測点1003を含む計測点エリア1010内で抽出されるエッジ上の特徴的な点である。基準点エリア910内で抽出された特徴点901,902は、後述する欠損計算で基準曲線を算出するために用いられる。また、計測点エリア1010等で抽出された特徴点の一部は、欠損計算で計測点として選択される。   Next, feature points will be described with reference to FIGS. The feature points 901 and 902 and the feature points 1001 and 1002 are characteristic points on the edge extracted in the reference point area 910 including the reference point 903 and the measurement point area 1010 including the measurement point 1003. The feature points 901 and 902 extracted in the reference point area 910 are used to calculate a reference curve by a defect calculation described later. Also, some of the feature points extracted in the measurement point area 1010 and the like are selected as measurement points in the defect calculation.

次に、本実施形態における欠損計測の手順を説明する。まず、図11〜図12を参照し、欠損計測の手順と計測画面を説明する。図11は欠損計測の手順を示し、図12は計測画面を示している。以後の説明に用いる図12等の計測画面では、操作メニュー等が説明に不要な場合、その図示を省略することがある。図12において、計測画面1200,1210,1220は、辺の欠損を計測対象としたときの計測画面であり、計測画面1230,1240,1250は、角の欠損を計測対象としたときの計測画面である。   Next, the procedure of defect measurement in this embodiment will be described. First, with reference to FIG. 11 to FIG. 12, a procedure for defect measurement and a measurement screen will be described. FIG. 11 shows a procedure for defect measurement, and FIG. 12 shows a measurement screen. In the measurement screen shown in FIG. 12 or the like used for the following description, the operation menu or the like may be omitted if it is not necessary for the description. In FIG. 12, measurement screens 1200, 1210, and 1220 are measurement screens when edge loss is a measurement target, and measurement screens 1230, 1240, and 1250 are measurement screens when corner loss is a measurement target. is there.

本実施形態では、ステレオ計測による欠損計測が行われる。ステレオ計測においては、ステレオ光学アダプタを内視鏡2の先端部21に装着した状態で計測対象物を撮像するため、計測画面では計測対象物の画像が左右1対で表示される。   In this embodiment, loss measurement by stereo measurement is performed. In stereo measurement, since the measurement object is imaged with the stereo optical adapter attached to the distal end portion 21 of the endoscope 2, an image of the measurement object is displayed in a pair on the measurement screen.

欠損計測では、まず、液晶モニタ5またはフェイスマウントディスプレイ6に表示された計測画面上において、リモートコントローラ4あるいはパーソナルコンピュータ31の操作により、ユーザが基準点を2つ指定すると、指定された基準点の情報が計測処理部18に入力される(ステップSA)。このとき、ユーザは、欠損の両側に位置する点であって欠損の存在しないエッジ上の点を基準点として選択することが望ましい。図12において、左画像内の基準点1201,1202と基準点1231,1232が指定されている。   In the defect measurement, first, when the user designates two reference points on the measurement screen displayed on the liquid crystal monitor 5 or the face mount display 6 by operating the remote controller 4 or the personal computer 31, the designated reference point is selected. Information is input to the measurement processing unit 18 (step SA). At this time, it is desirable for the user to select points on both sides of the defect and on the edge where the defect does not exist as reference points. In FIG. 12, reference points 1201 and 1202 and reference points 1231 and 1232 in the left image are designated.

続いて、指定された基準点の座標に基づいて、計測処理部18が欠損計算を行う(ステップSB)。欠損計算では、欠損構成点の座標や欠損サイズの算出、欠損の種類の判別が行われる。計測画面1210,1240は計算中の計測画面である。欠損計算の詳細については後述する。   Subsequently, based on the coordinates of the designated reference point, the measurement processing unit 18 performs loss calculation (step SB). In the defect calculation, the coordinates of the defect component points and the defect size are calculated, and the defect type is determined. Measurement screens 1210 and 1240 are measurement screens being calculated. Details of the loss calculation will be described later.

欠損計算が終了すると、計測処理部18の指示により、検出された欠損領域が計測画面上に表示される(ステップSC)と共に、欠損の種類および欠損サイズが表示される(ステップSD〜SE)。図12に示すように、欠損領域は計測画面1220の左画面1221上および計測画面1250上の左画面1251上に表示される。より具体的には、算出された欠損構成点が線で結ばれて表示される。さらに、欠損構成点の中で、欠損始点・終点・頂点が、それぞれ○・*・□のカーソルで表示される。   When the defect calculation is completed, the detected defect area is displayed on the measurement screen (step SC) and the defect type and the defect size are displayed (steps SD to SE) according to an instruction from the measurement processing unit 18. As shown in FIG. 12, the missing area is displayed on the left screen 1221 of the measurement screen 1220 and the left screen 1251 on the measurement screen 1250. More specifically, the calculated missing component points are connected by a line and displayed. Furthermore, among the missing component points, the missing start point, the end point, and the vertex are respectively displayed with the cursors ◯, *, and □.

また、検出された欠損の種類は計測画面1220,1250の右画面1222,1252上の結果ウィンドウ1223,1253の上部にイメージで表示される。さらに、検出された欠損のサイズが計測画面1220,1250の右画面1222,1252上の結果ウィンドウ1223,1253の下部に文字で表示される。   Further, the type of the detected defect is displayed as an image on the upper part of the result windows 1223 and 1253 on the right screens 1222 and 1252 of the measurement screens 1220 and 1250. Further, the size of the detected defect is displayed in characters at the bottom of the result windows 1223 and 1253 on the right screens 1222 and 1252 of the measurement screens 1220 and 1250.

次に、図13を参照し、図11のステップSBにおける欠損計算の手順を説明する。ユーザによって指定された左画面内の2つの基準点の位置情報が計測処理部18に入力されると、基準点指定部18bは2つの基準点の画像座標(液晶モニタ5またはフェイスマウントディスプレイ6に表示される画像上の2次元座標)を算出する(ステップSB1)。続いて、基準曲線算出部18cは、2つの基準点の画像座標に基づいて、2つの基準曲線を算出する(ステップSB2)。   Next, with reference to FIG. 13, the procedure of the loss calculation in step SB of FIG. 11 will be described. When the position information of the two reference points in the left screen designated by the user is input to the measurement processing unit 18, the reference point designating unit 18b displays the image coordinates of the two reference points (on the liquid crystal monitor 5 or the face mount display 6). The two-dimensional coordinates on the displayed image are calculated (step SB1). Subsequently, the reference curve calculation unit 18c calculates two reference curves based on the image coordinates of the two reference points (step SB2).

続いて、欠損種類判別部18eは、2本の基準曲線がなす角度を算出し、その角度に応じて欠損の種類を判別する(ステップSB3)。続いて、欠損構成点算出部18dは、2つの基準点の画像座標に基づいて(角の欠損の場合には基準曲線も用いて)欠損構成点の画像座標を算出する(ステップSB4)。   Subsequently, the defect type determination unit 18e calculates an angle formed by the two reference curves, and determines the type of the defect according to the angle (step SB3). Subsequently, the missing component point calculation unit 18d calculates the image coordinates of the missing component point based on the image coordinates of the two reference points (also using the reference curve in the case of a corner defect) (step SB4).

続いて、欠損構成点算出部18dは、算出した左画面内の各欠損構成点に対応した右画面内のマッチング点の画像座標を算出し(ステップSB5)、算出された欠損構成点およびそのマッチング点の画像座標に基づいて各欠損構成点の空間座標(現実の空間上の3次元座標)を算出する(ステップSB6)。   Subsequently, the missing component point calculation unit 18d calculates the image coordinates of the matching point in the right screen corresponding to each calculated missing component point in the left screen (step SB5), the calculated missing component point and its matching Based on the image coordinates of the points, the spatial coordinates (three-dimensional coordinates in the real space) of each missing component point are calculated (step SB6).

空間座標の計算方法は、特開2004−49638号公報に記載されているものと同様である。最後に、欠損サイズ算出部18fは、算出された欠損構成点の空間座標に基づいて、欠損の種類に応じた欠損サイズを算出する(ステップSB7)。   The method for calculating the spatial coordinates is the same as that described in Japanese Patent Application Laid-Open No. 2004-49638. Finally, the defect size calculation unit 18f calculates the defect size according to the defect type based on the calculated spatial coordinates of the defect component points (step SB7).

次に、図14を参照し、図12のステップSB2における基準曲線の算出処理の手順を説明する。基準点指定部18bによって算出された2つの基準点の画像座標が入力される(ステップSB21)と、基準曲線算出部18cは、入力された基準点の画像座標に基づいて、各基準点について特徴点を2つずつ算出する(ステップSB22)。   Next, the procedure of the reference curve calculation process in step SB2 of FIG. 12 will be described with reference to FIG. When the image coordinates of the two reference points calculated by the reference point specifying unit 18b are input (step SB21), the reference curve calculating unit 18c is characterized for each reference point based on the input image coordinates of the reference point. Two points are calculated (step SB22).

続いて、基準曲線算出部18cは、2つの特徴点に基づいて、撮像光学系の歪みを補正した歪補正曲線を算出する(ステップSB23)。基準点が2つであるので、2本の歪補正曲線が算出される。最後に、基準曲線算出部18cは、この歪補正曲線の情報(曲線を構成する点の画像座標または曲線の式)を基準曲線の情報として制御部18aへ出力する(ステップSB24)。   Subsequently, the reference curve calculation unit 18c calculates a distortion correction curve obtained by correcting the distortion of the imaging optical system based on the two feature points (step SB23). Since there are two reference points, two distortion correction curves are calculated. Finally, the reference curve calculation unit 18c outputs the distortion correction curve information (the image coordinates of the points constituting the curve or the equation of the curve) to the control unit 18a as the reference curve information (step SB24).

以下、図15を参照し、上記のステップSB22における特徴点の算出処理の手順を説明する。特徴点の算出処理は基準曲線の算出時だけでなく欠損構成点の算出時にも行われる。欠損構成点の算出処理については後述するが、ここでは特徴点の算出処理をまとめて説明する。   Hereinafter, the procedure of the feature point calculation process in step SB22 will be described with reference to FIG. The feature point calculation process is performed not only when the reference curve is calculated but also when the missing component points are calculated. The calculation process of the missing constituent points will be described later, but here, the calculation process of the feature points will be described together.

また、図16〜図17は特徴点の算出処理の手順を模式的に示しており、適宜図16〜図17も参照する。図16は基準点周囲の特徴点を算出する場合の手順を示し、図17は計測点周囲の特徴点を算出する場合の手順を示している。   16 to 17 schematically show the procedure of feature point calculation processing, and FIGS. 16 to 17 are also referred to as appropriate. FIG. 16 shows a procedure for calculating feature points around the reference point, and FIG. 17 shows a procedure for calculating feature points around the measurement point.

基準点の画像座標もしくは計測点の画像座標が入力される(ステップSF1)と、入力された基準点の画像座標もしくは計測点の画像座標に基づいて、基準点エリア内もしくは計測点エリア内のエリア画像が抽出される(ステップSF2)。これによって、基準点1600を含む基準点エリア内のエリア画像1601、もしくは計測点1700を含む計測点エリア内のエリア画像1701が抽出される。   When the image coordinates of the reference point or the image coordinates of the measurement point are input (step SF1), the area within the reference point area or the measurement point area is determined based on the input image coordinates of the reference point or measurement point. An image is extracted (step SF2). As a result, an area image 1601 in the reference point area including the reference point 1600 or an area image 1701 in the measurement point area including the measurement point 1700 is extracted.

続いて、抽出されたエリア画像がグレースケール化され(ステップSF3)、グレースケール化された画像に対してエッジ抽出が行われる(ステップSF4)。続いて、抽出されたエッジの近似直線が算出され(ステップSF5)、算出されたエッジ近似直線とエリア境界線との2つの交点が算出される(ステップSF6)。これによって、エッジ近似直線1602もしくはエッジ近似直線1702が算出され、エッジ近似直線1602とエリア境界線との交点1603,1604もしくはエッジ近似直線1702とエリア境界線との交点1703,1704が算出される。   Subsequently, the extracted area image is grayscaled (step SF3), and edge extraction is performed on the grayscaled image (step SF4). Subsequently, an approximated straight line of the extracted edge is calculated (step SF5), and two intersections between the calculated edge approximated line and the area boundary line are calculated (step SF6). As a result, the edge approximate line 1602 or the edge approximate line 1702 is calculated, and the intersection points 1603 and 1604 between the edge approximate line 1602 and the area boundary line or the intersection points 1703 and 1704 between the edge approximate line 1702 and the area boundary line are calculated.

最後に、算出された各交点と抽出されたエッジとの最近傍点が算出され(ステップSF7)、算出された2つの最近傍点が特徴点として制御部18aへ出力される(ステップSF8)。これによって、交点1603,1604に対応した最近傍点1605,1606、もしくは交点1703,1704に対応した最近傍点1705,1706が特徴点として出力される。   Finally, the nearest neighbor point between each calculated intersection and the extracted edge is calculated (step SF7), and the two calculated nearest neighbor points are output to the control unit 18a as feature points (step SF8). As a result, the nearest points 1605 and 1606 corresponding to the intersection points 1603 and 1604 or the nearest points 1705 and 1706 corresponding to the intersection points 1703 and 1704 are output as feature points.

ステップSF4のエッジ抽出後にエッジ近似直線の算出を行うため、エッジ抽出には、抽出後の画像にできるだけノイズが発生しない処理を用いるのが良い。例えばSobel・Prewitt・Gradientフィルタ等の1次微分フィルタやLaplacianフィルタ等の2次微分フィルタを用いると良い。   Since the edge approximate straight line is calculated after the edge extraction in step SF4, it is preferable to use a process that generates as little noise as possible in the extracted image. For example, a primary differential filter such as a Sobel / Prewitt / Gradient filter or a secondary differential filter such as a Laplacian filter may be used.

また、膨張・収縮・差分処理およびノイズ低減フィルタ等を組み合わせた処理を用いてエッジ抽出を行っても良い。このとき、グレースケール画像を2値化する必要があるが、2値化閾値には固定値を用いても良いし、P−タイル法、モード法、判別分析法など、グレースケール画像の輝度に基づいて閾値を変更する方法を用いても良い。   Alternatively, edge extraction may be performed using a process that combines expansion / contraction / difference processing and a noise reduction filter. At this time, it is necessary to binarize the grayscale image. However, a fixed value may be used as the binarization threshold, and the luminance of the grayscale image may be increased by a P-tile method, a mode method, a discriminant analysis method, or the like. You may use the method of changing a threshold based on this.

また、ステップSF5のエッジ近似直線の算出では、ステップSF4で抽出されたエッジの情報に基づいて、例えば最小2乗法を用いて近似直線を算出する。なお、上記では、エッジの形状に対して直線近似を行っているが、2次以上の関数を使って曲線近似を行っても良い。エッジの形状が直線よりも曲線に近い場合には、曲線近似を行った方がより精度の良い特徴点算出が可能となる。   Further, in the calculation of the edge approximate straight line in step SF5, the approximate straight line is calculated using, for example, the least square method based on the edge information extracted in step SF4. In the above description, linear approximation is performed on the shape of the edge, but curve approximation may be performed using a quadratic or higher function. When the edge shape is closer to a curve than a straight line, more accurate feature point calculation is possible by curve approximation.

次に、図14のステップSB23における歪補正曲線の算出処理の手順を説明する。本実施形態による計測用内視鏡装置1に適用される内視鏡2では、各内視鏡2特有の撮像光学系の光学データが測定される。測定された光学データは例えばメモリカード33に記録される。この光学データを用いることにより、計測画像を、撮像光学系の歪みを補正した歪補正画像に変換することができる。   Next, the procedure of the distortion correction curve calculation process in step SB23 of FIG. 14 will be described. In the endoscope 2 applied to the measurement endoscope apparatus 1 according to the present embodiment, optical data of an imaging optical system unique to each endoscope 2 is measured. The measured optical data is recorded in the memory card 33, for example. By using this optical data, the measurement image can be converted into a distortion corrected image obtained by correcting the distortion of the imaging optical system.

以下、図18を参照し、歪補正曲線の算出方法を説明する。原画像1800は計測対象物の画像であり、点P1,P2は、図14のステップSB22で算出された2つの特徴点である。光学データを用いて原画像1800を変換すると歪補正画像1801となる。点P1’,P2’はそれぞれ点P1,P2の変換後の点である。   Hereinafter, a method for calculating a distortion correction curve will be described with reference to FIG. The original image 1800 is an image of the measurement object, and points P1 and P2 are the two feature points calculated in step SB22 in FIG. When the original image 1800 is converted using the optical data, a distortion corrected image 1801 is obtained. Points P1 'and P2' are points after conversion of points P1 and P2, respectively.

この点P1’,P2’を歪補正画像1801上で結んだ直線を直線Lとし、光学データを用いて直線L上の各画素点を逆変換すると、直線Lは原画像1802上において曲線L’に変換される。この曲線L’の情報が、点P1,P2を通る歪曲線の情報として制御部18aへ出力される。光学データの内容およびその作成方法、歪補正方法に関しては、特開2004−49638号公報に記載された内容と同じである。   When a straight line connecting the points P1 ′ and P2 ′ on the distortion corrected image 1801 is defined as a straight line L and each pixel point on the straight line L is inversely converted using optical data, the straight line L is converted into a curve L ′ on the original image 1802. Is converted to Information on the curve L 'is output to the control unit 18a as information on a distortion curve passing through the points P1 and P2. The contents of the optical data, the creation method thereof, and the distortion correction method are the same as those described in Japanese Patent Application Laid-Open No. 2004-49638.

次に、図19を参照し、図13のステップSB3における欠損種類の判別処理の手順を説明する。2本の基準曲線の情報が制御部18aから入力される(ステップSB31)と、欠損種類判別部18eは2本の基準曲線がなす角度を算出する(ステップSB32)。続いて、欠損種類判別部18eは、2本の基準曲線のなす角度が所定の範囲であるか否かを判定する(ステップSB33)。   Next, with reference to FIG. 19, the procedure of the defect type determination process in step SB3 of FIG. 13 will be described. When information on two reference curves is input from the control unit 18a (step SB31), the defect type determination unit 18e calculates an angle formed by the two reference curves (step SB32). Subsequently, the defect type determination unit 18e determines whether or not the angle formed by the two reference curves is within a predetermined range (step SB33).

2本の基準曲線のなす角度が所定の範囲であった場合(例えば角度が180°に近い値の場合)、欠損種類判別部18eは、欠損が辺の欠損であると判断し、欠損の判別結果を制御部18aへ出力する。制御部18aは欠損の判別結果を記憶部18gに格納する(ステップSB34)。また、2本の基準曲線のなす角度が所定の範囲でなかった場合(例えば角度が90°に近い値の場合)、欠損種類判別部18eは、欠損が角の欠損であると判断し、欠損の判別結果を制御部18aへ出力する。制御部18aは欠損の判別結果を記憶部18gに格納する(ステップSB35)。   When the angle formed by the two reference curves is within a predetermined range (for example, when the angle is a value close to 180 °), the defect type determination unit 18e determines that the defect is an edge defect, and determines the defect. The result is output to the control unit 18a. The control unit 18a stores the defect determination result in the storage unit 18g (step SB34). In addition, when the angle formed by the two reference curves is not within a predetermined range (for example, when the angle is a value close to 90 °), the defect type determination unit 18e determines that the defect is an angular defect, Is output to the control unit 18a. The control unit 18a stores the defect determination result in the storage unit 18g (step SB35).

次に、図13のステップSB4における欠損構成点の算出処理の手順を説明する。欠損構成点の算出処理は、欠損頂点算出処理、欠損始点算出処理、2種類の計測点算出処理、および欠損終点算出処理で構成される。まず、図20を参照し、欠損頂点算出処理の手順を説明する。   Next, the procedure of the missing component point calculation process in step SB4 in FIG. 13 will be described. The calculation process of the missing component point includes a missing vertex calculation process, a missing start point calculation process, two types of measurement point calculation processes, and a missing end point calculation process. First, the procedure of the missing vertex calculation process will be described with reference to FIG.

制御部18aから欠損の判別結果が入力される(ステップSB411a)と、欠損構成点算出部18dは、判別結果に基づいて欠損の種類を判別する(ステップSB411b)。欠損の種類が角の欠損であった場合、制御部18aから2本の基準曲線の情報が入力される(ステップSB411c)。   When a defect determination result is input from the control unit 18a (step SB411a), the defect component point calculation unit 18d determines the type of defect based on the determination result (step SB411b). When the type of defect is a corner defect, information on two reference curves is input from the control unit 18a (step SB411c).

欠損構成点算出部18dは、入力された情報に基づいて2本の基準曲線の交点を算出し(ステップSB411d)、算出した交点の画像座標を制御部18aへ出力する。制御部18aは2本の基準曲線の交点の画像座標を欠損構成点(欠損頂点)の画像座標として記憶部18gに格納する(ステップSB411e)。続いて、図21に示す第1の計測点算出処理へ処理が移行する。また、欠損の種類が辺の欠損であった場合、ステップSB411bに続いて、図21に示す第1の計測点算出処理へ処理が移行する。   The missing component point calculation unit 18d calculates the intersection of the two reference curves based on the input information (step SB411d), and outputs the calculated image coordinates of the intersection to the control unit 18a. The control unit 18a stores the image coordinates of the intersection of the two reference curves in the storage unit 18g as the image coordinates of the missing component point (missing vertex) (step SB411e). Subsequently, the process proceeds to a first measurement point calculation process illustrated in FIG. If the type of defect is an edge defect, the process moves to the first measurement point calculation process shown in FIG. 21 following step SB411b.

次に、図21を参照し、第1の計測点算出処理の手順を説明する。また、図22は第1の計測点算出処理の手順を模式的に示しており、適宜図22も参照する。ユーザによって指定された2つの基準点のうち、最初に指定された第1の基準点の画像座標が制御部18aから入力される(ステップSB412a)と、欠損構成点算出部18dは図15に示した特徴点の算出処理を実行し、2つの特徴点を算出する(ステップSB412b)。これによって、第1の基準点2200に対応した2つの特徴点2201,2202が算出される。   Next, the procedure of the first measurement point calculation process will be described with reference to FIG. FIG. 22 schematically shows the procedure of the first measurement point calculation process, and FIG. 22 is also referred to as appropriate. When the image coordinates of the first reference point specified first among the two reference points specified by the user are input from the control unit 18a (step SB412a), the missing component point calculation unit 18d is shown in FIG. The feature point calculation process is executed, and two feature points are calculated (step SB412b). As a result, two feature points 2201 and 2202 corresponding to the first reference point 2200 are calculated.

続いて、第2の基準点の画像座標が制御部18aから入力される(ステップSB412c)。欠損構成点算出部18dは2つの特徴点と第2の基準点の2次元距離を算出し、2つの特徴点のうち第2の基準点に近い方を次の計測点とする(ステップSB412d)。第2の基準点のある方向が図22の方向T22である場合、特徴点2201,2202のうち特徴点2202が次の計測点2203となる。   Subsequently, the image coordinates of the second reference point are input from the control unit 18a (step SB412c). The missing component point calculation unit 18d calculates the two-dimensional distance between the two feature points and the second reference point, and sets the one closer to the second reference point out of the two feature points as the next measurement point (step SB412d). . When the direction in which the second reference point exists is the direction T22 in FIG. 22, the feature point 2202 of the feature points 2201 and 2202 becomes the next measurement point 2203.

続いて、欠損構成点算出部18dは、算出した計測点の画像座標を制御部18aへ出力する。制御部18aは計測点の画像座標を記憶部18gに格納する(ステップSB412e)。続いて、図23に示す欠損始点算出処理へ処理が移行する。   Subsequently, the missing component point calculation unit 18d outputs the calculated image coordinates of the measurement points to the control unit 18a. The control unit 18a stores the image coordinates of the measurement point in the storage unit 18g (step SB412e). Subsequently, the processing shifts to the missing start point calculation processing shown in FIG.

次に、図23を参照し、欠損始点算出処理の手順を説明する。また、図24は欠損始点算出処理の手順を模式的に示しており、適宜図24も参照する。まず、前回求めた計測点の画像座標が制御部18aから入力され(ステップSB413a)、2本の基準曲線のうち第1の基準点から算出された第1の基準曲線の情報が制御部18aから入力される(ステップSB413b)。   Next, with reference to FIG. 23, the procedure of the missing start point calculation process will be described. FIG. 24 schematically shows the procedure of the missing start point calculation process, and FIG. 24 is also referred to as appropriate. First, the image coordinates of the measurement point obtained last time are input from the control unit 18a (step SB413a), and information on the first reference curve calculated from the first reference point of the two reference curves is received from the control unit 18a. Input (step SB413b).

続いて、欠損構成点算出部18dは第1の基準曲線と計測点の2次元距離を算出し(ステップSB413c)、算出した2次元距離が所定値以上であるか否かを判定する(ステップSB413d)。算出した2次元距離が所定値以上であった場合、欠損構成点算出部18dは、計測対象物のエッジを近似する直線であるエッジ近似直線を算出する(ステップSB413e)。例えば図24に示すように、第1の基準点2401から算出された第1の基準曲線2410と計測点2402の2次元距離D24が所定値以上であった場合、エッジ近似直線2411が算出される。   Subsequently, the missing component point calculation unit 18d calculates a two-dimensional distance between the first reference curve and the measurement point (step SB413c), and determines whether or not the calculated two-dimensional distance is a predetermined value or more (step SB413d). ). If the calculated two-dimensional distance is greater than or equal to the predetermined value, the missing component point calculation unit 18d calculates an edge approximate line that is a straight line that approximates the edge of the measurement target (step SB413e). For example, as shown in FIG. 24, when the two-dimensional distance D24 between the first reference curve 2410 calculated from the first reference point 2401 and the measurement point 2402 is greater than or equal to a predetermined value, an edge approximate straight line 2411 is calculated. .

続いて、欠損構成点算出部18dは第1の基準曲線とエッジ近似直線の交点を算出する(ステップSB413f)。これによって、第1の基準曲線2410とエッジ近似直線2411の交点2403が算出される。   Subsequently, the missing component point calculation unit 18d calculates the intersection of the first reference curve and the edge approximate straight line (step SB413f). Thereby, the intersection 2403 of the first reference curve 2410 and the edge approximate straight line 2411 is calculated.

続いて、欠損構成点算出部18dは、算出した交点の画像座標を制御部18aへ出力する。制御部18aは交点の画像座標を欠損構成点(欠損始点)の画像座標として記憶部18gに格納する(ステップSB413g)。続いて、図25に示す第2の計測点算出処理へ処理が移行する。また、ステップSB413cで算出した2次元距離が所定値未満であった場合、ステップSB413dに続いて、図25に示す第2の計測点算出処理へ処理が移行する。   Subsequently, the missing component point calculation unit 18d outputs the calculated image coordinates of the intersection to the control unit 18a. The control unit 18a stores the image coordinates of the intersection in the storage unit 18g as the image coordinates of the missing component point (missing start point) (step SB413g). Subsequently, the process proceeds to the second measurement point calculation process illustrated in FIG. If the two-dimensional distance calculated in step SB413c is less than the predetermined value, the process proceeds to the second measurement point calculation process shown in FIG. 25 following step SB413d.

次に、図25を参照し、第2の計測点算出処理の手順を説明する。また、図26は第2の計測点算出処理の手順を模式的に示しており、適宜図26も参照する。前回求めた計測点の画像座標が制御部18aから入力される(ステップSB414a)と、欠損構成点算出部18dは図15に示した特徴点の算出処理を実行し、2つの特徴点を算出する(ステップSB414b)。これによって、計測点2600に対応した2つの特徴点2601,2602が算出される。   Next, the procedure of the second measurement point calculation process will be described with reference to FIG. FIG. 26 schematically shows the procedure of the second measurement point calculation process, and FIG. 26 is also referred to as appropriate. When the image coordinates of the measurement point obtained last time are input from the control unit 18a (step SB414a), the missing component point calculation unit 18d executes the feature point calculation process shown in FIG. 15 and calculates two feature points. (Step SB414b). As a result, two feature points 2601 and 2602 corresponding to the measurement point 2600 are calculated.

続いて、欠損構成点算出部18dは、前回求めた計測点と2つの特徴点のそれぞれとの2次元距離を算出し、2つの特徴点のうち、前回求めた計測点から遠い方を次の計測点とする(ステップSB414c)。前回求めた計測点のある方向が図26の方向T26である場合、特徴点2601,2602のうち特徴点2602が次の計測点2603となる。   Subsequently, the missing component point calculation unit 18d calculates a two-dimensional distance between the previously obtained measurement point and each of the two feature points, and the next of the two feature points that is far from the previously obtained measurement point is the next. A measurement point is set (step SB414c). When the direction in which the previously obtained measurement point is the direction T26 in FIG. 26, the feature point 2602 of the feature points 2601 and 2602 becomes the next measurement point 2603.

続いて、欠損構成点算出部18dは、欠損始点の画像座標が既に記憶部18gに格納されているか否かを判定する(ステップSB414d)。欠損始点の画像座標が既に記憶部18gに格納されている場合、欠損構成点算出部18dは、算出した計測点の画像座標を制御部18aへ出力する。制御部18aは計測点の画像座標を欠損構成点の画像座標として記憶部18gに格納する(ステップSB414e)。続いて、図27に示す欠損終点算出処理へ処理が移行する。また、欠損始点の画像座標が記憶部18gにまだ格納されていない場合、図23に示す欠損始点算出処理へ処理が再度移行する。   Subsequently, the missing component point calculation unit 18d determines whether or not the image coordinates of the missing start point are already stored in the storage unit 18g (step SB414d). When the image coordinates of the defect start point are already stored in the storage unit 18g, the defect component point calculation unit 18d outputs the calculated image coordinates of the measurement point to the control unit 18a. The control unit 18a stores the image coordinates of the measurement point in the storage unit 18g as the image coordinates of the missing component point (step SB414e). Subsequently, the processing shifts to the missing end point calculation processing shown in FIG. Further, when the image coordinates of the missing start point are not yet stored in the storage unit 18g, the process shifts again to the missing start point calculation process illustrated in FIG.

次に、図27を参照し、欠損終点算出処理の手順を説明する。また、図28は欠損終点算出処理の手順を模式的に示しており、適宜図28も参照する。まず、前回求めた計測点の画像座標が制御部18aから入力され(ステップSB415a)、2本の基準曲線のうち第2の基準点から算出された第2の基準曲線の情報が制御部18aから入力される(ステップSB415b)。   Next, with reference to FIG. 27, the procedure of the missing end point calculation process will be described. FIG. 28 schematically shows the procedure of the defect end point calculation process, and FIG. 28 is also referred to as appropriate. First, the image coordinates of the measurement point obtained last time are input from the control unit 18a (step SB415a), and information on the second reference curve calculated from the second reference point of the two reference curves is received from the control unit 18a. Input (step SB415b).

続いて、欠損構成点算出部18dは第2の基準曲線と計測点の2次元距離を算出し(ステップSB415c)、算出した2次元距離が所定値以下であるか否かを判定する(ステップSB415d)。算出した2次元距離が所定値以下であった場合、欠損構成点算出部18dは、計測対象物のエッジを近似する直線であるエッジ近似直線を算出する(ステップSB415e)。例えば図28に示すように、第2の基準点2800から算出された第2の基準曲線2810と計測点2801の2次元距離D28が所定値以下であった場合、エッジ近似直線2811が算出される。   Subsequently, the missing component point calculation unit 18d calculates a two-dimensional distance between the second reference curve and the measurement point (step SB415c), and determines whether the calculated two-dimensional distance is equal to or less than a predetermined value (step SB415d). ). When the calculated two-dimensional distance is equal to or smaller than the predetermined value, the missing component point calculation unit 18d calculates an edge approximate line that is a straight line that approximates the edge of the measurement target (step SB415e). For example, as shown in FIG. 28, when the two-dimensional distance D28 between the second reference curve 2810 calculated from the second reference point 2800 and the measurement point 2801 is equal to or smaller than a predetermined value, an edge approximate straight line 2811 is calculated. .

続いて、欠損構成点算出部18dは第2の基準曲線とエッジ近似直線の交点を算出する(ステップSB415f)。これによって、第2の基準曲線2810とエッジ近似直線2811の交点2803が算出される。   Subsequently, the missing component point calculation unit 18d calculates the intersection of the second reference curve and the edge approximate straight line (step SB415f). As a result, the intersection 2803 of the second reference curve 2810 and the edge approximate straight line 2811 is calculated.

続いて、欠損構成点算出部18dは、算出した交点の画像座標を制御部18aへ出力する。制御部18aは交点の画像座標を欠損構成点(欠損終点)の画像座標として記憶部18gに格納する(ステップSB415g)。この処理によって、上述した欠損構成点の算出処理の全体が終了する。また、ステップSB415cで算出した2次元距離が所定値を超えた場合、ステップSB415dに続いて、図25に示した第2の計測点算出処理へ処理が再度移行する。   Subsequently, the missing component point calculation unit 18d outputs the calculated image coordinates of the intersection to the control unit 18a. The control unit 18a stores the image coordinates of the intersection in the storage unit 18g as the image coordinates of the missing component point (missing end point) (step SB415g). With this process, the entire calculation process of the missing component point described above is completed. If the two-dimensional distance calculated in step SB415c exceeds a predetermined value, the process shifts again to the second measurement point calculation process shown in FIG. 25 following step SB415d.

次に、図29を参照し、図23のステップSB413eおよび図27のステップSB415eにおけるエッジ近似直線の算出処理の手順を説明する。計測点の画像座標が入力される(ステップSG1)と、欠損構成点算出部18dは、入力された計測点の画像座標に基づいて、計測点エリア内のエリア画像を抽出する(ステップSG2)。   Next, with reference to FIG. 29, the procedure of the edge approximate straight line calculation process in step SB413e in FIG. 23 and step SB415e in FIG. 27 will be described. When the image coordinates of the measurement point are input (step SG1), the missing component point calculation unit 18d extracts an area image in the measurement point area based on the input image coordinates of the measurement point (step SG2).

続いて、欠損構成点算出部18dは、抽出したエリア画像をグレースケール化し(ステップSG3)、グレースケール化した画像に対してエッジ抽出を行う(ステップSG4)。続いて、欠損構成点算出部18dは、抽出したエッジの近似直線を算出し(ステップSG5)、算出したエッジ近似直線の情報を制御部18aへ出力する(ステップSG6)。上記のステップSG1〜SG5の処理は図15のステップSF1〜SF5の処理と同様である。   Subsequently, the missing component point calculation unit 18d grayscales the extracted area image (step SG3), and performs edge extraction on the grayscaled image (step SG4). Subsequently, the missing component point calculation unit 18d calculates an approximated straight line of the extracted edge (step SG5), and outputs information on the calculated edge approximated line to the control unit 18a (step SG6). The processing in steps SG1 to SG5 is the same as the processing in steps SF1 to SF5 in FIG.

次に、図13のステップSB5におけるマッチング点の算出方法を説明する。欠損構成点算出部18dは、上述した欠損計算で算出した欠損構成点に基づいてパターンマッチング処理を実行し、左右2画像の対応点であるマッチング点を算出する。このパターンマッチング処理の方法は特開2004−49638号公報に記載されたものと同じである。   Next, a method for calculating a matching point in step SB5 in FIG. 13 will be described. The missing component point calculation unit 18d executes pattern matching processing based on the missing component points calculated by the above-described defect calculation, and calculates matching points 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.

しかし、欠損の種類が角の欠損であった場合、欠損頂点は計測対象物の背景に位置しており、画像上ではエッジ等の特徴的なパターンが存在しないので、パターンマッチング処理がうまく機能せず、マッチング点を算出できないことがある。そこで、本実施形態では、欠損の種類が角の欠損であった場合、欠損頂点のマッチング点の算出は以下のようにして行われる。   However, if the type of defect is a corner defect, the missing vertex is located in the background of the measurement object, and there is no characteristic pattern such as an edge on the image. Therefore, the matching point may not be calculated. Therefore, in the present embodiment, when the type of defect is a corner defect, the calculation of the matching point of the missing vertex is performed as follows.

図30(a)に示すように、まず、左画像3000の基準点3001,3002に対応した右画像3020のマッチング点3021,3022が算出される。続いて、基準点3001,3002のそれぞれを通る基準曲線3010,3011と、マッチング点3021,3022のそれぞれを通る基準曲線3030,3031とが算出される。   As shown in FIG. 30A, first, matching points 3021 and 3022 of the right image 3020 corresponding to the reference points 3001 and 3002 of the left image 3000 are calculated. Subsequently, reference curves 3010 and 3011 passing through the reference points 3001 and 3002 and reference curves 3030 and 3031 passing through the matching points 3021 and 3022 are calculated.

続いて、図30(b)に示すように、左画像3000の基準曲線3010,3011の交点3003が欠損頂点として算出される。また、右画像3020の基準曲線3030,3031の交点3023が算出され、欠損頂点のマッチング点とみなされる。   Subsequently, as shown in FIG. 30B, the intersection 3003 of the reference curves 3010 and 3011 of the left image 3000 is calculated as a missing vertex. Further, an intersection 3023 of the reference curves 3030 and 3031 of the right image 3020 is calculated and regarded as a matching point of the missing vertex.

次に、図31を参照し、図13のステップSB7における欠損サイズの算出処理の手順を説明する。欠損構成点の空間座標(3次元座標)および欠損の判別結果が制御部18aから入力される(ステップSB71)と、欠損サイズ算出部18fは欠損の幅(欠損始点−欠損終点間の空間距離)を算出する(ステップSB72)。   Next, with reference to FIG. 31, the procedure of the defect size calculation process in step SB7 of FIG. 13 will be described. When the spatial coordinates (three-dimensional coordinates) of the missing constituent points and the discrimination result of the missing are input from the control unit 18a (step SB71), the missing size calculating unit 18f displays the width of the missing (space distance between the missing start point and the missing end point). Is calculated (step SB72).

続いて、欠損サイズ算出部18fは、欠損の判別結果に基づいて欠損の種類を判定する(ステップSB73)。欠損の種類が辺の欠損であった場合、欠損サイズ算出部18fは欠損の深さ(所定の欠損構成点から、欠損始点と欠損終点を結んだ直線までの空間距離)を算出する(ステップSB74)。さらに、欠損サイズ算出部18fは欠損の面積(全ての欠損構成点で囲まれた領域の空間面積)を算出する(ステップSB75)。   Subsequently, the defect size calculation unit 18f determines the type of defect based on the defect determination result (step SB73). When the type of defect is an edge defect, the defect size calculation unit 18f calculates the defect depth (a spatial distance from a predetermined defect component point to a straight line connecting the defect start point and the defect end point) (step SB74). ). Further, the defect size calculation unit 18f calculates the area of the defect (the space area of the region surrounded by all the defect component points) (step SB75).

続いて、欠損サイズ算出部18fは、算出した欠損サイズを制御部18aへ出力する。制御部18aは欠損サイズを記憶部18gに格納する(ステップSB76)。また、欠損の種類が角の欠損であった場合には、欠損サイズ算出部18fは欠損の辺(欠損頂点−欠損始点間の空間距離および欠損頂点−欠損終点間の空間距離)を算出する(ステップSB77)。これに続いて、処理はステップSB75に移行する。以上が、特願2007−20906に開示された欠損計測の内容と同様の内容である。   Subsequently, the defect size calculation unit 18f outputs the calculated defect size to the control unit 18a. The control unit 18a stores the missing size in the storage unit 18g (step SB76). Further, when the type of defect is a corner defect, the defect size calculation unit 18f calculates a defect edge (a spatial distance between the defect vertex and the defect start point and a spatial distance between the defect vertex and the defect end point) ( Step SB77). Following this, the processing moves to step SB75. The above is the content similar to the content of the defect measurement disclosed in Japanese Patent Application No. 2007-20906.

次に、本実施形態で新たに開示する処理の内容を説明する。上記の基準曲線の算出処理(図13のステップSB2)および欠損構成点の算出処理(図13のステップSB4)には、画像をグレースケール化する処理が含まれているため、前述したように画像内の背景部分に、反射等による明るい部分が存在すると、その部分がノイズとなり被写体の一部として誤認識され、計測精度が悪くなる場合がある。   Next, the contents of processing newly disclosed in this embodiment will be described. The reference curve calculation process (step SB2 in FIG. 13) and the missing component point calculation process (step SB4 in FIG. 13) include the process of converting the image to gray scale. If a bright part due to reflection or the like exists in the background part, the part becomes noise and is erroneously recognized as a part of the subject, and the measurement accuracy may deteriorate.

図32(a)に示すように、撮像された画像において、背景3200と被写体3201のコントラストがはっきりしている場合には、図32(b)に示すように、2値化画像においてもノイズの発生はない。この場合には、本来の欠損始点3210および欠損終点3211が高精度に認識され、計測精度は高い。   As shown in FIG. 32 (a), when the contrast between the background 3200 and the subject 3201 is clear in the captured image, as shown in FIG. There is no occurrence. In this case, the original defect start point 3210 and the defect end point 3211 are recognized with high accuracy, and the measurement accuracy is high.

一方、図33(a)に示すように、撮像された画像において、背景3300に反射等による高輝度領域3300aが存在する場合には、図33(b)に示すように、2値化画像において、高輝度領域3300aに対応する領域3301がノイズとして現れる。この2値化画像を用いて欠損計測を実行すると、図33(c)のように点3320,3321,3322がそれぞれ欠損始点、欠損終点、欠損頂点となり、欠損部が誤認識されるため、計測精度が悪化する。   On the other hand, as shown in FIG. 33 (a), when a high brightness area 3300a due to reflection or the like exists in the background 3300 in the captured image, as shown in FIG. 33 (b), in the binarized image, A region 3301 corresponding to the high luminance region 3300a appears as noise. When defect measurement is performed using this binarized image, the points 3320, 3321, and 3322 become a defect start point, a defect end point, and a defect vertex as shown in FIG. Accuracy deteriorates.

そこで、本実施形態では、液晶モニタ5またはフェイスマウントディスプレイ6が2値化画像を表示することによって、被写体の一部として誤認識されるノイズの有無をユーザが確認することができるようになっている。図34および図35は2値化画像の表示例を示している。   Therefore, in the present embodiment, the liquid crystal monitor 5 or the face mount display 6 displays the binarized image, so that the user can confirm the presence or absence of noise that is erroneously recognized as a part of the subject. Yes. 34 and 35 show display examples of the binarized image.

図34は基準点の指定前の表示例を示しており、図12の計測画面1230の前に表示される計測画面を示している。基準点の指定前に2値化画像が表示される場合、ユーザは欠損計測の開始前に計測精度を予めイメージすることができる。図34(a)では左画像3400が2値化画像となっており、図34(b)では左画像3410と右画像3420が共に2値化画像となっている。   FIG. 34 shows a display example before designation of the reference point, and shows a measurement screen displayed before the measurement screen 1230 of FIG. When the binarized image is displayed before the reference point is designated, the user can preliminarily image the measurement accuracy before starting the defect measurement. In FIG. 34A, the left image 3400 is a binarized image, and in FIG. 34B, both the left image 3410 and the right image 3420 are binarized images.

図35は計測結果出力時の表示例を示しており、図12の計測画面1250の後に表示される計測画面を示している。図35では、左画像3500のみが2値化画像となっているが、左画像3500と右画像3510が共に2値化画像となっていてもよい。計測結果出力時に2値化画像が表示される場合、ユーザは、ノイズによる誤認識がなく、計測が狙い通りに実行されたか否かを欠損計測の終了後に確認することができる。   FIG. 35 shows a display example when outputting a measurement result, and shows a measurement screen displayed after the measurement screen 1250 of FIG. In FIG. 35, only the left image 3500 is a binarized image, but both the left image 3500 and the right image 3510 may be binarized images. When the binarized image is displayed when the measurement result is output, the user can confirm whether or not the measurement has been performed as intended without any erroneous recognition due to noise after the completion of the defect measurement.

次に、2値化画像の表示処理の手順を説明する。図36〜図39に示す処理は、図11に示した処理に対応しており、既に説明した処理の内容については説明を省略する。図36は、基準点の指定前に2値化画像を表示する場合の処理手順を示している。まず、制御部18aは、リモートコントローラ4あるいはパーソナルコンピュータ31の操作を監視し、計測精度の確認用画像である2値化画像の出力が設定されたか否かを判定する(ステップSG1)。   Next, the procedure of the binarized image display process will be described. The processes shown in FIGS. 36 to 39 correspond to the process shown in FIG. 11, and the description of the contents of the processes already described is omitted. FIG. 36 shows a processing procedure for displaying a binarized image before designating the reference point. First, the control unit 18a monitors the operation of the remote controller 4 or the personal computer 31, and determines whether or not the output of a binarized image that is a measurement accuracy confirmation image has been set (step SG1).

2値化画像の出力が設定されなかった場合には、処理がステップSAに進む。また、2値化画像の出力が設定された場合には、2値化画像が表示される(ステップSG2)。続いて、処理がステップSAに進み、前述したステップSA〜SEの処理が順に実行される。   If the output of the binarized image is not set, the process proceeds to step SA. If the output of the binarized image is set, the binarized image is displayed (step SG2). Subsequently, the process proceeds to step SA, and the processes of steps SA to SE described above are executed in order.

図40はステップSG2の処理の手順を示している。まず、制御部18aは、映像信号を構成する画像データを映像信号処理回路12から取得し、階調削減部18hへ出力する(ステップSG21)。階調削減部18hは画像データから輝度データ(信号レベル)を取り出すことによって画像をグレースケール化し(ステップSG22)、さらに所定の輝度を閾値として輝度データを2値に変換することによって2値化画像を生成する(ステップSG23)。ステップSG23では、例えば各画素の輝度値が0〜255のいずれかの値をとる場合、128を閾値として輝度値が0または255に変換される。   FIG. 40 shows the procedure of step SG2. First, the control unit 18a acquires the image data constituting the video signal from the video signal processing circuit 12, and outputs it to the gradation reduction unit 18h (step SG21). The gradation reduction unit 18h takes out the luminance data (signal level) from the image data to grayscale the image (step SG22), and further converts the luminance data into a binary value with a predetermined luminance as a threshold value, thereby converting the binary image into a binary image. Is generated (step SG23). In step SG23, for example, when the luminance value of each pixel takes any value from 0 to 255, the luminance value is converted to 0 or 255 using 128 as a threshold value.

続いて、制御部18aは、階調削減部18hから2値化画像を取得し、映像信号処理回路12へ出力する。映像信号処理回路12によって、2値化画像と操作メニュー等を合成する処理が実行された後、液晶モニタ5またはフェイスマウントディスプレイ6によって2値化画像が表示される(ステップSG24)。これによって、2値化画像が少なくとも表示されるが、図34(a)に示したように左画像のみを2値化画像として表示してもよいし、図34(b)に示したように左画像と右画像の両方を2値化画像として表示してもよい。   Subsequently, the control unit 18 a acquires a binarized image from the gradation reduction unit 18 h and outputs it to the video signal processing circuit 12. After the processing for synthesizing the binarized image and the operation menu is executed by the video signal processing circuit 12, the binarized image is displayed on the liquid crystal monitor 5 or the face mount display 6 (step SG24). As a result, at least a binarized image is displayed, but only the left image may be displayed as a binarized image as shown in FIG. 34 (a), or as shown in FIG. 34 (b). Both the left image and the right image may be displayed as a binarized image.

図37は、計測結果出力時に2値化画像を表示する場合の処理手順を示している。まず、前述したステップSA〜SEの処理が順に実行される。続いて、図36に示したステップSG1〜SG2の処理が順に実行され、2値化画像の出力が設定された場合には、2値化画像が表示される。   FIG. 37 shows a processing procedure for displaying a binarized image when outputting the measurement result. First, the processes of steps SA to SE described above are executed in order. Subsequently, the processes of steps SG1 to SG2 shown in FIG. 36 are sequentially executed, and when the output of the binarized image is set, the binarized image is displayed.

図38は、基準点の指定前に2値化画像と通常の画像を交互に表示する場合の処理手順を示している。まず、制御部18aは、画像の表示形態を判定するのに使用するフラグを0に設定する(ステップSG101)。続いて、制御部18aはフラグの値を判定する(ステップSG102)。この判定結果に応じて、以降の処理内容が変わる。また、この判定と並行して、制御部18aは、映像信号を構成する画像データを映像信号処理回路12から取得する。   FIG. 38 shows a processing procedure when a binarized image and a normal image are alternately displayed before the reference point is designated. First, the control unit 18a sets a flag used to determine the image display form to 0 (step SG101). Subsequently, the control unit 18a determines the value of the flag (step SG102). The subsequent processing contents change according to the determination result. In parallel with this determination, the control unit 18a acquires image data constituting the video signal from the video signal processing circuit 12.

フラグの値が0であった場合、制御部18aは、画像データを階調削減部18hへ出力し、階調削減処理を階調削減部18hに実行させると共に、2値化画像を表示するための処理を実行する(ステップSG103)。ステップSG103の処理は、図40に示した処理と同様である。   When the flag value is 0, the control unit 18a outputs the image data to the gradation reduction unit 18h, causes the gradation reduction unit 18h to execute gradation reduction processing, and displays a binarized image. The process is executed (step SG103). The process of step SG103 is the same as the process shown in FIG.

ステップSG103の処理の終了後、制御部18aはフラグを1に設定し(ステップSG104)、さらに時間の計測開始を時間計測部18iに指示する(ステップSG105)。制御部18aは、計測時間を監視し、予め設定されている所定時間が経過したか否かを判定する(ステップSG106)。所定時間が経過していない場合には、処理がステップSG106に戻り、計測時間の監視が続行される。また、所定時間が経過した場合には、処理がステップSG111に進む。この場合、制御部18aの指示により、時間計測部18iは時間の計測を終了する。   After the process of step SG103 is completed, the control unit 18a sets a flag to 1 (step SG104), and further instructs the time measurement unit 18i to start measuring time (step SG105). The controller 18a monitors the measurement time and determines whether or not a predetermined time set in advance has elapsed (step SG106). If the predetermined time has not elapsed, the process returns to step SG106, and monitoring of the measurement time is continued. If the predetermined time has elapsed, the process proceeds to step SG111. In this case, the time measurement unit 18i ends the time measurement in accordance with an instruction from the control unit 18a.

一方、ステップSG102において、フラグの値が1であった場合、制御部18aは、通常の画像を表示するための処理を実行する(ステップSG107)。このとき、液晶モニタ5またはフェイスマウントディスプレイ6によって通常の画像が表示され、2値化画像は表示されない。ステップSG108の処理の終了後、制御部18aはフラグを0に設定し(ステップSG108)、さらに時間の計測開始を時間計測部18iに指示する(ステップSG109)。制御部18aは、計測時間を監視し、予め設定されている所定時間が経過したか否かを判定する(ステップSG110)。所定時間が経過していない場合には、処理がステップSG110に戻り、計測時間の監視が続行される。また、所定時間が経過した場合には、処理がステップSG111に進む。この場合、制御部18aの指示により、時間計測部18iは時間の計測を終了する。   On the other hand, when the value of the flag is 1 in step SG102, the control unit 18a executes a process for displaying a normal image (step SG107). At this time, a normal image is displayed on the liquid crystal monitor 5 or the face mount display 6, and a binarized image is not displayed. After the process of step SG108 is completed, the control unit 18a sets a flag to 0 (step SG108), and further instructs the time measurement unit 18i to start measuring time (step SG109). The control unit 18a monitors the measurement time and determines whether or not a predetermined time set in advance has elapsed (step SG110). If the predetermined time has not elapsed, the process returns to step SG110, and monitoring of the measurement time is continued. If the predetermined time has elapsed, the process proceeds to step SG111. In this case, the time measurement unit 18i ends the time measurement in accordance with an instruction from the control unit 18a.

図38には示していないが、上記のステップS101〜S110の処理と並行して、基準点の指定に係る処理も実行されている。ステップS111では、制御部18aは、基準点の指定が終了したか否かを判定する(ステップSG111)。基準点の指定が終了していない場合には、処理がステップSG102に戻る。また、基準点の指定が終了した場合には、前述したステップSB〜SEの処理が順に実行される。   Although not shown in FIG. 38, in parallel with the processing in steps S101 to S110 described above, processing related to designation of a reference point is also executed. In step S111, the control unit 18a determines whether or not the specification of the reference point has been completed (step SG111). If the reference point has not been specified, the process returns to step SG102. Further, when the designation of the reference point is completed, the above-described steps SB to SE are executed in order.

図39は、計測結果出力時に2値化画像と通常の画像を交互に表示する場合の処理手順を示している。まず、前述したステップSA〜SEの処理が順に実行される。続いて、2値化画像または通常の画像の表示に係る処理が実行される(ステップSG101〜SG110)。ステップSG101〜SG110の処理は上記と同様であるので説明を省略する。ステップSG112では、制御部18aはリモートコントローラ4あるいはパーソナルコンピュータ31の操作を監視し、処理の終了が指示されたか否かを判定する(ステップSG112)。処理の終了が指示されていない場合には、処理がステップSG102に戻る。また、処理の終了が指示された場合には、処理が終了する。   FIG. 39 shows a processing procedure when a binarized image and a normal image are alternately displayed at the time of measurement result output. First, the processes of steps SA to SE described above are executed in order. Subsequently, processing relating to display of a binarized image or a normal image is executed (steps SG101 to SG110). Since the processing of steps SG101 to SG110 is the same as described above, the description thereof is omitted. In step SG112, the control unit 18a monitors the operation of the remote controller 4 or the personal computer 31, and determines whether the end of the process is instructed (step SG112). If the end of the process is not instructed, the process returns to step SG102. If the end of the process is instructed, the process ends.

図38および図39に示した処理では、2値化画像を表示する状態と、通常の画像を表示する状態とが所定時間間隔で自動的に切り替わる。この他に、制御部18aがリモートコントローラ4あるいはパーソナルコンピュータ31の操作を監視し、その操作状態に応じて表示状態を切り替えることにより、ユーザが希望する任意のタイミングで2値化画像と通常の画像を交互に表示するようにしてもよい。   In the processing shown in FIGS. 38 and 39, the state of displaying a binarized image and the state of displaying a normal image are automatically switched at predetermined time intervals. In addition to this, the control unit 18a monitors the operation of the remote controller 4 or the personal computer 31, and switches the display state according to the operation state, thereby allowing the binarized image and the normal image at any timing desired by the user. May be displayed alternately.

上述したように、本実施形態によれば、2つの基準点を指定すれば欠損サイズの計測が可能となるので、従来のように3点あるいは4点以上の基準点を指定する場合と比較して、操作の煩わしさを低減し操作性を向上することができる。また、階調の削減された2値化画像等が表示されるので、被写体の一部として誤認識されるノイズの有無をユーザが確認することが可能となり、計測が狙い通りに実行されているか否かをユーザが確認することができる。   As described above, according to the present embodiment, if two reference points are specified, the defect size can be measured. Compared to the conventional case where three or four or more reference points are specified. Thus, the troublesome operation can be reduced and the operability can be improved. In addition, since a binarized image or the like with reduced gradation is displayed, it is possible for the user to confirm the presence or absence of noise that is misrecognized as part of the subject, and whether the measurement is being performed as intended. The user can confirm whether or not.

図12に示した計測画面1220,1250の結果ウィンドウ1223,1253に表示される計測結果から計測精度を確認することも可能であるが、計測精度の確認には必要でない情報も表示されることや、計測精度の確認に必要な情報の表示スペースが限られることから、ユーザが計測精度を直感的に理解することができるとは限らない。これに対して、階調の削減された画像を表示することによって、その画像からユーザが計測精度をより直感的に理解することができる。   Although it is possible to check the measurement accuracy from the measurement results displayed in the result windows 1223 and 1253 of the measurement screens 1220 and 1250 shown in FIG. 12, information that is not necessary for checking the measurement accuracy is also displayed. Since the display space for information necessary for checking the measurement accuracy is limited, it is not always possible for the user to intuitively understand the measurement accuracy. In contrast, by displaying an image with reduced gradation, the user can more intuitively understand the measurement accuracy from the image.

また、前述したように、計測精度の確認用に表示される画像は2値化画像に限らず、4値化画像や8値化画像等でもよいが、リアルタイム性の観点からは、より軽い処理負荷で生成することができる2値化画像を表示することが望ましい。   Further, as described above, the image displayed for confirmation of measurement accuracy is not limited to the binarized image, but may be a quaternary image, an octanized image, or the like. It is desirable to display a binarized image that can be generated with a load.

また、2値化画像等と通常の画像との表示の切替を可能とすることによって、ユーザが計測用の画像と実際の被写体の画像とを見比べて、計測精度をより詳細に確認することが可能となり、計測作業を効率良く進めることができる。さらに、リモートコントローラ4あるいはパーソナルコンピュータ31に入力されたユーザの指定タイミングで上記の2種類の表示状態を切り替えることによって、ユーザが希望する任意のタイミングで計測精度を確認することができる。さらに、一旦表示状態を切り替えたタイミングから所定時間が経過したタイミングで表示状態を自動的に再度切り替えることによって、ユーザの操作負担を軽減することができる。   In addition, by enabling display switching between a binarized image and a normal image, the user can check the measurement accuracy in more detail by comparing the measurement image with the actual subject image. This enables measurement work to be performed efficiently. Furthermore, by switching between the two types of display states at the timing designated by the user input to the remote controller 4 or the personal computer 31, the measurement accuracy can be confirmed at any timing desired by the user. Furthermore, the user's operation burden can be reduced by automatically switching the display state again at a timing when a predetermined time has elapsed from the timing at which the display state is once switched.

また、電子内視鏡の先端に設置される撮像光学系の歪みを補正した歪補正曲線を基準曲線として算出することによって、欠損サイズの計測精度を向上することができる。   Further, by calculating a distortion correction curve obtained by correcting the distortion of the imaging optical system installed at the tip of the electronic endoscope as a reference curve, it is possible to improve the measurement accuracy of the defect size.

また、2つの基準点に対応した2本の基準曲線が形成する角度に応じて欠損の種類を判別することによって、欠損の種類に応じた自動計測を行うことが可能となるので、操作の煩わしさを低減し操作性を向上することができる。特に、欠損のサイズを示すパラメータとして、欠損の種類に応じたパラメータを自動的に選択して算出することによって、ユーザが欠損の種類を特に意識しなくても最適な自動計測を行うことが可能となるので、操作の煩わしさを低減し操作性を向上することができる。   Also, by determining the type of defect according to the angle formed by the two reference curves corresponding to the two reference points, it is possible to perform automatic measurement according to the type of defect, which is cumbersome to operate. Therefore, the operability can be improved. In particular, by automatically selecting and calculating a parameter according to the type of defect as a parameter indicating the size of the defect, it is possible to perform optimum automatic measurement even if the user is not particularly aware of the type of defect. Therefore, it is possible to reduce the troublesome operation and improve the operability.

また、従来の計測用内視鏡装置では、角の頂点を含む計測対象物の角に形成された角の欠損のエッジを、1つの仮想曲線とその曲線上の仮想点とで近似しており、角の欠損の頂点に相当する上記の仮想点の選択が手動で行われていたため、欠損サイズの計測精度を低下させるおそれがあるという問題があった。これに対して、本実施形態のように、2つの基準点に対応した2本の基準曲線の交点を欠損構成点の1つ(欠損頂点)として算出することによって、欠損サイズの計測精度を向上することができる。   Further, in the conventional measuring endoscope apparatus, the edge of the missing corner formed at the corner of the measurement object including the vertex of the corner is approximated by one virtual curve and the virtual point on the curve. However, since the selection of the virtual point corresponding to the apex of the corner defect is performed manually, there is a problem that the measurement accuracy of the defect size may be lowered. On the other hand, as in this embodiment, by calculating the intersection of two reference curves corresponding to two reference points as one of the missing component points (missing vertex), the measurement accuracy of the missing size is improved. can do.

また、欠損のサイズを示すパラメータとして、少なくとも2種類のパラメータを算出することによって、欠損のサイズを詳細に知ることができる。   Further, by calculating at least two kinds of parameters as parameters indicating the size of the defect, the size of the defect can be known in detail.

また、1つの基準点について計測対象物のエッジ上の少なくとも2つの特徴点を算出し、それらの特徴点に基づいて基準曲線を算出することによって、基準曲線の算出精度を向上し、ひいては欠損サイズの計測精度を向上することができる。   In addition, by calculating at least two feature points on the edge of the measurement object for one reference point, and calculating a reference curve based on those feature points, the calculation accuracy of the reference curve is improved, and consequently the defect size The measurement accuracy can be improved.

以上、図面を参照して本発明の実施形態について詳述してきたが、具体的な構成は上記の実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。   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 apparatus for measurement by one Embodiment of this invention. 本発明の一実施形態による計測用内視鏡装置が備える計測処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the measurement process part with which the endoscope apparatus for measurement by one Embodiment of this invention is provided. 本発明の一実施形態における基準点、基準曲線、基準点エリアを示す参考図である。It is a reference figure showing a reference point, a reference curve, and a reference point area in one embodiment of the present invention. 本発明の一実施形態における辺の欠損の欠損始点・終点、欠損構成点を示す参考図である。It is a reference diagram showing a missing start point / end point and a missing component point of a missing edge in an embodiment of the present invention. 本発明の一実施形態における角の欠損の欠損始点・終点・頂点、欠損構成点を示す参考図である。FIG. 6 is a reference diagram illustrating a missing start point / end point / vertex of a corner defect and a missing component point according to an embodiment of the present invention. 本発明の一実施形態における辺の欠損の幅、深さ、面積を示す参考図である。It is a reference figure which shows the width | variety of the defect | deletion of the edge | side in one Embodiment of this invention, a depth, and an area. 本発明の一実施形態における角の欠損の幅、辺の長さ、面積を示す参考図である。It is a reference figure which shows the width | variety of the edge | corner defect | deletion in one Embodiment of this invention, the length of a side, and an area. 本発明の一実施形態における計測点および計測点エリアを示す参考図である。It is a reference figure showing a measurement point and a measurement point area in one embodiment of the present invention. 本発明の一実施形態における特徴点を示す参考図である。It is a reference figure showing the feature point in one embodiment of the present invention. 本発明の一実施形態における特徴点を示す参考図である。It is a reference figure showing the feature point in one embodiment of the present invention. 本発明の一実施形態における欠損計測の手順を示すフローチャートである。It is a flowchart which shows the procedure of the defect | deletion measurement in one Embodiment of this invention. 本発明の一実施形態における欠損計測時に表示される計測画面を示す参考図である。It is a reference figure which shows the measurement screen displayed at the time of the defect | deletion measurement in one Embodiment of this invention. 本発明の一実施形態における欠損計算の手順を示すフローチャートである。It is a flowchart which shows the procedure of the defect | deletion calculation in one Embodiment of this invention. 本発明の一実施形態における基準曲線算出処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reference | standard curve calculation process in one Embodiment of this invention. 本発明の一実施形態における特徴点算出処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the feature point calculation process in one Embodiment of this invention. 本発明の一実施形態における特徴点算出処理の手順を示す参考図である。It is a reference figure which shows the procedure of the feature point calculation process in one Embodiment of this invention. 本発明の一実施形態における特徴点算出処理の手順を示す参考図である。It is a reference figure which shows the procedure of the feature point calculation process in one Embodiment of this invention. 本発明の一実施形態における歪補正曲線の算出方法を示す参考図である。It is a reference diagram showing a calculation method of a distortion correction curve in one embodiment of the present invention. 本発明の一実施形態における欠損種類判別処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the defect | deletion kind discrimination | determination process in one Embodiment of this invention. 本発明の一実施形態における欠損頂点算出処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the missing vertex calculation process in one Embodiment of this invention. 本発明の一実施形態における第1の計測点算出処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the 1st measurement point calculation process in one Embodiment of this invention. 本発明の一実施形態における第1の計測点算出処理の手順を示す参考図である。It is a reference figure which shows the procedure of the 1st measurement point calculation process in one Embodiment of this invention. 本発明の一実施形態における欠損始点算出処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the defect | deletion start point calculation process in one Embodiment of this invention. 本発明の一実施形態における欠損始点算出処理の手順を示す参考図である。It is a reference figure which shows the procedure of the defect | deletion start point calculation process in one Embodiment of this invention. 本発明の一実施形態における第2の計測点算出処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the 2nd measurement point calculation process in one Embodiment of this invention. 本発明の一実施形態における第2の計測点算出処理の手順を示す参考図である。It is a reference figure which shows the procedure of the 2nd measurement point calculation process in one Embodiment of this invention. 本発明の一実施形態における欠損終点算出処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the defect | deletion end point calculation process in one Embodiment of this invention. 本発明の一実施形態における欠損終点算出処理の手順を示す参考図である。It is a reference figure which shows the procedure of the defect | deletion end point calculation process in one Embodiment of this invention. 本発明の一実施形態におけるエッジ近似直線算出処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the edge approximation straight line calculation process in one Embodiment of this invention. 本発明の一実施形態におけるマッチング点の算出方法を示す参考図である。It is a reference figure which shows the calculation method of the matching point in one Embodiment of this invention. 本発明の一実施形態における欠損サイズ算出処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the defect | deletion size calculation process in one Embodiment of this invention. 本発明の一実施形態において、計測精度を説明するための参考図である。In one Embodiment of this invention, it is a reference figure for demonstrating measurement precision. 本発明の一実施形態において、計測精度を説明するための参考図である。In one Embodiment of this invention, it is a reference figure for demonstrating measurement precision. 本発明の一実施形態における計測画面(2値化画像の表示時)を示す参考図である。It is a reference figure which shows the measurement screen (at the time of the display of a binarized image) in one Embodiment of this invention. 本発明の一実施形態における計測画面(2値化画像の表示時)を示す参考図である。It is a reference figure which shows the measurement screen (at the time of the display of a binarized image) in one Embodiment of this invention. 本発明の一実施形態における欠損計測の手順を示すフローチャートである。It is a flowchart which shows the procedure of the defect | deletion measurement in one Embodiment of this invention. 本発明の一実施形態における欠損計測の手順を示すフローチャートである。It is a flowchart which shows the procedure of the defect | deletion measurement in one Embodiment of this invention. 本発明の一実施形態における欠損計測の手順を示すフローチャートである。It is a flowchart which shows the procedure of the defect | deletion measurement in one Embodiment of this invention. 本発明の一実施形態における欠損計測の手順を示すフローチャートである。It is a flowchart which shows the procedure of the defect | deletion measurement in one Embodiment of this invention. 本発明の一実施形態における2値化画像の表示の手順を示すフローチャートである。It is a flowchart which shows the procedure of the display of the binarized image in one Embodiment of this invention.

符号の説明Explanation of symbols

1・・・計測用内視鏡装置、18・・・計測処理部、18a・・・制御部、18b・・・基準点指定部、18c・・・基準曲線算出部、18d・・・欠損構成点算出部、18e・・・欠損種類判別部、18f・・・欠損サイズ算出部、18g・・・記憶部、18h・・・階調削減部、18i・・・時間計測部   DESCRIPTION OF SYMBOLS 1 ... Measurement endoscope apparatus, 18 ... Measurement processing part, 18a ... Control part, 18b ... Reference point designation | designated part, 18c ... Reference curve calculation part, 18d ... Defect structure Point calculation unit, 18e ... defect type determination unit, 18f ... defect size calculation unit, 18g ... storage unit, 18h ... tone reduction unit, 18i ... time measurement unit

Claims (12)

計測対象物を撮像し撮像信号を生成する電子内視鏡と、前記撮像信号に基づいて映像信号を生成する画像処理手段と、前記映像信号に基づいて前記計測対象物の計測処理を行う計測処理手段と、前記映像信号に基づいた画像を表示する表示手段とを備えた計測用内視鏡装置において、
前記計測処理手段は、
前記計測対象物上の2つの基準点を指定する基準点指定手段と、
前記2つの基準点のうち、一方の基準点に基づき前記計測対象物の輪郭を近似する第1の輪郭近似線を算出すると共に、他方の基準点に基づき前記計測対象物の輪郭を近似する第2の輪郭近似線を算出する輪郭近似算出手段と、
前記2つの基準点、前記第1の輪郭近似線、および第2の輪郭近似線に基づいて、前記計測対象物に形成された欠損の輪郭を構成する欠損構成点を算出する欠損構成点算出手段と、
前記第1の輪郭近似線と第2の輪郭近似線とのなす角度に応じて前記欠損の種類を判別する欠損種類判別手段と、
前記欠損構成点に基づいて前記欠損のサイズを計測する欠損計測手段と、
前記映像信号に基づいた画像の階調を削減する階調削減手段と、
を備え、
前記表示手段はさらに、前記階調削減手段によって階調の削減された画像を表示する
ことを特徴とする計測用内視鏡装置。
An electronic endoscope that images a measurement object and generates an imaging signal, an image processing unit that generates a video signal based on the imaging signal, and a measurement process that performs measurement processing of the measurement object based on the video signal In a measurement endoscope apparatus comprising: means; and display means for displaying an image based on the video signal,
The measurement processing means includes
Reference point designating means for designating two reference points on the measurement object;
A first contour approximation line that approximates the contour of the measurement object is calculated based on one of the two reference points, and the contour of the measurement object is approximated based on the other reference point. Contour approximation calculating means for calculating two contour approximation lines;
Based on the two reference points, the first outline approximation line, and the second outline approximation line , a missing constituent point calculation means for calculating a missing constituent point that constitutes the outline of the defect formed on the measurement object. When,
A defect type discriminating means for discriminating the type of the defect according to an angle formed by the first contour approximate line and the second contour approximate line ;
A defect measuring means for measuring the size of the defect based on the defect constituent point;
Gradation reduction means for reducing the gradation of the image based on the video signal;
With
The measurement endoscope apparatus further characterized in that the display means further displays an image whose gradation is reduced by the gradation reduction means.
前記欠損構成点算出手段は、前記第1の輪郭近似線と前記第2の輪郭近似線との交点を前記欠損構成点の1つとして算出することを特徴とする請求項1に記載の計測用内視鏡装置。 2. The measurement according to claim 1 , wherein the missing component point calculating unit calculates an intersection of the first contour approximate line and the second contour approximate line as one of the missing constituent points. Endoscopic device. 前記欠損計測手段は、前記欠損のサイズを示すパラメータとして、前記欠損の種類に応じたパラメータを算出することを特徴とする請求項1または請求項2に記載の計測用内視鏡装置。   The measurement endoscope apparatus according to claim 1, wherein the defect measurement unit calculates a parameter corresponding to a type of the defect as a parameter indicating the size of the defect. 前記欠損計測手段は、前記欠損のサイズを示すパラメータとして、少なくとも2種類のパラメータを算出することを特徴とする請求項1または2に記載の計測用内視鏡装置。   The measurement endoscope apparatus according to claim 1, wherein the defect measurement unit calculates at least two types of parameters as parameters indicating the size of the defect. 前記輪郭近似線算出手段は、前記一方の基準点の周辺にある前記計測対象物の輪郭線上の少なくとも2つの特徴点を算出し、当該少なくとも2つの特徴点に基づいて前記第1の輪郭近似線を算出すると共に、前記他方の基準点の周辺にある前記計測対象物の輪郭線上の少なくとも2つの特徴点を算出し、当該少なくとも2つの特徴点に基づいて前記第2の輪郭近似線を算出することを特徴とする請求項1〜請求項4のいずれかに記載の計測用内視鏡装置。 The contour approximate line calculating means calculates at least two feature points on the contour line of the measurement object around the one reference point, and the first contour approximate line based on the at least two feature points. And at least two feature points on the contour line of the measurement object around the other reference point, and the second contour approximation line is calculated based on the at least two feature points. The measuring endoscope apparatus according to any one of claims 1 to 4, wherein the measuring endoscope apparatus is characterized in that: 前記階調削減手段は、前記映像信号に基づいた画像を、信号レベルを2値化した2値化画像に変換することを特徴とする請求項1〜請求項5のいずれかに記載の計測用内視鏡装置。   The measurement device according to claim 1, wherein the gradation reduction unit converts an image based on the video signal into a binary image obtained by binarizing a signal level. Endoscopic device. 前記階調削減手段によって階調の削減された画像を少なくとも表示する第1の状態と、前記階調削減手段によって階調の削減された画像を表示せずに、前記階調削減手段によって階調の削減される前の画像を表示する第2の状態との間で表示状態を切り替える切替手段をさらに備え
前記表示手段は、前記第1の状態と前記第2の状態との間で表示状態を切り替え可能であって、前記切替手段によって切り替えられた表示状態で画像を表示する
ことを特徴とする請求項1〜請求項6のいずれかに記載の計測用内視鏡装置。
A first state in which at least an image whose gradation has been reduced by the gradation reduction means is displayed, and a gradation by the gradation reduction means without displaying an image whose gradation has been reduced by the gradation reduction means. Switching means for switching the display state between the second state for displaying the image before being reduced ,
The display unit can switch a display state between the first state and the second state, and displays an image in the display state switched by the switching unit. The measurement endoscope apparatus according to any one of claims 1 to 6.
前記表示状態を切り替えるタイミングをユーザが入力する入力手段をさらに備え、
前記切替手段は、前記入力手段に入力された前記タイミングで前記表示状態を切り替えることを特徴とする請求項7に記載の計測用内視鏡装置。
It further comprises an input means for the user to input the timing for switching the display state,
The measurement endoscope apparatus according to claim 7, wherein the switching unit switches the display state at the timing input to the input unit.
予め設定された時間を計測する時間計測手段をさらに備え、
前記切替手段は、前記表示状態を切り替えた第1のタイミングから、前記時間計測手段によって計測された時間が経過した第2のタイミングで前記表示状態を再度切り替える ことを特徴とする請求項7に記載の計測用内視鏡装置。
It further comprises a time measuring means for measuring a preset time,
The said switching means switches the said display state again at the 2nd timing when the time measured by the said time measurement means passed from the 1st timing which switched the said display state. Endoscope device for measurement.
前記切替手段は、前記欠損のサイズが計測された後、前記表示状態を前記第1の表示状態に切り替えることを特徴とする請求項7に記載の計測用内視鏡装置。The measurement endoscope apparatus according to claim 7, wherein the switching unit switches the display state to the first display state after the size of the defect is measured. 前記表示手段は、画像を表示可能な第1および第2の画像表示領域を有しており、前記階調削減手段によって階調の削減された画像を前記第1および第2の画像表示領域の一方または両方に表示することを特徴とする請求項1〜請求項10のいずれかに記載の計測用内視鏡装置。   The display means includes first and second image display areas capable of displaying an image, and images whose gradations are reduced by the gradation reduction means are displayed in the first and second image display areas. The endoscope apparatus for measurement according to any one of claims 1 to 10, wherein the display is performed on one or both. 計測対象物を撮像し撮像信号を生成する電子内視鏡と、前記撮像信号に基づいて映像信号を生成する画像処理手段と、前記映像信号に基づいて前記計測対象物の計測処理を行う計測処理手段と、前記映像信号に基づいた画像を表示する表示手段とを備えた計測用内視鏡装置の動作を制御するためのプログラムにおいて、
前記計測処理手段は、
前記計測対象物上の2つの基準点を指定する基準点指定手段と、
前記2つの基準点のうち、一方の基準点に基づき前記計測対象物の輪郭を近似する第1の輪郭近似線を算出すると共に、他方の基準点に基づき前記計測対象物の輪郭を近似する第2の輪郭近似線を算出する輪郭近似算出手段と、
前記2つの基準点、前記第1の輪郭近似線、および第2の輪郭近似線に基づいて、前記計測対象物に形成された欠損の輪郭を構成する欠損構成点を算出する欠損構成点算出手段と、
前記第1の輪郭近似線と第2の輪郭近似線とのなす角度に応じて前記欠損の種類を判別する欠損種類判別手段と、
前記欠損構成点に基づいて前記欠損のサイズを計測する欠損計測手段と、
前記映像信号に基づいた画像の階調を削減する階調削減手段と、
を備え、
前記表示手段はさらに、前記階調削減手段によって階調の削減された画像を表示する
ことを特徴とするプログラム。
An electronic endoscope that images a measurement object and generates an imaging signal, an image processing unit that generates a video signal based on the imaging signal, and a measurement process that performs measurement processing of the measurement object based on the video signal In a program for controlling the operation of the measuring endoscope apparatus including means and a display means for displaying an image based on the video signal,
The measurement processing means includes
Reference point designating means for designating two reference points on the measurement object;
A first contour approximation line that approximates the contour of the measurement object is calculated based on one of the two reference points, and the contour of the measurement object is approximated based on the other reference point. Contour approximation calculating means for calculating two contour approximation lines;
Based on the two reference points, the first outline approximation line, and the second outline approximation line , a missing constituent point calculation means for calculating a missing constituent point that constitutes the outline of the defect formed on the measurement object. When,
A defect type discriminating means for discriminating the type of the defect according to an angle formed by the first contour approximate line and the second contour approximate line ;
A defect measuring means for measuring the size of the defect based on the defect constituent point;
Gradation reduction means for reducing the gradation of the image based on the video signal;
With
The display means further displays an image whose gradation is reduced by the gradation reduction means.
JP2007141685A 2007-01-31 2007-05-29 Endoscope device for measurement and program Expired - Fee Related JP5127302B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2007141685A JP5127302B2 (en) 2007-05-29 2007-05-29 Endoscope device for measurement and program
US12/011,741 US8200042B2 (en) 2007-01-31 2008-01-29 Endoscope apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007141685A JP5127302B2 (en) 2007-05-29 2007-05-29 Endoscope device for measurement and program

Publications (2)

Publication Number Publication Date
JP2008295512A JP2008295512A (en) 2008-12-11
JP5127302B2 true JP5127302B2 (en) 2013-01-23

Family

ID=40169626

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007141685A Expired - Fee Related JP5127302B2 (en) 2007-01-31 2007-05-29 Endoscope device for measurement and program

Country Status (1)

Country Link
JP (1) JP5127302B2 (en)

Families Citing this family (2)

* 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
JP6150532B2 (en) 2013-01-22 2017-06-21 オリンパス株式会社 Measuring device and program

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3191932B2 (en) * 1990-05-25 2001-07-23 オリンパス光学工業株式会社 Measurement endoscope device
JP3336703B2 (en) * 1993-10-20 2002-10-21 富士写真光機株式会社 Ultrasound endoscope hard copy device
JPH09281055A (en) * 1996-04-09 1997-10-31 Hitachi Metals Ltd Inspection method for chip
JP3771988B2 (en) * 1997-03-12 2006-05-10 オリンパス株式会社 Measuring endoscope device
JPH11132743A (en) * 1997-10-31 1999-05-21 Meidensha Corp Defect inspecting device by image signal processing
JP2002336188A (en) * 2001-05-21 2002-11-26 Olympus Optical Co Ltd Endoscope system for measurement
JP4790223B2 (en) * 2004-01-20 2011-10-12 オリンパス株式会社 Endoscope device for measurement
JP5079973B2 (en) * 2004-06-09 2012-11-21 オリンパス株式会社 Endoscope device for measurement and program for endoscope device for measurement
JP2008185895A (en) * 2007-01-31 2008-08-14 Olympus Corp Endoscope device for measurement

Also Published As

Publication number Publication date
JP2008295512A (en) 2008-12-11

Similar Documents

Publication Publication Date Title
JP5574555B2 (en) Endoscope device
US8200042B2 (en) Endoscope apparatus and program
JP4070493B2 (en) X-ray diagnostic apparatus and medical image analysis apparatus
US8004560B2 (en) Endoscope apparatus
JP4891636B2 (en) Image analysis device
US20150249790A1 (en) Image processing apparatus, image display apparatus and imaging apparatus having the same, image processing method, and computer-readable medium storing image processing program
JP5073564B2 (en) Endoscope device for measurement and program
US8913110B2 (en) Endoscope apparatus and measurement method
JP4873794B2 (en) Image processing measuring apparatus and measuring endoscope apparatus
US20110187824A1 (en) Endoscope apparatus and measurement method
EP2284797A1 (en) Image processing apparatus and image processing method
JP4790223B2 (en) Endoscope device for measurement
JP5127302B2 (en) Endoscope device for measurement and program
JP4077716B2 (en) Endoscope insertion direction detection device
JP5073384B2 (en) Endoscope device for measurement
JP6095429B2 (en) Measuring device and program
JP2008185895A (en) Endoscope device for measurement
JP4674093B2 (en) Endoscope apparatus and program
JP5361246B2 (en) Endoscope apparatus and program
JP5186314B2 (en) Endoscope apparatus and program
JP5385048B2 (en) Image processing apparatus and program
JP2011059742A (en) Image processing apparatus and program
JP5519202B2 (en) Image processing apparatus and program
JP5745128B2 (en) Image processing device
JP2012154672A (en) Image processing method, program, and image processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100325

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120327

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120710

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120829

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20120830

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121030

R151 Written notification of patent or utility model registration

Ref document number: 5127302

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

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

LAPS Cancellation because of no payment of annual fees