JP6081209B2 - Endoscope apparatus and program - Google Patents

Endoscope apparatus and program Download PDF

Info

Publication number
JP6081209B2
JP6081209B2 JP2013018658A JP2013018658A JP6081209B2 JP 6081209 B2 JP6081209 B2 JP 6081209B2 JP 2013018658 A JP2013018658 A JP 2013018658A JP 2013018658 A JP2013018658 A JP 2013018658A JP 6081209 B2 JP6081209 B2 JP 6081209B2
Authority
JP
Japan
Prior art keywords
corresponding point
matching
image
matching methods
candidates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2013018658A
Other languages
Japanese (ja)
Other versions
JP2014147572A (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 JP2013018658A priority Critical patent/JP6081209B2/en
Publication of JP2014147572A publication Critical patent/JP2014147572A/en
Application granted granted Critical
Publication of JP6081209B2 publication Critical patent/JP6081209B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、計測機能を有する内視鏡装置に関する。また、本発明は、計測機能をコンピュータで実現するためのプログラムに関する。   The present invention relates to an endoscope apparatus having a measurement function. The present invention also relates to a program for realizing a measurement function with a computer.

近年、ボイラ、タービン、エンジン、化学プラント等の内部の傷や腐食等の観察および検査に工業用内視鏡が広く用いられている。最近の工業用内視鏡は、異なる視点から被写体を撮像するステレオ光学アダプタを内視鏡の先端に取り付けることが可能となっており、三角測量の原理で被写体の様々な空間特性を計測(ステレオ計測)することが可能である(例えば特許文献1参照)。ステレオ計測では、例えば左右一対の被写体像が取得され、一方の被写体像上で指定された点に対応する他方の被写体像上の点を画像処理により検出するマッチング処理が行われる。さらに、対応する左右の点の座標に基づいて、三角測量の原理により被写体の長さ、深さ、面積等が計算される。   In recent years, industrial endoscopes have been widely used for observation and inspection of internal scratches and corrosion of boilers, turbines, engines, chemical plants and the like. In recent industrial endoscopes, it is possible to attach a stereo optical adapter that captures the subject from different viewpoints to the tip of the endoscope, and measure various spatial characteristics of the subject based on the principle of triangulation (stereo) Measurement) (see, for example, Patent Document 1). In stereo measurement, for example, a pair of left and right subject images are acquired, and matching processing is performed in which a point on the other subject image corresponding to a point designated on one subject image is detected by image processing. Furthermore, based on the coordinates of the corresponding left and right points, the length, depth, area, etc. of the subject are calculated by the principle of triangulation.

上記のマッチング処理の結果はステレオ計測の精度に影響を与える。特に、対応する左右の点の位置が大きく異なるマッチングの誤対応が起きる場合には、計測結果は全く異なる結果となってしまうため、点の指定のやり直しや画像の取り直しが必要となってしまう。マッチングの誤対応を少なくするための技術として、例えば、複数のテンプレートを使用して最も信頼度の高い結果を使用する方法(特許文献2参照)や、低解像度画像で信頼度を評価して対応点算出のための高解像度画像のウインドウサイズを決める方法(特許文献3参照)などが知られている。また、マッチングの誤対応が起きていないか否かの確認をユーザに促す方法として、被写体像においてマッチングに関係する領域を強調して表示する方法なども知られている(特許文献4参照)。   The result of the above matching process affects the accuracy of stereo measurement. In particular, in the case of erroneous matching of matching in which the positions of the corresponding left and right points are greatly different, the measurement results are completely different, and it is necessary to re-designate the points and re-read the image. For example, a technique for using a plurality of templates to use the most reliable result (see Patent Document 2) or a technique for evaluating reliability with a low resolution image as a technique for reducing erroneous matching. A method of determining the window size of a high-resolution image for point calculation (see Patent Document 3) is known. In addition, as a method for prompting the user to confirm whether or not a matching mismatch has occurred, a method of highlighting and displaying a region related to matching in a subject image is also known (see Patent Document 4).

特開2004−33487号公報JP 2004-33487 A 特開2001−109879号公報JP 2001-109879 A 特開2009−92551号公報JP 2009-92551 A 特開2011−170276号公報JP 2011-170276 A

工業用内視鏡を用いた検査では、観察現場で記録した画像に対して、観察現場以外でステレオ計測による検査を行うことがある。しかし、観察現場で記録した検査用の画像でマッチングの誤対応が起きる場合、観察現場で検査用の画像を再度取得し直す必要があって不便だった。   In an inspection using an industrial endoscope, an image recorded at an observation site may be inspected by stereo measurement outside the observation site. However, in the case where a matching error occurs in the inspection image recorded at the observation site, it is inconvenient because it is necessary to re-acquire the inspection image at the observation site.

どのようなマッチング手法を用いても、全ての画像に対し、マッチングの誤対応が起こらないわけではなく、また、それぞれの手法に得意な画像、不得意な画像というものが存在する。しかしながら、工業用内視鏡の被検体は多種多様であるため、多様な被検体に適したマッチング手法を提供することは困難であった。   What kind of matching method is used, not all of the images are mismatched, and there are images that are good at each method and images that are not good at each method. However, since there are a wide variety of subjects for industrial endoscopes, it has been difficult to provide matching methods suitable for various subjects.

特許文献2や特許文献3に記載の技術では、マッチングの誤対応を減らすことができるかもしれないが、工業用内視鏡のような多種多様な画像に対し最も良いマッチングアルゴリズムを選定するのは、困難である。また、特許文献4に記載の技術では、マッチングの誤対応が起きていることがわかっても、画像の取り直しを行う手間や、対応点をユーザが自ら手動で修正するなどの手間がかかってしまう。   Although the techniques described in Patent Document 2 and Patent Document 3 may be able to reduce mismatching of matching, the best matching algorithm is selected for a wide variety of images such as industrial endoscopes. ,Have difficulty. Further, with the technique described in Patent Document 4, even if it is found that an incorrect matching is occurring, it takes time to re-read the image or to manually correct the corresponding points by the user. .

本発明は、上述した課題に鑑みてなされたものであって、マッチングの誤対応を減らし、ユーザの手間を軽減することができる内視鏡装置およびプログラムを提供することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an endoscope apparatus and a program that can reduce erroneous correspondence of matching and reduce user trouble.

本発明は、上記の課題を解決するためになされたもので、同一の被写体に対応する第1の被写体像および第2の被写体像を撮像して画像データを生成する撮像部と、前記画像データに基づく画像を表示する表示部と、前記第1の被写体像上で設定された計測点に対応する前記第2の被写体像上の点である対応点の候補を、複数のマッチング手法を用いて算出する対応点候補算出部と、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補に基づいてマッチングの信頼度を算出する信頼度算出部と、前記信頼度が所定値未満である場合に、前記計測点と、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補とを前記画像に表示する処理を行う表示処理部と、前記信頼度が所定値以上である場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補に基づいて前記対応点を決定し、前記信頼度が所定値未満である場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補のうち指定された前記対応点の候補を対応点に決定する対応点決定部と、前記計測点と、決定された前記対応点とに基づいて前記被写体の大きさを計測する計測処理部と、を有することを特徴とする内視鏡装置である。   The present invention has been made in order to solve the above-described problems. An imaging unit that captures a first subject image and a second subject image corresponding to the same subject and generates image data; and the image data A display unit that displays an image based on the image and a corresponding point candidate that is a point on the second subject image corresponding to a measurement point set on the first subject image using a plurality of matching methods A corresponding point candidate calculating unit to calculate, a reliability calculating unit for calculating a matching reliability based on the corresponding point candidates corresponding to each of the plurality of matching methods, and the reliability is less than a predetermined value In addition, when the measurement point and the corresponding point candidate corresponding to each of the plurality of matching methods are displayed on the image, and the reliability is a predetermined value or more, Multiple matches The corresponding point is determined based on the corresponding point candidate corresponding to each of the matching methods, and the corresponding point candidate corresponding to each of the plurality of matching methods is determined when the reliability is less than a predetermined value. A corresponding point determination unit that determines the specified corresponding point candidate as a corresponding point, and a measurement processing unit that measures the size of the subject based on the measured point and the determined corresponding point. It is an endoscope apparatus characterized by having.

また、本発明の内視鏡装置において、前記信頼度算出部は、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補同士の前記第2の被写体像上の距離に基づいて前記信頼度を算出することを特徴とする。   Further, in the endoscope apparatus according to the present invention, the reliability calculation unit is configured to determine the reliability based on a distance on the second subject image between the corresponding point candidates corresponding to each of the plurality of matching methods. Is calculated.

また、本発明の内視鏡装置において、前記信頼度算出部は、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補の位置と、前記複数のマッチング手法のそれぞれに対応する優先度係数とに基づいて前記信頼度を算出することを特徴とする。   Further, in the endoscope apparatus according to the present invention, the reliability calculation unit includes a position of the corresponding point candidate corresponding to each of the plurality of matching methods and a priority coefficient corresponding to each of the plurality of matching methods. The reliability is calculated based on the above.

また、本発明の内視鏡装置において、前記対応点決定部は、前記信頼度が所定値以上である場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補の位置と、前記複数のマッチング手法のそれぞれに対応する優先度係数とに基づいて前記対応点を決定することを特徴とする。   In the endoscope apparatus of the present invention, the corresponding point determination unit, when the reliability is equal to or higher than a predetermined value, the position of the corresponding point candidate corresponding to each of the plurality of matching methods, The corresponding point is determined based on a priority coefficient corresponding to each of a plurality of matching methods.

また、本発明の内視鏡装置において、前記信頼度算出部は、過去に前記複数のマッチング手法のそれぞれに対応する前記対応点の候補を算出した結果に基づいて、前記複数のマッチング手法のそれぞれに対応する優先度係数を算出することを特徴とする。   Further, in the endoscope apparatus according to the present invention, the reliability calculation unit may determine each of the plurality of matching methods based on a result of calculating the corresponding point candidates corresponding to each of the plurality of matching methods in the past. The priority coefficient corresponding to is calculated.

また、本発明の内視鏡装置において、前記優先度係数は、前記対応点の候補を算出したときの条件毎に設けられていることを特徴とする。   In the endoscope apparatus according to the present invention, the priority coefficient is provided for each condition when the corresponding point candidates are calculated.

また、本発明の内視鏡装置において、前記表示処理部は、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補のうち、重複する前記対応点の候補を同一の表示形態で前記画像に表示する処理を行うことを特徴とする。   Moreover, in the endoscope apparatus according to the present invention, the display processing unit displays, in the same display form, overlapping corresponding candidate candidates among the corresponding point candidates corresponding to each of the plurality of matching methods. It is characterized by performing a process of displaying on the screen.

また、本発明の内視鏡装置において、前記表示処理部は、重複する前記対応点の候補の数を、当該対応点の候補の近傍に表示する処理を行うことを特徴とする。   In the endoscope apparatus of the present invention, the display processing unit performs a process of displaying the number of overlapping corresponding point candidates in the vicinity of the corresponding point candidate.

また、本発明の内視鏡装置において、前記表示処理部は、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補を、前記複数のマッチング手法のそれぞれに対応する優先度係数に応じた表示形態で前記画像に表示する処理を行うことを特徴とする。   In the endoscope apparatus of the present invention, the display processing unit determines the corresponding point candidates corresponding to each of the plurality of matching methods according to a priority coefficient corresponding to each of the plurality of matching methods. A process of displaying the image in a display form is performed.

また、本発明の内視鏡装置において、前記対応点候補算出部はさらに、前記複数のマッチング手法とは異なるマッチング手法を用いて前記対応点の候補を算出し、前記表示処理部は、前記信頼度が所定値未満であり、かつ、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補の表示が指示された場合に、前記計測点と、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補と、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補とを前記画像に表示する処理を行い、前記対応点決定部は、前記信頼度が所定値未満であり、かつ、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補の表示が指示された場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補と、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補とのうち指定された前記対応点の候補を対応点に決定することを特徴とする。   In the endoscope apparatus according to the present invention, the corresponding point candidate calculation unit further calculates the corresponding point candidate using a matching method different from the plurality of matching methods, and the display processing unit When the display of the corresponding point candidates calculated using a matching method different from the plurality of matching methods is instructed, the measurement point and the plurality of matching methods The corresponding point candidate corresponding to each of the image and the corresponding point candidate calculated using a matching method different from the plurality of matching methods are displayed on the image, and the corresponding point determining unit When the display of the corresponding point candidates calculated using a matching method different from the plurality of matching methods is instructed when the reliability is less than a predetermined value, The candidate for the designated corresponding point among the candidate for the corresponding point corresponding to each of the plurality of matching methods and the candidate for the corresponding point calculated using a matching method different from the plurality of matching methods. It is characterized by determining the corresponding point.

また、本発明の内視鏡装置において、前記表示処理部は、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補を前記画像に表示する際、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補のうち、前記複数のマッチング手法を用いて算出された前記対応点の候補と重複する、または前記複数のマッチング手法とは異なるマッチング手法を用いて算出された他の前記対応点の候補と重複する前記対応点の候補のみを表示することを特徴とする。   In the endoscope apparatus of the present invention, the display processing unit may display the plurality of matching points when displaying the corresponding point candidates calculated using a matching method different from the plurality of matching methods. Among the corresponding point candidates calculated using a matching method different from the method, matching that overlaps with the corresponding point candidates calculated using the plurality of matching methods or is different from the plurality of matching methods Only the corresponding point candidates that overlap with the other corresponding point candidates calculated using a technique are displayed.

