JP2018007840A - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP2018007840A
JP2018007840A JP2016138812A JP2016138812A JP2018007840A JP 2018007840 A JP2018007840 A JP 2018007840A JP 2016138812 A JP2016138812 A JP 2016138812A JP 2016138812 A JP2016138812 A JP 2016138812A JP 2018007840 A JP2018007840 A JP 2018007840A
Authority
JP
Japan
Prior art keywords
shift amount
image
distance
unit
parallax
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.)
Ceased
Application number
JP2016138812A
Other languages
Japanese (ja)
Inventor
山崎 隆一
Ryuichi Yamazaki
隆一 山崎
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 JP2016138812A priority Critical patent/JP2018007840A/en
Publication of JP2018007840A publication Critical patent/JP2018007840A/en
Ceased legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image processing device capable of acquiring a parallax image which can perform a detailed observation in a near point observation.SOLUTION: An image processing device generates a parallax image on the basis of first and second images in which the same subject is imaged from different directions, and it includes: a distance information generation unit for generating distance information which shows a distance, which is a distance acquired from the first and second images, from an imaging surface to the subject; a shift amount setting unit for setting a shift amount in the parallax direction of the first image and the second image on the basis of the distance information; and a parallax image generation unit for generating a parallax image on the basis of the first and second images and the shift amount set by the shift amount setting unit.SELECTED DRAWING: Figure 2

Description

本発明は、画像処理装置に関する。   The present invention relates to an image processing apparatus.

近年、被写体を撮像して、互いに視差を有する左眼用と右眼用の二つの画像データから立体画像を取得する画像作成方法が知られている(例えば、特許文献1を参照)。特許文献1では、左眼用画像と右眼用画像との対応点のシフト量に基づいて各点の奥行きを算出することによって、対応する全画素位置について奥行きを求め、算出された奥行きに基づいて各画素位置を移動させることによって立体表示させるための視差画像を作成している。   2. Description of the Related Art In recent years, there has been known an image creation method for capturing a subject and acquiring a stereoscopic image from two image data for left eye and right eye having parallax with each other (see, for example, Patent Document 1). In Patent Document 1, by calculating the depth of each point based on the shift amount of the corresponding point between the left-eye image and the right-eye image, the depth is obtained for all corresponding pixel positions, and based on the calculated depth. Thus, a parallax image for stereoscopic display is created by moving each pixel position.

ところで、医療分野等において使用される内視鏡と処理装置(プロセッサ)とが着脱可能である内視鏡システムにおいても、診断や検査の円滑化のために、観察対象を立体画像で観察したいという要求がある。この要求にこたえるための技術として、左眼用および右眼用の二つの光学系と、各光学系からの光を受光する撮像素子とを備えた内視鏡が知られている。この内視鏡が装着されたプロセッサは、装着された内視鏡から左眼用および右眼用の画像データを受信し、この二つの画像データから視差画像を生成する。   By the way, even in an endoscope system in which an endoscope used in the medical field or the like and a processing device (processor) are detachable, it is desired to observe the observation target as a stereoscopic image for facilitating diagnosis and examination. There is a request. As a technique for meeting this requirement, an endoscope including two optical systems for the left eye and right eye and an image sensor that receives light from each optical system is known. The processor to which the endoscope is attached receives left-eye and right-eye image data from the attached endoscope, and generates a parallax image from the two image data.

特許第4061305号公報Japanese Patent No. 4061305

観察対象との距離が小さい近点観察では、例えば生体組織の凹凸の観察を行いたいという要望がある。しかしながら、従来の内視鏡システムに対して特許文献1が開示する奥行き算出方法を適用すると、観察対象との距離が小さいと奥行きも小さくなるために、二つの画像の視差が小さい視差画像が生成される。この結果、近点に観察対象が写った視差画像では、表示した立体画像において凹凸を表現しきれない場合があり、詳細に観察できない場合があった。このため、近点観察においても詳細観察が可能な視差画像を生成する技術が求められていた。   In near-point observation with a small distance to the observation target, there is a demand for observation of unevenness of a living tissue, for example. However, when the depth calculation method disclosed in Patent Document 1 is applied to a conventional endoscope system, the depth becomes small when the distance to the observation target is small, so that a parallax image with a small parallax between the two images is generated. Is done. As a result, in the parallax image in which the observation target is shown at the near point, the unevenness may not be fully expressed in the displayed stereoscopic image, and it may not be possible to observe in detail. For this reason, there has been a demand for a technique for generating a parallax image that allows detailed observation even in near-point observation.

本発明は、上記に鑑みてなされたものであって、近点観察において詳細な観察を行うことが可能な視差画像を取得することができる画像処理装置を提供することを目的とする。   The present invention has been made in view of the above, and an object thereof is to provide an image processing apparatus capable of acquiring a parallax image capable of performing detailed observation in near-point observation.

上述した課題を解決し、目的を達成するために、本発明にかかる画像処理装置は、同一の被写体を異なる方向から撮像した第1および第2画像をもとに視差画像を生成する画像処理装置であって、前記第1および第2画像から求まる距離であって、撮像面から被写体までの距離を示す距離情報を生成する距離情報生成部と、前記距離情報をもとに、前記第1画像と前記第2画像との視差方向のシフト量を設定するシフト量設定部と、前記第1および第2画像と、前記シフト量設定部が設定したシフト量とをもとに、前記視差画像を生成する視差画像生成部と、を備えることを特徴とする。   In order to solve the above-described problems and achieve the object, an image processing apparatus according to the present invention generates an image of parallax based on first and second images obtained by imaging the same subject from different directions. A distance information generating unit that generates a distance information that is a distance obtained from the first and second images and that indicates a distance from the imaging surface to the subject, and based on the distance information, the first image The parallax image based on the shift amount setting unit for setting the shift amount in the parallax direction between the first image and the second image, the first and second images, and the shift amount set by the shift amount setting unit. And a parallax image generation unit to be generated.

また、本発明にかかる画像処理装置は、上記発明において、前記シフト量設定部は、前記距離情報をもとに、前記距離が予め設定されている距離よりも小さいか否かを判定し、判定した結果に基づいて前記第1画像と前記第2画像との視差方向のシフト量を設定することを特徴とする。   In the image processing apparatus according to the present invention as set forth in the invention described above, the shift amount setting unit determines whether or not the distance is smaller than a preset distance based on the distance information. Based on the result, a shift amount in the parallax direction between the first image and the second image is set.

また、本発明にかかる画像処理装置は、上記発明において、前記距離情報生成部は、前記距離が予め設定されている距離よりも小さい場合、前記距離が予め設定されている距離以上の場合と比して前記シフト量を大きい値に設定することを特徴とする。   Further, in the image processing apparatus according to the present invention, in the above invention, the distance information generation unit may compare the distance information when the distance is smaller than a preset distance with a case where the distance is equal to or greater than the preset distance. The shift amount is set to a large value.

また、本発明にかかる画像処理装置は、上記発明において、前記距離情報生成部は、入力される前記第1および第2画像に対して前記距離情報を順次生成し、前記シフト量設定部は、前記距離情報生成部が生成した距離情報に基づいて前記予め設定されている距離よりも小さいか否かを判定し、前記距離が予め設定されている距離よりも小さいと判断したフレームの連続数が、閾値以上である場合、前記距離情報に基づいて前記シフト量を設定し、前記距離が予め設定されている距離よりも小さいと判断したフレームの連続数が、前記閾値より小さい場合、予め設定されているシフト量に設定することを特徴とする。   In the image processing apparatus according to the present invention, in the above invention, the distance information generation unit sequentially generates the distance information for the input first and second images, and the shift amount setting unit includes: It is determined whether or not the distance is smaller than the preset distance based on the distance information generated by the distance information generation unit, and the number of consecutive frames determined to be smaller than the preset distance is The shift amount is set based on the distance information when the distance is equal to or greater than the threshold, and the number of consecutive frames determined to be smaller than the preset distance is preset when the number of consecutive frames is smaller than the threshold. It is characterized in that it is set to the shift amount.

また、本発明にかかる画像処理装置は、上記発明において、前記距離が前記予め設定されている距離より小さい場合に設定される近点シフト量と、前記距離が前記予め設定されている距離以上離れている場合に設定される遠点シフト量とが予め設定されており、前記近点シフト量は、前記遠点シフト量と比して大きく、前記シフト量設定部は、前記距離が予め設定されている距離以上であると判断した場合であって、設定されている設定シフト量が前記遠点シフト量よりも大きい場合、該設定シフト量から、前記近点シフト量と前記遠点シフト量との差よりも小さい減算量を減算して得られた値を前記シフト量として設定することを特徴とする。   In the image processing apparatus according to the present invention, in the above invention, the near point shift amount set when the distance is smaller than the preset distance and the distance are more than the preset distance. The far point shift amount set when the distance is set is set in advance, the near point shift amount is larger than the far point shift amount, and the shift amount setting unit sets the distance in advance. And when the set shift amount that is set is larger than the far point shift amount, the near point shift amount and the far point shift amount are calculated from the set shift amount. A value obtained by subtracting a subtraction amount smaller than the difference is set as the shift amount.

本発明によれば、近点観察において詳細な観察を行うことが可能な視差画像を取得することができるという効果を奏する。   According to the present invention, there is an effect that a parallax image capable of performing detailed observation in near-point observation can be acquired.

図1は、本発明の一実施の形態にかかる内視鏡システムの概略構成を示す図である。FIG. 1 is a diagram showing a schematic configuration of an endoscope system according to an embodiment of the present invention. 図2は、本発明の一実施の形態にかかる内視鏡システムの概略構成を示すブロック図である。FIG. 2 is a block diagram showing a schematic configuration of the endoscope system according to the embodiment of the present invention. 図3は、本発明の一実施の形態にかかる内視鏡システムが生成する視差画像について説明する図である。FIG. 3 is a diagram illustrating a parallax image generated by the endoscope system according to the embodiment of the present invention. 図4は、本発明の一実施の形態にかかる処理装置が行う画像処理を示すフローチャートである。FIG. 4 is a flowchart showing image processing performed by the processing apparatus according to the embodiment of the present invention. 図5は、本発明の実施の形態の変形例1にかかる処理装置が行う画像処理を示すフローチャートである。FIG. 5 is a flowchart illustrating image processing performed by the processing device according to the first modification of the embodiment of the present invention. 図6は、本発明の実施の形態の変形例2にかかる処理装置が行う画像処理を示すフローチャートである。FIG. 6 is a flowchart illustrating image processing performed by the processing device according to the second modification of the embodiment of the present invention. 図7は、本発明の実施の形態の変形例3にかかる処理装置が行う画像処理を示すフローチャートである。FIG. 7 is a flowchart showing image processing performed by the processing device according to the third modification of the embodiment of the present invention.

以下、本発明を実施するための形態(以下、「実施の形態」という)を説明する。実施の形態では、本発明にかかる画像処理装置を含むシステムの一例として、患者等の被検体内の画像を撮像して表示する医療用の内視鏡システムについて説明する。また、この実施の形態により、この発明が限定されるものではない。さらに、図面の記載において、同一の部分には同一の符号を付して説明する。   Hereinafter, modes for carrying out the present invention (hereinafter referred to as “embodiments”) will be described. In the embodiment, a medical endoscope system that captures and displays an image in a subject such as a patient will be described as an example of a system including an image processing apparatus according to the present invention. Moreover, this invention is not limited by this embodiment. Further, in the description of the drawings, the same portions will be described with the same reference numerals.

