WO2024004316A1 - 撮像装置、被写体奥行き推定方法、およびプログラム - Google Patents

撮像装置、被写体奥行き推定方法、およびプログラム Download PDF

Info

Publication number
WO2024004316A1
WO2024004316A1 PCT/JP2023/014410 JP2023014410W WO2024004316A1 WO 2024004316 A1 WO2024004316 A1 WO 2024004316A1 JP 2023014410 W JP2023014410 W JP 2023014410W WO 2024004316 A1 WO2024004316 A1 WO 2024004316A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
mask
masks
subject
edge
Prior art date
Application number
PCT/JP2023/014410
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 株式会社ジャパンディスプレイ
Publication of WO2024004316A1 publication Critical patent/WO2024004316A1/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
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B11/00Filters or other obturators specially adapted for photographic purposes
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B9/00Exposure-making shutters; Diaphragms
    • G03B9/08Shutters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/571Depth or shape recovery from multiple images from focus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/55Optical parts specially adapted for electronic image sensors; Mounting thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Definitions

  • the present invention relates to an imaging device, a subject depth estimation method, and a program.
  • DFD Depth From Defocus
  • DFD technology is a technology for estimating the distance from the optical system of an imaging device to a subject, that is, the depth or depth of a subject, based on the degree of blurring of edges in an image obtained by imaging.
  • Non-Patent Document 1 The DFD technology is described in, for example, Non-Patent Document 1.
  • two masks are prepared in which the positions of the apertures through which light passes are different from each other.
  • encoded imaging is performed for each of the two masks, in which the mask is placed in the light incident area of the optical system and the same subject is imaged.
  • the two captured images obtained by the encoded imaging are subjected to decoding processing based on a point spread function specific to each mask, and the depth of the subject is estimated.
  • the point spread function is generally called PSF (Point Spread Function), and is also called a blur function, blur spread function, point spread function, etc.
  • DFD technology is still under development, and there is still a lot of room for improvement in practicality of DFD technology. Due to the above circumstances, a more practical DFD technology is desired.
  • a typical embodiment of the present invention includes an optical system into which light from a subject is incident, an image sensor that receives the light passing through the optical system, and an incident area for light that enters the optical system from the subject.
  • a mask installation unit that creates a state in which any one of a plurality of masks prepared in advance is installed and a state in which none of the masks is installed;
  • an arithmetic control unit that outputs a signal for controlling a mask installation unit and the image sensor, and obtains an unmasked image of the subject and a masked image of the subject;
  • the arithmetic control unit a maskless imaging process for obtaining the maskless captured image by imaging the subject without the mask; and a determination process for determining a typical edge direction based on an edge image included in the maskless captured image.
  • a typical embodiment of the present invention obtains an image without a mask by imaging a subject without a mask, and determines a typical edge direction based on an edge image included in the image without a mask. , from among a plurality of masks prepared in advance, select a combination of the masks that has the relatively highest depth estimation accuracy of an object corresponding to an image representing an edge in the same direction as the representative edge direction; A plurality of captured images with masks are obtained by imaging the subject using each of the masks included in the combination of the masks, and for the plurality of captured images with masks, a This is a subject depth estimation method that obtains information representing the depth of the subject at a plurality of positions by performing decoding based on a point spread function.
  • a computer performs maskless imaging processing to obtain an unmasked image by imaging a subject without a mask, and an edge image included in the unmasked image.
  • FIG. 2 is a diagram showing an example of an imaging system and an arithmetic control device used in the subject depth estimation method according to the first embodiment.
  • FIG. 2 is a flow diagram showing an example of a process flow according to the subject depth estimation method according to the first embodiment. It is a figure showing an example of a plurality of masks.
  • FIG. 7 is a diagram showing the correspondence between mask combinations and edge directions with high depth estimation accuracy.
  • FIG. 3 is a diagram for explaining a first method of determining a representative edge direction.
  • FIG. 7 is a diagram for explaining a second method of determining a representative edge direction.
  • FIG. 7 is a diagram for explaining a third method of determining a representative edge direction.
  • FIG. 3 is a diagram showing an example of a blurred edge image.
  • FIG. 1 is a diagram showing an example of a blurred edge image.
  • FIG. 3 is a diagram showing an example of a sharp edge image.
  • 3 is a diagram illustrating an example of the configuration of an imaging device according to a second embodiment.
  • FIG. FIG. 3 is a diagram showing an example of a liquid crystal mask section.
  • 7 is a diagram illustrating an example of a configuration of an arithmetic control unit according to a second embodiment.
  • FIG. 7 is a flow diagram showing an example of the flow of operation of the imaging device according to Embodiment 2.
  • FIG. FIG. 3 is a diagram for explaining the flow from maskless imaging processing to mask selection processing.
  • 7 is a diagram illustrating an example of a combination of multiple types of masks according to Modification 1.
  • FIG. 7 is a diagram showing an example of a combination of masks according to Modification 2.
  • FIG. FIG. 3 is a diagram illustrating an example of multiple masks used in DFD technology.
  • the aspect of blur (hereinafter referred to as blur) in a captured image generally depends on a point spread function determined by the optical system of the imaging device, the shape of the light incident area of the optical system, etc.
  • the point spread function is determined for each mask. Capturing an image of a subject with an imaging device equipped with a mask is called coded imaging. When a subject is coded and imaged, a blurred image is obtained based on a point spread function specific to the mask used.
  • FIG. 17 is a diagram showing an example of multiple masks used in DFD technology.
  • Non-Patent Document 1 describes a DFD technique using encoded imaging using two masks Z1 and Z2 shown in FIG.
  • the black areas are areas that block the light that enters the optical system
  • the white areas are the areas that are openings that allow the light that enters the optical system to pass.
  • the two masks Z1 and Z2 shown in FIG. 17 have different geometric patterns of openings through which light can pass.
  • an image with low depth estimation accuracy is an edge image representing an edge along a direction close to the direction of displacement of the aperture of the mask used.
  • the edge image representing the edge along the direction of misalignment of the apertures of the two masks used in the DFD technology has almost no blur between the image captured by the first mask and the image captured by the second mask. It does not change.
  • depth information may not be extracted accurately even if decoding processing is performed by deconvolution based on a point spread function specific to each mask.
  • the edge direction of a representative edge that is of interest among the edges in the captured image is the same as or close to the edge direction where there is little difference in blurring, it corresponds to the edge image that is considered important. It is not possible to estimate the depth of an object with high accuracy.
  • Embodiment 1 A subject depth estimation method according to Embodiment 1 of the present application will be described.
  • the subject depth estimation method according to Embodiment 1 of the present application obtains a mask-free captured image by capturing a subject without a mask, and determines a typical edge direction based on an edge image included in the mask-free captured image. Then, from among multiple masks prepared in advance, a combination of masks with the highest relative accuracy in estimating the depth of an object corresponding to an image representing an edge in the same direction as the representative edge direction is selected.
  • a plurality of captured images with multiple masks are obtained by imaging the subject using each mask included in the mask combination, and the captured images with multiple masks are decoded based on a point spread function specific to the selected mask.
  • This is a subject depth estimation method that obtains information representing the depth of a subject at a plurality of positions. Details of this subject depth estimation method are as follows.
  • FIG. 1 is a diagram illustrating an example of an imaging system and an arithmetic control device used in the subject depth estimation method according to the first embodiment.
  • the imaging system 80 includes an optical system 81, an imaging element 82, and a mask M.
  • the optical system 81 is mainly composed of lenses and the like, and collects the light L coming from the subject 90 and forms an image on the light receiving surface of the image sensor 82 .
  • the image sensor 82 is an electronic component that performs photoelectric conversion, photoelectrically converts the brightness and darkness of the image formed on the light-receiving surface into an amount of charge, instantaneously captures the photoelectrically converted electric signal, and converts the captured image into an image. obtain.
  • the mask M is a so-called optical filter that allows a part of the light L incident on the optical system 81 to pass through and blocks the other part of the light L.
  • a mask is also called a coded aperture, coded aperture, aperture, etc.
  • the arithmetic and control device 91 is connected to the image sensor 82 .
  • the arithmetic and control unit 91 performs various processes on the captured image obtained based on the electrical signal from the image sensor 82 and obtains various information.
  • Arithmetic control device 91 is, for example, a computer.
  • FIG. 2 is a flow diagram illustrating an example of the process flow according to the subject depth estimation method according to the first embodiment.
  • step H1 a plurality of masks are prepared. That is, for each of a plurality of specific edge directions (hereinafter also referred to as specific edge directions), a combination of masks M can be obtained that provides a high accuracy in estimating the depth of an object corresponding to an edge image representing an edge in that specific edge direction. , a plurality of masks M are prepared.
  • the mask M has a main opening as a region through which the light L can pass, relative to the incident region of the light L that enters the optical system 81 used for imaging the subject 90 from the subject 90.
  • the plurality of masks M are two or more masks in which the positions of the above-mentioned main openings are different from each other.
  • the plurality of masks M prepared are, for example, four masks M1 to M4 shown in FIG.
  • the masks M1 to M4 have a configuration in which circular light-blocking regions are formed at the upper right, upper left, lower left, and lower right of the shielding plates that shield the light incident region of the optical system 81, respectively. ing. Details of examples of the plurality of masks to be prepared will be described later.
  • step H2 maskless imaging of the subject is performed. That is, the subject 90 is imaged using the optical system 81 and the image sensor 82 without the mask installed, and a mask-free image P0 is obtained.
  • the optical system 81 or the image sensor 82 for maskless imaging is controlled by, for example, an arithmetic control device 91.
  • a typical edge direction in the mask-free captured image is determined. That is, a typical edge direction (hereinafter also referred to as a representative edge direction) that is considered to be important in the unmasked captured image P0 is determined based on the edge image included in the unmasked captured image P0.
  • the representative edge direction is determined, for example, by selecting from a plurality of predetermined specific edge directions. Details of an example of a method for determining the representative edge direction will be described later.
  • the representative edge direction is determined by, for example, the arithmetic and control unit 91.
  • step H4 a combination of masks to be used for masked imaging is selected. That is, from among a plurality of masks M prepared in advance, a combination of masks M that has the highest relative depth estimation accuracy of an object corresponding to an edge image representing an edge in the same direction as the determined representative edge direction is selected. Ru. In other words, among the combinations of masks M, a combination of masks M in which a specific edge direction with high depth estimation accuracy matches or approximates the determined representative edge direction is used for encoded imaging. is selected as a combination of masks M.
  • the combination of masks M that has the relatively highest depth estimation accuracy of an object corresponding to an image representing an edge in the same direction as the representative edge direction is a combination in which the direction in which the respective main openings or light shielding areas are shifted is representative. Two or more masks orthogonal to the edge direction.
  • step H5 masked imaging of the subject is performed using the first mask. That is, with the first mask included in the selected mask combination installed, masked imaging of the same subject 90 using the optical system 81 and image sensor 82, so-called encoded imaging, is performed. By performing this imaging with a mask, a first captured image P1 with a mask is obtained.
  • step H6 masked imaging of the subject is performed using the second mask. That is, with the second mask included in the selected mask combination installed, masked imaging of the same subject 90 using the optical system 81 and image sensor 82, so-called encoded imaging, is performed. By performing this masked imaging, a second masked captured image P2 is obtained.
  • the optical system 81 or the image sensor 82 for imaging with a mask is controlled by, for example, an arithmetic control device 91.
  • step H7 decoding processing of the captured image with a mask is performed. That is, the captured image P1 with the first mask and the captured image P2 with the second mask are decoded by deconvolution based on a point spread function unique to each of the two masks used. By performing this decoding process, a decoded image with improved blurring of the subject is obtained, and information from which the depth of the object corresponding to each position of the decoded image can be estimated is obtained. Note that the decoding process is performed by, for example, the arithmetic and control unit 91.
  • the point spread function specific to the mask used depends on the geometric pattern of the aperture or light-shielding area of the mask, the configuration of the optical system, the configuration of the image sensor, and the mutual positional relationship of the mask, optical system, and image sensor. Determined. Further, the decoding process in step H7 may be, for example, the decoding process described in known documents in the field of encoded imaging such as Non-Patent Document 1.
  • step H8 the depth of the object corresponding to each position of the decoded image is estimated. That is, the estimated depth of the object corresponding to each position in the decoded image obtained in step H7 is obtained based on the information obtained in step H7. A depth map of the subject may then be generated based on the decoded image and the estimated depth of the object corresponding to each position in the decoded image. Note that the derivation of the estimated depth value or the generation of the depth map is performed by, for example, the arithmetic and control unit 91.
  • the incident area of light coming from the subject and entering the optical system (hereinafter also referred to as the light incident area) is a circular area having an approximately perfect circular outline.
  • FIG. 3 is a diagram showing an example of multiple masks.
  • the plurality of masks prepared are, for example, masks M1 to M4 shown in FIG. 3.
  • Masks M1 to M4 shown in FIG. 3 are enlarged versions of the masks M1 to M4 shown in FIG. Note that the masks M1 to M4 indicate mask patterns when viewed in the direction in which light from the subject is incident.
  • the masks M1 to M4 have circular light-shielding regions N1 that shield light at the upper right, upper left, lower left, and lower right, respectively, with respect to the shielding body that shields the light incident region of the optical system 81.
  • ⁇ N4 is formed.
  • the mask M1 is a mask having a pattern that blocks light only in a circular region inscribed in the upper right quarter of the circular region that is the light incident region, and transmits light in other regions. That is, the mask M1 has a circular light-blocking area N1 at the upper right of the light incident area.
  • the mask M2 is a mask having a pattern that blocks light only in a circular region inscribed in the upper left quarter of the circular region that is the light incident region, and transmits light in other regions. That is, the mask M2 has a circular light-blocking area N2 at the upper left of the light incident area.
  • the mask M3 is a mask having a pattern that blocks light only in a circular region inscribed in the lower left quarter of the circular region that is the light incident region, and transmits light in other regions. That is, the mask M3 has a circular light shielding area N3 at the lower left of the light incident area.
  • the mask M4 is a mask having a pattern that blocks light only in a circular area inscribed in the lower right quarter of the circular area that is the light incident area, and transmits light in other areas. . That is, the mask M4 has a circular light-blocking area N4 at the lower right of the light incident area.
  • FIG. 4 is a diagram showing the correspondence between mask combinations and edge directions with high depth estimation accuracy.
  • the direction of deviation of the light-shielding regions in each mask is in the lateral direction. Therefore, in the case of the combination of the mask M1 and the mask M2, the edge direction in which the degree of blurring is difficult to change in the captured image with the mask is the horizontal direction. On the other hand, in a captured image with a mask, the edge direction in which the degree of blur tends to change is the vertical direction that is perpendicular to the horizontal direction, which is the shift direction. That is, in the case of the combination of masks M1 and M2, the edge direction in which the depth information of the subject is likely to appear and the depth estimation accuracy is high is the vertical direction.
  • the direction of deviation of the light-shielding regions in each mask is a direction diagonally 45 degrees to the right.
  • the 45-degree right diagonal direction is the direction of a straight line obtained by rotating a vertical straight line 45 degrees clockwise. Therefore, in the case of the combination of the mask M1 and the mask M3, the edge direction in which the degree of blurring is difficult to change in the captured image with the mask is the direction diagonally 45 degrees to the right.
  • the edge direction in which the degree of blur in a captured image with a mask tends to change is the direction diagonally left at 45 degrees, which is orthogonal to the direction diagonally diagonally right at 45 degrees, which is the above-mentioned shift direction.
  • the diagonal direction of 45 degrees to the left is the direction of a straight line obtained by rotating a vertical straight line counterclockwise by 45 degrees. That is, in the case of the combination of masks M1 and M3, the edge direction in which the depth information of the object is difficult to appear and the depth estimation accuracy is high is the direction diagonally at 45 degrees to the left.
  • the edge direction with high depth estimation accuracy is the horizontal direction.
  • the edge direction with high depth estimation accuracy is the direction diagonally 45 degrees to the right.
  • Example of method for determining representative edge direction An example of a method for determining a representative edge direction in a captured image without a mask will be described. Examples of methods for determining the representative edge direction include the following method.
  • the first method is to determine a representative edge direction based on a detected edge image of a specific object.
  • FIG. 5 is a diagram for explaining the first method of determining the representative edge direction.
  • the target object is set in advance.
  • the objects of interest include, for example, automobiles, motorcycles, bicycles, wheelchairs, humans, dogs, utility poles, traffic lights, and the like.
  • the set target object A1 which is the set target object, is searched for in the mask-free captured image P0.
  • a mask-free captured image P0 is an example of an image obtained by capturing an image of the front from a running car, and is an example when a car is detected as the setting object A1.
  • a detection method using template matching, a detection method using AI that is artificial intelligence, etc. is used to search for the setting target object A1.
  • the representative edge direction is determined based on the edge image corresponding to the detected edge of the setting object A1.
  • a plurality of partial image regions GB are set in the mask-free captured image P0.
  • the plurality of partial image regions GB are set by dividing the entire image region of the mask-free captured image P0 into a grid pattern, that is, a matrix pattern.
  • the partial image area GB is, for example, an image area of 5 pixels x 5 pixels in length and width.
  • the edge direction E of the corresponding edge image is determined.
  • the edge direction E for each partial edge image region GE is determined by selecting from among the specific edge directions SE that are associated with each combination of masks M and have high object depth estimation accuracy.
  • the specific edge direction SE that has the smallest angular difference with the edge direction of the actual partial edge image region GE is selected among the specific edge directions SE.
  • the edge directions E obtained for each partial edge image BE are aggregated for each specific edge direction SE, and the specific edge direction SE with the largest number is determined as the representative edge direction DE.
  • the second determination method is a method of determining a representative edge direction based on an edge image of an image area with little variation in shading or color.
  • FIG. 6 is a diagram for explaining the second method of determining the representative edge direction.
  • a flat region T1 is a continuous region in which the degree of variation in shading or color is below the upper limit level and has an area larger than a threshold value; T2, . . . are searched.
  • the flat regions T1, T2, ... are, for example, continuous regions in which the variance or standard deviation of pixel values is less than or equal to the set upper limit, and the area included in the region, that is, the number of pixels, is equal to or smaller than the set upper limit. This is an area where the value is equal to or greater than the threshold value.
  • a plurality of partial image regions GB are set in the mask-free captured image P0.
  • the plurality of partial image regions GB are set by dividing the entire image region of the mask-free captured image P0 into a matrix.
  • the partial image area GB is, for example, an image area of 5 pixels x 5 pixels in length and width.
  • the edge direction E is determined for each partial edge image region GE corresponding to the boundaries of the detected flat regions T1, T2, . . . in the set partial image region GB. .
  • the edge direction E for each partial edge image region GE select the edge direction in the actual partial edge image region GE from among the specific edge directions SE with high object depth estimation accuracy, which are associated with each combination of masks M.
  • the edge direction with the smallest angular difference from the edge direction is selected.
  • the edge directions E of the partial edge image region GE are totaled for each specific edge direction SE, and the specific edge direction SE with the largest number is determined as the representative edge direction DE.
  • a third method is to set a plurality of partial image regions in a captured image without a mask, and determine a representative edge direction based on edge images included in the partial image regions.
  • FIG. 7 is a diagram for explaining the third method of determining the representative edge direction.
  • a plurality of partial image regions GB are set in the mask-free captured image P0.
  • the plurality of partial image regions GB are set by dividing the entire image region of the mask-free captured image P0 into a matrix.
  • the partial image area GB is, for example, an image area of 5 pixels x 5 pixels in length and width.
  • the number of edge directions of edges determined to be included in the partial image region GB is tallied for each specific edge direction SE. Then, the edge direction with the largest number is determined as the representative edge direction DE.
  • the method for determining the representative edge direction DE is not limited to any of the first to third methods described above. Further, the method for determining the representative edge direction DE may be a combination of two or more of the first to third methods. For example, two or more of the first to third methods may be prioritized, and the two or more methods may be performed according to the priority until the representative edge direction DE is determined. good.
  • FIG. 8 is a diagram showing an example of a blurred edge image. Further, FIG. 9 is a diagram showing an example of a sharp edge image.
  • an image representing a so-called blurred edge is a blurred edge image.
  • an image Q1 in which pixel values change stepwise or gradually with respect to changes in coordinate position is a blurred edge image.
  • a so-called blurred edge image is a so-called blurred edge image.
  • an image Q2 in which pixel values change sharply with changes in coordinate position is a sharp edge image.
  • a sharp edge image in a 256-level gray scale image, five pixels are lined up in one direction, and the pixel values change, for example, 180, 180, 30, 30, 30. is a so-called sharp edge image.
  • Such a sharp edge image originally has no blur or almost no blur. Therefore, such a sharp edge image matches the photographing distance (distance between the subject and the optical system) calculated from the focal length of the optical system.
  • the depth of field becomes deep and the object is in focus over a wide range, making it difficult to estimate the depth with high precision.
  • a typical edge direction that is considered important is determined in a mask-free captured image of a subject that has been acquired in advance. Then, there is a mask for the object necessary for estimating the depth of the object in the captured image.As a combination of masks used for imaging, the depth estimation of the object corresponding to the edge image in the representative edge direction is selected from among multiple masks prepared in advance. The mask combination with the relatively highest accuracy is selected.
  • the object depth estimation method it is possible to estimate the depth of the corresponding object with more stability and high accuracy for edge images in representative edge directions that are considered important in captured images. Become. Therefore, according to the subject depth estimation method according to the second embodiment, it is possible to provide a more practical DFD technique.
  • the imaging device includes an optical system into which light from a subject is incident, an image sensor that receives light passing through the optical system, and an incident area for light that enters the optical system from the subject in advance.
  • a mask installation section that creates a state in which one of a plurality of prepared masks is installed and a state in which none of the masks is installed, and controls the mask installation section and an image sensor so that the subject is imaged.
  • an arithmetic control unit that outputs a signal for image capture of the subject without a mask and an image capture image of the subject with a mask;
  • a maskless imaging process for obtaining a maskless image, a determination process for determining a representative edge direction based on edge images included in the maskless image, and a process for determining a representative edge direction from among a plurality of masks prepared in advance.
  • a selection process that selects a combination of masks that has the relatively highest depth estimation accuracy for an object corresponding to an image that represents an edge in the same direction as the direction, and a selection process that uses each mask included in the selected mask combination to By performing imaging processing to obtain multiple captured images with masks and decoding the multiple captured images with masks based on a point spread function specific to the selected mask, the image of the subject is
  • This is an imaging device that performs decoding processing to obtain information representing depth at a plurality of positions. Details of this imaging device are as follows.
  • FIG. 10 is a diagram illustrating an example of the configuration of an imaging device according to the second embodiment.
  • the imaging device 1 according to the first embodiment includes an optical system section 20, an image sensor 30, a liquid crystal mask section 40, an optical system control section 21, an image sensor control section 31, a liquid crystal mask control section 41, and an arithmetic control section 10.
  • the "optical system unit 20" is an example of an “optical system” in the present application.
  • the “liquid crystal mask section 40” is an example of the "mask installation section” in the present application.
  • the optical system unit 20 collects light L that is emitted or reflected light from the subject 3, and forms an image on a light receiving surface 30a of an image sensor 30, which will be described later.
  • the optical system section 20 includes a lens 20a.
  • the lens 20a is, for example, a single focus lens or a zoom lens.
  • the lens 20a is generally a compound lens in which a plurality of lenses are combined, but may be a single lens.
  • the optical system section 20 may be of an autofocus type or a fixed focus type.
  • the image sensor 30 is an electronic component that performs photoelectric conversion. That is, the image sensor 30 forms an image of light L, which is emitted or reflected light from the subject 3, on the light receiving surface 30a of the image sensor 30 through the optical system section 20, and converts the brightness and darkness of the image into the amount of electric charge. It is a device that converts the signal into an electrical signal.
  • the image sensor 30 generally has a plurality of photoelectric conversion elements arranged in a two-dimensional array, and a light-receiving surface 30a is formed by the plurality of photoelectric conversion elements.
  • the image sensor 30 is arranged at a position such that the light L that enters the optical system section 20 from the subject 3 and passes through the optical system section 20 is received by the light receiving surface 30a.
  • the image sensor 30 converts the intensity or brightness of the light received by the light receiving surface 30a into an electrical signal and outputs an image signal.
  • the image sensor 30 may output a color image signal representing a color image, or may output a monochrome image signal representing a monochrome image.
  • the image sensor 30 is, for example, a CCD (Charge Coupled Devices) image sensor or a COMS (Complementary Metal Oxide Semiconductor) image sensor.
  • CCD Charge Coupled Devices
  • COMS Complementary Metal Oxide Semiconductor
  • the liquid crystal mask section 40 is provided in front of the optical system section 20 on the subject 3 side.
  • the liquid crystal mask section 40 has a function of making any one of a plurality of predetermined masks M appear or making none of the masks M appear. Note that the liquid crystal mask section 40 may be provided inside the optical system section 20.
  • the liquid crystal mask section 40 is configured such that one of the masks M1 to M4 described above can be installed on the subject 3 side of the optical system section 20, or there can be no mask. has been done.
  • the liquid crystal mask section 40 includes, for example, a liquid crystal optical shutter 40a, as shown in FIG. 10.
  • FIG. 11 is a diagram showing an example of a liquid crystal optical shutter.
  • the liquid crystal light shutter 40a includes a light shielding part BM and a plurality of segments R1 to R5.
  • the light shielding part BM has an opening BMa through which the light L entering the optical system part 20 from the subject 3 passes.
  • the light shielding part BM is made of, for example, a black resin plate or a metal plate.
  • the segments R1 to R5 are arranged so as to divide the area of the opening BMa of the light shielding part BM.
  • the liquid crystal light shutter 40a has electrodes corresponding to each of the segments R1 to R5.
  • Each of the segments R1 to R5 is in either a light blocking state or a light transmitting state depending on the voltage applied to the corresponding electrode.
  • the regions of segments R1 to R4 correspond to the light-shielding regions of the masks M1 to M4, respectively.
  • the segment R5 corresponds to the area remaining after removing the areas of the segments R1 to R4 from the area of the opening BMa of the light shielding part BM.
  • each segment R1 to R5 By controlling the state of each segment R1 to R5, it is possible to realize the intended state where the mask is installed or the state where the mask is not installed.
  • the segment R1 is placed in a light blocking state and the segments R2 to R5 are placed in a transparent state, a state in which the mask M1 is installed is realized.
  • the segment R2 is placed in a light shielding state and the segments R1, R3 to R5 are placed in a transparent state, a state in which the mask M2 is installed is realized.
  • the segments R1 to R5 in a light transmitting state, a state in which no masks are installed, that is, a state without a mask is realized.
  • the liquid crystal mask section 40 may have a structure different from that of the liquid crystal optical shutter.
  • the liquid crystal mask section 40 may have a structure that includes a mechanism for mechanically switching between a plurality of masks formed by a plate-shaped member.
  • the liquid crystal mask section 40 may have a structure that covers the entire passage area of light incident on the optical system section 20 and has a multiple diaphragm mechanism that has apertures that can open and close apertures at a plurality of different positions. .
  • the optical system control section 21 adjusts the position of the movable parts included in the optical system section 20 based on the control signal received from the calculation control section 10.
  • the optical system control unit 21 includes, for example, a drive motor, and moves at least a portion of the lens by operating the drive motor.
  • the optical system control unit 21 changes the zoom magnification by moving a part of the lens group that makes up the zoom lens, or changes the zoom lens as a whole.
  • the focus may be adjusted by moving it.
  • the optical system section 20 includes a single focus lens, the focus may be adjusted by moving the entire lens. If the optical system section 20 includes an aperture mechanism, the aperture diameter of the aperture may be adjusted by operating the aperture mechanism.
  • the image sensor control unit 31 executes imaging by reading the image signal output from the image sensor 30 based on the control signal received from the calculation control unit 10.
  • the image sensor control section 31 transmits the read image signal to the arithmetic control section 10.
  • the shutter method used when controlling the image sensor 30 to capture an image of the subject 3 may be, for example, a global shutter method or a rolling shutter method.
  • the liquid crystal mask control unit 41 controls the liquid crystal mask unit 40 based on the control signal received from the arithmetic control unit 10, and displays a state in which the intended mask M is installed in the liquid crystal mask unit 40, or a state in which the mask M is not installed. Achieve a state where you are not already.
  • FIG. 12 is a diagram showing an example of the configuration of the calculation control unit 10 according to the second embodiment.
  • the calculation control unit 10 is, for example, a computer, and includes a processor 11, a memory 12, and an interface 13.
  • the memory 12 stores a program P used by the processor 11 to perform various arithmetic processing, image processing, etc., and to perform various control processing. Further, the memory 12 temporarily or long-term stores data processed by the processor 11.
  • the processor 11 reads and executes the program P stored in the memory 12 to perform various processes including arithmetic processing, image processing, and control processing. When executing various processes, the processor 11 stores data in the memory 12 or accesses data stored in the memory 12 to execute the process.
  • the processor 11 also performs maskless imaging processing, representative edge direction determination processing, mask selection processing, first mask imaging processing, second mask imaging processing, decoding processing, subject depth estimation processing, and Depth map generation processing, data output processing, and imaging continuation determination processing are executed. Details of these various processes will be described later.
  • the processor 11 includes an optical system control section 21, an image sensor control section 31, and an optical system control section 21 to execute the above-described maskless imaging processing, representative edge direction determination processing, mask selection processing, first mask imaging processing, and second mask imaging processing. and transmits a control signal to the liquid crystal mask control section 41.
  • the interface 13 is connected to the external device 2 and transmits the decoded image P3 or depth map P4 generated within the arithmetic control unit 10 to the external device 2.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • CPLD Complex Programmable Logic Device
  • the external device 2 is, for example, an image processing device, a vehicle driving support device, or the like.
  • the image processing device processes the captured image, for example, by blurring the background that is far away from the optical system and emphasizing the object of interest.
  • a vehicle driving support device detects, for example, the position or relative moving speed of objects around a vehicle, and issues a warning or controls the vehicle to avoid danger.
  • an operation section 17 and a display section 18 are connected to the calculation control section 10.
  • the operation unit 17 is for receiving input operations from the user, and the display unit 18 is for visually outputting information to the user.
  • the operation unit 17 is, for example, a keyboard, a mouse, a button, a dial, or the like.
  • the display section 18 is, for example, a liquid crystal panel, an organic EL panel, or the like.
  • the operation section 17 and the display section 18 may be an integrated touch panel.
  • the operation section 17 and the display section 18 may be provided on the external device 2 side.
  • FIG. 13 is a flow diagram illustrating an example of the operation flow of the imaging device according to the second embodiment.
  • FIG. 14 is a diagram for explaining the flow from maskless imaging processing to mask selection processing.
  • step S1 maskless imaging processing is performed. That is, maskless imaging of the subject 3 is performed.
  • the calculation control unit 10 controls the liquid crystal mask control unit 41, the optical system control unit 21, and the image sensor control unit 31 so that the subject 3 is imaged without the mask M installed. Send a signal.
  • the liquid crystal mask control unit 41 controls the liquid crystal mask unit 40 so that a state in which the mask M is not installed is set. That is, the liquid crystal mask control section 41 controls the liquid crystal mask section 40 so that the segments R1 to R5 are in a light transmitting state.
  • the optical system control section 21 controls the optical system section 20 based on the received control signal, as necessary, so that the focal length of the optical system section 20 and the like are set to appropriate conditions.
  • the image sensor control unit 31 transmits the captured image of the subject 3 represented by the output signal of the image sensor 30 to the arithmetic control unit 10 so that the subject 3 is imaged.
  • the image sensor 30 is controlled so that the image sensor 30 is
  • the arithmetic control unit 10 obtains a maskless captured image P0 of the subject 3 as shown in FIG. 14 by performing maskless imaging of the subject 3.
  • step S2 representative edge direction determination processing is performed. That is, the representative edge direction DE in the unmasked captured image P0 is determined. Specifically, the arithmetic control unit 10 determines the representative edge direction DE in the unmasked captured image P0 by using, for example, the above-described method for determining the representative edge direction DE based on the unmasked captured image P0. do.
  • the edge direction with the largest number is determined as the representative edge direction DE.
  • this specific edge direction SE is determined as the representative edge direction DE.
  • step S3 mask selection processing is performed. That is, a combination of masks M to be used for imaging with a mask is selected. Specifically, the calculation control unit 10 selects a mask M from among the plurality of masks M1 to M4 in which a specific edge direction SE with the relatively highest depth estimation accuracy of the subject matches the determined representative edge direction DE. Select a combination of
  • a combination of masks M1 and M2 or a combination of masks M3 and M4 is selected.
  • a combination of masks M1 and M3 is selected.
  • a combination of masks M1 and M3 is selected.
  • a combination of masks M1 and M4 or a combination of masks M2 and M3 is selected.
  • the representative edge direction DE is diagonally 45 degrees to the right, a combination of masks M2 and M4 is selected.
  • step S4 masked imaging processing using the first mask is executed. That is, imaging of the subject 3 with a mask is performed using the first mask M of the selected combination of masks M. Specifically, the calculation control unit 10 transmits a control signal to the liquid crystal mask control unit 41 and the image sensor control unit 31 so that the subject 3 is imaged with the first mask M installed. do.
  • the liquid crystal mask control unit 41 controls the liquid crystal mask unit 40 so that the state in which the first mask M is installed is set. That is, the liquid crystal mask control unit 41 determines and sets each of the segments R1 to R5 to be in a light transmitting state or a light blocking state so that the segments R1 to R5 form the first mask M. do.
  • the image sensor control unit 31 controls the arithmetic control unit 10 so that the object 3 is imaged based on the received control signal, that is, the image of the object 3 represented by the output signal of the image sensor 30 is transmitted to the arithmetic control unit 10.
  • the image sensor 30 is controlled so that the image is transmitted.
  • the calculation control unit 10 obtains the captured image P1 of the subject 3 with the first mask by capturing the subject 3 using the first mask M.
  • step S5 masked imaging processing using the second mask is executed. That is, the subject 3 is imaged with a mask using the second mask M included in the selected combination of masks M. Specifically, the calculation control unit 10 transmits a control signal to the liquid crystal mask control unit 41 and the image sensor control unit 31 so that the subject 3 is imaged with the second mask M installed. do.
  • the liquid crystal mask control unit 41 controls the liquid crystal mask unit 40 so that the state in which the second mask M is installed is set. That is, the liquid crystal mask control unit 41 determines and sets each of the segments R1 to R5 to be in a light transmitting state or a light blocking state so that the segments R1 to R5 form the second mask M. do.
  • the image sensor control unit 31 controls the arithmetic control unit 10 so that the object 3 is imaged based on the received control signal, that is, the image of the object 3 represented by the output signal of the image sensor 30 is transmitted to the arithmetic control unit 10.
  • the image sensor 30 is controlled so that the image is transmitted.
  • the calculation control unit 10 acquires the captured image P2 of the subject 3 with the second mask by capturing the subject 3 using the second mask M.
  • step S6 decryption processing is performed. That is, decoding processing is performed on the captured image with a mask. Specifically, the calculation control unit 10 calculates a point spread function specific to the first mask M and a point spread function specific to the second mask M for the captured image P1 with the first mask and the captured image P2 with the second mask. Performs decoding processing based on a unique point spread function.
  • a decoded image P3 which is an image in which the blur of the first masked image P1 or the second masked image P2 has been improved, and objects corresponding to each position of the decoded image P3 are generated. Depth information from which depth can be estimated is obtained.
  • step S7 subject depth estimation processing is executed. That is, the depth of the object corresponding to each position of the decoded image P3 is estimated. Specifically, the calculation control unit 10 calculates the estimated depth of the object corresponding to each position of the decoded image P3 based on the depth information obtained in step S6.
  • step S8 depth map generation processing is executed. That is, the depth map P4 is generated. Specifically, the calculation control unit 10 generates the depth map P4 by associating each position of the decoded image P3 with a value representing the depth of the object corresponding to the position. Note that the depth map P4 is a representation in which a plurality of positions in the captured image, that is, each pixel or each partial image area, is associated with information about the depth of the object represented by the pixel or partial image area.
  • step S9 data output processing is executed. That is, the decoded image P3 and the depth map P4 are output. Specifically, the calculation control unit 10 outputs the decoded image P3 and the depth map P4 to the external device 2 via the interface 13.
  • step S10 imaging continuation determination processing is executed. That is, a determination is made as to whether or not to continue imaging. For example, if a signal requesting to stop imaging is input by the user's operation of the operation unit 17 or by processing executed by the external device 2, or if some error occurs, the arithmetic control unit 10 , a determination is made to stop imaging. On the other hand, if, for example, there is no input of a signal requesting stop of imaging or occurrence of an error, the arithmetic control unit 10 determines to continue imaging.
  • the arithmetic control unit 10 stops the imaging and ends the process. On the other hand, when it is determined that imaging should be continued, the arithmetic control unit 10 returns the processing step to be executed to step S1 and continues the processing.
  • a typical edge direction that is considered important is determined in a mask-free captured image of a subject that has been acquired in advance. Then, there is a mask for the object necessary for estimating the depth of the object in the captured image.As a combination of masks used for imaging, the depth estimation of the object corresponding to the edge image in the representative edge direction is selected from among multiple masks prepared in advance. The mask combination with the relatively highest accuracy is selected.
  • the imaging device 1 according to the second embodiment it becomes possible to estimate the depth of a corresponding object with more stability and high accuracy for edge images in representative edge directions that are considered important in captured images. . Therefore, according to the imaging device according to the first embodiment, it is possible to provide a more practical DFD technology.
  • the state in which the intended mask is installed or the state in which the mask is not installed is realized by the liquid crystal optical shutter.
  • the liquid crystal optical shutter can realize any mask depending on the design of the segments, and there is no need to physically switch the hardware to change the state of the mask. Therefore, the position of the mask can be controlled with high precision, and the mechanism for switching masks can also be simplified.
  • Embodiments 1 and 2 there are four types of specific edge directions SE with high depth estimation accuracy that correspond to mask combinations: vertical direction, 45 degrees diagonal direction to the left, horizontal direction, and direction diagonal 45 degrees to the right. It is. However, there may be five or more types of combinations of specific edge directions and masks corresponding to the specific edge directions.
  • FIG. 15 is a diagram showing an example of a combination of multiple types of masks according to Modification 1.
  • the example in FIG. 15 is an example of a combination of masks prepared such that specific edge directions SE, in which the accuracy of estimating the depth of an object is high, are set at angular intervals of 22.5 degrees with respect to the vertical direction.
  • the combinations of prepared masks are such that the specific edge direction SE is vertical, diagonal 22.5 degrees to the left, diagonal 45 degrees to the left, diagonal 67.5 degrees to the left, ..., diagonal right
  • the liquid crystal mask section 40 is configured such that a combination of five or more types of masks described above can be formed. That is, the division of segments in the liquid crystal optical shutter 40a is designed so that these masks can be formed.
  • Modification 2 will be explained.
  • Embodiment 1 Embodiment 2, and Modification 1
  • a combination of two masks is selected as the combination of masks used for imaging with masks.
  • a combination of three or more masks may be selected as the combination of masks used for imaging with masks.
  • Modification 2 is an example in which a combination of three or more masks is selected as the combination of masks used for imaging with masks.
  • FIG. 16 is a diagram showing an example of a combination of masks according to Modification 2.
  • the example in FIG. 16 shows an example of a combination of three masks.
  • a combination of three masks whose light-blocking regions are aligned in the same direction may be prepared as selection candidates.
  • the component forming the mask in the imaging device is the liquid crystal mask section 40, but of course the component is not limited to this.
  • the component is not limited to this.
  • the component by preparing multiple types of mask plates, which are plate-like members with openings formed therein, and mechanically switching the mask plates in front of the subject side of the optical system section 20, a desired mask can be installed. You can do it like this.
  • Embodiment 3 A program according to Embodiment 3 of the present application will be described.
  • the program according to Embodiment 3 of the present application causes a computer to perform maskless imaging processing to obtain a maskless captured image by capturing an image of a subject without a mask, and perform representative image processing based on edge images included in the maskless captured image.
  • a decision process to determine the edge direction, and a mask with the highest relative depth estimation accuracy of the object corresponding to the image representing the edge in the same direction as the representative edge direction from among multiple masks prepared in advance.
  • This is a program for performing a decoding process for obtaining information representing the depth at a plurality of positions of the subject by performing decoding based on a point spread function specific to the selected mask.
  • This program may be a program for causing a computer to execute the subject depth estimation method according to the first embodiment. Further, this program may be a program for causing a computer to function as the arithmetic control unit 10 included in the imaging device according to the second embodiment.
  • a non-temporary tangible computer-readable recording medium on which the above program is recorded is also an embodiment of the present invention.
  • a computer By causing a computer to execute the above program, it is possible to obtain the same effects as those provided by the imaging device 1 according to the second embodiment.
  • the present invention is not limited to the above-described embodiments, and includes various modifications. Further, the above-described embodiments have been described in detail to explain the present invention in an easy-to-understand manner, and the present invention is not necessarily limited to having all the configurations described. Furthermore, it is possible to replace a part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. All of these belong to the scope of the present invention. Furthermore, the numerical values included in the text and figures are merely examples, and the effects of the present invention will not be impaired even if different values are used.
  • SYMBOLS 1 Imaging device, 2... External device, 3... Subject, 10... Arithmetic control unit, 11... Processor, 12... Memory, 13... Interface, 17... Operating unit, 18... Display unit, 20... Optical system unit, 21... Optical system control section, 30... Image sensor, 31... Image sensor control section, 40... Liquid crystal mask section, 41... Liquid crystal mask control section, 81... Optical system, 82... Image sensor, 90... Subject, 91...
  • Arithmetic control unit D...Depth, L...Light, M, M1, M2, M3, M4...Mask, P...Program, P0...Pictured image without mask, P1...Pictured image with first mask, P2...Pictured image with second mask, P3 ...Decoded image, P4...Depth map

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