また、本発明の内視鏡装置において、前記表示処理部は、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補を前記画像に表示する際、既に表示された前記対応点の候補のうちのいずれかを非表示とすることにより、表示される前記対応点の候補の数を一定に保つことを特徴とする。   In the endoscope apparatus of the present invention, the display processing unit is already displayed when displaying the corresponding point candidates calculated using a matching method different from the plurality of matching methods on the image. By not displaying any of the corresponding point candidates, the number of displayed corresponding point candidates is kept constant.

また、本発明は、同一の被写体に対応する第1の被写体像および第2の被写体像を撮像して生成された画像データに基づく画像の前記第1の被写体像上で設定された計測点に対応する前記第2の被写体像上の点である対応点の候補を、複数のマッチング手法を用いて算出するステップと、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補に基づいてマッチングの信頼度を算出するステップと、前記信頼度が所定値未満である場合に、前記計測点と、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補とを前記画像に表示する処理を行うステップと、前記信頼度が所定値以上である場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補に基づいて前記対応点を決定し、前記信頼度が所定値未満である場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補のうち指定された前記対応点の候補を対応点に決定するステップと、前記計測点と、決定された前記対応点とに基づいて前記被写体の大きさを計測するステップと、をコンピュータに実行させるためのプログラムである。   Further, the present invention provides measurement points set on the first subject image of an image based on image data generated by capturing the first subject image and the second subject image corresponding to the same subject. A step of calculating a corresponding point candidate that is a corresponding point on the second subject image using a plurality of matching methods, and matching based on the corresponding point candidates corresponding to each of the plurality of matching methods And calculating the reliability of the measurement point and, when the reliability is less than a predetermined value, displaying the measurement point and the corresponding point candidate corresponding to each of the plurality of matching methods on the image. And when the reliability is equal to or higher than a predetermined value, the corresponding point is determined based on the corresponding point candidate corresponding to each of the plurality of matching methods, and the reliability is a predetermined value If it is full, a step of determining a corresponding point candidate designated among the corresponding point candidates corresponding to each of the plurality of matching methods as a corresponding point, the measurement point, and the determined correspondence A program for causing a computer to execute the step of measuring the size of the subject based on a point.

本発明によれば、複数のマッチング手法を用いることによって、マッチングの誤対応が起きないマッチング結果が得られやすくなり、画像の取り直しを行う必要が減る。また、マッチングの信頼度が所定値以上である場合には、自動で対応点が決定されるため、ユーザの手間が増えない。また、マッチングの信頼度が所定値未満である場合には、複数のマッチング手法のそれぞれに対応する対応点の候補のうち指定された対応点の候補が対応点に決定されるため、手動による対応点の修正に比べて、ユーザの手間が減る。したがって、マッチングの誤対応を減らし、ユーザの手間を軽減することができる。   According to the present invention, by using a plurality of matching methods, it becomes easier to obtain a matching result that does not cause mismatching of matching, and the need to re-image is reduced. Further, when the matching reliability is equal to or higher than a predetermined value, the corresponding point is automatically determined, so that the user's labor is not increased. If the matching reliability is less than the predetermined value, the corresponding corresponding point candidate among the corresponding corresponding point candidates corresponding to each of the plurality of matching methods is determined as the corresponding point. Compared to point correction, user effort is reduced. Accordingly, it is possible to reduce erroneous matching and reduce the user's trouble.

本発明の一実施形態による内視鏡装置の全体構成を示す斜視図である。1 is a perspective view showing an overall configuration of an endoscope apparatus according to an embodiment of the present invention. 本発明の一実施形態による内視鏡装置の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the endoscope apparatus by one Embodiment of this invention. 本発明の一実施形態による内視鏡装置が有するCPUの機能構成を示すブロック図である。It is a block diagram which shows the function structure of CPU which the endoscope apparatus by one Embodiment of this invention has. 本発明の一実施形態による内視鏡装置の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the endoscope apparatus by one Embodiment of this invention. 本発明の一実施形態による内視鏡装置の動作の手順を示すフローチャートである。It is a flowchart which shows the procedure of operation | movement of the endoscope apparatus by one Embodiment of this invention. 本発明の一実施形態による内視鏡装置が取得した画像を示す参考図である。It is a reference figure showing an image which an endoscope apparatus by one embodiment of the present invention acquired. 本発明の一実施形態による内視鏡装置が取得した画像を示す参考図である。It is a reference figure showing an image which an endoscope apparatus by one embodiment of the present invention acquired. 本発明の一実施形態による内視鏡装置が取得した画像を示す参考図である。It is a reference figure showing an image which an endoscope apparatus by one embodiment of the present invention acquired. 本発明の一実施形態による内視鏡装置が取得した画像を示す参考図である。It is a reference figure showing an image which an endoscope apparatus by one embodiment of the present invention acquired. 本発明の一実施形態による内視鏡装置が取得した画像を示す参考図である。It is a reference figure showing an image which an endoscope apparatus by one embodiment of the present invention acquired. 本発明の一実施形態による内視鏡装置が取得した画像を示す参考図である。It is a reference figure showing an image which an endoscope apparatus by one embodiment of the present invention acquired. 本発明の一実施形態による内視鏡装置が取得した画像を示す参考図である。It is a reference figure showing an image which an endoscope apparatus by one embodiment of the present invention acquired. ステレオ計測による計測点の3次元座標の求め方を説明するための参考図である。It is a reference figure for demonstrating how to obtain | require the three-dimensional coordinate of the measurement point by stereo measurement.

以下、図面を参照し、本発明の実施形態を説明する。図1は、本発明の一実施形態による内視鏡装置の全体構成を示している。図1に示すように、内視鏡装置1は、内視鏡2と、この内視鏡2に接続された装置本体3とを備えている。内視鏡2は、細長な挿入部20と、装置全体の各種動作制御を実行する際に必要な操作を行うための操作部6とを備えている。装置本体3は、内視鏡2で撮像された被写体の画像や操作制御内容(例えば処理メニュー)等を表示するモニタ4と、内部に制御ユニット10(図2参照)を有する筐体5とを備えている。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows an overall configuration of an endoscope apparatus according to an embodiment of the present invention. As shown in FIG. 1, the endoscope apparatus 1 includes an endoscope 2 and an apparatus main body 3 connected to the endoscope 2. The endoscope 2 includes an elongated insertion unit 20 and an operation unit 6 for performing operations necessary for performing various operation controls of the entire apparatus. The apparatus main body 3 includes a monitor 4 that displays an image of a subject imaged by the endoscope 2, operation control content (for example, a processing menu), and the like, and a housing 5 that has a control unit 10 (see FIG. 2) inside. I have.

挿入部20は、硬質な先端部21と、例えば上下左右に湾曲可能な湾曲部22と、柔軟性を有する可撓管部23とを先端側から順に連設して構成されている。先端部21には、観察視野を2つ有するステレオ光学アダプタや観察視野が1つの通常観察光学アダプタ等、各種光学アダプタが着脱自在になっている。   The insertion portion 20 is configured by connecting a hard distal end portion 21, a bending portion 22 that can be bent vertically and horizontally, and a flexible tube portion 23 having flexibility in order from the distal end side. Various optical adapters such as a stereo optical adapter having two observation fields and a normal observation optical adapter having one observation field are detachably attached to the distal end portion 21.

図2に示すように筐体5内には、内視鏡ユニット8、CCU9(カメラコントロールユニット)、および制御ユニット10が設けられている。挿入部20の基端部は内視鏡ユニット8に接続されている。内視鏡ユニット8は、観察時に必要な照明光を供給する光源装置(不図示)と、挿入部20を構成する湾曲部22を湾曲させる湾曲装置(不図示)とを備えて構成されている。CCU9は、撮像素子28を駆動する駆動装置(不図示)を備えて構成されている。   As shown in FIG. 2, an endoscope unit 8, a CCU 9 (camera control unit), and a control unit 10 are provided in the housing 5. A proximal end portion of the insertion portion 20 is connected to the endoscope unit 8. The endoscope unit 8 includes a light source device (not shown) that supplies illumination light necessary for observation, and a bending device (not shown) that bends the bending portion 22 that constitutes the insertion portion 20. . The CCU 9 includes a drive device (not shown) that drives the image sensor 28.

先端部21には撮像素子28が内蔵されている。撮像素子28は、光学アダプタを介して結像された被写体像を光電変換し、撮像信号を生成する。この撮像信号は、CCU9内で例えばNTSC信号等の映像信号(画像データ)に変換されて、制御ユニット10へ供給される。   An image sensor 28 is built in the distal end portion 21. The image sensor 28 photoelectrically converts the subject image formed through the optical adapter to generate an image signal. The imaging signal is converted into a video signal (image data) such as an NTSC signal in the CCU 9 and supplied to the control unit 10.

制御ユニット10内には、映像信号が入力される映像信号処理回路12、ROM13、RAM14、カードI/F15(カードインターフェイス)、USB I/F16(USBインターフェイス)、RS−232C I/F17(RS−232Cインターフェイス)、およびCPU18が設けられている。   In the control unit 10, a video signal processing circuit 12, to which a video signal is input, a ROM 13, a RAM 14, a card I / F 15 (card interface), a USB I / F 16 (USB interface), an RS-232C I / F 17 (RS-) 232C interface) and CPU 18 are provided.

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

USB I/F16は、制御ユニット10とパーソナルコンピュータ31とを電気的に接続するためのインターフェイスである。このUSB I/F16を介して制御ユニット10とパーソナルコンピュータ31とを接続することによって、パーソナルコンピュータ31側で内視鏡画像の表示指示や、計測時における画像処理等の各種の指示に基づく制御を行うことが可能になると共に、制御ユニット10とパーソナルコンピュータ31との間での各種の処理に必要な制御情報やデータ等の入出力を行うことが可能になる。   The USB I / F 16 is an interface for electrically connecting the control unit 10 and the personal computer 31. By connecting the control unit 10 and the personal computer 31 via the USB I / F 16, control based on various instructions such as an endoscope image display instruction and image processing at the time of measurement is performed on the personal computer 31 side. In addition, it is possible to input and output control information and data necessary for various processes between the control unit 10 and the personal computer 31.

また、カードI/F15には、メモリカード32を自由に着脱することができるようになっている。メモリカード32をカードI/F15に装着することにより、CPU18による制御に従って、このメモリカード32に記憶されている制御処理情報や画像情報等のデータの制御ユニット10への取り込み、あるいは制御処理情報や画像情報等のデータのメモリカード32への記録を行うことが可能になる。   Further, the memory card 32 can be freely attached to and detached from the card I / F 15. By attaching the memory card 32 to the card I / F 15, in accordance with control by the CPU 18, control processing information and image information stored in the memory card 32 are taken into the control unit 10, or control processing information or It is possible to record data such as image information in the memory card 32.

映像信号処理回路12は、CCU9から供給された映像信号に基づく内視鏡画像と、グラフィックによる操作メニューとを合成した合成画像を表示するため、CPU18により生成される、操作メニューに基づくグラフィック画像信号とCCU9からの映像信号を合成する処理や、モニタ4の画面上に表示するのに必要な処理等を行い、表示信号をモニタ4に供給する。また、この映像信号処理回路12は、単に内視鏡画像、あるいは操作メニュー等の画像を単独で表示するための処理を行うことも可能である。したがって、モニタ4の画面上には、内視鏡画像、操作メニュー画像、内視鏡画像と操作メニュー画像との合成画像等が表示される。   The video signal processing circuit 12 displays a composite image obtained by synthesizing an endoscopic image based on the video signal supplied from the CCU 9 and a graphic operation menu, so that the graphic image signal based on the operation menu generated by the CPU 18 is displayed. And processing for synthesizing the video signals from the CCU 9 and processing necessary for display on the screen of the monitor 4, and the display signal is supplied to the monitor 4. Further, the video signal processing circuit 12 can simply perform processing for displaying an endoscopic image or an image such as an operation menu alone. Therefore, an endoscope image, an operation menu image, a composite image of the endoscope image and the operation menu image, and the like are displayed on the screen of the monitor 4.

CPU18は、ROM13に格納されているプログラムを実行することによって、目的に応じた処理を行うように各種回路部等を制御して、内視鏡装置1全体の動作制御を行う。RAM14は、CPU18によって、データの一時格納用の作業領域として使用される。   The CPU 18 executes the program stored in the ROM 13 to control various circuit units and the like so as to perform processing according to the purpose, thereby controlling the operation of the entire endoscope apparatus 1. The RAM 14 is used by the CPU 18 as a work area for temporarily storing data.

CPU18が実行するプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムを内視鏡装置1以外のコンピュータに読み込ませ、実行させてもよい。例えば、パーソナルコンピュータ31がプログラムを読み込んで実行し、プログラムに従って、内視鏡装置1を制御するための制御情報を内視鏡装置1に送信して内視鏡装置1を制御し、内視鏡装置1から映像信号を取得して、取得した映像信号を用いて計測を行ってもよい。   The program executed by the CPU 18 may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by a computer other than the endoscope apparatus 1 and executed. For example, the personal computer 31 reads and executes a program, and according to the program, transmits control information for controlling the endoscope apparatus 1 to the endoscope apparatus 1 to control the endoscope apparatus 1, and the endoscope A video signal may be acquired from the apparatus 1 and measurement may be performed using the acquired video signal.