(実施の形態)
図1は、本発明の一実施の形態にかかる内視鏡システムの概略構成を示す図である。図2は、本実施の形態にかかる内視鏡システムの概略構成を示すブロック図である。
(Embodiment)
FIG. 1 is a diagram showing a schematic configuration of an endoscope system according to an embodiment of the present invention. FIG. 2 is a block diagram showing a schematic configuration of the endoscope system according to the present embodiment.

図1および図2に示す内視鏡システム1は、被検体内に先端部を挿入することによって被検体内の画像(以下、内視鏡画像ともいう)を撮像する内視鏡2と、内視鏡2の先端から出射する照明光を発生する光源部3aを有し、内視鏡2が撮像した画像信号に所定の信号処理を施すとともに、内視鏡システム1全体の動作を統括的に制御する処理装置3と、処理装置3の信号処理により生成された内視鏡画像を表示する表示装置4と、を備える。   An endoscope system 1 shown in FIGS. 1 and 2 includes an endoscope 2 that captures an image in a subject (hereinafter also referred to as an endoscopic image) by inserting a distal end portion into the subject, It has a light source 3a that generates illumination light emitted from the distal end of the endoscope 2, performs predetermined signal processing on the image signal captured by the endoscope 2, and comprehensively controls the operation of the endoscope system 1 as a whole. The processing apparatus 3 to control and the display apparatus 4 which displays the endoscopic image produced | generated by the signal processing of the processing apparatus 3 are provided.

内視鏡2は、可撓性を有する細長形状をなす挿入部21と、挿入部21の基端側に接続され、各種の操作信号の入力を受け付ける操作部22と、操作部22から挿入部21が延びる方向と異なる方向に延び、処理装置3(光源部3aを含む)に接続する各種ケーブルを内蔵するユニバーサルコード23と、を備える。   The endoscope 2 includes an insertion portion 21 having an elongated shape having flexibility, an operation portion 22 that is connected to a proximal end side of the insertion portion 21 and receives input of various operation signals, and an insertion portion from the operation portion 22. And a universal cord 23 that includes various cables that extend in a direction different from the direction in which 21 extends and are connected to the processing device 3 (including the light source unit 3a).

挿入部21は、光を受光して光電変換を行うことにより信号を生成する画素が2次元状に配列された撮像素子244を内蔵した先端部24と、複数の湾曲駒によって構成された湾曲自在な湾曲部25と、湾曲部25の基端側に接続され、可撓性を有する長尺状の可撓管部26と、を有する。挿入部21は、被検体の体腔内に挿入され、外光の届かない位置にある生体組織等の被写体を撮像素子244によって撮像する。   The insertion unit 21 receives a light and performs photoelectric conversion to generate a signal to generate a signal. The insertion unit 21 includes an image pickup element 244 in which pixels are arranged in a two-dimensional shape, and a bendable portion formed by a plurality of bending pieces. And a long flexible tube portion 26 connected to the proximal end side of the bending portion 25 and having flexibility. The insertion part 21 is inserted into the body cavity of the subject, and the imaging element 244 images a subject such as a living tissue at a position where external light does not reach.

先端部24は、グラスファイバ等を用いて構成されて光源部3aが発光した光の導光路をなすライトガイド241と、ライトガイド241の先端に設けられた照明レンズ242と、集光用の第1光学系243aおよび第2光学系243bと、光学系243の結像位置に設けられ、第1光学系243aおよび第2光学系243bが集光した光を受光して電気信号に光電変換して所定の信号処理を施す撮像素子244(撮像部)と、を有する。   The distal end portion 24 is configured by using glass fiber or the like, and forms a light guide path for light emitted from the light source portion 3a, an illumination lens 242 provided at the distal end of the light guide 241, and a condensing first lens. The first optical system 243a and the second optical system 243b are provided at the imaging positions of the optical system 243, receive the light collected by the first optical system 243a and the second optical system 243b, and photoelectrically convert them into electrical signals. And an imaging element 244 (imaging unit) that performs predetermined signal processing.

第1光学系243aは、一または複数のレンズを用いて構成され、撮像素子244の前段に設けられて被写体からの入射光を結像する。第1光学系243aは、画角を変化させる光学ズーム機能および焦点を変化させるフォーカス機能を有するものであってもよい。   The first optical system 243a is configured using one or a plurality of lenses, and is provided in front of the image sensor 244, and forms an image of incident light from a subject. The first optical system 243a may have an optical zoom function that changes the angle of view and a focus function that changes the focus.

第2光学系243bは、一または複数のレンズを用いて構成され、撮像素子244の前段に設けられて被写体からの入射光を、第1光学系243aとは視差を有して結像する。第2光学系243bは、画角を変化させる光学ズーム機能および焦点を変化させるフォーカス機能を有するものであってもよい。   The second optical system 243b is configured using one or a plurality of lenses, and is provided in front of the image sensor 244 to form incident light from a subject with parallax with the first optical system 243a. The second optical system 243b may have an optical zoom function that changes the angle of view and a focus function that changes the focus.

撮像素子244は、第1光学系243aおよび第2光学系243bからの光を光電変換して電気信号(画像信号)を生成する。具体的には、撮像素子244は、光量に応じた電荷を蓄積するフォトダイオードや、フォトダイオードから転送される電荷を電圧レベルに変換するコンデンサ等をそれぞれ有する複数の画素がマトリックス状に配列され、各画素が第1光学系243aおよび第2光学系243bからの光を光電変換して電気信号を生成する受光部244aと、受光部244aの複数の画素のうち読み出し対象として任意に設定された画素が生成した電気信号を順次読み出して、画像信号として出力する読み出し部244bと、を有する。受光部244aには、カラーフィルタが設けられ、各画素が、赤色(R)、緑色(G)および青色(B)の各色成分の波長帯域のうちのいずれかの波長帯域の光を受光する。撮像素子244は、処理装置3から受信した駆動信号に従って先端部24の各種動作を制御する。撮像素子244は、例えばCCD(Charge Coupled Device)イメージセンサや、CMOS(Complementary Metal Oxide Semiconductor)イメージセンサを用いて実現される。また、撮像素子244は、単板のイメージセンサであってもよいし、例えば3板方式等の複数のイメージセンサを用いるものであってもよい。   The image sensor 244 photoelectrically converts light from the first optical system 243a and the second optical system 243b to generate an electrical signal (image signal). Specifically, in the imaging element 244, a plurality of pixels each having a photodiode that accumulates charges according to the amount of light, a capacitor that converts charges transferred from the photodiodes to voltage levels, and the like are arranged in a matrix, Each pixel photoelectrically converts light from the first optical system 243a and the second optical system 243b to generate an electrical signal, and a pixel arbitrarily set as a readout target among a plurality of pixels of the light receiving unit 244a And a reading unit 244b that sequentially reads out the electrical signals generated by and outputs them as image signals. The light receiving unit 244a is provided with a color filter, and each pixel receives light in one of the wavelength bands of the color components of red (R), green (G), and blue (B). The image sensor 244 controls various operations of the distal end portion 24 in accordance with the drive signal received from the processing device 3. The image sensor 244 is realized by using, for example, a charge coupled device (CCD) image sensor or a complementary metal oxide semiconductor (CMOS) image sensor. Further, the image sensor 244 may be a single plate image sensor, or may use a plurality of image sensors such as a three plate type.

受光部244aは、第1光学系243aが結像した光を受光する第1領域と、第2光学系243bが結像した光を受光する第2領域とを有し、各領域において異なる光学系により結像された光を光電変換して、一枚の画像を構成する1フレーム分の電気信号を生成する。なお、本実施の形態では、第1光学系243aおよび第2光学系243bがそれぞれ結像した光を、同一の撮像素子により受光するものとして説明するが、第1光学系243aおよび第2光学系243bに応じて二つの撮像素子を設けてもよい。   The light receiving unit 244a includes a first region that receives the light imaged by the first optical system 243a and a second region that receives the light imaged by the second optical system 243b, and different optical systems in each region. The imaged light is photoelectrically converted to generate an electrical signal for one frame constituting one image. In the present embodiment, description will be made assuming that the light imaged by the first optical system 243a and the second optical system 243b is received by the same imaging device, but the first optical system 243a and the second optical system are described. Two imaging elements may be provided according to 243b.

操作部22は、湾曲部25を上下方向および左右方向に湾曲させる湾曲ノブ221と、被検体の体腔内に生検鉗子、電気メスおよび検査プローブ等の処置具を挿入する処置具挿入部222と、処理装置3に加えて、送気手段、送水手段、画面表示制御等の周辺機器の操作指示信号を入力する操作入力部である複数のスイッチ223と、を有する。処置具挿入部222から挿入される処置具は、先端部24の処置具チャンネル(図示せず)を経由して開口部(図示せず)から表出する。   The operation unit 22 includes a bending knob 221 that bends the bending unit 25 in the vertical direction and the left-right direction, and a treatment tool insertion unit 222 that inserts a treatment tool such as a biopsy forceps, an electric knife, and an inspection probe into the body cavity of the subject. In addition to the processing device 3, it has a plurality of switches 223 which are operation input units for inputting operation instruction signals of peripheral devices such as air supply means, water supply means, and screen display control. The treatment tool inserted from the treatment tool insertion portion 222 is exposed from the opening (not shown) via the treatment tool channel (not shown) of the distal end portion 24.

ユニバーサルコード23は、ライトガイド241と、一または複数の信号線をまとめた集合ケーブル245と、を少なくとも内蔵している。集合ケーブル245は、画像信号を伝送するための信号線や、撮像素子244を駆動するための駆動信号を伝送するための信号線、内視鏡2(撮像素子244)に関する固有情報等を含む情報を送受信するための信号線を含む。なお、本実施の形態では、信号線を用いて電気信号を伝送するものとして説明するが、光信号を伝送するものであってもよいし、無線通信により内視鏡2と処理装置3との間で信号を伝送するものであってもよい。   The universal cord 23 includes at least a light guide 241 and a collective cable 245 in which one or a plurality of signal lines are collected. The collective cable 245 is a signal line for transmitting an image signal, a signal line for transmitting a drive signal for driving the image sensor 244, information including unique information regarding the endoscope 2 (image sensor 244), and the like. Including a signal line for transmitting and receiving. In the present embodiment, the description will be made assuming that an electrical signal is transmitted using a signal line. However, an optical signal may be transmitted, or the endoscope 2 and the processing device 3 may be connected by wireless communication. A signal may be transmitted between them.

また、内視鏡2には、内視鏡2の撮像素子244の撮像条件などの撮像情報を記憶する撮像情報メモリ27を有する。撮像情報メモリ27は、内視鏡2の撮像情報を記録するメモリであって、内視鏡2の処理装置3への装着時に処理装置3との通信処理によって内視鏡2の識別情報を処理装置3に出力する。或いは、内視鏡2の識別情報に対応した規則に従ってコネクタに接続ピンが設けてあり、処理装置3は、内視鏡2の装着時に処理装置3側の接続ピンと内視鏡2側の接続ピンとの接続状態をもとに内視鏡2の接続を認識する場合もある。撮像情報には、撮像素子244の画素数、画素サイズ、焦点距離、第1および第2領域のアドレス等の情報を含んでいる。   Further, the endoscope 2 includes an imaging information memory 27 that stores imaging information such as imaging conditions of the imaging element 244 of the endoscope 2. The imaging information memory 27 is a memory for recording imaging information of the endoscope 2, and processes the identification information of the endoscope 2 by communication processing with the processing device 3 when the endoscope 2 is attached to the processing device 3. Output to device 3. Alternatively, the connector is provided with a connection pin in accordance with a rule corresponding to the identification information of the endoscope 2, and the processing device 3 includes a connection pin on the processing device 3 side and a connection pin on the endoscope 2 side when the endoscope 2 is mounted. The connection of the endoscope 2 may be recognized based on the connection state. The imaging information includes information such as the number of pixels of the imaging device 244, pixel size, focal length, and addresses of the first and second areas.