符号化撮像による被写体奥行き推定において、実用性を向上させる。 マスクがない状態で被写体を撮像することによりマスクなし撮像画像を得、マスクなし撮像画像に含まれるエッジ画像に基づいて代表的なエッジ方向を決定し、予め用意された複数のマスクの中から、代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高いマスクの組合せを選択し、選択されたマスクの組合せに含まれる個々のマスクを用いて被写体を撮像することにより複数のマスクあり撮像画像を得、複数のマスクあり撮像画像に対して、選択されたマスクに固有の点拡がり関数に基づく復号化処理を行うことにより、被写体の複数の位置での奥行き推定値を算出する、被写体奥行き推定方法を提供する。

Description

撮像装置、被写体奥行き推定方法、およびプログラム
 本発明は、撮像装置、被写体奥行き推定方法、およびプログラムに関する。
 符号化撮像の分野において、DFD(Depth From Defocus)と呼ばれる技術が知られている。DFD技術は、撮像により得られた画像に写り込んでいるエッジのボケ具合を基に、撮像装置の光学系から被写体までの距離、すなわち被写体の深度あるいは奥行きを推定する技術である。
 DFD技術は、例えば、非特許文献1に記載されている。非特許文献1に記載のDFD技術では、光が通過する開口の位置が互いに異なる2つのマスクが用意される。次に、2つのマスクのそれぞれについて、マスクを光学系の光入射領域に配置して同一の被写体を撮像する符号化撮像が行われる。次いで、符号化撮像により得られた2つの撮像画像に、それぞれのマスクに固有の点拡がり関数に基づく復号化処理が施され、被写体の奥行きが推定される。なお、点拡がり関数は、一般的に、PSF(Point Spread Function)と呼ばれており、ボケ関数、ボケ広がり関数、点像分布関数などとも言われる。
