1. Field of the Invention
The present invention relates to a stereo endoscope apparatus and an image processing method in a stereo endoscope apparatus.
2. Description of the Related Art
A stereo endoscope apparatus includes a pair of left and right optical systems and stereo cameras including image pickup elements at a distal end portion of an endoscope to be inserted in a subject to be observed. The stereo endoscope apparatus picks up left and right images having parallax, which are equivalent to images captured by human eyes, with the pair of left and right optical systems and the stereo cameras, and uses those left and right images to display the subject to be observed in three dimensions on a three-dimensional display apparatus.
In such stereo endoscope apparatus, for an object that is brought into close proximity with the stereo cameras, such as the treatment instrument, an angle of convergence determined by the stereo cameras becomes too large, which makes stereoscopy difficult.
To address this problem, Japanese Patent Application Laid-Open No. 2004-65804 discloses a method involving forming a two-dimensional image of only a predetermined area and a method involving generating and superimposing a mask image.
However, the related art disclosed in Japanese Patent Application Laid-Open No. 2004-65804 employs the method involving determining a difficult area for the stereoscopy in advance, and displaying only a monocular image for the area or superimposing the mask image on the area. Therefore, an area in which the two-dimensional image is mixed in the three-dimensional image always exists, which has caused a feeling of interference in the stereoscopy.
The present invention enables stereoscopy of most areas and is capable of improving operability of an endoscope by replacing an area (image area) of an object that is brought into proximity with the endoscope not by a two-dimensional image but by a three-dimensional image.
A stereo endoscope apparatus according to one embodiment of the present invention includes: a treatment instrument that is operable; multiple imaging units for imaging a subject, the multiple imaging units acquiring an image in which the treatment instrument does not appear and an image in which the treatment instrument appears in response to an operation of the treatment instrument; a detecting section for detecting an area in which the treatment instrument appears from the image in which the treatment instrument appears; an area determining section for determining a replacement area in which an image is to be replaced, the replacement area being at least a part of the area in which the treatment instrument appears; and an image processing section for replacing the replacement area by the image in which the treatment instrument does not appear.
Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
Exemplary embodiments of the present invention are described in detail with reference to the accompanying drawings. It should be noted, however, that the scope of the invention is not limited to the illustrated examples.
In this embodiment, the processing is started in Step 201, and then the processing proceeds to acquisition of a first image of Step 202.
In the acquisition of the first image of Step 202, in a state in which a treatment instrument 14 is not projected from a distal end of the endoscope, imaging is performed with multiple imaging systems. Images obtained as a result are held in the memory 11.
After the acquisition of the first image of Step 202 is performed, the processing proceeds to projection of the treatment instrument of Step 203. In the projection of the treatment instrument of Step 203, the treatment instrument 14 is slowly projected from the distal end of the endoscope. At this time, when the treatment instrument 14 is projected abruptly, the treatment instrument is liable to be brought into contact with an organ.
After the projection of the treatment instrument of Step 203, the processing proceeds to acquisition of a second image of Step 204. In the acquisition of the second image of Step 204, in a state in which the treatment instrument 14 is projected from the distal end of the endoscope in response to an operation of the treatment instrument 14, the imaging is performed with the multiple imaging systems. The images obtained as a result are held in the memory 11.
After the acquisition of the second image is performed in Step 204, the processing proceeds to detection of the treatment instrument of Step 205. In the detection of the treatment instrument of Step 205, an area in which the treatment instrument 14 appears is identified in each of the images acquired in the acquisition of the second image. The identification of the area is performed by analyzing the images obtained in the acquisition of the second image of Step 204 and detecting the area in which the treatment instrument 14 appears. Alternatively, because a trajectory of the treatment instrument 14 is uniquely determined in terms of a structure of the endoscope, a position of the treatment instrument 14 may also be detected by generating a template of the image of the treatment instrument 14 at every position in advance and performing template matching on the trajectory.
After detecting the area in which the treatment instrument 14 appears in the detection of the treatment instrument of Step 205, the processing proceeds to determination of the replacement areas of Step 206. In the determination of the replacement areas of Step 206, it is determined which areas in the area in which the treatment instrument 14 appears are to be replaced. In this embodiment, in order to allow a user to recognize the position of the treatment instrument 14 in performing the treatment, while leaving areas with which a distal end portion of the treatment instrument 14 may be recognized, areas other than the distal end portion of the treatment instrument 14, that is, hatched area in
After the determination of the replacement areas of Step 206 is performed, the processing proceeds to replacement of the images of Step 207. In the replacement of the images of Step 207, the replacement areas determined in Step 206 are replaced by images of corresponding areas of the images obtained in the acquisition of the first image of Step 202, where the corresponding areas correspond to the replacement area. In this manner, the double vision due to the proximity of the treatment instrument 14 does not occur, and the stereoscopy may be performed in most areas of the screen, which enables observation with the endoscope with higher operability.
After the replacement of the images of Step 207, the processing proceeds to Step 208, in which the image processing ends.
Next, an embodiment of an endoscope system to which the present invention is applied is described with reference to
As described above, in this embodiment, areas in which the treatment instrument appears in the images acquired by the respective imaging units are detected, and a part or all of the areas are replaced by images at the same positions in the state in which the treatment instrument does not appear. In this manner, in the observation with the stereo endoscope, even when there is an object that is brought into proximity with the endoscope, the observation with the three-dimensional image without the double vision due to the proximity is enabled in the most areas of the screen, and the stereo endoscope with higher operability may be provided.
A second embodiment of the present invention addresses a case where the endoscope is moved when the treatment instrument 14 is projected. In this case, a problem occurs in which, when the corresponding areas of the images acquired in the acquisition of the first image of Step 202 are directly used in the replacement of the images of Step 207 as in the first embodiment, misalignment occurs. To address this problem, in this embodiment, in the replacement of the images of Step 207, images of the corresponding areas, which correspond to the replacement areas determined in the determination of the replacement areas of Step 206, are determined by matching between the images acquired in the acquisition of the first image of Step 202 and the images acquired in the acquisition of the second image of Step 204. Thereafter, the replacement areas are replaced by using the images of the corresponding areas in the images acquired in the acquisition of the first image of Step 202, which are determined by the matching.
Next, a specific method of the matching is described in detail.
In the equation, (N1,N2) is a size of the template, T(i,j) is the template, and I(i,j) is the image to be searched. In reality, the SAD is computed while moving the template with respect to the image (
The template is not necessarily limited to that used in this embodiment, and the template may be the entire image, or a rectangular area, a circular area, or other polygonal area as a part cut out from the image. Further, for the region-based matching, methods such as a sum of squared differences (SSD), normalized cross correlation (NCC), and phase-only correlation (POC) may be used. Further, as in the first embodiment, the images acquired by the acquisition of the first image of Step 202 are not limited to the image immediately preceding the projection of the treatment instrument of Step 203. For example, when an image having a positional relationship that is closer to the image acquired in Step 204 than the immediately preceding image is available, the image may be used.
In this embodiment, even when the endoscope is displaced between the state in which the endoscope is projected and the state in which the endoscope is not projected, the region-based matching processing is performed to determine an amount of displacement so that the image for replacing the area of the treatment instrument 14 may be determined appropriately to perform the replacement of the image. In this manner, in the observation with the stereo endoscope, even when there is an object that is brought into proximity with the endoscope, the observation with the three-dimensional image without the double vision due to the proximity is enabled in most of the screen, and the stereo endoscope with higher operability may be provided.
In a third embodiment of the present invention, in the detection of the treatment instrument of Step 205, instead of extracting the treatment instrument 14 from the image acquired in the acquisition of the second image of Step 204, a feed of the treatment instrument is detected by a sensor 15 to detect how much the treatment instrument 14 is projected from the distal end of the endoscope.
Now, the third embodiment is described in detail with reference to
In the first embodiment, as described above, in the detection of the treatment instrument of Step 205, the detecting section 16 analyzes the image acquired in the acquisition of the second image of Step 204 to extract the area in which the treatment instrument 14 appears. In contrast, in the third embodiment, based on the information on the feed of the treatment instrument from the sensor, the area in which the treatment instrument appears in the image is detected.
In this embodiment, the feed of the treatment instrument is detected by the sensor so that the projection of the treatment instrument 14 may be detected accurately, and hence the area in which the image is to be replaced may be determined appropriately to perform the replacement of the image. In this manner, in the observation with the stereo endoscope, even when there is an object that is brought into proximity with the endoscope, the observation with the three-dimensional image without the double vision due to the proximity is enabled in most of the screen, and the stereo endoscope with higher operability may be provided.
According to the present invention, in the observation with the stereo endoscope, even when there is an object that is brought into proximity with the endoscope, the observation with the three-dimensional image without the double vision due to the proximity is enabled in the most areas of the screen, and the stereo endoscope with higher operability may be provided.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2012-210898, filed Sep. 25, 2012, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2012-210898 | Sep 2012 | JP | national |