次に、処理装置3の構成について説明する。処理装置3は、画像処理部31と、視差画像生成部32と、距離情報生成部33と、シフト量設定部34と、入力部35と、記憶部36と、制御部37と、を備える。なお、本発明にかかる画像処理装置は、少なくとも画像処理部31と、視差画像生成部32と、距離情報生成部33と、シフト量設定部34と、記憶部36と、制御部37と、を用いて構成される。   Next, the configuration of the processing device 3 will be described. The processing device 3 includes an image processing unit 31, a parallax image generation unit 32, a distance information generation unit 33, a shift amount setting unit 34, an input unit 35, a storage unit 36, and a control unit 37. The image processing apparatus according to the present invention includes at least an image processing unit 31, a parallax image generation unit 32, a distance information generation unit 33, a shift amount setting unit 34, a storage unit 36, and a control unit 37. Constructed using.

画像処理部31は、内視鏡2から、撮像素子244が撮像した内視鏡画像を表す画像データである画像信号を受信する。画像処理部31は、内視鏡2からアナログの画像信号を受信した場合はA/D変換を行ってデジタルの画像信号を生成する。また、画像処理部31は、内視鏡2から光信号として画像信号を受信した場合は光電変換を行ってデジタルの画像信号を生成する。   The image processing unit 31 receives from the endoscope 2 an image signal that is image data representing an endoscopic image captured by the image sensor 244. When receiving an analog image signal from the endoscope 2, the image processing unit 31 performs A / D conversion to generate a digital image signal. Further, when receiving an image signal as an optical signal from the endoscope 2, the image processing unit 31 performs photoelectric conversion to generate a digital image signal.

画像処理部31は、内視鏡2から入力された画像信号に対し、画素欠陥補正、光学補正、色補正、オプティカルブラック減算、ノイズリダクション、ホワイトバランス調整、補間処理等の信号処理を施す。画素欠陥補正は、欠陥画素の周囲の画素の画素値に基づいて、欠陥画素の画素値を付与する。光学補正は、レンズの光学歪み等の補正を行う。色補正は、色温度の補正や、色偏差の補正を行う。画像処理部31は、上述した信号処理により生成された補正画像を含む処理信号を生成する。   The image processing unit 31 performs signal processing such as pixel defect correction, optical correction, color correction, optical black subtraction, noise reduction, white balance adjustment, and interpolation processing on the image signal input from the endoscope 2. In the pixel defect correction, the pixel value of the defective pixel is given based on the pixel values of the pixels around the defective pixel. Optical correction corrects optical distortion of the lens. In the color correction, color temperature correction and color deviation correction are performed. The image processing unit 31 generates a processing signal including a corrected image generated by the signal processing described above.

また、画像処理部31は、受光部244aの第1および第2領域においてそれぞれ受光した光に応じた画像をそれぞれ生成する。具体的に、画像処理部31は、第1光学系243aが結像した光を受光部244aが光電変換した電気信号に応じた画像である左眼用画像と、第2光学系243bが結像した光を受光部244aが光電変換した電気信号に応じた画像である右眼用画像とを含む処理信号を生成する。画像処理部31は、生成した処理信号を、視差画像生成部32に入力する。   In addition, the image processing unit 31 generates images corresponding to light received in the first and second regions of the light receiving unit 244a, respectively. Specifically, the image processing unit 31 includes an image for the left eye that is an image corresponding to an electrical signal obtained by photoelectric conversion of the light imaged by the first optical system 243a by the light receiving unit 244a, and an image formed by the second optical system 243b. A processing signal including the right-eye image that is an image corresponding to the electrical signal obtained by photoelectrically converting the received light by the light receiving unit 244a is generated. The image processing unit 31 inputs the generated processing signal to the parallax image generation unit 32.

視差画像生成部32は、画像処理部31から処理信号が入力されると、左眼用画像と右目画像とを互いにずらして視差を生じさせた視差画像を生成し、この視差画像を含む信号に対して、表示装置4で表示可能な態様の信号となるような信号処理を施して、表示用の画像信号を生成する。具体的に、視差画像生成部32は、左眼用画像および右眼用画像を含む画像信号に対して、ズーム処理、エンハンス処理、または圧縮処理等を行った後、シフト量設定部34によって設定されたシフト量に基づいて右眼用画像と左眼用画像とを相対的にシフトさせて、表示用の画像信号を生成する。視差画像生成部32は、画像処理部31から入力された処理信号に応じた内視鏡画像を含む画像情報と、該画像情報に関する文字情報とを重畳した合成画像を表示用画像として生成する。視差画像生成部32は、生成した表示用の画像信号を表示装置4に送信する。   When the processing signal is input from the image processing unit 31, the parallax image generation unit 32 generates a parallax image in which the left-eye image and the right-eye image are shifted from each other to generate parallax, and the signal including the parallax image is generated. On the other hand, signal processing is performed so that the signal can be displayed on the display device 4 to generate an image signal for display. Specifically, the parallax image generation unit 32 performs a zoom process, an enhancement process, a compression process, or the like on the image signal including the left-eye image and the right-eye image, and then sets the shift amount setting unit 34. The right-eye image and the left-eye image are relatively shifted based on the shift amount thus generated to generate a display image signal. The parallax image generation unit 32 generates a composite image in which image information including an endoscopic image corresponding to the processing signal input from the image processing unit 31 and character information related to the image information are superimposed as a display image. The parallax image generation unit 32 transmits the generated display image signal to the display device 4.

画像処理部31および視差画像生成部32は、CPU(Central Processing Unit)等の汎用プロセッサや、ASIC(Application Specific Integrated Circuit)、処理内容を書き換え可能なプログラマブルロジックデバイスであるFPGA(Field Programmable Gate Array)等の特定の機能を実行する各種演算回路等の専用プロセッサを用いて構成される。   The image processing unit 31 and the parallax image generation unit 32 are a general-purpose processor such as a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or an FPGA (Field Programmable Gate Array) which is a programmable logic device capable of rewriting processing contents. It is configured using a dedicated processor such as various arithmetic circuits that execute specific functions such as.

ここで、視差画像生成部32が生成する視差画像について、図3を参照して説明する。図3は、本発明の一実施の形態にかかる内視鏡システムが生成する視差画像について説明する図である。視差画像生成部32は、図3に示すように、左眼用画像IMLが有する水平ラインDLと、右眼用画像IMRが有する水平ラインDRとを、設定されたシフト量に応じてずらして交互に配置することによって視差画像IMDを生成する。具体的に、視差画像生成部32は、左眼用画像IMLが有する奇数ラインの水平ラインDLと、右眼用画像IMRが有する偶数ラインの水平ラインDRとを、設定されたシフト量に応じてずらして交互に配置する。このような視差画像IMDは、ラインバイライン画像ともいわれる。なお、本実施の形態では、視差画像が、ラインバイライン画像であるものを例に説明したが、これに限らず、視差を有する画像であればよい。 Here, the parallax image generated by the parallax image generation unit 32 will be described with reference to FIG. FIG. 3 is a diagram illustrating a parallax image generated by the endoscope system according to the embodiment of the present invention. Parallax image generating unit 32, as shown in FIG. 3, according to the shift amount of the horizontal line D R, is set a horizontal line D L, the right-eye image IM R has included in the image IM L for the left eye generating a parallax image IM D by placing alternately staggered Te. Specifically, the shift parallax image generating unit 32, the horizontal line D L of the odd lines with the image IM L for the left eye, the even line with the right-eye image IM R and a horizontal line D R, is set They are arranged alternately by shifting according to the amount. Such parallax images IM D is also referred to as line-by-line image. In the present embodiment, the parallax image is a line-by-line image as an example. However, the present invention is not limited to this, and any parallax image may be used.

距離情報生成部33は、内視鏡2から、撮像素子244が撮像した内視鏡画像を表す画像データである画像信号を受信すると、画像信号に含まれる画像を用いて被写体までの距離の測定を行い、この測定結果を、奥行きを示す距離情報として生成する。具体的に、距離情報生成部33は、例えば、上述した右眼用画像および左眼用画像を用いて、三角測量により距離を測定する。この際、距離情報生成部33は、画像全体の画素値を用いて奥行きの測定を行ってもよいし、画像の一部の領域の画素値を用いて距離の測定を行ってもよい。この場合、距離情報生成部33は、一方の画像で設定されている測定領域に対し、他方の画像から対応する領域を検出後、対応領域の画素値を用いて距離の測定を行う。この際の対応領域の検出方法は、公知の方法、例えばSSD(Sum of Squared Difference)やSAD(Sum of Absolute Difference)などのテンプレートマッチングを用いて行うことができる。画像に対して測定領域を設定する場合、ユーザが入力部35を介して設定するようにしてもよい。また、領域が複数設定されている場合は、平均値、最頻値、最大値、最小値のうちのいずれかを選択して一つの距離を有する距離情報を生成する。画像の一部のみを用いて距離を測定することにより、距離情報生成部33が距離情報を生成する負荷を軽減することができる。このとき、生成される距離情報は外乱の影響で変動することがあるため、距離情報を安定させるためにラグリードフィルタを掛けて変動を抑えてもよい。   When the distance information generation unit 33 receives an image signal, which is image data representing an endoscopic image captured by the imaging element 244, from the endoscope 2, the distance information generation unit 33 measures the distance to the subject using the image included in the image signal. The measurement result is generated as distance information indicating the depth. Specifically, the distance information generation unit 33 measures the distance by triangulation using, for example, the above-described right eye image and left eye image. At this time, the distance information generation unit 33 may measure the depth using the pixel values of the entire image, or may measure the distance using the pixel values of a partial area of the image. In this case, the distance information generation unit 33 measures the distance using the pixel value of the corresponding area after detecting the corresponding area from the other image with respect to the measurement area set in one image. The detection method of the corresponding region at this time can be performed using a known method, for example, template matching such as SSD (Sum of Squared Difference) or SAD (Sum of Absolute Difference). When setting a measurement area for an image, the user may set it via the input unit 35. When a plurality of areas are set, the average information, the mode value, the maximum value, and the minimum value are selected to generate distance information having one distance. By measuring the distance using only a part of the image, the load for generating the distance information by the distance information generating unit 33 can be reduced. At this time, since the generated distance information may fluctuate due to the influence of disturbance, the fluctuation may be suppressed by applying a lag reed filter in order to stabilize the distance information.

