WO2017212577A1 - 撮像装置、内視鏡装置及び撮像方法 - Google Patents

撮像装置、内視鏡装置及び撮像方法 Download PDF

Info

Publication number
WO2017212577A1
WO2017212577A1 PCT/JP2016/067078 JP2016067078W WO2017212577A1 WO 2017212577 A1 WO2017212577 A1 WO 2017212577A1 JP 2016067078 W JP2016067078 W JP 2016067078W WO 2017212577 A1 WO2017212577 A1 WO 2017212577A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
pupil
distortion
phase difference
state
Prior art date
Application number
PCT/JP2016/067078
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/JP2016/067078 priority Critical patent/WO2017212577A1/ja
Publication of WO2017212577A1 publication Critical patent/WO2017212577A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques

Definitions

  • the present invention relates to an imaging device, an endoscope device, an imaging method, and the like.
  • a technique for optically measuring a three-dimensional shape is known.
  • various methods have been proposed, such as a stereo imaging method based on stereoscopic viewing of both left and right eyes, a phase shift method using pattern illumination such as a sine pattern, and a TOF (Time-of-Flight) method based on time measurement of reflected light.
  • a stereo imaging method based on stereoscopic viewing of both left and right eyes
  • a phase shift method using pattern illumination such as a sine pattern
  • TOF Time-of-Flight
  • the stereo imaging method can be a simple mechanism that simply changes the imaging system to a stereo optical system, and does not require special illumination mechanisms, illumination control, or advanced signal processing. Considering it is suitable for mounting in a small space. For example, there are many needs such as mounting at the tip of an endoscope apparatus and a visual sensor of a small robot. These often require not only high-precision measurement functions but also high-quality normal observation functions at the same time, and instead of using separate left and right image sensors, parallax images are formed on a common image sensor to ensure resolution. The form to take is taken.
  • the distance to the subject is basically obtained from the amount of parallax between the left and right images, the amount of parallax cannot be detected unless the left and right images formed on the common image sensor can be separated, and distance information can be obtained. Can not.
  • Patent Document 1 discloses a technique for switching the left and right imaging optical paths with a mechanical shutter in time to separate the left and right images.
  • white light can be used as illumination.
  • both the left and right images can be used as observation images.
  • the separability of the left and right images for stereo measurement is excellent, but when the imaging system or subject moves, the imaging timing shifts in time, and an accurate amount of parallax for stereo measurement is detected. I can't.
  • a method of forming the left and right images in separate areas obtained by dividing the imaging sensor into the left and right can be considered.
  • the image is low-resolution because it is formed on half of the image sensor.
  • a technique of switching between imaging with one pupil and imaging with two pupils and detecting a phase difference from the captured images can be considered.
  • the image formed by one pupil of the two pupils and the image formed by the other pupil are overlapped on a common area rather than on separate areas of the image sensor (the wide area of the image sensor). It is desirable to form an image).
  • the distortion (distortion aberration) of the image by the optical system cannot be corrected. Therefore, there is a problem that it is necessary to detect a phase difference from an image including distortion.
  • an imaging apparatus an endoscope apparatus, an imaging method, and the like that can capture a high-resolution image and perform stereo measurement even when an optical system with distortion is used. Can provide.
  • One embodiment of the present invention includes an imaging device, a first state in which a subject is imaged on the imaging device by one pupil, and a second state in which the subject is imaged on the imaging device by two pupils.
  • the 2 A processing unit that detects a phase difference between the image formed by one of the pupils and the image formed by the other pupil.
  • the image formed by the one pupil and the other The image formation by the pupil overlaps at least partly, and the processing unit performs distortion correction on the first captured image, and the first captured image after the distortion correction and the connection by the one pupil are combined.
  • First distortion information representing image distortion and previous A second distortion information representing a distortion of the image by the other pupil is related to the imaging device for detecting the phase difference on the basis of the second captured image.
  • a first captured image after distortion correction is generated from a first captured image by one pupil, the first captured image after distortion correction, and each pupil of two pupils.
  • the phase difference is detected on the basis of the first and second distortion information indicating the distortion of the image formation due to the second and the second captured image by the two pupils.
  • the images formed by the pupils overlap each other at least partially.
  • Another aspect of the present invention relates to an endoscope apparatus that includes the imaging apparatus described above.
  • a second state in which the subject is imaged on the imaging element so that at least part of the imaging by the imaging is performed on the first captured image captured by the imaging element in the first state Distortion correction is performed, and the first captured image after the distortion correction, the first distortion amount that is the distortion amount of the image formed by the one pupil, and the distortion amount of the image formation that is formed by the other pupil. 2 based on the amount of distortion and the second captured image captured by the imaging device in the second state, the phase difference between the image formed by the one pupil and the image formed by the other pupil.
  • FIG. 1 is a basic configuration example of an imaging unit of an endoscope apparatus.
  • FIG. 2 is a basic configuration example of the imaging unit of the endoscope apparatus.
  • FIG. 3 is a diagram schematically illustrating image distortion caused by the optical system.
  • FIG. 4 is a diagram illustrating the correspondence between the non-linear scale and the linear scale.
  • FIG. 5 is a diagram for explaining the phase difference detection method of the present embodiment.
  • FIG. 6 is a configuration example of the endoscope apparatus.
  • FIG. 7 is a detailed configuration example of a fixed mask and a movable mask.
  • FIG. 8 is a detailed configuration example of a fixed mask and a movable mask.
  • FIG. 9 is a detailed configuration example of the endoscope apparatus.
  • FIG. 10 is a first sequence of operations in moving image shooting.
  • FIG. 11 is a second sequence of operations in moving image shooting.
  • FIG. 12 is a second basic configuration example of the imaging unit of the endoscope apparatus.
  • FIG. 13 is a second basic configuration example of the imaging unit of the endoscope apparatus.
  • FIG. 14 shows a second detailed configuration example of the fixed mask and the movable mask.
  • FIG. 15 shows a second detailed configuration example of the fixed mask and the movable mask.
  • an industrial endoscope apparatus will be described below as an application example of the present invention.
  • the present invention is not limited to application to an industrial endoscope apparatus, and a stereo shooting method (with an imaging system having parallax).
  • a method of detecting the phase difference between the two images and acquiring subject distance information), a three-dimensional measuring device that measures a three-dimensional shape, and an imaging device having a three-dimensional measuring function for example, a medical endoscope device, Microscopes, industrial cameras, robot vision functions, etc. are applicable.
  • a high-resolution observation image is obtained with white light, and the passing light of the left and right pupils is imaged in the same region of the image sensor in a non-time-division manner without using the color phase difference method.
  • an imaging device such as an industrial endoscope whose position of an imaging system is not stable (not fixed), and the imaging mechanism is small and a large imaging device is used to ensure resolution.
  • a device that cannot be used is envisaged.
  • the application of the present invention is not limited to the above-described apparatus, and can be widely applied to a three-dimensional measurement apparatus for the purpose of high-definition observation and high-precision measurement.
  • FIG. 1 and FIG. 2 are basic configuration examples of the imaging unit of the endoscope apparatus.
  • FIG. 1 and FIG. 2 are cross-sectional views (on a plane including the optical axis) of the imaging unit, and the amount of imaged light on the image sensor (or the pixel value of the image captured by the image sensor).
  • the relationship of the position x is shown.
  • the position x is a position (coordinates) in a direction perpendicular to the optical axis of the imaging optical system, for example, a pixel position of the image sensor. Actually, it is a two-dimensional coordinate system, but here, a two-dimensional one-dimensional coordinate system in the parallax direction will be described. In the following, the illumination mechanism is not shown.
  • the endoscope apparatus includes an optical system 15 (optical apparatus) and an image sensor 40 (image sensor, image sensor).
  • the optical system 15 includes an imaging optical system 10, a movable mask 30 (first mask), and a fixed mask 20 (second mask).
  • the imaging optical system 10 includes a left-eye imaging optical system 11 (first optical system) and a right-eye imaging optical system 12 (second optical system) constituting a stereo optical system.
  • the imaging optical system of each eye is composed of, for example, one or a plurality of lenses, and forms an image of a subject on the entire (or most) pixel array of the image sensor 40.
  • the image circle of the imaging optical system 11 for the left eye and the image circle of the imaging optical system 12 for the right eye are largely overlapped, and the pixel array of the image sensor is contained in the overlapping portion.
  • d is a distance between the optical axis AX1 of the imaging optical system 11 of the left eye and the optical axis AX2 of the imaging optical system 12 of the right eye, and is a baseline length in stereo measurement.
  • the image sensor 40 includes, for example, RGB Bayer array color filters.
  • the image sensor 40 may include a complementary color filter.
  • the fixed mask 20 and the movable mask 30 are provided at the pupil position of the imaging optical system 10, for example.
  • the fixed mask 20 is fixed with respect to the imaging optical system 10, and the movable mask 30 is configured such that the position can be switched within a plane perpendicular to the optical axes AX1 and AX2.
  • the movable mask 30 has an observation mode shown in FIG. 1 (observation state, first mode, first state) and a stereo measurement mode shown in FIG. 2 (stereo measurement state, second state, second mode). Two modes can be switched at high speed.
  • the movable mask 30 is a plate-shaped light shielding part (light shielding member).
  • the movable mask 30 is configured to have a size such that one of the two apertures of the fixed mask 20 covers the aperture.
  • 1 and 2 illustrate the case where the movable mask 30 is provided on the imaging side with respect to the fixed mask 20, the movable mask 30 may be provided on the objective side with respect to the fixed mask 20.
  • one or both of the two optical paths passing through the left eye and the right eye are selected by the fixed mask 20 and the movable mask 30.
  • FIG. 1 shows a state in which a normal observation image is acquired (observation mode).
  • the right eye optical path is blocked (shielded) by the movable mask 30, and only the left eye optical path of the aperture of the fixed mask 20 is opened.
  • the image formed on the image sensor 40 is the image IL formed by only the left eye, and a normal captured image (white light from a single eye) is obtained.
  • FIG. 2 shows a state in which left and right images of a stereo image are acquired simultaneously (stereo measurement mode).
  • the left and right optical paths are opened by the movable mask 30, and an image (double image) in which the left pupil image IL 'and the right pupil image IR' are superimposed is obtained.
  • IL ′ and IR ′ are separately shown for convenience, but actually, an image IL ′ + IR ′ obtained by adding these is obtained.
  • Both the left pupil image IL ′ and the right pupil image IR ′ are white light images.
  • the white light image is an image including a red component, a green component, and a blue component, which is captured with the spectral characteristics of the color filter of the image sensor.
  • each color component of the image may include a near infrared component.
  • phase Difference Detection Considering Optical Distortion
  • the distance to the subject cannot be obtained unless the phase difference between the left pupil image IL ′ and the right pupil image IR ′ can be detected.
  • the left pupil image IL ′ and the right pupil image IR ′ are superimposed, so that the phase difference cannot be detected only from this image. Therefore, the phase difference is obtained using the image IL obtained in the observation mode.
  • this method will be described.
  • FIG. 3 is a diagram schematically showing image distortion caused by the optical system 15.
  • the right pupil image IR ' is indicated by a dotted line
  • the left pupil image IL' is indicated by a solid line.
  • the horizontal coordinate (position) is represented by x
  • the vertical coordinate (position) is represented by y
  • the intersection of the optical axis of the left pupil and the xy plane is (XL, 0)
  • the optical axis of the right pupil and xy Let the intersection with the plane be (XR, 0).
  • the state of distortion is represented by a curved lattice, which is an example of barrel distortion. With barrel distortion, the image height decreases as the position is farther from the optical axis than when there is no distortion.
  • the application target of the present invention is not limited to barrel distortion, and can be applied to various optical distortions.
  • FIG. 4 is a diagram showing the correspondence between the nonlinear scale and the linear scale.
  • the y coordinate is omitted, and only the x coordinate in the parallax direction is focused.
  • the pixel values of the images IL and IL′IR ′ are regarded as a function of the coordinate x and are expressed as IL (x), IL ′ (x), and IR ′ (x), respectively.
  • a linear scale is a coordinate X in an image in which distortion is corrected linearly (an undistorted image).
  • the origins in the left and right pupil images are the optical axis positions XL and XR, respectively.
  • X x
  • the correspondence between the non-linear scale and the linear scale is expressed by a linear expression (linear) is described.
  • the present invention is not limited to this, and the correspondence between the non-linear scale and the linear scale is known if the correspondence between the non-linear scale and the linear scale is known.
  • the method can be applied.
  • the coefficient ⁇ is common to the left and right pupils will be described, the coefficient ⁇ may be different between the left and right pupils.
  • the image IL (x) obtained in the observation mode can be expressed as the following expression (1) using the above distortion.
  • ILc represents a left pupil image on a linear scale without distortion.
  • the above equation (1) indicates that the coordinate x in the captured image including distortion corresponds to the coordinate (1 / ⁇ ) ⁇ [x ⁇ XL] + XL on the linear scale. By performing coordinate conversion from this correspondence, an image without distortion can be obtained.
  • the double image IL ′ (x) + IR ′ (x) obtained in the stereo measurement mode can be expressed as the following equation (2).
  • IRc represents the right pupil image on a linear scale without distortion.
  • the coordinate x in the double image is different in coordinates (1 / ⁇ ) ⁇ [x ⁇ XL] + XL, (1 / ⁇ ) ⁇ [x ⁇ XR] + XR. That is, the image at the coordinate x is a mixture of images of different linear scale coordinates, and simple distortion correction cannot be performed.
  • a double image is generated by intentionally shifting two images IL (x) in the observation mode imaged with only one pupil, and the generated double image and the stereo measurement mode.
  • the phase difference is detected by comparing with the double image.
  • the shift amount must be determined in consideration of the distortion when generating the double image from the image in the observation mode.
  • FIG. 5 is a diagram for explaining the phase difference detection method of this embodiment.
  • the left pupil image IL (x) in the observation mode is corrected for distortion to obtain ILc (X).
  • X is a coordinate on a linear scale.
  • ILc (Xd) obtained by translating ILc (X) by d is used as a distortion-corrected right pupil image, as shown in the lower part of FIG. .
  • d is the distance between the optical axes of the two pupils
  • d XR ⁇ XL.
  • d XR ⁇ XL.
  • IL ′ (x) and IR ′ (x) are separated for the sake of explanation, but they are actually obtained as added images.
  • the position of interest (coordinate of interest) is assumed to be xa.
  • the position of interest is one of the coordinates (coordinates for which the phase difference is about to be detected) when performing the process of sequentially detecting the phase difference for each coordinate.
  • an evaluation vector RL + RR at a position (xa + t) that is separated from the target position xa by the distance t is acquired.
  • the evaluation vector RL + RR is a vector in which pixel values of pixels within a predetermined width including the position (xa + t) are arranged as elements.
  • the positions xa and (xa + t) are converted into positions XaL and tL on the linear scale of the left pupil image.
  • the positions xa and (xa + t) are converted into positions XaR and tR on the linear scale of the right pupil image.
  • the following equations (3) to (6) are obtained.
  • a distance dL between the positions XaL and tL and a distance dR between the positions XaR + d and tR are obtained.
  • dL and dR are as shown in the following equations (7) and (8).
  • dL and dR can be obtained without knowing XaL and XaR, so it is not always necessary to obtain XaL and XaR.
  • an image ILc (X, ⁇ ) obtained by shifting the left pupil image ILc (X) by a distance dL ⁇ m is obtained.
  • the distance m is a second variable searched by the matching process.
  • the evaluation vector VL at the position tL is acquired from the image ILc (X, ⁇ ), and the evaluation vector VL is converted into a nonlinear scale (added with distortion) to obtain the evaluation vector VL ′.
  • the evaluation vector VL is a vector in which pixel values of pixels within a predetermined width including the position tL are arranged as elements.
  • an image ILc (X, ⁇ , s) obtained by shifting the right pupil image ILc (Xd) by the distance dR is obtained.
  • the evaluation vector VR at the position tR is acquired from the image ILc (X, ⁇ , s), and the evaluation vector VR ′ is obtained by converting the evaluation vector VR into a non-linear scale (adding distortion).
  • the evaluation vector VR is a vector in which pixel values of pixels within a predetermined width including the position tR are arranged as elements.
  • the evaluation vectors VL ′ and VR ′ are added to obtain the evaluation vector VL ′ + VR ′.
  • This corresponds to a double image generated in a pseudo manner from an image in the observation mode.
  • a correlation value between the evaluation vector VL ′ + VR ′ and the evaluation vector RL + RR acquired from the double image ILR ′ (x) in the stereo measurement mode is obtained.
  • various methods such as SAD (Sum of Absolute Difference), SSD (Sum of Squared Difference), ZNCC (Zero-means NormalizedlationCross-Correlation) can be adopted.
  • the correlation values are obtained while independently changing the variables t and m, and the values t ′ and m ′ of the variables t and m when the correlation is the highest are obtained.
  • the amount of blur ⁇ and the phase difference s at each position x are obtained by changing the amount of blur ⁇ and the phase difference s while changing the position of interest xa (XaL on the linear scale).
  • the phase difference s obtained at the target position XaL on the linear scale can actually be considered as the phase difference s at the position XaL + ⁇ .
  • the blur amount ⁇ corresponds to the subject blur when the observation mode and the stereo measurement mode are switched to the time division.
  • the phase difference s corresponds to the phase difference between the left pupil image IL ′ (x) and the right pupil image IR ′ (x) in the stereo measurement mode. That is, the variable t should essentially correspond to ⁇ + s, and the variable m should correspond to s. This is easy to understand assuming no distortion.
  • the blur amount ⁇ and the phase difference s in linear coordinates can be obtained from the double image ILR ′ (x) containing distortion. Can be detected and stereo measurement can be performed.
  • the blur amount ⁇ can be specified, it is possible to detect an accurate phase difference s that is not affected by the subject blur despite the time-division imaging.
  • This blur amount ⁇ can be specified because the double image ILR ′ (x) is acquired in the stereo measurement mode. That is, since the double image ILR ′ (x) simultaneously captures IL ′ (x) and IR ′ (x), the shift amount includes only the information of the phase difference s, thereby the blur amount ⁇ . And the phase difference s can be separated.
  • the left pupil image IL ′ (x) and the right pupil image IR (x) are overlapped to form an image.
  • Each pupil image is imaged.
  • a high-resolution image IL (x) can be obtained in the observation mode, and both precise stereo measurement and high-resolution imaging can be achieved.
  • FIG. 6 shows a configuration example of the endoscope device (imaging device in a broad sense) of the present embodiment.
  • the endoscope apparatus includes a processing unit 210 (processing device, processor), an imaging unit 105, a storage unit 410 (memory), an operation unit 420 (operation device), and a display unit 220 (display device, display).
  • the processing unit 210 includes a phase difference detection unit 330, an image output unit 325, and a distortion correction unit 380.
  • the processing unit 210 performs control of each unit of the endoscope apparatus and various information processing such as image processing.
  • the storage unit 410 stores, for example, image data picked up by the image pickup unit 105, setting data of the endoscope apparatus, and the like. Alternatively, the storage unit 410 is used as a temporary storage memory (working memory) of the processing unit 210.
  • the imaging unit 105 captures an image (moving image or still image).
  • the imaging unit 105 includes an imaging element 40 and an optical system 15.
  • the imaging unit 105 can include a drive device that drives the focus mechanism of the optical system 15.
  • the operation unit 420 is an input device for the user to operate the imaging apparatus, and can be configured with, for example, a button, a lever, a rotating ring, a mouse, a keyboard, a touch panel, and the like.
  • the display unit 220 displays the image captured by the imaging unit 105 and the image processed by the processing unit 210.
  • the optical system 15 switches between a first state in which the subject 5 is imaged by one pupil and a second state in which the subject is imaged by two pupils.
  • the processing unit 210 includes a first captured image IL (x) captured by the image sensor 40 in the first state and a second captured image ILR ′ (x) captured by the image sensor 40 in the second state. Based on the above, the phase difference s between the image formed by one of the two pupils (IL ′ (x)) and the image formed by the other pupil (IR ′ (x)) is detected. In the second state, the image formed by one pupil (IL ′ (x)) and the image formed by the other pupil (IR ′ (x)) overlap at least partially.
  • the distortion correction unit 380 performs distortion correction on the first captured image IL (x).
  • the phase difference detection unit 330 includes a first captured image ILc (X) after distortion correction, first distortion information indicating distortion of image formation by one pupil, and image formation by the other pupil. The phase difference s is detected based on the second distortion information indicating the distortion and the second captured image ILR ′ (x).
  • the first state corresponds to the state of the optical system 15 in the observation mode of FIG. 1
  • the second state corresponds to the state of the optical system 15 in the stereo measurement mode of FIG.
  • One pupil in the first state corresponds to the aperture of the left eye optical path of the fixed mask 20
  • two pupils in the second state are the aperture of the left eye optical path of the fixed mask 20, the aperture of the right eye optical path.
  • the two pupils are described as the left pupil and the right pupil, but the separation direction of the two pupils is not limited to the left and right.
  • the first distortion information and the second distortion information are information indicating the correspondence between the position in the second captured image ILR ′ (x) and the position in the image formation of each pupil. That is, the information represents the correspondence between the nonlinear scale and the linear scale in each pupil image.
  • information indicating the correspondence between the position xa + t of the nonlinear scale and the positions tL and tR at IL ′ (x) and IR ′ (x) is the first distortion information and the second distortion information.
  • the distortion information is given as a correspondence relationship using mathematical formulas, for example, as in the above formulas (5) and (6).
  • distortion information may be given as a lookup table in which each position on the nonlinear scale is associated with a position on the linear scale.
  • tL and tR are obtained from the first distortion information and the second distortion information, and detecting the phase difference s using the tL and tR results in the first distortion information and the second distortion information. This is equivalent to detecting the phase difference s based on this.
  • the first captured image ILc (X) after distortion correction is generated from the first captured image IL (x) by one pupil, and the first captured image ILc ( X), information (first and second distortion information) indicating the distortion of the image formed by each pupil of the two pupils, and the second captured image ILR ′ (x) by the two pupils, the phase difference s is detected.
  • the second captured image ILR ′ (x) is acquired simultaneously by superimposing images of two pupils. Thereby, an accurate phase difference (namely, subject distance) can be detected without being affected by the blur of the imaging system.
  • the second captured image ILR ′ (x) including the distortion can be associated with the image formed by each pupil on the linear scale. . This makes it possible to simulate the image formation by each pupil on the linear scale with the first captured image ILc (X) after distortion correction, and from the simulated image and the second captured image ILR ′ (x).
  • the phase difference s can be detected.
  • the endoscope apparatus (imaging apparatus) of the present embodiment may be configured as follows. That is, the endoscope apparatus of the present embodiment is based on the image sensor 40, the optical system 15, a memory (storage unit 410) that stores information (for example, a program and various data), and information stored in the memory. And a processor (processing unit 210, a processor including hardware). The processor performs distortion correction on the first captured image IL (x), the first captured image ILc (X) after the distortion correction, and the first distortion information indicating the distortion of image formation by one pupil. Then, the phase difference s is detected based on the second distortion information indicating the distortion of image formation by the other pupil and the second captured image ILR ′ (x).
  • each unit may be realized by individual hardware, or the function of each unit may be realized by integrated hardware.
  • the processor may be, for example, a CPU (Central Processing Unit). However, the processor is not limited to the CPU, and various processors such as GPU (Graphics Processing Unit) or DSP (Digital Signal Processor) can be used.
  • the processor may be an ASIC hardware circuit.
  • the memory may be a semiconductor memory such as SRAM or DRAM, a register, a magnetic storage device such as a hard disk device, or an optical storage device such as an optical disk device. May be.
  • the memory stores instructions that can be read by a computer, and the functions of each unit of the processing unit 210 are realized by executing the instructions by the processor.
  • the instruction here may be an instruction of an instruction set constituting the program, or an instruction for instructing an operation to the hardware circuit of the processor.
  • the operation of this embodiment is realized as follows, for example.
  • the processor performs control to switch the optical system 15 between the first state and the second state.
  • the first captured image IL (x) and the second captured image ILR ′ (x) captured by the image sensor 40 are stored in the memory (storage unit 410).
  • the processor reads the first captured image IL (x) from the memory, performs distortion correction on the first captured image IL (x), and stores the first captured image ILc (X) after distortion correction in the memory. To store.
  • the processor reads the first captured image ILc (X) after the distortion correction and the second captured image ILR ′ (x) from the memory, and the first captured image ILc (X) after the distortion correction,
  • the phase difference s is detected based on the first and second distortion information and the second captured image ILR ′ (x), and the phase difference s is stored in the memory.
  • the first and second distortion information is implemented in the program as a function such as the above equations (5) and (6). Alternatively, it is stored in the memory as a lookup table.
  • each unit of the processing unit 210 of the present embodiment is realized as a program module that operates on a processor.
  • the distortion correction unit 380 is realized as a distortion correction module that performs distortion correction on the first captured image IL (x).
  • the phase difference detection unit 330 uses the phase difference based on the first captured image ILc (X) after distortion correction, the first and second distortion information, and the second captured image ILR ′ (x). This is realized as a phase difference detection module for detecting s.
  • the phase difference detection unit 330 (the processing unit 210, the processor) is based on the first distortion information and the second distortion information from the first captured image ILc (X) after distortion correction.
  • a phase difference image (evaluation vector VL ′ + VR ′) is generated, a matching process is performed between the second captured image (evaluation vector RL + RR) and the pseudo phase difference image (evaluation vector VL ′ + VR ′), The phase difference s is detected.
  • the pseudo phase difference image (synthesized image, simulated image, simulated phase difference image) is obtained by pseudo phase difference between the first captured image IL (x) and the first captured image IL (x).
  • This is an image simulating the second captured image ILR ′ (x) by synthesizing it with the given image and shifting the position.
  • Giving a variable corresponding to an arbitrary phase difference and shifting the position x by that variable is equivalent to giving a phase difference in a pseudo (intentional) manner.
  • a pseudo phase difference image is generated while mutually converting a nonlinear scale and a linear scale using the first and second distortion information.
  • two images ILc (X, ⁇ ) and ILc (X, ⁇ , s) are generated by shifting the first captured image ILc (X) on the linear scale by dL ⁇ m and d + dR, respectively.
  • Evaluation vectors VL and VR at the positions tL and tR are acquired, and these are returned to the non-linear scale and synthesized to generate a pseudo phase difference image (VL ′ + VR ′).
  • a pseudo phase difference image simulating the second captured image ILR ′ (x) is generated from the first captured image IL (x), and matching processing is performed, whereby an image by two pupils is obtained.
  • the phase difference s can be detected from the superimposed second captured image ILR ′ (x).
  • the phase difference detection unit 330 (processing unit 210, processor) sets the target position xa on the non-linear scale and the first distance t based on the target position xa.
  • the phase difference detection unit 330 converts the first position (xa + t) separated from the position of interest xa by the first distance t into a linear scale based on the first and second distortion information, and the first and second converted positions tL and tR. And first and second conversion distances dL and dR obtained by converting the first distance t into a linear scale based on the first and second distortion information.
  • the phase difference detection unit 330 obtains a third distance dL ⁇ m obtained by subtracting the second distance m from the first conversion distance dL.
  • the phase difference detection unit 330 generates a first pseudo-pupil image ILc (X, ⁇ ) obtained by shifting the first captured image ILc (X) after distortion correction by a third distance dL ⁇ m, and the first distortion-corrected first image ILc (X, ⁇ ) is generated.
  • a second pseudo-pupil image ILc (X, ⁇ , s) is generated by shifting the one captured image ILc (X) by the second conversion distance dR.
  • the phase difference detection unit 330 includes the first pseudo pupil image ILc (X, ⁇ ) at the first conversion position tL and the second pseudo pupil image ILc (X, ⁇ , s) at the second conversion position tR.
  • a pseudo phase difference image evaluation vector VL ′ + VR ′.
  • the phase difference detection unit 330 performs matching processing while changing the first distance t and the second distance m.
  • a pseudo phase difference image can be generated, and a correlation between the pseudo phase difference image and the second captured image can be calculated. Then, the matching process can be performed by changing the first distance t and the second distance m and detecting the first distance t and the second distance m having the highest correlation.
  • the second pseudo pupil image ILc (X, ⁇ , s) is generated by shifting the ILc (X ⁇ d) by the second conversion distance dR in consideration of the distance d between the optical axes of the two pupils. ing. This is equivalent to shifting ILc (X) by the second conversion distance dR and the optical axis distance d. That is, when generating the second pseudo-pupil image ILc (X, ⁇ , s), not only the second conversion distance dR but also a predetermined value such as the distance d between the optical axes (necessarily depending on the structure of the optical system). The predetermined value generated may be further shifted.
  • the phase difference detection unit 330 detects the difference between the second conversion distance dR and the third distance dL ⁇ m when the correlation is highest in the matching process as the phase difference s. (The above formula (10)). In addition, the phase difference detection unit 330 detects the third distance dL ⁇ m when the correlation is highest in the matching process as a blur amount ⁇ due to subject blur between the first state and the second state.
  • subject blur means that the imaging position of the subject moves (shakes) on two images with different imaging timings.
  • subject blurring factor is subject movement (blur), imaging system movement (blur), or both.
  • the second conversion distance dR and the third distance dL-m uniquely correspond to the first distance t and the second distance m which are variables (the above formulas (7) and (8)).
  • the first distance t and the second distance m are search variables, and the first distance t and the second distance m when the correlation is the highest are determined.
  • the second conversion distance dR and the third distance dL-m when the correlation is the highest detect the difference as the phase difference s, and use the third distance dL-m as the blur amount ⁇ . Can be detected.
  • the blur amount ⁇ can be specified in this way, it is possible to detect an accurate phase difference s that excludes the influence of subject blur between the first state and the second state.
  • the image output unit 325 (processing unit 210, processor) outputs an image for observation based on the first captured image IL (x).
  • stereo measurement is performed based on the first captured image IL (x) and the second captured image ILR ′ (x), and observation is performed based on the first captured image IL (x). Images can be output. As a result, it is possible to perform observation image capturing and stereo measurement of the subject almost simultaneously. If this is performed on the moving image, it is possible to realize almost real-time observation image capturing and stereo measurement.
  • the optical system 15 includes a fixed mask 20 having a first opening and a second opening, and a movable mask 30 movable with respect to the fixed mask 20.
  • the movable mask 30 unshields the first opening and shields the second opening, and the optical system 15 forms an image of the subject 5 with the first opening as one pupil.
  • the movable mask 30 unshields the first opening and the second opening, and the optical system 15 forms an image of the subject 5 using the first opening and the second opening as two pupils. .
  • the first opening corresponds to the diaphragm hole 21, and the second opening corresponds to the diaphragm hole 22.
  • the mask is a member or component that shields light incident on the mask.
  • the light shielding unit 24 shields light and the apertures 21 and 22 allow light to pass through.
  • the movable mask 30 is configured by a light shielding portion having no opening, and shields light.
  • the movable mask 30 can realize the first state in which the subject is imaged by one pupil by making the first opening unshielded and shielding the second opening. Further, the movable mask 30 can realize the second state in which the subject is imaged by the two pupils by making the first opening and the second opening unshielded.
  • the configuration of the optical system 15 to which the phase difference detection method of the present invention can be applied is not limited to this, and the state is switched between one pupil state (first state) and two pupil states (second state). Anything is possible.
  • a single-lens configuration in which a common lens is provided for two pupils may be used.
  • FIGS. 7 and 8 show detailed configuration examples of the fixed mask 20 and the movable mask 30. 7 and 8 are cross-sectional views of the imaging optical system 10, the fixed mask 20, and the movable mask 30, and a view of the fixed mask 20 and the movable mask 30 in the optical axis direction (a rear view viewed from the imaging side). ).
  • a diaphragm hole 21 is formed in the optical path of the left pupil of the fixed mask 20, and a diaphragm hole 22 is formed in the optical path of the right pupil.
  • the aperture holes 21 and 22 are opened in the light shielding portion 24 (light shielding member), and both are open (through holes).
  • the aperture holes 21 and 22 are arranged on the same circle with the rotation shaft 35 as the center, for example.
  • the optical axes AX1 and AX2 pass through the centers of the apertures 21 and 22 (for example, the center of a circle), respectively.
  • the light shielding unit 24 is provided so as to close the housing in which the imaging optical system 10 is housed when viewed from the front (or the back), and is provided perpendicular to the optical axes AX1, AX2, for example. It is the plate-shaped member made.
  • the movable mask 30 is a light shielding portion that is not provided with an aperture hole.
  • the light shielding portion is connected to a rotation shaft 35 perpendicular to the optical axes AX1 and AX2, and is, for example, a plate-like member provided perpendicular to the optical axes AX1 and AX2.
  • the shape of the light shielding portion is, for example, a rod shape (one end side of the rod is connected to the rotation shaft 35), but is not limited thereto, and may be any shape that can realize the states of FIGS.
  • the movable mask 30 is configured to rotate about a rotation axis 35 by a predetermined angle in a direction perpendicular to the optical axes AX1 and AX2.
  • rotational movement can be realized by a piezo element or a motor.
  • the movable mask 30 rotates to the right eye side by a predetermined angle, the left pupil optical path (aperture hole 21) of the fixed mask 20 is opened, and the right pupil optical path (aperture hole 22) is shielded. It becomes a state.
  • the movable mask 30 returns to the rotation angle of 0 degree, and the left and right pupil optical paths (diaphragm holes 21 and 22) of the fixed mask 20 are opened.
  • the apertures 21 and 22 are holes having a size corresponding to the depth of field necessary for taking an observation image (for example, circular holes, the size of which is a diameter). 7 and 8, the case where the area ⁇ L of the throttle hole 21 is different from the area ⁇ R of the throttle hole 22 is illustrated, but the area ⁇ L of the throttle hole 21 and the area ⁇ R of the throttle hole 22 may be the same. In the case of differentiating, for example, the throttle hole 22 is a hole having a size smaller than that of the throttle hole 21.
  • ⁇ L> ⁇ R is set, but the present invention is not limited to this, and ⁇ L ⁇ R may be used.
  • the movable mask 30 may be moved by a sliding operation to create two states.
  • the rotation operation or the slide operation can be realized by, for example, a magnet mechanism or a piezoelectric mechanism, and an appropriate one may be selected in consideration of high speed and durability.
  • FIG. 9 shows a detailed configuration example of an endoscope device (an imaging device in a broad sense).
  • the endoscope apparatus includes a scope unit 100 (imaging unit) and a main body unit 200 (control device).
  • the scope unit 100 includes an optical system 15, an image sensor 40, and a drive unit 50.
  • the optical system 15 includes an imaging optical system 10, a fixed mask 20, and a movable mask 30.
  • the main body 200 includes a processing unit 210 (processing circuit, processing device), a display unit 220 (display device), and an imaging processing unit 230 (imaging processing circuit).
  • the processing unit 210 includes an image selection unit 310 (image frame selection unit), a color image generation unit 320 (image output unit), a phase difference detection unit 330, a movable mask control unit 340 (mode control unit), and a movable mask position detection unit 350.
  • the scope unit 100 and the color image generation unit 320 correspond to the imaging unit 105 and the image output unit 325 in FIG.
  • the storage unit 410 and the operation unit 420 in FIG. 6 are not shown in FIG.
  • the scope unit 100 may include, for example, a treatment tool, an illumination device (light source, lens, etc.), etc., as components not shown.
  • an industrial and medical so-called video scope an endoscope apparatus incorporating an image sensor
  • the present invention can be applied to both a flexible mirror in which the scope unit 100 is configured to be bendable and a rigid mirror in which the scope unit 100 is configured in a stick shape.
  • the main body 200 and the scope unit 100 are configured as portable devices that can be carried, and are used for manufacturing inspection and maintenance inspection of industrial products, maintenance inspection of buildings and pipes, and the like.
  • the driving unit 50 drives the movable mask 30 based on a control signal from the movable mask control unit 340, and switches between the first state (observation mode) and the second state (stereo measurement mode).
  • the drive unit 50 is configured by an actuator using a piezoelectric element or a magnet mechanism.
  • the imaging processing unit 230 performs imaging processing on the signal from the imaging element 40 and outputs a captured image (for example, a Bayer image). For example, correlated double sampling processing, gain control processing, A / D conversion processing, gamma correction, color correction, noise reduction, and the like are performed.
  • the imaging processing unit 230 may be configured by, for example, a discrete IC such as an ASIC, or may be incorporated in the imaging device 40 (sensor chip) or the processing unit 210.
  • the display unit 220 displays an image captured by the scope unit 100, 3D shape information of the subject 5, and the like.
  • the display unit 220 includes a liquid crystal display, an EL (Electro-Luminescence) display, or the like.
  • the movable mask control unit 340 controls the driving unit 50 to switch the position of the movable mask 30.
  • the movable mask control unit 340 sets the movable mask 30 to the observation mode, the reflected light from the subject 5 is imaged on the image sensor 40 via the left eye optical path.
  • the imaging processing unit 230 reads the pixel value of the image formed on the imaging element 40, performs A / D conversion or the like, and outputs the image data to the image selection unit 310.
  • the image selection unit 310 detects that the state of the movable mask 30 is the observation mode based on the control signal from the movable mask control unit 340, and uses the captured image IL (x) as the color image generation unit 320 and the distortion correction unit 380. Output to.
  • the distortion correction unit 380 converts the captured image IL (x) into a linear scale, and outputs the image ILc (X) to the color image generation unit 320 and the phase difference detection unit 330.
  • the color image generation unit 320 performs demosaicing processing (processing for generating an RGB image from a Bayer image) and various types of image processing on the captured image IL (x) or the image ILc (X) after distortion correction to form three plates.
  • the RGB primary color image is output to the display unit 220.
  • the display unit 220 displays the color image.
  • the movable mask control unit 340 sets the movable mask 30 to the stereo measurement mode, the reflected light from the subject 5 is simultaneously imaged on the image sensor 40 via the left pupil optical path and the right pupil optical path.
  • the imaging processing unit 230 reads the pixel value of the image formed on the imaging element 40, performs A / D conversion or the like, and outputs the image data to the image selection unit 310.
  • the image selection unit 310 detects that the movable mask 30 is in the stereo measurement mode based on the control signal from the movable mask control unit 340 and outputs the captured image ILR ′ (x) to the phase difference detection unit 330. .
  • the phase difference detection unit 330 converts the image IL (x) and the image ILR ′ (x) into a monochrome image, performs the above-described matching processing on the converted image, and performs a phase difference (phase shift) for each pixel. Is detected. Further, the phase difference detection unit 330 determines whether or not the phase difference detection is reliable. If it is determined that the phase difference detection is not reliable, an error flag is output for each pixel.
  • the image sensor 40 has sensitivity up to the near-infrared wavelength region, if the illumination light to the subject 5 is selectively irradiated with visible light or near-infrared light, the observation image IL (x) and the measurement image are measured.
  • a visible image or a near-infrared image can be selected and obtained as the pupil superimposed image ILR ′ (x). If color purity is obtained, a visible image is acquired, and if high sensitivity and a high S / N ratio are obtained, a visible image and a near-infrared image may be acquired simultaneously. Moreover, you may make it acquire the image of only a near-infrared image as an image for special uses.
  • the phase difference detection unit 330 outputs the detected phase difference information and error flag to the distance information calculation unit 360.
  • the distance information calculation unit 360 calculates the distance information of the subject 5 for each pixel, and outputs the distance information to the three-dimensional information generation unit 370.
  • the depth (Z value) is obtained as distance information from the phase difference by triangulation.
  • the pixel on which the error flag is set may be regarded as a flat portion (region having a small edge component) of the subject 5 and may be interpolated from distance information of surrounding pixels, for example.
  • the three-dimensional information generation unit 370 generates three-dimensional information from the distance information (or the distance information and the RGB image from the color image generation unit 320).
  • the three-dimensional information generation unit 370 generates the generated three-dimensional image, the three-dimensional data, or a display image obtained by superimposing the generated three-dimensional image and the observation image as necessary, and outputs the generated image to the display unit 220.
  • the display unit 220 displays the three-dimensional information.
  • the movable mask position detector 350 detects whether the movable mask 30 is in the observation mode position or the stereo measurement mode position, using the images IL (x) and ILR ′ (x) used for stereo measurement. If it is determined that the state of the movable mask 30 does not match the mode, a position error flag is output to the movable mask control unit 340. The movable mask control unit 340 receives the position error flag and corrects the movable mask 30 to a correct state (a state corresponding to image selection). If the correct state is not obtained even if the correction operation is performed, it is determined that some failure has occurred, and the entire function is stopped.
  • Whether the movable mask 30 is in the observation mode position or the stereo measurement mode position can be determined by the following first to fourth methods, for example. Of the first to fourth methods, one method may be used, or a plurality of methods may be used.
  • the first method it is determined whether or not the average of the phase differences s within a predetermined area of the image shows a negative value.
  • the movable mask 30 blocks the left eye optical path contrary to the default.
  • the referenced left pupil image IL (x) is the right pupil image IR (x)
  • the matching evaluation value at the time of detecting the phase difference s shows a value equal to or less than a predetermined value.
  • the optical path of the left eye or right eye is incompletely blocked. In this case, since the matching evaluation between the double images having different profiles is performed, the matching evaluation value remains low even in the phase difference s that is originally matched.
  • the third method it is determined whether or not the average of the phase differences s within a predetermined area of the image shows a predetermined value or less (a value close to zero).
  • a predetermined value or less a value close to zero.
  • the fourth method it is determined whether or not the brightness ratio between the observation image IL (x) and the measurement superimposed image ILR ′ (x) satisfies a predetermined range.
  • the brightness ratio of these images is substantially constant.
  • FIG. 10 shows a first sequence (first timing chart) of operations in moving image shooting.
  • switching of the state of the movable mask 30, imaging timing, and selection of the captured image are linked.
  • the mask state in the observation mode and the mask state in the stereo measurement mode are alternately repeated.
  • imaging is performed once in each mask state.
  • an image picked up by the image pickup device 40 in the frame fn (n is an integer) in the mask state of the observation mode is selected as the observation image IL (x).
  • the image captured by the image sensor 40 in the frame fn + 1 in the mask state of the stereo measurement mode is selected as the measurement image ILR ′ (x).
  • the observation image IL (x) and the measurement image ILR ′ (x) can be obtained continuously in a state almost in real time. Even when there is movement, both observation and measurement can be realized. While displaying the observation image IL (x) and displaying the measured information superimposed on it as necessary, visual inspection and quantitative inspection can be simultaneously provided to the user, which is useful. Information can be provided.
  • the measurement process is performed using the observation image IL (x) and the subsequent measurement image ILR ′ (x), or the measurement image ILR ′ (x) and the subsequent observation image IL (x).
  • the measurement process Mn + 1 is executed by the observation image IL (x) in the frame fn and the measurement image ILR ′ (x) in the frame fn + 1.
  • the observation image IL (x) is taken in the frame fn + 2.
  • the measurement process Mn + 2 is executed with the measurement image ILR ′ (x) in the frame fn + 1 and the observation image IL (x) in the fn + 2. In this way, measurement information can be obtained in a state close to real time in each frame.
  • FIG. 11 shows a second sequence (second timing chart) of the operation in moving image shooting.
  • the mask state of the observation mode is set in one frame, and the mask state of the stereo measurement mode is set in a plurality of subsequent frames as shown in B2.
  • FIG. 11 demonstrates as an example the case where a some frame is 5 frames, it is not limited to this.
  • the image is taken once in the mask state of the observation mode, and the image taken in the frame fn is selected as the observation image IL (x) as shown in B4.
  • images are taken five times in the mask state of the stereo measurement mode, and as shown in B6, each image taken in the frames fn + 1 to fn + 5 is selected as a measurement image ILR '(x).
  • Frames fn + 1 to fn + 5 are defined as fn + i (i is an integer satisfying 1 ⁇ i ⁇ 5).
  • the measurement process Mn + i is executed by the observation image IL (x) in the frame fn and the measurement image ILR ′ (x) in the frame fn + i.
  • the phase difference s (X) is obtained by the following equation (11), where si (X) is the phase difference of an arbitrary pixel (coordinate) X of the image sensor 40 in the frame fn + i.
  • phase difference si (X) is integrated and averaged between frames (fn + 1 to fn + 5), a highly accurate phase difference s (X) with less variation can be obtained.
  • FIGS. 12 and 13 show a second basic configuration example of the imaging unit of the endoscope apparatus
  • FIGS. 14 and 15 show a second detailed configuration example of the fixed mask 20 and the movable mask 30.
  • Show. 12 and 13 are cross-sectional views (on a plane including the optical axis) of the imaging unit, and the amount of imaged light on the image sensor (or the pixel value of the image captured by the image sensor). The relationship of the position x is shown.
  • 14 and 15 are cross-sectional views of the imaging optical system 10, the fixed mask 20, and the movable mask 30, and a view of the fixed mask 20 and the movable mask 30 in the optical axis direction (a rear view viewed from the imaging side). ).
  • symbol is attached
  • the imaging optical system 10 is a monocular optical system.
  • This monocular optical system is composed of one or a plurality of lenses.
  • the apertures 21 and 22 of the fixed mask 20 divide one pupil of the monocular optical system into a left pupil and a right pupil. Lines that pass through the centers of the aperture holes 21 and 22 (for example, the center of the circle in the case of a circular aperture hole) and are parallel to the optical axis AXC of the imaging optical system 10 are defined as center lines IC1 and IC2. For example, the distance between the optical axis AXC and the center lines IC1 and IC2 is equal.
  • the fixed mask 20 is provided at the pupil position of the imaging optical system 10. In the observation mode of FIGS. 12 and 14, the movable mask 30 is set at a position where the aperture 22 is shielded. Further, in the stereo measurement mode of FIGS. 13 and 15, the movable mask 30 is set to a position where the aperture holes 21 and 22 are opened.
  • the area ⁇ L of the throttle hole 21 and the area ⁇ R of the throttle hole 22 are different.
  • the throttle hole 22 is a hole having a size smaller than that of the throttle hole 21.
  • ⁇ L> ⁇ R is set, but the present invention is not limited to this, and ⁇ L ⁇ R may also be used.
  • the phase difference s is zero at the subject position in focus, and the sign of the phase difference s differs between when the focus is shifted to the front side and when the focus is shifted to the rear side (left pupil).
  • the displacement direction of the image IL ′ and the right pupil image IR ′ is reversed).
  • the sign of the phase difference s is the same regardless of the focus state (the shift direction between the left pupil image IL ′ and the right pupil image IR ′ is the same). Therefore, the brightness of the left pupil image IL ′ and the right pupil image IR ′ need not be different.
  • the method for detecting the phase difference s (x) from the image IL (x) photographed in the observation mode and the image ILR ′ (x) photographed in the stereo measurement mode is the same as the method described in FIG.
  • the baseline length in stereo measurement is the distance d 'between the center lines IC1 and IC2.
  • the operation of the endoscope apparatus (imaging apparatus) described in the present embodiment can be executed as an imaging method (an imaging apparatus operating method, an endoscope apparatus operating method).

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Studio Devices (AREA)
  • Endoscopes (AREA)