"Coded Aperture Pairs for Depth from Defocus and Defocus Deblurring" C. Zhou, S. Lin and S.K. Nayar, International Journal of Computer Vision, Vol. 93, No. 1, pp. 53, May. 2011.
 DFD技術は、未だ発展途上にあり、DFD技術には、実用性において向上の余地が多く残されている。上記事情により、より実用性の高いDFD技術が望まれている。
 本願において開示される発明のうち、代表的なものの概要を説明すれば、次の通りである。
 本願発明の代表的な一実施形態は、被写体からの光が入射される光学系と、前記光学系を通過する前記光を受ける撮像素子と、前記被写体から前記光学系に入射する光の入射領域に対し、予め用意された複数のマスクのうちいずれかの前記マスクが設置された状態といずれの前記マスクも設置されていない状態とを作り出すマスク設置部と、前記被写体が撮像されるように前記マスク設置部および前記撮像素子を制御するための信号を出力し、前記被写体のマスクなし撮像画像と前記被写体のマスクあり撮像画像とを取得する演算制御部と、を備え、前記演算制御部は、前記マスクがない状態で前記被写体を撮像することにより前記マスクなし撮像画像を得るマスクなし撮像処理と、前記マスクなし撮像画像に含まれるエッジ画像に基づいて代表的なエッジ方向を決定する決定処理と、予め用意された複数の前記マスクの中から、前記代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高い前記マスクの組合せを選択する選択処理と、選択された前記マスクの組合せに含まれる個々の前記マスクを用いて前記被写体を撮像することにより、複数のマスクあり撮像画像を得るマスクあり撮像処理と、複数の前記マスクあり撮像画像に対して、選択された前記マスクに固有の点拡がり関数に基づく復号化を行うことにより、前記被写体の複数の位置での奥行きを表す情報を得る復号化処理と、を行う、撮像装置である。
 本願発明の代表的な一実施形態は、マスクがない状態で被写体を撮像することによりマスクなし撮像画像を得、前記マスクなし撮像画像に含まれるエッジ画像に基づいて代表的なエッジ方向を決定し、予め用意された複数のマスクの中から、前記代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高い前記マスクの組合せを選択し、選択された前記マスクの組合せに含まれる個々の前記マスクを用いて前記被写体を撮像することにより複数のマスクあり撮像画像を得、複数の前記マスクあり撮像画像に対して、選択された前記マスクに固有の点拡がり関数に基づく復号化を行うことにより、前記被写体の複数の位置での奥行きを表す情報を得る、被写体奥行き推定方法である。
 本願発明の代表的な一実施形態は、コンピュータに、マスクがない状態で被写体を撮像することによりマスクなし撮像画像を得るマスクなし撮像処理と、前記マスクなし撮像画像に含まれるエッジ画像に基づいて代表的なエッジ方向を決定する決定処理と、予め用意された複数の前記マスクの中から、前記代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高い前記マスクの組合せを選択する選択処理と、選択された前記マスクの組合せに含まれる個々の前記マスクを用いて前記被写体を撮像することにより、複数のマスクあり撮像画像を得るマスクあり撮像処理と、複数の前記マスクあり撮像画像に対して、選択された前記マスクに固有の点拡がり関数に基づく復号化を行うことにより、前記被写体の複数の位置での奥行きを表す情報を得る復号化処理と、を行わせるためのプログラムである。