ここで、「コンピュータ」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM、DVD−ROM、フラッシュメモリ等の可搬媒体、コンピュータに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。   Here, the “computer” includes a homepage providing environment (or display environment) if the WWW system is used. The “computer-readable recording medium” refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, a DVD-ROM, and a flash memory, and a storage device such as a hard disk built in the computer. Say. Further, the “computer-readable recording medium” refers to a volatile memory (RAM) in a computer system that becomes a server or a client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. In addition, those holding programs for a certain period of time are also included.

また、上述したプログラムは、このプログラムを記憶装置等に格納したコンピュータから、伝送媒体を介して、あるいは伝送媒体中の伝送波により他のコンピュータに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように、情報を伝送する機能を有する媒体のことをいう。また、上述したプログラムは、前述した機能の一部を実現するためのものであってもよい。さらに、前述した機能を、コンピュータに既に記録されているプログラムとの組合せで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。   The program described above may be transmitted from a computer storing the program in a storage device or the like to another computer via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting a program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. Further, the above-described program may be for realizing a part of the above-described function. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer, what is called a difference file (difference program) may be sufficient.

本実施形態では、左右の2つの観察視野を有するステレオ光学アダプタが先端部21に装着された状態で画像が取得される。被写体からの光がステレオ光学アダプタに入射し、ステレオ光学アダプタによって、同一の被写体に対応する左右の2つの被写体像(第1の被写体像および第2の被写体像)が形成される。2つの被写体像は撮像素子28に入射し、撮像素子28によって撮像される。取得された画像は、2つの被写体像を含む画像となる。本実施形態では、取得された画像のうち、2つの被写体像に対応する領域の画像を左画像、右画像と定義する。   In the present embodiment, an image is acquired in a state in which a stereo optical adapter having two observation fields on the left and right is attached to the distal end portion 21. Light from the subject enters the stereo optical adapter, and the left and right subject images (a first subject image and a second subject image) corresponding to the same subject are formed by the stereo optical adapter. Two subject images enter the image sensor 28 and are captured by the image sensor 28. The acquired image is an image including two subject images. In the present embodiment, among the acquired images, the images of the areas corresponding to the two subject images are defined as the left image and the right image.

図3は、CPU18のうち、本実施形態の説明の中心となる部分の機能構成を示している。制御部180、計測点設定部181、対応点候補算出部182、信頼度算出部183、表示処理部184、対応点決定部185、および計測処理部186によってCPU18の機能が構成されている。   FIG. 3 shows a functional configuration of a portion of the CPU 18 that is the center of the description of the present embodiment. The control unit 180, the measurement point setting unit 181, the corresponding point candidate calculation unit 182, the reliability calculation unit 183, the display processing unit 184, the corresponding point determination unit 185, and the measurement processing unit 186 constitute the function of the CPU 18.

制御部180は各部が行う処理を制御する。計測点設定部181は、ユーザが操作部6を操作して、画像データに基づく左画像上で指定した計測位置に計測点を設定する。対応点候補算出部182は、複数のマッチング手法を用いて、画像データに基づく右画像において、左画像上で設定された計測点に対応する対応点の候補(以下、対応点候補と記載)を算出する。信頼度算出部183は、複数のマッチング手法のそれぞれに対応する対応点候補に基づいてマッチングの信頼度を算出する。   The control unit 180 controls processing performed by each unit. The measurement point setting unit 181 operates the operation unit 6 by the user and sets a measurement point at a measurement position designated on the left image based on the image data. Corresponding point candidate calculation unit 182 uses a plurality of matching techniques to generate corresponding point candidates (hereinafter referred to as corresponding point candidates) corresponding to the measurement points set on the left image in the right image based on the image data. calculate. The reliability calculation unit 183 calculates matching reliability based on corresponding point candidates corresponding to each of the plurality of matching methods.

表示処理部184は、対応点候補の位置をユーザに確認させるため、画像データに基づく画像に対して、計測点と、複数のマッチング手法のそれぞれに対応する対応点候補とのグラフィック(マーク)を重畳するための処理を行う。対応点決定部185は、算出された対応点候補に基づいて、計測処理に用いる対応点を決定する。計測処理部186は、計測点と、決定された対応点との画像上の2次元座標に基づいて空間上の3次元座標を算出し、複数の計測点に対応する3次元座標に基づいて、被写体の大きさを計測する。   In order to allow the user to confirm the position of the corresponding point candidate, the display processing unit 184 displays a graphic (mark) of the measurement point and the corresponding point candidate corresponding to each of the plurality of matching methods for the image based on the image data. Processing for superimposing is performed. The corresponding point determination unit 185 determines a corresponding point used for the measurement process based on the calculated corresponding point candidate. The measurement processing unit 186 calculates three-dimensional coordinates on the space based on the two-dimensional coordinates on the image of the measurement points and the determined corresponding points, and based on the three-dimensional coordinates corresponding to the plurality of measurement points, Measure the size of the subject.

次に、本実施形態におけるステレオ計測の原理を説明する。ステレオ光学アダプタを使用し、被写体像を左右の光学系で捉えたときの左右の光学測距点の座標に基づいて、三角測量の原理を使用して被写体の3次元空間座標を求めることで、各種計測(ステレオ計測)が可能となる。以下、図13を参照しながら、ステレオ計測による計測点の3次元座標の求め方を説明する。左側および右側の光学系で撮像された画像に対して、三角測量の方法により、左側と右側の光学中心63,64を結ぶ線分の中点を原点Oとして右方向を正にx軸、下方向を正にy軸、光軸と平行に光学系から遠ざかる方向を正にz軸を定義した時の計測点60の3次元座標(X,Y,Z)が以下の(1)式〜(3)式で計算される。ただし、歪み補正が施された左右の画像面上での計測点61,対応点62の2次元座標を、左右それぞれの光学系の光軸と画像面との交点O、Oを原点として(X,Y)、(X,Y)とし、左側と右側の光学中心63,64の距離をDとし、焦点距離をFとし、t=D/(X−X)とする。
X=t×X+D/2 ・・・(1)
Y=−t×Y ・・・(2)
Z=t×F ・・・(3)
Next, the principle of stereo measurement in this embodiment will be described. By using a stereo optical adapter and determining the three-dimensional spatial coordinates of the subject using the principle of triangulation based on the coordinates of the left and right optical ranging points when the subject image is captured by the left and right optical systems, Various measurements (stereo measurement) are possible. Hereinafter, a method of obtaining the three-dimensional coordinates of the measurement point by stereo measurement will be described with reference to FIG. With respect to the images captured by the left and right optical systems, the right direction is set to the x axis and the lower side by the triangulation method with the midpoint of the line segment connecting the left and right optical centers 63 and 64 as the origin O. The three-dimensional coordinates (X, Y, Z) of the measurement point 60 when the direction is defined as the y-axis and the direction away from the optical system parallel to the optical axis as the z-axis are defined as the following equations (1) to ( 3) Calculated by the equation. However, the measurement points 61 on the image plane of the right and left distortion correction has been performed, the two-dimensional coordinates of the corresponding point 62, the intersection O L of the right and left optical axis and the image plane of the respective optical systems, the O R as the origin (X L , Y L ), (X R , Y R ), D is the distance between the left and right optical centers 63, 64, F is the focal length, and t = D / (X R −X L ). To do.
X = t × X R + D / 2 (1)
Y = −t × Y R (2)
Z = t × F (3)

上記のように元画像上の画像面上での計測点61、対応点62の座標が決定されると、パラメータDおよびFを用いて計測点60の3次元座標が求まる。いくつかの点の3次元座標を求めることによって、2点間の距離、2点を結ぶ線と1点の距離、面積、深さ、表面形状等の様々な計測が可能である。また、左側の光学中心63または右側の光学中心64から被写体までの距離(物体距離)を求めることも可能となる。物体距離は、先端部21から被写体までの距離であって、例えば撮像素子28または観察光学系から被写体までの距離である。上記のステレオ計測を行うためには、先端部21とステレオ光学アダプタを含む光学系の特性を示す光学データが必要である。なお、マッチング処理および光学データの詳細は、例えば特開2004−49638号公報に記載されているので、その説明を省略する。   When the coordinates of the measurement point 61 and the corresponding point 62 on the image plane on the original image are determined as described above, the three-dimensional coordinates of the measurement point 60 are obtained using the parameters D and F. By obtaining three-dimensional coordinates of several points, various measurements such as the distance between two points, the distance between two points and the distance between one point, area, depth, and surface shape can be performed. It is also possible to obtain the distance (object distance) from the left optical center 63 or the right optical center 64 to the subject. The object distance is a distance from the distal end portion 21 to the subject, for example, a distance from the image sensor 28 or the observation optical system to the subject. In order to perform the above stereo measurement, optical data indicating the characteristics of the optical system including the tip 21 and the stereo optical adapter is required. The details of the matching process and the optical data are described in, for example, Japanese Patent Application Laid-Open No. 2004-49638, and thus the description thereof is omitted.

次に、本実施形態における計測処理の詳細を説明する。図4は、計測時の内視鏡装置1の動作の手順を示している。内視鏡2で取得された画像(静止画像)がモニタ4に表示された後、ユーザが操作部6を介して、画像データに基づく左画像上の計測位置を指定すると、計測点設定部181は、指定された計測位置の2次元座標を算出し、その位置に計測点を設定する(ステップS1)。続いて、マッチング処理(ステップS2)が行われ、画像データに基づく右画像上の対応点が決定される。マッチング処理の詳細については後述する。   Next, details of the measurement process in the present embodiment will be described. FIG. 4 shows an operation procedure of the endoscope apparatus 1 at the time of measurement. After the image (still image) acquired by the endoscope 2 is displayed on the monitor 4, when the user designates the measurement position on the left image based on the image data via the operation unit 6, the measurement point setting unit 181. Calculates the two-dimensional coordinates of the designated measurement position, and sets a measurement point at that position (step S1). Subsequently, matching processing (step S2) is performed, and corresponding points on the right image based on the image data are determined. Details of the matching process will be described later.

マッチング処理が終了した後、計測処理部186は、計測点と対応点の画像上の2次元座標に基づいて空間上の3次元座標を算出する(ステップS3)。続いて、制御部180は、計測点の設定が終了したか否かを判定する(ステップS4)。ユーザによる計測位置の指定が継続する場合には、ステップS1で次の計測点が設定される。また、ユーザによる計測位置の指定が終了した場合には、計測処理部186は、ステップS3で算出した3次元座標に基づいて、2点間距離等を算出する3次元計測を行う(ステップS5)。続いて、表示処理部184は、画像データに基づく画像に対して、計測処理部186が算出した計測結果がグラフィック(文字)で重畳された画像をモニタ4に表示させる処理を行う(ステップS6)。これによって、モニタ4に計測結果が表示される。計測結果が表示されると、計測処理が終了する。   After the matching process is completed, the measurement processing unit 186 calculates a three-dimensional coordinate in the space based on the two-dimensional coordinates on the image of the measurement point and the corresponding point (step S3). Subsequently, the control unit 180 determines whether or not the measurement point setting is completed (step S4). If the user continues to specify the measurement position, the next measurement point is set in step S1. When the measurement position designation by the user is completed, the measurement processing unit 186 performs three-dimensional measurement for calculating the distance between two points based on the three-dimensional coordinates calculated in step S3 (step S5). . Subsequently, the display processing unit 184 performs processing for displaying, on the monitor 4, an image in which the measurement result calculated by the measurement processing unit 186 is superimposed with graphics (characters) on the image based on the image data (step S <b> 6). . As a result, the measurement result is displayed on the monitor 4. When the measurement result is displayed, the measurement process ends.

図5は、マッチング処理(ステップS2)の手順を示している。まず、マッチング処理の概要を説明する。マッチング処理では複数のマッチング手法により複数の対応点候補が算出される。複数の対応点候補の信頼性が高い場合には、ユーザの指示に無関係な所定の基準に従って自動で対応点が決定される。また、複数の対応点候補の信頼性が低い場合には、複数の対応点候補の中から対応点に適した対応点候補をユーザが選択し、選択された対応点候補が対応点に決定される。   FIG. 5 shows the procedure of the matching process (step S2). First, an outline of the matching process will be described. In the matching process, a plurality of corresponding point candidates are calculated by a plurality of matching methods. When the plurality of corresponding point candidates have high reliability, corresponding points are automatically determined according to a predetermined criterion unrelated to the user's instruction. In addition, when the reliability of the plurality of corresponding point candidates is low, the user selects a corresponding point candidate suitable for the corresponding point from the plurality of corresponding point candidates, and the selected corresponding point candidate is determined as the corresponding point. The

以下、マッチング処理の詳細を説明する。制御部180は、対応点の算出に用いるマッチング手法に対応する変数iの値を0に設定する(ステップS200)。続いて、対応点候補算出部182は、変数iの値に対応するマッチング手法を用いて、左画像上で設定された計測点に対応する右画像上の対応点候補の2次元座標を算出する(ステップS205)。   Details of the matching process will be described below. The control unit 180 sets the value of the variable i corresponding to the matching method used for calculating the corresponding points to 0 (step S200). Subsequently, the corresponding point candidate calculation unit 182 calculates the two-dimensional coordinates of the corresponding point candidate on the right image corresponding to the measurement point set on the left image, using a matching method corresponding to the value of the variable i. (Step S205).

