WO2020026383A1 - 内視鏡装置、内視鏡装置の作動方法及びプログラム - Google Patents

内視鏡装置、内視鏡装置の作動方法及びプログラム Download PDF

Info

Publication number
WO2020026383A1
WO2020026383A1 PCT/JP2018/028891 JP2018028891W WO2020026383A1 WO 2020026383 A1 WO2020026383 A1 WO 2020026383A1 JP 2018028891 W JP2018028891 W JP 2018028891W WO 2020026383 A1 WO2020026383 A1 WO 2020026383A1
Authority
WO
WIPO (PCT)
Prior art keywords
risk index
unit
image
depth
images
Prior art date
Application number
PCT/JP2018/028891
Other languages
English (en)
French (fr)
Inventor
直也 栗山
Original Assignee
オリンパス株式会社
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 オリンパス株式会社 filed Critical オリンパス株式会社
Priority to PCT/JP2018/028891 priority Critical patent/WO2020026383A1/ja
Priority to JP2020533971A priority patent/JP6942892B2/ja
Publication of WO2020026383A1 publication Critical patent/WO2020026383A1/ja
Priority to US17/145,475 priority patent/US20210136257A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/144Movement detection
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/00002Operational features of endoscopes
    • A61B1/00004Operational features of endoscopes characterised by electronic signal processing
    • A61B1/00009Operational features of endoscopes characterised by electronic signal processing of image signals during a use of endoscope
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/00163Optical arrangements
    • A61B1/00188Optical arrangements with focusing or zooming features
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/04Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor combined with photographic or television appliances
    • A61B1/045Control thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/676Bracketing for image capture at varying focusing conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681Motion detection
    • H04N23/6811Motion detection based on the image signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/682Vibration or motion blur correction
    • H04N23/683Vibration or motion blur correction performed by a processor, e.g. controlling the readout of an image memory
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/81Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10068Endoscopic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10141Special mode during image acquisition
    • G06T2207/10148Varying focus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing

Definitions

  • the present invention relates to an endoscope apparatus, an operation method of the endoscope apparatus, a program, and the like.
  • the depth of field is required to be as deep as possible so as not to hinder the diagnosis and treatment performed by the user.
  • imaging devices having a large number of pixels have been used in endoscope apparatuses, and the depth of field has been reduced accordingly.
  • the introduction of an extended depth of field (EDOF) technique for enlarging the depth of field has been proposed.
  • EEOF extended depth of field
  • the depth of field is enlarged by synthesizing a focused region after aligning a plurality of images captured by changing a focus position.
  • Patent Literature 1 When EDOF is used, since a plurality of images are combined, artifacts that do not exist in the actual subject may occur. However, the technology described in Patent Literature 1 does not consider the risk of artifacts. For this reason, for example, it is not possible to align a low-contrast subject, and there is a possibility that an artifact may occur when the subject is synthesized as it is.
  • an endoscope apparatus that outputs an image according to an artifact occurrence risk, an operation method of the endoscope apparatus, a program, and the like.
  • One embodiment of the present invention is an imaging unit that acquires a plurality of images with different focus positions at different timings, a positioning unit that positions the plurality of images with different focus positions, and the positioning unit that positions the plurality of images.
  • a depth-expansion unit that expands the depth of field and a risk index indicating the degree of risk of an artifact occurring in the depth-enlarged image are defined.
  • the present invention relates to an endoscope apparatus that includes a risk index calculation unit to be obtained, and an artifact correction unit that corrects the depth-enlarged image based on the risk index.
  • a plurality of images having different focus positions are obtained at different timings, the plurality of images having different focus positions are aligned, and the plurality of images having different focus positions are aligned.
  • the depth of field is enlarged, a risk index indicating the degree of risk of occurrence of an artifact in the depth-enlarged image is obtained, and the depth-enlarged image is calculated based on the risk index. It relates to the operation method of the endoscope apparatus to be corrected.
  • Still another aspect of the present invention is to acquire a plurality of images having different focus positions at different timings, align the plurality of images having different focus positions, and, from the plurality of images having different aligned focus positions, By synthesizing one depth-enlarged image, the depth of field is enlarged, a risk index indicating the degree of risk of occurrence of an artifact in the depth-enlarged image is obtained, and based on the risk index, the depth-enlarged image is obtained. Is related to a program that causes a computer to execute the step of correcting.
  • 3 illustrates a configuration example of an endoscope apparatus.
  • 3 is a configuration example of a risk index calculation unit.
  • 9 is a flowchart illustrating high-speed motion risk index calculation processing. The figure explaining the random motion risk index calculation processing.
  • 9 is a flowchart illustrating a random motion risk index calculation process.
  • 5 is a flowchart for explaining a process for obtaining a peak evaluation value.
  • 9 is a flowchart illustrating a process of calculating a flat region risk index or a periodic structure risk index. 13 shows another configuration example of the risk index calculation unit.
  • 3 is a configuration example of an artifact correction unit.
  • FIG. 1 is a configuration example of an endoscope device 12.
  • the endoscope device 12 includes an insertion unit 100, a processing unit 300, a display unit 400, an external I / F unit 500, and an illumination unit 600.
  • the insertion unit 100 is, for example, a scope
  • the display unit 400 is, for example, a display device
  • the external I / F unit 500 is, for example, an interface or an operation unit or an operation device
  • the illumination unit 600 is an illumination device or a light source.
  • the endoscope device 12 is, for example, a flexible endoscope used for a digestive tract or the like, or a rigid endoscope used for a laparoscope or the like.
  • the insertion portion 100 is a portion to be inserted into the body.
  • the insertion unit 100 includes a light guide 110 and an imaging unit 200.
  • the light guide 110 guides light emitted from the illumination unit 600 to the tip of the insertion unit 100.
  • the illumination unit 600 includes, for example, a white light source 610, and emits white illumination light.
  • the white light source 610 is, for example, an LED or a xenon lamp.
  • the illumination light is not limited to white light, and illumination light of various bands used for the endoscope device 12 can be adopted.
  • the imaging section 200 forms an image of the subject by forming an image of the reflected light from the subject.
  • the imaging unit 200 includes an objective optical system 210, an image sensor 220, and an A / D converter 230.
  • the A / D converter 230 is, for example, an A / D conversion circuit. Note that the A / D converter 230 may be built in the image sensor.
  • the light emitted from the light guide 110 is applied to the subject.
  • the objective optical system 210 forms the reflected light reflected from the subject as a subject image.
  • the focus position of the objective optical system 210 can be changed, and is controlled by a focus control unit 390 described later.
  • the image sensor 220 photoelectrically converts the subject image formed by the objective optical system 210 to capture an image.
  • the A / D converter 230 converts an analog signal sequentially output from the image sensor 220 into a digital image, and sequentially outputs the digital image to the preprocessing unit 310.
  • the image sensor 220 captures a moving image of a subject.
  • the A / D conversion unit 230 performs A / D conversion on the image of each frame of the moving image, and outputs a digital image to the preprocessing unit 310.
  • the pre-processing unit 310 outputs a digital moving image.
  • the processing unit 300 performs signal processing including image processing, and controls the endoscope apparatus 12.
  • the processing unit 300 includes a pre-processing unit 310, a frame memory 320, a positioning unit 330, a depth expanding unit 340, a risk index calculating unit 350, an artifact correcting unit 360, a post-processing unit 370, and a control unit 380. And a focus control unit 390.
  • the pre-processing unit 310 is, for example, a pre-processing circuit
  • the post-processing unit 370 is, for example, a post-processing circuit
  • the frame memory 320 is a memory such as a RAM, for example.
  • the positioning unit 330 is a positioning circuit that calculates a motion vector.
  • the depth enlargement unit 340 is, for example, an image composition circuit.
  • the risk index calculation unit 350 is, for example, a risk index calculation circuit.
  • the artifact correction unit 360 is, for example, an image correction circuit.
  • the control unit 380 is, for example, a control circuit or a controller
  • the focus control unit 390 is, for example, a focus control circuit or a focus controller.
  • the preprocessing unit 310 performs various image processing on the images sequentially output from the A / D conversion unit 230, and sequentially outputs the processed images to the frame memory 320 and the depth enlarging unit 340.
  • the image processing is, for example, white balance processing, interpolation processing, or the like.
  • the frame memory 320 stores the M-1 images output from the preprocessing unit 310 and outputs the images to the depth enlarging unit 340.
  • M represents the number of images used for synthesizing the depth-expanded image, and is an integer of 2 or more.
  • the positioning unit 330 performs positioning between the images based on the (M ⁇ 1) images stored in the frame memory 320 and the one image output from the preprocessing unit 310. Specifically, the positioning unit 330 sets one of the M images as a reference image for positioning, and then positions another image with respect to the reference image. Positioning can be realized by, for example, a known block matching method.
  • the reference image for positioning here is the latest image output from the preprocessing unit 310, for example.
  • the depth enlargement unit 340 combines the image output from the pre-processing unit 310 and the M-1 images after alignment output from the alignment unit 330 into one depth-enlarged image. That is, the depth enlarging unit 340 generates one depth-enlarged image from the M images.
  • the depth enlarging unit 340 selects an image that is most in focus among the M images in each local area of the depth-enlarged image, extracts a local area of the selected image, and performs depth expansion from the extracted local area. Combine images. By sequentially generating a depth-enlarged image from a moving image captured by the imaging unit 200, a moving image having the depth-enlarged image as a frame image can be obtained.
  • the depth-enlarged image is output to the artifact correction unit 360.
  • the risk index calculation unit 350 calculates a risk index indicating a risk of an artifact occurring in the depth-enlarged image.
  • the risk index is an index indicating the degree of risk of occurrence of an artifact.
  • the risk index is represented by, for example, a numerical value.
  • the greater the value of the risk index the higher the risk of occurrence of an artifact.
  • various modifications can be made to the relationship between the risk index and the risk represented by the risk index, for example, the smaller the value of the risk index, the higher the risk of artifact occurrence.
  • the risk index here is, specifically, an index indicating that the positioning in the positioning section 330 is not appropriate. That is, the fact that the risk represented by the risk index is high means that the possibility of occurrence of an artifact due to improper positioning is large. The details of the risk index calculation unit 350 will be described later.
  • the artifact correction unit 360 corrects the depth-enlarged image output from the depth-enlargement unit 340 using the image output from the preprocessing unit 310, based on the risk index calculated by the risk-index calculation unit 350. Details of the artifact correction unit 360 will be described later.
  • the post-processing unit 370 performs image processing such as gamma processing on the corrected image output from the artifact correction unit 360, and outputs the processed image to the display unit 400.
  • the control unit 380 includes the image sensor 220, the preprocessing unit 310, the frame memory 320, the positioning unit 330, the depth enlargement unit 340, the risk index calculation unit 350, the artifact correction unit 360, the post-processing unit 370, and the focus control unit 390. They are bidirectionally connected and control these.
  • the focus control unit 390 outputs a focus control signal for controlling the focus position to the objective optical system 210.
  • the imaging unit 200 captures an image with M frames having different focus positions, and the depth enlarging unit 340 combines the M images into one image. As a result, an enlarged depth image with an increased depth of field is obtained.
  • the display unit 400 sequentially displays the depth-enlarged images output from the depth expansion unit 340. That is, a moving image having the depth-enlarged image as a frame image is displayed.
  • the method of the present embodiment is not limited to a method for a moving image, and the display unit 400 may display a still image.
  • the display unit 400 is, for example, a liquid crystal display or an EL (Electro-Luminescence) display.
  • the external I / F unit 500 is an interface for the user to make an input or the like to the endoscope device 12. That is, it is an interface for operating the endoscope apparatus 12, an interface for setting operation of the endoscope apparatus, or the like.
  • the external I / F unit 500 includes an adjustment button for adjusting parameters of image processing.
  • the endoscope apparatus 12 of the present embodiment includes an imaging unit 200 that acquires a plurality of images with different focus positions at different timings, and a positioning unit that positions a plurality of images with different focus positions. 330, a plurality of images with different focus positions aligned by the alignment unit 330, and a depth-enlargement unit 340 that expands the depth of field by synthesizing a single depth-enlarged image.
  • a risk index calculating unit 350 that obtains a risk index representing a risk of occurrence of the image
  • an artifact correction unit 360 that corrects the depth-enlarged image based on the risk index.
  • the focus position is a position where focus is achieved on the subject side. That is, the position of the focal plane or the position of the intersection of the focal plane and the optical axis.
  • the focus position is represented by a distance from a reference position of the imaging unit 200 to a position where focus is achieved on the subject side.
  • the reference position of the imaging unit 200 is, for example, the position of the image sensor 220 or the position of the tip of the objective lens.
  • the focus position is adjusted by moving the focus lens in the objective optical system 210. That is, the focus position and the position of the focus lens correspond to each other, and the focus position can be said to be the position of the focus lens.
  • the enlarged-depth image is an image in which the depth of field is larger than the depth of the subject in the captured image. Specifically, it is an image in which the depth of field is artificially enlarged based on a plurality of images having different focus positions. For example, in each local region of the image, an image having the highest degree of focus in the local region is selected from the M images, and a depth-enlarged image is formed by the image of the selected local region.
  • the local area is, for example, a pixel.
  • the M images used when synthesizing the one-frame depth-enlarged image are images sequentially captured by the image sensor 220.
  • ED EDOF technology for increasing the depth of field is widely known.
  • alignment between the images is important.
  • conventional methods such as Patent Literature 1 do not consider whether or not a situation where alignment can be appropriately performed. Therefore, in a situation where alignment is difficult, such as when the subject itself is flat, or when the relative movement between the subject and the imaging unit 200 is very large, an artifact is generated due to the depth expansion.
  • water may be supplied, or smoke may be generated by using an electric knife. Also in these cases, highly accurate positioning is difficult, and there is a possibility that artifacts may occur in the depth-expanded image.
  • the endoscope apparatus 12 of the present embodiment calculates a risk index indicating a risk of occurrence of an artifact due to the alignment, and corrects the enlarged depth image according to the risk index. In this way, it is possible to switch between emphasizing the expansion of the depth of field and emphasis on suppressing the occurrence of artifacts according to the risk index. That is, by outputting an image according to the situation, it becomes possible for the user to perform appropriate observation or treatment.
  • the endoscope device 12 of the present embodiment may be configured as follows. That is, the processing unit 300 includes a memory that stores information, and a processor that operates based on the information stored in the memory.
  • the information is, for example, a program or various data.
  • the processor performs focus control processing, image acquisition processing, and image processing.
  • the focus control process controls a focus position of an objective optical system that forms a subject image on an image sensor.
  • the image acquisition process acquires an image captured by the image sensor.
  • the image processing includes a process of aligning a plurality of images having different focus positions, a process of synthesizing one depth-enlarged image from the aligned images, a risk index calculation process, and a correction of the depth-expanded image based on the risk index. Including processing.
  • the function of each unit may be realized using individual hardware, or the function of each unit may be realized using integrated hardware.
  • a processor includes hardware, and the hardware can include at least one of a circuit that processes digital signals and a circuit that processes analog signals.
  • the processor can be configured using one or more circuit devices or one or more circuit elements mounted on a circuit board.
  • the circuit device is, for example, an IC or the like.
  • the circuit element is, for example, a resistor, a capacitor, or the like.
  • the processor may be, for example, a CPU (Central Processing Unit).
  • the processor is not limited to the CPU, and various processors such as a GPU (Graphics Processing Unit) or a DSP (Digital Signal Processor) can be used.
  • the processor may be a hardware circuit based on an ASIC. Further, the processor may include an amplifier circuit and a filter circuit for processing an analog signal.
  • the memory may be a semiconductor memory such as an SRAM or a DRAM, a register, a magnetic storage device such as a hard disk device, or an optical storage device such as an optical disk device. You may.
  • the memory stores a computer-readable instruction, and the processor executes the instruction to implement the function of each unit of the processing unit 300 as a process.
  • the instruction here may be an instruction of an instruction set constituting a program or an instruction for instructing a hardware circuit of a processor to operate.
  • Each unit of the processing unit 300 is a positioning unit 330, a depth expanding unit 340, a risk index calculating unit 350, and an artifact correcting unit 360. Further, each unit of the processing unit 300 may include a control unit 380, a focus control unit 390, a pre-processing unit 310, and a post-processing unit 370.
  • Each unit of the processing unit 300 may be realized as a module of a program operating on a processor.
  • the positioning unit 330 is realized as a positioning module
  • the depth enlarging unit 340 is realized as an image combining module
  • the risk index calculating unit 350 is realized as a risk index calculating module
  • the artifact correcting unit 360 is realized as an image correcting module. Is done.
  • the program that implements the processing performed by each unit of the processing unit 300 of the present embodiment can be stored in, for example, an information storage device that is a computer-readable medium.
  • the information storage device can be realized by, for example, an optical disk, a memory card, an HDD, or a semiconductor memory.
  • the semiconductor memory is, for example, a ROM.
  • the processing unit 300 performs various processes of the present embodiment based on a program stored in the information storage device. That is, the information storage device stores a program for causing a computer to function as each unit of the processing unit 300.
  • the computer is a device including an input device, a processing unit, a storage unit, and an output unit.
  • the program is a program for causing a computer to execute processing of each unit of the processing unit 300.
  • the program according to the present embodiment is a program for causing a computer to execute the steps shown in FIGS. 4 and 6 to 8.
  • the method of the present embodiment is also applicable to other imaging devices that acquire a depth-enlarged image based on a plurality of images at different focus positions.
  • the method of the present embodiment is applicable to an imaging device such as a microscope.
  • Risk Index Calculation Next, details of the risk index calculation unit 350 will be described. First, a motion vector used for calculating a risk index will be described, and then three specific risk indexes will be described. After that, some modified examples relating to the risk index calculation will be described.
  • the risk index calculation unit 350 of the present embodiment obtains a risk index based on a motion vector between a plurality of images having different focus positions.
  • the motion vector here is information indicating a difference between a position of a given subject on a reference image for alignment and a position of the given subject in an image having a different focus position from the reference image.
  • the positioning in the positioning unit 330 is performed based on the motion vector. If the motion vector cannot be detected with high accuracy, the synthesis of a plurality of images cannot be performed in an appropriate positional relationship, and therefore, there is a high risk that an artifact will occur in the depth-enlarged image. That is, by obtaining the risk index based on the motion vector, it becomes possible to appropriately obtain the risk of occurrence of artifacts due to the inability to properly execute the alignment.
  • the positioning unit 330 detects a motion vector based on a plurality of images having different focus positions, and the risk index calculating unit 350 obtains a risk index based on the motion vector detected by the positioning unit 330.
  • the positioning unit 330 executes a process of detecting a motion vector based on a plurality of images having different focus positions in order to perform positioning.
  • various methods such as block matching are known, and in the present embodiment, they can be widely applied.
  • the positioning unit 330 may detect a motion vector applicable to both positioning and risk index calculation. That is, it is possible to use the motion vector for positioning for risk index calculation. Alternatively, the positioning unit 330 may separately detect a first motion vector for positioning and a second motion vector for calculating a risk index.
  • the risk index calculating unit 350 may detect a motion vector based on a plurality of images having different focus positions, and obtain a risk index based on the detected motion vector. That is, the risk index calculating unit 350 may detect a motion vector for calculating a risk index separately from the motion vector for positioning used in the positioning unit 330.
  • the positioning unit 330 detects a motion vector in pixel units.
  • the risk index calculation it is sufficient if it is possible to determine whether or not the alignment has been performed with sufficient accuracy, and the accuracy of the motion vector may not be required as compared with the alignment. Therefore, by detecting a motion vector in the risk index calculation unit 350, it is possible to realize a motion vector detection process according to a use.
  • the risk index calculating unit 350 determines that it is difficult to perform high-accuracy positioning when the relative movement between the subject and the imaging unit 200 is fast, and increases the risk. Calculate risk indicators.
  • FIG. 2 is a diagram illustrating a configuration example of the risk index calculation unit 350.
  • the risk index calculation unit 350 includes a first image reduction unit 351, a second image reduction unit 352, a high-speed motion vector detection unit 353, and a high-speed motion risk index calculation unit 354.
  • the first image reduction unit 351 reduces the image output from the pre-processing unit 310.
  • the reduced image is output to the high-speed motion vector detection unit 353.
  • the second image reduction unit 352 reduces an image output from the frame memory 320.
  • the reduced image is output to the high-speed motion vector detection unit 353.
  • the high-speed motion vector detection unit 353 detects a motion vector based on the reduced image output from the first image reduction unit 351 and the reduced image output from the second image reduction unit 352. Since a reduced image is used for the motion vector detection in the high-speed motion vector detection unit 353, a global motion is detected as compared with the motion vector detection in the positioning unit 330 using the image before reduction. For example, when the block sizes in the block matching are equal, the high-speed motion vector detection unit 353 performs the matching process on a relatively large subject area as compared with the positioning unit 330. When a matching process is performed by moving a block on a reduced image in units of one pixel, the process corresponds to a process of moving the block on a plurality of pixels in an image before reduction. That is, the high-speed motion vector detection unit 353 performs the matching process on a coarser unit than the positioning unit 330. The high-speed motion vector detection unit 353 outputs information on the detected motion vector to the high-speed motion risk index calculation unit 354.
  • the positioning unit 330 has an upper limit on the amount of motion that can be detected.
  • the upper limit of the amount of motion that can be detected may be considered as the upper limit of the motion of the subject for which positioning is performed.
  • a detectable motion amount is determined according to a search range that is a range for obtaining a correlation (evaluation value) between blocks.
  • the positioning unit 330 sets the maximum range in which positioning can be performed. Then, when the amount of motion represented by the motion vector is larger than the maximum range, the risk index calculation unit 350 calculates a risk index having a high risk. Specifically, when the amount of motion represented by the motion vector is larger than the maximum range, a risk index is calculated such that the risk is higher than when the amount of motion is equal to or smaller than the maximum range. However, when the motion vector is calculated using the reduced image as in the example of FIG. 2, the reduction ratio is considered in the comparison between the “maximum position that can be aligned” and the “motion amount represented by the motion vector”. There is a need to.
  • the amount of motion is obtained by, for example, doubling the size of the motion vector.
  • the search range of the motion vector is set such that the maximum value of the amount of motion that can be detected exceeds the maximum range in which alignment is possible.
  • the high-speed motion risk index calculating unit 354 may obtain the high-speed motion risk index as binary information of “0” and “1”. For example, the high-speed motion risk index calculating unit 354 calculates the high-speed motion risk index as “1” when the size of the detected motion vector indicates a motion larger than the motion that can be detected by the positioning unit 330. Otherwise, the high-speed motion risk index calculation unit 354 calculates the high-speed motion risk index as “0”. As described above, when the high-speed motion risk index is “1”, the risk of artifact generation is high, and when the high-speed motion risk index is “0”, the risk of artifact generation is low.
  • FIG. 3 is a diagram illustrating an example of calculating a high-speed motion risk index that is multivalued information.
  • the horizontal axis in FIG. 3 represents the magnitude M of the motion amount corresponding to the motion vector detected by the high-speed motion vector detection unit 353.
  • the vertical axis in FIG. 3 represents the magnitude of the high-speed motion risk index.
  • Th1 on the horizontal axis is the maximum value of the movement that can be detected by the positioning unit 330, that is, a value that represents the maximum range in which positioning can be performed.
  • the high-speed motion risk index calculating unit 354 calculates the high-speed motion risk index as “0” when M ⁇ Th1.
  • M the high-speed motion risk index calculation unit 354 sets the high-speed motion risk index to a ⁇ (M ⁇ Th1).
  • a is a coefficient of a> 0, and the specific value of a can be variously modified.
  • a given maximum value is set for the risk index, and the value of the risk index does not exceed the maximum value.
  • FIG. 3 shows an example of calculating the high-speed motion risk index. If the high-speed motion risk index increases as M increases, the high-speed motion risk index may be calculated using another relationship.
  • the risk index is calculated based on the maximum position range in which the positioning unit 330 can perform positioning.
  • the maximum range that can be aligned is excessively narrow, the probability that it is determined that alignment cannot be performed increases, and the effect of expanding the depth of field by EDOF is impaired.
  • the maximum range is excessively wide, the positioning and the synthesis of the depth-enlarged image are performed even when the motion is fast, which leads to the generation of artifacts.
  • the maximum range is excessively large, the search range is large and the calculation load is large. That is, it is considered that the maximum range in which the positioning can be performed is set as a reasonable value in consideration of various conditions.
  • the risk index can be appropriately calculated by using the maximum range as a reference in calculating the risk index.
  • the high-speed motion vector detection unit 353 of the present embodiment needs to detect a large motion as compared with the positioning unit 330.
  • the processing load can be reduced by processing a reduced image as the processing target.
  • one high-speed motion risk index can be calculated from one motion vector.
  • the high-speed motion vector detection unit 353 may obtain one motion vector for the entire reduced image, and the high-speed motion risk index calculation unit 354 may calculate one high-speed motion risk index from the motion vector. This corresponds to the case where the block size of the block matching is equal to the size of the reduced image. In this case, one high-speed motion risk index is calculated for one depth-enlarged image.
  • the high-speed motion vector detection unit 353 obtains a plurality of motion vectors for the reduced image, and the high-speed motion risk index calculation unit 354 calculates a high-speed motion risk index from each of the plurality of motion vectors, thereby obtaining a plurality of motion vectors per frame. May be calculated. In other words, a plurality of local regions are set in one depth-enlarged image, and a high-speed motion risk index is calculated in each local region.
  • the high-speed motion risk index calculating unit 354 may calculate one high-speed motion risk index per frame by calculating a plurality of high-speed motion risk indexes and obtaining a statistical value such as an average value of the high-speed motion risk indexes.
  • FIG. 4 is a flowchart illustrating the high-speed motion risk index calculation process.
  • the first image reducing unit 351 reduces the image from the pre-processing unit 310 (S101).
  • the second image reduction unit 352 reduces the image from the frame memory 320 (S102).
  • the high-speed motion vector detection unit 353 detects a motion vector based on the reduced image acquired in S101 and the reduced image acquired in S102 (S103).
  • the high-speed motion risk index calculation unit 354 determines whether or not the motion amount M represented by the motion vector is larger than the maximum motion amount Th1 that can be detected in alignment (S104).
  • the high-speed motion risk index calculation unit 354 calculates the risk index as “0” (S105). If M> Th1 (Yes in S104), the high-speed motion risk index calculating unit 354 sets the risk index to “1” or the value described using FIG. 3 (S106).
  • FIG. 2 shows a configuration in which the risk index calculation unit 350 detects a motion vector for calculating a risk index, but the motion vector may be detected by the positioning unit 330 as described above.
  • the risk index calculation unit 350 omits the first image reduction unit 351, the second image reduction unit 352, and the high-speed motion vector detection unit 353 from the configuration of FIG.
  • the positioning unit 330 performs processing for detecting a motion vector for positioning, and processing corresponding to the first image reduction unit 351, the second image reduction unit 352, and the high-speed motion vector detection unit 353. That is, the positioning unit 330 reduces the image output from the preprocessing unit 310 and the image output from the frame memory 320, and detects a motion vector based on the reduced image.
  • the motion vector detected based on the reduced image is output to the high-speed motion risk index calculating unit 354 of the risk index calculating unit 350.
  • the positioning unit 330 may perform positioning and output a motion vector to the risk index calculation unit 350 by performing a multi-resolution analysis such as a wavelet transform.
  • the positioning unit 330 may perform a process of detecting a motion vector using a range exceeding a maximum range in which positioning can be performed as a search range without performing image reduction. Then, the positioning unit 330 performs positioning when the detected motion vector is equal to or smaller than the maximum range. Further, the positioning unit 330 outputs the information of the motion vector to the high-speed motion risk index calculation unit 354 of the risk index calculation unit 350.
  • the movement of the subject is considered to be mainly caused by the movement of the insertion unit 100.
  • the movement of the insertion unit 100 may be various movements such as movement in the optical axis direction that changes the distance to the subject, translation, and rotation. Regardless of the movement, the subject on the image moves in a direction corresponding to the movement of the insertion unit 100. That is, when a plurality of motion vectors are detected for an image, a given motion vector is considered to have a certain degree of correlation with surrounding motion vectors.
  • the risk index calculation unit 350 calculates a risk index based on the correlation between the plurality of motion vectors. More specifically, the risk index calculation unit 350 calculates a risk index such that the lower the correlation between a plurality of motion vectors, the higher the risk.
  • the risk index here is referred to as a random motion risk index.
  • the case where the correlation between motion vectors is low corresponds to the case where the accuracy of each motion vector is low. For example, it is considered that the correlation between the motion vectors is reduced when the visibility of the subject is significantly reduced as in the case of water supply or smoking.
  • FIG. 5 is a diagram for explaining a random motion risk index calculation process.
  • the risk index calculation unit 350 sets a given motion vector as a target vector, and calculates a random motion risk index as “1” when the correlation between the target vector and a surrounding motion vector is low.
  • the risk index calculation unit 350 calculates the random motion risk index as “0”.
  • the risk index calculation unit 350 determines whether or not the correlation is high based on, for example, a comparison process between a value indicating the correlation and a given threshold.
  • the peripheral motion vectors may be four (up, down, left, and right), eight (periphery), or another combination. For example, when V0 is set as the attention vector, the correlation with V2, V4, V5, and V7 may be used, or the correlation with V1 to V8 may be used.
  • the risk index calculation unit 350 calculates the random motion risk index as “1” if the magnitude VD of the difference vector from the surrounding motion vector is larger than the threshold Th2.
  • a plurality of motion vectors such as four or eight
  • a plurality of difference vectors from the target vector are also obtained.
  • the magnitude of the difference vector used for comparison with the threshold value it is possible to use various statistical values such as the sum of the magnitudes of a plurality of difference vectors, an average value, and a maximum value. By doing so, it is possible to calculate a risk index when positioning cannot be performed due to a situation such as a water supply scene.
  • FIG. 6 is a flowchart illustrating a random motion risk index calculation process.
  • the risk index calculation unit 350 sets a target vector (S201), and obtains a difference vector between the target vector and a peripheral motion vector (S202). Then, the risk index calculating unit 350 determines whether or not the magnitude VD of the difference vector is larger than a given threshold Th2 (S203).
  • the risk index calculation unit 350 calculates the risk index as “0” (S204). If VD> Th2 (Yes in S203), the high-speed motion risk index calculation unit 354 calculates the risk index as “1” (S205).
  • the point that the motion vector may be calculated by the risk index calculating unit 350 or may be calculated by the positioning unit 330 is as described above. Further, it is considered that the water supply scene and the smoke scene are difficult to position in the entire image. Therefore, the risk index calculation unit 350 obtains one random motion risk index for the entire image.
  • the method of the present embodiment is not limited to this, and the image may be divided into a plurality of regions, and the risk index calculation unit 350 may obtain a random motion risk index for each region.
  • the risk index calculation unit 350 may determine a plurality of difference vectors by setting a plurality of attention vectors. Then, the risk index calculation unit 350 may obtain a random motion risk index for each attention vector, or may obtain one random motion risk index based on a plurality of attention vectors.
  • FIG. 6 illustrates an example in which the risk index calculation unit 350 calculates the random motion risk index in binary. However, this does not prevent the risk index calculation unit 350 from calculating the random motion risk index in multiple values.
  • the motion vector calculates a search evaluation value representing a correlation between a plurality of images having different focus positions within a search range, and calculates a search evaluation value with the maximum correlation.
  • This is a vector detected by searching.
  • Various evaluation values such as SAD (Sum of Absolute Difference), SSD (Sum of Squared Difference), and NCC (Normalized Cross Correlation) can be applied to the search evaluation value here.
  • SAD or SSD the smaller the search evaluation value, the higher the correlation between images.
  • NNC Normalized Cross Correlation
  • the search evaluation value has one distinct peak, it can be determined that the reliability of the motion vector determined by the search evaluation value is high. On the other hand, when there is no clear peak in the search evaluation value, the reliability of the motion vector determined by the search evaluation value is low.
  • the case where there is no clear peak specifically corresponds to the case where the subject to be imaged is a flat subject. Since the object has few characteristic structures, the alignment is not properly performed, and the risk of artifacts occurring in the depth-expanded image is high.
  • the case where there are a plurality of peaks corresponds to the case where the subject has a periodic structure.
  • an artificial object such as a treatment tool may be imaged, and the root portion of the treatment tool or the like may have a periodic structure.
  • the risk index calculating unit 350 calculates the risk index based on the difference between the search evaluation value with the largest correlation and the search evaluation value with the second largest correlation. Specifically, a risk index is calculated such that the risk increases as the difference between the search evaluation value with the largest correlation and the search evaluation value with the second largest correlation is determined to be smaller.
  • the risk index calculation unit 350 determines that the difference is small.
  • the risk index calculation unit 350 determines that the difference is small when the ratio represented by the ratio information is close to one.
  • the difference information here may be the difference itself, but is not limited thereto, and may include various information based on the difference. For example, information obtained by performing various processes such as a normalization process or a correction process on the difference value may be used as the difference information. The same applies to the ratio information.
  • the ratio information may be the ratio itself or information obtained based on the ratio.
  • FIG. 7 is a flowchart illustrating a process of obtaining the peak value of the search evaluation value.
  • the positioning unit 330 initializes the values of the minimum evaluation value and the second evaluation value using 0 (S301).
  • S301 the minimum evaluation value is a search evaluation value determined to have the highest correlation.
  • the second evaluation value is a search evaluation value having the second smallest value, and is a search evaluation value determined to have the second highest correlation.
  • the position matching unit 330 determines a given position within the search range as a search position (S302), and thereafter calculates a search evaluation value at the determined search position (S303). If the search evaluation value is SAD, S303 is a process of calculating the sum of absolute differences between the image area (block) serving as a template and the image area at the search position.
  • the positioning unit 330 compares the search evaluation value obtained in S303 with the minimum evaluation value, and determines whether or not the minimum evaluation value> the search evaluation value (S304).
  • the search evaluation value is smaller than the minimum evaluation value (Yes in S304)
  • the second evaluation value is replaced with the minimum evaluation value
  • the minimum evaluation value is replaced with the search evaluation value obtained in S303 (S305).
  • search evaluation value is equal to or larger than the minimum evaluation value (No in S304) If the search evaluation value is equal to or larger than the minimum evaluation value (No in S304), it is determined whether or not the second evaluation value> the search evaluation value (S306). When the search evaluation value is smaller than the second evaluation value (Yes in S306), the value of the second evaluation value is replaced with the value of the search evaluation value obtained in S303 (S307). If the search evaluation value is equal to or greater than the second evaluation value (No in S306), the values of the minimum evaluation value and the second evaluation value are maintained.
  • the positioning unit 330 determines whether the search within the search range is completed (S308), and returns No to S302 to continue the process if No.
  • the process of obtaining the peak of the search evaluation value ends.
  • the positioning unit 330 stores a search position corresponding to the minimum evaluation value, and performs positioning using a vector connecting the reference position and the search position as a motion vector.
  • the processing for obtaining the peak value of the search evaluation value is performed in the positioning unit 330.
  • the processing in FIG. 7 largely overlaps with the processing for obtaining the motion vector. That is, when a motion vector is detected by the risk index calculation unit 350, the risk index calculation unit 350 may execute the processing described with reference to FIG.
  • FIG. 8 is a flowchart illustrating a process of calculating a flat region risk index or a periodic structure risk index.
  • the risk index calculation unit 350 acquires a minimum evaluation value and a second evaluation value (S401), and obtains a difference between the minimum evaluation value and the second evaluation value (S402). Then, the risk index calculation unit 350 determines whether the difference Dif is smaller than a given threshold Th3 (S403). If Dif ⁇ Th3 (No in S403), the risk index calculation unit 350 calculates the risk index as “0” (S404). When Dif ⁇ Th3 (Yes in S403), the risk index calculation unit 350 calculates the risk index as “1” (S405).
  • a risk index can be calculated for a repetitive pattern such as the base of a treatment tool or a flat subject.
  • the flat region risk index or the periodic structure risk index may be obtained as a single value for the entire image, or may be obtained for each region.
  • FIG. 8 illustrates an example in which the risk index calculating unit 350 obtains the flat region risk index or the periodic structure risk index in a binary manner. It is not hindered to obtain the value.
  • FIG. 9 is a diagram illustrating another configuration example of the risk index calculation unit 350.
  • the risk index calculation unit 350 further includes a contrast calculation unit 355 that calculates contrast values of a plurality of images having different focus positions.
  • the contrast calculation unit 355 calculates the contrast value of the image output from the preprocessing unit 310 and the contrast value of the image output from the frame memory 320.
  • the contrast calculation unit 355 outputs the calculated contrast value to the flat area risk index calculation unit 356.
  • the flat area risk index calculation unit 356 calculates a risk index that increases the risk when the contrast value is smaller than a given threshold.
  • the contrast value here may be any one of a plurality of contrast values obtained from a plurality of images at different focus positions, or may be a statistical value such as an average value or a minimum value.
  • the contrast value is, for example, a known band-pass filter output.
  • the bandpass filter here has a frequency characteristic capable of extracting a typical structure imaged by the endoscope device 12.
  • a typical structure is, for example, a blood vessel structure. Note that techniques for detecting a contrast value from an image are widely known, and they can be widely applied in the present embodiment.
  • the flat area risk index calculation unit 356 compares the contrast value Ct with a given threshold Th4.
  • the flat area risk index calculation unit 356 calculates the risk index as “1” if Ct ⁇ Th4, and calculates the risk index as “0” if Ct ⁇ Th4.
  • the risk index calculating unit 350 obtains a risk index for the entire depth-enlarged image. That is, whether one risk index is obtained from the entire depth-enlarged image or a risk index is obtained for each local region of the depth-enlarged image, the risk index corresponding to the position is determined at an arbitrary position in the depth-enlarged image. We assumed a situation that could be identified. In this way, it is possible to balance the depth expansion and the suppression of artifacts over a wide range of the image.
  • the risk index calculating unit 350 may obtain the risk index for a part of the area of the enlarged depth image.
  • the target region of the risk index calculation may be limited to a part of the enlarged depth image.
  • a treatment tool such as an electric scalpel or forceps
  • a treatment tool such as an electric scalpel or forceps
  • the position of the treatment tool on the image changes.
  • the insertion section 100 is moved while the treatment tool is being taken out, the subject corresponding to the background moves although the position of the treatment tool on the image is fixed. In any case, due to factors such as a part of the subject being blocked by the treatment tool and no longer being imaged, the positioning may not be performed properly and an artifact may occur.
  • the risk index calculating unit 350 sets a part of the enlarged depth image around the area where the treatment tool is imaged as the target of the risk index calculation.
  • the partial area for which the risk index is calculated may be a predetermined area.
  • the treatment tool has a lower saturation than the living body, and can be detected by image processing. Therefore, the processing unit 300 may perform a process of detecting a treatment tool region from a captured image, and set a region including the detected treatment tool region as a target region for risk index calculation.
  • the correction processing is, specifically, blending or replacement of the depth-enlarged image and the original image.
  • the risk index described below may be any one of the various risk indexes described above, or may be a combination of two or more.
  • the artifact correction unit 360 performs a correction process described later using the maximum value of the plurality of risk indices from the viewpoint of emphasizing suppression of artifacts.
  • various modifications can be made to specific processing, such as using an average value of a plurality of risk indices.
  • the artifact correction unit 360 performs a correction process of blending at least one pixel of the depth-enlarged image with any one of a plurality of images having different focus positions based on the risk index.
  • the blending of two images corresponds to a process of obtaining the pixel values of the corrected image by weighting and adding the pixel values of one image and the pixel values of the other image.
  • the artifact correction unit 360 determines the pixel value of each pixel of the corrected image using the following equation (1).
  • FIG. 10 is a diagram illustrating the relationship between the risk index and the blend ratio ⁇ .
  • the horizontal axis in FIG. 10 represents the value of the risk index, and the vertical axis represents the blend ratio ⁇ .
  • the artifact correction unit 360 sets an allowable risk, which is the upper limit of the allowable risk index.
  • the allowable risk is an upper limit value of a risk index that is less likely to cause an artifact and is unlikely to cause a problem even if the enlarged depth image is displayed as it is.
  • the tolerable risk may be a fixed value. Alternatively, the value of the allowable risk may be dynamically set based on the subject to be observed or the history of the risk index calculated in the past. As shown in FIG.
  • the blend ratio ⁇ is set to 0 in a range where the calculated risk index is equal to or less than the allowable risk. That is, the depth-enlarged image is output as it is as the corrected image. If the calculated risk index is larger than the allowable risk, the larger the risk index, the larger the blending ratio ⁇ and the higher the contribution of the original image to the corrected image. However, when the above equation (1) is used, the maximum value of the blend ratio ⁇ is 1.
  • the original image here is any one of M images having different focus positions used for synthesizing the enlarged depth image.
  • the depth-enlarged image is an image synthesized by aligning the other M-1 images with the alignment reference image, the original image to be blended is It is desirable that this is the reference image.
  • the alignment reference image is the latest image output from the preprocessing unit 310 as described above.
  • the artifact correction unit 360 may set a selection evaluation value for each of a plurality of focus positions, and select an image captured at a focus position having a higher selection evaluation value as a blending target.
  • the selection evaluation value may be obtained from the size of the area determined to be in focus or the like, or may be obtained from the number of times of selection in the past as a blending target.
  • the correction processing by blending has a high affinity with the case where the risk index is obtained in multiple values. This is because if the risk index is multi-valued, the blending ratio can be flexibly set according to the value of the risk index. Further, the correction processing by the above equation (1) has a high affinity with a case where a plurality of risk indices are required for the depth-enlarged image. When a region with a high risk index and a region with a low risk index coexist in the image, a natural corrected image without making the boundaries of the regions conspicuous by setting a blending ratio according to the risk index using the above equation (1). This is because it is possible to obtain
  • the artifact correction unit 360 when the risk index is “0”, the artifact correction unit 360 outputs the depth-enlarged image as it is as a corrected image, and when the risk index is “1”, the depth-enlarged image and the original image have a given blend ratio. And output a corrected image blended using the above.
  • the artifact correction unit 360 outputs an image obtained by blending the depth-enlarged image and the original image as a corrected image using the same blending ratio in the entire image.
  • the artifact correction unit 360 may perform a correction process of replacing at least one pixel or more of the depth-enlarged image with any one of a plurality of images having different focus positions based on the risk index. Various modifications can be made to the image to be replaced, as in the case of blending.
  • the correction processing by substitution has a high affinity with the case where the risk index is obtained in binary. If the risk index is “0”, the artifact correction unit 360 gives priority to depth expansion and sets the pixel value of the depth expanded image as the pixel value of the corrected image. If the risk index is “1”, the artifact correction unit 360 replaces the depth-enlarged image with the original image, giving priority to suppressing the artifact.
  • the replacement corresponds to a process of setting the pixel values of the original image to the pixel values of the corrected image.
  • the artifact correction unit 360 outputs the enlarged depth image as a corrected image as it is when the risk index is equal to or less than a given threshold, and converts the enlarged depth image by the original image when the risk index is larger than the given threshold. Replace.
  • the threshold value here is, for example, the allowable risk shown in FIG.
  • the correction processing using the replacement is performed with one risk index for the depth-expanded image more than when a plurality of risk indexes are required for the depth-expanded image. Has high affinity with the case where is required. However, when a plurality of risk indices are required for the depth-enlarged image, it is not impeded that correction processing using replacement is performed.
  • the artifact correction unit 360 may further include the enhancement unit 361 that enhances at least a region to be replaced with the depth-enlarged image in any of the plurality of images having different focus positions.
  • the artifact correction unit 360 (replacement processing unit 362) performs a correction process of replacing at least one pixel or more of the depth-enlarged image with an image on which enhancement processing has been performed, based on the risk index.
  • FIG. 11 is a diagram illustrating a configuration example of the artifact correction unit 360.
  • the artifact correction unit 360 includes an enhancement unit 361 and a replacement processing unit 362.
  • the emphasis unit 361 acquires the image from the preprocessing unit 310 as the original image of the replacement process, and performs the emphasis process.
  • the emphasizing process here is a process for emphasizing the structure of the original image, and specifically, an edge emphasizing process.
  • the replacement processing unit 362 receives the original image after the enhancement processing from the enhancement unit 361, the depth-enlarged image from the depth expansion unit 340, and the risk index from the risk index calculation unit 350.
  • the replacement processing unit 362 performs a process of replacing the depth-enlarged image using the original image after the enhancement processing based on the risk index. This makes it possible to increase the visibility of the structure of the subject even when the depth of field is not expanded by the replacement.

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Surgery (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Biomedical Technology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Pathology (AREA)
  • Radiology & Medical Imaging (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Biophysics (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Optics & Photonics (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Endoscopes (AREA)
  • Image Processing (AREA)

Abstract

内視鏡装置12は、フォーカス位置の異なる複数の画像を異なるタイミングにおいて取得する撮像部200と、フォーカス位置の異なる複数の画像を位置合わせする位置合わせ部330と、位置合わせ部300が位置合わせしたフォーカス位置の異なる複数の画像から、1枚の深度拡大画像を合成することによって被写界深度を拡大する深度拡大部340と、深度拡大画像にアーチファクトが発生するリスクを表すリスク指標を求めるリスク指標算出部350と、リスク指標に基づいて、深度拡大画像を補正するアーチファクト補正部360と、を含む。

Description

内視鏡装置、内視鏡装置の作動方法及びプログラム
 本発明は、内視鏡装置、内視鏡装置の作動方法及びプログラム等に関する。
 内視鏡装置においては、ユーザが行う診断と処置に支障をきたさないように、可能な限り深い被写界深度が要求される。しかし近年では、内視鏡装置において多画素数の撮像素子が使用され、それに伴って被写界深度が浅くなっている。
 浅い被写界深度を補う技術として、被写界深度を拡大するEDOF(Extended Depth Of Field)技術の導入が提案されている。例えば特許文献1では、フォーカス位置を変化させて撮像した複数の画像を位置合わせした上でピントの合った領域を合成することによって、被写界深度を拡大する。
特表2013-513318号公報
 EDOFを用いた場合、複数の画像を合成するため、実際の被写体には存在しないアーチファクトが発生するおそれがある。しかし、特許文献1に記載の技術では、アーチファクトの発生リスクが考慮されていない。そのため、例えば低コントラストな被写体に対して位置合わせができず、そのまま合成することによって、アーチファクトが発生するおそれがある。
 本発明の幾つかの態様によれば、アーチファクトの発生リスクに応じた画像を出力する内視鏡装置、内視鏡装置の作動方法及びプログラム等を提供できる。
 本発明の一態様は、フォーカス位置の異なる複数の画像を異なるタイミングにおいて取得する撮像部と、前記フォーカス位置の異なる複数の画像を位置合わせする位置合わせ部と、前記位置合わせ部が位置合わせした前記フォーカス位置の異なる複数の画像から、1枚の深度拡大画像を合成することによって、被写界深度を拡大する深度拡大部と、前記深度拡大画像にアーチファクトが発生するリスクの度合いを表すリスク指標を求めるリスク指標算出部と、前記リスク指標に基づいて、前記深度拡大画像を補正するアーチファクト補正部と、を含む内視鏡装置に関係する。
 また本発明の他の態様は、フォーカス位置の異なる複数の画像を異なるタイミングにおいて取得し、前記フォーカス位置の異なる複数の画像を位置合わせし、位置合わせした前記フォーカス位置の異なる複数の画像から、1枚の深度拡大画像を合成することによって、被写界深度を拡大し、前記深度拡大画像にアーチファクトが発生するリスクの度合いを表すリスク指標を求め、前記リスク指標に基づいて、前記深度拡大画像を補正する内視鏡装置の作動方法に関係する。
 また本発明のさらに他の態様は、フォーカス位置の異なる複数の画像を異なるタイミングにおいて取得し、前記フォーカス位置の異なる複数の画像を位置合わせし、位置合わせした前記フォーカス位置の異なる複数の画像から、1枚の深度拡大画像を合成することによって、被写界深度を拡大し、前記深度拡大画像にアーチファクトが発生するリスクの度合いを表すリスク指標を求め、前記リスク指標に基づいて、前記深度拡大画像を補正するステップをコンピュータに実行させるプログラムに関係する。
内視鏡装置の構成例。 リスク指標算出部の構成例。 動き量とリスク指標との関係例。 高速動きリスク指標算出処理を説明するフローチャート。 ランダム動きリスク指標算出処理を説明する図。 ランダム動きリスク指標算出処理を説明するフローチャート。 評価値のピーク値を求める処理を説明するフローチャート。 平坦領域リスク指標又は周期構造リスク指標の算出処理を説明するフローチャート。 リスク指標算出部の他の構成例。 リスク指標とブレンド率の関係を説明する図。 アーチファクト補正部の構成例。
 以下、本実施形態について説明する。なお、以下に説明する本実施形態は、請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態において説明される構成の全てが、本発明の必須構成要件であるとは限らない。
1.内視鏡装置
 図1は、内視鏡装置12の構成例である。内視鏡装置12は、挿入部100と処理部300と表示部400と外部I/F部500と照明部600とを含む。挿入部100は例えばスコープであり、表示部400は例えば表示装置であり、外部I/F部500は例えばインターフェース、又は操作部、又は操作装置であり、照明部600は照明装置、又は光源である。内視鏡装置12は、例えば消化管等に用いられる軟性鏡、又は腹腔鏡等に用いられる硬性鏡である。
 挿入部100は、体内へ挿入される部分である。挿入部100は、ライトガイド110と撮像部200とを含む。
 ライトガイド110は、照明部600からの出射光を、挿入部100の先端まで導光する。照明部600は、例えば白色光源610を含み、白色光の照明光を出射する。白色光源610は、例えばLED、又はキセノンランプである。なお、照明光は白色光に限定されず、内視鏡装置12に用いられる種々の帯域の照明光を採用できる。
 撮像部200は、被写体からの反射光を結像し、被写体の画像を撮像する。撮像部200は、対物光学系210と撮像素子220とA/D変換部230とを含む。A/D変換部230は例えばA/D変換回路である。なお、A/D変換部230はイメージセンサに内蔵されてもよい。
 ライトガイド110からの出射光が被写体に照射される。対物光学系210は、被写体から反射した反射光を、被写体像として結像する。対物光学系210のフォーカス位置は変更可能であり、後述するフォーカス制御部390によって制御される。
 撮像素子220は、対物光学系210によって結像された被写体像を光電変換して画像を撮像する。A/D変換部230は、撮像素子220から順次出力されるアナログ信号をデジタルの画像に変換し、そのデジタルの画像を前処理部310に順次出力する。具体的には、撮像素子220が被写体の動画を撮像する。A/D変換部230は、その動画の各フレームの画像をA/D変換し、デジタルの画像を前処理部310へ出力する。前処理部310は、デジタルの動画を出力する。
 処理部300は、画像処理を含む信号処理と、内視鏡装置12の制御とを行う。処理部300は、前処理部310と、フレームメモリ320と、位置合わせ部330と、深度拡大部340と、リスク指標算出部350と、アーチファクト補正部360と、後処理部370と、制御部380と、フォーカス制御部390と、を含む。
 前処理部310は例えば前処理回路であり、後処理部370は例えば後処理回路である。フレームメモリ320は例えばRAM等のメモリである。位置合わせ部330は、動きベクトルの算出を行う位置合わせ回路である。深度拡大部340は例えば画像合成回路である。リスク指標算出部350は例えばリスク指標算出回路である。アーチファクト補正部360は例えば画像補正回路である。制御部380は例えば制御回路又はコントローラであり、フォーカス制御部390は例えばフォーカス制御回路又はフォーカスコントローラである。
 前処理部310は、A/D変換部230から順次出力された画像に対して、種々の画像処理を施し、その処理後の画像をフレームメモリ320と深度拡大部340に順次出力する。画像処理は、例えばホワイトバランス処理、補間処理等である。
 フレームメモリ320は、前処理部310から出力されたM-1枚の画像を記憶し、その画像を深度拡大部340へ出力する。Mは、深度拡大画像の合成に用いられる画像の枚数を表し、2以上の整数である。
 位置合わせ部330は、フレームメモリ320が記憶するM-1枚の画像と、前処理部310が出力する1枚の画像とに基づいて、画像間の位置合わせを行う。具体的には、位置合わせ部330は、M枚の画像のうちの1枚を位置合わせの基準画像に設定した後、他の画像を当該基準画像に対して位置合わせする。位置合わせは、例えば公知のブロックマッチング手法によって実現可能である。ここでの位置合わせの基準画像は、例えば前処理部310から出力される最新の画像である。
 深度拡大部340は、前処理部310から出力される画像と、位置合わせ部330から出力される位置合わせ後のM-1枚の画像とを、1枚の深度拡大画像へ合成する。即ち、深度拡大部340はM枚の画像から1枚の深度拡大画像を生成する。深度拡大部340は、深度拡大画像の各局所領域において、M枚の画像のうち最もフォーカスが合っている画像を選択し、その選択した画像の局所領域を抽出し、抽出した局所領域から深度拡大画像を合成する。撮像部200が撮影した動画から深度拡大画像を順次に生成することによって、深度拡大画像をフレーム画像とする動画が得られる。深度拡大画像はアーチファクト補正部360に出力される。
 リスク指標算出部350は、深度拡大画像にアーチファクトが発生するリスクを表すリスク指標を算出する。リスク指標とは、アーチファクトの発生リスクの度合いを表す指標である。リスク指標は例えば数値で表現され、以下ではリスク指標の値が大きいほど、アーチファクトの発生リスクが高い場合の例について説明を行う。ただし、リスク指標の値が小さいほど、アーチファクトの発生リスクが高いことを表す等、リスク指標と当該リスク指標により表されるリスクとの関係は種々の変形実施が可能である。ここでのリスク指標は、具体的には位置合わせ部330における位置合わせが適切でないことを表す指標である。即ち、リスク指標によって表されるリスクが高いとは、具体的には位置合わせが適切でないことによってアーチファクトが発生するおそれが大きいことを表す。リスク指標算出部350の詳細は後述する。
 アーチファクト補正部360は、リスク指標算出部350が算出したリスク指標に基づき、深度拡大部340から出力される深度拡大画像を、前処理部310から出力される画像を用いて補正する。アーチファクト補正部360の詳細は後述する。
 後処理部370は、アーチファクト補正部360から出力される補正画像にガンマ処理等の画像処理を施した後、表示部400に出力する。
 制御部380は、撮像素子220、前処理部310、フレームメモリ320、位置合わせ部330、深度拡大部340、リスク指標算出部350、アーチファクト補正部360、後処理部370、及びフォーカス制御部390と双方向に接続しており、これらを制御する。
 フォーカス制御部390は、フォーカス位置を制御するフォーカス制御信号を対物光学系210へ出力する。撮像部200は、互いにフォーカス位置が異なるMフレームで画像を撮像し、深度拡大部340は、そのM枚の画像を1枚の画像に合成する。これにより、被写界深度が拡大された深度拡大画像が得られる。
 表示部400は、深度拡大部340から出力される深度拡大画像を順次表示する。即ち、深度拡大画像をフレーム画像とする動画を表示する。ただし、本実施形態の手法は動画像を対象とするものに限定されず、表示部400は静止画像を表示してもよい。表示部400は、例えば液晶ディスプレイやEL(Electro-Luminescence)ディスプレイ等である。
 外部I/F部500は、ユーザが内視鏡装置12に対して入力等を行うためのインターフェースである。即ち、内視鏡装置12を操作するためのインターフェース、或いは内視鏡装置の動作設定を行うためのインターフェース等である。例えば、外部I/F部500は、画像処理のパラメータを調整するための調整ボタン等を含む。
 図1に示したとおり、本実施形態の内視鏡装置12は、フォーカス位置の異なる複数の画像を異なるタイミングにおいて取得する撮像部200と、フォーカス位置の異なる複数の画像を位置合わせする位置合わせ部330と、位置合わせ部330が位置合わせしたフォーカス位置の異なる複数の画像から、1枚の深度拡大画像を合成することによって、被写界深度を拡大する深度拡大部340と、深度拡大画像にアーチファクトが発生するリスクを表すリスク指標を求めるリスク指標算出部350と、リスク指標に基づいて深度拡大画像を補正するアーチファクト補正部360と、を含む。
 ここで、フォーカス位置とは、被写体側においてフォーカスが合う位置である。即ち、合焦面の位置、又は合焦面と光軸の交点の位置である。フォーカス位置は、撮像部200の基準位置から、被写体側においてフォーカスが合う位置までの距離によって表される。撮像部200の基準位置は、例えば撮像素子220の位置、又は対物レンズ先端の位置である。対物光学系210においてフォーカスレンズを動かすことによってフォーカス位置を調整する。即ち、フォーカス位置とフォーカスレンズの位置は互いに対応しており、フォーカス位置はフォーカスレンズの位置とも言える。
 また、深度拡大画像とは、撮像画像の被写体深度よりも被写界深度を拡大した画像である。具体的には、互いにフォーカス位置が異なる複数の画像に基づいて被写界深度が疑似的に拡大された画像である。例えば、画像の各局所領域において、M枚の画像の中から、その局所領域での合焦度合いが最も高い画像を選択し、その選択した各局所領域の画像によって深度拡大画像を構成する。局所領域は例えば画素である。1フレームの深度拡大画像を合成する際に用いるM枚の画像は、撮像素子220が順次に撮像した画像である。
 被写界深度を拡大するEDOF技術は広く知られている。異なるタイミングにおいて撮像される画像を合成することによって深度拡大画像を合成する場合、画像間の位置合わせが重要となる。しかし特許文献1等の従来手法は、位置合わせが適切にできる状況であるか否かを考慮していない。そのため、被写体自体が平坦である場合、或いは被写体と撮像部200の相対的な動きが非常に大きい場合等、位置合わせが難しい状況においては、深度拡大によってアーチファクトが発生してしまう。また、内視鏡装置では送水が行われる場合、或いは電気メスの使用によって煙が発生する場合がある。これらの場合も精度の高い位置合わせは困難であり、深度拡大画像にアーチファクトが発生するおそれがある。
 これに対して、本実施形態の内視鏡装置12は、位置合わせに起因するアーチファクトの発生リスクを表すリスク指標を算出し、リスク指標に応じて深度拡大画像を補正する。このようにすれば、被写界深度の拡大を重視するか、アーチファクトの発生抑制を重視するかを、リスク指標に応じて切り替えることが可能になる。即ち、状況に応じた画像を出力することによって、ユーザに対して適切な観察或いは処置を実行させることが可能になる。
 なお、本実施形態の内視鏡装置12は以下のように構成されてもよい。即ち、処理部300は、情報を記憶するメモリと、メモリに記憶された情報に基づいて動作するプロセッサと、を含む。情報は、例えばプログラムや各種のデータである。プロセッサは、フォーカス制御処理と画像取得処理と画像処理とを行う。フォーカス制御処理は、被写体像を撮像素子に結像する対物光学系のフォーカス位置を制御する。画像取得処理は、撮像素子が撮像した画像を取得する。画像処理は、フォーカス位置の異なる複数の画像を位置合わせする処理、位置合わせした複数の画像から1枚の深度拡大画像を合成する処理、リスク指標算出処理、及びリスク指標に基づく深度拡大画像の補正処理を含む。
 プロセッサは、例えば各部の機能が個別のハードウェアを用いて実現されてもよいし、或いは各部の機能が一体のハードウェアを用いて実現されてもよい。例えば、プロセッサはハードウェアを含み、そのハードウェアは、デジタル信号を処理する回路及びアナログ信号を処理する回路の少なくとも一方を含むことができる。例えば、プロセッサは、回路基板に実装された1又は複数の回路装置や、1又は複数の回路素子を用いて構成することができる。回路装置は例えばIC等である。回路素子は例えば抵抗、キャパシター等である。プロセッサは、例えばCPU(Central Processing Unit)であってもよい。ただし、プロセッサはCPUに限定されるものではなく、GPU(Graphics Processing Unit)、或いはDSP(Digital Signal Processor)等、各種のプロセッサを用いることが可能である。またプロセッサはASICによるハードウェア回路でもよい。またプロセッサは、アナログ信号を処理するアンプ回路やフィルタ回路等を含んでもよい。メモリは、SRAM、DRAMなどの半導体メモリであってもよいし、レジスターであってもよいし、ハードディスク装置等の磁気記憶装置であってもよいし、光学ディスク装置等の光学式記憶装置であってもよい。例えば、メモリはコンピュータによって読み取り可能な命令を格納しており、当該命令をプロセッサが実行することによって、処理部300の各部の機能が処理として実現される。ここでの命令は、プログラムを構成する命令セットの命令でもよいし、プロセッサのハードウェア回路に対して動作を指示する命令であってもよい。処理部300の各部は、位置合わせ部330、深度拡大部340、リスク指標算出部350、アーチファクト補正部360である。また処理部300の各部には、制御部380、フォーカス制御部390、前処理部310、後処理部370が含まれてもよい。
 また、本実施形態の処理部300の各部は、プロセッサ上で動作するプログラムのモジュールとして実現されてもよい。例えば、位置合わせ部330は位置合わせモジュールとして実現され、深度拡大部340は画像合成モジュールとして実現され、リスク指標算出部350はリスク指標算出モジュールとして実現され、アーチファクト補正部360は画像補正モジュールとして実現される。
 また、本実施形態の処理部300の各部が行う処理を実現するプログラムは、例えばコンピュータによって読み取り可能な媒体である情報記憶装置に格納できる。情報記憶装置は、例えば光ディスク、メモリーカード、HDD、或いは半導体メモリなどによって実現できる。半導体メモリは例えばROMである。処理部300は、情報記憶装置に格納されるプログラムに基づいて本実施形態の種々の処理を行う。即ち情報記憶装置は、処理部300の各部としてコンピュータを機能させるためのプログラムを記憶する。コンピュータは、入力装置、処理部、記憶部、出力部を備える装置である。プログラムは、処理部300の各部の処理をコンピュータに実行させるためのプログラムである。具体的には本実施形態に係るプログラムは、図4、図6~図8に示した各ステップを、コンピュータに実行させるためのプログラムである。
 また、本実施形態の手法は、フォーカス位置の異なる複数の画像に基づいて深度拡大画像を取得する他の撮像装置に適用可能である。例えば、本実施形態の手法は顕微鏡等の撮像装置に適用可能である。
2.リスク指標算出
 次にリスク指標算出部350の詳細について説明する。まずリスク指標算出に用いられる動きベクトルについて説明し、次に3つの具体的なリスク指標について説明する。その後、リスク指標算出に関するいくつかの変形例を説明する。
2.1 動きベクトルの算出
 本実施形態のリスク指標算出部350は、フォーカス位置の異なる複数の画像間の動きベクトルに基づいて、リスク指標を求める。ここでの動きベクトルは、位置合わせの基準画像上における所与の被写体の位置と、基準画像とはフォーカス位置の異なる画像における当該所与の被写体の位置の差分を表す情報である。位置合わせ部330における位置合わせは、動きベクトルに基づいて行われる。動きベクトルを精度よく検出できない場合、複数の画像の合成を適切な位置関係で実行できないため、深度拡大画像にアーチファクトが発生するリスクが高い。即ち、動きベクトルに基づいてリスク指標を求めることによって、位置合わせが適切に実行できないことに起因するアーチファクトの発生リスクを適切に求めることが可能になる。
 ここで、位置合わせ部330は、フォーカス位置の異なる複数の画像に基づいて動きベクトルを検出し、リスク指標算出部350は、位置合わせ部330の検出した動きベクトルに基づいてリスク指標を求めてもよい。位置合わせ部330は、位置合わせを行うためにフォーカス位置の異なる複数の画像に基づいて動きベクトルを検出する処理を実行する。動きベクトルを検出する処理とは、ブロックマッチング等の種々の手法が知られており、本実施形態ではそれらを広く適用可能である。リスク指標算出に用いる位置ベクトルを位置合わせ部330において検出することによって、効率的な構成を用いて内視鏡装置12を実現することが可能になる。
 なお、位置合わせ部330は、位置合わせとリスク指標算出の両方に適用可能な動きベクトルを検出してもよい。即ち、位置合わせ用の動きベクトルを、リスク指標算出に流用することが可能である。或いは位置合わせ部330は、位置合わせ用の第1の動きベクトルと、リスク指標算出用の第2の動きベクトルを別々に検出してもよい。
 或いは、リスク指標算出部350は、フォーカス位置の異なる複数の画像に基づいて動きベクトルを検出し、検出した動きベクトルに基づいてリスク指標を求めてもよい。即ち、位置合わせ部330における位置合わせ用の動きベクトル検出とは別に、リスク指標算出部350において、リスク指標算出用の動きベクトル検出を行ってもよい。
 位置合わせにおいては、アーチファクトの発生を抑制する観点から、精度の高い動きベクトル検出が必要となる。例えば、位置合わせ部330は、画素単位で動きベクトルを検出する。一方、リスク指標算出においては、位置合わせが十分な精度によって行われたか否かを判定可能であればよく、位置合わせに比べて動きベクトルの精度が必要にならない場合がある。よってリスク指標算出部350において動きベクトルを検出することによって、用途に応じた動きベクトル検出処理を実現することが可能になる。
2.2 高速動きリスク指標
 リスク指標算出部350は、被写体と撮像部200の相対的な移動が高速である場合に、精度の高い位置合わせが困難であると判定し、リスクが高くなるようなリスク指標を算出する。
 図2は、リスク指標算出部350の構成例を示す図である。リスク指標算出部350は、第1画像縮小部351と、第2画像縮小部352と、高速動きベクトル検出部353と、高速動きリスク指標算出部354を含む。第1画像縮小部351は、前処理部310から出力される画像を縮小する。縮小した画像は高速動きベクトル検出部353に出力される。第2画像縮小部352は、フレームメモリ320から出力される画像を縮小する。縮小した画像は高速動きベクトル検出部353に出力される。
 高速動きベクトル検出部353は、第1画像縮小部351から出力される縮小画像と、第2画像縮小部352から出力される縮小画像とに基づいて、動きベクトルを検出する。高速動きベクトル検出部353における動きベクトル検出は縮小画像が用いられるため、縮小前の画像を用いた位置合わせ部330における動きベクトル検出に比べて大域的な動きが検出される。例えば、ブロックマッチングにおけるブロックサイズが等しい場合、高速動きベクトル検出部353は、位置合わせ部330に比べて、相対的に広い被写体領域を対象としてマッチング処理を行う。また、縮小画像上においてブロックを1画素単位で移動させてマッチング処理を行った場合、当該処理は、縮小前の画像においてブロックを複数画素単位で移動させる処理に相当する。即ち、高速動きベクトル検出部353は、位置合わせ部330に比べて、粗い単位でマッチング処理を行う。高速動きベクトル検出部353は、検出した動きベクトルの情報を、高速動きリスク指標算出部354に出力する。
 ここで、位置合わせ部330では、検出可能な動き量に上限があることが想定される。検出可能な動き量の上限とは、位置合わせを実行する被写体の動きの上限と考えてもよい。例えば、ブロックマッチングであれば、ブロック間の相関(評価値)を求める範囲である探索範囲によって検出可能な動き量が決定される。
 即ち、位置合わせ部330は、位置合わせ可能な最大範囲が設定される。そしてリスク指標算出部350は、動きベクトルによって表される動き量が最大範囲よりも大きい場合、リスクが高いリスク指標を算出する。具体的には、動きベクトルによって表される動き量が最大範囲よりも大きい場合、動き量が最大範囲以下の場合に比べて、リスクが高くなるようなリスク指標を算出する。ただし図2の例のように縮小画像を用いて動きベクトルの算出が行われる場合、「位置合わせ可能な最大範囲」と「動きベクトルによって表される動き量」との比較において、縮小率を考慮する必要がある。例えば、第1画像縮小部351及び第2画像縮小部352が画像の各辺の長さを1/2に縮小する場合、位置合わせ可能な最大範囲(単位:画素)と、動きベクトルの大きさ(単位:画素)を直接比較するのではなく、例えば動きベクトルの大きさを2倍することによって動き量を求める。なお前提として、高速動きベクトル検出部353においては、検出可能な動き量の最大値が、位置合わせ可能な最大範囲を超えるように、動きベクトルの探索範囲が設定される。
 高速動きリスク指標算出部354は、高速動きリスク指標を“0”と“1”の二値の情報として求めてもよい。例えば、高速動きリスク指標算出部354は、検出された動きベクトルの大きさが、位置合わせ部330において検出可能な動きよりも大きな動きを表す場合、高速動きリスク指標を“1”と算出する。そうでない場合、高速動きリスク指標算出部354は、高速動きリスク指標を“0”と算出する。上述した通り、ここでは高速動きリスク指標が“1”の場合にアーチファクトの発生リスクが高く、高速動きリスク指標が“0”の場合にアーチファクトの発生リスクが低いことを表す。
 ただし、高速動きリスク指標は二値ではなく、多値の情報として算出されてもよい。図3は、多値の情報である高速動きリスク指標を算出する例を説明する図である。図3の横軸は、高速動きベクトル検出部353において検出された動きベクトルに対応する動き量の大きさMを表す。図3の縦軸は、高速動きリスク指標の大きさを表す。また横軸のTh1は、位置合わせ部330において検出可能な動きの最大値、即ち位置合わせ可能な最大範囲を表す値である。
 図3の例においては、高速動きリスク指標算出部354は、M≦Th1である場合、高速動きリスク指標を“0”と算出する。また高速動きリスク指標算出部354は、M>Th1である場合、高速動きリスク指標をa×(M-Th1)とする。ここでaはa>0の係数であり、aの具体的な値は種々の変形実施が可能である。また図3の例においては、リスク指標は所与の最大値が設定されており、リスク指標の値は当該最大値を超えない。図3に示す関係を用いて高速動きリスク指標を算出することによって、位置合わせ部330において検出可能な最大動き量を超える動き量に対して、当該動き量に応じたリスク指標を算出できる。なお、図3は高速動きリスク指標算出の一例であり、Mが大きいほど高速動きリスク指標が大きくなれば、他の関係を用いて高速動きリスク指標が算出されてもよい。
 以上のように、本実施形態では、位置合わせ部330における位置合わせ可能な最大範囲を基準として、リスク指標が算出される。位置合わせ可能な最大範囲が過剰に狭い場合、位置合わせができないと判断される蓋然性が高くなり、EDOFによる被写界深度の拡大効果が損なわれる。一方、最大範囲が過剰に広い場合、動きが高速の場合も位置合わせ、及び深度拡大画像の合成が実行されてしまうため、アーチファクトの発生につながる。また、最大範囲が過剰に広い場合、探索範囲が広いため計算負荷も大きい。即ち、位置合わせ可能な最大範囲は、種々の条件を考慮した合理的な値として設定されていると考えられる。そのため、リスク指標の算出においても当該最大範囲を基準とすることによって、適切に高速動きリスク指標を算出することが可能になる。なお、本実施形態の高速動きベクトル検出部353は、位置合わせ部330に比べて大きな動きを検出する必要がある。しかし高速動きリスク指標算出用の動きベクトルは、位置合わせに比べて精度が必要とならないため、縮小画像を処理対象とすること等によって、処理負荷の軽減が可能である。
 なお、高速動きリスク指標を二値で求める場合と多値で求める場合のいずれにおいても、1つの動きベクトルから1つの高速動きリスク指標を算出可能である。本実施形態では、高速動きベクトル検出部353は縮小画像全体に対して1つの動きベクトルを求め、高速動きリスク指標算出部354は当該動きベクトルから1つの高速動きリスク指標を算出してもよい。これはブロックマッチングのブロックサイズが縮小画像のサイズと等しい場合に相当する。この場合、1枚の深度拡大画像に対して1つの高速動きリスク指標が算出される。
 或いは高速動きベクトル検出部353は縮小画像に対して複数の動きベクトルを求め、高速動きリスク指標算出部354は当該複数の動きベクトルのそれぞれから高速動きリスク指標を算出することによって、1フレーム当たり複数の高速動きリスク指標を算出してもよい。換言すれば、1つの深度拡大画像に複数の局所領域が設定され、各局所領域において高速動きリスク指標が算出される。或いは、高速動きリスク指標算出部354は、複数の高速動きリスク指標を算出し、それらの平均値等の統計値を求めることによって、1フレーム当たり1つの高速動きリスク指標を算出してもよい。
 図4は高速動きリスク指標算出処理を説明するフローチャートである。この処理が開始されると、第1画像縮小部351は、前処理部310からの画像を縮小する(S101)。第2画像縮小部352は、フレームメモリ320からの画像を縮小する(S102)。高速動きベクトル検出部353は、S101において取得された縮小画像とS102において取得された縮小画像に基づいて、動きベクトルを検出する(S103)。高速動きリスク指標算出部354は、動きベクトルによって表される動き量Mが、位置合わせにおいて検出可能な最大動き量Th1よりも大きいか否かを判定する(S104)。
 M≦Th1の場合(S104でNo)、高速動きリスク指標算出部354は、リスク指標を“0”と算出する(S105)。M>Th1の場合(S104でYes)、高速動きリスク指標算出部354は、リスク指標を“1”、或いは図3を用いて説明した値とする(S106)。
 また図2では、リスク指標算出部350がリスク指標算出用の動きベクトル検出を行う構成を示したが、上述した通り、動きベクトルは位置合わせ部330において検出されてもよい。リスク指標算出部350は、図2の構成のうち、第1画像縮小部351、第2画像縮小部352及び高速動きベクトル検出部353が省略される。位置合わせ部330は、位置合わせ用の動きベクトルを検出する処理と、第1画像縮小部351、第2画像縮小部352及び高速動きベクトル検出部353に相当する処理を行う。即ち、位置合わせ部330は、前処理部310から出力される画像及びフレームメモリ320から出力される画像を縮小し、縮小画像とに基づいて動きベクトルを検出する。縮小画像に基づいて検出された動きベクトルは、リスク指標算出部350の高速動きリスク指標算出部354に出力される。例えば位置合わせ部330は、ウェーブレット変換等の多重解像度解析を行うことによって、位置合わせとリスク指標算出部350への動きベクトルの出力とを行ってもよい。
 或いは、位置合わせ部330は、画像縮小を行わずに、位置合わせが可能な最大範囲を超える範囲を探索範囲として動きベクトルを検出する処理を行ってもよい。そして位置合わせ部330は、検出された動きベクトルが最大範囲以下の場合に位置合わせを行う。また位置合わせ部330は、動きベクトルの情報をリスク指標算出部350の高速動きリスク指標算出部354に出力する。
2.3 ランダム動きリスク指標
 内視鏡装置12を用いて撮像される画像においては、被写体の動きは、挿入部100の動きに起因するものが主と考えられる。挿入部100の動きは、被写体との距離を変化させる光軸方向における移動、並進移動、回転移動等、種々の動きが考えられる。いずれの移動であっても、画像上の被写体は挿入部100の移動に応じた方向に動く。即ち、画像に対して複数の動きベクトルが検出される場合、所与の動きベクトルは、その周辺の動きベクトルとある程度の相関を有すると考えられる。
 よって、動きベクトルが画像に対して複数検出される場合、リスク指標算出部350は、複数の動きベクトルの間の相関に基づいて、リスク指標を算出する。より具体的には、リスク指標算出部350は、複数の動きベクトルの間の相関が低いほど、リスクが高くなるようなリスク指標を算出する。ここでのリスク指標をランダム動きリスク指標と表記する。動きベクトル間の相関が低い場合とは、各動きベクトルの精度が低い場合に対応する。例えば、送水や発煙のように、被写体の視認性が著しく低下した場合等に、動きベクトルの相関が低下すると考えられる。
 図5は、ランダム動きリスク指標算出処理を説明する図である。図5の例では、画像上に複数の動きベクトルが検出されている。リスク指標算出部350は、所与の動きベクトルを注目ベクトルに設定した上で、当該注目ベクトルとその周辺の動きベクトルとの相関が低い場合、ランダム動きリスク指標を“1”と算出する。注目ベクトルと周辺の動きベクトルの相関が高い場合、リスク指標算出部350は、ランダム動きリスク指標を“0”と算出する。リスク指標算出部350は、例えば相関を表す値と所与の閾値との比較処理に基づいて、当該相関が高いか否かを判定する。また、周辺の動きベクトルとは、上下左右の4つであってもよいし、周囲8つであってもよいし、他の組み合わせであってもよい。例えばV0を注目ベクトルに設定した場合、V2,V4,V5,V7との相関を用いてもよいし、V1~V8との相関を用いてもよい。
 より具体的には、リスク指標算出部350は、周辺の動きベクトルとの差分ベクトルの大きさVDが閾値Th2よりも大きければ、ランダム動きリスク指標を“1”と算出する。なお、周辺の動きベクトルとして4つ或いは8つ等の複数の動きベクトルを用いる場合、注目ベクトルとの差分ベクトルも複数求められる。閾値との比較に用いられる差分ベクトルの大きさとは、複数の差分ベクトルの大きさの総和、平均値、最大値等の種々の統計値を用いることが可能である。このようにすることで、送水シーンなどの状況に起因して位置合わせができない場合のリスク指標を算出することができる。
 図6は、ランダム動きリスク指標算出処理を説明するフローチャートである。この処理が開始されると、リスク指標算出部350は、注目ベクトルを設定し(S201)、注目ベクトルと周辺の動きベクトルとの差分ベクトルを求める(S202)。そしてリスク指標算出部350は、差分ベクトルの大きさVDが所与の閾値Th2よりも大きいか否かを判定する(S203)。
 VD≦Th2の場合(S203でNo)、リスク指標算出部350は、リスク指標を“0”と算出する(S204)。VD>Th2の場合(S203でYes)、高速動きリスク指標算出部354は、リスク指標を“1”と算出する(S205)。
 なお、動きベクトルがリスク指標算出部350において算出されてもよいし、位置合わせ部330において算出されてもよい点は上述した通りである。また、送水シーンや発煙シーンは、画像全体において位置合わせが困難な状況と考えられる。よってリスク指標算出部350は、画像全体に対して1つのランダム動きリスク指標を求める。ただし、本実施形態の手法はこれに限定されず、画像を複数の領域に区分し、リスク指標算出部350は、領域ごとにランダム動きリスク指標を求めてもよい。例えばリスク指標算出部350は、注目ベクトルを複数設定することによって、差分ベクトルを複数求めてもよい。そしてリスク指標算出部350は、注目ベクトルごとにランダム動きリスク指標を求めてもよいし、複数の注目ベクトルに基づいて1つのランダム動きリスク指標を求めてもよい。
 また、送水シーンや発煙シーンにおいては位置合わせが非常に困難であり、“0”と“1”の間の中間的なリスク指標は想定しづらい。よって図6では、リスク指標算出部350が、ランダム動きリスク指標を二値で求める例を説明した。ただし、リスク指標算出部350が、ランダム動きリスク指標を多値で求めることも妨げられない。
2.4 平坦領域リスク指標、周期構造リスク指標
 また、動きベクトルは、探索範囲内において、フォーカス位置の異なる複数の画像間の相関を表す探索評価値を求め、相関が最大となる探索評価値を探索することによって検出されるベクトルである。ここでの探索評価値は、例えばSAD(Sum of Absolute Difference)、SSD(Sum of Squared Difference)、NCC(Normalized Cross Correlation)等、種々の評価値を適用可能である。SAD又はSSDを用いる場合、探索評価値が小さいほど、画像間の相関が高くなる。NNCを用いる場合、探索評価値が大きいほど、より具体的には1に近いほど、画像間の相関が高くなる。
 探索評価値が1つの明確なピークを有する場合、当該探索評価値によって決定される動きベクトルの信頼性は高いと判定可能である。一方、探索評価値に明確なピークが存在しない場合、当該探索評価値によって決定される動きベクトルの信頼性は低い。明確なピークが存在しない場合とは、具体的には、撮像対象の被写体が平坦な被写体である場合に対応する。被写体に特徴的な構造が少ないため、位置合わせが適切に行われず、深度拡大画像にアーチファクトが発生するリスクが高い。
 また、探索評価値にピークが存在する場合であっても、同程度のピークが複数存在する場合も、当該探索評価値によって決定される動きベクトルの信頼性は低い。ピークが複数存在する場合とは、具体的には、被写体が周期的な構造を有する場合に対応する。内視鏡装置12であれば、処置具等の人工物が撮像される場合があり、処置具の根元部分等が周期的な構造を有する場合がある。この場合、複数のピークのうち、いずれを選択すればよいかの判断は難しいため、位置合わせが適切に行われず、深度拡大画像にアーチファクトが発生するリスクが高い。
 よってリスク指標算出部350は、相関が最大となる探索評価値と、相関が2番目に大きい探索評価値との差に基づいて、リスク指標を算出する。具体的には相関が最大となる探索評価値と、相関が2番目に大きい探索評価値との差が小さいと判定されるほど、リスクが高くなるようなリスク指標を算出する。リスク指標算出部350は、差分情報によって表される差分が小さい場合に、差が小さいと判定する。或いはリスク指標算出部350は、比率情報によって表される比率が1に近い場合に、差が小さいと判定する。なお、ここでの差分情報は、差分そのものであってもよいがこれには限定されず、差分に基づく種々の情報を含んでもよい。例えば、差分値に対して正規化処理或いは補正処理等の種々の処理が行われた情報を差分情報としてもよい。比率情報についても同様であり、比率そのものであってもよいし、比率に基づき求められる情報であってもよい。
 図7は、探索評価値のピーク値を求める処理を説明するフローチャートである。この処理が開始されると、まず位置合わせ部330は、最小評価値及び第2評価値の値を0を用いて初期化する(S301)。ここではSAD或いはSSDのように、探索評価値が小さいほど相関が高い例を考えている。即ち、最小評価値とは、相関が最も高いと判定される探索評価値である。また第2評価値とは2番目に値が小さい探索評価値であり、相関が2番目に高いと判定される探索評価値である。
 位置合わせ部330は、探索範囲内の所与の位置を探索位置として決定し(S302)、その後、決定された探索位置における探索評価値を算出する(S303)。探索評価値がSADである場合、S303は、テンプレートとなる画像領域(ブロック)と、探索位置における画像領域との差分絶対値和を演算する処理である。
 次に位置合わせ部330は、S303で求めた探索評価値と最小評価値を比較し、最小評価値>探索評価値であるか否かを判定する(S304)。探索評価値が最小評価値よりも小さい場合(S304でYes)、第2評価値を最小評価値で置き換えるとともに、最小評価値の値をS303で求めた探索評価値の値に置き換える(S305)。
 探索評価値が最小評価値以上である場合(S304でNo)、第2評価値>探索評価値であるか否かを判定する(S306)。探索評価値が第2評価値よりも小さい場合(S306でYes)、第2評価値の値をS303で求めた探索評価値の値に置き換える(S307)。探索評価値が第2評価値以上である場合(S306でNo)、最小評価値と第2評価値の値を維持する。
 位置合わせ部330は、探索範囲内の探索が完了したか否かを判定し(S308)、Noの場合はS302に戻り処理を継続する。探索範囲内の探索が完了したら、探索評価値のピークを求める処理を終了する。なお動きベクトルを求める場合、位置合わせ部330は、最小評価値に対応する探索位置を記憶しておき、基準位置と当該探索位置とを結ぶベクトルを動きベクトルとして位置合わせを行う。
 なお、以上では位置合わせ部330において探索評価値のピーク値を求める処理が行われる例を説明したが、図7の処理は動きベクトルを求める処理と重複する部分が多い。即ち、リスク指標算出部350において動きベクトルが検出される場合、リスク指標算出部350が図7を用いて説明した処理を実行してもよい。
 図8は、平坦領域リスク指標又は周期構造リスク指標の算出処理を説明するフローチャートである。この処理が開始されると、リスク指標算出部350は、最小評価値及び第2評価値を取得し(S401)、最小評価値と第2評価値の差分を求める(S402)。そしてリスク指標算出部350は、差分の大きさDifが所与の閾値Th3より小さいか否かを判定する(S403)。Dif≧Th3の場合(S403でNo)、リスク指標算出部350は、リスク指標を“0”と算出する(S404)。Dif<Th3の場合(S403でYes)、リスク指標算出部350は、リスク指標を“1”と算出する(S405)。
 このようにすることで、処置具の根元のような繰り返しパターンや平坦な被写体に対してリスク指標を算出できる。
 なお、平坦領域リスク指標又は周期構造リスク指標は、画像全体を対象として1つの値が求められてもよいし、領域ごとに求められてもよい。また図8では、リスク指標算出部350が、平坦領域リスク指標又は周期構造リスク指標を二値で求める例を説明したが、リスク指標算出部350が、平坦領域リスク指標又は周期構造リスク指標を多値で求めることも妨げられない。
2.5 リスク指標算出の変形例
 以上では平坦領域リスク指標の算出に動きベクトルの探索評価値を用いる例を説明した。ただし、平坦領域リスク指標は、被写体が平坦であるか否かの判定結果に基づいて算出できるため、上記探索評価値以外を用いても算出可能である。
 図9は、リスク指標算出部350の他の構成例を説明する図である。リスク指標算出部350は、フォーカス位置の異なる複数の画像のコントラスト値を算出するコントラスト算出部355を更に含む。コントラスト算出部355は、前処理部310から出力される画像のコントラスト値と、フレームメモリ320から出力される画像のコントラスト値を算出する。コントラスト算出部355は、算出したコントラスト値を、平坦領域リスク指標算出部356に出力する。
 平坦領域リスク指標算出部356は、コントラスト値が所与の閾値よりも小さい場合、リスクが高くなるようなリスク指標を算出する。ここでのコントラスト値は、フォーカス位置の異なる複数の画像から求められる複数のコントラスト値のいずれか1つであってもよいし、平均値或いは最小値等の統計値であってもよい。またコントラスト値は、例えば公知のバンドパスフィルタ出力である。ここでのバンドパスフィルタは、内視鏡装置12によって撮像される典型的な構造を抽出可能な周波数特性を有する。典型的な構造とは、例えば血管構造である。なお、画像からコントラスト値を検出する手法は広く知られており、本実施形態ではそれらを広く適用可能である。
 平坦領域リスク指標算出部356は、コントラスト値Ctと所与の閾値Th4とを比較する。平坦領域リスク指標算出部356は、Ct<Th4であればリスク指標を“1”と算出し、Ct≧Th4であればリスク指標を“0”と算出する。
 また以上では、リスク指標算出部350は、深度拡大画像の全体を対象として、リスク指標を求めることを想定していた。即ち、深度拡大画像全体から1つのリスク指標が求められるにせよ、深度拡大画像の局所領域ごとにリスク指標が求められるにせよ、深度拡大画像の任意の位置において、当該位置に対応するリスク指標を特定可能である状況を想定していた。このようにすれば、画像の広い範囲において深度拡大とアーチファクトの抑制のバランスを取ることが可能になる。
 ただし、リスク指標算出部350は、深度拡大画像の一部の領域を対象として、リスク指標を求めてもよい。換言すれば、リスク指標算出の対象領域を深度拡大画像の一部に限定してもよい。
 例えば、挿入部100の先端から電気メスや鉗子等の処置具を出して処置を行う場合、処置具の周辺領域ではアーチファクトの発生リスクが高い。例えば、挿入部100の先端から処置具を出し入れする場合、画像上での処置具の位置が変化する。或いは、処置具を出したまま挿入部100を移動させた場合、画像上での処置具の位置が固定であるものの、背景に相当する被写体が移動する。いずれにせよ、被写体の一部が処置具によって遮られて撮像されなくなる等の要因によって、位置合わせが適切に行われず、アーチファクトが発生するおそれがある。
 このような場合、リスク指標算出部350は、深度拡大画像のうち、処置具が撮像される領域周辺の一部領域を、リスク指標算出の対象とする。これにより、重要度の高い領域に絞った効率的なリスク指標算出が可能になる。処置具が画像のどの領域に撮像されるかは、挿入部100や処置具の構造に基づいて決定可能である。よってリスク指標算出の対象となる一部領域は、予め決定された領域であってもよい。或いは、処置具は生体に比べて彩度が低く、画像処理による検出が可能である。よって処理部300は、撮像される画像から処置具領域を検出する処理を行い、検出された処置具領域を含む領域を、リスク指標算出の対象領域として設定してもよい。
3.アーチファクト補正
 次に、算出されたリスク指標に基づく深度拡大画像の補正処理について説明する。補正処理は、具体的には深度拡大画像と元画像のブレンド又は置換である。なお、以下で説明するリスク指標は、上述した種々のリスク指標のうちのいずれか1つであってもよいし、2以上の組み合わせであってもよい。2以上のリスク指標が入力される場合、例えばアーチファクト補正部360は、アーチファクトの抑制を重視する観点から、複数のリスク指標のうちの最大値を用いて後述する補正処理を行う。ただし、複数のリスク指標の平均値を用いる等、具体的な処理は種々の変形実施が可能である。
3.1 ブレンド処理
 アーチファクト補正部360は、リスク指標に基づいて、深度拡大画像の少なくとも1画素以上を、フォーカス位置の異なる複数の画像のいずれかの画像とブレンドする補正処理を行う。ここで2つの画像のブレンドとは、一方の画像の画素値と、他方の画像の画素値を重み付け加算することによって、補正画像の画素値を求める処理に相当する。具体的には、アーチファクト補正部360は、下式(1)を用いて、補正画像の各画素の画素値を決定する。下式(1)のαは、リスク指標に基づいて決定されるブレンド率である。
 補正画像=(1.0-α)×深度拡大画像+α×元画像 …(1)
 図10は、リスク指標とブレンド率αの関係を説明する図である。図10の横軸はリスク指標の値を表し、縦軸はブレンド率αを表す。アーチファクト補正部360は、許容可能なリスク指標の上限値である許容リスクを設定しておく。許容リスクとは、アーチファクトが発生する可能性が低く、深度拡大画像をそのまま表示しても問題が発生しにくいと考えられるリスク指標の上限値である。許容リスクは、固定値であってもよい。或いは許容リスクは、観察対象となる被写体、或いは過去に算出されたリスク指標の履歴等に基づいて、動的に値が設定されてもよい。図10に示したように、算出されたリスク指標が許容リスク以下の範囲においては、ブレンド率αは0に設定される。即ち、補正画像として深度拡大画像がそのまま出力される。算出されたリスク指標が許容リスクよりも大きい場合、リスク指標が大きくなるほど、ブレンド率αが大きくなり、補正画像における元画像の寄与度が高くなる。ただし、上式(1)を用いる場合、ブレンド率αの最大値は1である。
 ここでの元画像とは、深度拡大画像の合成に用いられたフォーカス位置の異なるM枚の画像のうちの、いずれかの画像である。深度拡大画像が、位置合わせの基準画像に対して、他のM-1枚の画像を位置合わせすることによって合成される画像であることに鑑みれば、ブレンド対象となる元画像とは、位置合わせの基準画像であることが望ましい。位置合わせの基準画像は、上述したように前処理部310から出力される最新の画像である。
 ただし、位置合わせの基準画像を、フレームメモリ320から出力される画像とすることは妨げられない。また、ブレンド対象となる元画像として、位置合わせの基準画像以外の画像が用いられることも妨げられない。例えばアーチファクト補正部360は、複数のフォーカス位置のそれぞれについて、選択評価値を設定しておき、当該選択評価値の高いフォーカス位置において撮像された画像をブレンド対象として選択してもよい。選択評価値は、合焦していると判定された領域の広さ等から求めてもよいし、過去にブレンド対象として選択された回数等から求めてもよい。
 なお、上式(1)からわかるように、ブレンドによる補正処理はリスク指標が多値で求められている場合との親和性が高い。リスク指標が多値であれば、リスク指標の値に応じて、ブレンド率を柔軟に設定可能なためである。また、上式(1)による補正処理は、深度拡大画像に対して複数のリスク指標が求められている場合との親和性が高い。画像内にリスク指標の高い領域とそうでない領域が混在する場合、上式(1)を用いてリスク指標に応じたブレンド率を設定することによって、領域の境界を目立たせることなく自然な補正画像を得ることが可能なためである。
 ただし、本実施形態では、リスク指標が二値で求められる場合に、ブレンドによる補正処理を行うことは妨げられない。例えばアーチファクト補正部360は、リスク指標が“0”の場合に深度拡大画像をそのまま補正画像として出力し、リスク指標が“1”の場合に、深度拡大画像と元画像が所与のブレンド率を用いてブレンドされた補正画像を出力する。
 また、本実施形態では、深度拡大画像に対して1つのリスク指標が求められる場合に、ブレンドによる補正処理を行うことも妨げられない。例えばアーチファクト補正部360は、画像全体において同じブレンド率を用いて、深度拡大画像と元画像をブレンドした画像を、補正画像として出力する。
3.2 置換処理
 アーチファクト補正部360は、リスク指標に基づいて、深度拡大画像の少なくとも1画素以上を、フォーカス位置の異なる複数の画像のいずれかの画像と置換する補正処理を行ってもよい。置換対象となる画像についても、ブレンドの場合と同様に種々の変形実施が可能である。
 置換による補正処理はリスク指標が二値で求められている場合との親和性が高い。アーチファクト補正部360は、リスク指標が“0”であれば深度拡大を優先して、深度拡大画像の画素値を補正画像の画素値とする。アーチファクト補正部360は、リスク指標が“1”であればアーチファクトの抑制を優先して、深度拡大画像を元画像によって置換する。置換とは、元画像の画素値を補正画像の画素値とする処理に相当する。
 ただし、リスク指標が多値で求められる場合に、置換による補正処理を行うことは妨げられない。例えばアーチファクト補正部360は、リスク指標が所与の閾値以下の場合に深度拡大画像をそのまま補正画像として出力し、リスク指標が当該所与の閾値よりも大きい場合に、深度拡大画像を元画像によって置換する。ここでの閾値は、例えば図10に示した許容リスクである。
 また置換の場合、ブレンドと異なり、深度拡大画像と元画像の中間的な画像が生成されない。領域の境界を目立たせないという観点からすれば、置換を用いた補正処理は、深度拡大画像に対して複数のリスク指標が求められている場合よりも、深度拡大画像に対して1つのリスク指標が求められている場合との親和性が高い。ただし、深度拡大画像に対して複数のリスク指標が求められる場合に、置換を用いた補正処理を行うことも妨げられない。
 なお、画像全体においてリスク指標によって表されるリスクが高い場合、一部でも深度拡大画像を出力するとアーチファクトが目立つ場合が多いため、アーチファクト抑制を優先して元画像をそのまま出力することが望ましい。
 ただし、深度拡大画像が元画像によって置換された場合、補正画像に深度拡大画像が寄与しないため、被写界深度が狭く被写体がぼけて撮像されているおそれがある。よって、アーチファクト補正部360は、フォーカス位置の異なる複数の画像のいずれかの画像のうち、少なくとも深度拡大画像との置換対象となる領域を強調処理する強調部361を更に含んでもよい。アーチファクト補正部360(置換処理部362)は、リスク指標に基づいて、深度拡大画像の少なくとも1画素以上を、強調処理が行われた画像と置換する補正処理を行う。
 図11は、アーチファクト補正部360の構成例を説明する図である。アーチファクト補正部360は、強調部361と、置換処理部362を含む。強調部361は、前処理部310からの画像を、置換処理の元画像として取得し、強調処理を行う。ここでの強調処理は、元画像の構造を強調する処理であり、具体的にはエッジ強調処理である。置換処理部362には、強調部361からの強調処理後の元画像と、深度拡大部340からの深度拡大画像と、リスク指標算出部350からのリスク指標が入力される。置換処理部362は、リスク指標に基づいて、深度拡大画像を強調処理後の元画像を用いて置換する処理を行う。このようにすれば、置換によって被写界深度が拡大されなくなる場合であっても、被写体の構造の視認性を高めることが可能になる。
 以上、本発明を適用した実施形態およびその変形例について説明したが、本発明は、各実施形態やその変形例そのままに限定されるものではなく、実施段階では、発明の要旨を逸脱しない範囲内で構成要素を変形して具体化することができる。また、上記した各実施形態や変形例に開示されている複数の構成要素を適宜組み合わせることによって、種々の発明を形成することができる。例えば、各実施形態や変形例に記載した全構成要素からいくつかの構成要素を削除してもよい。さらに、異なる実施の形態や変形例で説明した構成要素を適宜組み合わせてもよい。このように、発明の主旨を逸脱しない範囲内において種々の変形や応用が可能である。また、明細書又は図面において、少なくとも一度、より広義または同義な異なる用語と共に記載された用語は、明細書又は図面のいかなる箇所においても、その異なる用語に置き換えることができる。
12…内視鏡装置、100…挿入部、110…ライトガイド、200…撮像部、210…対物光学系、220…撮像素子、230…A/D変換部、300…処理部、310…前処理部、320…フレームメモリ、330…位置合わせ部、340…深度拡大部、350…リスク指標算出部、351…第1画像縮小部、352…第2画像縮小部、353…高速動きベクトル検出部、354…高速動きリスク指標算出部、355…コントラスト算出部、356…平坦領域リスク指標算出部、360…アーチファクト補正部、361…強調部、362…置換処理部、370…後処理部、380…制御部、390…フォーカス制御部、400…表示部、500…外部I/F部、600…照明部、610…白色光源

Claims (15)

  1.  フォーカス位置の異なる複数の画像を異なるタイミングにおいて取得する撮像部と、
     前記フォーカス位置の異なる複数の画像を位置合わせする位置合わせ部と、
     前記位置合わせ部が位置合わせした前記フォーカス位置の異なる複数の画像から、1枚の深度拡大画像を合成することによって、被写界深度を拡大する深度拡大部と、
     前記深度拡大画像にアーチファクトが発生するリスクの度合いを表すリスク指標を求めるリスク指標算出部と、
     前記リスク指標に基づいて、前記深度拡大画像を補正するアーチファクト補正部と、
     を含むことを特徴とする内視鏡装置。
  2.  請求項1において、
     前記リスク指標算出部は、
     前記フォーカス位置の異なる複数の画像間の動きベクトルに基づいて、前記リスク指標を求めることを特徴とする内視鏡装置。
  3.  請求項2において、
     前記位置合わせ部は、
     前記フォーカス位置の異なる複数の画像に基づいて前記動きベクトルを検出し、
     前記リスク指標算出部は、
     前記位置合わせ部が検出した前記動きベクトルに基づいて、前記リスク指標を求めることを特徴とする内視鏡装置。
  4.  請求項2において、
     前記リスク指標算出部は、
     前記フォーカス位置の異なる複数の画像に基づいて前記動きベクトルを検出し、検出した前記動きベクトルに基づいて、前記リスク指標を求めることを特徴とする内視鏡装置。
  5.  請求項2において、
     前記位置合わせ部は、位置合わせ可能な最大範囲が設定され、
     前記リスク指標算出部は、
     前記動きベクトルによって表される動き量が前記最大範囲よりも大きい場合、前記リスクが高いと判定される前記リスク指標を算出することを特徴とする内視鏡装置。
  6.  請求項2において、
     前記動きベクトルは前記画像に対して複数検出され、
     前記リスク指標算出部は、
     複数の前記動きベクトルの間の相関に基づいて、前記リスク指標を算出することを特徴とする内視鏡装置。
  7.  請求項2において、
     前記動きベクトルは、探索範囲内において、前記フォーカス位置の異なる複数の画像間の相関を表す探索評価値を求め、前記相関が最大となる前記探索評価値を探索することによって検出されるベクトルであり、
     前記リスク指標算出部は、
     前記相関が最大となる前記探索評価値と、前記相関が2番目に大きい前記探索評価値との差分情報又は比率情報に基づいて、前記リスク指標を算出することを特徴とする内視鏡装置。
  8.  請求項1において、
     前記リスク指標算出部は、
     前記フォーカス位置の異なる複数の画像のコントラスト値を算出するコントラスト算出部を更に含み、
     前記リスク指標算出部は、
     前記コントラスト値が所与の閾値よりも小さい場合、前記リスクが高いと判定される前記リスク指標を算出することを特徴とする内視鏡装置。
  9.  請求項1において、
     前記リスク指標算出部は、
     前記深度拡大画像の一部の領域を対象として、前記リスク指標を求めることを特徴とする内視鏡装置。
  10.  請求項1において、
     前記リスク指標算出部は、
     前記深度拡大画像の全体を対象として、前記リスク指標を求めることを特徴とする内視鏡装置。
  11.  請求項1において、
     前記アーチファクト補正部は、
     前記リスク指標に基づいて、前記深度拡大画像の少なくとも1画素以上を、前記フォーカス位置の異なる複数の画像のいずれかの画像と置換する補正処理を行うことを特徴とする内視鏡装置。
  12.  請求項1において、
     前記アーチファクト補正部は、
     前記リスク指標に基づいて、前記深度拡大画像の少なくとも1画素以上を、前記フォーカス位置の異なる複数の画像のいずれかの画像とブレンドする補正処理を行うことを特徴とする内視鏡装置。
  13.  請求項11において、
     前記アーチファクト補正部は、
     前記フォーカス位置の異なる複数の画像のいずれかの画像のうち、少なくとも前記深度拡大画像との置換対象となる領域を強調処理する強調部を更に含み、
     前記アーチファクト補正部は、
     前記リスク指標に基づいて、前記深度拡大画像の少なくとも1画素以上を、前記強調処理が行われた画像と置換する補正処理を行うことを特徴とする内視鏡装置。
  14.  フォーカス位置の異なる複数の画像を異なるタイミングにおいて取得し、
     前記フォーカス位置の異なる複数の画像を位置合わせし、
     位置合わせした前記フォーカス位置の異なる複数の画像から、1枚の深度拡大画像を合成することによって、被写界深度を拡大し、
     前記深度拡大画像にアーチファクトが発生するリスクの度合いを表すリスク指標を求め、
     前記リスク指標に基づいて、前記深度拡大画像を補正する、
     ことを特徴とする内視鏡装置の作動方法。
  15.  フォーカス位置の異なる複数の画像を異なるタイミングにおいて取得し、
     前記フォーカス位置の異なる複数の画像を位置合わせし、
     位置合わせした前記フォーカス位置の異なる複数の画像から、1枚の深度拡大画像を合成することによって、被写界深度を拡大し、
     前記深度拡大画像にアーチファクトが発生するリスクの度合いを表すリスク指標を求め、
     前記リスク指標に基づいて、前記深度拡大画像を補正する、
     ステップをコンピュータに実行させることを特徴とするプログラム。
PCT/JP2018/028891 2018-08-01 2018-08-01 内視鏡装置、内視鏡装置の作動方法及びプログラム WO2020026383A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2018/028891 WO2020026383A1 (ja) 2018-08-01 2018-08-01 内視鏡装置、内視鏡装置の作動方法及びプログラム
JP2020533971A JP6942892B2 (ja) 2018-08-01 2018-08-01 内視鏡装置、内視鏡装置の作動方法及びプログラム
US17/145,475 US20210136257A1 (en) 2018-08-01 2021-01-11 Endoscope apparatus, operating method of endoscope apparatus, and information storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/028891 WO2020026383A1 (ja) 2018-08-01 2018-08-01 内視鏡装置、内視鏡装置の作動方法及びプログラム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/145,475 Continuation US20210136257A1 (en) 2018-08-01 2021-01-11 Endoscope apparatus, operating method of endoscope apparatus, and information storage medium

Publications (1)

Publication Number Publication Date
WO2020026383A1 true WO2020026383A1 (ja) 2020-02-06

Family

ID=69230617

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/028891 WO2020026383A1 (ja) 2018-08-01 2018-08-01 内視鏡装置、内視鏡装置の作動方法及びプログラム

Country Status (3)

Country Link
US (1) US20210136257A1 (ja)
JP (1) JP6942892B2 (ja)
WO (1) WO2020026383A1 (ja)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11185018A (ja) * 1997-12-24 1999-07-09 Olympus Optical Co Ltd 画像処理装置
JP2013228798A (ja) * 2012-04-24 2013-11-07 Olympus Corp 画像処理装置、撮像装置、内視鏡、プログラム及び画像処理方法
JP2017006330A (ja) * 2015-06-19 2017-01-12 ソニー株式会社 医療用画像処理装置、医療用画像処理方法、及び、医療用観察システム
WO2017122287A1 (ja) * 2016-01-13 2017-07-20 オリンパス株式会社 内視鏡装置及び内視鏡装置の作動方法
US20170351103A1 (en) * 2016-06-07 2017-12-07 Karl Storz Gmbh & Co. Kg Endoscope and imaging arrangement providing depth of field

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4438099B2 (ja) * 2007-11-22 2010-03-24 カシオ計算機株式会社 撮像装置及びそのプログラム
JP5216710B2 (ja) * 2009-07-24 2013-06-19 日立コンシューマエレクトロニクス株式会社 復号化処理方法
JP2012019337A (ja) * 2010-07-07 2012-01-26 Olympus Corp 画像処理装置及び方法並びにプログラム

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11185018A (ja) * 1997-12-24 1999-07-09 Olympus Optical Co Ltd 画像処理装置
JP2013228798A (ja) * 2012-04-24 2013-11-07 Olympus Corp 画像処理装置、撮像装置、内視鏡、プログラム及び画像処理方法
JP2017006330A (ja) * 2015-06-19 2017-01-12 ソニー株式会社 医療用画像処理装置、医療用画像処理方法、及び、医療用観察システム
WO2017122287A1 (ja) * 2016-01-13 2017-07-20 オリンパス株式会社 内視鏡装置及び内視鏡装置の作動方法
US20170351103A1 (en) * 2016-06-07 2017-12-07 Karl Storz Gmbh & Co. Kg Endoscope and imaging arrangement providing depth of field

Also Published As

Publication number Publication date
JP6942892B2 (ja) 2021-09-29
JPWO2020026383A1 (ja) 2021-05-13
US20210136257A1 (en) 2021-05-06

Similar Documents

Publication Publication Date Title
JP5814698B2 (ja) 自動露光制御装置、制御装置、内視鏡装置及び内視鏡装置の作動方法
JP5562808B2 (ja) 内視鏡装置及びプログラム
JP5663331B2 (ja) 制御装置、内視鏡装置、絞り制御方法及びプログラム
US10666852B2 (en) Focus control device, endoscope apparatus, and method for operating focus control device
US10820787B2 (en) Endoscope device and focus control method for endoscope device
US10617282B2 (en) Endoscope apparatus and method for focusing based on motion information
JPWO2018003503A1 (ja) 画像処理装置および画像処理方法、並びに医療用撮像システム
JP6453905B2 (ja) フォーカス制御装置、内視鏡装置及びフォーカス制御装置の制御方法
US11141050B2 (en) Autofocus control device, endoscope apparatus, and operation method of autofocus control device
US11272092B2 (en) Imaging device, endoscope apparatus, and operating method of imaging device
US11196926B2 (en) Blur correction device, endoscope apparatus, and blur correction method
US10799085B2 (en) Endoscope apparatus and focus control method
JP6242230B2 (ja) 画像処理装置、内視鏡装置、画像処理装置の作動方法及び画像処理プログラム
JP6377171B2 (ja) 画像処理装置、内視鏡装置及び画像処理方法
WO2020026383A1 (ja) 内視鏡装置、内視鏡装置の作動方法及びプログラム
JP6653386B2 (ja) 画像処理装置、内視鏡システム、プログラム及び画像処理装置の作動方法
WO2022126516A1 (en) Adaptive image noise reduction system and method
CN115719313A (zh) 图像除雾方法、存储介质和系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18928344

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020533971

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18928344

Country of ref document: EP

Kind code of ref document: A1