実施形態1に係る被写体奥行き推定方法に用いられる撮像系および演算制御装置の一例を示す図である。 実施形態1に係る被写体奥行き推定方法による工程の流れの一例を示すフロー図である。 複数のマスクの一例を示す図である。 マスクの組合せと奥行き推定精度が高いエッジ方向との対応関係を示す図である。 代表エッジ方向を決定する第1の方法を説明するための図である。 代表エッジ方向を決定する第2の方法を説明するための図である。 代表エッジ方向を決定する第3の方法を説明するための図である。 ボケたエッジ画像の一例を示す図である。 シャープなエッジ画像の一例を示す図である。 実施形態2に係る撮像装置の構成の一例を示す図である。 液晶マスク部の例を示す図である。 実施形態2による演算制御部の構成の例を示す図である。 実施形態2に係る撮像装置の動作の流れの一例を示すフロー図である。 マスクなし撮像処理からマスク選択処理までの流れを説明するための図である。 変形例1によるマスクの複数種類の組合せの例を示す図である。 変形例2によるマスクの組合せの一例を示す図である。 DFD技術に用いられる複数のマスクの例を示す図である。
 本願発明の各実施形態を説明する前に、DFD技術の基礎的な内容と本発明者らが発見した課題について説明する。
 撮像した画像のぼやけ(以下、ボケと言う)の態様は、一般的に、撮像装置の光学系、光学系の光入射領域の形状などによって定まる点拡がり関数に依存する。光学系の光入射領域に、光を部分的に遮蔽するマスクが設置された場合、点拡がり関数は、マスク別に定まる。マスクが設置された撮像装置で被写体を撮像することは、符号化撮像と呼ばれる。被写体を符号化撮像すると、使用したマスクに固有の点拡がり関数に基づいてボケた画像が取得される。
 ボケた画像に対して、使用したマスクに固有の点拡がり関数に基づく逆畳み込みをする復号化処理が施されると、ボケが改善された復号化画像と、復号化画像の各位置に対応する物体の奥行き情報とが得られる。
 図17は、DFD技術に用いられる複数のマスクの例を示す図である。非特許文献1には、図17に示す2つのマスクZ1,Z2を用いた符号化撮像によるDFD技術が記載されている。図17に示す2つのマスクZ1,Z2において、黒い領域は光学系に入射する光を遮蔽する領域であり、白い領域は光学系に入射する光を通過させる開口の領域である。このように、図17に示す2つのマスクZ1,Z2は、光が通過し得る開口の幾何学的パターンが互いに異なっている。
 一方、本発明者らは、開口の幾何学的パターンが異なる複数のマスクを用いた符号化撮像によるDFD技術について検討した結果、撮像画像に写り込む物体の画像の中で、奥行きの推定精度が低くなる画像が存在することをつきとめた。奥行きの推定精度が低くなる画像は、具体的には、使用するマスクの開口のずれ方向に近い方向に沿ったエッジを表すエッジ画像である。
 DFD技術で使用する2つのマスクの開口のずれ方向に沿ったエッジを表すエッジ画像は、1つ目のマスクによる撮像画像と、2つ目のマスクによる撮像画像との間で、ボケ具合がほとんど変化しない。2つの撮像画像においてボケ具合が変化しない画像の場合、各マスクに固有の点拡がり関数に基づく逆畳み込みによる復号化処理が成されても、奥行きの情報が的確に抽出されないと考えられる。
 したがって、撮像画像内のエッジのうち注目される代表的なエッジのエッジ方向が、ボケ具合の差異がほとんど生じないエッジ方向と同じである、または近い場合には、重要視されるエッジ画像に対応する物体の奥行きを高精度に推定することができない。
 上記事情により、複数のマスクを用いて同一の被写体を撮像し被写体の奥行きを推定するDFDの手法において、撮像画像のうち代表的なエッジ方向のエッジ画像について、対応する物体の奥行きをより安定した高い精度で推定することができる技術が望まれる。
 本発明らは、上記事情に鑑み、鋭意検討の結果、本願発明を考案した。以下に、本願発明の各実施形態について説明する。なお、以下で説明する各実施形態は、本願発明を実施するための一例であり、本願発明の技術的範囲を限定するものではない。また、以下の各実施形態において、同一の機能を有する構成要素には同一の符号を付し、その繰り返しの説明は、特に必要な場合を除き省略する。
 (実施形態1)
 本願の実施形態1に係る被写体奥行き推定方法について説明する。本願の実施形態1に係る被写体奥行き推定方法は、マスクがない状態で被写体を撮像することによりマスクなし撮像画像を得、マスクなし撮像画像に含まれるエッジ画像に基づいて代表的なエッジ方向を決定し、予め用意された複数のマスクの中から、代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高いマスクの組合せを選択し、選択されたマスクの組合せに含まれる個々のマスクを用いて被写体を撮像することにより複数のマスクあり撮像画像を得、複数のマスクあり撮像画像に対して、選択されたマスクに固有の点拡がり関数に基づく復号化を行うことにより、被写体の複数の位置での奥行きを表す情報を得る、被写体奥行き推定方法である。本被写体奥行き推定方法の詳細は、下記の通りである。
 図1は、実施形態1に係る被写体奥行き推定方法に用いられる撮像系および演算制御装置の一例を示す図である。
 図1に示すように、撮像系80は、光学系81、撮像素子82、およびマスクMを有している。光学系81は、主にレンズなどで構成され、被写体90から到来する光Lを集光し、撮像素子82の受光面に結像させる。撮像素子82は、光電変換を行う電子部品であり、受光面に結像された像の光による明暗を電荷の量に光電変換し、光電変換された電気信号を瞬間的に取り込み、撮像画像を得る。
 マスクMは、光学系81に入射してくる光Lの一部を通過させ、光Lの他部を遮蔽する、いわば光フィルタである。マスクは、符号化開口、符号化絞り、アパーチャなどとも呼ばれる。
 演算制御装置91は、撮像素子82と接続されている。演算制御装置91は、撮像素子82からの電気信号に基づいて得られる撮像画像に対して各種処理を行い、各種情報を得る。演算制御装置91は、例えば、コンピュータである。
 図2は、実施形態1に係る被写体奥行き推定方法による工程の流れの一例を示すフロー図である。
 図2に示すように、ステップH1では、複数のマスクの用意が行われる。すなわち、複数の特定のエッジ方向(以下、特定エッジ方向ともいう)の各々について、その特定エッジ方向のエッジを表すエッジ画像に対応する物体の奥行き推定精度が高いマスクMの組合せが取り得るように、複数のマスクMが用意される。
 ここでは、マスクMは、被写体90から被写体90の撮像に用いる光学系81に入射する光Lの入射領域に対し、光Lが通過可能な領域として主要な開口を有している。また、複数のマスクMは、上記の主要な開口の位置が互いに異なる2つ以上のマスクである。
 また、ここでは、特定エッジ方向として、縦方向、横方向、右斜め45度の方向、および左斜め45度の方向の4つの方向が定められるものとする。用意される複数のマスクMは、例えば、図1に示す4つのマスクM1~M4である。マスクM1~M4は、光学系81の光入射領域を遮蔽する遮蔽板に対して、それぞれ、右上、左上、左下、右下に光を遮蔽する円形状の遮光領域が形成された形態を有している。用意される複数のマスクの例の詳細については、後述する。
 ステップH2では、被写体のマスクなし撮像が行われる。すなわち、マスクが設置されていない状態で、光学系81および撮像素子82を用いて被写体90が撮像され、マスクなし撮像画像P0が得られる。なお、マスクなし撮像のための光学系81あるいは撮像素子82の制御は、例えば、演算制御装置91により行われる。
 ステップH3では、マスクなし撮像画像での代表的なエッジ方向の決定が行われる。すなわち、マスクなし撮像画像P0に含まれるエッジ画像に基づき、マスクなし撮像画像P0において重要視されると考えられる代表的なエッジ方向(以下、代表エッジ方向ともいう)が決定される。代表エッジ方向は、例えば、予め決定された複数の特定エッジ方向の中から選択することにより決定される。代表エッジ方向を決定する方法の例の詳細については、後述する。代表エッジ方向の決定は、例えば、演算制御装置91により行われる。
 ステップH4では、マスクあり撮像に用いるマスクの組合せの選択が行われる。すなわち、予め用意された複数のマスクMの中から、決定された代表エッジ方向と同じ方向のエッジを表すエッジ画像に対応する物体の奥行き推定精度が相対的に最も高いマスクMの組合せが選択される。別の言い方をするならば、マスクMの組合せの中で、奥行き推定精度が高い特定エッジ方向が、決定された代表的なエッジ方向と一致または近似するマスクMの組合せが、符号化撮像に使用するマスクMの組合せとして選択される。
 なお、代表エッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高いマスクMの組合せは、それぞれの主要な開口もしくは遮光領域のずれている方向が代表的なエッジ方向に直交する、2つ以上のマスクである。
 ステップH5では、1つ目のマスクによる被写体のマスクあり撮像が行われる。すなわち、選択されたマスクの組合せに含まれる1つ目のマスクが設置された状態で、光学系81および撮像素子82を用いた同一の被写体90のマスクあり撮像、いわゆる符号化撮像が行われる。このマスクあり撮像が行われることにより、第1マスクあり撮像画像P1が得られる。
 ステップH6では、2つ目のマスクによる被写体のマスクあり撮像が行われる。すなわち、選択されたマスクの組合せに含まれる2つ目のマスクが設置された状態で、光学系81および撮像素子82を用いた同一の被写体90のマスクあり撮像、いわゆる符号化撮像が行われる。このマスクあり撮像が行われることにより、第2マスクあり撮像画像P2が得られる。なお、マスクあり撮像のための光学系81あるいは撮像素子82の制御は、例えば、演算制御装置91により行われる。
 ステップH7では、マスクあり撮像画像の復号化処理が行われる。すなわち、第1マスクあり撮像画像P1および第2マスクあり撮像画像P2に対して、使用された2つのマスクの各々に固有の点拡がり関数に基づく逆畳み込みにより復号化が行われる。この復号化処理が行われることにより、被写体のボケが改善された復号化画像が得られるとともに、復号化画像の各位置に対応した物体の奥行きを推定し得る情報が得られる。なお、復号化処理は、例えば、演算制御装置91により行われる。
 なお、使用したマスクに固有の点拡がり関数は、そのマスクの開口もしくは遮光領域の幾何学的パターン、光学系の構成、撮像素子の構成、マスク・光学系・撮像素子の互いの位置関係などにより定まる。また、ステップH7の復号化処理は、例えば、非特許文献1をはじめとする符号化撮像の分野における公知文献に記載された復号化処理であってよい。
 ステップH8では、復号化画像の各位置に対応する物体の奥行き推定が行われる。すなわち、ステップH7で得られた復号化画像における各位置に対応する物体の奥行き推定値が、ステップH7で得られた情報に基づいて得られる。その後、復号化画像と、復号化画像の各位置に対応する物体の奥行き推定値とに基づいて、被写体のデプスマップが生成されてもよい。なお、奥行き推定値の導出あるいはデプスマップの生成は、例えば、演算制御装置91により行われる。
 〈複数のマスクの例〉
 ここで、予め用意される複数のマスクの例について説明する。なお、ここでは、被写体から到来し光学系に入射する光の入射領域(以下、光入射領域ともいう)は、ほぼ真円の輪郭を有する円領域である。
 図3は、複数のマスクの一例を示す図である。用意される複数のマスクは、例えば、図3に示すマスクM1~M4である。図3に示すマスクM1~M4は、図1に示すマスクM1~M4を拡大したものである。なお、マスクM1~M4は、被写体からの光が入射する方向に見た場合のマスクのパターンを示している。
 マスクM1~M4は、図3に示すように、光学系81の光入射領域を遮蔽する遮蔽体に対して、それぞれ、右上、左上、左下、右下に光を遮蔽する円形状の遮光領域N1~N4が形成された態様を有している。
 マスクM1は、光入射領域である円領域のうち、右上1/4の領域に内接する円領域だけ光を遮蔽し、それ以外の領域では光を透過するパターンを有するマスクである。すなわち、マスクM1は、光入射領域の右上に円形状の遮光領域N1を有している。
 マスクM2は、光入射領域である円領域のうち、左上1/4の領域に内接する円領域だけ光を遮弊し、それ以外の領域では光を透過するパターンを有するマスクである。すなわち、マスクM2は、光入射領域の左上に円形状の遮光領域N2を有している。
 マスクM3は、光入射領域である円領域のうち、左下1/4の領域に内接する円領域だけ光を遮弊し、それ以外の領域では光を透過するパターンを有するマスクである。すなわち、マスクM3は、光入射領域の左下に円形状の遮光領域N3を有している。
 また、マスクM4は、光入射領域である円領域のうち、右下1/4の領域に内接する円領域だけ光を遮弊し、それ以外の領域では光を透過するパターンを有するマスクである。すなわち、マスクM4は、光入射領域の右下に円形状の遮光領域N4を有している。
 〈マスクの組合せと奥行き推定精度が高いエッジ方向との対応関係〉
 図4は、マスクの組合せと奥行き推定精度が高いエッジ方向との対応関係を示す図である。
 マスクM1とマスクM2との組合せの場合、それぞれのマスクにおける遮光領域のずれ方向は、横方向である。よって、マスクM1とマスクM2との組合せの場合、マスクあり撮像画像においてボケ具合が変化し難いエッジ方向は、横方向である。一方、マスクあり撮像画像においてボケ具合が変化し易いエッジ方向は、上記ずれ方向である横方向と直交する縦方向である。すなわち、マスクM1とマスクM2との組合せの場合、被写体の奥行き情報が現れ易く、奥行き推定精度が高いエッジ方向は、縦方向である。
 マスクM1とマスクM3との組合せの場合、それぞれのマスクにおける遮光領域のずれ方向は、右斜め45度の方向である。右斜め45度の方向とは、縦方向の直線を時計回りに45度回転させた直線の方向である。よって、マスクM1とマスクM3との組合せの場合、マスクあり撮像画像においてボケ具合が変化し難いエッジ方向は、右斜め45度の方向である。一方、マスクあり撮像画像においてボケ具合が変化し易いエッジ方向は、上記ずれ方向である右斜め45度の方向と直交する左斜め45度の方向である。左斜め45度の方向とは、縦方向の直線を反時計回りに45度回転させた直線の方向である。すなわち、マスクM1とマスクM3との組合せの場合、被写体の奥行き情報が現れ難く、奥行き推定精度が高いエッジ方向は、左斜め45度の方向である。
 同様の考え方により、マスクM1とマスクM4との組合せの場合、奥行き推定精度が高いエッジ方向は、横方向である。
 また、マスクM2とマスクM4との組合せの場合、奥行き推定精度が高いエッジ方向は、右斜め45度の方向である。
 マスクの組合せ別に奥行き推定精度が高いエッジ方向をまとめると、図4に示すように、次のような対応関係が得られる。
 (1)マスクM1,M2の組合せ:縦方向
 (2)マスクM1,M3の組合せ:左斜め45度の方向
 (3)マスクM1,M4の組合せ:横方向
 (4)マスクM2,M4の組合せ:右斜め45度の方向
 〈代表エッジ方向を決定する方法の例〉
 マスクなし撮像画像における代表エッジ方向を決定する方法の例について説明する。代表エッジ方向を決定する方法としては、例えば、次のような方法がある。
 《代表エッジ方向を決定する第1の方法》
 第1の方法は、検出された特定の対象物のエッジ画像に基づいて代表エッジ方向を決定する方法である。
 図5は、代表エッジ方向を決定する第1の方法を説明するための図である。
 まず、注目される対象物の設定が予め行われる。被写体の奥行き推定が、自動車運転支援の技術分野で利用される場合には、注目される対象物は、例えば、自動車、自動二輪車、自転車、車いす、人間、犬、電柱、信号機などである。
 次に、図5に示すように、マスクなし撮像画像P0において、設定された対象物である設定対象物A1が探索される。図5において、マスクなし撮像画像P0は、走行中の自動車から前方を撮像して得られた画像の例であり、設定対象物A1として自動車が検出された場合の例である。なお、設定対象物A1の探索には、テンプレートマッチングによる検出手法、人工知能であるAIによる検出手法などが用いられる。
 次いで、マスクなし撮像画像P0内で、設定対象物A1が検出された場合には、検出された設定対象物A1のエッジに対応するエッジ画像に基づいて、代表エッジ方向が決定される。
 具体的には、例えば、マスクなし撮像画像P0に、複数の部分画像領域GBが設定される。複数の部分画像領域GBは、マスクなし撮像画像P0の画像領域全体を格子状すなわちマトリクス状に区分することにより設定される。部分画像領域GBは、例えば、縦×横が5画素×5画素となる画像領域である。
 次いで、図6に示すように、設定された部分画像領域GBのうち、検出された設定対象物A1のエッジが含まれる部分エッジ画像領域GEごとに、対応するエッジ画像のエッジ方向Eが求められる。部分エッジ画像領域GEごとのエッジ方向Eは、マスクMの組合せ別に対応付けられる、物体の奥行き推定精度が高い特定エッジ方向SEの中から選択することにより求められる。部分エッジ画像領域GEのエッジ方向Eを求める際には、特定エッジ方向SEの中で実際の部分エッジ画像領域GEのエッジ方向との角度差が最も小さくなる特定エッジ方向SEが選択される。
 部分エッジ画像BEごとに求められたエッジ方向Eを特定エッジ方向SE別に集計し、最も数が多い特定エッジ方向SEが、代表エッジ方向DEとして決定される。
 《代表エッジ方向を決定する第2の方法》
 第2の決定方法は、濃淡または色のバラつきが少ない画像領域のエッジ画像に基づいて代表エッジ方向を決定する方法である。
 図6は、代表エッジ方向を決定する第2の方法を説明するための図である。
 まず、図6に示すように、マスクなし撮像画像P0の中で、濃淡または色のバラつきの程度が上限レベル以下である連続した領域であり、閾値以上の面積を有する領域である平坦領域T1,T2,・・・が探索される。平坦領域T1,T2,・・・は、例えば、画素値の分散または標準偏差が、設定された上限値以下である連続した領域であり、当該領域に含まれる面積すなわち画素数が、設定された閾値以上である領域である。
 次いで、マスクなし撮像画像P0内で、平坦領域T1,T2,・・・が検出された場合には、検出された平坦領域T1,T2,・・・の境界に対応するエッジ画像に基づいて、代表エッジ方向DEが決定される。
 具体的には、例えば、マスクなし撮像画像P0に複数の部分画像領域GBが設定される。複数の部分画像領域GBは、マスクなし撮像画像P0の画像領域全体をマトリクス状に区分することにより設定される。部分画像領域GBは、例えば、縦×横が5画素×5画素となる画像領域である。
 そして、図6に示すように、設定された部分画像領域GBのうち、検出された平坦領域T1,T2,・・・の境界に対応する部分エッジ画像領域GEごとに、エッジ方向Eが求められる。部分エッジ画像領域GEごとのエッジ方向Eを求める際には、マスクMの組合せ別に対応付けられる、物体の奥行き推定精度が高い特定エッジ方向SEの中から、実際の部分エッジ画像領域GEにおけるエッジ方向との角度差が最も小さいエッジ方向が選択される。
 特定エッジ方向SE別に部分エッジ画像領域GEのエッジ方向Eを集計し、最も数の多い特定エッジ方向SEが、代表エッジ方向DEとして決定される。
  《代表エッジ方向を決定する第3の方法》
 第3の方法は、マスクなし撮像画像において、複数の部分画像領域を設定し、部分画像領域に含まれるエッジ画像に基づいて代表エッジ方向を決定する方法である。
 図7は、代表エッジ方向を決定する第3の方法を説明するための図である。
 まず、図7に示すように、マスクなし撮像画像P0に、複数の部分画像領域GBが設定される。複数の部分画像領域GBは、マスクなし撮像画像P0の画像領域全体をマトリクス状に区分することにより設定される。部分画像領域GBは、例えば、縦×横が5画素×5画素となる画像領域である。
 次に、複数の部分画像領域GBの各々について、マスクMの組合せ別に対応付けられる、物体の奥行き推定精度が高い特定エッジ方向SE別に、当該特定エッジ方向SEのエッジが含まれているか否かが判定される。なお、当該判定においては、特定エッジ方向SEと部分画像領域GBに含まれる実際のエッジの方向とのずれ角が、予め定められた許容誤差内であれば、部分画像領域GBに特定エッジ方向SEのエッジが含まれていると判定される。
 次いで、部分画像領域GBに含まれていると判定されたエッジのエッジ方向の数が、特定エッジ方向SE別に集計される。そして、最も数が多いエッジ方向が、代表エッジ方向DEとして決定される。
 なお、代表エッジ方向DEを決定する方法は、上記第1の方法~第3の方法のいずれかに限定されない。また、代表エッジ方向DEを決定する方法は、第1の方法から第3の方法のうち2つ以上を組み合わせた方法であってもよい。例えば、第1の方法~第3の方法のうち2つ以上の方法に優先順位が付けられ、代表エッジ方向DEが決定されるまで、その優先順位に従って当該2つ以上の方法が実施されてもよい。
 《エッジ画像について》
 ここで、本実施形態においてエッジ画像として扱うことが好ましい画像の特徴について説明する。
 図8は、ボケたエッジ画像の一例を示す図である。また、図9は、シャープなエッジ画像の一例を示す図である。
 本実施形態においては、いわゆるボケたエッジを表す画像をエッジ画像として扱うことが好ましい。例えば、図8に示すような、画素値が座標の位置の変化に対して段階的あるいは緩やかに変化する画像Q1は、ボケたエッジ画像である。より具体的な例を挙げるとすれば、256階調のグレースケールの画像において、一方向に5つの画素が並んでおり、画素値が、例えば180、150、100、50、30と変化する画像は、いわゆるボケたエッジ画像である。このようなボケたエッジ画像に復号化処理を行った場合、エッジ画像に対応する物体の奥行き情報を良好に抽出することができ、高精度な奥行き推定が可能である。
 一方、本実施形態において、いわゆるシャープなエッジを表す画像をエッジ画像として扱わないことが好ましい。例えば、図9に示すような、画素値が座標の位置の変化に対して急峻に変化する画像Q2は、シャープなエッジ画像である。より具体的な例を挙げるとすれば、256階調のグレースケールの画像において、一方向に5つの画素が並んでおり、画素値が、例えば180、180、30、30、30と変化する画像は、いわゆるシャープなエッジ画像である。このようなシャープなエッジ画像には、元々ボケがない、または、ボケがほとんどない。したがって、このようなシャープなエッジ画像は光学系の焦点距離から算出される撮影距離(被写体と光学系の距離)と一致する。但し、焦点距離の短い光学系では被写界深度が深くなり、広範囲で焦点が合ってしまい高精度な奥行き推定は困難である。
 以上、実施形態1に係る被写体奥行き推定方法では、まず、事前に取得された被写体のマスクなし撮像画像において、重要視される代表的なエッジ方向が決定される。そして、撮像画像の被写体の奥行き推定に必要な被写体のマスクあり撮像に用いるマスクの組合せとして、予め用意された複数のマスクの中から、代表的なエッジ方向のエッジ画像に対応する物体の奥行き推定精度が相対的に最も高いマスクの組合せが選択される。
 したがって、実施形態1に係る被写体奥行き推定方法によれば、撮像画像において重要視される代表的なエッジ方向のエッジ画像について、対応する物体の奥行きをより安定した高い精度で推定することが可能になる。故に、実施形態2に係る被写体奥行き推定方法によれば、より実用性の高いDFD技術を提供することが可能となる。
 (実施形態2)
 本願の実施形態2に係る撮像装置について説明する。本願の実施形態2に係る撮像装置は、被写体からの光が入射される光学系と、光学系を通過する光を受ける撮像素子と、被写体から光学系に入射する光の入射領域に対し、予め用意された複数のマスクのうちいずれかのマスクが設置された状態といずれのマスクも設置されていない状態とを作り出すマスク設置部と、被写体が撮像されるようにマスク設置部および撮像素子を制御するための信号を出力し、被写体のマスクなし撮像画像と被写体のマスクあり撮像画像とを取得する演算制御部と、を備え、演算制御部は、マスクがない状態で被写体を撮像することによりマスクなし撮像画像を得るマスクなし撮像処理と、マスクなし撮像画像に含まれるエッジ画像に基づいて代表的なエッジ方向を決定する決定処理と、予め用意された複数のマスクの中から、代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高いマスクの組合せを選択する選択処理と、選択されたマスクの組合せに含まれる個々のマスクを用いて被写体を撮像することにより、複数のマスクあり撮像画像を得るマスクあり撮像処理と、複数のマスクあり撮像画像に対して、選択されたマスクに固有の点拡がり関数に基づく復号化を行うことにより、被写体の複数の位置での奥行きを表す情報を得る復号化処理と、を行う、撮像装置である。本撮像装置の詳細は、下記の通りである。
 〈撮像装置の構成の例〉
 図10は、実施形態2に係る撮像装置の構成の一例を示す図である。図10に示すように、実施形態1に係る撮像装置1は、光学系部20、撮像素子30、液晶マスク部40と、光学系制御部21、撮像素子制御部31、液晶マスク制御部41、および演算制御部10を有している。なお、「光学系部20」は、本願における「光学系」の一例である。「液晶マスク部40」は、本願における「マスク設置部」の一例である。
 光学系部20は、被写体3からの発光または反射光である光Lを集光し、後述する撮像素子30の受光面30aに結像させる。光学系部20は、レンズ20aを含んでいる。レンズ20aは、例えば、単焦点レンズ、あるいはズームレンズである。レンズ20aは、複数のレンズが組み合わされた複合レンズが一般的であるが、単一のレンズであってもよい。光学系部20は、オートフォーカス方式であってもよいし、固定焦点方式であってもよい。
 撮像素子30は、光電変換を行う電子部品である。すなわち、撮像素子30は、被写体3からの発光または反射光である光Lを、光学系部20を通して撮像素子30の受光面30aに結像させ、その像の光による明暗を電荷の量に光電変換し、それを読み出して電気信号に変換するデバイスである。
 撮像素子30は、一般的に2次元アレイ状に列配された複数の光電変換素子を有しており、これら複数の光電変換素子により受光面30aが形成されている。撮像素子30は、被写体3から光学系部20に入射し、光学系部20を通過した光Lが受光面30aで受光されるような位置に、配置される。撮像素子30は、受光面30aで受光した光の強さすなわち明るさを電気信号に変換して画像信号を出力する。撮像素子30は、カラー画像を表すカラー画像信号を出力するものであってもよいし、モノクロ画像を表すモノクロ画像信号を出力するものであってもよい。
 撮像素子30は、例えば、CCD(Charge Coupled Devices;電荷結合素子)イメージセンサ、あるいはCOMS(Complementary Metal Oxide Semiconductor;相補性金属酸化膜半導体)イメージセンサなどである。
 液晶マスク部40は、光学系部20の被写体3側の前に設けられている。液晶マスク部40は、予め定められた複数のマスクMのうち、いずれかを出現させたり、いずれのマスクMも出現させなかったりする機能を有する。なお、液晶マスク部40は、光学系部20の内部に設けられてもよい。
 本実施形態では、液晶マスク部40は、光学系部20の被写体3側において、上記マスクM1~M4のいずれかが設置された状態にしたり、マスクなしの状態にしたりすることができるように構成されている。
 液晶マスク部40は、例えば、図10に示すように、液晶光シャッタ40aを有している。
 図11は、液晶光シャッタの例を示す図である。液晶光シャッタ40aは、図11に示すように、光遮蔽部BM、および複数のセグメントR1~R5を含んでいる。
 光遮蔽部BMは、被写体3から光学系部20に入射する光Lが通過する開口BMaを有している。光遮蔽部BMは、例えば、黒色の樹脂板あるいは金属板により構成されている。
 セグメントR1~R5は、光遮蔽部BMの開口BMaの領域を区分するように配置されている。液晶光シャッタ40aは、セグメントR1~R5のそれぞれに対応した電極を有している。セグメントR1~R5は、それぞれ、対応する電極に印加される電圧に応じて、光遮蔽状態と光透過状態のいずれかの状態になる。
 セグメントR1~R5のうちセグメントR1~R4の領域は、それぞれ、上記のマスクM1~M4の遮光領域に対応している。セグメントR5は、光遮蔽部BMの開口BMaの領域からセグメントR1~R4の領域を除いて残った領域に対応している。
 各セグメントR1~R5の状態を制御することにより、意図したマスクが設置された状態を実現させたり、マスクが設置されていない状態を実現させたりすることが可能になる。
 例えば、セグメントR1を遮光状態とし、セグメントR2~R5を透過状態とすれば、マスクM1が設置された状態が実現される。あるいは、セグメントR2を遮光状態とし、セグメントR1,R3~R5を透過状態とすれば、マスクM2が設置された状態が実現される。また、セグメントR1~R5を光透過状態とすれば、いずれのマスクも設置されていない状態すなわちマスクなしの状態が実現される。
 なお、液晶マスク部40は、液晶光シャッタとは異なる構造を有していてもよい。例えば、液晶マスク部40は、板状の部材によって成形された複数のマスクを機械的に切り替える機構を有する構造であってもよい。また例えば、液晶マスク部40は、光学系部20に入射する光の全通過領域をカバーし、複数の異なる位置に開口の開閉が可能な絞りを有する複数絞り機構を有する構造であってもよい。
 光学系制御部21は、演算制御部10から受信する制御信号に基づいて、光学系部20に含まれる可動部分の位置を調整するものである。光学系制御部21は、例えば駆動モータを有しており、当該駆動モータを動作させることにより、レンズの少なくとも一部を移動させる。
 光学系部20が、ズームレンズを含んでいる場合には、光学系制御部21は、ズームレンズを構成するレンズ群の一部を移動させることにより、ズーム倍率を変化させたり、ズームレンズ全体を移動させることにより、フォーカスを調整したりしてもよい。光学系部20が、単焦点レンズを含んでいる場合には、レンズ全体を移動させることにより、フォーカスを調整してもよい。光学系部20が絞り機構を含んでいる場合には、絞り機構を操作することにより、絞りの開口径を調整してもよい。
 撮像素子制御部31は、演算制御部10から受信する制御信号に基づいて、撮像素子30から出力される画像信号を読み込むことにより、撮像を実行する。撮像素子制御部31は、読み込んだ画像信号を演算制御部10に送信する。なお、撮像素子30を制御して被写体3を撮像する際のシャッタ方式は、例えば、グローバルシャッタ方式、あるいは、ローリングシャッタ方式であってよい。
 液晶マスク制御部41は、演算制御部10から受信する制御信号に基づいて、液晶マスク部40を制御し、液晶マスク部40に意図したマスクMが設置された状態、あるいは、マスクMが設置されていない状態を実現させる。
 図12は、実施形態2による演算制御部10の構成の例を示す図である。図12に示すように、演算制御部10は、例えば、コンピュータであり、プロセッサ11、メモリ12、およびインタフェース13を有している。
 メモリ12は、プロセッサ11が各種の演算処理あるいは画像処理などを実行したり、各種の制御処理を実行したりするのに使用されるプログラムPを格納する。また、メモリ12は、プロセッサ11が処理するデータを一時的または長期的に格納する。
 プロセッサ11は、メモリ12に格納されたプログラムPを読み出して実行することにより、演算処理、画像処理、および制御処理を含む各種の処理を実行する。プロセッサ11は、各種の処理を実行する際に、メモリ12内にデータを格納したり、メモリ12内に格納されているデータにアクセスしたりして、処理を実行する。
 また、プロセッサ11は、各種処理の一部として、マスクなし撮像処理、代表エッジ方向決定処理、マスク選択処理、第1マスク撮像処理、第2マスク撮像処理、復号化処理、被写体奥行き推定処理、およびデプスマップ生成処理、データ出力処理、および撮像継続判定処理を実行する。これら各種の処理の詳細については後述する。
 プロセッサ11は、上記のマスクなし撮像処理、代表エッジ方向決定処理、マスク選択処理、第1マスク撮像処理、第2マスク撮像処理を実行するために、光学系制御部21、撮像素子制御部31、および液晶マスク制御部41に、制御信号を送信する。
 インタフェース13は、外部装置2と接続され、演算制御部10内で生成された復号化画像P3あるいはデプスマップP4を外部装置2に送信する。
 なお、上記コンピュータの全部または一部は、DSP(Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)、CPLD(Complex Programmable Logic Device)などの半導体回路により構成されてもよい。
 外部装置2は、例えば、画像処理装置、車両運転支援装置などである。画像処理装置は、例えば、撮像画像に対して、光学系からの距離が遠い背景をぼかして注目される被写体を強調するような加工を施す。車両運転支援装置は、例えば、車両周辺の物体の位置あるいは相対的な移動速度などを検出し、危険を回避するために警告を発したり車両を制御したりする。
 なお、演算制御部10には、操作部17および表示部18が接続されている。操作部17は、ユーザからの入力操作を受け付けるためのものであり、表示部18は、ユーザに向けた情報を視覚的に出力するためのものである。操作部17は、例えば、キーボード、マウス、ボタン、ダイヤルなどである。表示部18は、例えば、液晶パネル、有機ELパネルなどである。操作部17および表示部18は、一体化されたタッチパネルであってもよい。操作部17および表示部18は、外部装置2側に設けられていてもよい。
 〈撮像装置における動作の流れ〉
 実施形態2に係る撮像装置における動作の流れについて説明する。
 図13は、実施形態2に係る撮像装置の動作の流れの一例を示すフロー図である。また、図14は、マスクなし撮像処理からマスク選択処理までの流れを説明するための図である。
 図13に示すように、ステップS1では、マスクなし撮像処理が実行される。すなわち、被写体3のマスクなし撮像が行われる。具体的には、演算制御部10が、マスクMが設置されていない状態で被写体3が撮像されるように、液晶マスク制御部41、光学系制御部21、および撮像素子制御部31に、制御信号を送信する。
 液晶マスク制御部41は、受信した制御信号に基づいて、マスクMが設置されていない状態が設定されるように、液晶マスク部40を制御する。すなわち、液晶マスク制御部41は、セグメントR1~R5が光透過状態となるように、液晶マスク部40を制御する。
 次に、光学系制御部21は、受信した制御信号に基づいて、必要に応じて、光学系部20の焦点距離などが適正な条件となるように、光学系部20を制御する。
 次いで、撮像素子制御部31は、受信した制御信号に基づいて、被写体3が撮像されるように、すなわち、撮像素子30の出力信号により表される被写体3の撮像画像が演算制御部10に送信されるように、撮像素子30を制御する。
 演算制御部10は、上記の如く、被写体3のマスクなし撮像が行われることにより、図14に示すような被写体3のマスクなし撮像画像P0を取得する。
 ステップS2では、代表エッジ方向決定処理が実行される。すなわち、マスクなし撮像画像P0における代表エッジ方向DEの決定が行われる。具体的には、演算制御部10が、マスクなし撮像画像P0に基づいて、例えば、上述した、代表エッジ方向DEを決定する方法を用いることにより、マスクなし撮像画像P0における代表エッジ方向DEを決定する。
 例えば、上記の代表エッジ方向を決定する第3の方法を用いて、予め決定された4つの特定エッジ方向SE別に、その特定エッジ方向SEと一致または近似しているエッジ方向の数を計数し、最も数が多かったエッジ方向が、代表エッジ方向DEとして決定される。図14の例では、右斜め45度の特定エッジ方向SEの計数値が最も多いことから、この特定エッジ方向SEが代表エッジ方向DEとして決定される。
 ステップS3では、マスク選択処理が実行される。すなわち、マスクあり撮像に用いるマスクMの組合せの選択が行われる。具体的には、演算制御部10が、複数のマスクM1~M4の中から、被写体の奥行き推定精度が相対的に最も高い特定エッジ方向SEが、決定された代表エッジ方向DEと一致するマスクMの組合せを選択する。
 例えば、代表エッジ方向DEが縦方向である場合には、マスクM1とマスクM2との組合せ、あるいは、マスクM3とマスクM4との組合せが選択される。代表エッジ方向DEが左斜め45度の方向である場合には、マスクM1とマスクM3との組合せが選択される。代表エッジ方向DEが横方向である場合には、マスクM1とマスクM4との組合せ、あるいは、マスクM2とマスクM3との組合せが選択される。代表エッジ方向DEが右斜め45度の方向である場合には、マスクM2とマスクM4との組合せが選択される。
 図14の例では、代表エッジ方向DEが右斜め45度の方向なので、物体の奥行き推定精度が相対的に最も高い特定エッジ方向SEが当該右斜め45度の方向となるマスクMの組合せ、すなわち、マスクM2とマスクM4との組合せが選択される。
 ステップS4では、1つ目のマスクによるマスクあり撮像処理が実行される。すなわち、選択されたマスクMの組合せのうち1つ目のマスクMによる被写体3のマスクあり撮像が行われる。具体的には、演算制御部10が、1つ目のマスクMが設置された状態で被写体3が撮像されるように、液晶マスク制御部41、および撮像素子制御部31に、制御信号を送信する。
 液晶マスク制御部41は、受信した制御信号に基づいて、1つ目のマスクMが設置された状態が設定されるように、液晶マスク部40を制御する。すなわち、液晶マスク制御部41は、セグメントR1~R5が1つ目のマスクMを形成するように、セグメントR1~R5の各々について、光透過状態とするか光遮蔽状態とするかを決定し設定する。
 次に、撮像素子制御部31は、受信した制御信号に基づいて、被写体3が撮像されるように、すなわち、撮像素子30の出力信号により表される被写体3の撮像画像が演算制御部10に送信されるように、撮像素子30を制御する。
 演算制御部10は、上記の如く、被写体3の1つ目のマスクMによる撮像を行うことにより、被写体3の第1マスクあり撮像画像P1を取得する。
 ステップS5では、2つ目のマスクによるマスクあり撮像処理が実行される。すなわち、選択されたマスクMの組合せに含まれる2つ目のマスクMによる被写体3のマスクあり撮像が行われる。具体的には、演算制御部10が、2つ目のマスクMが設置された状態で被写体3が撮像されるように、液晶マスク制御部41、および撮像素子制御部31に、制御信号を送信する。
 液晶マスク制御部41は、受信した制御信号に基づいて、2つ目のマスクMが設置された状態が設定されるように、液晶マスク部40を制御する。すなわち、液晶マスク制御部41は、セグメントR1~R5が2つ目のマスクMを形成するように、セグメントR1~R5の各々について、光透過状態とするか光遮蔽状態とするかを決定し設定する。
 次に、撮像素子制御部31は、受信した制御信号に基づいて、被写体3が撮像されるように、すなわち、撮像素子30の出力信号により表される被写体3の撮像画像が演算制御部10に送信されるように、撮像素子30を制御する。
 演算制御部10は、上記の如く、被写体3の2つ目のマスクMによる撮像を行うことにより、被写体3の第2マスクあり撮像画像P2を取得する。
 ステップS6では、復号化処理が実行される。すなわち、マスクあり撮像画像に対する復号化処理が行われる。具体的には、演算制御部10が、第1マスクあり撮像画像P1および第2マスクあり撮像画像P2に対して、1つ目のマスクMに固有の点拡がり関数および2つ目のマスクMに固有の点拡がり関数に基づく復号化処理を行う。復号化処理が行われると、第1マスクあり撮像画像P1または第2マスクあり撮像画像P2のボケが改善された画像である復号化画像P3と、復号化画像P3の各位置に対応する物体の奥行きを推定し得る奥行き情報とが得られる。
 ステップS7では、被写体奥行き推定処理が実行される。すなわち、復号化画像P3の各位置に対応する物体の奥行きの推定が行われる。具体的には、演算制御部10が、ステップS6で得られた奥行き情報に基づいて、復号化画像P3の各位置に対応する物体の奥行き推定値を算出する。
 ステップS8では、デプスマップ生成処理が実行される。すなわち、デプスマップP4の生成が行われる。具体的には、演算制御部10が、復号化画像P3の各位置に、当該位置に対応した物体の奥行きを表す値を対応付けることにより、デプスマップP4を生成する。なお、デプスマップP4は、撮像画像の複数の位置すなわち各画素または各部分画像領域に対して、当該画素または部分画像領域が表す物体の奥行きの情報を対応付けて表現したものである。
 ステップS9では、データ出力処理が実行される。すなわち、復号化画像P3およびデプスマップP4の出力が行われる。具体的には、演算制御部10は、インタフェース13を介して、復号化画像P3およびデプスマップP4を外部装置2に出力する。
 ステップS10では、撮像継続判定処理が実行される。すなわち、撮像を継続するか否かの判定が行われる。例えば、ユーザによる操作部17の操作、もしくは外部装置2が実行する処理により、撮像停止を要求する信号が入力された場合、あるいは、何からのエラーが発生した場合には、演算制御部10は、撮像を停止するとの判定を行う。一方、例えば、撮像停止を要求する信号の入力、あるいはエラー発生等がなかった場合には、演算制御部10は、撮像を継続するとの判定を行う。
 撮像を停止するとの判定が行われた場合には、演算制御部10は、撮像を停止し、処理を終了させる。一方、撮像を継続するとの判定が行われた場合には、演算制御部10は、実行する処理ステップをステップS1に戻し、処理を継続させる。
 以上、実施形態2に係る撮像装置1では、まず、事前に取得された被写体のマスクなし撮像画像において、重要視される代表的なエッジ方向が決定される。そして、撮像画像の被写体の奥行き推定に必要な被写体のマスクあり撮像に用いるマスクの組合せとして、予め用意された複数のマスクの中から、代表的なエッジ方向のエッジ画像に対応する物体の奥行き推定精度が相対的に最も高いマスクの組合せが選択される。
 したがって、実施形態2に係る撮像装置1によれば、撮像画像において重要視される代表的なエッジ方向のエッジ画像について、対応する物体の奥行きをより安定した高い精度で推定することが可能になる。故に、実施形態1に係る撮像装置によれば、より実用性の高いDFD技術を提供することが可能となる。
 また、実施形態2によれば、意図したマスクが設置されている状態、あるいは、マスクが設置されていない状態を、液晶光シャッタにより実現している。液晶光シャッタは、セグメントの設計次第で、任意のマスクを実現させることができるとともに、マスクの状態の切替えに、ハードウェアを物理的に切り替える必要がない。したがって、マスクの位置を精度良く制御することができ、またマスクを切り替えるための機構も簡単にすることが可能である。
 〈変形例1〉
 変形例1について説明する。実施形態1および実施形態2では、マスクの組合せに対応した、奥行き推定精度が高い特定エッジ方向SEは、縦方向、左斜め45度の方向、横方向、および右斜め45度の方向の4種類である。しかしながら、特定エッジ方向、および当該特定エッジ方向に対応するマスクの組合せは、5種類以上であってもよい。
 図15は、変形例1によるマスクの複数種類の組合せの例を示す図である。図15の例は、物体の奥行き推定精度が高くなる特定エッジ方向SEが、縦方向を基準に22.5度の角度間隔で設定されるように用意されたマスクの組合せの例である。すなわち、用意されたマスクの組合せは、特定エッジ方向SEが、縦方向、左斜め22.5度の方向、左斜め45度の方向、左斜め67.5度の方向、・・・、右斜め22.5度の方向となる16種類の組合せとなる。
 なお、実施形態2において、液晶マスク部40は、上述した5種類以上のマスクの組合せが形成可能となるように構成される。すなわち、これらのマスクの形成が可能となるように、液晶光シャッタ40aにおけるセグメントの区分が設計される。
 このような変形例1によれば、物体の奥行き推定精度が高くなる特定エッジ方向SEがより多くなる。故に、代表的なエッジ方向をより細かい角度の方向で決定することができ、重要視される代表的なエッジ方向のエッジ画像について、対応する物体の奥行きをより高い精度で推定することが可能となる。
 〈変形例2〉
 変形例2について説明する。実施形態1、実施形態2、および変形例1では、マスクあり撮像に用いるマスクの組合せとして、2つのマスクによる組合せが選択される。しかしながら、マスクあり撮像に用いるマスクの組合せとしては、3つ以上のマスクによる組合せが選択されてもよい。変形例2は、マスクあり撮像に用いるマスクの組合せとして、3つ以上のマスクによる組合せが選択される例である。
 図16は、変形例2によるマスクの組合せの一例を示す図である。図16の例では、3つのマスクによる組合せの例を示している。例えば、図16に示すように、マスクの遮光領域の位置ずれ方向が揃った3つのマスクによる組合せが、選択候補として用意されてもよい。
 このような変形例2によれば、実施形態1と同様に、撮像画像において重要視される代表的なエッジ方向のエッジ画像について、対応する物体の奥行きをより高い精度で推定することが可能となる。
 〈変形例3〉
 実施形態2において、撮像装置においてマスクを形成する構成要素は、液晶マスク部40であるが、もちろん、これに限定されない。例えば、開口が形成された板状部材であるマスク板を複数種類用意し、光学系部20の被写体側の前でマスク板を機械的に切り替えることにより、所望のマスクが設置された状態となるようにしてもよい。
 (実施形態3)
 本願の実施形態3に係るプログラムについて説明する。本願の実施形態3に係るプログラムは、コンピュータに、マスクがない状態で被写体を撮像することによりマスクなし撮像画像を得るマスクなし撮像処理と、マスクなし撮像画像に含まれるエッジ画像に基づいて代表的なエッジ方向を決定する決定処理と、予め用意された複数のマスクの中から、代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高いマスクの組合せを選択する選択処理と、選択されたマスクの組合せに含まれる個々のマスクを用いて被写体を撮像することにより、複数のマスクあり撮像画像を得るマスクあり撮像処理と、複数のマスクあり撮像画像に対して、選択されたマスクに固有の点拡がり関数に基づく復号化を行うことにより、被写体の複数の位置での奥行きを表す情報を得る復号化処理と、を行わせるためのプログラムである。
 本プログラムは、コンピュータに、実施形態1に係る被写体奥行き推定方法を実行させるためのプログラムであってもよい。また、本プログラムは、コンピュータを、実施形態2に係る撮像装置が有する演算制御部10として機能させるためのプログラムであってもよい。
 なお、上記プログラムが記録された非一時的な有体のコンピュータ読み取り可能な記録媒体も、本願発明の一実施形態である。上記プログラムをコンピュータに実行させることにより、実施形態2に係る撮像装置1による効果と同様の効果を得ることができる。
 以上、本発明の各種実施形態について説明したが、本発明は上記した実施形態に限定されるものではなく、様々な変形例が含まれる。また、上記した実施形態は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施形態の構成の一部を他の実施形態の構成に置き換えることが可能であり、また、ある実施形態の構成に他の実施形態の構成を加えることも可能である。これらは全て本発明の範疇に属するものである。さらに文中や図中に含まれる数値等もあくまで一例であり、異なるものを用いても本発明の効果を損なうものではない。