Abstract

撮像装置は、撮像素子40と光学系15と処理部210とを含む。光学系15は、1つの瞳により被写体を撮像素子40に結像させる第1の状態と、2つの瞳により被写体を撮像素子40に結像させる第2の状態とを切り替える。第2の状態において、一方の瞳による結像と他方の瞳による結像とは少なくとも一部において重なる。処理部210は、第1の状態において撮像された第1の撮像画像に対して歪み補正を行い、歪み補正後の第1の撮像画像と、一方の瞳による結像の歪みを表す第1歪み情報と、他方の瞳による結像の歪みを表す第2歪み情報と、第2の状態において撮像された第2の撮像画像とに基づいて、位相差を検出する。

Description

撮像装置、内視鏡装置及び撮像方法
 本発明は、撮像装置、内視鏡装置及び撮像方法等に関する。
 従来より3次元形状を光学的に計測する技術が知られている。例えば、左右両眼の立体視によるステレオ撮像方式や、正弦パターンなどのパターン照明による位相シフト方式、反射光の時間測定によるTOF(Time of Flight)方式など、種々の方式が提案されている。
 ステレオ撮像方式は、撮像系をステレオ光学系にするだけの簡便な機構で良く、特別な照明機構や照明制御、高度な信号処理が不要であるため、昨今の撮像系の小型化技術の進歩を考えると小スペースでの実装には向いている。例えば、内視鏡装置の先端部への実装や小型ロボットの視覚センサなど多くのニーズが存在する。これらは高精度な計測機能だけではなく同時に高画質な通常観察機能も求められることが多く、左右別々の撮像素子を用いるのではなく解像度を確保するために共通の撮像素子に視差画像を結像する形式が取られている。ステレオ撮像方式では、左右画像の視差量から被写体までの距離を求めることが基本なので、共通の撮像素子に結像された左右画像を分離できないと視差量を検出できず、距離情報を求めることができない。
 左右画像を分離する手法として、例えば特許文献1には、左右の結像光路をメカニカルシャッターにより時間的に切り替え、左右の画像を分離取得する手法が開示されている。この手法では、照明として例えば白色光を用いることが可能である。