本実施形態では、一例として、3種類のマッチング手法を用いる。例えば、テンプレートマッチングを行うマッチング手法A、濃淡のエッジ部分などの特徴点でマッチングを行うマッチング手法B、画像をフーリエ変換した位相成分の相関を計算する位相限定相関法(POC:Phase Only Correlation)を用いたマッチング手法Cを用いる。上記のマッチング手法の他に、テンプレートマッチングで使用する相関関数が異なる手法(例えば、NCC(Normalized Cross-Correlation)、SSD(Sum of Squared Difference)、SAD(Sum of Absolute Difference)など)を用いてもよい。その他、テンプレートのサイズや形状が異なる手法を用いてもよい。さらに、テンプレートマッチングを行う画像の解像度が異なる手法や、画像処理(二値化、ノイズ除去、各種フィルタリング)が異なる手法を用いてもよいし、画像の輝度情報だけでなく色情報を使用する手法を用いてもよい。対応点候補の算出に用いるマッチング手法は予め設定されているが、ユーザがマッチング手法を変更できるようにしてもよい。   In this embodiment, three types of matching methods are used as an example. For example, a matching method A that performs template matching, a matching method B that performs matching using feature points such as shading edge portions, and a phase-only correlation method (POC: Phase Only Correlation) that calculates the correlation of phase components obtained by Fourier transforming an image. The matching method C used is used. In addition to the above-described matching methods, methods using different correlation functions used in template matching (for example, NCC (Normalized Cross-Correlation), SSD (Sum of Squared Difference), SAD (Sum of Absolute Difference), etc.) may be used. Good. In addition, methods with different template sizes and shapes may be used. Furthermore, a method with different image resolution for template matching, a method with different image processing (binarization, noise removal, various filtering), or a method using color information as well as image luminance information may be used. May be used. Although the matching method used for calculating the corresponding point candidate is set in advance, the user may be able to change the matching method.

本実施形態では、それぞれのマッチング手法に対応する優先度係数が設けられている。例えば、マッチング手法Aの優先度係数は1.0、マッチング手法Bの優先度係数は0.8、マッチング手法Cの優先度係数は0.6である。優先度係数は、マッチングの信頼度を算出する処理や、複数の対応点候補の中から対応点を決定する処理に対して各対応点候補が与える影響の大きさ(優先度)を示している。優先度係数が大きいほど優先度が高い。各マッチング手法の優先度係数は予め設定されているが、ユーザがその値を変更できるようにしてもよい。   In the present embodiment, priority coefficients corresponding to the respective matching methods are provided. For example, the priority coefficient of the matching technique A is 1.0, the priority coefficient of the matching technique B is 0.8, and the priority coefficient of the matching technique C is 0.6. The priority coefficient indicates the magnitude (priority) of the influence of each corresponding point candidate on the process of calculating the matching reliability and the process of determining the corresponding point from a plurality of corresponding point candidates. . The higher the priority coefficient, the higher the priority. Although the priority coefficient of each matching method is set in advance, the value may be changed by the user.

対応点候補が算出された後、制御部180は、変数iの値が所定値と等しいか否かを判定することにより、全てのマッチング手法を用いて対応点候補を算出したか否かを判定する(ステップS210)。3種類のマッチング手法を用いる場合、所定値は2である。対応点候補の算出を行っていないマッチング手法がある場合、制御部180は変数iの値を1だけ増加させる(ステップS215)。続いて、ステップS205で対応点候補の算出が再度行われる。   After the corresponding point candidate is calculated, the control unit 180 determines whether the corresponding point candidate is calculated using all the matching methods by determining whether the value of the variable i is equal to the predetermined value. (Step S210). When three types of matching methods are used, the predetermined value is 2. If there is a matching method that does not calculate the corresponding point candidate, the control unit 180 increases the value of the variable i by 1 (step S215). Subsequently, the corresponding point candidate is calculated again in step S205.

全てのマッチング手法を用いて対応点候補を算出した場合、信頼度算出部183は、複数のマッチング手法のそれぞれに対応する対応点候補の2次元座標に基づいてマッチングの信頼度を算出する(ステップS215)。この信頼度は、それぞれのマッチング手法毎のマッチングの信頼性を示すのではなく、複数のマッチング手法を用いて行ったマッチング全体の信頼性を示している。   When the corresponding point candidates are calculated using all the matching methods, the reliability calculating unit 183 calculates the matching reliability based on the two-dimensional coordinates of the corresponding point candidates corresponding to each of the plurality of matching methods (step S215). This reliability does not indicate the reliability of matching for each matching method, but indicates the reliability of the entire matching performed using a plurality of matching methods.

ステップS215では、以下のようにしてマッチングの信頼度が算出される。例えば、マッチングの信頼度は、それぞれの対応点候補間の画像上の距離に基づいて算出される。それぞれの対応点候補間の画像上の距離が近いほど、マッチングの信頼度は高くなりやすい。より具体的には、マッチングの信頼度は、算出された対応点候補のうち、視差量が中央値である対応点候補を中心とする所定距離R(例えば3ピクセル)内に入っている対応点候補の優先度係数の和として算出される。計測点の2次元座標を(X,Y)、対応点候補の2次元座標を(X,Y)とすると、視差量はX−Xである。所定距離Rの値は予め設定されているが、ユーザがその値を変更できるようにしてもよい。 In step S215, the matching reliability is calculated as follows. For example, the matching reliability is calculated based on the distance on the image between each corresponding point candidate. The closer the distance between corresponding point candidates on the image, the higher the reliability of matching. More specifically, the matching reliability is a corresponding point that falls within a predetermined distance R (for example, 3 pixels) centered on a corresponding point candidate whose parallax amount is a median value among the calculated corresponding point candidates. Calculated as the sum of the candidate priority coefficients. The two-dimensional coordinates of the measurement point (X L, Y L), (X R, Y R) of the two-dimensional coordinates of the corresponding point candidate When parallax amount is X R -X L. Although the value of the predetermined distance R is set in advance, the user may be able to change the value.

マッチングの信頼度を優先度係数の和として算出することで、マッチングの信頼度に閾値を設けて判定を行う場合に、対応点候補の優先度に応じた判定を行うことができ、より正確に判定を行うことができる。例えば、マッチング手法A,B,Cを用いて算出した対応点候補の優先度係数の和は2.4であり、マッチング手法A,Bを用いて算出した対応点候補の優先度係数の和は1.8であり、マッチング手法A,Cを用いて算出した対応点候補の優先度係数の和は1.6であり、マッチング手法B,Cを用いて算出した対応点候補の優先度係数の和は1.4である。閾値が1.5である場合には、マッチング手法A,B,Cを用いた場合、マッチング手法A,Bを用いた場合、およびマッチング手法A,Cを用いた場合の優先度係数の和は閾値を超えるが、優先度係数が低いマッチング手法B,Cを用いた場合の優先度係数の和は閾値を超えないこととなる。   By calculating the matching reliability as the sum of the priority coefficients, it is possible to make a determination according to the priority of the corresponding point candidate when making a determination by setting a threshold for the matching reliability, and more accurately Judgment can be made. For example, the sum of priority coefficients of corresponding point candidates calculated using the matching methods A, B, and C is 2.4, and the sum of priority coefficients of corresponding point candidates calculated using the matching methods A and B is 1.8. Yes, the sum of priority coefficients of corresponding point candidates calculated using the matching methods A and C is 1.6, and the sum of priority coefficients of corresponding point candidates calculated using the matching methods B and C is 1.4. When the threshold value is 1.5, the sum of the priority coefficients when the matching methods A, B, and C are used, when the matching methods A and B are used, and when the matching methods A and C are used is the threshold value. However, the sum of the priority coefficients when the matching methods B and C having a low priority coefficient are used does not exceed the threshold value.

算出された対応点候補のうち、優先度係数が最も高い対応点候補を中心とする所定距離R内に入っている対応点候補の優先度係数の和をマッチングの信頼度としてもよい。上記のように、距離が近い対応点候補のみを使用してマッチングの信頼度を算出することによって、距離が遠い対応点候補、すなわち真の対応点ではない可能性が高い対応点候補の影響を排除することができる。   Of the calculated corresponding point candidates, the sum of the priority coefficients of corresponding point candidates within a predetermined distance R centered on the corresponding point candidate having the highest priority coefficient may be used as the matching reliability. As described above, by calculating the reliability of matching using only corresponding point candidates that are close to each other, it is possible to reduce the influence of corresponding point candidates that are likely to be not true corresponding points. Can be eliminated.

マッチングの信頼度の算出に優先度係数を使用しなくてもよい。例えば、視差量が中央値である対応点候補を中心とする所定距離R内に入っている対応点候補の数nと、対応点候補の算出に使用したマッチング手法の数Nとの比n/Nをマッチングの信頼度としてもよい。   The priority coefficient may not be used for calculating the matching reliability. For example, the ratio n / the number n of corresponding point candidates that fall within a predetermined distance R centered on the corresponding point candidate having the median parallax amount and the number N of matching methods used for calculating the corresponding point candidate N may be used as the matching reliability.

マッチングの信頼度が所定値以上であった場合、対応点決定部185は、複数の対応点候補に基づいて所定の基準で対応点を決定する(ステップS225)。ステップS225では、以下のようにして対応点が決定される。例えば、ステップS215でマッチングの信頼度を算出した際に求めた、視差量が中央値である対応点候補を中心とする所定距離R内に入っている全ての対応点候補の2次元座標が一致する場合には、その2次元座標の点が対応点に決定される。   When the matching reliability is equal to or higher than the predetermined value, the corresponding point determination unit 185 determines a corresponding point based on a predetermined criterion based on the plurality of corresponding point candidates (step S225). In step S225, the corresponding points are determined as follows. For example, the two-dimensional coordinates of all corresponding point candidates within the predetermined distance R centered on the corresponding point candidate whose parallax amount is the median obtained when the matching reliability is calculated in step S215 match. When doing so, the point of the two-dimensional coordinate is determined as the corresponding point.

また、視差量が中央値である対応点候補を中心とする所定距離R内に入っている全ての対応点候補の2次元座標が完全には一致しない場合には、それらの対応点候補の2次元座標を平均化した2次元座標の点が対応点に決定される。対応点候補の2次元座標を平均化することで、対応点の位置が1ピクセル以下の精度で求まり、より計測精度の高い結果が得られる。   Further, when the two-dimensional coordinates of all corresponding point candidates within the predetermined distance R centering on the corresponding point candidate having the median parallax amount do not completely match, 2 of the corresponding point candidates A two-dimensional coordinate point obtained by averaging the dimensional coordinates is determined as a corresponding point. By averaging the two-dimensional coordinates of the corresponding point candidates, the position of the corresponding point can be obtained with an accuracy of 1 pixel or less, and a result with higher measurement accuracy can be obtained.

視差量が中央値である対応点候補を中心とする所定距離R内に入っている全ての対応点候補の2次元座標に対して、優先度係数による重み付けを行い、重み付け後の2次元座標を平均化した2次元座標の点を対応点としてもよい。あるいは、それぞれのマッチング手法を用いてマッチングを行った結果の信頼性を示す値(例えば、テンプレートマッチングであれば相関係数)を優先度係数の代わりに用いて上記の重み付けを行ってもよい。   The two-dimensional coordinates of all corresponding point candidates that fall within a predetermined distance R centering on the corresponding point candidate having the median parallax amount are weighted by a priority coefficient, and the weighted two-dimensional coordinates are obtained. The averaged two-dimensional coordinate point may be used as the corresponding point. Alternatively, the weighting may be performed using a value indicating the reliability of the result of matching using each matching method (for example, a correlation coefficient in the case of template matching) instead of the priority coefficient.

優先度係数が最も高いマッチング手法を用いて得られた対応点候補を対応点としてもよい。あるいは、それぞれのマッチング手法を用いてマッチングを行った結果の信頼性を示す値(例えば、テンプレートマッチングであれば相関係数)が最も高い対応点候補を対応点としてもよい。   Corresponding point candidates obtained using a matching method having the highest priority coefficient may be used as corresponding points. Or it is good also considering the corresponding point candidate with the highest value (for example, a correlation coefficient in the case of template matching) which shows the reliability of the result of having matched using each matching method as a corresponding point.

マッチングの信頼度が所定値未満であった場合、表示処理部184は、計測点と複数の対応点候補を表示するためのグラフィック画像信号を生成し、映像信号処理回路12に出力する。映像信号処理回路12は、このグラフィック画像信号とCCU9からの映像信号を合成した表示信号をモニタ4に出力する。モニタ4は、表示信号に基づく画像を表示することにより、計測点と複数の対応点候補が重畳された画像を表示する(ステップS235)。   When the matching reliability is less than the predetermined value, the display processing unit 184 generates a graphic image signal for displaying the measurement point and the plurality of corresponding point candidates and outputs the graphic image signal to the video signal processing circuit 12. The video signal processing circuit 12 outputs a display signal obtained by synthesizing the graphic image signal and the video signal from the CCU 9 to the monitor 4. The monitor 4 displays an image on which the measurement point and the plurality of corresponding point candidates are superimposed by displaying an image based on the display signal (step S235).