1…撮像装置、2…外部装置、3…被写体、10…演算制御部、11…プロセッサ、12…メモリ、13…インタフェース、17…操作部、18…表示部、20…光学系部、21…光学系制御部、30…撮像素子、31…撮像素子制御部、40…液晶マスク部、41…液晶マスク制御部、81…光学系、82…撮像素子、90…被写体、91…演算制御装置、D…奥行き、L…光、M,M1,M2,M3,M4…マスク、P…プログラム、P0…マスクなし撮像画像、P1…第1マスクあり撮像画像、P2…第2マスクあり撮像画像、P3…復号化画像、P4…デプスマップ

Claims (14)

  1.  被写体からの光が入射される光学系と、
     前記光学系を通過する前記光を受ける撮像素子と、
     前記被写体から前記光学系に入射する光の入射領域に対し、予め用意された複数のマスクのうちいずれかの前記マスクが設置された状態といずれの前記マスクも設置されていない状態とを作り出すマスク設置部と、
     前記被写体が撮像されるように前記マスク設置部および前記撮像素子を制御するための信号を出力し、前記被写体のマスクなし撮像画像と前記被写体のマスクあり撮像画像とを取得する演算制御部と、を備え、
     前記演算制御部は、
     前記マスクがない状態で前記被写体を撮像することにより前記マスクなし撮像画像を得るマスクなし撮像処理と、
     前記マスクなし撮像画像に含まれるエッジ画像に基づいて代表的なエッジ方向を決定する決定処理と、
     予め用意された複数の前記マスクの中から、前記代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高い前記マスクの組合せを選択する選択処理と、
     選択された前記マスクの組合せに含まれる個々の前記マスクを用いて前記被写体を撮像することにより、複数のマスクあり撮像画像を得るマスクあり撮像処理と、
     複数の前記マスクあり撮像画像に対して、選択された前記マスクに固有の点拡がり関数に基づく復号化を行うことにより、前記被写体の複数の位置での奥行きを表す情報を得る復号化処理と、を行う、
     撮像装置。
  2.  請求項1に記載の撮像装置において、
     前記マスクは、前記光の入射領域の一部に遮光領域を有しており、
     複数の前記マスクは、前記遮光領域の位置が互いに異なる2つ以上の前記マスクである、
     撮像装置。
  3.  請求項2に記載の撮像装置において、
     前記代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高い前記マスクの組合せは、それぞれの主要な開口のずれている方向が前記代表的なエッジ方向に直交する、2つ以上の前記マスクである、
     撮像装置。
  4.  請求項1から請求項3のいずれか一項に記載の撮像装置において、
     前記決定処理は、前記マスクなし撮像画像において予め定められている対象物を検出し、検出された前記対象物の境界に対応するエッジ画像に基づいて前記代表的なエッジ方向を決定する処理である、
     撮像装置。
  5.  請求項1から請求項3のいずれか一項に記載の撮像装置において、
     前記決定処理は、前記マスクなし撮像画像において、濃淡または色のバラつきの程度が上限レベル以下である連続した領域であり閾値以上の面積を有する領域を検出し、検出された前記領域の境界に対応するエッジ画像に基づいて前記代表的なエッジ方向を決定する処理である、
     撮像装置。
  6.  請求項1から請求項3のいずれか一項に記載の撮像装置において、
     前記決定処理は、前記マスクなし撮像画像において、複数の部分画像領域を設定し、前記部分画像領域に含まれるエッジ画像に基づいて前記代表的なエッジ方向を決定する処理である、
     撮像装置。
  7.  請求項1から請求項3のいずれか一項に記載の撮像装置において、
     前記マスク設置部は、液晶光シャッタを有する、
     撮像装置。
  8.  マスクがない状態で被写体を撮像することによりマスクなし撮像画像を得、
     前記マスクなし撮像画像に含まれるエッジ画像に基づいて代表的なエッジ方向を決定し、
     予め用意された複数のマスクの中から、前記代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高い前記マスクの組合せを選択し、
     選択された前記マスクの組合せに含まれる個々の前記マスクを用いて前記被写体を撮像することにより複数のマスクあり撮像画像を得、
     複数の前記マスクあり撮像画像に対して、選択された前記マスクに固有の点拡がり関数に基づく復号化を行うことにより、前記被写体の複数の位置での奥行きを表す情報を得る、
     被写体奥行き推定方法。
  9.  請求項8に記載の被写体奥行き推定方法において、
     前記マスクは、前記被写体から前記被写体の撮像に用いる光学系に入射する光の入射領域に対し、前記入射領域の一部に遮光領域を有しており、
     複数の前記マスクは、前記遮光領域の位置が互いに異なる2つ以上の前記マスクである、
     被写体奥行き推定方法。
  10.  請求項9に記載の被写体奥行き推定方法において、
     前記代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高い前記マスクの組合せは、それぞれの前記遮光領域のずれている方向が前記代表的なエッジ方向に直交する、2つ以上の前記マスクである、
     被写体奥行き推定方法。
  11.  請求項8から請求項10のいずれか一項に記載の被写体奥行き推定方法において、
     前記マスクなし撮像画像において予め定められている対象物を検出し、検出された前記対象物の境界に対応するエッジ画像に基づいて前記代表的なエッジ方向を決定する、
     被写体奥行き推定方法。
  12.  請求項8から請求項10のいずれか一項に記載の被写体奥行き推定方法において、
     前記マスクなし撮像画像において、濃淡または色のバラつきの程度が上限レベル以下である連続した領域であり閾値以上の面積を有する領域を検出し、検出された前記領域の境界に対応するエッジ画像に基づいて前記代表的なエッジ方向を決定する、
     被写体奥行き推定方法。
  13.  請求項8から請求項10のいずれか一項に記載の被写体奥行き推定方法において、
     前記マスクなし撮像画像において、複数の部分画像領域を設定し、前記部分画像領域に含まれるエッジ画像に基づいて前記代表的なエッジ方向を決定する、
     被写体奥行き推定方法。
  14.  コンピュータに、
     マスクがない状態で被写体を撮像することによりマスクなし撮像画像を得るマスクなし撮像処理と、
     前記マスクなし撮像画像に含まれるエッジ画像に基づいて代表的なエッジ方向を決定する決定処理と、
     予め用意された複数の前記マスクの中から、前記代表的なエッジ方向と同じ方向のエッジを表す画像に対応する物体の奥行き推定精度が相対的に最も高い前記マスクの組合せを選択する選択処理と、
     選択された前記マスクの組合せに含まれる個々の前記マスクを用いて前記被写体を撮像することにより、複数のマスクあり撮像画像を得るマスクあり撮像処理と、
     複数の前記マスクあり撮像画像に対して、選択された前記マスクに固有の点拡がり関数に基づく復号化を行うことにより、前記被写体の複数の位置での奥行きを表す情報を得る復号化処理と、を行わせるためのプログラム。