シフト量設定部34は、距離情報生成部33が生成した距離情報に基づいて、左眼用画像および右眼用画像のシフト量を設定する。ここでいうシフト量とは、例えば左眼用画像に対する右眼用画像のずれ量であって、視差方向のずれ量のことをいう。視差方向とは、左眼用画像および右眼用画像の左右方向であり、例えばエピポーラ線に沿った方向に対応している。具体的に、シフト量設定部34は、まず、被写体までの距離と、記憶部36に記憶されている距離の閾値とに基づいて、被写体が近点に位置するか否かを判断する。この際、シフト量設定部34は、被写体が近点に位置すれば、距離に応じたシフト量の設定を行い、被写体が近点に位置しない、すなわち被写体が遠点に位置すれば、予め設定されているシフト量の設定を行う。遠点のシフト量は、例えば、ゼロとしてもよいし、取得した撮像情報から、第1光学系243aおよび第2光学系243bの間の距離、例えば中心間の距離に応じて設定する値としてもよい。例えば、シフト量がゼロの場合は、左眼用画像IMLが有する水平ラインDLと、右眼用画像IMRが有する水平ラインDRとが揃った視差画像が生成される。この場合、視差が生じないため、ユーザが観察する視差画像に奥行き感を感じることはない。一方で、シフト量が、ゼロ以上に設定されている場合、左眼用画像IMLが有する水平ラインDLと、右眼用画像IMRが有する水平ラインDRとは、互いに離れる方向にシフトした視差画像が生成される。この場合、シフト量に応じて視差が生じ、ユーザは、奥行き感を有する視差画像を観察することができる。なお、本実施の形態では、シフト量が、左眼用画像に対する右眼用画像のずれ量であるものとして説明するが、右眼用画像に対する左眼用画像のずれ量であってもよいし、左眼用画像と右眼用画像との相対的なずれ量(左眼用画像および右眼用画像の基準位置からの各ずれ量)であってもよい。例えば、シフト量を左眼用画像に対する右眼用画像のずれ量とした場合、右眼用画像のシフト量がずれ量に応じて設定され、左眼用画像のシフト量はゼロに設定されている。 The shift amount setting unit 34 sets the shift amounts of the left-eye image and the right-eye image based on the distance information generated by the distance information generation unit 33. The shift amount referred to here is, for example, a shift amount of the right-eye image with respect to the left-eye image, which is a shift amount in the parallax direction. The parallax direction is the left-right direction of the image for the left eye and the image for the right eye, and corresponds to, for example, a direction along the epipolar line. Specifically, the shift amount setting unit 34 first determines whether or not the subject is located at the near point based on the distance to the subject and the distance threshold value stored in the storage unit 36. At this time, the shift amount setting unit 34 sets the shift amount according to the distance if the subject is located at the near point, and is set in advance if the subject is not located at the near point, that is, if the subject is located at the far point. Set the shift amount. The far point shift amount may be zero, for example, or may be a value set according to the distance between the first optical system 243a and the second optical system 243b, for example, the distance between the centers, from the acquired imaging information. Good. For example, if the shift amount is zero, the horizontal line D L having the image IM L for the left eye, the parallax image with uniform and horizontal lines D R having the right-eye image IM R is generated. In this case, since no parallax occurs, the parallax image observed by the user does not feel a sense of depth. On the other hand, the shift amount is, if set to greater than zero, and horizontal line D L having the image IM L for the left eye, and the horizontal line D R having the right-eye image IM R, shifted away from each other A parallax image is generated. In this case, parallax occurs according to the shift amount, and the user can observe a parallax image having a sense of depth. In the present embodiment, the shift amount is described as the shift amount of the right-eye image with respect to the left-eye image. However, the shift amount may be the shift amount of the left-eye image with respect to the right-eye image. The relative shift amount between the left-eye image and the right-eye image (each shift amount from the reference position of the left-eye image and the right-eye image) may be used. For example, when the shift amount is the shift amount of the right eye image with respect to the left eye image, the shift amount of the right eye image is set according to the shift amount, and the shift amount of the left eye image is set to zero. Yes.

入力部35は、キーボード、マウス、スイッチ、タッチパネルを用いて実現され、内視鏡システム1の動作を指示する動作指示信号等の各種信号の入力を受け付ける。なお、入力部35は、操作部22に設けられたスイッチや、外部のタブレット型のコンピュータ等の可搬型端末を含んでいてもよい。   The input unit 35 is realized by using a keyboard, a mouse, a switch, and a touch panel, and receives input of various signals such as an operation instruction signal for instructing an operation of the endoscope system 1. The input unit 35 may include a portable terminal such as a switch provided in the operation unit 22 or an external tablet computer.

記憶部36は、内視鏡システム1を動作させるための各種プログラム、および内視鏡システム1の動作に必要な各種パラメータ等を含むデータや、所定の画像処理が施された画像情報と該画像情報に関する文字情報とを重畳した合成画像を生成する合成処理、いわゆるオンスクリーンディスプレイ(OSD)処理に関する情報等を記憶する。文字情報は、患者情報、機器情報及び検査情報等を示す情報である。また、記憶部36は、処理装置3の識別情報を記憶する。ここで、識別情報には、処理装置3の固有情報(ID)、年式およびスペック情報等が含まれる。   The storage unit 36 includes various programs for operating the endoscope system 1, data including various parameters necessary for the operation of the endoscope system 1, image information subjected to predetermined image processing, and the image. Information relating to a synthesis process for generating a synthesized image in which character information relating to information is superimposed, such as so-called on-screen display (OSD) process, is stored. The character information is information indicating patient information, device information, examination information, and the like. Further, the storage unit 36 stores identification information of the processing device 3. Here, the identification information includes unique information (ID) of the processing device 3, model year, specification information, and the like.

また、記憶部36は、処理装置3の画像取得処理方法を実行するための画像取得処理プログラムを含む各種プログラムを記憶する。各種プログラムは、ハードディスク、フラッシュメモリ、CD−ROM、DVD−ROM、フレキシブルディスク等のコンピュータ読み取り可能な記録媒体に記録して広く流通させることも可能である。なお、上述した各種プログラムは、通信ネットワークを介してダウンロードすることによって取得することも可能である。ここでいう通信ネットワークは、例えば既存の公衆回線網、LAN(Local Area Network)、WAN(Wide Area Network)等によって実現されるものであり、有線、無線を問わない。   The storage unit 36 also stores various programs including an image acquisition processing program for executing the image acquisition processing method of the processing device 3. Various programs can be recorded on a computer-readable recording medium such as a hard disk, a flash memory, a CD-ROM, a DVD-ROM, or a flexible disk and widely distributed. The various programs described above can also be obtained by downloading via a communication network. The communication network here is realized by, for example, an existing public line network, a LAN (Local Area Network), a WAN (Wide Area Network) or the like, regardless of wired or wireless.

また、記憶部36は、距離情報に応じて設定される左眼用画像および右眼用画像のシフト量や、被写体が近点に位置するか否かを判定する閾値等の情報を記憶する視差画像生成情報記憶部361を有する。シフト量は、距離情報として取得される距離と対応付けて記憶されている。また、視差画像生成情報記憶部361は、シフト量と距離との関係を表す関数を記憶するようにしてもよい。   In addition, the storage unit 36 stores information such as a shift amount of the left-eye image and the right-eye image set in accordance with the distance information, and a threshold value for determining whether or not the subject is located at the near point. An image generation information storage unit 361 is provided. The shift amount is stored in association with the distance acquired as distance information. Further, the parallax image generation information storage unit 361 may store a function representing the relationship between the shift amount and the distance.

以上の構成を有する記憶部36は、各種プログラム等が予めインストールされたROM(Read Only Memory)、および各処理の演算パラメータやデータ等を記憶するRAM(Random Access Memory)やハードディスク等を用いて実現される。   The storage unit 36 having the above configuration is realized by using a ROM (Read Only Memory) in which various programs are installed in advance, a RAM (Random Access Memory) storing a calculation parameter and data of each process, a hard disk, and the like. Is done.

制御部37は、CPU等の汎用プロセッサやASIC等の特定の機能を実行する各種演算回路等の専用プロセッサを用いて構成され、撮像素子244および光源部3aを含む各構成部の駆動制御、および各構成部に対する情報の入出力制御等を行う。制御部37は、記憶部36に記憶されている撮像制御のための制御情報データ(例えば、読み出しタイミング等)を参照し、集合ケーブル245に含まれる所定の信号線を介して駆動信号として撮像素子244へ送信する。また、制御部37は、視差画像生成部32が生成した表示用の画像信号に応じた画像を表示装置4に表示させる制御を行う。   The control unit 37 is configured by using a general-purpose processor such as a CPU or a dedicated processor such as various arithmetic circuits that execute specific functions such as an ASIC, and drive control of each component including the image sensor 244 and the light source unit 3a, and Input / output control of information for each component is performed. The control unit 37 refers to control information data (for example, readout timing) for imaging control stored in the storage unit 36, and uses the imaging element as a drive signal via a predetermined signal line included in the collective cable 245. To 244. In addition, the control unit 37 performs control to display an image corresponding to the display image signal generated by the parallax image generation unit 32 on the display device 4.

続いて、光源部3aの構成について説明する。光源部3aは、照明部301と、照明制御部302と、を備える。照明部301は、照明制御部302の制御のもと、被写体(被検体)に対して、異なる露光量の照明光を順次切り替えて出射する。照明部301は、光源301aと、光源ドライバ301bと、を有する。   Next, the configuration of the light source unit 3a will be described. The light source unit 3 a includes an illumination unit 301 and an illumination control unit 302. Under the control of the illumination control unit 302, the illumination unit 301 sequentially switches and emits illumination light with different exposure amounts to the subject (subject). The illumination unit 301 includes a light source 301a and a light source driver 301b.

光源301aは、白色光を出射するLED光源や、一または複数のレンズ等を用いて構成され、LED光源の駆動により光(照明光)を出射する。光源301aが発生した照明光は、ライトガイド241を経由して先端部24の先端から被写体に向けて出射される。また、光源301aは、LED光源や、レーザー光源、キセノンランプ、ハロゲンランプ等のいずれかを用いて実現される。   The light source 301a is configured using an LED light source that emits white light, one or a plurality of lenses, and the like, and emits light (illumination light) by driving the LED light source. Illumination light generated by the light source 301 a is emitted from the tip of the tip 24 toward the subject via the light guide 241. The light source 301a is realized using any one of an LED light source, a laser light source, a xenon lamp, a halogen lamp, and the like.

光源ドライバ301bは、照明制御部302の制御のもと、光源301aに対して電流を供給することにより、光源301aに照明光を出射させる。   The light source driver 301b causes the light source 301a to emit illumination light by supplying a current to the light source 301a under the control of the illumination control unit 302.

照明制御部302は、制御部37からの制御信号(調光信号)に基づいて、光源301aに供給する電力量を制御するとともに、光源301aの駆動タイミングを制御する。   The illumination control unit 302 controls the amount of power supplied to the light source 301a and the drive timing of the light source 301a based on a control signal (dimming signal) from the control unit 37.

表示装置4は、映像ケーブルを介して処理装置3(視差画像生成部32)から受信した画像信号に対応する表示画像を表示する。表示装置4は、液晶または有機EL(Electro Luminescence)等のモニタを用いて構成される。   The display device 4 displays a display image corresponding to the image signal received from the processing device 3 (parallax image generation unit 32) via the video cable. The display device 4 is configured using a monitor such as liquid crystal or organic EL (Electro Luminescence).

ユーザは、表示装置4に表示された視差画像を、偏光特性を有する眼鏡を介して観察する。これにより、ユーザは、左眼により左眼用画像を観察し、右眼により右眼用画像を観察することによって、被写体の凹凸が強調した画像を観察することができる。   The user observes the parallax image displayed on the display device 4 through glasses having polarization characteristics. Accordingly, the user can observe an image in which the unevenness of the subject is emphasized by observing the image for the left eye with the left eye and the image for the right eye with the right eye.