図6は、計測点と複数の対応点候補が重畳された画像の一例を示している。モニタ4の画面に表示された画像600において、左画像600Lには、ユーザが指定した計測点PLが表示され、右画像600Rには、マッチング手法Aに対応した対応点候補PR1、マッチング手法Bに対応した対応点候補PR2、マッチング手法Cに対応した対応点候補PR3が表示されている。それぞれの対応点候補は、その対応点候補の算出に用いたマッチング手法毎に異なる表示形態で表示される。図6に示す例では、それぞれの対応点候補は、マッチング手法毎に異なる形状で表示されている。それぞれの対応点候補を、その対応点候補の算出に用いたマッチング手法毎に異なる色で表示してもよい。   FIG. 6 shows an example of an image in which measurement points and a plurality of corresponding point candidates are superimposed. In the image 600 displayed on the screen of the monitor 4, the measurement point PL designated by the user is displayed in the left image 600L, and the corresponding point candidate PR1 corresponding to the matching method A and the matching method B are displayed in the right image 600R. Corresponding corresponding point candidate PR2 and corresponding point candidate PR3 corresponding to matching method C are displayed. Each corresponding point candidate is displayed in a different display form for each matching method used to calculate the corresponding point candidate. In the example shown in FIG. 6, each corresponding point candidate is displayed in a different shape for each matching method. Each corresponding point candidate may be displayed in a different color for each matching method used to calculate the corresponding point candidate.

また、それぞれの対応点候補を、その対応点候補の算出に用いたマッチング手法の優先度係数毎に異なる表示形態で表示してもよい。例えば、優先度係数が大きいほど対応点候補が大きく表示されるように、優先度係数に応じた大きさで対応点候補を表示してもよい。あるいは、優先度係数が大きい対応点候補だけを異なる色で表示する、優先度係数が大きい対応点候補だけを点滅させるなど強調して表示してもよい。   In addition, each corresponding point candidate may be displayed in a different display form for each priority coefficient of the matching method used for calculating the corresponding point candidate. For example, the corresponding point candidate may be displayed with a size corresponding to the priority coefficient so that the corresponding point candidate is displayed larger as the priority coefficient is larger. Alternatively, only corresponding point candidates having a large priority coefficient may be displayed in different colors, or only corresponding point candidates having a large priority coefficient may be displayed in a highlighted manner.

テンプレートマッチングを用いて対応点候補を算出した場合、相関係数に応じた表示形態でそれぞれの対応点候補を表示してもよい。あるいは、それぞれの対応点候補のエピポーララインからのズレ量に応じた表示形態でそれぞれの対応点候補を表示してもよい。   When the corresponding point candidates are calculated using template matching, the corresponding point candidates may be displayed in a display form corresponding to the correlation coefficient. Or you may display each corresponding point candidate with the display form according to the deviation | shift amount from the epipolar line of each corresponding point candidate.

マッチング手法の特性に応じた表示形態でそれぞれの対応点候補を表示してもよい。例えばテンプレートマッチングでは、光学系の光軸に平行な方向に段差がある被写体に対するマッチングの信頼性が相対的に低く、周期性の低い模様を有する被写体に対するマッチングの信頼性が相対的に高いという特性がある。また、濃淡のエッジ部分などの特徴点によるマッチングでは、光学系の光軸に平行な方向に段差がある被写体に対するマッチングの信頼性が相対的に高く、明確な特徴のある模様を有していない被写体に対するマッチングの信頼性が相対的に低いという特性がある。例えば、ユーザの指示に応じて、テンプレートマッチングを用いて算出された対応点候補のみを強調して表示し、あるいは特徴点によるマッチングを用いて算出された対応点候補のみを強調して表示してもよい。   You may display each corresponding point candidate with the display form according to the characteristic of the matching method. For example, in template matching, the matching reliability for a subject having a step in a direction parallel to the optical axis of the optical system is relatively low, and the matching reliability for a subject having a pattern with low periodicity is relatively high. There is. In addition, in matching with feature points such as light and shaded edge portions, the matching reliability for a subject having a step in a direction parallel to the optical axis of the optical system is relatively high, and there is no pattern with clear features. There is a characteristic that the reliability of matching with a subject is relatively low. For example, in response to a user instruction, only the corresponding point candidates calculated using template matching are highlighted and displayed, or only the corresponding point candidates calculated using feature point matching are highlighted and displayed. Also good.

複数の対応点候補が表示された後、ユーザは、操作部6を介して、正しいと思う対応点候補を選択する。いずれかの対応点候補が選択されると、対応点決定部185は、選択された対応点候補を対応点に決定する(ステップS240)。上記のように各種の表示形態で対応点候補を表示することによって、ユーザは多角的な指標で対応点の確からしさを確認することができ、より正確に対応点候補を選択することができる。   After a plurality of corresponding point candidates are displayed, the user selects a corresponding point candidate that is considered to be correct via the operation unit 6. When any corresponding point candidate is selected, the corresponding point determination unit 185 determines the selected corresponding point candidate as a corresponding point (step S240). By displaying the corresponding point candidates in various display forms as described above, the user can confirm the likelihood of the corresponding points using various indices, and can select the corresponding point candidates more accurately.

ステップS225,S240で対応点が決定された後、表示処理部184は、決定された対応点を表示するためのグラフィック画像信号を生成し、映像信号処理回路12に出力する。映像信号処理回路12は、このグラフィック画像信号とCCU9からの映像信号を合成した表示信号をモニタ4に出力する。モニタ4は、表示信号に基づく画像を表示することにより、計測点と対応点が重畳された画像を表示する(ステップS230)。   After the corresponding points are determined in steps S225 and S240, the display processing unit 184 generates a graphic image signal for displaying the determined corresponding points and outputs the graphic image signal to the video signal processing circuit 12. The video signal processing circuit 12 outputs a display signal obtained by synthesizing the graphic image signal and the video signal from the CCU 9 to the monitor 4. The monitor 4 displays an image on which the measurement point and the corresponding point are superimposed by displaying an image based on the display signal (step S230).

図7は、計測点と対応点が重畳された画像の一例を示している。モニタ4の画面に表示された画像600において、左画像600Lには、ユーザが指定した計測点PLが表示され、右画像600Rには、決定された対応点PRが表示される。対応点が表示されると、マッチング処理が終了する。   FIG. 7 shows an example of an image in which measurement points and corresponding points are superimposed. In the image 600 displayed on the screen of the monitor 4, the measurement point PL designated by the user is displayed in the left image 600L, and the determined corresponding point PR is displayed in the right image 600R. When the corresponding point is displayed, the matching process ends.

本実施形態では、複数のマッチング手法を用いることで、マッチングの誤対応が起きないマッチング結果が得られやすくなる。マッチング手法によってはマッチングの誤対応が発生しやすい画像が取得された場合でも、その画像に適したマッチング手法を用いてマッチングの誤対応が起きなければ、画像の取り直しを行わなくてよい。また、マッチングの信頼度が高い場合には、自動で対応点が決定されるため、ユーザの手間が増えない。また、マッチングの信頼度が低い場合には、複数のマッチング手法のそれぞれに対応する対応点候補のうちユーザが指定した対応点候補が対応点に決定されるため、手動による対応点の修正に比べて、ユーザの手間が減る。したがって、マッチングの誤対応を減らし、ユーザの手間を軽減することができる。   In the present embodiment, by using a plurality of matching methods, it becomes easy to obtain a matching result that does not cause a matching mismatch. Even if an image that is likely to cause a matching error depending on the matching method is acquired, if the matching error does not occur using a matching method that is suitable for the image, the image may not be read again. Also, when the matching reliability is high, the corresponding points are automatically determined, so that the labor of the user does not increase. In addition, when matching reliability is low, the corresponding point candidate specified by the user is determined as the corresponding point among the corresponding point candidates corresponding to each of the plurality of matching methods. This reduces the time and effort of the user. Accordingly, it is possible to reduce erroneous matching and reduce the user's trouble.

次に、本実施形態の変形例を説明する。   Next, a modification of this embodiment will be described.

(第1の変形例)
第1の変形例は、ステップS235で複数の対応点候補を表示する方法に関する。第1の変形例では、3種類のマッチング手法を用いて3つの対応点候補を算出し、ステップS235で3つの対応点候補を表示した後の処理を説明する。図8は、ステップS235で表示される画像の一例を示している。計測点PLと3つの対応点候補PR1,PR2,PR3が表示されている。いずれの対応点候補も、計測点PLの位置に正確に対応する位置にない。ユーザは、操作部6を介して指示を入力することにより、対応点候補を増やすことができる。
(First modification)
The first modification relates to a method for displaying a plurality of corresponding point candidates in step S235. In the first modified example, the processing after three corresponding point candidates are calculated using three types of matching methods and the three corresponding point candidates are displayed in step S235 will be described. FIG. 8 shows an example of the image displayed in step S235. A measurement point PL and three corresponding point candidates PR1, PR2, and PR3 are displayed. None of the corresponding point candidates is at a position that accurately corresponds to the position of the measurement point PL. The user can increase corresponding point candidates by inputting instructions via the operation unit 6.

新たな対応点候補を算出する指示が入力されると、対応点候補算出部182は、既に用いたマッチング手法とは異なるマッチング手法を用いて、新たな対応点候補を算出する。このとき、複数のマッチング手法を用いて複数の対応点候補を新たに算出してもよい。表示処理部184は、新たに算出された対応点候補を表示するためのグラフィック画像信号を生成し、映像信号処理回路12に出力する。以降、前述した処理と同様にして、画像がモニタ4の画面に表示される。   When an instruction for calculating a new corresponding point candidate is input, the corresponding point candidate calculating unit 182 calculates a new corresponding point candidate using a matching method different from the matching method that has already been used. At this time, a plurality of corresponding point candidates may be newly calculated using a plurality of matching methods. The display processing unit 184 generates a graphic image signal for displaying the newly calculated corresponding point candidate and outputs it to the video signal processing circuit 12. Thereafter, an image is displayed on the screen of the monitor 4 in the same manner as described above.

図9は、新たに算出された対応点候補を含む画像の一例を示している。図8に示す画像と比べて、対応点候補PR4,PR5,PR6が追加されている。新たに算出された対応点候補PR4が、計測点PLに対応する位置にあることが分かる。この場合、ユーザが対応点候補PR4を選択すると、対応点決定部185は、選択された対応点候補PR4を対応点に決定する。   FIG. 9 shows an example of an image including newly calculated corresponding point candidates. Compared with the image shown in FIG. 8, corresponding point candidates PR4, PR5, and PR6 are added. It can be seen that the newly calculated corresponding point candidate PR4 is at a position corresponding to the measurement point PL. In this case, when the user selects the corresponding point candidate PR4, the corresponding point determination unit 185 determines the selected corresponding point candidate PR4 as a corresponding point.

以下のようにして新たな対応点候補を算出してもよい。テンプレートマッチングを行うマッチング手法では、相関係数が最も高い点が対応点候補となる。対応点候補算出部182は、ステップS205でテンプレートマッチングにより対応点候補を算出した場合、そのときに算出した相関係数が上位の1または複数の点を新たな対応点候補とする。   A new corresponding point candidate may be calculated as follows. In a matching method that performs template matching, a point with the highest correlation coefficient is a corresponding point candidate. When the corresponding point candidate calculation unit 182 calculates a corresponding point candidate by template matching in step S205, the corresponding point candidate having the highest correlation coefficient calculated at that time is set as a new corresponding point candidate.

上記のように対応点候補を増やすことで、計測点の位置に正確に対応する位置にある対応点候補が算出される可能性が高くなり、画像の取り直しや手動による対応点の修正などのユーザの手間が発生しにくくなる。ステップS235で複数の対応点候補を表示した後、ユーザによって新たな対応点候補の算出が指示されたときに対応点候補を新たに算出してもよいし、ステップS205において、ステップS235で表示する対応点候補以外の対応点候補についても予め算出しておき、ステップS235で複数の対応点候補を表示した後、ユーザによって新たな対応点候補の表示が指示されたときに新たな対応点候補を表示してもよい。また、ユーザの指示に基づいて新たな対応点候補の算出と表示を繰り返し行えるようにしてもよい。   Increasing the number of corresponding point candidates as described above increases the possibility that a corresponding point candidate at a position that accurately corresponds to the position of the measurement point will be calculated. Users such as image re-handling or manual correction of corresponding points Is less likely to occur. After displaying a plurality of corresponding point candidates in step S235, a corresponding point candidate may be newly calculated when the user instructs the calculation of a new corresponding point candidate. In step S205, the corresponding point candidate is displayed in step S235. Corresponding point candidates other than the corresponding point candidates are calculated in advance, and after a plurality of corresponding point candidates are displayed in step S235, a new corresponding point candidate is displayed when the user is instructed to display a new corresponding point candidate. It may be displayed. Further, it may be possible to repeatedly calculate and display a new corresponding point candidate based on a user instruction.

上記のように対応点候補を増やした結果、対応点候補の数が増えすぎると、ユーザが対応点候補の選択を行うのが面倒になる。このため、以下のようにしてもよい。   As a result of increasing the number of corresponding point candidates as described above, if the number of corresponding point candidates increases too much, it becomes troublesome for the user to select corresponding point candidates. For this reason, it may be as follows.