PCT/JP2023/014410 2022-06-28 2023-04-07 撮像装置、被写体奥行き推定方法、およびプログラム WO2024004316A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022-103327 2022-06-28
JP2022103327 2022-06-28

Publications (1)

Publication Number Publication Date
WO2024004316A1 true WO2024004316A1 (ja) 2024-01-04

Family

ID=89381992

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2023/014410 WO2024004316A1 (ja) 2022-06-28 2023-04-07 撮像装置、被写体奥行き推定方法、およびプログラム

Country Status (1)

Country Link
WO (1) WO2024004316A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080137059A1 (en) * 2006-06-05 2008-06-12 University Of Colorado Method And System For Optical Imaging And Ranging
JP2011095027A (ja) * 2009-10-28 2011-05-12 Kyocera Corp 撮像装置
JP2015154112A (ja) * 2014-02-10 2015-08-24 キヤノン株式会社 画像処理装置、その制御方法およびプログラム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080137059A1 (en) * 2006-06-05 2008-06-12 University Of Colorado Method And System For Optical Imaging And Ranging
JP2011095027A (ja) * 2009-10-28 2011-05-12 Kyocera Corp 撮像装置
JP2015154112A (ja) * 2014-02-10 2015-08-24 キヤノン株式会社 画像処理装置、その制御方法およびプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YUICHI TAKEDA, SHINSAKU HIURA, KOSUKE SATO: "Fusion of Depth from Defocus using coded aperture and stereo method", IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, DENSHI JOUHOU TSUUSHIN GAKKAI, JOUHOU SHISUTEMU SOSAIETI, JP, vol. J96-D, no. 8, 1 August 2013 (2013-08-01), JP , pages 1688 - 1700, XP009551652, ISSN: 1880-4535 *

