WO2016117107A1 - 内視鏡装置及び内視鏡装置のフォーカス制御方法 - Google Patents

内視鏡装置及び内視鏡装置のフォーカス制御方法 Download PDF

Info

Publication number
WO2016117107A1
WO2016117107A1 PCT/JP2015/051785 JP2015051785W WO2016117107A1 WO 2016117107 A1 WO2016117107 A1 WO 2016117107A1 JP 2015051785 W JP2015051785 W JP 2015051785W WO 2016117107 A1 WO2016117107 A1 WO 2016117107A1
Authority
WO
WIPO (PCT)
Prior art keywords
movement amount
optical axis
motion
amount
threshold
Prior art date
Application number
PCT/JP2015/051785
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/JP2015/051785 priority Critical patent/WO2016117107A1/ja
Priority to JP2016570443A priority patent/JP6574448B2/ja
Priority to CN201580074314.9A priority patent/CN107205626B/zh
Priority to DE112015005847.8T priority patent/DE112015005847T5/de
Publication of WO2016117107A1 publication Critical patent/WO2016117107A1/ja
Priority to US15/656,638 priority patent/US10820787B2/en

Links

Images

Classifications

    • 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/00002Operational features of endoscopes
    • A61B1/00004Operational features of endoscopes characterised by electronic signal processing
    • A61B1/00006Operational features of endoscopes characterised by electronic signal processing of control signals
    • 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
    • A61B1/000095Operational features of endoscopes characterised by electronic signal processing of image signals during a use of endoscope for image enhancement
    • 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/042Instruments 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 characterised by a proximal camera, e.g. a CCD camera
    • 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
    • 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/06Instruments 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 with illuminating arrangements
    • A61B1/0638Instruments 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 with illuminating arrangements providing two or more wavelengths
    • 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/06Instruments 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 with illuminating arrangements
    • A61B1/0661Endoscope light sources
    • A61B1/0669Endoscope light sources at proximal end of an endoscope
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B23/00Telescopes, e.g. binoculars; Periscopes; Instruments for viewing the inside of hollow bodies; Viewfinders; Optical aiming or sighting devices
    • G02B23/24Instruments or systems for viewing the inside of hollow bodies, e.g. fibrescopes
    • G02B23/2407Optical details
    • G02B23/2423Optical details of the distal end
    • G02B23/243Objectives for endoscopes