複数の対応点候補が重複する場合(複数の対応点候補の2次元座標が一致する、または画像上の距離が所定距離以下である場合)、それらの対応点候補の信頼性が高いことをユーザに知らせるため、重複する対応点候補を強調して表示してもよい。例えば、対応点候補算出部182は、ステップS235で表示された複数の対応点候補および新たな対応点候補を含む全ての対応点候補同士の距離を算出し、重複する対応点候補があるか否かを判定する。複数の対応点候補が重複する場合、表示処理部184は、重複する対応点候補を強調して表示するためのグラフィック画像信号を生成し、映像信号処理回路12に出力する。以降、前述した処理と同様にして、画像がモニタ4の画面に表示される。   When a plurality of corresponding point candidates overlap (when the two-dimensional coordinates of the plurality of corresponding point candidates match or the distance on the image is equal to or less than a predetermined distance), the user indicates that the corresponding point candidates have high reliability. Therefore, overlapping corresponding candidate points may be highlighted and displayed. For example, the corresponding point candidate calculation unit 182 calculates the distance between all the corresponding point candidates including the plurality of corresponding point candidates displayed in step S235 and the new corresponding point candidate, and whether or not there are overlapping corresponding point candidates. Determine whether. When a plurality of corresponding point candidates overlap, the display processing unit 184 generates a graphic image signal for emphasizing and displaying the overlapping corresponding point candidates, and outputs the graphic image signal to the video signal processing circuit 12. Thereafter, an image is displayed on the screen of the monitor 4 in the same manner as described above.

図10は、新たに算出された対応点候補を含む画像の一例を示している。図8に示す画像と比べて、対応点候補PR4,PR5,PR6が追加されており、対応点候補PR4,PR5が重なり、他の対応点候補よりも大きく表示されている。重なった複数の対応点候補を強調して表示する方法は他の方法でもよく、異なる色で表示する、点滅させるなどの方法を用いてもよい。   FIG. 10 shows an example of an image including newly calculated corresponding point candidates. Compared with the image shown in FIG. 8, corresponding point candidates PR4, PR5, PR6 are added, and the corresponding point candidates PR4, PR5 are overlapped and displayed larger than the other corresponding point candidates. Other methods may be used to highlight and display a plurality of overlapping corresponding point candidates, and methods such as displaying in different colors or blinking may be used.

上記のように、重複する対応点候補が強調されるので、ユーザは信頼性の高い対応点候補を識別しやすくなる。したがって、対応点候補の数が増えてもユーザが対応点候補を選択しやすくなる。   As described above, since the overlapping corresponding point candidates are emphasized, the user can easily identify the corresponding corresponding point candidates with high reliability. Therefore, even if the number of corresponding point candidates increases, the user can easily select corresponding point candidates.

上記のように新たに算出された対応点候補のうち、ステップS235で表示された複数の対応点候補および新たに算出された他の対応点候補のいずれかと重複する対応点候補(2次元座標が一致する対応点候補、または画像上の距離が所定距離以下である対応点候補)だけを表示し、そうでない対応点候補を表示しないようにしてもよい。すなわち、ステップS235で表示された複数の対応点候補はそのまま表示され続けるが、新たに算出された対応点候補は、いずれかの対応点候補と重複する場合のみ表示される。   Among the corresponding point candidates newly calculated as described above, corresponding point candidates (two-dimensional coordinates are overlapped with any of the plurality of corresponding point candidates displayed in step S235 and other newly calculated corresponding point candidates. Only matching corresponding point candidates or corresponding point candidates whose distance on the image is equal to or smaller than a predetermined distance) may be displayed, and other corresponding point candidates may not be displayed. That is, the plurality of corresponding point candidates displayed in step S235 continue to be displayed as they are, but the newly calculated corresponding point candidates are displayed only when they overlap with any of the corresponding point candidates.

例えば、対応点候補算出部182は、新たに算出された対応点候補と、ステップS235で表示された複数の対応点候補および新たに算出された他の対応点候補との間の距離を算出し、新たに算出された対応点候補がいずれかの対応点候補と重複するか否かを判定する。新たに算出された対応点候補がいずれかの対応点候補と重複する場合、表示処理部184は、重複する対応点候補を表示するためのグラフィック画像信号を生成し、映像信号処理回路12に出力する。以降、前述した処理と同様にして、画像がモニタ4の画面に表示される。   For example, the corresponding point candidate calculation unit 182 calculates the distance between the newly calculated corresponding point candidate and the plurality of corresponding point candidates displayed in step S235 and other newly calculated corresponding point candidates. Then, it is determined whether the newly calculated corresponding point candidate overlaps with any corresponding point candidate. When the newly calculated corresponding point candidate overlaps with any one of the corresponding point candidates, the display processing unit 184 generates a graphic image signal for displaying the corresponding corresponding point candidate and outputs it to the video signal processing circuit 12. To do. Thereafter, an image is displayed on the screen of the monitor 4 in the same manner as described above.

上記のように、新たに算出された対応点候補については、いずれかの対応点候補と重複する場合のみ表示することによって、対応点候補の数が増えてもユーザが対応点候補を選択しやすくなる。新たな対応点候補の算出と表示を繰り返し行う場合には、新たに算出された対応点候補を表示する際、新たに算出された対応点候補と、表示中の対応点候補および新たに算出された他の対応点候補との間の距離を算出し、新たに算出された対応点候補がいずれかの対応点候補と重複するか否かを判定すればよい。   As described above, the newly calculated corresponding point candidate is displayed only when it overlaps with one of the corresponding point candidates, so that the user can easily select the corresponding point candidate even if the number of corresponding point candidates increases. Become. When repeatedly calculating and displaying a new corresponding point candidate, when displaying the newly calculated corresponding point candidate, the newly calculated corresponding point candidate, the corresponding corresponding point candidate being displayed, and the newly calculated corresponding point candidate are newly calculated. What is necessary is just to calculate the distance between other corresponding point candidates, and to determine whether the newly calculated corresponding point candidate overlaps with any corresponding point candidate.

表示する対応点候補の数に上限を設定し、一定数の対応点候補が表示されるようにしてもよい。例えば、対応点候補算出部182は、ステップS235で表示された複数の対応点候補と、新たに算出された対応点候補との数の合計が所定の数以上であるか否かを判定する。合計が所定の数未満であった場合、新たに算出された対応点候補を含む全ての対応点候補が表示される。また、合計が所定の数以上であった場合、表示処理部184は、ステップS235で表示された複数の対応点候補のうち、上記の合計と所定の数との差分に等しい数の対応点候補を非表示とし、新たに算出された対応点候補を表示するためのグラフィック画像信号を生成し、映像信号処理回路12に出力する。以降、前述した処理と同様にして、画像がモニタ4の画面に表示される。表示する対応点候補の数の上限をユーザが設定できるようにしてもよい。   An upper limit may be set for the number of corresponding point candidates to be displayed, and a certain number of corresponding point candidates may be displayed. For example, the corresponding point candidate calculation unit 182 determines whether the total number of the corresponding point candidates displayed in step S235 and the newly calculated corresponding point candidate is equal to or greater than a predetermined number. When the total is less than the predetermined number, all corresponding point candidates including the newly calculated corresponding point candidates are displayed. When the total is equal to or greater than the predetermined number, the display processing unit 184 displays a number of corresponding point candidates equal to the difference between the total and the predetermined number among the plurality of corresponding point candidates displayed in step S235. Is displayed, a graphic image signal for displaying the newly calculated corresponding point candidate is generated and output to the video signal processing circuit 12. Thereafter, an image is displayed on the screen of the monitor 4 in the same manner as described above. The user may be allowed to set an upper limit on the number of corresponding point candidates to be displayed.

上記のように、表示される対応点候補の数を一定に保つことによって、対応点候補の数が増えても、画像の視認性の低下を防止することができ、ユーザが対応点候補を選択しやすくなる。新たな対応点候補の算出と表示を繰り返し行う場合には、新たに算出された対応点候補を表示する際、表示される対応点候補の数が一定となるように、表示中の対応点候補のうちのいずれか(例えば、最も古い対応点候補や、相関係数が最も小さい対応点候補、エピポーララインからのズレ量が大きい候補など)を非表示とすればよい。   As described above, by keeping the number of displayed corresponding point candidates constant, even if the number of corresponding point candidates increases, it is possible to prevent a decrease in image visibility, and the user selects a corresponding point candidate. It becomes easy to do. When calculating and displaying new corresponding point candidates repeatedly, when displaying newly calculated corresponding point candidates, the corresponding point candidate being displayed is displayed so that the number of displayed corresponding point candidates is constant. (For example, the oldest corresponding point candidate, the corresponding point candidate having the smallest correlation coefficient, the candidate having a large deviation from the epipolar line, etc.) may be hidden.

(第2の変形例)
第2の変形例は、ステップS235で複数の対応点候補を表示する方法に関する。第2の変形例では、5種類のマッチング手法を用いて5つの対応点候補を算出し、ステップS235で5つの対応点候補を表示した後の処理を説明する。図11は、ステップS235で表示される画像の一例を示している。計測点PLと5つの対応点候補PR1,PR2,PR3,PR4,PR5が表示されている。3つの対応点候補PR1,PR2,PR4は同一の位置にある。図11では3つの対応点候補が重複するため、画像の視認性が低下する。このため、複数の対応点候補が重複する場合(複数の対応点候補の2次元座標が一致する、または画像上の距離が所定距離以下である場合)、それらの対応点候補を同一の表示形態で表示してもよい。
(Second modification)
The second modification relates to a method for displaying a plurality of corresponding point candidates in step S235. In the second modification, processing after calculating five corresponding point candidates using five types of matching methods and displaying the five corresponding point candidates in step S235 will be described. FIG. 11 shows an example of the image displayed in step S235. A measurement point PL and five corresponding point candidates PR1, PR2, PR3, PR4, and PR5 are displayed. The three corresponding point candidates PR1, PR2, and PR4 are at the same position. In FIG. 11, since the three corresponding point candidates overlap, the visibility of the image decreases. For this reason, when a plurality of corresponding point candidates overlap (when the two-dimensional coordinates of the plurality of corresponding point candidates match or the distance on the image is a predetermined distance or less), the corresponding point candidates are displayed in the same display form. May be displayed.

例えば、対応点候補算出部182は、複数の対応点候補同士の画像上の距離を算出し、対応点候補が重複するか否かを判定する。重複する複数の対応点候補がある場合、表示処理部184は、重複する対応点候補を同一のグラフィック(マーク)で表示するためのグラフィック画像信号を生成し、映像信号処理回路12に出力する。以降、前述した処理と同様にして、画像がモニタ4の画面に表示される。   For example, the corresponding point candidate calculation unit 182 calculates a distance on the image between a plurality of corresponding point candidates, and determines whether or not the corresponding point candidates overlap. When there are a plurality of overlapping corresponding point candidates, the display processing unit 184 generates a graphic image signal for displaying the overlapping corresponding point candidates with the same graphic (mark), and outputs the graphic image signal to the video signal processing circuit 12. Thereafter, an image is displayed on the screen of the monitor 4 in the same manner as described above.

図12は、重複する対応点候補を含む画像の一例を示している。図12では、重複する3つの対応点候補を示すマークM1と、図11の対応点候補PR3を示すマークM2と、図11の対応点候補PR5を示すマークM3とが表示されている。重複する3つの対応点候補は同一のマークM1として表示され、マークM1は、マークM2,M3を構成する線よりも太い線で表示され、強調されている。また、それぞれのマークの近傍には、そのマークに対応する対応点候補の数が表示されている。例えば、3つの対応点候補を示すマークM1の近傍には「3」が表示され、1つの対応点候補を示すマークM2,M3の近傍には「1」が表示されている。   FIG. 12 shows an example of an image including overlapping corresponding point candidates. In FIG. 12, a mark M1 indicating three overlapping corresponding point candidates, a mark M2 indicating the corresponding point candidate PR3 in FIG. 11, and a mark M3 indicating the corresponding point candidate PR5 in FIG. 11 are displayed. Three overlapping corresponding point candidates are displayed as the same mark M1, and the mark M1 is displayed as a thicker line than the lines constituting the marks M2 and M3 and is emphasized. In addition, in the vicinity of each mark, the number of corresponding point candidates corresponding to the mark is displayed. For example, “3” is displayed near the mark M1 indicating three corresponding point candidates, and “1” is displayed near the marks M2 and M3 indicating one corresponding point candidate.

上記のように、重複する対応点候補が同一のマークで表示されるので、画像の視認性の低下を低減することができる。また、対応点候補の数がマークの近傍に表示されるので、対応点候補が重複しているか否か、すなわちどの対応点候補の信頼性が高いのかをユーザに分かりやすく知らせることができる。   As described above, since overlapping corresponding point candidates are displayed with the same mark, it is possible to reduce degradation of image visibility. Further, since the number of corresponding point candidates is displayed in the vicinity of the mark, it is possible to inform the user in an easy-to-understand manner whether or not the corresponding point candidates are overlapping, that is, which corresponding point candidate has high reliability.