続いて、内視鏡システム1が行う画像処理について説明する。図4は、本発明の一実施の形態にかかる処理装置が行う画像処理を示すフローチャートである。以下、制御部37の制御のもと、各部が動作するものとして説明する。   Next, image processing performed by the endoscope system 1 will be described. FIG. 4 is a flowchart showing image processing performed by the processing apparatus according to the embodiment of the present invention. Hereinafter, description will be made assuming that each unit operates under the control of the control unit 37.

まず、処理装置3が内視鏡2から画像信号を取得すると、画像処理部31が、右眼用画像および左眼用画像を生成する(ステップS101)。具体的に、画像処理部31は、第1光学系243aが結像した光を受光部244aが光電変換した電気信号に応じた画像である左眼用画像と、第2光学系243bが結像した光を受光部244aが光電変換した電気信号に応じた画像である右眼用画像とを含む処理信号を生成する。画像処理部31は、生成した処理信号を、視差画像生成部32に入力する。   First, when the processing device 3 acquires an image signal from the endoscope 2, the image processing unit 31 generates a right eye image and a left eye image (step S101). Specifically, the image processing unit 31 includes an image for the left eye that is an image corresponding to an electrical signal obtained by photoelectric conversion of the light imaged by the first optical system 243a by the light receiving unit 244a, and an image formed by the second optical system 243b. A processing signal including the right-eye image that is an image corresponding to the electrical signal obtained by photoelectrically converting the received light by the light receiving unit 244a is generated. The image processing unit 31 inputs the generated processing signal to the parallax image generation unit 32.

ステップS101に続くステップS102において、距離情報生成部33は、内視鏡2から、撮像素子244が撮像した内視鏡画像を表す画像データである画像信号を受信すると、画像信号に含まれる画像を用いて被写体までの距離の測定を行い、測定結果を距離情報として生成する。   In step S <b> 102 following step S <b> 101, when the distance information generation unit 33 receives an image signal that is image data representing an endoscopic image captured by the imaging element 244 from the endoscope 2, an image included in the image signal is displayed. The distance to the subject is measured using this, and the measurement result is generated as distance information.

ステップS102に続くステップS103〜S105において、シフト量設定部34は、距離情報生成部33が生成した距離情報に基づいて、左眼用画像および右眼用画像のシフト量を設定する。具体的に、シフト量設定部34は、まず、被写体までの距離と、記憶部36に記憶されている距離の閾値とに基づいて、被写体が近点に位置するか否かを判断する(ステップS103)。閾値は、例えば、被写体までの距離として4mmに設定される。この際、シフト量設定部34は、距離が閾値より小さく、被写体が近点に位置すると判断した場合(ステップS103:Yes)、ステップS104に移行する。これに対して、シフト量設定部34は、距離が閾値以上であり、被写体が近点に位置しない、すなわち被写体が遠点に位置すると判断した場合(ステップS103:No)、ステップS105に移行する。   In steps S103 to S105 following step S102, the shift amount setting unit 34 sets the shift amounts of the left eye image and the right eye image based on the distance information generated by the distance information generation unit 33. Specifically, the shift amount setting unit 34 first determines whether or not the subject is located at a near point based on the distance to the subject and the distance threshold value stored in the storage unit 36 (step). S103). The threshold is set to 4 mm as the distance to the subject, for example. At this time, when the shift amount setting unit 34 determines that the distance is smaller than the threshold value and the subject is located at the near point (step S103: Yes), the process proceeds to step S104. On the other hand, when the shift amount setting unit 34 determines that the distance is equal to or greater than the threshold and the subject is not located at the near point, that is, the subject is located at the far point (step S103: No), the process proceeds to step S105. .

ステップS104において、シフト量設定部34は、距離に応じたシフト量の設定を行う。シフト量設定部34は、視差画像生成情報記憶部361を参照して、距離に対応するシフト量を取得し、この取得したシフト量を当該画像のシフト量に設定する。制御部37は、シフト量設定部34によるシフト量の設定が完了すると、ステップS106に移行する。   In step S104, the shift amount setting unit 34 sets a shift amount according to the distance. The shift amount setting unit 34 refers to the parallax image generation information storage unit 361, acquires the shift amount corresponding to the distance, and sets the acquired shift amount as the shift amount of the image. When the setting of the shift amount by the shift amount setting unit 34 is completed, the control unit 37 proceeds to step S106.

ステップS105において、シフト量設定部34は、予め設定されているシフト量の設定を行う。シフト量設定部34は、例えば、遠点用に設定されているシフト量、例えばゼロや、第1光学系243aおよび第2光学系243bの間の距離に応じて設定されている値をシフト量に設定する。制御部37は、シフト量設定部34によるシフト量の設定が完了すると、ステップS106に移行する。   In step S105, the shift amount setting unit 34 sets a preset shift amount. The shift amount setting unit 34 sets, for example, a shift amount set for the far point, for example, zero or a value set according to the distance between the first optical system 243a and the second optical system 243b. Set to. When the setting of the shift amount by the shift amount setting unit 34 is completed, the control unit 37 proceeds to step S106.

ステップS106において、視差画像生成部32は、左眼用画像および右眼用画像を含む画像信号に対して、ズーム処理、エンハンス処理、または圧縮処理等を行った後、シフト量設定部34によって設定されたシフト量に基づいて右眼用画像と左眼用画像とを相対的にシフトさせた視差画像を含む表示用の画像信号を生成する。   In step S106, the parallax image generation unit 32 performs zoom processing, enhancement processing, compression processing, or the like on the image signal including the image for the left eye and the image for the right eye, and then sets the shift amount setting unit 34. A display image signal including a parallax image obtained by relatively shifting the image for the right eye and the image for the left eye based on the shift amount thus generated is generated.

ステップS106に続くステップS107において、制御部37は、視差画像生成部32が生成した視差画像を含む画像情報と、該画像情報に関する文字情報とを重畳した合成画像である表示画像を、表示装置4に表示させる。   In step S107 following step S106, the control unit 37 displays a display image that is a composite image in which image information including the parallax image generated by the parallax image generation unit 32 and character information related to the image information are superimposed on the display device 4. To display.

ステップS107に続くステップS108において、制御部37は、新たな画像信号が内視鏡2から入力されたか否かを判断する。制御部37は、例えば、新たな画像信号が内視鏡2から入力されたと判断すると(ステップS108:Yes)、ステップS101に戻って上述した処理を繰り返す。これに対し、新たな画像信号は入力されていないと判断すると(ステップS108:No)、上述した画像処理を終了する。   In step S108 following step S107, the control unit 37 determines whether or not a new image signal is input from the endoscope 2. For example, when the control unit 37 determines that a new image signal is input from the endoscope 2 (step S108: Yes), the control unit 37 returns to step S101 and repeats the above-described processing. On the other hand, if it is determined that a new image signal has not been input (step S108: No), the above-described image processing ends.

上述した本発明の一実施の形態によれば、左眼用画像および右眼用画像から算出される距離情報に基づいて、近点である場合に、近点の凹凸を強調した奥行き感を表現可能なシフト量を設定し、このシフト量に基づいて視差画像を生成するようにしたので、表示装置4に表示させた際の画像に奥行き感をもたせることができる。このように、本実施の形態によれば、近点観察において詳細な観察を行うことが可能な視差画像を取得することができる。   According to the embodiment of the present invention described above, a depth sensation in which the unevenness of the near point is emphasized is expressed based on the distance information calculated from the left eye image and the right eye image. Since a possible shift amount is set and a parallax image is generated based on this shift amount, it is possible to give a sense of depth to the image displayed on the display device 4. As described above, according to the present embodiment, it is possible to acquire a parallax image that allows detailed observation in near-point observation.

なお、上述した実施の形態では、フレームごとにシフト量を設定するものとして説明したが、予め設定されたフレームおきにシフト量を設定するようにしてもよい。また、上述した実施の形態では、シフト量が距離に対応して設定されているものとして説明したが、近点用のシフト量、および遠点用のシフト量の二つのシフト量のみを予め設定し、シフト量設定部34が、遠点近点の判断結果に応じていずれかのシフト量を設定するようにしてもよい。   In the above-described embodiment, the shift amount is set for each frame. However, the shift amount may be set every preset frame. In the above-described embodiment, the shift amount is described as being set corresponding to the distance. However, only two shift amounts, a near-point shift amount and a far-point shift amount, are set in advance. Then, the shift amount setting unit 34 may set any shift amount according to the determination result of the far point / near point.

(実施の形態の変形例1)
本変形例1では、近点と判定されたフレームが連続する場合に、シフト量を近点に対応するシフト量に切り替える。図5は、本発明の実施の形態の変形例1にかかる処理装置が行う画像処理を示すフローチャートである。本変形例1にかかる内視鏡システムは、上述した内視鏡システム1と同様の構成を有するものとして説明する。以下、制御部37の制御のもと、各部が動作するものとして説明する。
(Modification 1 of embodiment)
In the first modification, when the frames determined to be near points continue, the shift amount is switched to the shift amount corresponding to the near point. FIG. 5 is a flowchart illustrating image processing performed by the processing device according to the first modification of the embodiment of the present invention. The endoscope system according to the first modification will be described as having the same configuration as the endoscope system 1 described above. Hereinafter, description will be made assuming that each unit operates under the control of the control unit 37.

まず、処理装置3が内視鏡2から画像信号を取得すると、画像処理部31が、上述したように、右眼用画像および左眼用画像を生成する(ステップS201)。   First, when the processing device 3 acquires an image signal from the endoscope 2, the image processing unit 31 generates a right-eye image and a left-eye image as described above (step S201).

ステップS201に続くステップS202において、距離情報生成部33は、内視鏡2から、撮像素子244が撮像した内視鏡画像を表す画像データである画像信号を受信すると、画像信号に含まれる画像を用いて被写体までの距離の測定を行い、測定結果を距離情報として生成する。   In step S202 subsequent to step S201, when the distance information generation unit 33 receives an image signal, which is image data representing an endoscopic image captured by the image sensor 244, from the endoscope 2, the image included in the image signal is displayed. The distance to the subject is measured using this, and the measurement result is generated as distance information.

ステップS202に続くステップS203〜S206において、シフト量設定部34は、距離情報生成部33が生成した距離情報と、近点と判定されたフレームの連続数とに基づいて、左眼用画像および右眼用画像のシフト量を設定する。具体的に、シフト量設定部34は、まず、被写体までの距離と、記憶部36に記憶されている距離の閾値とに基づいて、被写体が近点に位置するか否かを判断する(ステップS203)。この際、シフト量設定部34は、被写体が近点に位置すると判断した場合(ステップS203:Yes)、ステップS204に移行する。これに対して、シフト量設定部34は、被写体が近点に位置しない、すなわち被写体が遠点に位置すると判断した場合(ステップS203:No)、ステップS206に移行する。   In steps S203 to S206 following step S202, the shift amount setting unit 34, based on the distance information generated by the distance information generation unit 33 and the number of consecutive frames determined to be near points, Sets the shift amount of the eye image. Specifically, the shift amount setting unit 34 first determines whether or not the subject is located at a near point based on the distance to the subject and the distance threshold value stored in the storage unit 36 (step). S203). At this time, when the shift amount setting unit 34 determines that the subject is located at the near point (step S203: Yes), the shift amount setting unit 34 proceeds to step S204. In contrast, if the shift amount setting unit 34 determines that the subject is not located at the near point, that is, the subject is located at the far point (step S203: No), the process proceeds to step S206.