Definitions

  • the present invention relates to an endoscope apparatus, a focus control method of the endoscope apparatus, and the like.
  • an endoscope apparatus endoscope system
  • it is required to have as deep a depth of field as possible so as not to affect the diagnosis and treatment of the user.
  • an imaging device with high pixels is also used in an endoscope apparatus, and the depth of field is becoming shallow accordingly, so in order to compensate for that, autofocus (hereinafter referred to as AF) is performed
  • AF autofocus
  • the first method is a method of executing a focusing operation by using a change in contrast in an image as a trigger in AF in moving image shooting used in a video camera or the like.
  • the second method is a method disclosed in Patent Document 1. In this method, the relative position change of the subject and the camera is detected by the motion sensor, and the focusing operation is executed when the output (for example, angular acceleration, acceleration, etc.) of the motion sensor becomes a predetermined amount or more. .
  • an endoscope apparatus capable of performing appropriate focus control in various scenes assumed under an endoscopic procedure, a focus control method of the endoscope apparatus, and the like are provided. it can.
  • One aspect of the present invention includes a movement amount calculation unit that calculates a relative movement amount that is a relative movement amount between an imaging unit and a subject, and a focus control unit that performs focus control of the imaging unit,
  • the control unit obtains an accumulated movement amount obtained by accumulating the relative movement amount by N frames (N is a natural number of 3 or more (including its value)), and determines whether the accumulated movement amount is larger than a first threshold.
  • the present invention relates to an endoscope apparatus that performs a focusing operation of the imaging unit when it is determined that the necessary amount of focusing is determined and the accumulated motion amount is determined to be larger than the first threshold.
  • the relative amount of movement between the imaging unit and the subject is accumulated for N frames, and it is determined whether the accumulated amount of movement is larger than the first threshold.
  • the focusing operation of the imaging unit is performed. This makes it possible to perform appropriate focus control in various scenes assumed under an endoscopic procedure.
  • a relative movement amount which is a relative movement amount between an imaging unit and a subject is calculated, and the relative movement amount is N frames (N is a natural number of 3 or more (including its value)).
  • In-focus necessity determination processing is performed to obtain the accumulated amount of accumulated motion and determine whether the amount of accumulated motion is larger than the first threshold, and it is determined that the amount of accumulated motion is larger than the first threshold.
  • the present invention relates to a focus control method of an endoscope apparatus that performs the focusing operation of the imaging unit.
  • FIG. 1 is an explanatory view of an endoscopic procedure.
  • FIG. 2 is a structural example of the endoscope apparatus in 1st Embodiment.
  • FIG. 3 is a structural example of the endoscope apparatus in 2nd Embodiment.
  • FIG. 4 is a detailed configuration example of the imaging device.
  • FIG. 5 is an explanatory view of an optical axis vertical movement.
  • FIG. 6 is an explanatory view of the optical axis parallel movement.
  • FIG. 7 is a detailed configuration example of the movement amount calculation unit.
  • FIG. 8 is an example of a local motion vector.
  • FIG. 9 shows an example of a two-dimensional histogram.
  • FIG. 10 shows an example of a local motion vector.
  • FIG. 8 is an example of a local motion vector.
  • FIG. 11 is a flowchart of processing for calculating an optical axis parallel movement amount.
  • FIG. 12 is an explanatory view of a process of determining the direction of the optical axis parallel movement.
  • FIG. 13 is an explanatory view of a process of determining the direction of the optical axis parallel movement.
  • FIG. 14 is a flowchart of focus control processing.
  • FIG. 15 shows an example of setting a threshold according to the in-focus object position.
  • FIG. 16 is a flowchart of a process of determining whether or not the focusing operation is possible.
  • FIG. 17 is a structural example of the endoscope apparatus in 3rd Embodiment.
  • First Embodiment As described above, as a conventional method of AF control, for example, there are a first method using contrast change as a trigger, and a second method using a motion sensor output that is equal to or more than a predetermined amount as a trigger. Consider the case where these conventional techniques are applied to endoscopic procedures.
  • treatment for example, excision of a lesion, suturing, etc.
  • a treatment tool 4 for example, an electric knife or forceps.
  • the image includes not only the subject 6 but also the treatment tool 4 and the treatment tool 4 is moved by the user's operation, so the imaging range and focus are Even if it does not change, a contrast change occurs. An unnecessary focusing operation may be performed due to the contrast change by the treatment tool 4, and stable AF control becomes difficult during the operation of the treatment tool 4.
  • the focusing operation is not performed in the movement in which the output of the motion sensor is less than the predetermined amount, and thus the focusing operation may not be performed even if out of focus.
  • the photographing range is largely moved (or deviated from the depth of field).
  • the focusing operation is not performed.
  • Focusing operation is performed. If such an unintended focusing operation by the user is performed, there is a risk that the usability may be impaired.
  • FIG. 2 shows a configuration example of the endoscope apparatus of the present embodiment which can solve the above-mentioned problems.
  • the endoscope apparatus includes an imaging unit 200, a movement amount calculation unit 340 that calculates a relative movement amount that is a relative movement amount between the imaging unit 200 and the subject, and a focus control unit 350 that performs focus control of the imaging unit 200. And (AF control unit).
  • the imaging unit 200 may be configured to be attachable to and detachable from the endoscope apparatus, and the endoscope apparatus may not include the imaging unit 200.
  • the focus control unit 350 obtains an accumulated movement amount obtained by accumulating the relative movement amount by N frames (N is a natural number of 3 or more (including its value)), and determines whether the accumulated movement amount is larger than the first threshold. A focusing necessity determination process of determining is performed, and when it is determined that the accumulated motion amount is larger than the first threshold, the focusing operation of the imaging unit 200 is performed.
  • the focusing operation is required when the imaging range of the living body moves or when the living body or the treatment tool has a depth of field And so on.
  • the focus temporarily changes and the visibility decreases. For example, while the treatment is being performed, the treatment tool is operated without moving the imaging range, but if the focus changes at this time, the treatment may be disturbed.
  • the focusing operation can be performed when the focusing operation is required, such as when the imaging range of the living body moves or when the living body or the treatment tool deviates from the depth of field. Conversely, when only the treatment tool is moving, the focusing operation is not performed when the focusing operation is unnecessary.
  • the movement amount can be accumulated to be detected as a large movement amount (that is, movement of an imaging range or defocus is detected), and a focusing operation can be performed.
  • the accumulated movement amount becomes smaller (that is, it can be determined that movement of the imaging range or defocusing has not occurred). Can suppress the unintended focusing operation.
  • the movement of the treatment tool has more random movement than continued movement in a certain direction. Therefore, the movement amount of the treatment tool becomes smaller as it accumulates, and the accumulated movement amount of the living body becomes larger when there is movement in a fixed direction (movement of the imaging unit and the living body in a fixed relative direction) in the imaging range of the living body.
  • the amount of movement refers to a change in relative position between the imaging unit 200 and the subject (for example, movement without changing the optical axis direction of the camera) or a change in relative direction (for example, the optical axis direction of the camera It is an amount that changes according to the rotation (pan, tilt).
  • the size and direction of the motion vector change according to the movement or rotation of the imaging unit 200.
  • an acceleration, an angular acceleration, an angular velocity or the like corresponding to the movement or rotation of the imaging unit 200 can be obtained.
  • the movement amount may be an amount representing information on the magnitude of movement and information on the direction, or may be a amount representing one of information on the size of movement and information on the direction.
  • “+1”, “ ⁇ 1” and “0” are assigned to approach, departure, and no movement, which is an amount representing the direction of movement along the optical axis direction. ing.
  • the first threshold is a threshold for detecting relative movement between the imaging unit 200 and the subject represented by the accumulated motion amount. That is, the relative motion amount is the motion amount at intervals shorter than N frames (for example, the motion amount between frames), and it is the accumulated motion amount that is accumulated (for example, added and integrated). Therefore, the accumulated motion amount represents motion at intervals longer than the relative motion amount (that is, the amount of movement between N frames).
  • the relative movement amount corresponds to the speed of movement, and the movement amount (distance or direction) obtained by integrating it corresponds to the cumulative movement amount.
  • the movement amount can be determined by performing threshold determination on the accumulated movement amount. For example, a value corresponding to 1/3 or 1/2 of the image size can be employed as the first threshold.
  • the focusing operation is performed when the subject moves 1/3 or 1/2 of the image size on the image (that is, when the shooting range moves).
  • a value corresponding to the depth of field can be employed as the first threshold.
  • the focusing operation is performed when the subject deviates from the depth of field.
  • the accumulated motion amount is not limited to an amount when it accurately represents the size of movement, and may be an amount serving as a standard of the size of movement. For example, information on the direction of movement (for example, movement amount obtained by assigning “+1”, “ ⁇ 1”, “0” to approach, departure, and no movement) may be accumulated.
  • N frame is the number of frames in which relative motion amounts are accumulated, and N is not limited to fixed and may be a changing number.
  • the focus control refers to the entire process of controlling the focus of the imaging unit, including a focusing operation for adjusting focus, a standby state in which the focus is not moved, transition control between them, and the like.
  • the focusing operation is a series of operations for focusing on an object, and for example, a contrast method (hill climbing method), a method of determining a focusing direction by wobbling, or the like can be used.
  • FIG. 3 shows a configuration example of an endoscope apparatus (endoscope system) according to the second embodiment.
  • the endoscope apparatus includes a rigid endoscope 100 as an insertion unit into the body, an imaging unit 200 connected to the rigid endoscope 100, a processing unit 300, a display unit 400, an external I / F unit 500, and a light source unit. And 600.
  • the endoscope apparatus using the rigid endoscope 100 is an endoscope apparatus used for surgery such as laparoscopic surgery, for example. That is, the small hole is made in the abdomen etc. of the living body, the rigid scope 100 is inserted from the small hole, the treatment tool is inserted from the same small hole or another small hole, and the surgical operation by the treatment tool Take action.
  • the treatment tool for example, various instruments such as a scalpel, forceps, needles and threads for suturing, and irrigation and water absorption instruments for cleaning are assumed.
  • the method of the focus control of this embodiment is not limited to the application to the endoscope apparatus using the rigid endoscope 100, The application to the endoscope apparatus using a flexible mirror is also possible.
  • the light source unit 600 includes a white light source 610 that generates white light, and a light guide cable 620 that guides the light emitted from the white light source 610 to the rigid mirror 100.
  • the rigid mirror 100 includes a lens system 110 including an imaging lens, a relay lens, an eyepiece lens, and the like, and a light guide portion 120 for guiding the light emitted from the light guide cable 620 to the tip of the rigid mirror 100. Is equipped.
  • the imaging unit 200 includes an objective lens system 230 that forms an image of light from the lens system 110 (reflected light from a subject).
  • the objective lens system 230 includes a focus lens 210 that adjusts the in-focus object position.
  • the imaging unit 200 further includes an imaging element 240 that photoelectrically converts the reflected light formed by the objective lens system 230 to generate an image, and a focus lens drive unit 220 that drives the focus lens 210.
  • the focus lens drive unit 220 is, for example, a voice coil motor (VCM).
  • the in-focus object position is the position of an object (subject) on which the imaging unit 200 is in focus.
  • the in-focus object plane (or the object-side focal point) is determined corresponding to the image plane (or the image-side focal point), but the image plane coincides with the imaging surface of the imaging device 240
  • the position of the in-focus object plane is the in-focus object position.
  • the in-focus object position is a relative position between the imaging unit 200 and the in-focus object plane. For example, from the reference point of the imaging unit 200 (for example, the tip of the objective lens system 230, the tip of the rigid mirror 100, etc.) It is expressed by the distance to the in-focus object surface (the surface on which the object side of the optical system is in focus).
  • the in-focus object position can be known from, for example, control information (position) of the focus lens 210 and an optical characteristic (design value) of the objective lens system 230.
  • FIG. 4 is an enlarged view of a part of the imaging device 240.
  • the image sensor 240 has a structure in which a plurality of pixels are arranged in a two-dimensional array, and one of RGB color filters is arranged in a Bayer array at each pixel.
  • the image pickup device 240 is not limited to an image pickup device having a color filter having a Bayer arrangement as shown in FIG. 4, for example, an image pickup device using a complementary color filter or light of different wavelengths in one pixel without using a color filter.
  • Any imaging device can be used as long as it can obtain an image by imaging a subject, such as a laminated imaging device capable of receiving light, a monochrome imaging device not using a color filter, or the like.
  • the processing unit 300 includes an AD conversion unit 310, a preprocessing unit 320, an image processing unit 330, a motion amount calculation unit 340, a focus control unit 350, and a control unit 360.
  • the AD conversion unit 310 converts an analog signal sequentially output from the imaging device 240 into a digital image, and sequentially outputs the image to the preprocessing unit 320.
  • the pre-processing unit 320 performs image processing such as white balance processing and interpolation processing (demosaicing processing, processing for generating an RGB image from a Bayer image) on the image output from the AD conversion unit 310, and
  • the image processing unit 330, the motion amount calculation unit 340, and the focus control unit 350 are sequentially output.
  • the image processing unit 330 subjects the image output from the preprocessing unit 320 to image processing such as color conversion processing, tone conversion processing, edge enhancement processing, scaling processing, noise reduction processing, etc. Output sequentially to
  • the motion amount calculation unit 340 calculates a motion amount between frames based on the image output from the pre-processing unit 320, and outputs the motion amount to the focus control unit 350. Details of the movement amount calculation unit 340 will be described later.
  • the focus control unit 350 controls the start and end of the focusing operation based on the movement amount output from the movement amount calculation unit 340, and drives the focus lens driving unit 220 to focus on the subject in the focusing operation. . Details of the focus control unit 350 will be described later.
  • the display unit 400 is, for example, a liquid crystal monitor, and displays an image sequentially output from the image processing unit 330.
  • the control unit 360 is mutually connected to the external I / F unit 500, the image processing unit 330, the focus control unit 350, the imaging device 240, and the like, and performs input and output of control signals.
  • the external I / F unit 500 is an interface for performing input from the user to the endoscope apparatus, for example, a setting button for setting the position and size of the AF area, and for adjusting parameters of image processing. It is configured to include an adjustment button and the like.
  • the movement amount calculation unit 340 calculates the movement (FIG. 5) of the focused part on the subject as the optical axis vertical movement amount based on the image output from the pre-processing unit 320, and the distance between the subject and the imaging unit 200.
  • the change (FIG. 6) is calculated as the amount of parallel movement of the optical axis.
  • the optical axis vertical movement amount is an amount that represents a positional change of a focused portion (field of view, shooting range) in the vertical and horizontal directions in the image.
  • the optical axis parallel movement amount is an amount that represents a relative positional change between the imaging unit 200 and the subject in the depth direction (the direction along the optical axis).
  • the movement amount refers to both the optical axis vertical movement amount and the optical axis parallel movement amount, but any one may be used as the movement amount.
  • the motion amount calculation unit 340 targets only the G signal of the image output from the preprocessing unit 320, but changes the processing such as the luminance signal calculated from the RGB signal. May be performed as appropriate.
  • FIG. 7 shows a detailed configuration example of the motion amount calculation unit 340.
  • the motion amount calculator 340 includes a frame memory 341, a motion vector calculator 342, an optical axis vertical motion amount calculator 343, and an optical axis parallel motion amount calculator 344.
  • the frame memory 341 is a memory for temporarily storing the image output from the pre-processing unit 320.
  • the frame memory 341 delays the image output from the pre-processing unit 320 by frame, and outputs the image to the motion vector calculation unit 342.
  • the motion vector calculation unit 342 calculates a motion vector between the image (image of the current frame) output from the pre-processing unit 320 and the frame delayed image (image of the past frame) output from the frame memory 341. .
  • the basis of the motion vector is the image of the current frame. Specifically, as shown in FIG. 8, local motion vectors VE are obtained at a plurality of points in the image IM.
  • the motion vector is calculated by, for example, a block matching method or a gradient method which is a known technique.
  • the method of calculating the motion vector is not limited to this.
  • deformation such as calculating a motion vector in all the pixels of an image may be performed as appropriate.
  • M 15 in the example of FIG. 8.
  • each motion vector may be determined as to whether or not there is a correlation with a motion vector located in the periphery, and the optical axis vertical motion amount MV may be calculated only from the motion vector determined to be correlated. . Specifically, they are calculated by the following equations (2) and (3).
  • the correlation with the surrounding motion vector is, for example, the magnitude of the difference between the vectors. If the magnitude of the difference is less than a predetermined threshold, it is determined that there is a correlation, otherwise it is determined that there is no correlation. For example, when the surrounding motion vector is four motion vectors in the upper, lower, left, and right directions, threshold determination is performed on each of the upper, lower, left, and right motion vectors. For example, it may be determined that there is no correlation if the magnitude of the difference is equal to or greater than a predetermined threshold value in any one of four, or the magnitude of the difference in two or more of four (including its value) If is greater than or equal to a predetermined threshold value, it may be determined that there is no correlation. If there is no motion vector determined to be correlated among the M motion vectors, it is determined that the optical axis vertical motion does not exist, and the subsequent processing is performed with the optical axis vertical motion amount MV as a zero vector.
  • the motion vector vi includes a motion vector due to a disturbance such as a forceps operation during a procedure, in addition to the motion vector due to the movement of the focused portion on the subject.
  • Motion vectors due to disturbances have no correlation with surrounding motion vectors.
  • the optical axis vertical movement amount MV between the living body and the imaging unit can be calculated.
  • a two-dimensional histogram of the direction and size shown in FIG. 9 may be created from the M motion vectors, and the optical axis vertical movement amount MV may be calculated from the two-dimensional histogram.
  • the direction of the motion vector is quantized to nine (zero size and eight directions), and the size of the motion vector is quantized to 11 (every eight pixels where the size is represented by the number of pixels).
  • a motion vector corresponding to a bin with the largest frequency in this two-dimensional histogram is taken as an optical axis vertical motion amount MV.
  • the size may be, for example, the center (for example, 12) of 8 to 15.
  • FIG. 9 is a two-dimensional histogram of the fifteen motion vectors of FIG.
  • the living body appears in most of the image IM, but the motion vector (rightward moving vector) of the living body is substantially uniform with respect to the movement of moving the target location on the subject. . Therefore, when moving the focused portion on the subject, most of the motion vectors (11 out of 15) are similar in both direction and size.
  • the motion vector of the living body corresponds to the bin of frequency 11 in the histogram of FIG.
  • the motion vector (right upward and left downward motion vector) due to the disturbance of the treatment tool or the like occupies a small number of M motion vectors (4 out of 15).
  • the motion vector due to the disturbance is different in direction and magnitude from the motion vector of the living body.
  • the motion vector of this disturbance corresponds to two bins of frequency 2 in the histogram of FIG. From the above, it is possible to calculate the optical axis vertical movement amount MV by excluding the influence of the disturbance by using the bin having the maximum frequency in the two-dimensional histogram.
  • the optical axis parallel motion amount calculation unit 344 calculates the optical axis parallel motion amount MH based on the motion vector output from the motion vector calculation unit 342.
  • FIG. 10 shows an example of the local motion vector VE in the case where there is an optical axis parallel motion. This is an example of the case where the imaging unit leaves the subject.
  • a straight line extending the motion vector ideally converges to one point (vanishing point VP).
  • vanishing point VP a straight line extending the motion vector ideally converges to one point
  • FIG. 10 although it does not converge to one point because there is a disturbance due to the treatment tool, it converges to one point ideally except for that. If there is a vanishing point on the side where the start point of the motion vector is extended, the movement is in a direction away from the subject.
  • the motion vector points outward from the vanishing point.
  • the motion vector points inward to the vanishing point.
  • the motion vector for the past frame is determined with reference to the current frame, the motion vector is outward / inward with respect to departure / approach.
  • a motion vector for the current frame may be determined based on a past frame, and the motion vector may be inward or outward with respect to separation / approach.
  • FIG. 11 shows a flowchart of processing for calculating the optical axis parallel movement amount MH.
  • a vanishing point is first determined (S1).
  • the distance between the straight line extending the motion vector and the vanishing point is zero when parallel motion along the optical axis exists.
  • the optical axis parallel movement it is determined whether or not the optical axis parallel movement exists, and when it is determined that the optical axis parallel movement exists, it is determined which movement of detachment / approach (S2). Whether or not the optical axis parallel movement exists is determined by the reliability of the vanishing point. Since the reliability of the vanishing point can be determined to be high if the above-mentioned total distance is a small value, it is determined that the reliability of the vanishing point is high if the total distance is less than a predetermined threshold, and the optical axis parallel movement Judge as yes. If the distance sum is larger than a predetermined threshold value, it is determined that the reliability of the vanishing point is low, and it is determined that there is no optical axis parallel movement.
  • the direction (separation / approach) of the optical axis parallel movement is determined depending on whether the direction of each motion vector is the vanishing point side or the opposite side. If it is not possible to determine either of the disconnection / approaching in the determination of the direction of the optical axis parallel movement, it is determined that the optical axis parallel movement is not present.
  • optical axis parallel movement amount MH set as shown in the following equation (4) is output based on the determination result in step S2 (S3).
  • l i is a vector starting from the start point SP of the motion vector v i and ending at the vanishing point VP.
  • arg (x) is a function that returns the argument of vector x.
  • M motion vectors are classified by the following equation (5).
  • the schematic diagram of the following Formula (5) is shown in FIG.
  • the one with the largest number of classifications is taken as the judgment result of the parallel optical axis movement. If there is a plurality of classifications with the largest number of classifications, it is determined that there is no optical axis parallel movement. For example, in FIG. 10, eleven motion vectors of the living body are classified as separation, and four motion vectors of the treatment tool are classified as approaching or no movement, so that the determination result is separation.
  • T_ARG_F is a threshold value corresponding to the leaving motion.
  • T_ARG_F is a threshold corresponding to the approaching movement.
  • the motion vector In the case of a leaving motion, the motion vector is in the opposite direction to the vanishing point, so arg (v i ) -arg (l i ) approaches ⁇ ⁇ . Since the motion vector is directed to the vanishing point in the case of an approaching motion, arg (v i ) -arg (l i ) approaches 0. For this reason, the presence or absence and direction of the optical axis parallel movement can be determined by the above equation (5).
  • departure / approach may be determined by the inner product of the motion vector v i and the vector l i as in the following equations (6) and (7).
  • v i ⁇ l i is an inner product of the motion vector v i and the vector l i .
  • is the magnitude of the vector x.
  • T_PRO_F is an inner product threshold value corresponding to the leaving motion.
  • T_PRO_N is an inner product threshold corresponding to the approaching movement. Since the direction of the motion vector is opposite to the vanishing point in the case of a leaving motion, (v i ⁇ l i ) / ⁇ v i ⁇ l i ⁇ approaches -1. In the case of an approaching motion, the direction of the motion vector is on the vanishing point side, so v i ⁇ l i / ⁇ v i ⁇ l i ⁇ approaches +1. For this reason, the presence and the direction of the optical axis parallel movement can be determined by the above equations (6) and (7).
  • the following modification may be used. That is, even if the correlation with the peripheral motion vector is determined in the same manner as the method described in the above equations (2) and (3) and the optical axis parallel motion amount MH is calculated from the motion vector determined to be correlated I do not care. As can be seen from FIG. 10, when there is an optical axis parallel motion, the direction of the peripheral motion vector is slightly different even in the part of the living body (the part with high correlation). Therefore, the threshold for the correlation determination of the optical axis parallel movement may be larger than the threshold for the correlation determination of the optical axis vertical movement.
  • the method for calculating the optical axis parallel movement amount based on the motion vector has been described so far, the method for calculating the optical axis parallel movement amount is not limited to this.
  • the amount of parallel movement of the optical axes may be calculated from the image using a rotation invariant phase only correlation method (RIPOC).
  • RIPOC rotation invariant phase only correlation method
  • Focus Control Unit Next, details of focus control (AF control) performed by the focus control unit 350 will be described.
  • FIG. 14 shows a flowchart of focus control.
  • the above-described focusing operation corresponds to steps S11 to S13.
  • the focus control unit 350 first determines the in-focus direction (S11). Specifically, the wobbling operation of the focus lens 210 is started in synchronization with the acquisition timing of the images sequentially output from the AD conversion unit 310.
  • the wobbling operation is an operation of moving the focusing lens 210 back and forth (swinging), and moving (swinging) the in-focus object position back and forth (infinity and near sides).
  • a plurality of images with different in-focus object positions are captured by this wobbling operation.
  • the focus lens 210 is moved to the wobbling center and three points before and after it. In this case, images at the three points are sequentially taken.
  • the focus control unit 350 determines the in-focus direction using, for example, a known method based on the image acquired by the wobbling operation. For example, the contrast values of a plurality of images obtained by the wobbling operation are determined, and the focusing direction is determined from the contrast values. For example, when the in-focus object position is moved to infinity, if the contrast value is high, the direction in which the in-focus object position is moved to infinity is the in-focus direction.
  • the focus control unit 350 changes the center position of the wobbling based on the focusing direction determined in S11 (S12).
  • the in-focus direction determined in S11 is either the direction in which the in-focus object position is close to the imaging device 240 (near point) or the direction in which the in-focus object position is far infinity (far point) It is.
  • the focusing direction is the near side
  • the wobbling center is moved to the near side
  • the wobbling center is moved to the infinity side.
  • the focus control unit 350 determines whether focusing is completed (S13).
  • the focus control unit 350 may perform the in-focus determination by performing a known in-focus determination process or the like.
  • the in-focus state may be determined from the high / low of the contrast value of the image, or the in-focus state may be determined from the stop / movement of the wobbling center. If the focus control unit 350 determines that focusing is not completed, the operations in steps S11 to S13 are repeated, and the center position of the wobbling is gradually brought closer to the subject (the subject is gradually brought into focus). . If it is determined that focusing is completed, the wobbling operation of the focus lens 210 is ended, and the focusing operation is completed.
  • the operation shifts to the standby operation.
  • the focusing operation is not performed (the focus lens 210 is not moved). For example, it is stopped at the position of the focus lens 210 when it is determined in step S13 that focusing is completed.
  • the focus control unit 350 initializes SUM_MV and SUM_MH (S14).
  • SUM_MV and SUM_MH are values used to determine whether or not the focusing operation is necessary in step S15 described later.
  • the focus control unit 350 determines whether a focusing operation is necessary based on the optical axis vertical movement amount MV and the optical axis parallel movement amount MH (S15). If it is determined that the focusing operation is unnecessary, after initializing COUNT (S16), step S15 is executed in synchronization with the next image acquisition timing.
  • the COUNT is a value used to determine whether or not the focusing operation is possible, as described later.
  • step S17 it is determined whether the focusing operation is possible (S17). If it is determined that the focusing operation is not possible, step S15 is executed in synchronization with the next image acquisition timing.
  • step S11 is executed.
  • S15 necessity / unnecessity
  • S17 possibility / notness
  • the determination (S15) as to whether or not the focusing operation is necessary will be described.
  • the in-focus operation is necessary, the in-focus state on the subject changes from in-focus to out-of-focus.
  • the in-focus state changes from in-focus to out-of-focus because when the user operates the endoscope and moves the target location on the subject, the user operates the endoscope from the imaging unit to the subject.
  • MV j is between the movement of the front and rear frames. If the absolute value of the value SUM_MV obtained by accumulating this over N frames (N is a natural number of 3 or more (including its value)) exceeds a predetermined threshold T_MV, there is a possibility that the target location on the subject has become out of focus If it is, it is determined that the focusing operation is necessary. Specifically, determination is made using the following equations (8) and (9).
  • j is a frame number
  • SUM_MV is a two-dimensional vector having vertical and horizontal components (for example, x component and y component on an image, or horizontal scanning component and vertical scanning component) obtained by accumulating the optical axis vertical movement amount MV j is there.
  • the following modification may be used to determine whether or not the focusing operation based on SUM_MV is necessary. That is, in the endoscopic procedure, a living body such as an organ is folded in the vertical direction. For this reason, even if the magnitude of the vector is the same, the possibility of moving the focused portion to a different organ in the vertical direction is higher than in the horizontal direction, and the possibility of being out of focus is higher. Therefore, the vertical movement of the optical axis in the vertical direction with respect to the vertical movement of the optical axis in the horizontal direction may be more easily determined to be necessary for the focusing operation. Specifically, the determination is made by the following equations (10) and (11).
  • SUM_MV_V and SUM_MV_H are a vertical direction component and a horizontal direction component of SUM_MV.
  • T_MV_V and T_MV_H are thresholds of the vertical component SUM_MV_V and threshold of the horizontal component SUM_MV_H. As described above, by determining the vertical direction and the horizontal direction with different threshold values, it is possible to determine with higher accuracy the case where the focusing operation is necessary.
  • an optical axis parallel movement amount MH j exists between the frames before and after the change. If the absolute value of the value SUM_MH accumulated from N frames (N is 3 or more (including its value)) accumulated from the first timing after shifting to the standby operation to the current timing exceeds the predetermined threshold T_MH, It is determined that the focusing operation is necessary because there is a possibility that the camera is out of focus due to a change in distance. Specifically, determination is made using the following equations (12) and (13).
  • j is a frame number
  • the following modification may be used to determine whether or not the focusing operation based on SUM_MH is necessary. That is, the threshold value T_MH may be changed in accordance with whether the optical axis parallel movement approaches or separates.
  • the threshold value T_MH may be changed in accordance with whether the optical axis parallel movement approaches or separates.
  • the distance between the endoscope and the subject is outside the depth of field. Since the depth of field is narrower on the near side than on the infinity side with respect to the in-focus object position, the optical axis closer than the parallel optical axis disengaging motion even if the absolute value of the optical axis parallel motion is the same value Parallel motion is more likely to be out of focus. For this reason, it may be easier to determine that the focusing operation is necessary in the parallel movement of the optical axis closer than the parallel movement of the optical axis to be separated. Specifically, determination is made by the following equations (14) to (16).
  • T_MH_N is a threshold of SUM_MH in the approaching direction
  • T_MH_F is a threshold of SUM_MH in the departing direction.
  • the method of the determination is not limited thereto.
  • the determination may be performed based on the in-focus object position. Specifically, when the in-focus object position is on the closest side closer to the imaging unit 200, the depth of field is relatively narrower than when the in-focus position is on the infinity side. Even if the amount of parallel movement is the same value, it tends to be out of focus. For this reason, if the above-mentioned threshold is set based on the case where the in-focus object position is relatively close, the unnecessary focusing operation may be performed when the in-focus object position is relatively infinity. There is.
  • the threshold may be set according to the in-focus object position.
  • the in-focus object positions PA1 and PA2 have threshold values TA1 and TA2, PA1> PA2 (that is, PA1 is on the infinity side), and TA1> TA2.
  • the setting of the threshold is not limited to FIG. 15, and it is determined that the focusing operation is necessary when the in-focus object position is relatively close, compared to when it is relatively infinity.
  • the threshold may be set in any way as long as it is easy to do.
  • the determination (S17) as to whether or not the focusing operation is possible will be described. For example, when it is determined that the focusing operation is necessary in the middle of the operation of the endoscope (for example, the movement of the focused part), the focusing operation is immediately performed when the focusing operation is performed. May become out of focus after the operation is completed. In this case, since the focusing operation is performed during the operation of the user, the feeling of use may be impaired. For this reason, after it is determined in step S15 that the focusing operation is necessary, the focusing operation is performed after it is determined that the movement of the focused portion and the change in distance to the subject do not occur.
  • the focusing operation is performed after it is determined that the movement of the focused portion and the change in distance to the subject do not occur.
  • FIG. 16 shows a detailed flowchart of the process of determining whether or not the focusing operation is possible.
  • T_MV_P is a threshold of the optical axis vertical movement amount MV.
  • step S32 If it is determined in step S32 that there is no movement, the value COUNT used for the determination is incremented (S33). If it is determined in step S32 that there is motion, the process proceeds to step S34 without doing anything.
  • COUNT is larger than L frame (L is a natural number of 3 or more (including its value)) (S34). If the COUNT is larger than the L frame, it is determined that the focusing operation is possible (S36), and the process shifts to the focusing operation (S11 to S13 in FIG. 14). If the COUNT is equal to or less than the L frame, it is determined that the focusing operation is not possible (S35), and the process proceeds to the determination (S15 in FIG. 14) whether the focusing operation in the next frame is necessary.
  • the reflected light from the subject is imaged as an image by the imaging unit capable of performing the focusing operation.
  • the relative movement amount between the imaging unit and the subject is calculated from the image.
  • the net motion amount obtained by accumulating the motion amount by a plurality of frames exceeds a predetermined threshold, it is determined that the focusing operation is necessary, and the focusing operation of the imaging unit is executed.
  • the focusing operation is performed if the movement is out of focus even if the movement is slow, and the user does not intend instantaneously It is possible to realize AF control which does not execute the focusing operation for the movement.
  • the focus control unit 350 determines that the accumulated motion amounts SUM_MV and SUM_MH are larger than the first threshold T_MV in the focusing necessity determination process (S15) (the above equation (9)), It is determined whether or not a frame whose relative motion amount MV, MH is smaller than the second threshold T_MV_P, 0 exists L frames (L is a natural number of 3 or more (including its value)) (upper equation (17)) Focusing determination processing (S17) is performed, and when it is determined that a frame having a relative motion amount MV, MH smaller than the second threshold T_MV_P, 0 exists L frame, the focusing operation of the imaging unit 200 is performed Do.
  • the endoscope apparatus when it is determined that the endoscope apparatus has moved largely and the focusing operation becomes necessary, it can be determined that the movement due to the movement has become smaller (that is, the movement has ended). It is possible to perform the focusing operation. This can suppress movement of the focus (e.g., wobbling) before the end of movement of the endoscope apparatus.
  • the focusing operation is performed in the middle of the movement of the endoscope apparatus, and when the movement is finished, it is possible to suppress the occurrence of the situation where the focusing is not in focus again. As a result, it is possible to provide the user with an image without a sense of incongruity or an image with good visibility.
  • L of L frames is a predetermined number, which is the number of frames for determining that the distance between the imaging unit 200 and the subject is relatively stationary (the movement is small). That is, if the movement is small during the number of frames (if there is almost no movement), the number of frames that can be determined that the user does not move the imaging unit 200 may be set as L.
  • L may be fixed or may be set by the user.
  • the motion amount calculation unit 340 obtains a plurality of local motion amounts vi (VE in FIG. 8 and FIG. 10), and calculates the local motion amounts of the plurality of local motion amounts vi with the surrounding local motion amounts. Correlations are determined, and relative motion amounts MV and MH are determined based on local motion amounts whose correlation is higher than a predetermined correlation among a plurality of local motion amounts (upper equations (2) and (3)).
  • the disturbance is a movement different from that of the living body as the background, and, for example, movement due to the operation of the treatment tool, noise and the like can be assumed.
  • the global movement is the movement of the living body, specifically, the relative movement between the living body region observed (focused on) by the endoscope apparatus and the imaging unit 200. For example, in the optical axis vertical movement, the living body moves in the same direction as a whole, and in the optical axis parallel movement, the living body gathers to the vanishing point or spreads from the vanishing point.
  • Disturbances of the treatment tool or the like result in local movements different from these.
  • this embodiment by being able to extract a global motion, it is possible to perform a focusing operation by using a motion of the imaging unit 200 with respect to a living body as a trigger. That is, although movement occurs in the image by the operation of the treatment tool in the endoscopic procedure, the movement can be excluded from the trigger of the focusing operation.
  • the relative motion amount has one or more components (including the value thereof).
  • the optical axis vertical movement amount MV may be considered as two components because it is a two-dimensional vector, and may be a total of three components.
  • the six-axis motion sensor outputs six-axis detection signals.
  • the six components are converted into the optical axis vertical movement amount MV and the optical axis parallel movement amount MH, they are two components or three components.
  • the focus control unit 350 determines the accumulated motion amount for each component of the one or more components (including the value thereof), and determines the focusing necessity with the threshold corresponding to each of the accumulated motion amounts of the respective components as the first threshold. Processing (S15) is performed, and when it is determined that at least one of the accumulated motion amounts of the respective components is larger than the threshold value corresponding to the accumulated motion amount, the focusing operation is performed.
  • the cumulative motion amount SUM_MV of the optical axis vertical motion amount MV is determined by the threshold T_MV as in the above equation (9), and the cumulative motion amount SUM_MH of the optical axis parallel motion amount MH is as the threshold T_MH as in the above equation (13) judge.
  • the focusing operation it is possible to obtain the accumulated motion amount for each component of the motion, and to determine whether or not the focusing operation is necessary with the threshold value corresponding to each component. Depending on the component of the movement, it may differ depending on how much movement occurs that the focusing operation is required (the focusing is not achieved). Therefore, accurate determination is possible by providing a threshold value corresponding to each component. In addition, by performing the focusing operation when the accumulated motion amount of at least one component is larger than the threshold, the focusing operation can be performed as long as any one component has a large moving amount.
  • the movement amount calculation unit 340 obtains an optical axis vertical movement amount MV, which is a movement amount in a direction perpendicular to the optical axis of the imaging unit 200, as a relative movement amount.
  • the focus control unit 350 performs the focusing necessity determination process with the optical axis vertical movement threshold T_MV with respect to the accumulated movement amount SUM_MV of the optical axis vertical movement amount MV as a first threshold (the above equation (9)).
  • the optical axis vertical movement amount is, as shown in FIG. 5, an amount of movement accompanying movement of the imaging area RA2 (imaging range) of the subject 6 (for example, a living body) to the imaging area RA1.
  • Areas RA1 and RA2 are areas different in center (position where the optical axis and the subject 6 intersect).
  • the regions RA1 and RA2 may partially overlap.
  • Such movement may be the rotation MA (rotation about a direction not parallel to the optical axis) of the endoscope apparatus 2 as shown in FIG. 5 or the parallel movement of the endoscope apparatus 2 (not parallel to the optical axis) Generated by parallel translation).
  • the optical axis vertical movement amount MV it is possible to detect that the shooting range (target location) of the subject has moved, and the focusing operation is performed when the shooting range is changed (largely changed). It becomes possible to carry out. For example, when the shooting range is moved by one screen and a completely different subject is observed, or when the shooting range is shifted by 1/2 screen, the focus is adjusted again to provide a clear image to the user. it can.
  • the motion amount calculation unit 340 obtains a plurality of local motion amounts vi based on the captured image captured by the imaging unit 200, and obtains an average of the plurality of local motion amounts vi in each frame. Is determined as the optical axis vertical movement amount MV (the above equation (1)).
  • the global motion amount of the subject can be obtained from the local motion amounts at a plurality of positions in the image.
  • the proportion of the living body is larger than that of the treatment tool, so that the local moving amount can be averaged to obtain the global moving amount of the living body.
  • random motions due to disturbances are averaged within an image, and by accumulating them over a plurality of frames, random motions due to disturbances are temporally averaged. This makes it possible to extract the global movement of the living body.
  • the motion amount calculation unit 340 obtains a plurality of local motion amounts vi, and creates a histogram of magnitude and direction from the plurality of local motion amounts vi in each frame (FIG. 9). The largest bin is determined as the optical axis vertical movement amount MV.
  • the global motion amount of the subject from the local motion amounts at a plurality of positions in the image and extract it as the optical axis vertical motion amount MV. That is, in the endoscopic procedure, the proportion of the living body is larger than that of the treatment tool, so it can be assumed that the global movement amount of the living body is the largest bin in the histogram. Therefore, by selecting the largest bin in the histogram, it is possible to extract a global movement amount excluding the movement amount of disturbance due to the treatment instrument or the like.
  • the movement amount calculation unit 340 obtains an optical axis vertical movement amount MV, which is a movement amount in a direction perpendicular to the optical axis of the imaging unit 200, as a relative movement amount.
  • the focus control unit 350 performs a focusability determination process (S17) on the optical axis vertical movement amount MV.
  • the focusing operation can be triggered when it can be determined that the shooting range is stopped (the user has not moved the shooting range). For example, when the user moves the imaging unit 200 to change the observation target (for example, change the organ to view, change the area to view), first, the focusing operation is necessary when the movement reaches a certain distance or more When the movement is continued, the trigger is sent to the imaging unit 200 when it is determined that the movement is completed.
  • the observation target for example, change the organ to view, change the area to view
  • the movement amount calculation unit 340 obtains an optical axis parallel movement amount MH, which is a movement amount in a direction parallel to the optical axis of the imaging unit 200, as a relative movement amount.
  • the focus control unit 350 performs the focusing necessity determination process (S15) with the threshold value for optical axis parallel movement T_MH as the first threshold (the above equation (13)) with respect to the accumulated movement amount SUM_MH of the optical axis parallel movement amount MH.
  • the optical axis parallel movement amount is a movement amount that accompanies enlargement or reduction of the imaging region RB1 (imaging range) of the subject 6 (for example, a living body) to the imaging region RB2 as shown in FIG.
  • the regions RB1 and RB2 are regions having the same center (the position where the optical axis intersects with the subject 6).
  • parallel movement along the optical axis and vertical movement along the optical axis are mixed, but in that case, the centers of the regions RB1 and RB2 do not have to coincide with each other. That is, regardless of the coincidence or noncoincidence of the center, the imaging area is enlarged or reduced if there is a parallel movement along the optical axis.
  • Such movement parallel to the optical axis occurs when the endoscope device 2 moves in a direction parallel to the optical axis as shown in FIG.
  • the optical axis parallel movement amount MH it is possible to estimate whether the subject deviates from the depth of field, and the object deviates from the depth of field (the object is out of focus position It is possible to execute the focusing operation when it can be estimated that the operation is largely deviated. As a result, it is possible to refocus the subject which is out of focus (or which is likely to be out of focus) and provide the user with a clear image.
  • the motion amount calculation unit 340 obtains a plurality of local motion vectors vi (VE in FIG. 10), obtains vanishing points VP of the plurality of local motion vectors vi in each frame, and generates a plurality of local motion vectors vi.
  • the evaluation value (sum of distances) of the vanishing point is determined based on the distance between the straight line extending each local motion vector and the vanishing point VP, and the optical axis parallel motion amount MH is obtained in the frame where the evaluation value is larger than a predetermined value.
  • the optical axis parallel movement amount MH is determined in the frame determined that the optical axis parallel movement exists. It can be asked. That is, when the vanishing point VP is not clear (the reliability of the vanishing point VP is low), the optical axis parallel movement does not exist (or the optical axis parallel movement can not be clearly determined due to a disturbance or the like). Therefore, it is possible to obtain the accumulated motion amount from the frame in which the optical axis parallel motion is surely present by excluding the frame in which the evaluation value of the vanishing point VP is low.
  • the movement amount calculation unit 340 obtains an optical axis parallel movement amount MH (the above equation (4)) having different positive and negative signs according to the approach / separation of the imaging unit 200 and the subject.
  • the subject deviates from the depth of field when it approaches or leaves continuously.
  • the optical axis parallel movement amount MH having different positive and negative signs in response to the approaching and leaving, the accumulated moving amount becomes large when the approaching or leaving occurs continuously, and the focusing operation can be triggered. That is, in the case where the approach and the release are repeated at random, positive and negative are mutually canceled by accumulation, and the accumulated amount of movement does not increase, so that the focusing operation is not triggered and unnecessary change in focus does not occur.
  • the motion amount calculation unit 340 obtains a plurality of local motion vectors vi, obtains a vanishing point VP of the plurality of local motion vectors vi in each frame, and calculates each local motion vector of the plurality of local motion vectors vi.
  • Information changing in accordance with an angle (arg (v i )-arg (l i )) formed by a vector l i connecting the start point SP and the vanishing point VP with each local motion vector is determined (FIG. 12), and Based on the judgment of approach and departure (the above equations (5) to (7)).
  • the information that changes according to the angle formed by the motion vector v i and the vector l i may be the angle (arg (v i ) ⁇ arg (l i )) itself (the above equation (5)), It may be any value that is a function of the angle (for example, a normalized value of the inner product of the motion vector v i and the vector l i (the above equations (6), (7))).
  • the movement amount calculation unit 340 obtains an optical axis parallel movement amount MH, which is a movement amount in a direction parallel to the optical axis of the imaging unit 200, as a relative movement amount.
  • the focus control unit 350 performs a focusability determination process (S17) on the optical axis parallel movement amount MH.
  • the focusing operation can be triggered when it can be determined that the movement in the optical axis direction has stopped (the user has not moved the imaging unit 200 in the optical axis direction).
  • the user moves the imaging unit 200 in order to change the observation target (for example, look at organs in front of or behind the present) or to widen or narrow the observation range, first, movement in the optical axis direction is constant.
  • the trigger stands by, and when it is determined that the movement is ended, the trigger is transmitted to the imaging unit 200.
  • the focus control unit 350 determines that the in-focus object position is larger than the first threshold (TA1) when the in-focus object position of the imaging unit 200 is the first position (PA1 in FIG. 15).
  • the first threshold (TA2) in the case of the second position (PA2) closer to the first position (PA1) is set to a smaller value (TA1> TA2).
  • a table in which the in-focus object position (for example, position information of the focus lens 210) and the first threshold are associated is stored in a storage unit (not shown), and the first threshold is set by referring to the table.
  • the first threshold corresponding to a predetermined in-focus object position is used as a reference value, and the reference value is corrected according to the actual in-focus object position.
  • the threshold of may be set.
  • the object field due to the change in in-focus object position It can respond to changes in depth. That is, in an ordinary optical system, the closer the focus is to the near side, the narrower the depth of field, and the higher the possibility that the subject deviates from the depth of field. It can be maintained. On the other hand, since the depth of field becomes wide on the infinity side and the possibility of the subject moving away from the depth of field becomes low, unnecessary focusing operation can be suppressed by increasing the threshold on the infinity side.
  • the movement amount calculation unit 340 obtains an optical axis vertical movement amount MV, which is a movement amount in a direction perpendicular to the optical axis of the imaging unit 200, as a relative movement amount.
  • the focus control unit 350 sets a first direction threshold value T_MV_V with respect to a first direction (vertical scanning direction, y direction) component SUM_MV of the accumulated motion amount SUM_MV and a second direction (horizontal scanning direction, x direction) component SUM_MV_ of the first direction threshold T_MV_V and the accumulated motion amount SUM_MV.
  • the in-focus necessity determination process (S15) is performed with the second direction threshold T_MV_H for the second threshold as the first threshold, and the first direction threshold T_MV_V and the second direction threshold T_MV_H are set to different values (the above equation (10 ), (11)).
  • the threshold may be changed according to the size.
  • the threshold may be changed accordingly.
  • the movement amount calculation unit 340 obtains an optical axis parallel movement amount MH, which is a movement amount in a direction parallel to the optical axis of the imaging unit 200, as a relative movement amount.
  • the focus control unit 350 is a separation threshold when the cumulative motion amount SUM_MH corresponds to the approach between the imaging unit 200 and the subject and the separation threshold T_MH_N when the cumulative motion amount SUM_MH corresponds to the separation between the imaging unit 200 and the subject. Focusing necessity determination processing is performed with the threshold T_MH_F as the first threshold (upper equation (14)), and the absolute value of the approaching threshold T_MH_N is set to a smaller value than the absolute value of the departure threshold T_MH_F (15), (16)).
  • the threshold in accordance with the direction (approach / disengagement) of the optical axis parallel movement, it is possible to cope with the difference in the depth of field between the near side and the infinity side. That is, in a normal optical system, when the in-focus object position is constant, the near side of the depth of field is narrower than the infinity side. Therefore, when the imaging unit 200 and the subject approach, the possibility that the subject deviates from the depth of field is higher than when the imaging unit 200 and the subject are separated.
  • the approach threshold smaller than the departure threshold, it becomes easy to maintain the in-focus state with respect to the approach in the narrow direction of the depth of field, and the departure in the wide direction of the depth of field. On the other hand, unnecessary focusing operation can be suppressed.
  • the motion amount calculation unit 340 determines the accumulated motion amounts SUM_MV and SUM_MH from the reference frame (for example, the first frame) after the focusing operation shifts to the standby state to the current frame as N frames.
  • the motion amount calculation unit 340 accumulates the motion from the reference frame (for example, the first frame after resetting) to the current frame after resetting the cumulative frame number (N) of the relative motion amounts MV and MH.
  • the quantities SUM_MV, SUM_MH may be determined.
  • FIG. 17 shows a configuration example of an endoscope apparatus of a third embodiment.
  • the endoscope apparatus includes a rigid endoscope 100 as an insertion unit into the body, an imaging unit 200 connected to the rigid endoscope 100, a processing unit 300, a display unit 400, an external I / F unit 500, and a light source unit. And 600.
  • the components other than the rigid endoscope 100 and the processing unit 300 are the same as those of the second embodiment, and thus the description thereof is omitted.
  • the rigid mirror 100 includes a six-axis motion sensor 130 that detects three-axis rotational motion and three-axis translational motion, and outputs a detection signal (motion signal) from the motion sensor 130 to the processing unit 300.
  • the motion sensor 130 may be an angular acceleration sensor (gyro sensor) that detects angular acceleration around three axes (x, y, z axes orthogonal to one another), and acceleration in the three axis (x, y, z axes) direction. And an acceleration sensor to be detected.
  • the motion sensor 130 operates at a frequency sufficiently faster than the operating frequency (frame frequency) of the imaging device 240, integrates the detected angular acceleration and acceleration by an integrator (not shown), and outputs it as an angle change and position change. .
  • the start and end timings of integration are synchronized with the operation timing of the image sensor 240 (image shooting timing), and the movement signal is the angle change / position of the rigid mirror 100 generated between the operation timings of the image sensor 240 (between frames) It is a change.
  • the processing unit 300 includes an AD conversion unit 310, a preprocessing unit 320, an image processing unit 330, a motion amount calculation unit 340, a focus control unit 350, and a control unit 360.
  • the components other than the motion amount calculator 340 are the same as those of the second embodiment, and thus the description thereof is omitted.
  • the movement amount calculation unit 340 calculates the movement amount based on the detection signal output from the motion sensor 130 described above and the in-focus object position.
  • the calculated motion amount is output to the focus control unit 350.
  • the movement amount includes an optical axis vertical movement amount and an optical axis parallel movement amount.
  • the optical axis parallel movement amount uses the optical axis parallel component of the position change which is a movement in real space as it is. Therefore, the optical axis parallel movement amount in the third embodiment is a value having a size in addition to the positive and negative signs, for example, a value such as -3 mm or +10 mm.
  • the focus control unit 350 treats this value as the above-mentioned optical axis parallel movement amount MH, and cumulatively performs the same determination as in the second embodiment (determination of the necessity of focusing, determination of the possibility of focusing).
  • the optical axis vertical movement amount the movement amount on the image is calculated from the optical axis vertical component (the yaw component and the pitch component of the angle change) of the position change which is the movement in the real space.
  • HEAVE and SWAY are the vertical direction component and the horizontal direction component of the position change.
  • ZOOM (P) is an imaging magnification at the object focusing position P.
  • PITCH and YAW are a pitch component and a yaw component of angle change.
  • MAX_ANGLE_UD and MAX_ANGLE_LR are the maximum vertical angle of view of the rigid mirror 100 and the maximum horizontal angle of view.
  • MAX_PIXEL_UD and MAX_PIXEL_LR are the maximum number of pixels in the vertical direction of the imaging device 240 and the maximum number of pixels in the horizontal direction.
  • the focus control unit 350 treats a two-dimensional vector having MV_UD and MV_LR as the vertical direction component and the horizontal direction component as the above-mentioned optical axis vertical movement amount MV, and accumulates the same determination as in the second embodiment Judgment, focus possibility judgment) is performed.
  • the rigid mirror 100 includes the motion sensor 130, and the movement amount calculation unit 340 calculates the movement amount based on the movement signal output from the motion sensor 130.
  • the rigid mirror 100 is positioned A sensor (for example, a magnetic position sensor or the like) may be provided, and the movement amount calculation unit 340 may calculate the movement amount based on the temporal change of the position information output from the position sensor.
  • the imaging unit 200 having the motion sensor 130 capable of executing the focusing operation and detecting the angular acceleration / acceleration picks up the reflected light from the subject as an image. From the output of the motion sensor 130, relative motion amounts MV and MH between the imaging unit 200 and the subject are calculated. When the net motion amount obtained by accumulating the motion amounts MV and MH by a plurality of frames exceeds a predetermined threshold, it is determined that the focusing operation is necessary, and the focusing operation of the imaging unit 200 is executed.
  • the focusing operation is performed if the movement is out of focus even if the movement is slow, and the user does not intend instantaneously It is possible to realize AF control which does not execute the focusing operation for the movement.
  • the processing unit 300 and the like in the first to third embodiments may include a processor and a memory.
  • the processor here may be, for example, a CPU (Central Processing Unit). However, the processor is not limited to a CPU, and various processors such as a graphics processing unit (GPU) or a digital signal processor (DSP) can be used.
  • the processor may also be a hardware circuit based on an ASIC.
  • the memory stores an instruction readable by a computer, and the instruction is executed by the processor, whereby each unit such as the processing unit 300 according to the present embodiment (for example, the preprocessing unit 320, the image processing unit 330, a motion amount calculation unit 340, a focus control unit 350, a control unit 360, and the like are realized.
  • the memory here may be a semiconductor memory such as SRAM or DRAM, or may be a register or a hard disk.
  • the instruction here may be an instruction of an instruction set that configures a program, or an instruction that instructs an operation to a hardware circuit of a processor.
  • 2 Endoscope device 4 treatment tool, 6 subject (living body), 100 rigid scope, 110 lens system, 120 light guide unit, 130 motion sensor, 200 imaging unit, 210 focus lens, 220 focus lens drive unit, 230 objective lens system, 240 imaging device, 300 processing unit, 310 AD conversion unit, 320 pre-processing unit, 330 image processing unit, 340 motion amount calculation unit, 341 frame memory, 342 motion vector calculator, 343 optical axis vertical movement amount calculation unit, 344 optical axis parallel movement amount calculation unit, 350 focus control unit, 360 control unit, 400 display unit, 500 external I / F unit, 600 light source unit, 610 white light source, 620 light guide cable

Abstract

 内視鏡装置は、撮像部200と被写体との相対的な動き量である相対動き量を算出する動き量算出部340と、撮像部200のフォーカス制御を行うフォーカス制御部350と、を含む。フォーカス制御部350は、相対動き量をNフレーム(Nは3以上(その値を含む)の自然数)累積した累積動き量を求め、累積動き量が第1の閾値よりも大きいか否かを判定する合焦必要判定処理を行い、累積動き量が第1の閾値よりも大きいと判定された場合に、撮像部200の合焦動作を実行する。

Description

内視鏡装置及び内視鏡装置のフォーカス制御方法
 本発明は、内視鏡装置及び内視鏡装置のフォーカス制御方法等に関する。
 内視鏡装置(内視鏡システム)においては、ユーザの診断・処置に支障をきたさないように出来るだけ深い被写界深度が要求される。しかし近年では、内視鏡装置においても高画素の撮像素子が使用され、それに従って被写界深度が浅くなってきていることから、それを補うためにオートフォーカス(以下AFと略す)を行う内視鏡装置が提案されている。
 AF制御の従来手法には、例えば以下のような手法がある。第1手法は、ビデオカメラ等で用いられる動画撮影でのAFにおいて、画像中のコントラスト変化をトリガとして合焦動作を実行する手法である。第2手法は、特許文献1に開示される手法である。この手法では、被写体とカメラの相対的な位置変化をモーションセンサで検出し、そのモーションセンサの出力(例えば角加速度、加速度等)が所定量以上となったことをトリガとして合焦動作を実行する。
特開2010-191080号公報
 上記のようなAF制御の従来手法を内視鏡装置に適用した場合、内視鏡手技下で想定される様々なシーンにおいて、必要性に応じた適切なフォーカス制御が行われないという課題がある。例えば、内視鏡手技に第1手法を適用した場合、処置具の操作でコントラストが変化するため、不要な合焦動作が実行される可能性がある。或いは、内視鏡手技に第2手法を適用した場合、カメラを同一方向に少しずつ移動させたときに、撮影対象が変わったにも関わらず合焦動作が実行されない。また、手ぶれ等の一時的な大きな動きが発生した場合に、不要な合焦動作が実行される可能性がある。
 本発明の幾つかの態様によれば、内視鏡手技下で想定される様々なシーンにおいて適切なフォーカス制御を行うことが可能な内視鏡装置及び内視鏡装置のフォーカス制御方法等を提供できる。
 本発明の一態様は、撮像部と被写体との相対的な動き量である相対動き量を算出する動き量算出部と、前記撮像部のフォーカス制御を行うフォーカス制御部と、を含み、前記フォーカス制御部は、前記相対動き量をNフレーム(Nは3以上(その値を含む)の自然数)累積した累積動き量を求め、前記累積動き量が第1の閾値よりも大きいか否かを判定する合焦必要判定処理を行い、前記累積動き量が前記第1の閾値よりも大きいと判定された場合に、前記撮像部の合焦動作を実行する内視鏡装置に関係する。
 本発明の一態様によれば、撮像部と被写体との相対的な動き量がNフレーム累積され、その累積動き量が第1の閾値よりも大きいか否かの判定が行われ、その判定において、累積動き量が第1の閾値よりも大きいと判定された場合に、撮像部の合焦動作が実行される。これにより、内視鏡手技下で想定される様々なシーンにおいて適切なフォーカス制御を行うことが可能になる。
 また本発明の他の態様は、撮像部と被写体との相対的な動き量である相対動き量を算出し、前記相対動き量をNフレーム(Nは3以上(その値を含む)の自然数)累積した累積動き量を求め、前記累積動き量が第1の閾値よりも大きいか否かを判定する合焦必要判定処理を行い、前記累積動き量が前記第1の閾値よりも大きいと判定された場合に、前記撮像部の合焦動作を実行する内視鏡装置のフォーカス制御方法に関係する。
図1は、内視鏡手技の説明図。 図2は、第1実施形態における内視鏡装置の構成例。 図3は、第2実施形態における内視鏡装置の構成例。 図4は、撮像素子の詳細な構成例。 図5は、光軸垂直動きの説明図。 図6は、光軸平行動きの説明図。 図7は、動き量算出部の詳細な構成例。 図8は、局所的な動きベクトルの例。 図9は、2次元ヒストグラムの例。 図10は、局所的な動きベクトルの例。 図11は、光軸平行動き量を算出する処理のフローチャート。 図12は、光軸平行動きの方向を判定する処理の説明図。 図13は、光軸平行動きの方向を判定する処理の説明図。 図14は、フォーカス制御処理のフローチャート。 図15は、合焦物体位置に応じた閾値の設定例。 図16は、合焦動作が可能か否かを判定する処理のフローチャート。 図17は、第3実施形態における内視鏡装置の構成例。
 以下、本実施形態について説明する。なお、以下に説明する本実施形態は、請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。
 1.第1実施形態
 上述したように、AF制御の従来手法として例えばコントラスト変化をトリガに用いる第1手法や、モーションセンサの出力が所定量以上になったことをトリガに用いる第2手法がある。これらの従来手法を内視鏡手技に適用した場合を考える。
 図1に示すように、内視鏡装置2を用いた手技下では、処置具4(例えば電気メスや鉗子等)を用いて被写体6(生体)に対して処置(例えば病変の切除や縫合等)が行われる。この内視鏡手技に第1手法を適用した場合、画像には被写体6だけでなく処置具4が含まれており、その処置具4はユーザの操作によって動いているため、撮影範囲やピントが変わっていなくてもコントラスト変化が発生する。この処置具4によるコントラスト変化によって不要な合焦動作が実行される可能性があり、処置具4の操作中において安定的なAF制御が困難となる。
 また第2手法を適用した場合、モーションセンサの出力が所定量未満となる動きでは合焦動作が実行されないため、非合焦となっていても合焦動作が実行されない可能性がある。例えば、モーションセンサの出力が所定量未満となる動きが同一方向に継続して発生した場合、その結果として撮影範囲が大きく移動している(又は被写界深度から外れた)にも関わらず、合焦動作が実行されない。また、手ぶれ等の要因でモーションセンサの出力が瞬間的に所定量以上となる動きが発生した場合、撮影範囲が実質的に変わっていない(又は被写界深度から外れていない)にも関わらず、合焦動作が実行される。このようなユーザの意図しない合焦動作が実行されると、使用感を損なう恐れがある。
 以上のように、従来のAF制御手法では、内視鏡手技下で想定される様々なシーンにおいて、不要な合焦動作が実行されるという課題や、必要な合焦動作が実行されないという課題がある。
 図2に、上記のような課題を解決できる本実施形態の内視鏡装置の構成例を示す。内視鏡装置は、撮像部200と、撮像部200と被写体との相対的な動き量である相対動き量を算出する動き量算出部340と、撮像部200のフォーカス制御を行うフォーカス制御部350(AF制御部)と、を含む。なお、撮像部200を内視鏡装置に着脱可能に構成し、内視鏡装置が撮像部200を含まない構成にしてもよい。
 フォーカス制御部350は、相対動き量をNフレーム(Nは3以上(その値を含む)の自然数)累積した累積動き量を求め、その累積動き量が第1の閾値よりも大きいか否かを判定する合焦必要判定処理を行い、累積動き量が第1の閾値よりも大きいと判定された場合に、撮像部200の合焦動作を実行する。
 このように累積動き量を用いることで内視鏡手技下で想定される様々なシーンにおいて必要性に応じた適切なフォーカス制御を行うことができる。即ち、内視鏡装置の被写体としては例えば生体と処置具を想定できるが、合焦動作が必要となるのは、生体の撮影範囲が移動した場合や、或いは生体や処置具が被写界深度から外れた場合等である。逆に、これらの状況でないときに合焦動作が実行されると一時的にフォーカスが変化して視認性が低下する。例えば、処置を行っている間は撮影範囲を動かさずに処置具を操作しているが、このときにフォーカスが変化すると処置に支障をきたす。本実施形態によれば、生体の撮影範囲が移動した場合や、或いは生体や処置具が被写界深度から外れた場合等、合焦動作が必要なときに合焦動作を実行できる。逆に処置具だけが動いている場合等、合焦動作が不要なときには合焦動作が実行されない。
 具体的には、処置具の操作によって画像のコントラストが変化する場合であっても、動き量をトリガに用いることで処置具の操作に影響されないフォーカス制御を実現できる。また、同一方向の小さな移動が継続した場合であっても、動き量を累積することで大きな動き量として検出し(即ち撮影範囲の移動やピンぼけを検出し)、合焦動作を実行できる。また、瞬間的な大きな動きがあった場合であっても、それ以外の動きが小さければ累積動き量としては小さくなるため(即ち撮影範囲の移動やピンぼけが起きていないと判断できるため)、ユーザが意図しない合焦動作を抑制できる。また、動き量を累積することでランダムな動きが平均化されることが期待できる。例えば、処置具の動きは一定方向の動きが継続するよりもランダムな動きが多いと想定される。そのため、処置具の動き量は累積により小さくなり、生体の撮影範囲に一定方向の動き(撮像部と生体の相対的な一定方向の動き)がある場合には生体の累積動き量が大きくなる。
 また、撮影範囲の移動や被写界深度外への移動のような大きな移動を検出する場合、その前後のフレームの(即ちNフレーム間隔の)画像からマッチングを行うことは難しい。本実施形態では、小さい間隔(例えばフレーム間で)で相対動き量を検出し、それを累積することで、大きな移動を検出することが可能になる。
 ここで、動き量とは、撮像部200と被写体の間の相対的な位置の変化(例えばカメラの光軸方向を変えない移動)や相対的な向きの変化(例えばカメラの光軸方向が変わる回転(パン、チルト))に応じて変化する量である。例えば、画像から動きベクトルを検出する場合、撮像部200の移動や回転に応じて動きベクトルの大きさや向きが変化する。或いは、モーションセンサを用いた場合、撮像部200の移動や回転に応じた加速度、角加速度、角速度等が得られる。動き量は、動きの大きさの情報と向きの情報を表す量であり、或いは動きの大きさの情報と向きの情報の一方を表す量であってもよい。例えば、後述する光軸平行動き量では接近・離脱・動き無しに対して“+1”、“-1”、“0”を割り当てており、光軸方向に沿った動きの向きを表す量になっている。本実施形態では、動き量は少なくとも動きの向きの情報を含むことが望ましい。動き量が向きの情報を含むことで、一定方向への動きが累積され、撮像部200と被写体の間の相対的な移動(即ち、撮影範囲の移動や被写界深度外への移動)を検出できる。
 また、第1の閾値とは、累積動き量が表す撮像部200と被写体の間の相対的な移動を検出するための閾値である。即ち、相対動き量はNフレームよりも短い間隔での動き量(例えばフレーム間の動き量)であり、それを累積(例えば加算、積分)したのが累積動き量である。そのため、累積動き量は相対動き量よりも長い間隔での動き(即ちNフレームの間での移動量)を表している。例えば、相対動き量は動きの速度に対応し、それを積分した移動量(距離や方向)が累積動き量に対応する。この累積動き量に対して閾値判定を行うことで、移動量を判定できる。例えば、第1の閾値として、画像サイズの1/3或いは1/2に相当する値を採用できる。この場合、被写体が画像上で画像サイズの1/3或いは1/2動いた場合(即ち、撮影範囲が移動した場合)に合焦動作が実行される。或いは、第1の閾値として、被写界深度に相当する値を採用できる。この場合、被写体が被写界深度から外れた場合に合焦動作が実行される。なお、累積動き量は、移動の大きさを正確に表す場合に量に限らず、移動の大きさの目安となる量であってもよい。例えば、動きの向きの情報(例えば、接近・離脱・動き無しに対して“+1”、“-1”、“0”を割り当てた動き量)を累積したものであってもよい。
 また、Nフレームとは、相対動き量を累積したフレーム数であり、Nは固定に限らず変化する数であってもよい。例えば、第2実施形態で後述するように、ある基準フレーム以後の相対動き量を累積してもよい。この場合、基準フレームから3フレーム目ではN=3、10フレーム目ではN=10となる。或いは、Nを所定数として現在フレームからNフレーム前までの相対動き量を累積してもよい。この場合、現在フレームが変わってもN=所定数である。
 また、フォーカス制御とは、フォーカスを調整する合焦動作、フォーカスを動かさない待機状態、それらの間の遷移制御等を含み、撮像部のフォーカスを制御する処理の全体を指す。合焦動作とは、被写体に対してフォーカスを合わせる一連の動作であり、例えばコントラスト法(山登り法)や、ウォブリングにより合焦方向を判定する手法等を用いることができる。
 2.第2実施形態
 2.1.内視鏡装置
 図3に、第2実施形態の内視鏡装置(内視鏡システム)の構成例を示す。内視鏡装置は、体内への挿入部である硬性鏡100と、硬性鏡100に接続される撮像部200と、処理部300と、表示部400と、外部I/F部500と、光源部600と、を備えている。
 硬性鏡100を用いた内視鏡装置は、例えば腹腔鏡手術等の外科手術に用いられる内視鏡装置である。即ち、生体の腹部等に小孔を空けて、その小孔から硬性鏡100を挿入し、同一の小孔又は別の小孔から処置具を挿入し、硬性鏡100の視野において処置具による外科的処置を行う。処置具としては、例えばメスや鉗子、縫合用の針・糸、洗浄用の注水・吸水器具等の種々の器具が想定される。なお、本実施形態のフォーカス制御の手法は、硬性鏡100を用いた内視鏡装置への適用に限定されるものではなく、軟性鏡を用いた内視鏡装置への適用も可能である。
 光源部600は、白色光を発生する白色光源610と、白色光源610からの出射光を硬性鏡100に導光するライトガイドケーブル620と、を備えている。硬性鏡100は、結像レンズ、リレーレンズ、接眼レンズ等を含んで構成されるレンズ系110と、ライトガイドケーブル620からの出射光を硬性鏡100の先端まで導光するライトガイド部120と、を備えている。撮像部200は、レンズ系110からの光(被写体からの反射光)を結像する対物レンズ系230を備える。対物レンズ系230は、合焦物体位置を調整するフォーカスレンズ210を含んで構成されている。また撮像部200は、対物レンズ系230により結像された反射光を光電変換して画像を生成する撮像素子240と、フォーカスレンズ210を駆動するフォーカスレンズ駆動部220を備えている。フォーカスレンズ駆動部220は、例えばボイスコイルモーター(VCM)である。
 なお、合焦物体位置とは、撮像部200のフォーカスが合っている物体(被写体)の位置である。具体的には、対物レンズ系230において像面(又は像側焦点)に対応して合焦物体面(又は物体側焦点)が決まるが、その像面が撮像素子240の撮像面に一致する場合の合焦物体面の位置が合焦物体位置である。合焦物体位置は、撮像部200と合焦物体面との間の相対的な位置であり、例えば撮像部200の基準点(例えば対物レンズ系230の先端や、硬性鏡100の先端等)から合焦物体面(光学系の物体側においてフォーカスが合っている面)までの距離で表される。合焦物体位置は、例えばフォーカスレンズ210の制御情報(位置)と対物レンズ系230の光学特性(設計値)から知ることができる。
 図4を用いて、本実施形態における撮像素子240の詳細を説明する。図4は、撮像素子240の一部を拡大した図である。撮像素子240は、複数の画素が2次元配列状に配置された構造で、各画素にはRGBのいずれかのカラーフィルタがベイヤ配列で配置されている。撮像素子240は、図4に示すようなベイヤ配列からなるカラーフィルタを有する撮像素子以外にも、例えば補色カラーフィルタを用いた撮像素子や、カラーフィルタを用いずに1つの画素で異なる波長の光を受光可能な積層型の撮像素子、カラーフィルタを用いないモノクロ撮像素子など、被写体を撮像して画像を得られるものであれば、任意の撮像素子を使用できる。
 処理部300は、AD変換部310と、前処理部320と、画像処理部330と、動き量算出部340と、フォーカス制御部350と、制御部360と、を備えている。AD変換部310は、撮像素子240から順次出力されるアナログ信号をデジタルの画像に変換して、前処理部320に順次出力する。前処理部320は、AD変換部310から出力された画像に対して、ホワイトバランス処理、補間処理(デモザイキング処理、ベイヤ画像からRGB画像を生成する処理)等の画像処理を施し、その画像を画像処理部330、動き量算出部340、フォーカス制御部350に順次出力する。画像処理部330は、前処理部320から出力された画像に対して色変換処理、階調変換処理、エッジ強調処理、拡縮処理、ノイズリダクション処理等の画像処理を施し、その画像を表示部400に順次出力する。動き量算出部340は、前処理部320から出力された画像に基づいてフレーム間の動き量を算出し、その動き量をフォーカス制御部350に出力する。動き量算出部340の詳細については後述する。フォーカス制御部350は、動き量算出部340から出力された動き量に基づいて合焦動作の開始・終了を制御し、合焦動作においては被写体に合焦するようフォーカスレンズ駆動部220を駆動させる。フォーカス制御部350の詳細については後述する。表示部400は例えば液晶モニタであり、画像処理部330から順次出力される画像を表示する。
 制御部360は、外部I/F部500や画像処理部330、フォーカス制御部350、撮像素子240などと相互に接続されており、制御信号の入出力を行う。外部I/F部500は、内視鏡装置に対するユーザからの入力等を行うためのインターフェースであり、例えばAF領域の位置やサイズを設定するための設定ボタン、画像処理のパラメータを調整するための調整ボタンなどを含んで構成されている。
 2.2.動き量算出部
 次に、動き量算出部340の詳細について説明する。動き量算出部340は、前処理部320から出力される画像に基づいて、被写体上の着目箇所の移動(図5)を光軸垂直動き量として算出し、被写体と撮像部200の間の距離変化(図6)を光軸平行動き量として算出する。光軸垂直動き量は、画像における上下左右方向への着目箇所(視野、撮影範囲)の位置変化を表す量である。光軸平行動き量は、奥行き方向(光軸に沿った方向)における撮像部200と被写体の間の相対的な位置変化を表す量である。以下では、動き量は光軸垂直動き量及び光軸平行動き量の双方を指すが、いずれか一方を動き量として用いてもよい。また以下では、説明の便宜上、動き量算出部340は前処理部320から出力される画像のG信号のみを処理対象とするが、RGB信号から算出した輝度信号を処理対象とする、などの変形は適宜行っても構わない。
 図7に、動き量算出部340の詳細な構成例を示す。動き量算出部340は、フレームメモリ341と、動きベクトル算出部342と、光軸垂直動き量算出部343と、光軸平行動き量算出部344と、を備えている。
 フレームメモリ341は、前処理部320から出力される画像を一時的に記憶するメモリである。フレームメモリ341は、前処理部320から出力される画像をフレーム遅延し、動きベクトル算出部342に出力する。動きベクトル算出部342は、前処理部320から出力される画像(現在フレームの画像)と、フレームメモリ341から出力されるフレーム遅延した画像(過去フレームの画像)との間の動きベクトルを算出する。動きベクトルの基準は現在フレームの画像である。具体的には、図8に示すように、画像IMの中の複数のポイントにおいて局所的な動きベクトルVEを求める。動きベクトルの算出は、例えば公知技術であるブロックマッチング法や、勾配法で行う。なお、図8では画像IM上に等間隔で設定した点での動きベクトルVEを算出しているが、動きベクトルの算出手法はこれに限定されない。例えば、画像の全画素で動きベクトルを算出する等の変形は適宜行っても構わない。
 光軸垂直動き量算出部343は、動きベクトル算出部342から出力される動きベクトルv(i=0~M-1)に基づいて、光軸垂直動き量MV(光軸垂直動きベクトル)を算出する。具体的には、下式(1)で算出する。
Figure JPOXMLDOC01-appb-M000001
 Mは局所的な動きベクトルの総数(図8の例ではM=15)である。全ての(M個の)動きベクトルを平均化することで、画像全体の大域的な動き量を光軸垂直動き量MVとして算出する。
 なお、光軸垂直動き量MVの算出手法として以下のような変形例を用いてもよい。第1の変形例では、各動きベクトルに対して周辺に位置する動きベクトルとの相関の有無を判定し、相関ありと判定した動きベクトルのみから光軸垂直動き量MVを算出しても構わない。具体的には下式(2)、(3)で算出する。
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000003
 周辺の動きベクトルとの相関は、例えばベクトル間の差分の大きさである。その差分の大きさが所定の閾値未満であれば相関ありと判定し、そうでなければ相関なしと判定する。例えば、周辺の動きベクトルを上下左右4つの動きベクトルとした場合、その上下左右の各動きベクトルについて閾値判定を行う。例えば、4つのうち1つでも差分の大きさが所定の閾値以上であれば相関なしと判定してもよいし、4つのうち2つ又は3つ以上(その値を含む)で差分の大きさが所定の閾値以上であれば相関なしと判定してもよい。M個の動きベクトルの中で相関ありと判定される動きベクトルが存在しない場合には、光軸垂直動きは存在しないと判定し、光軸垂直動き量MVをゼロベクトルとして以降の処理を行う。
 動きベクトルviには、被写体上の着目箇所の移動による動きベクトル以外に、例えば手技中の鉗子操作といった外乱による動きベクトルが含まれる。外乱による動きベクトルは、周辺の動きベクトルと相関がない。上式(2)、(3)に示したように、周辺の動きベクトルとの相関の有無に基づいて外乱による動きベクトルを除外することで、高精度に(即ち、処置具による外乱を除いた生体と撮像部の間の)光軸垂直動き量MVを算出できる。
 第2の変形例では、M個の動きベクトルから、図9に示す向きと大きさの2次元ヒストグラムを作成し、その2次元ヒストグラムから光軸垂直動き量MVを算出しても構わない。図9では、動きベクトルの向きを9個(大きさゼロと8方向)に量子化し、動きベクトルの大きさを11個(大きさを画素数で表して8画素毎)に量子化している。この2次元ヒストグラムにおいて度数が最大となるビンに対応する動きベクトルを光軸垂直動き量MVとする。図9では、右向きで大きさ8~15の11度数が最大なので、その動きベクトルを採用する。大きさは、例えば8~15の中央(例えば12)とすればよい。
 図9は、図8の15個の動きベクトルを2次元ヒストグラムにしたものである。図8から分かるように、画像IMの大部分には生体が写っているが、被写体上の着目箇所を移動する動きに対して生体の動きベクトル(右向きの動きベクトル)は、ほぼ一様である。そのため、被写体上の着目箇所を移動した場合には、その動きベクトルの大部分(15個のうち11個)は向き・大きさともに類似している。この生体の動きベクトルは、図9のヒストグラムでは度数11のビンに対応する。一方、処置具等の外乱による動きベクトル(右上向き、左下向きの動きベクトル)は、M個の動きベクトルの中で占める個数が少ない(15個のうち4個)。また、外乱による動きベクトルは生体の動きベクトルとは向きや大きさが異なっている。この外乱の動きベクトルは、図9のヒストグラムにおいて度数2の2つのビンに対応する。以上から、2次元ヒストグラムで最大度数となるビンを用いることで、外乱の影響を除外して光軸垂直動き量MVを算出できる。
 光軸平行動き量算出部344は、動きベクトル算出部342から出力される動きベクトルに基づいて光軸平行動き量MHを算出する。図10に、光軸平行動きが存在する場合の局所的な動きベクトルVEの例を示す。これは、撮像部が被写体から離脱する場合の例である。光軸平行動きが存在する場合、理想的には動きベクトルを延長した直線が1点(消失点VP)に収束する。図10では処置具による外乱があるため1点に収束しないが、それを除けば理想的には1点に収束する。動きベクトルの始点を延長した側に消失点が存在すれば被写体から離脱する(離れる方向の)動きである。この場合、動きベクトルは消失点から外側に向く。一方、動きベクトルの終点を延長した側に消失点が存在すれば被写体に接近する(近づく方向の)動きである。この場合、動きベクトルは消失点へ内側に向く。上述したように現在フレームを基準として過去フレームに対する動きベクトルを求めているため、離脱/接近に対して動きベクトルが外向き/内向きとなる。なお、過去フレームを基準として現在フレームに対する動きベクトルを求め、離脱・接近に対して動きベクトルが内向き・外向きとなってもよい。
 図11に、光軸平行動き量MHを算出する処理のフローチャートを示す。この処理を開始すると、まず消失点を決定する(S1)。光軸平行動きが存在する場合、理想的には動きベクトルを延長した直線と消失点との間の距離はゼロである。実際には、動きベクトルの量子化精度が有限であるため、或いは処置具等による外乱が存在するため、動きベクトルを延長した直線と消失点との間の距離はゼロとはならない。そのため、M個の動きベクトルvi(i=0~M-1)を延長した直線からの距離の総和が最小となる点を消失点とする。
 次に、光軸平行動きが存在するか否かを判定し、光軸平行動きが存在すると判定した場合には離脱/接近のいずれの動きかを判定する(S2)。光軸平行動きが存在するか否かは、消失点の信頼性で判定する。消失点の信頼性は、上述の距離総和が小さな値であれば高いと判定できるため、距離総和が所定の閾値以下である場合には消失点の信頼性が高いと判定し、光軸平行動きありと判定する。距離総和が所定の閾値よりも大きい場合には、消失点の信頼性が低いと判定し、光軸平行動きなしと判定する。光軸平行動きありと判定された場合、各動きベクトルの方向が消失点側か反対側かにより、光軸平行動きの向き(離脱/接近)を判定する。この光軸平行動きの向きの判定で、離脱/接近いずれとも判定できない場合、光軸平行動きなしと判定する。
 次に、ステップS2での判定結果に基づいて下式(4)のように設定した光軸平行動き量MHを出力する(S3)。
Figure JPOXMLDOC01-appb-M000004
 ステップS2における離脱/接近の判定方法として、例えば以下の手法を用いる。即ち、図12に示すように、動きベクトルv(i=0~M-1)と対応するベクトルlとのなす角度(arg(v)-arg(l))により離脱/接近を判定する。lは、動きベクトルvの始点SPを始点とし、消失点VPを終点とするベクトルである。arg(x)はベクトルxの偏角を返す関数である。
 具体的には、下式(5)によりM個の動きベクトルを分類する。下式(5)の模式図を図13に示す。M個の動きベクトルの分類結果のうち最も分類数が多いものを光軸平行動きの判定結果とする。分類数が最多となる分類が複数存在する場合、光軸平行動きなしと判定する。例えば、図10では、生体の動きベクトル11個が離脱に分類され、処置具の動きベクトル4個が接近又は動き無しに分類されるので、判定結果は離脱となる。
Figure JPOXMLDOC01-appb-M000005
 ここで、T_ARG_Fは離脱する動きに対応する閾値である。T_ARG_Fは接近する動きに対応する閾値である。離脱する動きなら動きベクトルは消失点と反対の方向を向くため、arg(v)-arg(l)は±πに近づく。接近する動きなら動きベクトルは消失点の方に向くため、arg(v)-arg(l)は0に近づく。このため、上式(5)により光軸平行動きの有無と方向を判定できる。
 なお、離脱/接近の判定方法として、以下の変形例を用いてもよい。即ち、下式(6)、(7)のように動きベクトルvとベクトルlの内積により離脱/接近を判定してもよい。
Figure JPOXMLDOC01-appb-M000006
Figure JPOXMLDOC01-appb-M000007
 ここで、v・lは動きベクトルvとベクトルlの内積である。|x|はベクトルxの大きさである。T_PRO_Fは離脱する動きに対応する内積の閾値である。T_PRO_Nは接近する動きに対応する内積の閾値である。離脱する動きなら動きベクトルの方向は消失点と反対方向となるため、(v・l)/|v||l|は-1に近づく。接近する動きなら動きベクトルの方向は消失点側となるため、v・l/|v||l|は+1に近づく。このため、上式(6)、(7)により光軸平行動きの有無と方向を判定できる。
 また、光軸平行動き量を算出する手法として、以下の変形例を用いてもよい。即ち、上式(2)、(3)で説明した手法と同様にして、周辺の動きベクトルとの相関を判定し、相関ありと判定した動きベクトルから光軸平行動き量MHを算出しても構わない。図10から分かるように、光軸平行動きが存在する場合には、生体の部分(相関が高い部分)においても周辺の動きベクトルの向きが若干異なっている。そのため、光軸平行動きの相関判定用の閾値を、光軸垂直動きの相関判定用の閾値よりも大きくしてもよい。
 また、これまで動きベクトルに基づいて光軸平行動き量を算出する手法について説明したが、光軸平行動き量を算出する手法はこれに限定されない。例えば、回転不変位相限定相関法(RIPOC)を用いて画像から光軸平行動き量を算出しても構わない。この場合、現在のタイミングで取得された画像を基準に、フレームメモリに格納された画像が拡大されていれば離脱する動き、縮小されていれば接近する動き、倍率に変化がなければ光軸平行動きなし、と判定する。
 2.3.フォーカス制御部
 次に、フォーカス制御部350が行うフォーカス制御(AF制御)の詳細について説明する。
 図14に、フォーカス制御のフローチャートを示す。このフローにおいて、上述の合焦動作はステップS11~S13に該当する。
 フォーカス制御部350は、まず合焦方向を判別する(S11)。具体的には、AD変換部310から順次出力される画像の取得タイミングに同期するように、フォーカスレンズ210のウォブリング動作を開始する。ウォブリング動作とは、フォーカスレンズ210を前後に動かし(揺らし)、合焦物体位置を前後(無限遠側・至近側)に動かす(揺らす)動作である。このウォブリング動作により合焦物体位置が異なる複数の画像が撮影される。例えば、フォーカスレンズ210をウォブリング中心とその前後の3点に移動させる。この場合、その3点での画像が順次撮影される。その後、フォーカス制御部350は、ウォブリング動作で取得された画像に基づいて、例えば公知の手法を用いて合焦方向を判別する。例えば、ウォブリング動作で得られた複数の画像のコントラスト値を求め、そのコントラスト値から合焦方向を判定する。例えば、合焦物体位置を無限遠側に動かした方がコントラスト値が高い場合、合焦物体位置を無限遠側に動かす方向が合焦方向である。
 次に、フォーカス制御部350は、S11で決定された合焦方向に基づいて、ウォブリングの中心位置を変更する(S12)。具体的には、S11で決定される合焦方向は、合焦物体位置が撮像素子240に近い至近(近点)側となる方向か、遠い無限遠(遠点)側となる方向のいずれかである。合焦方向が至近側の方向の場合にはウォブリング中心を至近側に移動させ、合焦方向が無限遠側の方向の場合にはウォブリング中心を無限遠側に移動させる。
 次に、フォーカス制御部350は、合焦が完了したか否かの判断を行う(S13)。ここでフォーカス制御部350は、公知の合焦判定処理等を行うことで合焦判断を行えばよい。例えば、画像のコントラスト値の高・低から合焦・非合焦を判断してもよいし、或いは、ウォブリング中心の停止・移動から合焦・非合焦を判断してもよい。フォーカス制御部350は、合焦が完了していないと判断した場合はステップS11~S13の動作を繰り返し、ウォブリングの中心位置を徐々に被写体に近づけていく(徐々に被写体に合焦させていく)。また、合焦が完了したと判断した場合はフォーカスレンズ210のウォブリング動作を終了し、合焦動作を完了する。合焦動作完了後は待機動作に移行する。待機動作では、合焦動作を行わない(フォーカスレンズ210を動かさない)。例えば、ステップS13において合焦が完了したと判断したときのフォーカスレンズ210の位置で停止させる。
 待機動作を開始すると、まず、フォーカス制御部350はSUM_MV、SUM_MHを初期化する(S14)。SUM_MV、SUM_MHは、後述するステップS15において合焦動作が必要か否かの判定に用いる値である。
 次に、フォーカス制御部350は、光軸垂直動き量MVおよび光軸平行動き量MHに基づいて、合焦動作が必要か否かを判定する(S15)。合焦動作が不要であると判定した場合、COUNTを初期化した後(S16)、次の画像取得タイミングに同期してステップS15を実行する。COUNTは、後述するように、合焦動作が可能か否かの判定に用いる値である。一方、合焦動作が必要であると判定した場合、合焦動作が可能か否かを判定する(S17)。合焦動作が不可であると判定した場合、次の画像取得タイミングに同期してステップS15を実行する。合焦動作が可能であると判定した場合、待機動作を終了して合焦動作に移行し、ステップS11を実行する。合焦動作の必要/不要(S15)および可能/不可(S17)の判定の詳細については後述する。
 合焦動作が必要か否かの判定(S15)について説明する。合焦動作が必要な場合は、被写体への合焦状態が合焦から非合焦へと変化した場合である。合焦状態が合焦から非合焦へと変化するのは、ユーザが内視鏡を操作して被写体上で着目箇所を移動した場合、ユーザが内視鏡を操作して撮像部から被写体までの距離を変化させた場合である。本判定では、光軸垂直動き量MVおよび光軸平行動き量MHに基づいて、これら2つの場合のいずれかを検出した場合に合焦動作が必要であると判定する。いずれの場合も検出できない場合、ステップS16を実行した後、次の画像取得タイミングにおける判定(S15)に移行する。
 まず、ユーザが被写体上で着目箇所を移動した場合、移動前後のフレーム間では光軸垂直動き量MVが存在する。これをNフレーム(Nは3以上(その値を含む)の自然数)累積した値SUM_MVの絶対値が所定の閾値T_MVを超えれば、被写体上の着目箇所移動により非合焦となった可能性があるとして、合焦動作が必要と判定する。具体的には、下式(8)、(9)を用いて判定する。ここで、jはフレーム番号であり、j=0は待機動作に移行した最初のフレーム(又は、待機動作に移行した後の基準フレーム)に対応する。j=N-1は現在のフレームに対応する。
Figure JPOXMLDOC01-appb-M000008
Figure JPOXMLDOC01-appb-M000009
 SUM_MVは光軸垂直動き量MVを累積した、上下方向・左右方向の成分(例えば画像上でのx成分とy成分、或いは、水平走査方向成分と垂直走査方向成分)を有する2次元ベクトルである。
 なお、SUM_MVに基づく合焦動作が必要か否かの判定では、以下の変形例を用いてもよい。即ち、内視鏡手技においては臓器等の生体が上下方向に折り重なっている。このため、ベクトルの大きさが同じであっても、左右方向に比べて上下方向は異なる臓器に着目箇所を移動した可能性がより高く、非合焦となる可能性がより高い。このため、左右方向の光軸垂直動きに対して上下方向の光軸垂直動きをより合焦動作が必要と判定されやすくしても構わない。具体的には下式(10)、(11)で判定する。
Figure JPOXMLDOC01-appb-M000010
Figure JPOXMLDOC01-appb-M000011
 ここで、SUM_MV_V、SUM_MV_Hは、SUM_MVの上下方向成分、左右方向成分である。T_MV_V、T_MV_Hは、上下方向成分SUM_MV_Vの閾値、左右方向成分SUM_MV_Hの閾値である。このように上下方向と左右方向を異なる閾値で判定することで、合焦動作が必要な場合をより高精度に判定できる。
 次に、ユーザが内視鏡と被写体との間の距離を変化させた場合、変化前後のフレーム間には光軸平行動き量MHが存在する。これを、待機動作に移行した最初のタイミングから現在のタイミングまでNフレーム(Nは3以上(その値を含む))累積した値SUM_MHの絶対値が所定の閾値T_MHを超えた場合、被写体との距離変化により非合焦となった可能性があるとして、合焦動作が必要と判定する。具体的には、下式(12)、(13)を用いて判定する。ここで、jはフレーム番号であり、j=0は待機動作に移行した最初のフレーム(又は、待機動作に移行した後の基準フレーム)に対応する。j=N-1は現在のフレームに対応する。
Figure JPOXMLDOC01-appb-M000012
Figure JPOXMLDOC01-appb-M000013
 なお、SUM_MHに基づく合焦動作が必要か否かの判定では、以下の変形例を用いてもよい。即ち、光軸平行動きが接近する方向か離脱する方向かに応じて閾値T_MHを変更しても構わない。合焦動作が必要となる場合は、内視鏡と被写体との距離が被写界深度外となる場合である。被写界深度は合焦物体位置を基準に無限遠側より至近側の方が狭いため、光軸平行動きの絶対値が同じ値であっても、離脱する光軸平行動きより接近する光軸平行動きの方が非合焦となる可能性が高い。このため、離脱する光軸平行動きよりも接近する光軸平行動きの方を、より合焦動作が必要と判定されやすくしても構わない。具体的には下式(14)~(16)で判定する。
Figure JPOXMLDOC01-appb-M000014
Figure JPOXMLDOC01-appb-M000015
Figure JPOXMLDOC01-appb-M000016
 ここで、T_MH_Nは、接近する方向でのSUM_MHの閾値であり、T_MH_Fは離脱する方向でのSUM_MHの閾値である。このように接近と離脱を異なる閾値で判定することで、合焦動作が必要な場合をより高精度に判定できる。
 また、これまで光軸垂直動き量と光軸平行動き量に基づいて合焦動作が必要か否かの判定を行う場合について説明してきたが、当該判定の手法はこれに限定されない。例えば、さらに合焦物体位置に基づいて当該判定を行っても構わない。具体的には、合焦物体位置が撮像部200側に近い至近側にある場合は無限遠側にある場合に比べて相対的に被写界深度が狭いため、光軸垂直動き量や光軸平行動き量が同じ値であっても非合焦となりやすい。このため、合焦物体位置が相対的に至近側にある場合を基準に上述の閾値を設定すると、合焦物体位置が相対的に無限遠側にある場合に不要な合焦動作を実行する恐れがある。一方、合焦物体位置が相対的に無限遠側にある場合を基準に上述の閾値を設定すると、合焦物体位置が相対的に至近側にある場合に非合焦となっているにもかかわらず合焦動作が実行されない不具合が発生しうる。そこで、例えば図15に示すように、合焦物体位置が相対的に至近側にある場合は、相対的に無限遠側にある場合に比べてより合焦動作が必要と判定されやすくするよう、閾値を合焦物体位置に応じて設定しても構わない。図15では合焦物体位置PA1、PA2において閾値TA1、TA2であり、PA1>PA2(即ちPA1の方が無限遠側)、TA1>TA2である。ただし、閾値の設定は図15に限定するものではなく、合焦物体位置が相対的に至近側にある場合は、相対的に無限遠側にある場合に比べてより合焦動作が必要と判定されやすくするなら、どのように閾値を設定しても構わない。
 また、これまで、待機状態に移行した最初のタイミングを起点に現在のタイミングまでのNフレーム分の動き量を累積する(即ち、現在のフレームが1フレーム進むとNが1増える)場合について説明したが、動き量の累積手法はこれに限定されない。即ち、動きベクトルは有限精度のため誤差を含んでおり、長時間累積すると誤差の累積により誤って合焦動作が必要と判定される場合がある。このため、現在のフレームを基準として過去Nフレーム分(N=K、Kは3以上(その値を含む)の自然数)の動き量を累積してもよい。この場合N=Kは所定数(例えば固定)である。即ち、現在のフレームが1フレーム進んでも、基本的にはN=Kは変化しない。
 次に、合焦動作が可能か否かの判定(S17)について説明する。例えば、内視鏡の操作(例えば着目箇所の移動)の途中で合焦動作が必要と判定された場合、直ちに合焦動作を実行すると内視鏡の操作の完了前に一旦合焦動作を完了し、操作完了後には非合焦となる場合がある。この場合、ユーザの操作中に合焦動作が行われるため、使用感が損なわれる恐れがある。このため、ステップS15で合焦動作が必要と判定された後、着目箇所の移動および被写体までの距離変化が発生しないことを判定した後に、合焦動作を実行する。
 図16に、合焦動作が可能か否かを判定する処理の詳細なフローチャートを示す。まず、各フレームの光軸垂直動き量MVおよび光軸平行動き量MHが所定値以下かを判定する。つまりフレーム間の動きがほとんどないか否かを判定する(S32)。具体的には下式(17)で判定する。
Figure JPOXMLDOC01-appb-M000017
 ここで、T_MV_Pは光軸垂直動き量MVの閾値である。
 ステップS32において動きなしと判定された場合、判定に利用する値COUNTをインクリメントする(S33)。ステップS32において動きありと判定された場合、何もせずにステップS34の処理に移行する。
 次に、COUNTがLフレーム(Lは3以上(その値を含む)の自然数)より大きいか否かを判定する(S34)。COUNTがLフレームより大きい場合、合焦動作が可能であると判定し(S36)、合焦動作(図14のS11~S13)に移行する。COUNTがLフレーム以下である場合、合焦動作が不可であると判定し(S35)、次のフレームにおける合焦動作が必要であるか否かの判定(図14のS15)に移行する。
 以上のように合焦動作が可能であるか否かを判定することで、一定フレーム以上、光軸垂直動きおよび光軸平行動きがない場合に合焦動作を実行することが可能となり、不要な合焦動作を抑制できる。
 以上の第2実施形態によれば、合焦動作を実行可能な撮像部により、被写体からの反射光を画像として撮像する。画像から撮像部と被写体との相対的な動き量を算出する。動き量を複数フレーム累積した正味の動き量が所定の閾値を超えた場合、合焦動作必要と判定して撮像部の合焦動作を実行する。複数フレーム累積した動き量が所定量を超えた場合に合焦動作を実行することで、緩慢な動きであっても非合焦となれば合焦動作を実行し、ユーザの意図しない瞬間的な動きに対しては合焦動作を実行しない、AF制御が実現できる。
 また本実施形態では、フォーカス制御部350は、合焦必要判定処理(S15)において累積動き量SUM_MV、SUM_MHが第1の閾値T_MVよりも大きいと判定(上式(9))された場合に、相対動き量MV、MHが第2の閾値T_MV_P、0よりも小さいフレームがLフレーム(Lは3以上(その値を含む)の自然数)存在したか否かを判定(上式(17))する合焦可能判定処理(S17)を行い、相対動き量MV、MHが第2の閾値T_MV_P、0よりも小さいフレームがLフレーム存在したと判定された場合に、撮像部200の合焦動作を実行する。
 このようにすれば、内視鏡装置が大きく移動して合焦動作が必要となったと判断したときに、その移動による動きが小さくなった(即ち、移動が終わった)と判断できる場合に合焦動作を実行できる。これにより、内視鏡装置の移動が終わる前にフォーカスが動く(例えばウォブリングが発生する)ことを抑制できる。或いは、内視鏡装置の移動の途中で合焦動作が行われ、移動が終わったときには再びピントが合っていない状況の発生を抑制できる。これにより、ユーザに対して違和感のない映像、或いは視認性の良い映像を提供できる。
 ここでLフレームのLは所定数であり、撮像部200と被写体との間が相対的に止まっている(動きが小さい)ことを判断するためのフレーム数である。即ち、そのフレーム数の間に動きが小さければ(ほぼ無ければ)ユーザが撮像部200を動かしていないと判断できるフレーム数をLとして設定しておけばよい。例えば、Lは固定であってもよいし、或いは、ユーザがLを設定できるようにしてもよい。
 また本実施形態では、動き量算出部340は、複数の局所動き量vi(図8、図10のVE)を求め、複数の局所動き量viの各局所動き量について周囲の局所動き量との相関を求め、複数の局所動き量のうち相関が所定の相関よりも高い局所動き量に基づいて相対動き量MV、MHを求める(上式(2)、(3))。
 このようにすれば、外乱による局所的な動きの乱れを相関に基づいて除くことができるので、大域的な(例えば画像全体での)動きを抽出し、その大域的な動きから累積動き量を求めることができる。外乱とは、背景となる生体とは異なる動きであり、例えば処置具の操作による動きや、ノイズ等を想定できる。大域的な動きとは、生体の動きであり、具体的には、内視鏡装置で観察している(着目している)生体領域と撮像部200との間の相対的な動きである。例えば、光軸垂直動きでは生体が全体として同じ方向へ移動する動きとなり、光軸平行動きでは生体が消失点へ集まる動き又は消失点から広がる動きとなる。処置具等の外乱は、これらとは異なる局所的な動きとなる。本実施形態では大域的な動きを抽出できることで、生体に対する撮像部200の動きをトリガとして合焦動作を行うことが可能となる。即ち、内視鏡手技において処置具の操作により画像内に動きが発生するが、その動きを合焦動作のトリガから除外できる。
 また本実施形態では、相対動き量は1以上(その値を含む)の成分を有する。例えば第2実施形態では、光軸垂直動き量MVと光軸平行動き量MHの2成分である。或いは、光軸垂直動き量MVは2次元ベクトルなので2成分と考え、合計で3成分としてもよい。また後述する第3実施形態では、6軸モーションセンサが6軸の検出信号を出力するので6成分である。或いは、その6成分を光軸垂直動き量MVと光軸平行動き量MHに変換した場合には、2成分又は3成分である。
 フォーカス制御部350は、上記1以上(その値を含む)の成分の各成分について累積動き量を求め、その各成分の累積動き量の各々に対応する閾値を第1の閾値として合焦必要判定処理(S15)を行い、各成分の累積動き量のうち少なくとも1つが、その累積動き量に対応する閾値よりも大きいと判定された場合に、合焦動作を実行する。例えば上式(9)のように光軸垂直動き量MVの累積動き量SUM_MVを閾値T_MVで判定し、上式(13)のように光軸平行動き量MHの累積動き量SUM_MHを閾値T_MHで判定する。
 このようにすれば、動きの各成分について累積動き量を求め、その各成分に対応する閾値で合焦動作が必要か否かを判断できる。動きの成分に応じて、どの程度の移動が発生したら合焦動作が必要となるか(ピントが合わなくなるか)は異なっている。そのため、各成分に対応した閾値を設けることで、正確な判断が可能になる。また、少なくとも1成分の累積動き量が閾値よりも大きい場合に合焦動作を行うことで、いずれか1つでも移動量が大きい成分があれば合焦動作を行うことができる。
 また本実施形態では、動き量算出部340は、撮像部200の光軸に垂直な方向の動き量である光軸垂直動き量MVを相対動き量として求める。フォーカス制御部350は、光軸垂直動き量MVの累積動き量SUM_MVに対する光軸垂直動き用閾値T_MVを第1の閾値として合焦必要判定処理を行う(上式(9))。
 光軸垂直動き量とは、図5に示すように、被写体6(例えば生体)の撮影領域RA2(撮影範囲)が撮影領域RA1に移動することに伴う動き量である。領域RA1、RA2は中心(光軸と被写体6が交差する位置)が異なる領域である。領域RA1、RA2は一部が重なっていてもよい。このような動きは、図5に示すような内視鏡装置2の回転MA(光軸に平行でない方向を軸とする回転)、又は、内視鏡装置2の平行移動(光軸に平行でない方向への平行移動)によって発生する。
 このように光軸垂直動き量MVを用いることで、被写体の撮影範囲(着目箇所)が移動したことを検出することが可能となり、撮影範囲が変わった(大きく変わった)場合に合焦動作を実行することが可能になる。例えば、撮影範囲が1画面分移動して全く違う被写体を観察した場合、或いは、1/2画面分移動して撮影範囲をずらした場合などに、再度フォーカスを合わせてユーザに鮮明な画像を提供できる。
 また本実施形態では、動き量算出部340は、撮像部200により撮像された撮像画像に基づいて複数の局所動き量viを求め、複数の局所動き量viの平均を各フレームにおいて求め、その平均を光軸垂直動き量MVとして求める(上式(1))。
 このようにすれば、画像内の複数の位置における局所的な動き量から、被写体の大域的な動き量を求めることができる。上述したように、内視鏡手技では処置具に比べて生体の占める割合が大きいため、局所的な動き量を平均することで生体の大域的な動き量を求めることができる。また、フレーム内での平均によって外乱によるランダムな動きが画像内で平均され、それを複数フレームで累積することで、外乱によるランダムな動きが時間的に平均される。これにより、生体の大域的な動きを抽出することが可能になる。
 また本実施形態では、動き量算出部340は、複数の局所動き量viを求め、各フレームにおいて複数の局所動き量viから大きさ及び方向についてのヒストグラムを作成し(図9)、そのヒストグラムの最大のビンを光軸垂直動き量MVとして求める。
 このようにすれば、画像内の複数の位置における局所的な動き量の中から被写体の大域的な動き量を選び、光軸垂直動き量MVとして抽出できる。即ち、内視鏡手技では処置具に比べて生体の占める割合が大きいため、生体の大域的な動き量がヒストグラムの中で最も大きなビンとなることが想定できる。そのため、ヒストグラムの中で最大のビンを選択することで、処置具等による外乱の動き量を除いた大域的な動き量を抽出することが可能になる。
 また本実施形態では、動き量算出部340は、撮像部200の光軸に垂直な方向の動き量である光軸垂直動き量MVを相対動き量として求める。フォーカス制御部350は、光軸垂直動き量MVに対して合焦可能判定処理(S17)を行う。
 このようにすれば、撮影範囲が止まっている(ユーザが撮影範囲を移動させていない)と判断できる場合に、合焦動作をトリガできる。例えば、ユーザが観察対象を変える(例えば見る臓器を変える、見る領域を変える)ために撮像部200を移動させた場合、まず移動が一定以上の距離になったときに合焦動作が必要であると判断され、移動が続いている間はトリガを待機し、移動が終わったと判断したときにトリガが撮像部200に送信される。
 また本実施形態では、動き量算出部340は、撮像部200の光軸に平行な方向の動き量である光軸平行動き量MHを相対動き量として求める。フォーカス制御部350は、光軸平行動き量MHの累積動き量SUM_MHに対する光軸平行動き用閾値T_MHを第1の閾値として(上式(13))合焦必要判定処理(S15)を行う。
 光軸平行動き量とは、図6に示すように、被写体6(例えば生体)の撮影領域RB1(撮影範囲)が撮影領域RB2に拡大又は縮小することに伴う動き量である。領域RB1、RB2は中心(光軸と被写体6が交差する位置)が同じ領域である。なお、通常は光軸平行動きと光軸垂直動きが混在すると考えられるが、その場合には領域RB1、RB2の中心は一致しなくてよい。即ち、中心の一致・非一致に関わらず、光軸平行動きがあれば撮影領域が拡大又は縮小される。このような光軸に平行な動きは、図6に示すように内視鏡装置2が光軸に平行な方向への移動MBをした場合に発生する。
 このように光軸平行動き量MHを用いることで、被写体が被写界深度を外れたか否かを推定することが可能となり、被写体が被写界深度を外れた(被写体が合焦物体位置から大きくずれた)と推定できる場合に合焦動作を実行することが可能になる。これにより、ピントが外れた(またはピントが外れそうな)被写体に再度フォーカスを合わせてユーザに鮮明な画像を提供できる。
 また本実施形態では、動き量算出部340は、複数の局所動きベクトルvi(図10のVE)を求め、各フレームにおいて複数の局所動きベクトルviの消失点VPを求め、複数の局所動きベクトルviの各局所動きベクトルを延長した直線と消失点VPとの間の距離に基づく消失点の評価値(距離の総和)を求め、その評価値が所定値よりも大きいフレームにおいて光軸平行動き量MHを求める。
 このようにすれば、光軸平行動きが存在するか否かを消失点VPの評価値から判断することが可能となり、光軸平行動きが存在すると判断されたフレームで光軸平行動き量MHを求めることができる。即ち、消失点VPが明確でない(消失点VPの信頼性が低い)場合には、光軸平行動きが存在しない(又は外乱等によって光軸平行動きが明確に求められない)。そのため、消失点VPの評価値が低いフレームを除くことで、光軸平行動きが確かに存在するフレームから累積動き量を求めることができる。
 また本実施形態では、動き量算出部340は、撮像部200と被写体との接近・離脱に対応して正負の符号が異なる光軸平行動き量MH(上式(4))を求める。
 被写体が被写界深度から外れるのは、接近か離脱が継続して起きた場合である。接近・離脱に対応して正負の符号が異なる光軸平行動き量MHを用いることで、接近か離脱が継続して起きた場合に累積動き量が大きくなり、合焦動作をトリガできる。即ち、接近と離脱がランダムに繰り返すような場合には累積により正負が打ち消し合い、累積動き量が大きくならないので、合焦動作がトリガされず、不要なフォーカスの変化が発生しない。
 また本実施形態では、動き量算出部340は、複数の局所動きベクトルviを求め、各フレームにおいて複数の局所動きベクトルviの消失点VPを求め、複数の局所動きベクトルviの各局所動きベクトルの始点SPと消失点VPとを結ぶベクトルlと各局所動きベクトルとが成す角度(arg(v)-arg(l))に応じて変化する情報を求め(図12)、その情報に基づいて接近・離脱を判定する(上式(5)~(7))。
 動きベクトルvとベクトルlとが成す角度に応じて変化する情報は、その角度(arg(v)-arg(l))そのものであってもよいし(上式(5))、その角度の関数となっている何らかの値(例えば動きベクトルvとベクトルlの内積を正規化した値(上式(6)、(7)))であってもよい。
 このように動きベクトルvとベクトルlとが成す角度に応じて変化する情報を用いることで、光軸平行動きの方向(接近、離脱)を判断できる。即ち、接近の場合には局所的な動きベクトルは消失点VPに集まる方向となるため、動きベクトルvとベクトルlはほぼ同じ方向を向く(成す角度が0に近い)。一方、離脱の場合には局所的な動きベクトルは消失点VPから広がる方向となるため、動きベクトルvとベクトルlはほぼ逆の方向を向く(成す角度が+π、-πに近い)。このことを利用して、成す角度により光軸平行動きの方向を判断できる。
 また本実施形態では、動き量算出部340は、撮像部200の光軸に平行な方向の動き量である光軸平行動き量MHを相対動き量として求める。フォーカス制御部350は、光軸平行動き量MHに対して合焦可能判定処理(S17)を行う。
 このようにすれば、光軸方向における動きが止まっている(ユーザが撮像部200を光軸方向に移動させていない)と判断できる場合に、合焦動作をトリガできる。例えば、ユーザが観察対象を変える(例えば今よりも手前や奥の臓器を見る)ため、或いは観察範囲を広げる・狭めるために撮像部200を移動させた場合、まず光軸方向への移動が一定以上の距離になったときに合焦動作が必要であると判断され、移動が続いている間はトリガを待機し、移動が終わったと判断したときにトリガが撮像部200に送信される。
 また本実施形態では、フォーカス制御部350は、撮像部200の合焦物体位置が第1の位置(図15のPA1)である場合の第1の閾値(TA1)よりも、合焦物体位置が第1の位置(PA1)よりも近い第2の位置(PA2)である場合の第1の閾値(TA2)を、小さい値に設定する(TA1>TA2)。
 例えば、合焦物体位置(例えばフォーカスレンズ210の位置情報)と第1の閾値を対応付けたテーブルを不図示の記憶部に記憶しておき、そのテーブルを参照することで第1の閾値を設定してもよい。或いは、ある所定の合焦物体位置(基準の合焦物体位置)に対応する第1の閾値を基準値として、その基準値を実際の合焦物体位置に応じて補正処理することで、第1の閾値を設定してもよい。
 このように、合焦物体位置に応じて(至近側にピントが合っているか、無限遠側にピントが合っているかに応じて)閾値を変えることで、合焦物体位置の変化による被写界深度の変化に対応できる。即ち、通常の光学系ではピントが至近側であるほど被写界深度は狭くなり、被写体が被写界深度を外れる可能性が高くなるが、至近側で閾値を小さくすることで合焦状態を維持できる。一方、無限遠側では被写界深度が広くなり、被写体が被写界深度を外れる可能性が低くなるので、無限遠側で閾値を大きくすることで、不要な合焦動作を抑制できる。
 また本実施形態では、動き量算出部340は、撮像部200の光軸に垂直な方向の動き量である光軸垂直動き量MVを相対動き量として求める。フォーカス制御部350は、累積動き量SUM_MVの第1方向(垂直走査方向、y方向)成分SUM_MV_Vに対する第1方向用閾値T_MV_Vと累積動き量SUM_MVの第2方向(水平走査方向、x方向)成分SUM_MV_Hに対する第2方向用閾値T_MV_Hとを第1の閾値として合焦必要判定処理(S15)を行い、第1方向用閾値T_MV_Vと第2方向用閾値T_MV_Hとを異なる値に設定する(上式(10)、(11))。
 このようにすれば、画像の上下方向に移動した場合と左右方向に移動した場合とで閾値を変え、合焦動作をトリガする移動量を異ならせることができる。例えば、画像の上下サイズと左右サイズが異なる場合には、そのサイズに応じて閾値を変化させてもよい。或いは、人体の構造や重力の関係等から上下方向と左右方向で臓器の奥行きの変化が異なる場合には、それに応じて閾値を変化させてもよい。
 また本実施形態では、動き量算出部340は、撮像部200の光軸に平行な方向の動き量である光軸平行動き量MHを相対動き量として求める。フォーカス制御部350は、累積動き量SUM_MHが撮像部200と被写体との接近に対応する場合の接近用閾値T_MH_Nと、累積動き量SUM_MHが撮像部200と被写体との離脱に対応する場合の離脱用閾値T_MH_Fとを、第1の閾値として合焦必要判定処理を行い(上式(14))、離脱用閾値T_MH_Fの絶対値よりも接近用閾値T_MH_Nの絶対値を小さい値に設定する(上式(15)、(16))。
 このように、光軸平行動きの方向(接近・離脱)に応じて閾値を変えることで、至近側と無限遠側での被写界深度の違いに対応できる。即ち、通常の光学系では、合焦物体位置が一定である場合に、その被写界深度の至近側は無限遠側に比べて狭い。そのため、撮像部200と被写体が接近する場合には、撮像部200と被写体が離脱する場合よりも被写体が被写界深度を外れる可能性が高くなる。本実施形態では、離脱用閾値よりも接近用閾値を小さくすることで、被写界深度が狭い方向の接近に対して合焦状態を維持しやすくなり、被写界深度が広い方向の離脱に対して不要な合焦動作を抑制できる。
 また本実施形態では、動き量算出部340は、合焦動作が待機状態に移行した後の基準フレーム(例えば最初のフレーム)から現在のフレームまでをNフレームとして累積動き量SUM_MV、SUM_MHを求める。
 このようにすれば、被写体にピントを合わせた後(合焦動作を完了した後)の動き量が累積されるので、一旦ピントが合った後に生じた移動の総量を知ることができる。即ち、その一旦ピントが合った被写体からの移動が、次に再びフォーカスが必要な移動量となったか否かを判断して、合焦動作をトリガできる。また、動きが小さくても(緩やかでも)、待機状態に移行した後に継続して累積することで、その移動の総量が大きくなったときに合焦動作をトリガできる。
 なお、動き量算出部340は、相対動き量MV、MHの累積フレーム数(N)をリセットした後の基準フレーム(例えばリセットした後の最初のフレーム)から現在のフレームまでをNフレームとして累積動き量SUM_MV、SUM_MHを求めてもよい。
 待機状態に移行してから動き量を累積し続けた場合、誤差(例えばノイズやオフセット等)も累積されるため、累積動き量と実際の移動量との誤差が大きくなる。そのため、累積動き量を一旦リセットして再び累積しなおすことで、その誤差が大きくなることを抑制できる。
3.第3実施形態
 図17に、第3実施形態の内視鏡装置の構成例を示す。内視鏡装置は、体内への挿入部である硬性鏡100と、硬性鏡100に接続される撮像部200と、処理部300と、表示部400と、外部I/F部500と、光源部600と、を備えている。硬性鏡100および処理部300以外は第2の実施形態と同様のため、説明を省略する。
 硬性鏡100は、3軸の回転運動および3軸の並進運動を検出する6軸のモーションセンサ130を備えており、モーションセンサ130からの検出信号(動き信号)を処理部300に出力する。例えば、モーションセンサ130は、3軸(互いに直交するx、y、z軸)回りの角加速度を検出する角加速度センサ(ジャイロセンサ)と、3軸(x、y、z軸)方向の加速度を検出する加速度センサと、を含む。モーションセンサ130は、撮像素子240の動作周波数(フレーム周波数)よりも十分高速な周波数で動作しており、検出した角加速度・加速度を図示しない積分器により積分し、角度変化・位置変化として出力する。積分の開始・終了タイミングは撮像素子240の動作タイミング(画像の撮影タイミング)に同期しており、動き信号は撮像素子240の動作タイミング間(フレーム間)に発生した硬性鏡100の角度変化・位置変化である。
 処理部300は、AD変換部310と、前処理部320と、画像処理部330と、動き量算出部340と、フォーカス制御部350と、制御部360と、を備えている。動き量算出部340以外は第2の実施形態と同様のため、説明を省略する。
 動き量算出部340は、上述のモーションセンサ130から出力される検出信号および合焦物体位置に基づいて、動き量を算出する。算出した動き量は、フォーカス制御部350に出力される。動き量には第2の実施形態と同様に、光軸垂直動き量と光軸平行動き量がある。光軸平行動き量は、実空間上の動きである位置変化の光軸平行成分をそのまま用いる。このため、第3の実施形態における光軸平行動き量は、正負の符号に加えて大きさを持った値、例えば-3mmや+10mmといった値である。フォーカス制御部350は、この値を上述の光軸平行動き量MHとして扱い、累積して第2の実施形態と同様の判定(合焦必要判定、合焦可能判定)を行う。光軸垂直動き量としては、実空間上の動きである位置変化の光軸垂直成分(角度変化のヨー成分およびピッチ成分)から画像上の動き量を算出する。具体的には、実空間上の位置変化を撮像倍率に基づいて画像上の動き量に換算した項と、実空間上の角度変化を最大画角に対する割合に基づいて画像上の動き量に換算した項との和が、光軸垂直動き量である(下式(18)、(19))。
Figure JPOXMLDOC01-appb-M000018
Figure JPOXMLDOC01-appb-M000019
 ここで、HEAVE、SWAYは、位置変化の上下方向成分、左右方向成分である。ZOOM(P)は、物体合焦位置Pにおける撮像倍率である。PITCH、YAWは、角度変化のピッチ成分、ヨー成分である。MAX_ANGLE_UD、MAX_ANGLE_LRは、硬性鏡100の上下方向最大画角、左右方向最大画角である。MAX_PIXEL_UD、MAX_PIXEL_LRは、撮像素子240の上下方向の最大画素数、左右方向の最大画素数である。
 フォーカス制御部350は、MV_UD、MV_LRを上下方向成分、左右方向成分とする2次元ベクトルを上述の光軸垂直動き量MVとして扱い、累積して第2の実施形態と同様の判定(合焦必要判定、合焦可能判定)を行う。
 なお、以上では硬性鏡100がモーションセンサ130を有しており、動き量算出部340はモーションセンサ130から出力される動き信号に基づいて動き量を算出するが、変形例として硬性鏡100が位置センサ(例えば磁気式の位置センサ等)を有しており、動き量算出部340は位置センサから出力される位置情報の経時変化に基づいて動き量を算出しても構わない。
 以上の実施形態によれば、合焦動作を実行可能であり、角加速度・加速度を検出するモーションセンサ130を有した撮像部200により、被写体からの反射光を画像として撮像する。モーションセンサ130の出力から撮像部200と被写体との相対的な動き量MV、MHを算出する。動き量MV、MHを複数フレーム累積した正味の動き量が所定の閾値を超えた場合、合焦動作必要と判定して撮像部200の合焦動作を実行する。複数フレーム累積した動き量が所定量を超えた場合に合焦動作を実行することで、緩慢な動きであっても非合焦となれば合焦動作を実行し、ユーザの意図しない瞬間的な動きに対しては合焦動作を実行しない、AF制御が実現できる。
 なお、第1~第3実施形態の処理部300等は、プロセッサとメモリを含んでもよい。ここでのプロセッサは、例えばCPU(Central Processing Unit)であってもよい。ただしプロセッサはCPUに限定されるものではなく、GPU(Graphics Processing Unit)、或いはDSP(Digital Signal Processor)等、各種のプロセッサを用いることが可能である。またプロセッサはASICによるハードウェア回路でもよい。また、メモリはコンピュータにより読み取り可能な命令を格納するものであり、当該命令がプロセッサにより実行されることで、本実施形態に係る処理部300等の各部(例えば、前処理部320、画像処理部330、動き量算出部340、フォーカス制御部350、制御部360等)が実現されることになる。ここでのメモリは、SRAM、DRAMなどの半導体メモリであってもよいし、レジスターやハードディスク等でもよい。また、ここでの命令は、プログラムを構成する命令セットの命令でもよいし、プロセッサのハードウェア回路に対して動作を指示する命令であってもよい。
 以上、本発明を適用した実施形態およびその変形例について説明したが、本発明は、各実施形態やその変形例そのままに限定されるものではなく、実施段階では、発明の要旨を逸脱しない範囲内で構成要素を変形して具体化することができる。また、上記した各実施形態や変形例に開示されている複数の構成要素を適宜組み合わせることによって、種々の発明を形成することができる。例えば、各実施形態や変形例に記載した全構成要素からいくつかの構成要素を削除してもよい。さらに、異なる実施の形態や変形例で説明した構成要素を適宜組み合わせてもよい。このように、発明の主旨を逸脱しない範囲内において種々の変形や応用が可能である。また、明細書又は図面において、少なくとも一度、より広義または同義な異なる用語と共に記載された用語は、明細書又は図面のいかなる箇所においても、その異なる用語に置き換えることができる。
2 内視鏡装置、4 処置具、6 被写体(生体)、100 硬性鏡、
110 レンズ系、120 ライトガイド部、130 モーションセンサ、
200 撮像部、210 フォーカスレンズ、
220 フォーカスレンズ駆動部、230 対物レンズ系、
240 撮像素子、300 処理部、310 AD変換部、
320 前処理部、330 画像処理部、340 動き量算出部、
341 フレームメモリ、342 動きベクトル算出部、
343 光軸垂直動き量算出部、344 光軸平行動き量算出部、
350 フォーカス制御部、360 制御部、400 表示部、
500 外部I/F部、600 光源部、610 白色光源、
620 ライトガイドケーブル

Claims (23)

  1.  撮像部と被写体との相対的な動き量である相対動き量を算出する動き量算出部と、
     前記撮像部のフォーカス制御を行うフォーカス制御部と、
     を含み、
     前記フォーカス制御部は、
     前記相対動き量をNフレーム(Nは3以上(その値を含む)の自然数)累積した累積動き量を求め、前記累積動き量が第1の閾値よりも大きいか否かを判定する合焦必要判定処理を行い、前記累積動き量が前記第1の閾値よりも大きいと判定された場合に、前記撮像部の合焦動作を実行することを特徴とする内視鏡装置。
  2.  請求項1において、
     前記フォーカス制御部は、
     前記合焦必要判定処理において前記累積動き量が前記第1の閾値よりも大きいと判定された場合に、前記相対動き量が第2の閾値よりも小さいフレームがLフレーム(Lは3以上(その値を含む)の自然数)存在したか否かを判定する合焦可能判定処理を行い、前記相対動き量が前記第2の閾値よりも小さいフレームが前記Lフレーム存在したと判定された場合に、前記撮像部の合焦動作を実行することを特徴とする内視鏡装置。
  3.  請求項1において、
     前記動き量算出部は、
     複数の局所動き量を求め、前記複数の局所動き量の各局所動き量について周囲の局所動き量との相関を求め、前記複数の局所動き量のうち前記相関が所定の相関よりも高い局所動き量に基づいて前記相対動き量を求めることを特徴とする内視鏡装置。
  4.  請求項1において、
     前記相対動き量は1以上(その値を含む)の成分を有し、
     前記フォーカス制御部は、
     前記1以上(その値を含む)の成分の各成分について前記累積動き量を求め、前記各成分の前記累積動き量の各々に対応する閾値を前記第1の閾値として前記合焦必要判定処理を行い、前記各成分の前記累積動き量のうち少なくとも1つが、当該累積動き量に対応する閾値よりも大きいと判定された場合に、前記合焦動作を実行することを特徴とする内視鏡装置。
  5.  請求項1において、
     前記動き量算出部は、
     前記撮像部の光軸に垂直な方向の動き量である光軸垂直動き量を前記相対動き量として求め、
     前記フォーカス制御部は、
     前記光軸垂直動き量の前記累積動き量に対する光軸垂直動き用閾値を前記第1の閾値として前記合焦必要判定処理を行うことを特徴とする内視鏡装置。
  6.  請求項5において、
     前記動き量算出部は、
     前記撮像部により撮像された撮像画像に基づいて複数の局所動き量を求め、前記複数の局所動き量の平均を各フレームにおいて求め、前記平均を前記光軸垂直動き量として求めることを特徴とする内視鏡装置。
  7.  請求項5において、
     前記動き量算出部は、
     複数の局所動き量を求め、各フレームにおいて前記複数の局所動き量から大きさ及び方向についてのヒストグラムを作成し、前記ヒストグラムの最大のビンを前記光軸垂直動き量として求めることを特徴とする内視鏡装置。
  8.  請求項2において、
     前記動き量算出部は、
     前記撮像部の光軸に垂直な方向の動き量である光軸垂直動き量を前記相対動き量として求め、
     前記フォーカス制御部は、
     前記光軸垂直動き量に対して前記合焦可能判定処理を行うことを特徴とする内視鏡装置。
  9.  請求項1において、
     前記動き量算出部は、
     前記撮像部の光軸に平行な方向の動き量である光軸平行動き量を前記相対動き量として求め、
     前記フォーカス制御部は、
     前記光軸平行動き量の前記累積動き量に対する光軸平行動き用閾値を前記第1の閾値として前記合焦必要判定処理を行うことを特徴とする内視鏡装置。
  10.  請求項9において、
     前記動き量算出部は、
     複数の局所動きベクトルを求め、各フレームにおいて前記複数の局所動きベクトルの消失点を求め、前記複数の局所動きベクトルの各局所動きベクトルを延長した直線と前記消失点との間の距離に基づく前記消失点の評価値を求め、前記評価値が所定値よりも大きいフレームにおいて前記光軸平行動き量を求めることを特徴とする内視鏡装置。
  11.  請求項9において、
     前記動き量算出部は、
     前記撮像部と前記被写体との接近・離脱に対応して正負の符号が異なる前記光軸平行動き量を求めることを特徴とする内視鏡装置。
  12.  請求項11において、
     前記動き量算出部は、
     複数の局所動きベクトルを求め、各フレームにおいて前記複数の局所動きベクトルの消失点を求め、前記複数の局所動きベクトルの各局所動きベクトルの始点と前記消失点とを結ぶベクトルと前記各局所動きベクトルとが成す角度に応じて変化する情報を求め、前記情報に基づいて前記接近・離脱を判定することを特徴とする内視鏡装置。
  13.  請求項2において、
     前記動き量算出部は、
     前記撮像部の光軸に平行な方向の動き量である光軸平行動き量を前記相対動き量として求め、
     前記フォーカス制御部は、
     前記光軸平行動き量に対して前記合焦可能判定処理を行うことを特徴とする内視鏡装置。
  14.  請求項1において、
     前記動き量算出部は、
     前記撮像部の光軸に垂直な方向の動き量である光軸垂直動き量と、前記撮像部の光軸に平行な方向の動き量である光軸平行動き量とを前記相対動き量として求め、
     前記フォーカス制御部は、
     前記光軸垂直動き量の前記累積動き量については光軸垂直動き用閾値を前記第1の閾値として前記合焦必要判定処理を行い、前記光軸平行動き量の前記累積動き量については光軸平行動き用閾値を前記第1の閾値として前記合焦必要判定処理を行い、
     前記光軸垂直動き量の前記累積動き量が前記光軸垂直動き用閾値よりも大きいと判定された場合、又は、前記光軸平行動き量の前記累積動き量が前記光軸平行動き用閾値よりも大きいと判定された場合に、前記撮像部の合焦動作を実行することを特徴とする内視鏡装置。
  15.  請求項2において、
     前記動き量算出部は、
     前記撮像部の光軸に垂直な方向の動き量である光軸垂直動き量と、前記撮像部の光軸に平行な方向の動き量である光軸平行動き量とを前記相対動き量として求め、
     前記フォーカス制御部は、
     前記光軸垂直動き量の前記累積動き量及び前記光軸平行動き量の前記累積動き量が前記第2の閾値よりも小さいフレームが前記Lフレーム存在したと判定された場合に、前記撮像部の合焦動作を実行することを特徴とする内視鏡装置。
  16.  請求項1において、
     前記フォーカス制御部は、
     前記撮像部の合焦物体位置が第1の位置である場合の前記第1の閾値よりも、前記合焦物体位置が前記第1の位置よりも近い第2の位置である場合の前記第1の閾値を、小さい値に設定することを特徴とする内視鏡装置。
  17.  請求項1において、
     前記動き量算出部は、
     前記撮像部の光軸に垂直な方向の動き量である光軸垂直動き量を前記相対動き量として求め、
     前記フォーカス制御部は、
     前記累積動き量の第1方向成分に対する第1方向用閾値と前記累積動き量の第2方向成分に対する第2方向用閾値とを前記第1の閾値として前記合焦必要判定処理を行い、前記第1方向用閾値と前記第2方向用閾値とを異なる値に設定することを特徴とする内視鏡装置。
  18.  請求項1において、
     前記動き量算出部は、
     前記撮像部の光軸に平行な方向の動き量である光軸平行動き量を前記相対動き量として求め、
     前記フォーカス制御部は、
     前記累積動き量が前記撮像部と前記被写体との接近に対応する場合の接近用閾値と、前記累積動き量が前記撮像部と前記被写体との離脱に対応する場合の離脱用閾値とを、前記第1の閾値として前記合焦必要判定処理を行い、前記離脱用閾値の絶対値よりも前記接近用閾値の絶対値を小さい値に設定することを特徴とする内視鏡装置。
  19.  請求項1において、
     前記動き量算出部は、
     前記合焦動作が待機状態に移行した後の基準フレームから現在のフレームまでを前記Nフレームとして前記累積動き量を求めることを特徴とする内視鏡装置。
  20.  請求項1において、
     前記動き量算出部は、
     前記相対動き量の累積フレーム数をリセットした後の基準フレームから現在のフレームまでを前記Nフレームとして前記累積動き量を求めることを特徴とする内視鏡装置。
  21.  請求項1において、
     前記動き量算出部は、
     前記撮像部により撮像された撮像画像に基づいて動きベクトルを前記相対動き量として算出することを特徴とする内視鏡装置。
  22.  請求項1において、
     前記撮像部は、
     モーションセンサ及び位置センサの少なくとも一方を有し、
     前記動き量算出部は、
     前記モーションセンサ及び前記位置センサの少なくとも一方からの信号に基づいて前記相対動き量を算出することを特徴とする内視鏡装置。
  23.  撮像部と被写体との相対的な動き量である相対動き量を算出し、
     前記相対動き量をNフレーム(Nは3以上(その値を含む)の自然数)累積した累積動き量を求め、
     前記累積動き量が第1の閾値よりも大きいか否かを判定する合焦必要判定処理を行い、
     前記累積動き量が前記第1の閾値よりも大きいと判定された場合に、前記撮像部の合焦動作を実行することを特徴とする内視鏡装置のフォーカス制御方法。
PCT/JP2015/051785 2015-01-23 2015-01-23 内視鏡装置及び内視鏡装置のフォーカス制御方法 WO2016117107A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
PCT/JP2015/051785 WO2016117107A1 (ja) 2015-01-23 2015-01-23 内視鏡装置及び内視鏡装置のフォーカス制御方法
JP2016570443A JP6574448B2 (ja) 2015-01-23 2015-01-23 内視鏡装置及び内視鏡装置のフォーカス制御方法
CN201580074314.9A CN107205626B (zh) 2015-01-23 2015-01-23 内窥镜装置和内窥镜装置的对焦控制方法
DE112015005847.8T DE112015005847T5 (de) 2015-01-23 2015-01-23 Endoskopvorrichtung und Scharfeinstellungssteuerungsverfahren für Endoskopvorrichtung
US15/656,638 US10820787B2 (en) 2015-01-23 2017-07-21 Endoscope device and focus control method for endoscope device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/051785 WO2016117107A1 (ja) 2015-01-23 2015-01-23 内視鏡装置及び内視鏡装置のフォーカス制御方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/656,638 Continuation US10820787B2 (en) 2015-01-23 2017-07-21 Endoscope device and focus control method for endoscope device

Publications (1)

Publication Number Publication Date
WO2016117107A1 true WO2016117107A1 (ja) 2016-07-28

Family

ID=56416672

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/051785 WO2016117107A1 (ja) 2015-01-23 2015-01-23 内視鏡装置及び内視鏡装置のフォーカス制御方法

Country Status (5)

Country Link
US (1) US10820787B2 (ja)
JP (1) JP6574448B2 (ja)
CN (1) CN107205626B (ja)
DE (1) DE112015005847T5 (ja)
WO (1) WO2016117107A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107613194A (zh) * 2017-08-24 2018-01-19 努比亚技术有限公司 一种对焦方法、移动终端及计算机可读存储介质
WO2018116371A1 (ja) * 2016-12-20 2018-06-28 オリンパス株式会社 自動焦点制御装置、内視鏡装置及び自動焦点制御装置の作動方法

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6196900B2 (ja) * 2013-12-18 2017-09-13 オリンパス株式会社 内視鏡装置
EP3085301A4 (en) * 2013-12-20 2017-08-23 Olympus Corporation Endoscopic device
KR20200001863A (ko) 2018-06-28 2020-01-07 삼성전자주식회사 디스플레이 장치
JP7134759B2 (ja) * 2018-07-13 2022-09-12 ソニー・オリンパスメディカルソリューションズ株式会社 医療用画像処理装置及び医療用観察システム
KR102546321B1 (ko) 2018-07-30 2023-06-21 삼성전자주식회사 3차원 영상 표시 장치 및 방법
KR20200013453A (ko) 2018-07-30 2020-02-07 삼성전자주식회사 3차원 영상 표시 장치 및 영상 처리 방법

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006334297A (ja) * 2005-06-06 2006-12-14 Olympus Medical Systems Corp 画像表示装置
JP2009239515A (ja) * 2008-03-26 2009-10-15 Olympus Corp 画像処理装置、画像処理方法、及び画像処理プログラム
JP2010176569A (ja) * 2009-01-30 2010-08-12 Olympus Corp シーン変化検出装置、シーン変化検出プログラムおよびシーン変化検出方法
JP2010190913A (ja) * 2007-06-12 2010-09-02 Panasonic Corp 自動合焦機能を有する撮像装置
JP2012055498A (ja) * 2010-09-09 2012-03-22 Olympus Corp 画像処理装置、内視鏡装置、画像処理プログラム及び画像処理方法
JP2012524500A (ja) * 2009-04-20 2012-10-11 クゥアルコム・インコーポレイテッド 動き情報によって支援された3a技術
WO2013021767A1 (ja) * 2011-08-10 2013-02-14 富士フイルム株式会社 動体検出装置及び方法
JP2013043007A (ja) * 2011-08-25 2013-03-04 Olympus Corp 焦点位置制御装置、内視鏡装置及び焦点位置制御方法
JP2013146289A (ja) * 2012-01-17 2013-08-01 Olympus Corp 内視鏡装置及び内視鏡装置用操作装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4867552B2 (ja) * 2006-09-28 2012-02-01 株式会社ニコン 撮像装置
US8665326B2 (en) 2009-01-30 2014-03-04 Olympus Corporation Scene-change detecting device, computer readable storage medium storing scene-change detection program, and scene-change detecting method
JP5406552B2 (ja) * 2009-02-17 2014-02-05 キヤノン株式会社 焦点調節装置、及び焦点調節方法
JP2011176715A (ja) * 2010-02-25 2011-09-08 Nikon Corp 裏面照射型撮像素子および撮像装置
JP5177184B2 (ja) * 2010-07-30 2013-04-03 株式会社ニコン 焦点調節装置および撮像装置
JP5942757B2 (ja) * 2012-09-28 2016-06-29 株式会社ニコン 焦点検出装置および撮像装置
WO2017122287A1 (ja) * 2016-01-13 2017-07-20 オリンパス株式会社 内視鏡装置及び内視鏡装置の作動方法

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006334297A (ja) * 2005-06-06 2006-12-14 Olympus Medical Systems Corp 画像表示装置
JP2010190913A (ja) * 2007-06-12 2010-09-02 Panasonic Corp 自動合焦機能を有する撮像装置
JP2009239515A (ja) * 2008-03-26 2009-10-15 Olympus Corp 画像処理装置、画像処理方法、及び画像処理プログラム
JP2010176569A (ja) * 2009-01-30 2010-08-12 Olympus Corp シーン変化検出装置、シーン変化検出プログラムおよびシーン変化検出方法
JP2012524500A (ja) * 2009-04-20 2012-10-11 クゥアルコム・インコーポレイテッド 動き情報によって支援された3a技術
JP2012055498A (ja) * 2010-09-09 2012-03-22 Olympus Corp 画像処理装置、内視鏡装置、画像処理プログラム及び画像処理方法
WO2013021767A1 (ja) * 2011-08-10 2013-02-14 富士フイルム株式会社 動体検出装置及び方法
JP2013043007A (ja) * 2011-08-25 2013-03-04 Olympus Corp 焦点位置制御装置、内視鏡装置及び焦点位置制御方法
JP2013146289A (ja) * 2012-01-17 2013-08-01 Olympus Corp 内視鏡装置及び内視鏡装置用操作装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018116371A1 (ja) * 2016-12-20 2018-06-28 オリンパス株式会社 自動焦点制御装置、内視鏡装置及び自動焦点制御装置の作動方法
US11141050B2 (en) 2016-12-20 2021-10-12 Olympus Corporation Autofocus control device, endoscope apparatus, and operation method of autofocus control device
CN107613194A (zh) * 2017-08-24 2018-01-19 努比亚技术有限公司 一种对焦方法、移动终端及计算机可读存储介质
CN107613194B (zh) * 2017-08-24 2020-10-16 努比亚技术有限公司 一种对焦方法、移动终端及计算机可读存储介质

Also Published As

Publication number Publication date
US20170319051A1 (en) 2017-11-09
JPWO2016117107A1 (ja) 2017-12-14
DE112015005847T5 (de) 2017-09-14
JP6574448B2 (ja) 2019-09-11
CN107205626A (zh) 2017-09-26
CN107205626B (zh) 2019-09-03
US10820787B2 (en) 2020-11-03

Similar Documents

Publication Publication Date Title
JP6574448B2 (ja) 内視鏡装置及び内視鏡装置のフォーカス制御方法
US11835702B2 (en) Medical image processing apparatus, medical image processing method, and medical observation system
US9485405B2 (en) Focus control device, endoscope device, and focus control method
US10129454B2 (en) Imaging device, endoscope apparatus, and method for controlling imaging device
US20170265725A1 (en) Focus control device, endoscope apparatus, and method for controlling focus control device
JP2012100909A (ja) 内視鏡装置及びプログラム
JP6649406B2 (ja) 内視鏡装置及び内視鏡装置の作動方法
JP6670854B2 (ja) フォーカス制御装置、内視鏡装置及びフォーカス制御装置の作動方法
JP6453905B2 (ja) フォーカス制御装置、内視鏡装置及びフォーカス制御装置の制御方法
JP6670853B2 (ja) フォーカス制御装置、内視鏡装置及びフォーカス制御装置の作動方法
WO2020095366A1 (ja) 撮像装置、内視鏡装置及び撮像装置の作動方法
CN110062596B (zh) 自动焦点控制装置、内窥镜装置以及自动焦点控制装置的工作方法
JPWO2017072853A1 (ja) 撮像装置、内視鏡装置及び撮像装置の作動方法
WO2020196868A1 (en) Endoscope system, non-transitory computer readable medium, and method
JP2012239644A (ja) 画像処理装置、内視鏡装置、画像処理方法
US10799085B2 (en) Endoscope apparatus and focus control method
JP2013043007A (ja) 焦点位置制御装置、内視鏡装置及び焦点位置制御方法
JP5792401B2 (ja) オートフォーカス装置
WO2013061939A1 (ja) 内視鏡装置及びフォーカス制御方法
JPWO2017072860A1 (ja) 撮像装置、内視鏡装置及び撮像装置の作動方法
WO2020095365A1 (ja) 撮像装置、内視鏡装置及び撮像装置の作動方法
WO2018179875A1 (ja) 撮像装置とフォーカス制御方法およびフォーカス判定方法

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2016570443

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 112015005847

Country of ref document: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15878800

Country of ref document: EP

Kind code of ref document: A1