(第3の変形例)
第3の変形例はマッチング手法の優先度係数の算出方法に関する。過去の対応点候補の算出結果に基づいて優先度係数を算出してもよい。例えば、信頼度算出部183は、複数のマッチング手法を用いて対応点候補を算出した際、算出された対応点候補のうち、視差量が中央値である対応点候補を中心とする所定距離R(例えば3ピクセル)内に入っている対応点候補についてはマッチングが成功したとみなし、その他の対応点候補についてはマッチングが失敗したとみなす。信頼度算出部183は、複数のマッチング手法のそれぞれに対して、マッチングの成功・失敗の結果を保持しておき、複数の計測点に対する対応点候補の算出結果に基づいて、複数のマッチング手法のそれぞれの優先度係数を算出する。
(Third Modification)
The third modified example relates to a method for calculating the priority coefficient of the matching method. The priority coefficient may be calculated based on the calculation result of past corresponding point candidates. For example, when the reliability calculation unit 183 calculates corresponding point candidates using a plurality of matching methods, the predetermined distance R centered on the corresponding point candidate whose parallax amount is the median value among the calculated corresponding point candidates. Corresponding point candidates within (for example, 3 pixels) are considered to have been matched successfully, and other corresponding point candidates are considered to have failed to match. The reliability calculation unit 183 holds the result of the success / failure of the matching for each of the plurality of matching methods, and based on the calculation result of the corresponding point candidates for the plurality of measurement points, Each priority coefficient is calculated.

例えば、10点以上の計測点に対する対応点候補が算出されたら、信頼度算出部183はマッチング手法毎に優先度係数を算出する。優先度係数は、対応点候補を算出した回数に対する、マッチングが成功した回数の割合であるマッチングの成功率として算出される。   For example, when corresponding point candidates for 10 or more measurement points are calculated, the reliability calculation unit 183 calculates a priority coefficient for each matching method. The priority coefficient is calculated as a matching success rate, which is a ratio of the number of times matching is successful to the number of times corresponding point candidates are calculated.

上記のように、過去の対応点候補の算出結果に基づいて優先度係数を算出することによって、過去のマッチング結果を信頼度の算出や対応点の決定に反映させ、マッチングの信頼性を向上させることができる。   As described above, by calculating the priority coefficient based on the calculation result of the past corresponding point candidate, the past matching result is reflected in the calculation of the reliability and the determination of the corresponding point, thereby improving the matching reliability. be able to.

上記の方法を用いて、マッチングの成功率に影響する条件毎に優先度係数を算出してもよい。マッチングの成功率に影響する条件は、計測対象や、画像データに基づく条件などである。計測対象は、特定の被写体であってもよいし、被写体中の特定の領域などであってもよい。画像データに基づく条件は、物体距離、テクスチャ値、輝度値などである。画像データに基づく条件は、画像にハレーションが含まれるか否かという条件であってもよい。信頼度算出部183は、複数のマッチング手法のそれぞれについて、上記の条件毎に優先度係数を算出して管理する。つまり、複数のマッチング手法のそれぞれについて、計測対象毎の優先度係数、物体距離毎の優先度係数、テクスチャ値毎の優先度係数、輝度値毎の優先度係数が算出される。   The priority coefficient may be calculated for each condition affecting the success rate of matching using the above method. Conditions that affect the success rate of matching include measurement targets and conditions based on image data. The measurement target may be a specific subject or a specific area in the subject. Conditions based on image data are object distance, texture value, luminance value, and the like. The condition based on the image data may be a condition whether or not halation is included in the image. The reliability calculation unit 183 calculates and manages a priority coefficient for each of the above conditions for each of a plurality of matching methods. That is, for each of the plurality of matching methods, a priority coefficient for each measurement target, a priority coefficient for each object distance, a priority coefficient for each texture value, and a priority coefficient for each luminance value are calculated.

例えば、信頼度算出部183は、複数のマッチング手法を用いて対応点候補を算出した際、上記のようにして、マッチング手法毎にマッチングが成功したか失敗したかを判定する。信頼度算出部183は、マッチング手法毎に、そのときの計測対象の情報と関連付けてマッチングの成功・失敗の結果を保持する。あるいは、信頼度算出部183は、そのとき対応点候補の算出に用いた画像データに基づいて物体距離、テクスチャ値、輝度値のいずれかを算出し、マッチング手法毎に、算出した値(あるいは算出した値を含む所定の範囲)と関連付けてマッチングの成功・失敗の結果を保持する。物体距離を算出する場合、3次元座標の算出が必要となるので、図4のステップS3で行われる処理がステップS2のマッチング処理内で行われる。   For example, when the corresponding point candidate is calculated using a plurality of matching methods, the reliability calculation unit 183 determines whether matching has succeeded or failed for each matching method as described above. For each matching method, the reliability calculation unit 183 holds the result of the success / failure of the matching in association with the information to be measured at that time. Alternatively, the reliability calculation unit 183 calculates an object distance, a texture value, or a luminance value based on the image data used for calculating the corresponding point candidate at that time, and calculates the calculated value (or calculation) for each matching method. The result of matching success / failure is held in association with a predetermined range including the determined value. When calculating the object distance, it is necessary to calculate three-dimensional coordinates. Therefore, the process performed in step S3 in FIG. 4 is performed in the matching process in step S2.

信頼度算出部183は、それぞれのマッチング手法の優先度係数を算出する際、同一の計測対象について、あるいは同一の物体距離、テクスチャ値、輝度値について(あるいはそれらに関する同一の範囲について)のマッチングの成功・失敗の結果に基づいて、条件毎に優先度係数を算出する。例えば、ユーザは、特定の計測対象の計測を行う場合に、事前に同一の計測対象に対して繰り返し計測点を設定して対応点候補の算出を行い、複数のマッチング手法のそれぞれの優先度係数の算出を行う。   When calculating the priority coefficient of each matching method, the reliability calculation unit 183 performs matching for the same measurement target, or for the same object distance, texture value, and luminance value (or the same range related to them). Based on the result of success / failure, a priority coefficient is calculated for each condition. For example, when measuring a specific measurement target, the user repeatedly sets corresponding measurement points in advance for the same measurement target and calculates corresponding point candidates, and each priority coefficient of a plurality of matching methods Is calculated.

上記のように、条件毎に優先度係数を設けることで、マッチングの信頼性を向上させることができる。   As described above, by providing a priority coefficient for each condition, matching reliability can be improved.

上述したように、本実施形態によれば、複数のマッチング手法を用いて複数の対応点候補を算出し、マッチングの信頼度が低い場合には、ユーザが選択した対応点候補を対応点に決定し、マッチングの信頼度が高い場合には、複数の対応点候補から自動で選択した対応点候補を対応点に決定することによって、マッチングの誤対応を減らし、ユーザの手間を軽減することができる。   As described above, according to the present embodiment, a plurality of corresponding point candidates are calculated using a plurality of matching methods, and if the matching reliability is low, the corresponding point candidate selected by the user is determined as the corresponding point. However, when the reliability of matching is high, by determining a corresponding point candidate automatically selected from a plurality of corresponding point candidates as a corresponding point, it is possible to reduce incorrect matching and reduce the user's effort. .

また、マッチング手法の優先度係数を用いて、マッチングの信頼度の算出あるいは対応点の決定を行うことによって、マッチングの信頼度あるいは対応点に対して、特定のマッチング手法によるマッチングの結果をより大きく反映させることができる。例えば、特定の計測対象を撮影した画像を用いる場合に、マッチングの信頼度あるいは対応点に対して、特定の計測対象に適したマッチングの結果をより大きく反映させることができる。   In addition, by calculating the matching reliability or determining the corresponding point using the priority coefficient of the matching method, the matching result by the specific matching method is made larger for the matching reliability or the corresponding point. It can be reflected. For example, when an image obtained by photographing a specific measurement target is used, the matching result suitable for the specific measurement target can be more greatly reflected on the matching reliability or the corresponding point.

また、過去の対応点候補の算出結果に基づいて、マッチング手法の優先度係数を算出することによって、過去のマッチング結果をマッチングの信頼度の算出や対応点の決定に反映させ、マッチングの信頼性を向上させることができる。さらに、対応点候補を算出したときの計測対象、物体距離、テクスチャ値、輝度値などの条件毎に優先度係数を設けることによって、マッチングの信頼性を向上させることができる。   In addition, by calculating the priority coefficient of the matching method based on the past corresponding point candidate calculation results, the past matching results are reflected in the calculation of matching reliability and the determination of corresponding points. Can be improved. Furthermore, the reliability of matching can be improved by providing a priority coefficient for each condition such as the measurement target, object distance, texture value, and luminance value when the corresponding point candidate is calculated.

また、複数のマッチング手法を用いて算出した複数の対応点候補を表示する際、重複する対応点候補を同一の表示形態で表示することによって、画像の視認性の低下を低減することができる。さらに、重複する対応点候補の数を対応点候補の近傍に表示することによって、対応点候補が重複しているか否か、すなわちどの対応点候補の信頼性が高いのかをユーザに分かりやすく知らせることができる。   In addition, when displaying a plurality of corresponding point candidates calculated using a plurality of matching methods, it is possible to reduce degradation in image visibility by displaying overlapping corresponding point candidates in the same display form. Further, by displaying the number of overlapping corresponding point candidates in the vicinity of the corresponding point candidates, it is possible to inform the user in an easy-to-understand manner whether the corresponding point candidates are overlapping, that is, which corresponding point candidate has high reliability. Can do.

また、複数のマッチング手法を用いて算出した複数の対応点候補を表示する際、複数のマッチング手法のそれぞれに対応する優先度係数に応じた表示形態で対応点候補を表示することによって、ユーザに対して、特定のマッチング手法によるマッチングの結果をより明確に知らせることができる。例えば、特定の計測対象を撮影した画像を用いる場合に、特定の計測対象に適したマッチング手法を用いて算出された対応点候補をより大きく表示することによって、ユーザがより信頼性の高い対応点候補を選択しやすくなる。   In addition, when displaying a plurality of corresponding point candidates calculated using a plurality of matching methods, the corresponding point candidates are displayed in a display form corresponding to the priority coefficient corresponding to each of the plurality of matching methods, thereby allowing the user to On the other hand, the result of matching by a specific matching method can be notified more clearly. For example, when using an image obtained by capturing a specific measurement target, the corresponding point candidate calculated using a matching method suitable for the specific measurement target is displayed in a larger size so that the user can have a more reliable corresponding point. This makes it easier to select candidates.

また、複数のマッチング手法を用いて複数の対応点候補を算出した後、新たな対応点候補の算出がユーザから指示された場合に、複数のマッチング手法とは異なるマッチング手法を用いて、新たな対応点候補を算出することによって、画像の取り直しや手動による対応点の修正などのユーザの手間を軽減することができる。   In addition, after calculating a plurality of corresponding point candidates using a plurality of matching methods, a new matching point candidate is calculated using a matching method different from the plurality of matching methods when the user instructs the calculation of a new corresponding point candidate. By calculating the corresponding point candidates, it is possible to reduce the user's troubles such as re-taking the image or manually correcting the corresponding points.

また、新たに算出された対応点候補を表示する際、新たに算出された対応点候補のうち、他の対応点候補と重複する対応点候補のみを表示することによって、対応点候補の数が増えても、ユーザが対応点候補を選択しやすくなる。   Further, when displaying newly calculated corresponding point candidates, by displaying only the corresponding point candidates that overlap with other corresponding point candidates among the newly calculated corresponding point candidates, the number of corresponding point candidates is reduced. Even if it increases, it becomes easy for the user to select corresponding point candidates.

また、新たに算出された対応点候補を表示する際、表示される対応点候補の数を一定に保つことによって、画像の視認性の低下を防止することができ、ユーザが対応点候補を選択しやすくなる。   In addition, when displaying newly calculated corresponding point candidates, the number of corresponding point candidates displayed can be kept constant, thereby preventing a reduction in image visibility, and the user can select corresponding point candidates. It becomes easy to do.

以上、図面を参照して本発明の実施形態について詳述してきたが、具体的な構成は上記の実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。   As described above, the embodiments of the present invention have been described in detail with reference to the drawings. However, the specific configuration is not limited to the above-described embodiments, and includes design changes and the like without departing from the gist of the present invention. .

1 内視鏡装置、2 内視鏡、3 装置本体、4 モニタ(表示部)、5 筐体、6 操作部、8 内視鏡ユニット、9 CCU、10 制御ユニット、12 映像信号処理回路、13 ROM、14 RAM、18 CPU、28 撮像素子(撮像部)、180 制御部、181 計測点設定部、182 対応点候補算出部、183 信頼度算出部、184 表示処理部、185 対応点決定部、186 計測処理部   DESCRIPTION OF SYMBOLS 1 Endoscope apparatus, 2 Endoscope, 3 apparatus main body, 4 monitor (display part), 5 housing | casing, 6 operation part, 8 endoscope unit, 9 CCU, 10 control unit, 12 video signal processing circuit, 13 ROM, 14 RAM, 18 CPU, 28 Image sensor (imaging unit), 180 control unit, 181 measurement point setting unit, 182 corresponding point candidate calculation unit, 183 reliability calculation unit, 184 display processing unit, 185 corresponding point determination unit, 186 Measurement processing unit

Claims (13)