ステップS204において、シフト量設定部34は、近点と判定されたフレームの連続数を計数し、この連続フレーム数が、閾値以上であるか否かを判断する。シフト量設定部34は、連続フレーム数が閾値より小さいと判断した場合(ステップS204:No)、ステップS206に移行する。これに対し、シフト量設定部34は、連続フレーム数が閾値以上であると判断した場合(ステップS204:Yes)、ステップS205に移行する。連続フレーム数の閾値は、視差を大きくするシフト量に切り替えるために設定されたフレーム数であり、予め設定されて視差画像生成情報記憶部361に記憶されている。   In step S204, the shift amount setting unit 34 counts the number of consecutive frames determined to be near points, and determines whether the number of consecutive frames is equal to or greater than a threshold value. If the shift amount setting unit 34 determines that the number of consecutive frames is smaller than the threshold (step S204: No), the shift amount setting unit 34 proceeds to step S206. In contrast, when the shift amount setting unit 34 determines that the number of consecutive frames is equal to or greater than the threshold (step S204: Yes), the shift amount setting unit 34 proceeds to step S205. The threshold for the number of continuous frames is the number of frames set for switching to a shift amount that increases the parallax, and is preset and stored in the parallax image generation information storage unit 361.

ステップS205において、シフト量設定部34は、距離に応じたシフト量の設定を行う。シフト量設定部34は、視差画像生成情報記憶部361を参照して、距離に対応するシフト量を取得し、この取得したシフト量を当該画像のシフト量に設定する。制御部37は、シフト量設定部34によるシフト量の設定が完了すると、ステップS207に移行する。   In step S205, the shift amount setting unit 34 sets a shift amount according to the distance. The shift amount setting unit 34 refers to the parallax image generation information storage unit 361, acquires the shift amount corresponding to the distance, and sets the acquired shift amount as the shift amount of the image. When the shift amount setting unit 34 completes the setting of the shift amount, the control unit 37 proceeds to step S207.

ステップS206において、シフト量設定部34は、予め設定されているシフト量の設定を行う。シフト量設定部34は、例えば、遠点用に設定されているシフト量、例えばゼロや、第1光学系243aおよび第2光学系243bの間の距離に応じて設定されている値をシフト量に設定する。制御部37は、シフト量設定部34によるシフト量の設定が完了すると、ステップS207に移行する。   In step S206, the shift amount setting unit 34 sets a preset shift amount. The shift amount setting unit 34 sets, for example, a shift amount set for the far point, for example, zero or a value set according to the distance between the first optical system 243a and the second optical system 243b. Set to. When the shift amount setting unit 34 completes the setting of the shift amount, the control unit 37 proceeds to step S207.

ステップS207において、視差画像生成部32は、左眼用画像および右眼用画像を含む画像信号に対して、ズーム処理、エンハンス処理、または圧縮処理等を行った後、シフト量設定部34によって設定されたシフト量に基づいて右眼用画像と左眼用画像とを相対的にシフトさせた視差画像を含む表示用の画像信号を生成する。   In step S207, the parallax image generation unit 32 performs zoom processing, enhancement processing, compression processing, or the like on the image signal including the image for the left eye and the image for the right eye, and then sets the shift amount setting unit 34. A display image signal including a parallax image obtained by relatively shifting the image for the right eye and the image for the left eye based on the shift amount thus generated is generated.

ステップS207に続くステップS208において、制御部37は、視差画像生成部32が生成した視差画像を含む画像情報と、該画像情報に関する文字情報とを重畳した合成画像である表示画像を、表示装置4に表示させる。   In step S208 following step S207, the control unit 37 displays a display image that is a composite image in which the image information including the parallax image generated by the parallax image generation unit 32 and the character information related to the image information are superimposed on the display device 4. To display.

ステップS208に続くステップS209において、制御部37は、新たな画像信号が内視鏡2から入力されたか否かを判断する。制御部37は、例えば、新たな画像信号が内視鏡2から入力されたと判断すると(ステップS209:Yes)、ステップS201に戻って上述した処理を繰り返す。これに対し、新たな画像信号は入力されていないと判断すると(ステップS209:No)、上述した画像処理を終了する。   In step S209 following step S208, the control unit 37 determines whether or not a new image signal is input from the endoscope 2. For example, when the control unit 37 determines that a new image signal is input from the endoscope 2 (step S209: Yes), the control unit 37 returns to step S201 and repeats the above-described processing. On the other hand, if it is determined that no new image signal has been input (step S209: No), the above-described image processing ends.

上述した本変形例1によれば、上述した実施の形態と同様に、左眼用画像および右眼用画像から算出される距離情報に基づいて、近点である場合に、近点の凹凸を強調した奥行き感を表現可能なシフト量を設定し、このシフト量に基づいて視差画像を生成するようにしたので、表示装置4に表示させた際の画像に奥行き感をもたせることができる。上述した実施の形態では、近点と判断される都度、視差が大きい視差画像が生成されるが、遠点および近点の判断がフレームごとになされると、連続して表示される画像の視差がフレームごとに変わり、観察し難くなるおそれがある。本変形例1では、近点の連続フレーム数が閾値以上となった場合に、視差を大きくした視差画像を生成するようにしたので、フレームごとに連続して視差が大きく変わるということを抑制することができる。   According to the first modification described above, similar to the above-described embodiment, when the near point is based on the distance information calculated from the left-eye image and the right-eye image, the unevenness of the near point is reduced. Since the shift amount capable of expressing the enhanced sense of depth is set, and the parallax image is generated based on this shift amount, the sense of depth can be given to the image displayed on the display device 4. In the embodiment described above, a parallax image with a large parallax is generated every time it is determined as a near point. However, when the far point and the near point are determined for each frame, the parallax of images displayed continuously May change from frame to frame, making observation difficult. In the first modification, a parallax image with a large parallax is generated when the number of consecutive frames at the near point is equal to or greater than a threshold value, so that it is possible to suppress a large change in parallax continuously for each frame. be able to.

(実施の形態の変形例2)
本変形例2では、シフト量設定部34が、遠点と判定した場合に、シフト量を段階的に減算することによって、判定結果が近点から遠点に移行した際のシフト量の変化を小さくする。図6は、本発明の実施の形態の変形例2にかかる処理装置が行う画像処理を示すフローチャートである。本変形例2にかかる内視鏡システムは、上述した内視鏡システム1と同様の構成を有するものとして説明する。また、視差画像生成情報記憶部361には、遠点用の遠点シフト量と、近点用の近点シフト量(>遠点シフト量)と、遠点のシフト量を設定する際の減算量とを記憶しているものとして説明する。なお、減算量は、近点シフト量と遠点シフト量との差よりも小さい。以下、制御部37の制御のもと、各部が動作するものとして説明する。
(Modification 2 of embodiment)
In the second modification, when the shift amount setting unit 34 determines that the point is a far point, the shift amount is changed in a stepwise manner to change the shift amount when the determination result shifts from the near point to the far point. Make it smaller. FIG. 6 is a flowchart illustrating image processing performed by the processing device according to the second modification of the embodiment of the present invention. The endoscope system according to Modification 2 will be described as having the same configuration as the endoscope system 1 described above. Also, the parallax image generation information storage unit 361 performs subtraction when setting the far point shift amount for the far point, the near point shift amount for the near point (> far point shift amount), and the far point shift amount. Description will be made assuming that the quantity is stored. The subtraction amount is smaller than the difference between the near point shift amount and the far point shift amount. Hereinafter, description will be made assuming that each unit operates under the control of the control unit 37.

まず、処理装置3が内視鏡2から画像信号を取得すると、画像処理部31が、上述したように、右眼用画像および左眼用画像を生成する(ステップS301)。   First, when the processing device 3 acquires an image signal from the endoscope 2, the image processing unit 31 generates a right-eye image and a left-eye image as described above (step S301).

ステップS301に続くステップS302において、距離情報生成部33は、内視鏡2から、撮像素子244が撮像した内視鏡画像を表す画像データである画像信号を受信すると、画像信号に含まれる画像を用いて被写体までの距離の測定を行い、測定結果を距離情報として生成する。   In step S302 following step S301, when the distance information generation unit 33 receives an image signal, which is image data representing an endoscopic image captured by the imaging element 244, from the endoscope 2, the image included in the image signal is displayed. The distance to the subject is measured using this, and the measurement result is generated as distance information.

ステップS302に続くステップS303〜S306において、シフト量設定部34は、距離情報生成部33が生成した距離情報と、前回設定したシフト量(以下、設定シフト量ともいう)とに基づいて、左眼用画像および右眼用画像のシフト量を設定する。具体的に、シフト量設定部34は、まず、被写体までの距離と、記憶部36に記憶されている距離の閾値とに基づいて、被写体が近点に位置するか否かを判断する(ステップS303)。この際、シフト量設定部34は、被写体が近点に位置しない、すなわち被写体が遠点に位置すると判断した場合(ステップS303:No)、ステップS305に移行する。これに対して、シフト量設定部34は、被写体が近点に位置すると判断した場合(ステップS303:Yes)、ステップS304に移行する。   In steps S303 to S306 following step S302, the shift amount setting unit 34 determines the left eye based on the distance information generated by the distance information generation unit 33 and the previously set shift amount (hereinafter also referred to as a set shift amount). The shift amount of the image for use and the image for the right eye is set. Specifically, the shift amount setting unit 34 first determines whether or not the subject is located at a near point based on the distance to the subject and the distance threshold value stored in the storage unit 36 (step). S303). At this time, if the shift amount setting unit 34 determines that the subject is not located at the near point, that is, the subject is located at the far point (step S303: No), the process proceeds to step S305. In contrast, when the shift amount setting unit 34 determines that the subject is located at the near point (step S303: Yes), the shift amount setting unit 34 proceeds to step S304.

ステップS304において、シフト量設定部34は、シフト量を近点シフト量に設定する。   In step S304, the shift amount setting unit 34 sets the shift amount to the near point shift amount.

ステップS305において、シフト量設定部34は、現在設定されているシフト量、すなわち、設定シフト量が、遠点シフト量と同等であるか否かを判断する。シフト量設定部34は、設定シフト量が遠点シフト量と同等であると判断した場合(ステップS305:Yes)、シフト量を前回設定のままとし、ステップS307に移行する。これに対し、シフト量設定部34は、設定シフト量が遠点シフト量と同等ではない、すなわち、設定シフト量が遠点シフト量よりも大きいと判断した場合(ステップS305:No)、ステップS306に移行する。   In step S305, the shift amount setting unit 34 determines whether or not the currently set shift amount, that is, the set shift amount is equal to the far point shift amount. If the shift amount setting unit 34 determines that the set shift amount is equal to the far point shift amount (step S305: Yes), the shift amount is left as it was previously set, and the process proceeds to step S307. In contrast, when the shift amount setting unit 34 determines that the set shift amount is not equal to the far point shift amount, that is, the set shift amount is larger than the far point shift amount (step S305: No), step S306 is performed. Migrate to

ステップS306において、シフト量設定部34は、設定シフト量から、視差画像生成情報記憶部361に記憶されている減算量を減算し、減算後のシフト量を、当該フレームのシフト量に設定する。なお、シフト量設定部34は、減算後のシフト量が設定されている遠点シフト量よりも小さくなる場合は、遠点シフト量に置き換えて、これをシフト量とする。制御部37は、シフト量設定部34によるシフト量の設定が完了すると、ステップS307に移行する。   In step S306, the shift amount setting unit 34 subtracts the subtraction amount stored in the parallax image generation information storage unit 361 from the set shift amount, and sets the shift amount after the subtraction to the shift amount of the frame. If the shift amount after subtraction is smaller than the set far point shift amount, the shift amount setting unit 34 replaces the far point shift amount with the far point shift amount and sets this as the shift amount. When the setting of the shift amount by the shift amount setting unit 34 is completed, the control unit 37 proceeds to step S307.