特開2014-28008号公報
 特許文献1のように時分割により左右の画像を分離取得する方法では、左右のどちらの画像も観察用画像としての利用が可能である。しかしながら、ステレオ計測のための左右画像の分離性は優れているが、撮像系又は被写体が動いた場合に時間的に撮像タイミングのずれが生じ、ステレオ計測のための正確な視差量を検出することができない。
 一方、ステレオ計測において左右の画像を白色光で同時に取得する手法として、撮像センサを左右に分割した別々の領域に左右の画像を結像させる手法が考えられる。しかしながら、左右画像のいずれかを観察用画像として利用する場合、撮像素子の半分に結像させているため画像が低解像になってしまう。
 これらの課題を解決する手法として、1つの瞳による撮像と2つの瞳による撮像とを切り替え、それらの撮像画像から位相差を検出する手法が考えられる。このとき、高解像化のために、2つの瞳の一方の瞳による結像と他方の瞳による結像とを、撮像センサの別々の領域ではなく共通の領域に重ねて(撮像センサの広い面に)結像させることが望ましい。しかしながら、その結像の重なりのために、光学系による画像の歪み(歪曲収差)を補正できない。そのため、歪みを含んだ画像から位相差を検出する必要があるという課題がある。
 本発明の幾つかの態様によれば、歪曲収差がある光学系を用いた場合であっても、高解像な画像を撮影できると共にステレオ計測ができる撮像装置、内視鏡装置及び撮像方法等を提供できる。
 本発明の一態様は、撮像素子と、1つの瞳により被写体を前記撮像素子に結像させる第1の状態と、2つの瞳により前記被写体を前記撮像素子に結像させる第2の状態とを切り替える光学系と、前記第1の状態において前記撮像素子により撮像された第1の撮像画像と、前記第2の状態において前記撮像素子により撮像された第2の撮像画像とに基づいて、前記2つの瞳の一方の瞳による結像と他方の瞳による結像との間の位相差を検出する処理部と、を含み、前記第2の状態において、前記一方の瞳による結像と前記他方の瞳による結像とは少なくとも一部において重なり、前記処理部は、前記第1の撮像画像に対して歪み補正を行い、前記歪み補正後の前記第1の撮像画像と、前記一方の瞳による結像の歪みを表す第1歪み情報と、前記他方の瞳による結像の歪みを表す第2歪み情報と、前記第2の撮像画像とに基づいて前記位相差を検出する撮像装置に関係する。
 本発明の一態様によれば、1つの瞳による第1の撮像画像から歪み補正後の第1の撮像画像が生成され、その歪み補正後の第1の撮像画像と、2つの瞳の各瞳による結像の歪みを表す第1、第2歪み情報と、2つの瞳による第2の撮像画像とに基づいて、位相差が検出される。このとき、各瞳による結像は互いに少なくとも一部において重なっている。これにより、歪曲収差がある光学系を用いた場合であっても、高解像な画像を撮影できると共に正確なステレオ計測が可能となる。
 また本発明の他の態様は、上記に記載された撮像装置を含む内視鏡装置に関係する。
 また本発明の更に他の態様は、光学系が1つの瞳により被写体を撮像素子に結像させる第1の状態と、前記光学系が、2つの瞳の一方の瞳による結像と他方の瞳による結像とが少なくとも一部において重なるように前記被写体を前記撮像素子に結像させる第2の状態とを切り替え、前記第1の状態において前記撮像素子により撮像された第1の撮像画像に対して歪み補正を行い、前記歪み補正後の前記第1の撮像画像と、前記一方の瞳による結像の歪み量である第1歪み量と、前記他方の瞳による結像の歪み量である第2歪み量と、前記第2の状態において前記撮像素子により撮像された第2の撮像画像とに基づいて、前記一方の瞳による結像と前記他方の瞳による結像との間の位相差を検出する撮像方法に関係する。