同一の被写体に対応する第1の被写体像および第2の被写体像を撮像して画像データを生成する撮像部と、
前記画像データに基づく画像を表示する表示部と、
前記第1の被写体像上で設定された計測点に対応する前記第2の被写体像上の点である対応点の候補を、複数のマッチング手法を用いて算出する対応点候補算出部と、
前記複数のマッチング手法のそれぞれに対応する前記対応点の候補に基づいてマッチングの信頼度を算出する信頼度算出部と、
前記信頼度が所定値未満である場合に、前記計測点と、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補とを前記画像に表示する処理を行う表示処理部と、
前記信頼度が所定値以上である場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補に基づいて前記対応点を決定し、前記信頼度が所定値未満である場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補のうち指定された前記対応点の候補を対応点に決定する対応点決定部と、
前記計測点と、決定された前記対応点とに基づいて前記被写体の大きさを計測する計測処理部と、
を有することを特徴とする内視鏡装置。
An imaging unit that captures a first subject image and a second subject image corresponding to the same subject to generate image data;
A display unit for displaying an image based on the image data;
A corresponding point candidate calculation unit that calculates a corresponding point candidate that is a point on the second subject image corresponding to the measurement point set on the first subject image using a plurality of matching methods;
A reliability calculation unit that calculates the reliability of matching based on the corresponding point candidates corresponding to each of the plurality of matching methods;
When the reliability is less than a predetermined value, a display processing unit that performs processing for displaying the measurement point and the corresponding point candidate corresponding to each of the plurality of matching methods on the image;
When the reliability is greater than or equal to a predetermined value, the corresponding points are determined based on the corresponding point candidates corresponding to each of the plurality of matching methods, and when the reliability is less than a predetermined value, A corresponding point determination unit that determines the corresponding point candidate specified among the corresponding point candidates corresponding to each of a plurality of matching methods as a corresponding point;
A measurement processing unit that measures the size of the subject based on the measurement points and the determined corresponding points;
An endoscope apparatus characterized by comprising:
前記信頼度算出部は、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補同士の前記第2の被写体像上の距離に基づいて前記信頼度を算出することを特徴とする請求項1に記載の内視鏡装置。   The reliability calculation unit calculates the reliability based on a distance on the second subject image between the corresponding point candidates corresponding to each of the plurality of matching methods. The endoscope apparatus described in 1. 前記信頼度算出部は、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補の位置と、前記複数のマッチング手法のそれぞれに対応する優先度係数とに基づいて前記信頼度を算出することを特徴とする請求項1に記載の内視鏡装置。   The reliability calculation unit calculates the reliability based on a position of the corresponding point candidate corresponding to each of the plurality of matching methods and a priority coefficient corresponding to each of the plurality of matching methods. The endoscope apparatus according to claim 1. 前記対応点決定部は、前記信頼度が所定値以上である場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補の位置と、前記複数のマッチング手法のそれぞれに対応する優先度係数とに基づいて前記対応点を決定することを特徴とする請求項1に記載の内視鏡装置。   The corresponding point determination unit, when the reliability is equal to or higher than a predetermined value, the position of the corresponding point candidate corresponding to each of the plurality of matching methods and the priority corresponding to each of the plurality of matching methods The endoscope apparatus according to claim 1, wherein the corresponding points are determined based on a coefficient. 前記信頼度算出部は、過去に前記複数のマッチング手法のそれぞれに対応する前記対応点の候補を算出した結果に基づいて、前記複数のマッチング手法のそれぞれに対応する優先度係数を算出することを特徴とする請求項3または請求項4に記載の内視鏡装置。   The reliability calculation unit calculates a priority coefficient corresponding to each of the plurality of matching methods based on a result of calculating the corresponding point candidate corresponding to each of the plurality of matching methods in the past. The endoscope apparatus according to claim 3 or 4, wherein the endoscope apparatus is characterized. 前記優先度係数は、前記対応点の候補を算出したときの条件毎に設けられていることを特徴とする請求項3または請求項4に記載の内視鏡装置。   The endoscope apparatus according to claim 3 or 4, wherein the priority coefficient is provided for each condition when the corresponding point candidates are calculated. 前記表示処理部は、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補のうち、重複する前記対応点の候補を同一の表示形態で前記画像に表示する処理を行うことを特徴とする請求項1に記載の内視鏡装置。   The display processing unit performs a process of displaying overlapping corresponding candidate candidates on the image in the same display form among the corresponding point candidates corresponding to each of the plurality of matching methods. The endoscope apparatus according to claim 1. 前記表示処理部は、重複する前記対応点の候補の数を、当該対応点の候補の近傍に表示する処理を行うことを特徴とする請求項7に記載の内視鏡装置。   The endoscope apparatus according to claim 7, wherein the display processing unit performs a process of displaying the number of overlapping corresponding point candidates in the vicinity of the corresponding point candidate. 前記表示処理部は、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補を、前記複数のマッチング手法のそれぞれに対応する優先度係数に応じた表示形態で前記画像に表示する処理を行うことを特徴とする請求項1に記載の内視鏡装置。   The display processing unit performs processing of displaying the corresponding point candidates corresponding to each of the plurality of matching methods on the image in a display form according to a priority coefficient corresponding to each of the plurality of matching methods. The endoscope apparatus according to claim 1. 前記対応点候補算出部はさらに、前記複数のマッチング手法とは異なるマッチング手法を用いて前記対応点の候補を算出し、
前記表示処理部は、前記信頼度が所定値未満であり、かつ、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補の表示が指示された場合に、前記計測点と、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補と、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補とを前記画像に表示する処理を行い、
前記対応点決定部は、前記信頼度が所定値未満であり、かつ、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補の表示が指示された場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補と、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補とのうち指定された前記対応点の候補を対応点に決定する
ことを特徴とする請求項1に記載の内視鏡装置。
The corresponding point candidate calculation unit further calculates the corresponding point candidate using a matching method different from the plurality of matching methods,
The display processing unit performs the measurement when the reliability is less than a predetermined value and the display of the corresponding point candidates calculated using a matching method different from the plurality of matching methods is instructed. A process of displaying on the image a point, the corresponding point candidate corresponding to each of the plurality of matching methods, and the corresponding point candidate calculated using a matching method different from the plurality of matching methods Done
The corresponding point determination unit, when the reliability is less than a predetermined value and the display of the corresponding point candidate calculated using a matching method different from the plurality of matching methods is instructed, Corresponding to the corresponding point candidate specified among the corresponding point candidates corresponding to each of a plurality of matching methods and the corresponding point candidates calculated using a matching method different from the plurality of matching methods The endoscope apparatus according to claim 1, wherein the endoscope apparatus is determined as a point.
前記表示処理部は、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補を前記画像に表示する際、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補のうち、前記複数のマッチング手法を用いて算出された前記対応点の候補と重複する、または前記複数のマッチング手法とは異なるマッチング手法を用いて算出された他の前記対応点の候補と重複する前記対応点の候補のみを表示することを特徴とする請求項10に記載の内視鏡装置。   The display processing unit is calculated using a matching method different from the plurality of matching methods when displaying the corresponding point candidate calculated using a matching method different from the plurality of matching methods on the image. Among the corresponding point candidates, the other corresponding points calculated using a matching method that overlaps with the corresponding point candidates calculated using the plurality of matching methods or different from the plurality of matching methods. The endoscope apparatus according to claim 10, wherein only the corresponding point candidates that overlap with the point candidates are displayed. 前記表示処理部は、前記複数のマッチング手法とは異なるマッチング手法を用いて算出された前記対応点の候補を前記画像に表示する際、既に表示された前記対応点の候補のうちのいずれかを非表示とすることにより、表示される前記対応点の候補の数を一定に保つことを特徴とする請求項10に記載の内視鏡装置。   When the display processing unit displays the corresponding point candidate calculated by using a matching method different from the plurality of matching methods on the image, any one of the already displayed corresponding point candidates is displayed. The endoscope apparatus according to claim 10, wherein the number of candidates for the corresponding points to be displayed is kept constant by being hidden. 同一の被写体に対応する第1の被写体像および第2の被写体像を撮像して生成された画像データに基づく画像の前記第1の被写体像上で設定された計測点に対応する前記第2の被写体像上の点である対応点の候補を、複数のマッチング手法を用いて算出するステップと、
前記複数のマッチング手法のそれぞれに対応する前記対応点の候補に基づいてマッチングの信頼度を算出するステップと、
前記信頼度が所定値未満である場合に、前記計測点と、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補とを前記画像に表示する処理を行うステップと、
前記信頼度が所定値以上である場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補に基づいて前記対応点を決定し、前記信頼度が所定値未満である場合に、前記複数のマッチング手法のそれぞれに対応する前記対応点の候補のうち指定された前記対応点の候補を対応点に決定するステップと、
前記計測点と、決定された前記対応点とに基づいて前記被写体の大きさを計測するステップと、
をコンピュータに実行させるためのプログラム。
The second corresponding to the measurement point set on the first subject image of the image based on the image data generated by capturing the first subject image and the second subject image corresponding to the same subject. Calculating corresponding point candidates that are points on the subject image using a plurality of matching methods;
Calculating a matching reliability based on the corresponding point candidates corresponding to each of the plurality of matching methods;
When the reliability is less than a predetermined value, performing a process of displaying the measurement point and the corresponding point candidate corresponding to each of the plurality of matching methods on the image;
When the reliability is greater than or equal to a predetermined value, the corresponding points are determined based on the corresponding point candidates corresponding to each of the plurality of matching methods, and when the reliability is less than a predetermined value, Determining the designated corresponding point candidate among the corresponding point candidates corresponding to each of a plurality of matching methods as a corresponding point;
Measuring the size of the subject based on the measurement points and the determined corresponding points;
A program that causes a computer to execute.
JP2013018658A 2013-02-01 2013-02-01 Endoscope apparatus and program Active JP6081209B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013018658A JP6081209B2 (en) 2013-02-01 2013-02-01 Endoscope apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013018658A JP6081209B2 (en) 2013-02-01 2013-02-01 Endoscope apparatus and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2017006551A Division JP6426215B2 (en) 2017-01-18 2017-01-18 Endoscope apparatus and program

Publications (2)

Publication Number Publication Date
JP2014147572A JP2014147572A (en) 2014-08-21
JP6081209B2 true JP6081209B2 (en) 2017-02-15

Family

ID=51571135

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013018658A Active JP6081209B2 (en) 2013-02-01 2013-02-01 Endoscope apparatus and program

Country Status (1)

Country Link
JP (1) JP6081209B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107735714B (en) 2015-06-25 2020-06-09 奥林巴斯株式会社 Endoscope device
WO2017199285A1 (en) * 2016-05-16 2017-11-23 オリンパス株式会社 Image processing device and image processing method
JP6426215B2 (en) * 2017-01-18 2018-11-21 オリンパス株式会社 Endoscope apparatus and program

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08305858A (en) * 1995-04-28 1996-11-22 Canon Inc Method and device for extracting corresponding point
JP2001266128A (en) * 2000-03-21 2001-09-28 Nippon Telegr & Teleph Corp <Ntt> Method and device for obtaining depth information and recording medium recording depth information obtaining program
JP4674093B2 (en) * 2004-06-01 2011-04-20 オリンパス株式会社 Endoscope apparatus and program
JP5079973B2 (en) * 2004-06-09 2012-11-21 オリンパス株式会社 Endoscope device for measurement and program for endoscope device for measurement
JP5073564B2 (en) * 2008-04-15 2012-11-14 オリンパス株式会社 Endoscope device for measurement and program
JP5437087B2 (en) * 2010-01-15 2014-03-12 オリンパス株式会社 Endoscope apparatus and program
JP5620200B2 (en) * 2010-09-06 2014-11-05 株式会社トプコン Point cloud position data processing device, point cloud position data processing method, point cloud position data processing system, and point cloud position data processing program
JP5580164B2 (en) * 2010-10-18 2014-08-27 株式会社トプコン Optical information processing apparatus, optical information processing method, optical information processing system, and optical information processing program

Also Published As

Publication number Publication date
JP2014147572A (en) 2014-08-21

Similar Documents

Publication Publication Date Title
JP4343341B2 (en) Endoscope device
JP6112879B2 (en) Image processing apparatus, endoscope apparatus, operation method of image processing apparatus, and image processing program
JP7045963B2 (en) How to operate the measuring device, measuring device, and program
US8248465B2 (en) Measuring endoscope apparatus and program
US10776937B2 (en) Image processing apparatus and image processing method for setting measuring point to calculate three-dimensional coordinates of subject image with high reliability
JP5231173B2 (en) Endoscope device for measurement and program
US11321861B2 (en) Method of operating measurement device, measurement device, measurement system, three-dimensional shape restoration device, and recording medium
JP6081209B2 (en) Endoscope apparatus and program
US11120543B2 (en) Measurement processing device
US11941749B2 (en) Image display method, display control device, and recording medium for displaying shape image of subject and coordinates estimated from two-dimensional coordinates in reference image projected thereon
JP5307407B2 (en) Endoscope apparatus and program
US20200053296A1 (en) Measurement device, method of operating measurement device, and recording medium
JP4750197B2 (en) Endoscope device
JP7116925B2 (en) Observation device operating method, observation device, and program
JP6789899B2 (en) Measuring device and operating method of measuring device
JP5976436B2 (en) Endoscope apparatus and program
JP6426215B2 (en) Endoscope apparatus and program
JP2022172637A (en) Image processing method, image processing apparatus, and program
JP5403400B2 (en) Image processing apparatus, imaging apparatus, and image processing program
WO2017199657A1 (en) Endoscope device, measurement method, and program
JP2016218322A (en) Endoscope system
JP2023009838A (en) Image processing method, image processing device, and program
JP5791989B2 (en) Endoscope apparatus and program
JP2016186662A (en) Endoscope apparatus and program
JP2010187343A (en) Image processing device, imaging apparatus, and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160121

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161124

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170118

R151 Written notification of patent or utility model registration

Ref document number: 6081209

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350