ステップS307において、視差画像生成部32は、左眼用画像および右眼用画像を含む画像信号に対して、ズーム処理、エンハンス処理、または圧縮処理等を行った後、シフト量設定部34によって設定されたシフト量に基づいて右眼用画像と左眼用画像とを相対的にシフトさせた視差画像を含む表示用の画像信号を生成する。   In step S307, the parallax image generation unit 32 performs zoom processing, enhancement processing, compression processing, or the like on the image signal including the left-eye image and the right-eye image, and then sets the shift amount setting unit 34. A display image signal including a parallax image obtained by relatively shifting the image for the right eye and the image for the left eye based on the shift amount thus generated is generated.

ステップS307に続くステップS308において、制御部37は、視差画像生成部32が生成した視差画像を含む画像情報と、該画像情報に関する文字情報とを重畳した合成画像である表示画像を、表示装置4に表示させる。   In step S308 following step S307, the control unit 37 displays a display image that is a composite image in which image information including the parallax image generated by the parallax image generation unit 32 and character information related to the image information are superimposed on the display device 4. To display.

ステップS308に続くステップS309において、制御部37は、新たな画像信号が内視鏡2から入力されたか否かを判断する。制御部37は、例えば、新たな画像信号が内視鏡2から入力されたと判断すると(ステップS309:Yes)、ステップS301に戻って上述した処理を繰り返す。これに対し、新たな画像信号は入力されていないと判断すると(ステップS309:No)、上述した画像処理を終了する。   In step S309 following step S308, the control unit 37 determines whether or not a new image signal is input from the endoscope 2. For example, when the control unit 37 determines that a new image signal is input from the endoscope 2 (step S309: Yes), the control unit 37 returns to step S301 and repeats the above-described processing. On the other hand, if it is determined that a new image signal has not been input (step S309: No), the above-described image processing ends.

上述した本変形例2によれば、シフト量設定部34が、遠点と判定した場合に、シフト量を段階的に減算するようにしたので、判定結果が近点から遠点に移行した際のシフト量の変化が小さくなり、視差画像の急な奥行き感の変化を抑制することができる。   According to the second modification described above, when the shift amount setting unit 34 determines that the point is the far point, the shift amount is subtracted stepwise, so that the determination result shifts from the near point to the far point. The change in the shift amount is reduced, and a sudden change in the depth of the parallax image can be suppressed.

なお、上述した実施の形態および変形例1,2では、距離情報から、被写体が近点または遠点に位置するかを判断して、シフト量を切り替えるものとして説明したが、例えば、操作部22のスイッチ223の入力をトリガとして、シフト量を切り替えるようにしてもよい。これにより、ユーザの所望のタイミングで、シフト量を切り替えた視差画像を表示させることができる。   In the above-described embodiment and Modifications 1 and 2, it has been described that the shift amount is switched by determining whether the subject is located at the near point or the far point from the distance information. The shift amount may be switched using the input of the switch 223 as a trigger. As a result, the parallax image with the shift amount switched can be displayed at the timing desired by the user.

また、上述した実施の形態および変形例1,2では、距離に応じたシフト量を設定するものとして説明したが、例えば、近点のシフト量を一つ設定しておき、近点の判定回数に応じてシフト量を順次大きくしていくなど、多段階でシフト量を変化させるようにしてもよい。また、被写体が遠点に位置すると判断された場合、予め設定されたシフト量には戻さずに、段階的にシフト量を小さくするようにしてもよい。上述したようにシフト量を変化させることにより、視差画像の変化を小さくし、ユーザが感じる視覚的な負担を抑制することができる。   In the above-described embodiment and Modifications 1 and 2, the shift amount according to the distance is set. However, for example, one near-point shift amount is set and the number of near-point determinations is set. The shift amount may be changed in multiple steps, such as sequentially increasing the shift amount in accordance with the above. In addition, when it is determined that the subject is located at a far point, the shift amount may be decreased stepwise without returning to the preset shift amount. By changing the shift amount as described above, the change in the parallax image can be reduced, and the visual burden felt by the user can be suppressed.

(実施の形態の変形例3)
本変形例3では、近点の判定は行わずに、生成された距離情報に基づいてシフト量の設定を行う。図7は、本発明の実施の形態の変形例3にかかる処理装置が行う画像処理を示すフローチャートである。本変形例3にかかる内視鏡システムは、上述した内視鏡システム1と同様の構成を有するものとして説明する。なお、本変形例3にかかる視差画像生成情報記憶部361は、距離の閾値に代えて、距離とシフト量との関係を表す関数またはグラフを記憶している。シフト量は、近点であるほどシフト量が大きくなるように距離と対応付けられている。以下、制御部37の制御のもと、各部が動作するものとして説明する。
(Modification 3 of embodiment)
In the third modification, the shift amount is set based on the generated distance information without determining the near point. FIG. 7 is a flowchart showing image processing performed by the processing device according to the third modification of the embodiment of the present invention. The endoscope system according to Modification 3 will be described as having the same configuration as the endoscope system 1 described above. Note that the parallax image generation information storage unit 361 according to the third modification stores a function or graph representing the relationship between the distance and the shift amount, instead of the distance threshold. The shift amount is associated with the distance so that the closer the point is, the larger the shift amount is. Hereinafter, description will be made assuming that each unit operates under the control of the control unit 37.

まず、処理装置3が内視鏡2から画像信号を取得すると、画像処理部31が、上述したように、右眼用画像および左眼用画像を生成する(ステップS401)。   First, when the processing device 3 acquires an image signal from the endoscope 2, the image processing unit 31 generates a right-eye image and a left-eye image as described above (step S401).

ステップS401に続くステップS402において、距離情報生成部33は、内視鏡2から、撮像素子244が撮像した内視鏡画像を表す画像データである画像信号を受信すると、画像信号に含まれる画像を用いて被写体までの距離の測定を行い、測定結果を距離情報として生成する。   In step S402 following step S401, when the distance information generation unit 33 receives an image signal, which is image data representing an endoscopic image captured by the imaging element 244, from the endoscope 2, the image included in the image signal is displayed. The distance to the subject is measured using this, and the measurement result is generated as distance information.

ステップS402に続くステップS403において、シフト量設定部34は、距離情報生成部33が生成した距離情報と、視差画像生成情報記憶部361に記憶されている関数またはグラフとに基づいて、左眼用画像および右眼用画像のシフト量を設定する。具体的に、シフト量設定部34は、被写体までの距離と、例えば距離とシフト量との関係を表す関数とに基づいて、距離に応じたシフト量の設定を行う。制御部37は、シフト量設定部34によるシフト量の設定が完了すると、ステップS404に移行する。   In step S403 following step S402, the shift amount setting unit 34 uses the distance information generated by the distance information generation unit 33 and the function or graph stored in the parallax image generation information storage unit 361 for the left eye. Sets the shift amount of the image and the right-eye image. Specifically, the shift amount setting unit 34 sets the shift amount according to the distance based on the distance to the subject and a function representing the relationship between the distance and the shift amount, for example. When the shift amount setting unit 34 completes the setting of the shift amount, the control unit 37 proceeds to step S404.

ステップS404において、視差画像生成部32は、左眼用画像および右眼用画像を含む画像信号に対して、ズーム処理、エンハンス処理、または圧縮処理等を行った後、シフト量設定部34によって設定されたシフト量に基づいて右眼用画像と左眼用画像とを相対的にシフトさせた視差画像を含む表示用の画像信号を生成する。   In step S404, the parallax image generation unit 32 performs zoom processing, enhancement processing, compression processing, or the like on the image signal including the image for the left eye and the image for the right eye, and then sets the shift amount setting unit 34. A display image signal including a parallax image obtained by relatively shifting the image for the right eye and the image for the left eye based on the shift amount thus generated is generated.

ステップS404に続くステップS405において、制御部37は、視差画像生成部32が生成した視差画像を含む画像情報と、該画像情報に関する文字情報とを重畳した合成画像である表示画像を、表示装置4に表示させる。   In step S405 following step S404, the control unit 37 displays a display image that is a composite image in which image information including the parallax image generated by the parallax image generation unit 32 and character information related to the image information are superimposed on the display device 4. To display.

ステップS405に続くステップS406において、制御部37は、新たな画像信号が内視鏡2から入力されたか否かを判断する。制御部37は、例えば、新たな画像信号が内視鏡2から入力されたと判断すると(ステップS406:Yes)、ステップS201に戻って上述した処理を繰り返す。これに対し、新たな画像信号は入力されていないと判断すると(ステップS406:No)、上述した画像処理を終了する。   In step S406 following step S405, the control unit 37 determines whether a new image signal is input from the endoscope 2 or not. For example, when the control unit 37 determines that a new image signal is input from the endoscope 2 (step S406: Yes), the control unit 37 returns to step S201 and repeats the above-described processing. On the other hand, if it is determined that a new image signal has not been input (step S406: No), the above-described image processing ends.

上述した本変形例3によれば、左眼用画像および右眼用画像から算出される距離情報に基づいて、凹凸を強調した奥行き感を表現可能なシフト量を設定し、このシフト量に基づいて視差画像を生成するようにしたので、表示装置4に表示させた際の画像に奥行き感をもたせることができる。上述した実施の形態および変形例1,2では、被写体の位置が近点であるか否かを判定していたが、本変形例3では近点であるか否かの判定を行わずにシフト量の設定を行うため、実施の形態および変形例1,2と比して、シフト量設定処理の負荷を軽減することができる。   According to the third modification described above, based on the distance information calculated from the left-eye image and the right-eye image, a shift amount that can express a sense of depth with embossed unevenness is set, and based on this shift amount Since the parallax image is generated, the image displayed on the display device 4 can have a sense of depth. In the embodiment and the first and second modifications described above, it is determined whether or not the position of the subject is a near point. In the third modification, the shift is performed without determining whether or not the subject is a near point. Since the amount is set, the load of the shift amount setting process can be reduced as compared with the embodiment and the first and second modifications.

なお、上述した実施の形態および変形例1〜3では、処理装置3が、RGBの各色成分が付与された画像を含む処理信号を生成するものとして説明したが、YCbCr色空間に基づいて輝度(Y)成分および色差成分を含むYCbCr色空間を有する処理信号を生成するものであってもよいし、色相(Hue)、彩度(Saturation Chroma)、明度(Value Lightness Brightness)の三つの成分からなるHSV色空間や、三次元空間を用いるL***色空間等を用いて、色と輝度とに分けた成分を有する処理信号を生成するものであってもよい。 In the above-described embodiment and Modifications 1 to 3, the processing device 3 has been described as generating a processing signal including an image to which each color component of RGB is added. However, the luminance (based on the YCbCr color space) It may be one that generates a processing signal having a YCbCr color space including a Y component and a color difference component, and is composed of three components: Hue, Saturation Chroma, and Value Lightness Brightness. A processing signal having components divided into colors and luminance may be generated using an HSV color space, an L * a * b * color space using a three-dimensional space, or the like.

また、上述した実施の形態では、光源部3aからRGBの各色成分を含む白色の照明光が出射され、受光部が照明光による反射光を受光する同時式の照明/撮像方式であるものとして説明したが、光源部3aが、各色成分の光を個別に順次出射して、受光部が、各色成分の光をそれぞれ受光する面順次式の照明/撮像方式であってもよい。   Further, in the above-described embodiment, it is assumed that white illumination light including each color component of RGB is emitted from the light source unit 3a and the light receiving unit is a simultaneous illumination / imaging method in which reflected light from the illumination light is received. However, the light source unit 3a may sequentially emit light of each color component individually, and the light receiving unit may use a surface sequential illumination / imaging method in which the light of each color component is received.