図1は、内視鏡装置の撮像部の基本構成例である。 図2は、内視鏡装置の撮像部の基本構成例である。 図3は、光学系による画像の歪みを模式的に示した図である。 図4は、非線形スケールと線形スケールの対応を示す図である。 図5は、本実施形態の位相差検出手法を説明する図である。 図6は、内視鏡装置の構成例である。 図7は、固定マスク、可動マスクの詳細な構成例である。 図8は、固定マスク、可動マスクの詳細な構成例である。 図9は、内視鏡装置の詳細な構成例である。 図10は、動画撮影における動作の第1のシーケンスである。 図11は、動画撮影における動作の第2のシーケンスである。 図12は、内視鏡装置の撮像部の第2基本構成例である。 図13は、内視鏡装置の撮像部の第2基本構成例である。 図14は、固定マスク、可動マスクの第2の詳細な構成例である。 図15は、固定マスク、可動マスクの第2の詳細な構成例である。
 以下、本実施形態について説明する。なお、以下に説明する本実施形態は、請求の範囲に記載された本発明の内容を不当に限定するものではない。また本実施形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。
 例えば以下では工業用の内視鏡装置を本発明の適用例として説明するが、本発明は工業用の内視鏡装置への適用に限定されず、ステレオ撮影方式(視差をもった撮像系で得た2画像の位相差を検出して被写体の距離情報を取得する方法)により3次元形状を計測する3次元計測装置や3次元計測機能を有する撮像装置(例えば医療用の内視鏡装置、顕微鏡、工業用カメラ、ロボットの視覚機能など)であれば適用できる。
 1.基本構成
 内視鏡装置での検査では、例えば検査対象にスコープを挿入して通常の画像を撮影しながら異常がないかチェックしていき、傷などの詳細に観察したい部分が見つかったときに、その部分の3次元形状を計測して更なる検査が必要かを検討する。このように、通常の観察用画像は白色光で撮影を行う。このような白色光での撮影とステレオ計測を両立する方法として、例えば白色光でステレオ撮影を行うことが考えられる。しかしながら、ステレオ撮影で白色光を用いた場合、イメージセンサを左右に分割して、それぞれの領域に左画像と右画像を結像させる必要があるため、画像が低解像になる。イメージセンサの同一領域に左画像と右画像を結像する手法としては、カラー位相差法があるが、撮影される画像は色ずれ画像になるため観察用画像として用いることができない。
 上記のことから、白色光でイメージセンサの同一領域で左画像と右画像を写すためには、時分割切り替え(例えば特許文献1)が必要となる。しかしながら、撮像系と被写体が相対的に動いた場合には左画像と右画像の間に動きブレがあるため、三角測定が不正確になってしまう。特に内視鏡のようにカメラを被写体に対して固定できない場合には、動きブレが発生しやすい。
 本実施形態では、白色光で高解像な観察用画像を得ると共に、カラー位相差法を用いることなく非時分割に撮像素子の同一領域に左右瞳の通過光を結像させ、その撮像画像からステレオ計測できる。これによって、上記のような課題を解決できる。また本実施形態では、観察用画像を得ながらステレオ計測をリアルタイムに行うことが可能である。
 なお、以下で説明する本発明の適用対象として、例えば工業用内視鏡などの撮像系の位置が安定しない(固定しない)装置であり、且つ撮像機構が小さく解像度を確保するために大きな撮像素子を用いることができない装置が想定される。但し、本発明の適用は上記装置に限定されず、高精細観察、高精度計測を目的とする3次元計測装置に広く適用できる。
 図1、図2は、内視鏡装置の撮像部の基本構成例である。図1、図2には、撮像部を横から見た(光軸を含む平面での)断面図と、撮像素子上の結像の光量(又は撮像素子に撮像された画像の画素値)と位置xの関係と、を示す。位置xは、結像光学系の光軸に垂直な方向における位置(座標)であり、例えば撮像素子の画素位置である。実際には2次元の座標系であるが、ここでは2次元のうち視差方向の1次元の座標系で説明する。なお以下では照明機構の図示を省略する。
 本実施形態の内視鏡装置は、光学系15(光学装置)、撮像素子40(撮像センサ、イメージセンサ)を含む。光学系15は、結像光学系10、可動マスク30(第1のマスク)、固定マスク20(第2のマスク)を含む。
 結像光学系10は、ステレオ光学系を構成する左眼の結像光学系11(第1光学系)、右眼の結像光学系12(第2光学系)を含む。各眼の結像光学系は、例えば1又は複数のレンズで構成され、撮像素子40の画素アレイの全体(又は大部分)に被写体を結像させる。例えば、左眼の結像光学系11のイメージサークルと右眼の結像光学系12のイメージサークルは大きく重複しており、その重複部分の中に撮像素子の画素アレイが収まる。dは、左眼の結像光学系11の光軸AX1と右眼の結像光学系12の光軸AX2との間の距離であり、ステレオ計測においては基線長となる。
 撮像素子40は、例えばRGBのベイヤ配列のカラーフィルタを有する。なお、これに限定されず、例えば撮像素子40は補色フィルタ等を有してもよい。
 固定マスク20、可動マスク30は、例えば結像光学系10の瞳位置に設けられる。固定マスク20は結像光学系10に対して固定されており、可動マスク30は光軸AX1、AX2に垂直な平面内で位置を切り替えられる構成となっている。可動マスク30は、図1に示す観察モード(観察状態、第1のモード、第1の状態)と、図2に示すステレオ計測モード(ステレオ計測状態、第2の状態、第2のモード)の2つのモードを高速に切り替えられるようになっている。可動マスク30は、板状の遮光部(遮光部材)である。第1の状態において、固定マスク20の2つの絞り孔のうち一方の絞り孔を遮光部が覆るような大きさに、可動マスク30が構成されている。なお、図1、図2では可動マスク30が固定マスク20よりも結像側に設けられる場合を図示しているが、可動マスク30が固定マスク20よりも対物側に設けられてもよい。
 結像光学系10による結像光路は、左眼、右眼を通る2つの光路の一方又は両方が固定マスク20と可動マスク30により選択される。
 図1は、通常の観察用画像を取得する状態(観察モード)を示している。可動マスク30により右眼光路が遮断(遮光)され、固定マスク20の絞り孔の左眼光路のみが開放された状態となる。この場合、撮像素子40に結像される画像は左眼のみによる結像画像ILとなり、通常の(単眼による白色光の)撮像画像が得られる。
 一方、図2は、ステレオ画像の左右画像を同時に取得する状態(ステレオ計測モード)を示している。可動マスク30により左右光路は開放状態となり、左瞳画像IL’と右瞳画像IR’が重畳された画像(二重画像)が得られる。図2では便宜的にIL’、IR’を別々に示しているが、実際には、これらを加算した画像IL’+IR’が得られる。左瞳画像IL’と右瞳画像IR’は共に白色光画像である。白色光画像は、撮像素子のカラーフィルタの分光特性で撮影された、赤色成分、緑色成分、青色成分を含む画像である。カラーフィルタが近赤外に帯域をもつ場合には、画像の各色の成分には近赤外の成分が含まれてもよい。
 2.光学歪みを考慮した位相差検出
 被写体までの距離は左瞳画像IL’と右瞳画像IR’の位相差を検出できなければ求められない。しかしながら、上記のようなステレオ計測モードで得た画像では左瞳画像IL’と右瞳画像IR’が重畳されてしまっているので、この画像からだけでは位相差の検出はできない。そこで観察モードで得た画像ILを用いて位相差を求める。以下、この手法について説明する。
 まず、ステレオ計測モードの二重画像において歪み補正できない点について説明する。内視鏡スコープでは小型で広角な光学系が一般的であるが、そのような光学系では画像の歪み(歪曲収差)が大きくなりやすい。図3は、光学系15による画像の歪みを模式的に示した図である。
 図3では、右瞳画像IR’を点線で示し、左瞳画像IL’を実線で示す。水平方向の座標(位置)をxで表し、垂直方向の座標(位置)をyで表し、左瞳の光軸とxy平面との交点を(XL,0)とし、右瞳の光軸とxy平面との交点を(XR,0)とする。図3では、歪みの様子を曲線の歪んだ格子で表しており、樽型歪みの例である。樽型歪みでは、歪みが無い場合に比べて、光軸から遠い位置ほど像高が小さくなる。なお、本発明の適用対象は樽型歪みに限定されず、種々の光学歪みに適用できる。
 図4は、非線形スケールと線形スケールの対応を示す図である。以下では説明を簡単にするためにy座標を省略し、視差方向のx座標のみ着目する。画像IL、IL’IR’の画素値を座標xの関数とみなし、それぞれIL(x)、IL’(x)、IR’(x)と表記する。
 図4に示す非線形スケールは、歪んだ画像での座標xであり、線形スケールは、歪みをリニアに補正した画像(歪んでいない画像)での座標Xである。左瞳画像、右瞳画像での原点を、それぞれ光軸位置XL、XRとしている。歪みが無い場合にはX=xであり、歪んでいる場合にはX=(1/ξ)xとなる。1/ξは、歪みの度合いを表す係数である。なお、ここでは非線形スケールと線形スケールの対応が一次式で表される(線形である)場合を説明するが、これに限定されず、非線形スケールと線形スケールの対応が既知であれば本発明の手法を適用できる。また、左右瞳で係数ξが共通である場合を説明するが、左右瞳で係数ξが異なってもよい。
 観察モードで得られる画像IL(x)は、上記の歪みを用いて下式(1)のように表すことができる。ILcは、歪みが無い線形スケールでの左瞳画像を表す。