Similar Documents

Publication Publication Date Title
US9800856B2 (en) Systems and methods for synthesizing images from image data captured by an array camera using restricted depth of field depth maps in which depth estimation precision varies
JP5387856B2 (ja) 画像処理装置、画像処理方法、画像処理プログラムおよび撮像装置
JP6140935B2 (ja) 画像処理装置、画像処理方法、画像処理プログラム、および撮像装置
JP5868183B2 (ja) 撮像装置及び撮像方法
JP5919563B2 (ja) 動き推定装置、奥行き推定装置、及び動き推定方法
JP6489932B2 (ja) 画像処理装置、撮像装置、画像処理方法およびプログラム
JP5374119B2 (ja) 距離情報取得装置、撮像装置、及びプログラム
JP2007199633A (ja) 合焦検出装置
JP7104294B2 (ja) 測距カメラ
JP7104296B2 (ja) 測距カメラ
JP2009080113A (ja) 距離推定方法、距離推定装置、撮像装置およびコンピュータ読み取り可能な媒体
JP2016219974A (ja) 撮影装置及び撮影方法、画像処理装置及び画像処理方法、並びにプログラム
JP4866147B2 (ja) 画像シフト検出方法および装置および画像入力装置
JP2015194736A (ja) 撮像装置およびその制御方法
JP2015142364A (ja) 画像処理装置、撮像装置、及び画像処理方法
JP2001174696A (ja) カラー撮像装置
US11593958B2 (en) Imaging device, distance measurement method, distance measurement program, and recording medium
WO2024004316A1 (ja) 撮像装置、被写体奥行き推定方法、およびプログラム
JP4668863B2 (ja) 撮像装置
JP5673764B2 (ja) 画像処理装置、画像処理方法、画像処理プログラムおよび記録媒体
EP4306904A1 (en) Calibration method for distance measurement device, distance measurement device, and storage medium
JP6136364B2 (ja) デフォーカス量検出装置およびカメラ
JP2019134431A (ja) 画像処理装置、撮像装置、画像処理方法およびプログラム
WO2024079998A1 (ja) 撮像装置、被写体奥行き推定方法、およびプログラム
WO2023026701A1 (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: 23830770

Country of ref document: EP

Kind code of ref document: A1