また、上述した実施の形態では、光源部3aが内視鏡2とは別体で構成されているものとして説明したが、例えば、内視鏡2の先端に半導体光源を設ける等、光源装置を内視鏡2に設けた構成であってもよい。さらに、内視鏡2に処理装置3の機能を付与してもよい。   In the above-described embodiment, the light source unit 3a has been described as being configured separately from the endoscope 2. However, for example, a light source device such as a semiconductor light source provided at the distal end of the endoscope 2 is used. The structure provided in the endoscope 2 may be sufficient. Furthermore, the function of the processing device 3 may be given to the endoscope 2.

また、上述した実施の形態では、光源部3aが、処理装置3とは一体であるものとして説明したが、光源部3aおよび処理装置3が別体であって、例えば処理装置3の外部に照明部301および照明制御部302が設けられているものであってもよい。また、光源301aが先端部24の先端に設けられているものであってもよい。   Moreover, although the light source part 3a was demonstrated as what was integrated with the processing apparatus 3 in embodiment mentioned above, the light source part 3a and the processing apparatus 3 are separate bodies, for example, it illuminates the exterior of the processing apparatus 3. The part 301 and the illumination control part 302 may be provided. Further, the light source 301 a may be provided at the tip of the tip portion 24.

また、上述した実施の形態では、本発明にかかる内視鏡システムは、観察対象が被検体内の生体組織等である軟性の内視鏡2を用いた内視鏡システム1であるものとして説明したが、硬性の内視鏡や、材料の特性を観測する工業用の内視鏡、カプセル型の内視鏡、ファイバースコープ、光学視管等の光学内視鏡の接眼部にカメラヘッドを接続したものを用いた内視鏡システムであっても適用できる。   In the above-described embodiment, the endoscope system according to the present invention is described as the endoscope system 1 using the flexible endoscope 2 whose observation target is a living tissue or the like in the subject. However, a camera head is attached to the eyepiece of an optical endoscope such as a rigid endoscope, an industrial endoscope that observes the characteristics of materials, a capsule endoscope, a fiberscope, or an optical endoscope. Even an endoscope system using a connected one can be applied.

以上のように、本発明にかかる画像処理装置は、近点観察において詳細な観察を行うことが可能な視差画像を取得するのに有用である。   As described above, the image processing apparatus according to the present invention is useful for acquiring a parallax image capable of performing detailed observation in near-point observation.

1 内視鏡システム
2 内視鏡
3 処理装置
3a 光源部
4 表示装置
21 挿入部
22 操作部
23 ユニバーサルコード
24 先端部
25 湾曲部
26 可撓管部
31 画像処理部
32 視差画像生成部
33 距離情報生成部
34 シフト量設定部
35 入力部
36 記憶部
37 制御部
301 照明部
302 照明制御部
361 視差画像生成情報記憶部
DESCRIPTION OF SYMBOLS 1 Endoscope system 2 Endoscope 3 Processing apparatus 3a Light source part 4 Display apparatus 21 Insertion part 22 Operation part 23 Universal code 24 Tip part 25 Bending part 26 Flexible tube part 31 Image processing part 32 Parallax image generation part 33 Distance information Generation unit 34 Shift amount setting unit 35 Input unit 36 Storage unit 37 Control unit 301 Illumination unit 302 Illumination control unit 361 Parallax image generation information storage unit

Claims (5)

同一の被写体を異なる方向から撮像した第1および第2画像をもとに視差画像を生成する画像処理装置であって、
前記第1および第2画像から求まる距離であって、撮像面から被写体までの距離を示す距離情報を生成する距離情報生成部と、
前記距離情報をもとに、前記第1画像と前記第2画像との視差方向のシフト量を設定するシフト量設定部と、
前記第1および第2画像と、前記シフト量設定部が設定したシフト量とをもとに、前記視差画像を生成する視差画像生成部と、
を備えることを特徴とする画像処理装置。
An image processing device that generates a parallax image based on first and second images obtained by imaging the same subject from different directions,
A distance information generating unit that generates distance information that is a distance obtained from the first and second images and that indicates a distance from the imaging surface to the subject;
A shift amount setting unit that sets a shift amount in a parallax direction between the first image and the second image based on the distance information;
A parallax image generating unit that generates the parallax image based on the first and second images and the shift amount set by the shift amount setting unit;
An image processing apparatus comprising:
前記シフト量設定部は、前記距離情報をもとに、前記距離が予め設定されている距離よりも小さいか否かを判定し、判定した結果に基づいて前記第1画像と前記第2画像との視差方向のシフト量を設定する
ことを特徴とする請求項1に記載の画像処理装置。
The shift amount setting unit determines whether the distance is smaller than a preset distance based on the distance information, and based on the determination result, the first image and the second image The image processing apparatus according to claim 1, wherein a shift amount in the parallax direction is set.
前記距離情報生成部は、前記距離が予め設定されている距離よりも小さい場合、前記距離が予め設定されている距離以上の場合と比して前記シフト量を大きい値に設定する
ことを特徴とする請求項2に記載の画像処理装置。
When the distance is smaller than a preset distance, the distance information generation unit sets the shift amount to a larger value than when the distance is equal to or greater than a preset distance. The image processing apparatus according to claim 2.
前記距離情報生成部は、入力される前記第1および第2画像に対して前記距離情報を順次生成し、
前記シフト量設定部は、前記距離情報生成部が生成した距離情報に基づいて前記予め設定されている距離よりも小さいか否かを判定し、前記距離が予め設定されている距離よりも小さいと判断したフレームの連続数が、閾値以上である場合、前記距離情報に基づいて前記シフト量を設定し、前記距離が予め設定されている距離よりも小さいと判断したフレームの連続数が、前記閾値より小さい場合、予め設定されているシフト量に設定する
ことを特徴とする請求項2に記載の画像処理装置。
The distance information generation unit sequentially generates the distance information for the input first and second images,
The shift amount setting unit determines whether or not the distance is smaller than the preset distance based on the distance information generated by the distance information generation unit, and if the distance is smaller than the preset distance When the determined number of consecutive frames is equal to or greater than a threshold, the shift amount is set based on the distance information, and the number of consecutive frames determined that the distance is smaller than a preset distance is the threshold. The image processing apparatus according to claim 2, wherein if it is smaller, the shift amount is set to a preset shift amount.
前記距離が前記予め設定されている距離より小さい場合に設定される近点シフト量と、前記距離が前記予め設定されている距離以上離れている場合に設定される遠点シフト量とが予め設定されており、前記近点シフト量は、前記遠点シフト量と比して大きく、
前記シフト量設定部は、前記距離が予め設定されている距離以上であると判断した場合であって、設定されている設定シフト量が前記遠点シフト量よりも大きい場合、該設定シフト量から、前記近点シフト量と前記遠点シフト量との差よりも小さい減算量を減算して得られた値を前記シフト量として設定する
ことを特徴とする請求項2に記載の画像処理装置。
A near point shift amount set when the distance is smaller than the preset distance and a far point shift amount set when the distance is more than the preset distance are preset. The near point shift amount is larger than the far point shift amount,
The shift amount setting unit determines that the distance is greater than or equal to a preset distance, and if the set shift amount is larger than the far point shift amount, the shift amount setting unit The image processing apparatus according to claim 2, wherein a value obtained by subtracting a subtraction amount smaller than a difference between the near point shift amount and the far point shift amount is set as the shift amount.
JP2016138812A 2016-07-13 2016-07-13 Image processing device Ceased JP2018007840A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016138812A JP2018007840A (en) 2016-07-13 2016-07-13 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016138812A JP2018007840A (en) 2016-07-13 2016-07-13 Image processing device

Publications (1)

Publication Number Publication Date
JP2018007840A true JP2018007840A (en) 2018-01-18

Family

ID=60994069

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016138812A Ceased JP2018007840A (en) 2016-07-13 2016-07-13 Image processing device

Country Status (1)

Country Link
JP (1) JP2018007840A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020070883A1 (en) * 2018-10-05 2020-04-09 オリンパス株式会社 Endoscopic system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11338457A (en) * 1998-05-26 1999-12-10 Nippon Telegr & Teleph Corp <Ntt> Binocular parallax type three-dimensional display method and storage medium
WO2013161485A1 (en) * 2012-04-23 2013-10-31 Hoya株式会社 Electronic endoscope, image processing device, electronic endoscope system, and stereoscopic image generation method
JP2013244104A (en) * 2012-05-24 2013-12-09 Olympus Corp Stereoscopic endoscope device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11338457A (en) * 1998-05-26 1999-12-10 Nippon Telegr & Teleph Corp <Ntt> Binocular parallax type three-dimensional display method and storage medium
WO2013161485A1 (en) * 2012-04-23 2013-10-31 Hoya株式会社 Electronic endoscope, image processing device, electronic endoscope system, and stereoscopic image generation method
JP2013223666A (en) * 2012-04-23 2013-10-31 Hoya Corp Electronic endoscope, image processor, electronic endoscope system, and image generation method for stereoscopic vision
JP2013244104A (en) * 2012-05-24 2013-12-09 Olympus Corp Stereoscopic endoscope device
CN104321005A (en) * 2012-05-24 2015-01-28 奥林巴斯株式会社 Stereoscopic endoscope device
US20150073209A1 (en) * 2012-05-24 2015-03-12 Olympus Corporation Stereoscopic endoscope device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020070883A1 (en) * 2018-10-05 2020-04-09 オリンパス株式会社 Endoscopic system

Similar Documents

Publication Publication Date Title
JP6329715B1 (en) Endoscope system and endoscope
JP6471173B2 (en) Image processing apparatus, operation method of endoscope apparatus, image processing program, and endoscope apparatus
JP6378846B2 (en) Image processing device
WO2019235492A1 (en) Endoscope processor, display setting method, and display setting program
WO2016084257A1 (en) Endoscope apparatus
US10574934B2 (en) Ultrasound observation device, operation method of image signal processing apparatus, image signal processing method, and computer-readable recording medium
JPWO2016117036A1 (en) Image processing apparatus, operation method of image processing apparatus, operation program for image processing apparatus, and endoscope apparatus
US20200359875A1 (en) Image processing apparatus, image processing method, and computer-readable recording medium
JPWO2020178962A1 (en) Endoscope system, image processing equipment, total processing time detection method and processing equipment
WO2016088628A1 (en) Image evaluation device, endoscope system, method for operating image evaluation device, and program for operating image evaluation device
US10462440B2 (en) Image processing apparatus
JP6368886B1 (en) Endoscope system
JP6346501B2 (en) Endoscope device
JP2018007840A (en) Image processing device
JP6503522B1 (en) Image processing apparatus, image processing system and image processing method
JP2017123997A (en) Imaging system and processing device
JP6801990B2 (en) Image processing system and image processing equipment
WO2018079387A1 (en) Image processing device and image processing system
JP2017221276A (en) Image processing device
WO2019130834A1 (en) Image processing device and image processing method
WO2017022323A1 (en) Image signal processing method, image signal processing device and image signal processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190411

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200306

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200414

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200609

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200908

A045 Written measure of dismissal of application [lapsed due to lack of payment]

Free format text: JAPANESE INTERMEDIATE CODE: A045

Effective date: 20210119