Figure JPOXMLDOC01-appb-M000001
 上式(1)は、歪みを含む撮像画像での座標xが、線形スケールでの座標(1/ξ)・[x-XL]+XLに対応することを示している。この対応関係から座標変換を行うことにより、歪みの無い画像を得ることができる。
 一方、ステレオ計測モードで得られる二重画像IL’(x)+IR’(x)は、下式(2)のように表すことができる。IRcは、歪みが無い線形スケールでの右瞳画像を表す。
Figure JPOXMLDOC01-appb-M000002
 上式(2)は、二重画像での座標xが、右瞳と左瞳で異なる線形スケールでの座標(1/ξ)・[x-XL]+XL、(1/ξ)・[x-XR]+XRに対応することを示している。即ち、座標xでの画像は、異なる線形スケール座標の画像が混合されたものとなっており、単純な歪み補正はできない。
 さて、本実施形態では、一方の瞳のみで撮像した観察モードの画像IL(x)を意図的にずらして2つ重ねて二重画像を生成し、その生成した二重画像とステレオ計測モードの二重画像とを比較して位相差を検出する。上記のようにステレオ計測モードの二重画像は歪み補正できないので、観察モードの画像から二重画像を生成する際に、歪みを考慮してずれ量を決めなければならない。
 図5は、本実施形態の位相差検出手法を説明する図である。まず図5の上段に示すように観察モードの左瞳画像IL(x)を歪み補正し、ILc(X)を求める。Xは線形スケールでの座標である。右瞳画像IR(x)は単独で撮影されないので、図5の下段に示すように、ILc(X)をdだけ平行移動したILc(X-d)を、歪み補正された右瞳画像として用いる。ここで、dは2瞳の光軸間距離であり、d=XR-XLである。図1、図2のように2眼で2瞳を構成する場合にはd>0である。なお、一眼を2瞳に分割する構成を採用してもよく、その場合にはXL=XR、d=0である。
 図5の中段にステレオ計測モードの二重画像ILR’(x)=[IL’(x)+IR’(x)]を示す。図5では説明のためにIL’(x)、IR’(x)を分離しているが、実際には加算画像として得られている。この二重画像ILR’(x)の非線形スケールにおいて、着目位置(着目座標)をxaとする。着目位置は、各座標について位相差を順次に検出していく処理を行う際に、その座標のいずれか(今、位相差を検出しようとしている座標)である。
 マッチング処理で探索する第1の変数として距離tを考え、着目位置xaから距離tだけ離れた位置(xa+t)での評価ベクトルRL+RRを取得する。評価ベクトルRL+RRは、位置(xa+t)を含む所定幅内の画素の画素値を要素として並べたベクトルである。
 次に、位置xa、(xa+t)を、左瞳画像の線形スケールでの位置XaL、tLに変換する。同様に、位置xa、(xa+t)を、右瞳画像の線形スケールでの位置XaR、tRに変換する。例えば図4の歪みを用いた場合、下式(3)~(6)のようになる。
Figure JPOXMLDOC01-appb-M000003
 次に、位置XaL、tLの間の距離dL、位置XaR+d、tRの間の距離dRを求める。上式(3)~(6)からdL、dRは下式(7)、(8)のようになる。なお、下式(7)、(8)から分かるように、XaL、XaRを知らなくてもdL、dRが求まるので、必ずしもXaL、XaRを求める必要はない。
Figure JPOXMLDOC01-appb-M000004
 次に、左瞳画像ILc(X)を距離dL-mだけシフトさせた画像ILc(X,δ)を求める。距離mは、マッチング処理で探索する第2の変数である。そして、画像ILc(X,δ)から、位置tLでの評価ベクトルVLを取得し、その評価ベクトルVLを非線形スケールに変換して(歪みを加えて)評価ベクトルVL’を求める。評価ベクトルVLは、位置tLを含む所定幅内の画素の画素値を要素として並べたベクトルである。
 次に、右瞳画像ILc(X-d)を距離dRだけシフトさせた画像ILc(X,δ,s)を求める。そして、画像ILc(X,δ,s)から、位置tRでの評価ベクトルVRを取得し、その評価ベクトルVRを非線形スケールに変換して(歪みを加えて)評価ベクトルVR’を求める。評価ベクトルVRは、位置tRを含む所定幅内の画素の画素値を要素として並べたベクトルである。
 次に、評価ベクトルVL’、VR’を加算して評価ベクトルVL’+VR’を求める。これが、観察モードの画像から疑似的に生成した二重画像に相当する。そして、この評価ベクトルVL’+VR’と、ステレオ計測モードの二重画像ILR’(x)から取得した評価ベクトルRL+RRとの相関値を求める。相関値を求める手法としては、例えばSAD(Sum of Absolute Difference)、SSD(Sum of Squared Difference)、ZNCC(Zero-means Normalized Cross-Correlation)等の種々の手法を採用できる。
 この相関値を、変数t、mを独立に変えながら求め、最も相関が高い場合の変数t、mの値t’、m’を求める。そして上式(7)、(8)にt=t’を代入してdL、dRを求め、そのdL、dR、m=m’を下式(9)、(10)に代入してブレ量δ、位相差sを求める。
Figure JPOXMLDOC01-appb-M000005
 そしてブレ量δ、位相差sを、着目位置xa(線形スケールではXaL)を変えながら求めることで、各位置x(線形スケールではX)でのブレ量δ、位相差sが求まることになる。なお、線形スケールでの着目位置XaLで求めた位相差sは、実際には位置XaL+δでの位相差sと考えることができる。
 ここで、ブレ量δは、観察モードとステレオ計測モードを時分割に切り替えた際の被写体ブレに対応している。また位相差sは、ステレオ計測モードの左瞳画像IL’(x)と右瞳画像IR’(x)の間の位相差に対応している。即ち、本質的には変数tはδ+sに相当し、変数mはsに相当すべきものである。このことは、歪みが無いと仮定すると理解が容易である。
 即ち、ξ=1を上式(8)に代入するとdR=t-dとなり、上式(10)からt=δ+s+dである。またξ=1を上式(7)に代入するとdL=tとなり、上式(9)とt=δ+s+dからm=s+dである。dは光軸間距離で定数なので、本質的にはtがδ+sに相当し、mがsに相当していることが分かる。
 本実施形態の位相差検出手法では、このような変数t、mを用いることによって、歪みを含んだままの二重画像ILR’(x)から、リニアな座標でのブレ量δと位相差sを検出し、ステレオ計測を行うことが可能である。
 また、ブレ量δを特定できることによって、時分割撮像であるにも関わらず、被写体ブレの影響を受けない正確な位相差sを検出できる。このブレ量δを特定できるのは、ステレオ計測モードにおいて二重画像ILR’(x)を取得しているからである。即ち、二重画像ILR’(x)はIL’(x)、IR’(x)を同時に撮影しているので、そのずれ量は位相差sの情報だけを含んでおり、それによってブレ量δと位相差sの分離が可能となっている。
 また、二重画像ILR’(x)では左瞳画像IL’(x)と右瞳画像IR(x)を重ねて結像させるため、分離して結像させた場合よりも撮像素子の広い領域に各瞳画像が結像される。これにより、観察モードにおいて高解像な画像IL(x)を得ることが可能であり、精密なステレオ計測と高解像な撮影とが両立できる。
 また、観察モードとステレオ計測モードを切り替えながら動画撮影を行うことによって、観察モードでの画像から観察画像を生成してユーザに提示しつつ、同時にステレオ計測モードの画像から3D情報を得ることができる。これにより、通常の観察を行いながら、ほぼリアルタイムでのステレオ計測が可能となる。
 3.内視鏡装置
 図6に、本実施形態の内視鏡装置(広義には撮像装置)の構成例を示す。内視鏡装置は、処理部210(処理装置、プロセッサ)、撮像部105、記憶部410(メモリ)、操作部420(操作装置)、表示部220(表示装置、ディスプレイ)を含む。処理部210は、位相差検出部330、画像出力部325、歪み補正部380を含む。
 処理部210は、内視鏡装置の各部の制御や、例えば画像処理等の種々の情報処理を行う。記憶部410は、例えば撮像部105により撮像された画像データや内視鏡装置の設定データ等を記憶する。或いは、記憶部410は、処理部210の一時記憶メモリ(ワーキングメモリ)として利用される。撮像部105は、画像(動画像、静止画像)を撮影する。撮像部105は、撮像素子40、光学系15を含む。また撮像部105は、光学系15のフォーカス機構を駆動する駆動装置等を含むことができる。操作部420は、ユーザが撮像装置を操作するための入力装置であり、例えばボタンやレバー、回転リング、マウス、キーボード、タッチパネル等で構成できる。表示部220は、撮像部105により撮像された画像や、処理部210により処理された画像を表示する。
 具体的には、光学系15は、1つの瞳により被写体5を結像させる第1の状態と、2つの瞳により被写体を結像させる第2の状態とを切り替える。処理部210は、第1の状態において撮像素子40により撮像された第1の撮像画像IL(x)と、第2の状態において撮像素子40により撮像された第2の撮像画像ILR’(x)とに基づいて、2つの瞳の一方の瞳による結像(IL’(x))と他方の瞳による結像(IR’(x))との間の位相差sを検出する。第2の状態において、一方の瞳による結像(IL’(x))と他方の瞳による結像(IR’(x))とは少なくとも一部において重なる。そして、歪み補正部380(処理部210)は、第1の撮像画像IL(x)に対して歪み補正を行う。位相差検出部330(処理部210)は、歪み補正後の第1の撮像画像ILc(X)と、一方の瞳による結像の歪みを表す第1歪み情報と、他方の瞳による結像の歪みを表す第2歪み情報と、第2の撮像画像ILR’(x)とに基づいて位相差sを検出する。
 ここで、第1の状態は、図1の観察モードにおける光学系15の状態に対応し、第2の状態は、図2のステレオ計測モードにおける光学系15の状態に対応する。第1の状態における1つの瞳は、固定マスク20の左眼光路の絞り孔に対応し、第2の状態における2つの瞳は、固定マスク20の左眼光路の絞り孔、右眼光路の絞り孔に対応する。なお、図1、図2では2つの瞳を左瞳及び右瞳として説明しているが、2つの瞳の分離方向は左右に限定されない。
 また、第1歪み情報、第2歪み情報は、第2の撮像画像ILR’(x)における位置と、各瞳の結像における位置との対応関係を表す情報である。即ち、非線形スケールと各瞳画像での線形スケールとの対応関係を表す情報である。図5では、非線形スケールの位置xa+tと、IL’(x)、IR’(x)での位置tL、tRの対応関係を表す情報が、第1歪み情報、第2歪み情報である。歪み情報は、例えば上式(5)、(6)のように数式による対応関係として与えられる。或いは、非線形スケールでの各位置に、線形スケールでの位置を対応づけたルックアップテーブルとして歪み情報が与えられてもよい。本実施形態では、tL、tRが第1歪み情報、第2歪み情報から求められており、そのtL、tRを用いて位相差sを検出することが、第1歪み情報、第2歪み情報に基づいて位相差sを検出することに相当している。
 本実施形態によれば、1つの瞳による第1の撮像画像IL(x)から歪み補正後の第1の撮像画像ILc(X)が生成され、その歪み補正後の第1の撮像画像ILc(X)と、2つの瞳の各瞳による結像の歪みを表す情報(第1、第2歪み情報)と、2つの瞳による第2の撮像画像ILR’(x)とに基づいて、位相差sが検出される。第2の撮像画像ILR’(x)は、2つの瞳による画像が重畳して同時に取得されている。これにより、撮像系のブレの影響を受けることなく正確な位相差(即ち被写体距離)を検出できる。また、2つの瞳の各瞳による結像の歪みを表す情報を用いることで、歪みを含む第2の撮像画像ILR’(x)と、線形スケールにおける各瞳による結像とを対応付けることができる。これにより、歪み補正後の第1の撮像画像ILc(X)で、線形スケールにおける各瞳による結像を模擬することが可能となり、その模擬した画像と第2の撮像画像ILR’(x)から位相差sを検出することが可能となる。
 なお、本実施形態の内視鏡装置(撮像装置)は以下のように構成されてもよい。即ち、本実施形態の内視鏡装置は、撮像素子40と、光学系15と、情報(例えばプログラムや各種のデータ)を記憶するメモリ(記憶部410)と、メモリに記憶された情報に基づいて動作するプロセッサ(処理部210、ハードウェアを含むプロセッサ)と、を含む。プロセッサは、第1の撮像画像IL(x)に対して歪み補正を行い、その歪み補正後の第1の撮像画像ILc(X)と、一方の瞳による結像の歪みを表す第1歪み情報と、他方の瞳による結像の歪みを表す第2歪み情報と、第2の撮像画像ILR’(x)とに基づいて位相差sを検出する。
 プロセッサは、例えば各部の機能が個別のハードウェアで実現されてもよいし、或いは各部の機能が一体のハードウェアで実現されてもよい。プロセッサは、例えばCPU(Central Processing Unit)であってもよい。ただし、プロセッサはCPUに限定されるものではなく、GPU(Graphics Processing Unit)、或いはDSP(Digital Signal Processor)等、各種のプロセッサを用いることが可能である。またプロセッサはASICによるハードウェア回路でもよい。メモリは、SRAM、DRAMなどの半導体メモリであってもよいし、レジスターであってもよいし、ハードディスク装置等の磁気記憶装置であってもよいし、光学ディスク装置等の光学式記憶装置であってもよい。例えば、メモリはコンピュータにより読み取り可能な命令を格納しており、当該命令がプロセッサにより実行されることで、処理部210の各部の機能が実現されることになる。ここでの命令は、プログラムを構成する命令セットの命令でもよいし、プロセッサのハードウェア回路に対して動作を指示する命令であってもよい。
 本実施形態の動作は、例えば以下のように実現される。プロセッサは、光学系15を第1の状態と第2の状態に切り替える制御を行う。撮像素子40により撮像された第1の撮像画像IL(x)と第2の撮像画像ILR’(x)がメモリ(記憶部410)に格納される。プロセッサは、メモリから第1の撮像画像IL(x)を読み出し、その第1の撮像画像IL(x)に対して歪み補正を行い、歪み補正後の第1の撮像画像ILc(X)をメモリに格納する。プロセッサは、メモリから歪み補正後の第1の撮像画像ILc(X)と、第2の撮像画像ILR’(x)とを読み出し、その歪み補正後の第1の撮像画像ILc(X)と、第1、第2歪み情報と、第2の撮像画像ILR’(x)とに基づいて位相差sを検出し、その位相差sをメモリに格納する。第1、第2歪み情報は、例えば上式(5)、(6)のような関数としてプログラムに実装される。或いは、ルックアップテーブルとしてメモリに格納されている。
 また、本実施形態の処理部210の各部は、プロセッサ上で動作するプログラムのモジュールとして実現される。例えば、歪み補正部380は、第1の撮像画像IL(x)に対して歪み補正を行う歪み補正モジュールとして実現される。同様に、位相差検出部330は、歪み補正後の第1の撮像画像ILc(X)と、第1、第2歪み情報と、第2の撮像画像ILR’(x)とに基づいて位相差sを検出する位相差検出モジュールとして実現される。
 また本実施形態では、位相差検出部330(処理部210、プロセッサ)は、歪み補正後の第1の撮像画像ILc(X)から第1歪み情報と第2歪み情報とに基づいて疑似的な位相差画像(評価ベクトルVL’+VR’)を生成し、第2の撮像画像(評価ベクトルRL+RR)と疑似的な位相差画像(評価ベクトルVL’+VR’)との間のマッチング処理を行い、位相差sを検出する。
 ここで、疑似的な位相差画像(合成画像、模擬画像、模擬位相差画像)は、第1の撮像画像IL(x)と、第1の撮像画像IL(x)に疑似的に位相差を与えて位置をシフトさせた画像とを合成し、第2の撮像画像ILR’(x)を模擬した画像である。任意の位相差に相当する変数を与え、その変数の分だけ位置xをずらすことが、疑似的に(意図的に)位相差を与えることに相当する。本実施形態では、第1、第2歪み情報を用いて非線形スケールと線形スケールを相互に変換しながら疑似的な位相差画像を生成している。即ち、線形スケールでの第1の撮像画像ILc(X)を、それぞれdL-m、d+dRだけシフトさせた2つの画像ILc(X,δ)、ILc(X,δ,s)を生成し、対応位置tL、tRでの評価ベクトルVL、VRを取得し、これらを非線形スケールに戻して合成し、疑似的な位相差画像(VL’+VR’)を生成している。
 このように、第2の撮像画像ILR’(x)を模擬した疑似的な位相差画像を第1の撮像画像IL(x)から生成し、マッチング処理を行うことによって、2つの瞳による画像が重畳した第2の撮像画像ILR’(x)から位相差sを検出することが可能となる。
 また本実施形態では、位相差検出部330(処理部210、プロセッサ)は、非線形スケールでの着目位置xaと、着目位置xaを基準とする第1距離tとを設定する。位相差検出部330は、着目位置xaから第1距離tだけ離れた第1位置(xa+t)を第1、第2歪み情報に基づいて線形スケールに変換した第1、第2変換位置tL、tRを求め、第1距離tを第1、第2歪み情報に基づいて線形スケールに変換した第1、第2変換距離dL、dRを求める。位相差検出部330は、第1変換距離dLから第2距離mを減算した第3距離dL-mを求める。位相差検出部330は、歪み補正後の第1の撮像画像ILc(X)を第3距離dL-mずらした第1の疑似瞳画像ILc(X,δ)を生成し、歪み補正後の第1の撮像画像ILc(X)を第2変換距離dRずらした第2の疑似瞳画像ILc(X,δ,s)を生成する。そして位相差検出部330は、第1変換位置tLでの第1の疑似瞳画像ILc(X,δ)と、第2変換位置tRでの第2の疑似瞳画像ILc(X,δ,s)とを加算処理することで疑似的な位相差画像(評価ベクトルVL’+VR’)を生成する。位相差検出部330は、第1距離t及び第2距離mを変化させながらマッチング処理を行う。
 このような処理を行うことで疑似的な位相差画像を生成し、その疑似的な位相差画像と第2の撮像画像との間の相関を演算できる。そして、第1距離t及び第2距離mを変化させ、最も相関が高い第1距離t及び第2距離mを検出することで、マッチング処理を行うことができる。
 なお、図5では2つの瞳の光軸間距離dを考慮して、ILc(X-d)を第2変換距離dRずらして第2の疑似瞳画像ILc(X,δ,s)を生成している。これは、ILc(X)を第2変換距離dR及び光軸間距離dだけずらすことと等価である。即ち、第2の疑似瞳画像ILc(X,δ,s)を生成する際には、第2変換距離dRだけでなく、光軸間距離dなどの所定値(光学系の構造によって必然的に生じる所定値)を更にずらしてもよい。
 また本実施形態では、位相差検出部330(処理部210、プロセッサ)は、マッチング処理において相関が最も高い場合の第2変換距離dRと第3距離dL-mとの差分を位相差sとして検出する(上式(10))。また、位相差検出部330は、マッチング処理において相関が最も高い場合の第3距離dL-mを、第1の状態と第2の状態の間の被写体ブレによるブレ量δとして検出する。
 ここで、被写体ブレは、撮像タイミングが異なる2つの画像上において被写体の撮像位置が移動する(ぶれる)ことである。被写体ブレの要因は、被写体の移動(ブレ)、又は撮像系の移動(ブレ)、又はそれらの両方である。
 第2変換距離dRと第3距離dL-mは、変数である第1距離t、第2距離mと一意に対応している(上式(7)、(8))。またマッチング処理では、第1距離t、第2距離mが探索変数であり、相関が最も高い場合の第1距離t、第2距離mが決まる。これにより、相関が最も高い場合の第2変換距離dRと第3距離dL-mを求めることが可能であり、その差分を位相差sとして検出し、第3距離dL-mをブレ量δとして検出することができる。また、このようにしてブレ量δを特定できることによって、第1の状態と第2の状態の間の被写体ブレの影響を排除した正確な位相差sを検出することが可能となっている。
 また本実施形態では、画像出力部325(処理部210、プロセッサ)は、第1の撮像画像IL(x)に基づいて観察用の画像を出力する。
 本実施形態によれば、第1の撮像画像IL(x)と第2の撮像画像ILR’(x)に基づいてステレオ計測を行うと共に、第1の撮像画像IL(x)に基づいて観察用の画像を出力できる。これにより、観察用画像の撮影と、その被写体のステレオ計測とを、ほぼ同時に行うことが可能となる。これを動画像において行えば、ほぼリアルタイムな観察用画像の撮影とステレオ計測を実現できる。
 また本実施形態では、光学系15は、第1の開口と第2の開口とを有する固定マスク20と、固定マスク20に対して可動である可動マスク30と、を有する。第1の状態では、可動マスク30が、第1の開口を非遮蔽にすると共に第2の開口を遮蔽し、光学系15が、第1の開口を1つの瞳として被写体5を結像させる。第2の状態では、可動マスク30が、第1の開口及び第2の開口を非遮蔽にし、光学系15が、第1の開口及び第2の開口を2つの瞳として被写体5を結像させる。
 この光学系15の詳細は図7、図8で後述する。図7、図8では、第1の開口は絞り孔21に対応し、第2の開口は絞り孔22に対応する。ここでマスクとは、マスクに入射する光を遮蔽する部材や部品のことである。本実施形態の固定マスク20では、遮光部24が光を遮蔽すると共に絞り孔21、22が光を通過させる。また可動マスク30は、開口のない遮光部で構成されており、光を遮蔽する。
 本実施形態によれば、可動マスク30が、第1の開口を非遮蔽にすると共に第2の開口を遮蔽することで、1つの瞳により被写体を結像させる第1の状態を実現できる。また、可動マスク30が、第1の開口及び第2の開口を非遮蔽にすることで、2つの瞳により被写体を結像させる第2の状態を実現できる。なお、本発明の位相差検出手法を適用できる光学系15の構成はこれに限定されず、1つの瞳の状態(第1の状態)と2つの瞳の状態(第2の状態)とを切り替え可能なものであればよい。例えば、2つの瞳の各瞳にレンズを設けた2眼構成ではなく、2つの瞳に共通のレンズを設けた1眼構成であってもよい。
 4.固定マスク、可動マスク
 図7、図8に固定マスク20、可動マスク30の詳細な構成例を示す。図7、図8には、結像光学系10と固定マスク20と可動マスク30の断面図と、固定マスク20と可動マスク30を光軸方向に見た図(結像側から見た背面図)と、を示す。
 固定マスク20の左瞳の光路には絞り孔21が構成されており、右瞳の光路には絞り孔22が構成されている。絞り孔21、22は、遮光部24(遮光部材)に開けられており、いずれも開放状態(スルーホール)である。絞り孔21、22は、例えば回転軸35を中心として同一円上に並ぶ。光軸AX1、AX2は、それぞれ絞り孔21、22の中心(例えば円の中心)の中心を通る。遮光部24は、結像光学系10が収められた筐体を正面(又は背面)から見たときに筐体を塞ぐように設けられており、例えば光軸AX1、AX2に対して垂直に設けられた板状部材である。
 可動マスク30は、絞り孔が設けられていない遮光部である。遮光部は、光軸AX1、AX2に対して垂直な回転軸35に接続されており、例えば光軸AX1、AX2に対して垂直に設けられた板状部材である。遮光部の形状は、例えば棒状(棒の一端側が回転軸35に接続される)であるが、これに限定されず、図7及び図8の状態を実現できる形状であればよい。
 可動マスク30は、回転軸35を中心として光軸AX1、AX2に垂直な方向に所定の角度だけ回転する構成となっている。例えばピエゾ素子やモーター等によって回転運動を実現できる。図7の観察モードにおいては、可動マスク30は右眼側に所定の角度だけ回転し、固定マスク20の左瞳光路(絞り孔21)は開放状態となり、右瞳光路(絞り孔22)は遮光状態となる。図8のステレオ計測モードにおいては、可動マスク30は回転角0度に戻り、固定マスク20の左右瞳光路(絞り孔21、22)は開放状態となる。
 絞り孔21、22は、観察用画像の撮影に必要な被写界深度に対応したサイズの孔(例えば円形状の孔で、サイズは直径)である。図7、図8では、絞り孔21の面積φLと絞り孔22の面積φRが異なる場合を図示しているが、絞り孔21の面積φLと絞り孔22の面積φRは同じでもよい。異ならせる場合、例えば、絞り孔22は絞り孔21よりも小さいサイズの孔である。但し、図7、図8ではφL>φRとしているが、これに限らずφL<φRであっても構わない。
 なお、上記では可動マスク30を所定角度だけ軸回転することにより2つの状態を作る場合を説明したが、これに限定されない。例えば、スライド動作により可動マスク30を移動させて2つの状態を作るものでもよい。回転動作又はスライド動作は、例えばマグネット機構や、圧電機構などで実現可能であり、高速性や耐久性を考慮して適切なものを選択すればよい。
 5.内視鏡装置の詳細構成
 図9に、内視鏡装置(広義には、撮像装置)の詳細な構成例を示す。内視鏡装置は、スコープ部100(撮像部)、本体部200(制御装置)を含む。スコープ部100は、光学系15、撮像素子40、駆動部50を含む。光学系15は、結像光学系10、固定マスク20、可動マスク30を含む。本体部200は、処理部210(処理回路、処理装置)、表示部220(表示装置)、撮像処理部230(撮像処理回路)を含む。処理部210は、画像選択部310(画像フレーム選択部)、カラー画像生成部320(画像出力部)、位相差検出部330、可動マスク制御部340(モード制御部)、可動マスク位置検出部350、距離情報算出部360、3次元情報生成部370、歪み補正部380を含む。
 スコープ部100、カラー画像生成部320は、それぞれ図6の撮像部105、画像出力部325に対応する。なお、図6の記憶部410、操作部420は図9では図示を省略している。また、スコープ部100は、不図示の構成要素として、例えば処置具や照明装置(光源、レンズ等)等を含んでもよい。
 内視鏡装置としては、工業用、医療用のいわゆるビデオスコープ(撮像素子を内蔵した内視鏡装置)を想定できる。スコープ部100が湾曲可能に構成された軟性鏡、スコープ部100がスティック状に構成された硬性鏡、いずれにも本発明を適用できる。例えば工業用の軟性鏡の場合、本体部200及びスコープ部100は持ち運び可能なポータブル機器として構成されており、工業製品の製造検査やメンテナンス検査、建築物や配管のメンテナンス検査等に用いられる。
 駆動部50は、可動マスク制御部340からの制御信号に基づいて可動マスク30を駆動し、第1の状態(観察モード)と第2の状態(ステレオ計測モード)を切り替える。例えば、駆動部50はピエゾ素子やマグネット機構によるアクチュエータで構成される。
 撮像処理部230は、撮像素子40からの信号に対して撮像処理を行い、撮像画像(例えばベイヤ画像等)を出力する。例えば、相関二重サンプリング処理、ゲインコントロール処理、A/D変換処理、ガンマ補正、色補正、ノイズ低減等を行う。撮像処理部230は、例えばASIC等のディスクリートICで構成されてもよいし、或いは撮像素子40(センサチップ)や処理部210に内蔵されてもよい。
 表示部220は、スコープ部100が撮像した画像や、被写体5の3次元形状情報等を表示する。例えば、表示部220は、液晶ディスプレイやEL(Electro-Luminescence)ディスプレイ等により構成される。
 以下、内視鏡装置の動作を説明する。可動マスク制御部340は、駆動部50を制御して可動マスク30の位置を切り替える。可動マスク制御部340が可動マスク30を観察モードに設定した場合、被写体5からの反射光が左眼光路を介して撮像素子40に結像される。撮像処理部230は、撮像素子40に結像された画像の画素値を読み出し、A/D変換等を行って画像選択部310に画像データを出力する。
 画像選択部310は、可動マスク制御部340からの制御信号に基づいて可動マスク30の状態が観察モードであることを検知し、撮像画像IL(x)をカラー画像生成部320と歪み補正部380に出力する。歪み補正部380は、撮像画像IL(x)を線形スケールに座標変換し、その画像ILc(X)をカラー画像生成部320、位相差検出部330に出力する。カラー画像生成部320は、撮像画像IL(x)又は歪み補正後の画像ILc(X)に対してデモザイキング処理(ベイヤ画像からRGB画像を生成する処理)や各種画像処理を行い、3板化RGB原色画像を表示部220に出力する。表示部220は、そのカラー画像を表示する。
 可動マスク制御部340が可動マスク30をステレオ計測モードに設定した場合、被写体5からの反射光が左瞳光路及び右瞳光路を介し撮像素子40に同時に結像される。撮像処理部230は、撮像素子40に結像された画像の画素値を読み出し、A/D変換等を行って画像選択部310に画像データを出力する。
 画像選択部310は、可動マスク制御部340からの制御信号に基づいて可動マスク30の状態がステレオ計測モードであることを検知し、撮像画像ILR’(x)を位相差検出部330に出力する。位相差検出部330は、画像IL(x)と画像ILR’(x)をモノクロ画像に変換し、その変換後の画像に対して上述したマッチング処理を行い、画素毎に位相差(位相ずれ)を検出する。また位相差検出部330は、位相差検出が信頼できるか否かの判断を行い、信頼できないと判断した場合はエラーフラグを画素毎に出力する。
 撮像素子40が近赤外波長域までの感度を有するものであれば、被写体5への照明光を可視光又は近赤外光を選択照射すれば、観察用画像IL(x)及び計測用の瞳重畳画像ILR’(x)として可視画像又は近赤外画像を選択して得ることができる。色純度を求めるならば可視画像を取得するようにし、高感度で高SN比を求めるならば可視画像及び近赤外画像を同時取得するようにすれば良い。また特殊用途の画像として近赤外画像のみの画像を取得するようにしても良い。
 位相差検出部330は、検出した位相差情報とエラーフラグを距離情報算出部360に出力する。距離情報算出部360は、被写体5の距離情報を各画素について計算し、その距離情報を3次元情報生成部370に出力する。例えば、三角測量法で位相差から深度(Z値)を距離情報として求める。エラーフラグが立っている画素は、例えば被写体5の平坦部(エッジ成分が少ない領域)と見なして、例えば周囲の画素の距離情報から補間してもよい。3次元情報生成部370は、距離情報(又は、距離情報とカラー画像生成部320からのRGB画像)から3次元情報を生成する。3次元情報は、例えばZ値マップ(距離マップ)やポリゴン、疑似的な3次元表示画像(例えばシェーディング等による形状強調)等、種々の情報を想定できる。3次元情報生成部370は、生成した3次元画像や3次元データ、或いはそれらと観察用画像とを重畳した表示画像などを必要に応じ生成し、表示部220へ出力する。表示部220は、その3次元情報を表示する。
 可動マスク位置検出部350は、ステレオ計測に用いる画像IL(x)、ILR’(x)を使って、可動マスク30が観察モードの位置にあるかステレオ計測モードの位置にあるかを検出する。そして、可動マスク30の状態がモードに一致していないと判断した場合には、可動マスク制御部340に位置エラーフラグを出力する。可動マスク制御部340は、位置エラーフラグを受けて、可動マスク30を正しい状態(画像選択に対応した状態)に修正する。修正動作をしても正しい状態にならない場合は、何らかの故障が発生したと判断して全体の機能を停止させる。
 可動マスク30が観察モードの位置にあるかステレオ計測モードの位置にあるかは、例えば以下の第1~第4の手法で判断できる。第1~第4の手法のうち、1つの手法を用いてもよいし、複数の手法を用いてもよい。
 第1の手法では、画像の所定領域内における位相差sの平均が、マイナス値を示すか否かを判断する。観察モードにおいて、可動マスク30が既定に反して左眼光路を遮断してしまった場合を想定している。この場合、参照する左瞳画像IL(x)が右瞳画像IR(x)となるため、重畳画像ILR’(x)の成分画像IL’(x)、IR’(x)に対して位置関係が逆になり、位相差sがマイナス値となる。
 第2の手法では、位相差sの検出時のマッチング評価値が所定以下の値を示すか否かを判断する。観察モードにおいて、左眼又は右眼の光路を不完全に遮断してしまった場合を想定している。この場合、プロファイルが異なる二重画像どうしのマッチング評価になるので、本来ならマッチングしている位相差sにおいてもマッチング評価値が低いままとなる。
 第3の手法では、画像の所定領域内における位相差sの平均が、所定値以下(ゼロに近い値)を示すか否かを判断する。ステレオ計測モードにおいて、左眼又は右眼の光路を遮断してしまった場合を想定している。この場合、全撮像領域において位相差sをもたない画像になるので、位相差sがほぼゼロとなる。
 第4の手法では、観察用画像IL(x)と計測用の重畳画像ILR’(x)との明るさ比率が、所定範囲を満たしているか否かを判断する。可動マスク30が正常に動作している場合、それらの画像の明るさ比率はほぼ一定となる。
 6.モード切り替えシーケンス
 図10に、動画撮影における動作の第1のシーケンス(第1のタイミングチャート)を示す。
 図10に示すように、可動マスク30の状態の切り替えと撮像タイミングと撮像画像の選択は連動している。A1、A2に示すように、観察モードのマスク状態とステレオ計測モードのマスク状態を交互に繰り返す。A3、A4に示すように、各マスク状態で1回ずつ撮像が行われる。A5に示すように、観察モードのマスク状態にあるフレームfn(nは整数)で撮像素子40により撮像された画像は、観察用画像IL(x)として選択される。A6に示すように、ステレオ計測モードのマスク状態にあるフレームfn+1で撮像素子40により撮像された画像は、計測用画像ILR’(x)として選択される。
 このように観察モードとステレオ計測モードを交互に繰り返すことにより、ほぼリアルタイムに近い状態で観察用画像IL(x)と計測用画像ILR’(x)を連続的に得ることができるので、被写体5に動きがある場合も観察と計測を両方実現することができる。観察用画像IL(x)を表示しつつ、そこに必要に応じて計測された情報を重ねて合わせて表示すれば、ユーザに対して目視検査と定量検査を同時に提供することができ、有用な情報提供が可能となる。
 計測処理は、観察用画像IL(x)とそれに続く計測用画像ILR’(x)、又は計測用画像ILR’(x)とそれに続く観察用画像IL(x)を用いて行われる。例えば、A7に示すように、フレームfn+1における撮影期間の後の計測期間において、フレームfnの観察用画像IL(x)とフレームfn+1の計測用画像ILR’(x)により計測処理Mn+1を実行する。或いは、A8に示すように、フレームfn+2において観察用画像IL(x)が撮影される。そしてA9に示すように、フレームfn+2における撮影期間の後の計測期間において、フレームfn+1の計測用画像ILR’(x)とfn+2の観察用画像IL(x)により計測処理Mn+2を実行する。このようにして、各フレームにおいてリアルタイムに近い状態で計測情報を得ることができる。
 図11に、動画撮影における動作の第2のシーケンス(第2のタイミングチャート)を示す。
 図11のB1に示すように、1つのフレームで観察モードのマスク状態に設定し、B2に示すように、それに続く複数のフレームでステレオ計測モードのマスク状態に設定する。なお、図11では複数のフレームが5フレームである場合を例に説明するが、これに限定されない。B3に示すように、観察モードのマスク状態で1回撮影され、B4に示すように、そのフレームfnで撮影された画像は観察用画像IL(x)として選択される。B5に示すように、ステレオ計測モードのマスク状態で5回撮影され、B6に示すように、そのフレームfn+1~fn+5で撮影された各画像は計測用画像ILR’(x)として選択される。
 フレームfn+1~fn+5の各フレームをfn+i(iは1≦i≦5の整数)とする。フレームfn+iにおける撮影期間の後の計測期間において、フレームfnの観察用画像IL(x)とフレームfn+iの計測用画像ILR’(x)とにより計測処理Mn+iを実行する。フレームfn+iにおける撮像素子40の任意画素(座標)Xの位相差をsi(X)とし、下式(11)により位相差s(X)を求める。jは、1つの観察用画像IL(x)に対して撮影する計測用画像ILR’(x)の数であり、図11ではj=5である。
Figure JPOXMLDOC01-appb-M000006
 このように、位相差si(X)をフレーム間(fn+1~fn+5)にて積算平均すれば、よりばらつきの少ない高精度な位相差s(X)が得られる。
 7.第2構成例
 図12、図13に、内視鏡装置の撮像部の第2基本構成例を示し、図14、図15に、固定マスク20、可動マスク30の第2の詳細な構成例を示す。図12、図13には、撮像部を横から見た(光軸を含む平面での)断面図と、撮像素子上の結像の光量(又は撮像素子に撮像された画像の画素値)と位置xの関係と、を示す。図14、図15には、結像光学系10と固定マスク20と可動マスク30の断面図と、固定マスク20と可動マスク30を光軸方向に見た図(結像側から見た背面図)と、を示す。なお、図1、図2、図7、図8で説明した構成要素と同一の構成要素については、同一の符号を付し、適宜説明を省略する。
 図12~図15では、結像光学系10が単眼の光学系となっている。この単眼の光学系は、1又は複数のレンズで構成される。固定マスク20の絞り孔21、22は、単眼の光学系の1つの瞳を左瞳及び右瞳に分割する。絞り孔21、22の中心(例えば円状の絞り孔の場合、その円の中心)を通り、結像光学系10の光軸AXCに平行な線を中心線IC1、IC2とする。例えば、光軸AXCと中心線IC1、IC2の距離は等しい。固定マスク20は、結像光学系10の瞳位置に設けられる。図12、図14の観察モードにおいて、可動マスク30は絞り孔22を遮光する位置に設定される。また、図13、図15のステレオ計測モードにおいて、可動マスク30は絞り孔21、22を開放する位置に設定される。
 この構成例では、絞り孔21の面積φLと絞り孔22の面積φRが異なる。例えば、絞り孔22は絞り孔21よりも小さいサイズの孔である。図12~図15ではφL>φRとしているが、これに限らずφL<φRであっても構わない。
 単眼の光学系では、フォーカスが合っている被写体位置では位相差sがゼロになり、フォーカスが前側にずれている場合と後側にずれている場合とで位相差sの符号が異なる(左瞳画像IL’と右瞳画像IR’のずれ方向が逆になる)。本実施形態では、左瞳画像IL’と右瞳画像IR’の明るさを異ならせることにより、左瞳画像IL’に対して右瞳画像IR’がどちらにずれているかが重畳画像から判別できるようになる。
 なお、図1、図2、図7、図8で説明したステレオ光学系では、フォーカスの状態に関わらず位相差sの符号は同じ(左瞳画像IL’と右瞳画像IR’のずれ方向は同じ)であるため、左瞳画像IL’と右瞳画像IR’の明るさを異ならせなくてもよい。
 観察モードで撮影される画像IL(x)とステレオ計測モードで撮影される画像ILR’(x)とから位相差s(x)を検出する手法は、図5で説明した手法と同じである。また、内視鏡装置も図6や図9と同様に構成できる。なお、左右瞳は、結像光学系10の光軸AXCを共有するので、光軸間距離はd=0である。ステレオ計測における基線長は、中心線IC1、IC2の間の距離d’である。
 以上、本発明を適用した実施形態およびその変形例について説明したが、本発明は、各実施形態やその変形例そのままに限定されるものではなく、実施段階では、発明の要旨を逸脱しない範囲内で構成要素を変形して具体化することができる。また、上記した各実施形態や変形例に開示されている複数の構成要素を適宜組み合わせることによって、種々の発明を形成することができる。例えば、各実施形態や変形例に記載した全構成要素からいくつかの構成要素を削除してもよい。さらに、異なる実施の形態や変形例で説明した構成要素を適宜組み合わせてもよい。このように、発明の主旨を逸脱しない範囲内において種々の変形や応用が可能である。また、明細書又は図面において、少なくとも一度、より広義または同義な異なる用語と共に記載された用語は、明細書又は図面のいかなる箇所においても、その異なる用語に置き換えることができる。また、本実施形態で説明した内視鏡装置(撮像装置)の動作は、撮像方法(撮像装置の作動方法、内視鏡装置の作動方法)として実行することが可能である。
5 被写体、10,11,12 結像光学系、15 光学系、
20 固定マスク、21,22 絞り孔、24 遮光部、
30 可動マスク、35 回転軸、40 撮像素子、
50 駆動部、100 スコープ部、105 撮像部、
200 本体部、210 処理部、220 表示部、
230 撮像処理部、310 画像選択部、
320 カラー画像生成部、325 画像出力部、
330 位相差検出部、340 可動マスク制御部、
350 可動マスク位置検出部、360 距離情報算出部、
370 3次元情報生成部、380 歪み補正部、
410 記憶部、420 操作部、
AX1,AX2,AXC 光軸、dL 第1変換距離、
dR 第2変換距離、IL 第1の撮像画像(左瞳画像)、
ILc 歪み補正後の第1の撮像画像、
ILR’ 第2の撮像画像(二重画像)、
ILc 第1の撮像画像、ILc 第2の疑似瞳画像、
ILc 画像、ILc 左瞳画像、ILc 第1の疑似瞳画像、
m 第2距離、s 位相差、t 第1距離、
tL 第1変換位置、tR 第2変換位置、
x 非線形スケールの座標、X 線形スケールの座標、
xa 着目位置、δ ブレ量、ξ 係数

Claims (9)

  1.  撮像素子と、
     1つの瞳により被写体を前記撮像素子に結像させる第1の状態と、2つの瞳により前記被写体を前記撮像素子に結像させる第2の状態とを切り替える光学系と、
     前記第1の状態において前記撮像素子により撮像された第1の撮像画像と、前記第2の状態において前記撮像素子により撮像された第2の撮像画像とに基づいて、前記2つの瞳の一方の瞳による結像と他方の瞳による結像との間の位相差を検出する処理部と、
     を含み、
     前記第2の状態において、前記一方の瞳による結像と前記他方の瞳による結像とは少なくとも一部において重なり、
     前記処理部は、
     前記第1の撮像画像に対して歪み補正を行い、前記歪み補正後の前記第1の撮像画像と、前記一方の瞳による結像の歪みを表す第1歪み情報と、前記他方の瞳による結像の歪みを表す第2歪み情報と、前記第2の撮像画像とに基づいて前記位相差を検出することを特徴とする撮像装置。
  2.  請求項1において、
     前記処理部は、
     前記歪み補正後の前記第1の撮像画像から前記第1歪み情報と前記第2歪み情報とに基づいて疑似的な位相差画像を生成し、前記第2の撮像画像と前記疑似的な位相差画像との間のマッチング処理を行い、前記位相差を検出することを特徴とする撮像装置。
  3.  請求項2において、
     前記処理部は、
     非線形スケールでの着目位置と、前記着目位置を基準とする第1距離とを設定し、
     前記着目位置から前記第1距離だけ離れた第1位置を前記第1、第2歪み情報に基づいて線形スケールに変換した第1、第2変換位置を求め、前記第1距離を前記第1、第2歪み情報に基づいて前記線形スケールに変換した第1、第2変換距離を求め、
     前記第1変換距離から第2距離を減算した第3距離を求め、
     前記歪み補正後の前記第1の撮像画像を前記第3距離ずらした第1の疑似瞳画像を生成し、前記歪み補正後の前記第1の撮像画像を前記第2変換距離ずらした第2の疑似瞳画像を生成し、
     前記第1変換位置での前記第1の疑似瞳画像と、前記第2変換位置での前記第2の疑似瞳画像とを加算処理することで前記疑似的な位相差画像を生成し、
     前記第1距離及び前記第2距離を変化させながら前記マッチング処理を行うことを特徴とする撮像装置。
  4.  請求項3において、
     前記処理部は、
     前記マッチング処理において相関が最も高い場合の前記第2変換距離と前記第3距離との差分を前記位相差として検出することを特徴とする撮像装置。
  5.  請求項3又は4において、
     前記処理部は、
     前記マッチング処理において相関が最も高い場合の前記第3距離を、前記第1の状態と前記第2の状態の間の被写体ブレによるブレ量として検出することを特徴とする撮像装置。
  6.  請求項1乃至5のいずれかにおいて、
     前記処理部は、
     前記第1の撮像画像に基づいて観察用の画像を出力することを特徴とする撮像装置。
  7.  請求項1乃至6のいずれかにおいて、
     前記光学系は、
     第1の開口と第2の開口とを有する固定マスクと、
     前記固定マスクに対して可動である可動マスクと、
     を有し、
     前記第1の状態では、前記可動マスクが、前記第1の開口を非遮蔽にすると共に前記第2の開口を遮蔽し、前記光学系が、前記第1の開口を前記1つの瞳として前記被写体を結像させ、
     前記第2の状態では、前記可動マスクが、前記第1の開口及び前記第2の開口を非遮蔽にし、前記光学系が、前記第1の開口及び前記第2の開口を前記2つの瞳として前記被写体を結像させることを特徴とする撮像装置。
  8.  請求項1乃至7のいずれかに記載された撮像装置を含むことを特徴とする内視鏡装置。
  9.  光学系が1つの瞳により被写体を撮像素子に結像させる第1の状態と、前記光学系が、2つの瞳の一方の瞳による結像と他方の瞳による結像とが少なくとも一部において重なるように前記被写体を前記撮像素子に結像させる第2の状態とを切り替え、
     前記第1の状態において前記撮像素子により撮像された第1の撮像画像に対して歪み補正を行い、
     前記歪み補正後の前記第1の撮像画像と、前記一方の瞳による結像の歪み量である第1歪み量と、前記他方の瞳による結像の歪み量である第2歪み量と、前記第2の状態において前記撮像素子により撮像された第2の撮像画像とに基づいて、前記一方の瞳による結像と前記他方の瞳による結像との間の位相差を検出することを特徴とする撮像方法。
PCT/JP2016/067078 2016-06-08 2016-06-08 撮像装置、内視鏡装置及び撮像方法 WO2017212577A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2016/067078 WO2017212577A1 (ja) 2016-06-08 2016-06-08 撮像装置、内視鏡装置及び撮像方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2016/067078 WO2017212577A1 (ja) 2016-06-08 2016-06-08 撮像装置、内視鏡装置及び撮像方法

Publications (1)

Publication Number Publication Date
WO2017212577A1 true WO2017212577A1 (ja) 2017-12-14

Family

ID=60577774

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/067078 WO2017212577A1 (ja) 2016-06-08 2016-06-08 撮像装置、内視鏡装置及び撮像方法

Country Status (1)

Country Link
WO (1) WO2017212577A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014028008A (ja) * 2012-07-31 2014-02-13 Olympus Corp ステレオ計測装置およびステレオ計測方法
JP2014038151A (ja) * 2012-08-13 2014-02-27 Olympus Corp 撮像装置及び位相差検出方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014028008A (ja) * 2012-07-31 2014-02-13 Olympus Corp ステレオ計測装置およびステレオ計測方法
JP2014038151A (ja) * 2012-08-13 2014-02-27 Olympus Corp 撮像装置及び位相差検出方法

Similar Documents

Publication Publication Date Title
US11024082B2 (en) Pass-through display of captured imagery
JP5738606B2 (ja) 撮像装置
WO2011078244A1 (ja) 多眼撮像装置および多眼撮像方法
WO2012032914A1 (ja) 画像処理装置、内視鏡装置、画像処理プログラム及び画像処理方法
WO2017168986A1 (ja) 制御装置、内視鏡撮像装置、制御方法、プログラムおよび内視鏡システム
EP2577977A1 (en) Two sensor imaging systems
US9282881B2 (en) 3D image shooting apparatus and endoscope
JP7027064B2 (ja) 画像処理装置および画像処理方法、撮像装置、プログラム
WO2013069292A1 (ja) 画ブレ補正装置
US20180092516A1 (en) Imaging device, endoscope apparatus, and imaging method
US10542875B2 (en) Imaging device, endoscope apparatus, and imaging method
JP2011149931A (ja) 距離画像取得装置
JP2003134375A (ja) 画像撮影システム
WO2016194178A1 (ja) 撮像装置、内視鏡装置及び撮像方法
JP2010181826A (ja) 立体画像形成装置
JP2015231498A (ja) 内視鏡装置
JP2008298480A (ja) ステレオ透視装置およびそれを用いたステレオ観察方法
KR20110073045A (ko) 거리 적응 3차원 카메라
WO2017212577A1 (ja) 撮像装置、内視鏡装置及び撮像方法
JP2010272957A (ja) 画像補正装置及びそのプログラム
JP2013044893A (ja) 複眼撮像装置及び距離画像取得装置
JP2014178781A (ja) 画像処理装置、顕微鏡システム及び画像処理方法
JP5499363B2 (ja) 画像入力装置、画像入力方法及び画像入力プログラム
US20220273161A1 (en) Surgical image-capturing system, signal processing device, and signal processing method
JP2013117548A (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: 16904612

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16904612

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP