WO2013069279A1 - 撮像装置 - Google Patents

撮像装置 Download PDF

Info

Publication number
WO2013069279A1
WO2013069279A1 PCT/JP2012/007149 JP2012007149W WO2013069279A1 WO 2013069279 A1 WO2013069279 A1 WO 2013069279A1 JP 2012007149 W JP2012007149 W JP 2012007149W WO 2013069279 A1 WO2013069279 A1 WO 2013069279A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
focus
unit
digital
focus position
Prior art date
Application number
PCT/JP2012/007149
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 WO2013069279A1 publication Critical patent/WO2013069279A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/28Systems for automatic generation of focusing signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/958Computational photography systems, e.g. light-field imaging systems for extended depth of field imaging
    • H04N23/959Computational photography systems, e.g. light-field imaging systems for extended depth of field imaging by adjusting depth of field during image capture, e.g. maximising or setting range based on scene characteristics
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/28Systems for automatic generation of focusing signals
    • G02B7/36Systems for automatic generation of focusing signals using image sharpness techniques, e.g. image processing techniques for generating autofocus signals
    • 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
    • G03B13/00Viewfinders; Focusing aids for cameras; Means for focusing for cameras; Autofocus systems for cameras
    • G03B13/32Means for focusing
    • G03B13/34Power focusing
    • G03B13/36Autofocus systems

Definitions

  • the present disclosure relates to an imaging apparatus that calculates depth information from a captured image.
  • Patent Document 1 discloses a technique for generating a parallax image based on an input image and depth information.
  • DFF From Focus
  • Patent Document 2 calculates depth information in an image by mathematically analyzing the degree of blurring of the image using a technique called Depth from Defocus (hereinafter referred to as “DFD”). .
  • Patent Document 2 discloses a method of changing the focus position based on conditions such as the subject being close to the camera and the captured image being a distant view.
  • Patent Document 2 The method described in Patent Document 2 is effective in ensuring the accuracy of subject distance calculation in the vicinity of the subject by photographing an image focused on the vicinity of the assumed subject.
  • both DFF and DFD use the correlation between image depth information and the degree of blur. Therefore, the depth information of the image cannot be accurately calculated based on the information on the degree of blur under the situation where the degree of blur does not change even though the depth information of the image is different. If the depth information is calculated under such a situation, an inappropriate calculation value is obtained, which may adversely affect subsequent processing.
  • the present disclosure has been made in view of the above-described reasons, and an object of the present disclosure is to capture an image that can solve the above-described problem by performing shooting while excluding a focus position where it is difficult to calculate the subject distance. Is to provide a device.
  • an imaging apparatus images a subject and acquires a digital image, and forms an optical image of the subject at a predetermined position of the imaging unit.
  • An optical system a setting unit that sets an allowable range of a focus position of a captured image, and a focus adjustment that drives the optical system to adjust the focus position of the captured image within the allowable range set by the setting unit
  • an information generation unit that generates information about the distance from the imaging device to the subject based on a plurality of digital images having the same scene and different in-focus positions acquired by the imaging unit, and the setting The unit sets an allowable range of a focus position of a digital image to be photographed later among the plurality of digital images based on a focus range of the digital image obtained by photographing first.
  • the imaging apparatus without using additional hardware such as a distance meter, it is possible to prevent an image from being captured in a situation where it is difficult to calculate depth information, and to improve the accuracy of depth information. . In addition, post-processing based on incorrect depth information can be prevented.
  • Schematic diagram showing the configuration of the digital camera according to the first embodiment of the present disclosure Schematic diagram showing the relationship between focus position (distance) and focus level Flow chart showing the flow of depth information calculation processing Schematic diagram showing the relationship between the best focus position (distance) and the degree of focus for calculating depth information
  • the flowchart which shows an example of the process which judges whether depth information is calculated by a controller
  • the flowchart which shows the modification of the process which judges whether depth information is calculated by a controller
  • Schematic diagram showing the relationship between subject size and subject image size in real space The flowchart which shows the further modification of the process which judges whether depth information is calculated by a controller.
  • the flowchart which shows the further modification of the process which judges whether depth information is calculated by a controller.
  • FIG. 2A schematically shows the principle of the DFF described above.
  • DFF digital image processing circuitry
  • the degree of focus is compared for each pixel between the images, and the depth information is calculated based on the in-focus position assigned to the image with a higher degree of focus.
  • the depth information of the pixel with the higher focus degree in the image I1 is set to d1
  • the depth information of the pixel with the higher focus degree in the image I2 is set to d2.
  • the camera has a depth of field.
  • the depth of field is a range in which a clear image can be taken before and after the focused subject. Since such a depth of field exists, the degree of focus of the image takes a substantially maximum value within the range of the depth of field as shown in FIG. For this reason, in FIG. 2B, in the range where the focus level does not change between the two images (the range where the focus level is almost the maximum value in any image), any image with a higher focus level is selected.
  • the present inventor has found that there is a problem that depth information cannot be uniquely determined for that reason. Specifically, when the in-focus positions of two images are extremely close, for example, when shooting an image in which a background wall exists behind a human image, such a problem occurs, and the calculated depth Information accuracy is reduced.
  • FIG. 1 is a schematic diagram showing a digital camera 1 according to the first embodiment.
  • FIG. 1 is a block diagram showing the configuration of the digital camera 1.
  • the digital camera 1 includes an optical system 110, a zoom motor 120, an OIS actuator 130, a focus motor 140, a CCD image sensor 150, an image processing unit 160, a memory 200, a controller 210, a gyro sensor 220, a card slot 230, a memory card 240, and an operation.
  • the configuration includes a member 250, a zoom lever 260, a liquid crystal monitor 270, an internal memory 280, and a mode setting button 290.
  • the optical system 110 includes a zoom lens 111, an OIS 112, and a focus lens 113.
  • the zoom lens 111 can enlarge or reduce the subject image by moving along the optical axis of the optical system.
  • the zoom lens 111 is controlled by a zoom motor 120.
  • the OIS 112 has a correction lens that can move in a plane perpendicular to the optical axis.
  • the OIS 112 reduces the blur of the subject image by driving the correction lens in a direction that cancels the blur of the digital camera 1.
  • the correction lens can move from the center by a maximum L within the OIS 112.
  • the OIS 112 is controlled by the OIS actuator 130.
  • the focus lens 113 adjusts the focus of the subject image by moving along the optical axis of the optical system.
  • the focus lens 113 is driven by a focus motor 140.
  • a focus motor 140 that drives the focus lens 113 adjusts the focus position of the captured image under the instruction of the focus adjustment unit 213 of the controller 210.
  • the zoom motor 120 drives and controls the zoom lens 111.
  • the zoom motor 130 may be realized by a pulse motor, a DC motor, a linear motor, a servo motor, or the like.
  • the zoom motor 130 may drive the zoom lens 111 via a mechanism such as a cam mechanism or a ball screw.
  • the OIS actuator 130 drives and controls the correction lens in the OIS 112 in a plane perpendicular to the optical axis.
  • the OIS actuator 130 can be realized by a planar coil or an ultrasonic motor.
  • the focus motor 140 drives and controls the focus lens 113.
  • the focus motor 140 may be realized by a pulse motor, a DC motor, a linear motor, a servo motor, or the like.
  • the focus motor 140 may drive the focus lens 113 via a mechanism such as a cam mechanism or a ball screw.
  • the CCD image sensor 150 captures a subject image formed by the optical system 110 and generates an image signal.
  • the CCD image sensor 150 performs various operations such as exposure, transfer, and electronic shutter.
  • the image processing unit 160 performs various processes on the image signal generated by the CCD image sensor 150.
  • the image processing unit 160 processes the image signal and generates image data to be displayed on the liquid crystal monitor 270 (hereinafter, an image displayed based on the image data is referred to as a “review image”). Or an image signal to be stored again in the memory card 240 is generated.
  • the image processing unit 160 performs various image processing such as gamma correction, white balance correction, and flaw correction on the image signal.
  • the image processing unit 160 compresses the image signal by the compression format or the like conforming to the JPEG standard for the processed image signal.
  • the image processing unit 160 is a depth information calculation unit 162 that calculates depth information of a shooting scene from images shot at different in-focus positions, and a focus determination unit that determines whether or not the shot image is in focus. 163, a face detection unit 164 for detecting a human face image from the photographed image. A specific procedure for calculating the depth information will be described later.
  • the image processing unit 160 performs various image processing such as parallax image generation and blurring processing for synthesizing parallax according to the depth information calculated by the depth information calculation unit 162.
  • the image processing unit 160 can be realized by a DSP or a microcomputer.
  • the resolution of the review image may be set to the screen resolution of the liquid crystal monitor 270, or may be set to the resolution of image data that is compressed and formed by a compression format or the like conforming to the JPEG standard.
  • the memory 200 functions as a work memory for the image processing unit 160 and the controller 210.
  • the memory 200 temporarily stores an image signal processed by the image processing unit 160 or image data input from the CCD image sensor 150 before being processed by the image processing unit 160.
  • the memory 200 temporarily stores shooting conditions of the optical system 110 and the CCD image sensor 150 at the time of shooting.
  • the shooting conditions indicate subject distance, field angle information, ISO sensitivity, shutter speed, EV value, F value, distance between lenses, shooting time, OIS shift amount, and the like.
  • the memory 200 can be realized by, for example, a DRAM or a ferroelectric memory.
  • the controller 210 is a control means for controlling the entire operation of the digital camera 1.
  • the controller 210 can be realized by a semiconductor element or the like.
  • the controller 210 may be configured only by hardware, or may be realized by combining hardware and software.
  • the controller 210 can be realized by a microcomputer or the like.
  • the controller 210 includes a setting unit 212 that sets an allowable range of a focus position of a captured image, and a focus adjustment unit 213 that operates the focus motor 140.
  • the setting unit 212 is a digital image obtained by first photographing an allowable range of a focus position of a digital image to be photographed later among a plurality of digital images photographed by changing a focus position. Set based on the in-focus range.
  • the focus adjustment unit 213 operates the focus motor 140 in accordance with the allowable range set by the setting unit 212.
  • the focus adjustment unit 213 performs a focus operation using a contrast AF method that searches the in-focus position of the captured image by driving the focus lens 113 based on the contrast of the captured image.
  • the focus method is a phase difference detection AF method in which light entering from the optical system is divided into two and guided to a dedicated sensor, and the direction and amount of focus are judged from the interval between the two images formed on the sensor. There may be.
  • the gyro sensor 220 is composed of a vibration material such as a piezoelectric element.
  • the gyro sensor 220 vibrates a vibration material such as a piezoelectric element at a constant frequency, converts a force generated by the Coriolis force into a voltage, and obtains angular velocity information.
  • the gyro sensor 220 may be any device that can measure at least the angular velocity information of the pitch angle. Further, when the gyro sensor 220 can measure the angular velocity information of the roll angle, it is possible to consider the rotation when the digital camera 1 moves in a substantially horizontal direction.
  • the memory card 240 can be inserted into the card slot 230.
  • the card slot 230 can be mechanically and electrically connected to the memory card 240.
  • the memory card 240 includes a flash memory, a ferroelectric memory, and the like, and can store data.
  • the operation member 250 includes a release button.
  • the release button receives a user's pressing operation. When the release button is pressed halfway, AF control and AE control are started via the controller 210. When the release button is fully pressed, the subject is photographed.
  • the zoom lever 260 is a member that receives a zoom magnification change instruction from the user.
  • the liquid crystal monitor 270 is a display device that can display an image signal generated by the CCD image sensor 150 or an image signal read from the memory card 240.
  • the liquid crystal monitor 270 can display various setting information of the digital camera 1.
  • the liquid crystal monitor 270 can display EV values, F values, shutter speeds, ISO sensitivity, and the like, which are shooting conditions at the time of shooting.
  • the internal memory 280 is configured by a flash memory, a ferroelectric low memory, or the like.
  • the internal memory 280 stores a control program for controlling the entire digital camera 1 and the like.
  • the mode setting button 290 is a button for setting a shooting mode when shooting with the digital camera 1.
  • the “shooting mode” indicates a shooting scene assumed by the user. For example, (1) portrait mode, (2) child mode, (3) pet mode, (4) macro mode, (5) landscape mode 2D shooting mode including (6) 3D shooting mode. Note that a 3D shooting mode may be provided for each of (1) to (5).
  • the digital camera 1 performs shooting by setting appropriate shooting parameters based on this shooting mode. Note that a camera automatic setting mode in which the digital camera 1 automatically sets shooting parameters may be included.
  • the mode setting button 290 also serves as a button for setting a reproduction mode of an image signal recorded on the memory card 240.
  • the distance measuring unit 300 measures the in-focus position at that time.
  • a method for measuring the in-focus position for example, a method for reading the position of the focus lens 113 or a method for obtaining the in-focus position based on the driving amount when the focus lens 113 is in focus can be used.
  • FIG. 3 is a flowchart showing a procedure for calculating depth information by DFF.
  • a plurality of images I1 and I2 having different in-focus positions are acquired by the optical system 110 and the CCD image sensor 150 (step S101).
  • the optical system 110 and the CCD image sensor 150 In the following, a case where two images are used will be described, but three or more images may be used. Note that how to select the focus position of each image will be described later.
  • the degree of focus indicating the degree of focus is calculated (step S102).
  • the degree of focusing is defined for each pixel or a block of a plurality of pixels.
  • a specific method for calculating the degree of focus for example, as disclosed in Non-Patent Document 1, there is a method using entropy or dispersion of pixel values of pixels within a certain range centered on each pixel.
  • the degree of focus can be calculated using other commonly used indicators.
  • the degree of focus is compared between the corresponding pixels or blocks of the two images, and the depth is assigned (step S103). Specifically, among the two images, the in-focus position of the image having the maximum in-focus degree is assigned as depth information of the pixel or block. Similarly, when three or more images are used, the in-focus position of the image having the maximum in-focus degree is assigned as depth information.
  • the high in-focus range due to the depth of field of each image does not overlap.
  • a position at which it is possible to determine which image has a high degree of focus as a result of comparing the degrees of focus in pixels or blocks in the two captured images is set as the focus position.
  • the setting unit 212 sets the permissible range of the focus position of a digital image to be photographed later among the plurality of digital images, the depth of field range of the digital image obtained by photographing first, and the digital image to be photographed later. Set so that it does not overlap with the depth of field range.
  • the setting unit 212 is a digital image to be taken later among a plurality of digital images in order to prevent a reduction in accuracy of depth information due to comparison between blurred images.
  • the allowable range of the in-focus position is set so that the depth-of-field range of the digital image obtained by first photographing and the depth-of-field range of the digital image photographed later are adjacent to each other.
  • FIG. 2C an area having a low focus degree is not formed in both of the two images.
  • hyperfocal distance H is obtained by the following [Equation 1].
  • f represents the focal length of the optical system 110
  • F represents the F number of the optical system 110
  • C represents the allowable circle of confusion.
  • the front end DN and the rear end DF of the depth of field when focusing on an arbitrary position d is expressed by the following [Expression 2] using the hyperfocal distance H.
  • the depth of field range with a high degree of focus does not overlap with the depth of field range of the first image.
  • the in-focus position can be determined in the same manner even when there are three or more images. .
  • the focus adjustment unit 213 is a contrast AF method that drives the focus lens 113 based on the contrast of the optical image and searches for the in-focus position of the captured image.
  • FIG. 5 is a flowchart showing a flow of processing in which the controller 210 controls the operation of the image processing unit 160.
  • the controller 210 controls the operation of the image processing unit 160.
  • the second image is photographed at a focus position at infinity, and then the first image is focused.
  • the digital camera 1 captures a second image at a focus position at infinity (step S200). That is, the focus adjustment unit 213 drives the focus lens 113 and captures the second image in a state where the focus lens 113 is focused on a position far from the above-described hyperfocal distance.
  • the focus adjustment unit 213 confirms the contrast of the captured image while driving the focus lens 113, thereby performing focusing to search for an in-focus position (Ste S201).
  • the range for searching whether the image is in focus is allowed only before d1 expressed by the equation [3].
  • step S202 it is determined whether or not there is a focus within the search permission range. Note that the determination as to whether the subject is in focus is performed by the focus determination unit 163 using a known method. Here, as described above, the contrast of the captured image is derived, and it is determined that the focus lens 113 at which the contrast is the highest is in focus.
  • step S202 If it is determined in step S202 that the focus has been achieved, the first image is taken with the release button on the operation member 250 being fully pressed as a trigger (step S203). On the other hand, if it is not determined in step S202 that the subject is in focus, such as when there is no subject in the proximity area, the processing ends.
  • depth information is calculated based on the first image and the second image (step S204). Specifically, the first and second image pixels are derived by deriving the degree of focus indicating the degree of focus for each pixel of both images and comparing the degree of focus of both images for each pixel. Set the depth information for each.
  • an image (first image) is taken at a focus position where the focus position at infinity overlaps the depth of field range, that is, a focus position that is inappropriate for the calculation of depth information. Can be deterred. Thereby, the precision of the set depth information can be improved.
  • the operation of capturing the second image first and then capturing the first image has been described.
  • the present embodiment is not limited to the above, and an operation of capturing the first image first and then capturing the second image may be performed.
  • the range for searching for the focus in step S201 is permitted to be limited to the back of d2 expressed by the equation [4].
  • step S202 determines that the subject is in focus
  • the process is terminated as it is.
  • the shooting conditions are changed so that a focus position where the infinite focus range and the depth of field range do not overlap is obtained, and then the processing from step S201 is repeated again. Also good.
  • the shooting condition is changed so that the in-focus range and the depth of field range do not overlap with each other so that focus is achieved.
  • the aperture and zoom adjustments may be performed by the user according to an appropriate guidance message or the like, or may be performed automatically by the controller 210.
  • FIG. 6 is a flowchart illustrating a flow of a modification of the process in which the controller 210 controls the operation of the image processing unit 160.
  • the face detection unit 164 detects a human face image from the first image, and determines whether or not to calculate depth information using the result.
  • steps S300, S301, S302, S303, and S305 of FIG. 6 are the same as steps S200, S201, S202, S203, and S204 of Example 1, respectively, and thus description thereof is omitted.
  • step S304 the face detection unit 164 detects a human face image from the first image.
  • processing for calculating depth information is executed.
  • the threshold value for the size of the face image is determined as follows. From FIG. 7, an object having a size e at a distance d from the principal point of the optical system forms an image having a size e 'at a position d' from the principal point. From FIG. 7, since the object and the image are similar, the formula [6] is established.
  • the interocular distance e ′ on the image is obtained by using, for example, a human interocular distance of approximately 60 mm to 65 mm as e. Further, e ′ obtained by the equation [9] is the image size itself, and can be converted into the number of pixels on the image according to the size of one pixel of the CCD image sensor 150.
  • an index that can be obtained relatively stably such as the size of a person's face image, is added to the determination based on whether or not the subject is in focus.
  • an index that can be obtained relatively stably such as the size of a person's face image
  • focusing by autofocus may focus on subjects other than the main subject depending on the algorithm.
  • a human face image which is an important subject, is detected to exceed a predetermined size, it may be considered that focusing by autofocus focuses on an accurate subject. If the face image is larger than a predetermined size, the person who is the subject is considered to be at a close distance from the digital camera 1.
  • depth information is calculated when a focus is achieved and a face of a predetermined size is detected.
  • this may be changed so that depth information is calculated when a face is in focus or a face of a predetermined size is detected.
  • the focus adjustment unit 213 is a contrast AF method in which the focus lens 113 is driven based on the contrast of the optical image to search for the in-focus position of the captured image.
  • the range for searching whether the focus is in focus in the contrast AF method is limited to a range in front of d1 expressed by the formula [5]. It was. However, in this example, a mode will be described in which the search permission range is not provided as described above and the in-focus position is fixed at d1.
  • FIG. 8 is a flowchart showing a flow of processing for controlling the operation of the image processing unit 160 by the controller 210.
  • steps S400, S403, and S404 in FIG. 8 are the same as steps S200, S201, S203, and S204 in Example 1, and a description thereof will be omitted.
  • step S401 focusing is performed in order to capture the first image at a predetermined focus position d1 (step S401). At this time, the in-focus position is not searched by driving the focus lens 113, and the in-focus position is fixed at d1 expressed by the formula [5].
  • step S401 it is determined whether or not the focus is in focus at the focus position d1 in step S401 based on the contrast value of the photographed image (step S402), and when it is determined that the focus is in focus at the focus position d1. Advances to the first image capturing process (step S403). On the other hand, if it is determined that there is no focus at the in-focus position d1, such as when there is no subject in the proximity region of the in-focus position d1, the process ends.
  • the first image is shot at the in-focus position where the in-focus range of the second image and the depth-of-field range overlap, that is, the in-focus position inappropriate for calculating depth information. Can be suppressed. Thereby, the precision of the set depth information can be improved.
  • FIG. 9 is a flowchart showing the flow of processing for controlling the operation of the image processing unit 160 by the controller 210.
  • the focus position of the second image is set to infinity and the first image is focused.
  • the digital camera 1 captures a second image at a focus position at infinity (step S500). That is, the focus adjustment unit 213 drives the focus lens 113 and captures the second image in a state where the focus lens 113 is focused on a position far from the above-described hyperfocal distance.
  • the controller 210 divides the light entering from the optical system 110 into two and guides it to a dedicated sensor, and detects the first image by phase difference detection that analyzes the interval between the two images formed on the sensor.
  • the focus position (the direction of focus and the direction and amount of movement of the focus lens 113) is derived (S501).
  • the controller 210 determines whether or not the in-focus position of the first image derived in step S501 is within an allowable range (S502).
  • the permissible range is, for example, a range before d1 represented by [Expression 4].
  • the process proceeds to step S503.
  • the processing is ended as it is.
  • step S502 If it is determined in step S502 that the focus position of the first image is within the allowable range, the focus adjustment unit 213 moves the focus lens 113 based on the result derived in step S501 to adjust the focus position. Then, the first image is taken (S503).
  • depth information is calculated based on the first image and the second image (step S504).
  • the first and second image pixels are derived by deriving the degree of focus indicating the degree of focus for each pixel of both images and comparing the degree of focus of both images for each pixel. Set the depth information for each.
  • the first image is shot at the in-focus position where the in-focus range of the second image and the depth-of-field range overlap, that is, the in-focus position inappropriate for calculating depth information. Can be suppressed. Thereby, the precision of the set depth information can be improved.
  • step S502 if it is determined in step S502 that the in-focus position of the first image is outside the allowable range, the process is terminated as it is. However, instead of ending the process, the shooting conditions are changed so that a focus position where the focus range at infinity and the depth of field range do not overlap is obtained, and then the processes after step S501 are repeated again. The same may be applied to Examples 1 and 2.
  • the digital camera 1 according to the first embodiment is effective even when the focus position of the second image is so-called overinf, that is, when the second image is focused farther than infinity. Function.
  • the focus lens 113 is driven by the focus motor 140 and moves along the optical axis of the optical system 110 to adjust the focus of the subject image. At this time, the focus lens 113 moves from a focus position corresponding to a subject at a finite distance to a focus position corresponding to a subject at infinity, and further to a position beyond the focus position corresponding to infinity. Sometimes. This lens state is overinf.
  • FIG. 10 is a schematic diagram showing the relationship between the focus position (distance) and the focus degree when the image I2 is in the overinf state.
  • the permissible range of the in-focus position of the image I1 is the depth of field of the image I2 obtained by shooting first.
  • the range and the depth of field range of the image I2 to be captured later are set to be adjacent to each other. As a result, as shown in FIG. 2C, an area having a low focus degree is not formed in both of the two images.
  • the focus position that is the basis of the depth information is always determined when the focus degree of at least one of the images is high. As a result, it is possible to prevent comparison in a region where the accuracy of the focusing degree itself is low and to obtain more accurate depth information.
  • the digital image to which the generated depth information is assigned or various post-processing is performed based on the generated depth information is a digital image different from the plurality of digital images used to obtain the depth information. May be. That is, it is possible to shoot substantially the same scene separately from the plurality of digital images used to obtain the depth information, assign depth information to the captured image, or perform post-processing using the depth information. Is possible.
  • the digital camera 1 captures a subject and acquires a digital image
  • the CCD image sensor 150 an example of an imaging unit
  • An optical system 110 that forms an image at a predetermined position of the CCD image sensor 150, a setting unit 212 that sets an allowable range of a focus position of a captured image, and an allowable range that is set by the setting unit 212 by driving the optical system 110.
  • a depth information calculation unit 162 (an example of an information generation unit) that generates information on the information, and the setting unit 212 includes a plurality of digital images.
  • the setting unit 212 sets the permissible range of the focus position of a digital image to be photographed later among a plurality of digital images, and the depth of field range of the digital image obtained by photographing first. Further, the setting may be made so that the depth of field range of a digital image to be photographed later does not overlap.
  • the coverage of the digital image obtained by first photographing is set.
  • the depth of field range is set so that the depth of field range of a digital image to be captured later does not overlap.
  • the setting unit 212 sets the permissible range of the focus position of a digital image to be photographed later among a plurality of digital images, and the depth of field range of the digital image obtained by photographing first. And a depth-of-field range of a digital image to be photographed later may be set adjacent to each other.
  • the coverage of the digital image obtained by first photographing is set.
  • the depth-of-field range is set so that the depth-of-field range of a digital image to be captured later is adjacent.
  • the setting unit 212 determines that the first image (a digital image to be captured later) is obtained when the focus range of the second image (a digital image obtained by first capturing) is infinity.
  • the permissible range of the in-focus position may be set closer to the apparatus side of the digital camera 1 than the position d shown by the following [Equation 10].
  • f is the focal length of the imaging unit
  • F is the F number of the imaging unit
  • C is the allowable circle of confusion.
  • the focus range of the second image digital image obtained by shooting first
  • the depth of field range of the first image digital image to be shot later
  • the focus adjustment unit 213 may search the in-focus position of the captured image by driving the optical system 110 based on the imaging state of the optical image on the CCD image sensor 150.
  • the optical system 110 may be driven based on the phase difference detection method.
  • the present disclosure can be applied to the digital camera 1 regardless of the type of the autofocus method employed by the focus adjustment unit 213.
  • the digital camera 1 further includes a focus determination unit 163 that determines whether or not the digital image acquired by the CCD image sensor 150 is in focus, and is later photographed by the focus determination unit 163.
  • the depth information calculation unit 162 may generate information on the distance from the digital camera 1 to the subject based on the plurality of digital images. Good.
  • depth information can be obtained with high accuracy using a high degree of focus in at least a part of the first image (digital image taken later).
  • the digital camera 1 further includes a face detection unit 164 that detects a human face image from the digital image acquired by the CCD image sensor 150, and the face detection unit 164 detects the first image (later When a face image larger than a predetermined size is detected from the captured digital image), the depth information calculation unit 162 determines the distance from the digital camera 1 (an example of an imaging device) to the subject based on the plurality of digital images. Information may be generated.
  • the first image (a digital image captured later) is captured at a sufficiently short distance using a relatively stable index of the size of the face image in the digital image. it can.
  • the in-focus position between the second image (a digital image captured first) and the first image (a digital image captured later) is It becomes easy to secure a separated state. Therefore, the accuracy of information relating to the distance from the digital camera 1 to the obtained subject, that is, depth information is improved.
  • the first embodiment has been described as an example of the technique disclosed in the present application.
  • the technology in the present disclosure is not limited to this, and can also be applied to an embodiment in which changes, replacements, additions, omissions, and the like are appropriately performed.
  • each block may be individually made into one chip by a semiconductor device such as an LSI, or may be made into one chip so as to include a part or the whole.
  • LSI LSI
  • IC system LSI
  • super LSI ultra LSI depending on the degree of integration
  • the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor.
  • An FPGA Field Programmable Gate Array
  • a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.
  • each process of the above embodiment may be realized by hardware or software. Further, it may be realized by mixed processing of software and hardware. Needless to say, when the digital camera according to the above-described embodiment is realized by hardware, it is necessary to adjust timing for performing each process. In the above embodiment, for convenience of explanation, details of timing adjustment of various signals generated in actual hardware design are omitted.
  • the execution order of the processing method in the said embodiment is not necessarily restrict
  • steps S302 and S303 may be interchanged and the face image detection process may be performed first.
  • the second image is taken after the first image is taken instead of taking the second image after making the determination on the first image. You may make it determine about.
  • the focus position of the second image is set to infinity
  • the focus position of the second image may be set to an arbitrary position before infinity.
  • the focusing range of the first image is determined based on the formula [3].
  • examples 1 and 2 of the operation of the controller 210 have been described using two images, three or more images may be used. In that case, the focusing range of each image is determined by applying the formula [3] in order. The more images are used, the more depth information of the images can be obtained.
  • the depth of field needs to be narrowed so that the depth-of-field ranges in each image do not overlap.
  • a compact camera has a large depth of field, but a single-lens reflex camera can set a small depth of field.
  • the imaging apparatus it is possible to prevent depth information from being calculated from an image obtained by shooting at an inappropriate focus position by ensuring shooting under conditions suitable for calculation of depth information.
  • the present disclosure can be applied to all imaging devices including digital cameras (including single-lens reflex cameras and compact cameras).

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Optics & Photonics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Studio Devices (AREA)
  • Automatic Focus Adjustment (AREA)
  • Focusing (AREA)

Abstract

 被写体を撮像して、デジタル画像を取得する撮像部と、被写体の光学像を撮像部の所定位置に結像する光学系と、撮影画像の合焦位置の許容範囲を設定する設定部と、光学系を駆動して、設定部によって設定された許容範囲内で撮影画像の合焦位置を調整するフォーカス調整部と、撮像部によって取得された同一のシーンかつ合焦位置の異なる複数のデジタル画像に基づいて、撮像装置から被写体までの距離に関する情報を生成する情報生成部と、を備え、設定部は、複数のデジタル画像のうち、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の合焦範囲に基づいて設定する。

Description

撮像装置
 本開示は、撮影された画像から深度情報を算出する撮像装置に関するものである。
 ある3次元シーンの深度情報、すなわち注目する被写体から前記被写体を撮影するカメラまでの距離に関する情報に基づいて、撮影画像に様々な処理を施す手法が提案されている。例えば、特許文献1では、入力画像と深度情報とを元に視差画像を生成する手法が開示されている。
 一方、このような処理を行う上では、処理を施す画像自体から深度情報を算出するのが装置の簡便化などの面で都合が良い。例えば、単一の視点から、同一のシーンかつ合焦位置の異なる複数枚の画像を撮影し、各画像のボケ具合(合焦度)を比較することで、画像内の深度情報を算出するDepth from Focus(以下、「DFF」と表記する。)という手法がある。この手法は、視差情報を得るための複数台のカメラを必要としないなどの利点がある。
 また、特許文献2は、Depth from Defocus(以下、「DFD」と表記する。)という手法を用いて、画像のボケ具合を数学的に解析することで、画像内の深度情報を算出している。特許文献2は、被写体がカメラに近接している、撮影画像が遠景であるなどの条件に基づいて合焦位置を変える手法を開示している。
特許第4392060号公報 特開2007-139894号公報 "A Perspective on Range Finding Techniques for Computer Vision",R.A.Jarvis,IEEE Transactions on Pattern Analysis and Machine Intelligence,VOL.PAMI-5,No.2,pp.122-139,March 1983
 特許文献2に記載の手法は、想定している被写体の近傍に合焦した画像を撮影することで、被写体の近傍における被写体距離算出の精度を確保することには有効である。しかしながら、DFFとDFDとのいずれも、画像の深度情報とボケ具合との相関を利用している。したがって、画像の深度情報が異なるにも関わらず、ボケ具合が変化しないような状況下では、ボケ具合の情報に基づいて、画像の深度情報を的確に算出することはできない。このような状況下において深度情報を算出すると不適切な算出値が得られるため、その後の処理にも悪影響を与え得る。
 本開示は、上記事由に鑑みてなされたものであり、本開示の目的は、被写体距離の算出が困難な合焦位置を除外して撮影を行うことによって、上記課題を解決することのできる撮像装置を提供することである。
 上記の目的を達するために、本開示の一態様に係る撮像装置は、被写体を撮像して、デジタル画像を取得する撮像部と、前記被写体の光学像を前記撮像部の所定位置に結像する光学系と、撮影画像の合焦位置の許容範囲を設定する設定部と、前記光学系を駆動して、前記設定部によって設定された許容範囲内で撮影画像の合焦位置を調整するフォーカス調整部と、前記撮像部によって取得された同一のシーンかつ合焦位置の異なる複数のデジタル画像に基づいて、撮像装置から前記被写体までの距離に関する情報を生成する情報生成部と、を備え、前記設定部は、前記複数のデジタル画像のうち、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の合焦範囲に基づいて設定する。
 本開示にかかる撮像装置によれば、距離計などの追加のハードウェアを用いること無く、深度情報の算出が困難な状況で画像が撮影されることを防ぎ、深度情報の精度を高めることができる。併せて、誤った深度情報に基づいた後処理を防ぐことができる。
本開示の実施の形態1におけるデジタルカメラの構成を示す模式図 合焦位置(距離)と合焦度との関係を示す模式図 深度情報算出の処理の流れを示すフローチャート 深度情報の算出に最適な合焦位置(距離)と合焦度との関係を示す模式図 コントローラによって深度情報を算出するか否かを判断する処理の一例を示すフローチャート コントローラによって深度情報を算出するか否かを判断する処理の変形例を示すフローチャート 実空間上での被写体の大きさと被写体像の大きさの関係を示す模式図 コントローラによって深度情報を算出するか否かを判断する処理の更なる変形例を示すフローチャート コントローラによって深度情報を算出するか否かを判断する処理の更なる変形例を示すフローチャート オーバーインフ時における合焦位置(距離)と合焦度との関係を示す模式図
 以下、適宜図面を参照しながら、実施の形態を詳細に説明する。但し、必要以上に詳細な説明は省略する場合がある。例えば、既によく知られた事項の詳細説明や実質的に同一の構成に対する重複説明を省略する場合がある。これは、以下の説明が不必要に冗長になるのを避け、当業者の理解を容易にするためである。
 なお、発明者は、当業者が本開示を十分に理解するために添付図面および以下の説明を提供するのであって、これらによって特許請求の範囲に記載の主題を限定することを意図するものではない。
(実施の形態1)
 以下、本開示をデジタルカメラに適用した場合の実施形態1について、図面を参照しながら説明する。
<深度情報算出の問題点>
 まず、本開示のデジタルカメラが解決する深度情報算出の問題点について説明しておく。前述のDFFの原理を模式的に示したのが、図2(a)である。DFFでは、図2(a)に示す異なる合焦位置d1、d2で撮影された2枚の画像I1、I2の各画素について、ピントの合い具合を示す合焦度が定義される。
 そして、画像間で画素ごとに合焦度を比較し、より合焦度の高い画像に割り当てられた合焦位置によって深度情報を算出する。最も単純には、画像I1の方が合焦度が高い画素の深度情報はd1に、画像I2の方が合焦度が高い画素の深度情報はd2に設定する。
 ここで、カメラには被写界深度が存在する。被写界深度とは、焦点を合わせた被写体の前後で、画像として鮮明に撮影できる範囲のことである。このような被写界深度が存在するため、画像の合焦度は、図2(b)のように、被写界深度の範囲内において略最高値をとる。このため、図2(b)において2枚の画像間で合焦度が変わらない範囲(いずれの画像でも合焦度が略最高値となる範囲)では、より合焦度の高い画像がいずれかを定めることができず、そのために深度情報を一意に定めることができない、という問題が生じることを本発明者は見出した。具体的には、2枚の画像の合焦位置が極めて近い場合、例えば、人物像の後ろに背景となる壁が存在する画像を撮影する場合などに、このような問題が生じ、算出した深度情報の精度が低下する。
 また、上記とは別の問題として、図2(c)のように、2枚の画像の両方で合焦度が低い範囲において合焦度を比較する場合には、ボケた画像同士を比較することになり、合焦度の精度自体が低いことから、比較により求めた深度情報の精度が低下する、という問題も存在する。
 以上の問題点は、画像の深度情報が異なるにも関わらず、ボケ具合が変化しないことに起因しており、DFFのみならず、DFDにおいても同様の問題が生じる。
<デジタルカメラの構成>
 次に、デジタルカメラの構成に関して説明する。
 図1は、本実施形態1におけるデジタルカメラ1を示す模式図である。
 本実施の形態にかかるデジタルカメラ1の電気的構成について図1を用いて説明する。図1は、デジタルカメラ1の構成を示すブロック図である。
 デジタルカメラ1は、光学系110、ズームモータ120、OISアクチュエータ130、フォーカスモータ140、CCDイメージセンサ150、画像処理部160、メモリ200、コントローラ210、ジャイロセンサ220、カードスロット230、メモリカード240、操作部材250、ズームレバー260、液晶モニタ270、内部メモリ280、モード設定ボタン290を備える構成となる。
 光学系110は、ズームレンズ111、OIS112、フォーカスレンズ113を含む。
 ズームレンズ111は、光学系の光軸に沿って移動することにより、被写体像を拡大又は縮小可能である。ズームレンズ111は、ズームモータ120によって制御される。
 OIS112は、内部に光軸に垂直な面内で移動可能な補正レンズを有する。OIS112は、デジタルカメラ1のブレを相殺する方向に補正レンズを駆動することにより、被写体像のブレを低減する。補正レンズは、OIS112内において最大Lだけ中心から移動することが出来る。OIS112は、OISアクチュエータ130によって制御される。
 フォーカスレンズ113は、光学系の光軸に沿って移動することにより、被写体像のピントを調整する。フォーカスレンズ113は、フォーカスモータ140によって駆動される。フォーカスレンズ113を駆動するフォーカスモータ140は、コントローラ210のフォーカス調整部213の指示のもとで、撮影画像の合焦位置を調整する。
 ズームモータ120は、ズームレンズ111を駆動制御する。ズームモータ130は、パルスモータやDCモータ、リニアモータ、サーボモータなどで実現してもよい。ズームモータ130は、カム機構やボールネジなどの機構を介してズームレンズ111を駆動するようにしてもよい。
 OISアクチュエータ130は、OIS112内の補正レンズを光軸と垂直な面内で駆動制御する。OISアクチュエータ130は、平面コイルや超音波モータなどで実現できる。
 フォーカスモータ140は、フォーカスレンズ113を駆動制御する。フォーカスモータ140は、パルスモータやDCモータ、リニアモータ、サーボモータなどで実現してもよい。フォーカスモータ140は、カム機構やボールネジなどの機構を介してフォーカスレンズ113を駆動するようにしてもよい。
 CCDイメージセンサ150は、光学系110で形成された被写体像を撮影して画像信号を生成する。CCDイメージセンサ150は、露光、転送、電子シャッタなどの各種動作を行う。
 画像処理部160は、CCDイメージセンサ150で生成された画像信号に対して各種の処理を施す。画像処理部160は、画像信号に対して処理を施し、液晶モニタ270に表示するための画像データ(以下、この画像データに基づいて表示される画像を「レビュー画像」と表記する。)を生成したり、メモリカード240に再格納するための画像信号を生成したりする。例えば、画像処理部160は、画像信号に対してガンマ補正やホワイトバランス補正、傷補正などの各種画像処理を行う。
 また、画像処理部160は、上記処理された画像信号に対して、それぞれJPEG規格に準拠した圧縮形式等により画像信号を圧縮する。
 さらに、画像処理部160は、異なる合焦位置で撮影された画像から撮影シーンの深度情報を算出する深度情報算出部162、撮影された画像のピントが合っているか否かを判定するピント判定部163、撮影された画像から人物の顔画像を検出する顔検出部164を備える。深度情報算出の具体的な手順については後述する。
 さらに、画像処理部160は、深度情報算出部162によって算出された深度情報に従って視差を合成する視差画像生成やぼかし処理など、種々の画像処理を行う。
 画像処理部160は、DSPやマイコンなどで実現可能である。なお、レビュー画像の解像度は、液晶モニタ270の画面解像度に設定しても構わないし、JPEG規格に準拠した圧縮形式等により圧縮され形成される画像データの解像度に設定しても構わない。
 メモリ200は、画像処理部160及びコントローラ210のワークメモリとして機能する。メモリ200は、例えば、画像処理部160で処理された画像信号若しくは、画像処理部160で処理される前のCCDイメージセンサ150から入力される画像データを一時的に蓄積する。また、メモリ200は、撮影時における光学系110、CCDイメージセンサ150の撮影条件を一時的に蓄積する。撮影条件とは、被写体距離、画角情報、ISO感度、シャッタースピード、EV値、F値、レンズ間距離、撮影時刻、OISシフト量等を示す。メモリ200は、例えば、DRAM、強誘電体メモリなどで実現できる。
 コントローラ210は、デジタルカメラ1の動作全体を制御する制御手段である。コントローラ210は、半導体素子などで実現可能である。コントローラ210は、ハードウェアのみで構成してもよいし、ハードウェアとソフトウェアとを組み合わせることにより実現してもよい。コントローラ210は、マイコンなどで実現できる。
 また、コントローラ210は、撮影画像の合焦位置の許容範囲を設定する設定部212と、フォーカスモータ140を動作させるフォーカス調整部213とを備えている。詳細は後述するが、設定部212は、合焦位置を変えて撮影する複数のデジタル画像のうち、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の合焦範囲に基づいて設定する。
 そして、フォーカス調整部213は、設定部212の設定した許容範囲に応じてフォーカスモータ140を動作させる。なお、本実施形態では、フォーカス調整部213は、撮影画像のコントラストに基づいてフォーカスレンズ113を駆動して撮影画像の合焦位置を探索するコントラストAF方式を用いてフォーカス動作を行う。しかしながら、フォーカス方式は、光学系から入った光を2つに分けて専用のセンサへ導き、センサ上で結像した2つの画像の間隔からピントの方向と量を判断する位相差検出AF方式であってもよい。
 ジャイロセンサ220は、圧電素子等の振動材等で構成される。ジャイロセンサ220は、圧電素子等の振動材を一定周波数で振動させコリオリ力による力を電圧に変換して角速度情報を得る。ジャイロセンサ220から角速度情報を得、この揺れを相殺する方向にOIS内の補正レンズを駆動させることにより、使用者によりデジタルカメラ1に与えられる手振れは補正される。なお、ジャイロセンサ220は、少なくともピッチ角の角速度情報を計測可能なデバイスであればよい。また、ジャイロセンサ220がロール角の角速度情報を計測可能な場合、デジタルカメラ1の略水平方向に移動した際の回転について考慮することが可能となる。
 カードスロット230は、メモリカード240を装着可能である。カードスロット230は、機械的及び電気的にメモリカード240と接続可能である。
 メモリカード240は、フラッシュメモリや強誘電体メモリなどを内部に含み、データを格納可能である。
 操作部材250は、レリーズボタンを備える。レリーズボタンは、使用者の押圧操作を受け付ける。レリーズボタンを半押しした場合、コントローラ210を介してAF制御及び、AE制御を開始する。また、レリーズボタンを全押しした場合、被写体の撮影を行う。
 ズームレバー260は、使用者からズーム倍率の変更指示を受け付ける部材である。
 液晶モニタ270は、CCDイメージセンサ150で生成した画像信号や、メモリカード240から読み出した画像信号を表示可能な表示デバイスである。また、液晶モニタ270は、デジタルカメラ1の各種の設定情報を表示可能である。例えば、液晶モニタ270は、撮影時における撮影条件である、EV値、F値、シャッタースピード、ISO感度等を表示可能である。
 内部メモリ280は、フラッシュメモリや強誘電低メモリなどで構成される。内部メモリ280は、デジタルカメラ1全体を制御するための制御プログラム等を格納する。
 モード設定ボタン290は、デジタルカメラ1で撮影する際の撮影モードを設定するボタンである。「撮影モード」とは、ユーザが想定する撮影シーンを示すものであり、例えば、(1)人物モード、(2)子供モード、(3)ペットモード、(4)マクロモード、(5)風景モードを含む2D撮影モードと、(6)3D撮影モードなどがある。なお、(1)~(5)それぞれに対しての3D撮影モードを持ってもよい。デジタルカメラ1は、この撮影モードを基に、適切な撮影パラメータを設定して撮影を行う。なお、デジタルカメラ1が自動的に撮影パラメータの設定を行うカメラ自動設定モードを含めるようにしてもよい。また、モード設定ボタン290は、メモリカード240に記録される画像信号の再生モードを設定するボタンを兼ねている。
 測距部300は、操作部材250におけるレリーズボタンが全押しされた場合、その時点における合焦位置を計測する。合焦位置の計測方法として、例えばフォーカスレンズ113の位置を読み取る方法や、フォーカスレンズ113の合焦時の駆動量に基づいて合焦位置を求めるなどの方法を用いることができる。
<深度情報算出部162における深度情報の算出について>
 以下、図面を参照しながら、画像処理部160の深度情報算出部162が算出する深度情報について説明する。
<DFFによる深度情報の算出手順>
 図3は、DFFによる深度情報算出の手順を示すフローチャートである。
 まず始めに、光学系110、CCDイメージセンサ150によって、合焦位置の異なる複数枚の画像I1,I2を取得する(ステップS101)。以下は、2枚の画像を用いる場合について説明するが、3枚以上の画像を用いてもよい。なお、各画像の合焦位置をどのように選択するべきかについては後述する。
 次に、取得した2枚の画像のそれぞれについて、ピントの合い具合を示す合焦度を算出する(ステップS102)。合焦度は、各画素ないしは複数画素のブロックに対して定義される。合焦度の具体的な算出方法として、例えば非特許文献1にあるような、各画素を中心とした一定範囲内にある画素が持つ画素値のエントロピーや分散を用いる方法がある。また、これ以外にもその他一般に用いられている指標を用いて合焦度を算出することができる。
 最後に、2枚の画像の対応する画素ないしはブロック間で合焦度を比較し、深度を割り当てる(ステップS103)。具体的には、2枚の画像のうち、合焦度が最大となる画像の合焦位置を当該画素ないしはブロックの深度情報として割り当てる。なお、3枚以上の画像を用いている場合も同様に、合焦度が最大となる画像の合焦位置を深度情報として割り当てる。
<撮影時における第1の画像および第2の画像に対する合焦位置の設定に関して>
 先述の通り、DFFによって深度情報を算出する場合、合焦位置の異なる複数枚の画像を用いる。しかし、デジタルカメラ1には被写界深度が存在するため、各合焦位置を適切に選ばないと、複数枚の画像間で合焦位置が異なるにも関わらず、その合焦度の等しい領域ができてしまうので、合焦度の値から深度を求める処理がうまくいかない。要するに、撮影した2枚の画像において、画素ないしはブロックにおいて比較する合焦度が異なる値となるように、画像の合焦位置を設定しなければならない。好適な合焦位置は、図4(a)に示すような互いの画像の被写界深度による高合焦度範囲が重ならないような位置である。つまり、撮影した2枚の画像において、画素ないしはブロックにおいて合焦度を比較した結果、いずれの画像の合焦度が高いかを判断できる位置を合焦位置とするのが好ましい。
 そのため、設定部212は、複数のデジタル画像のうち、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の被写界深度範囲と後に撮影するデジタル画像の被写界深度範囲とが重ならないように設定する。
 また、図4(a)に示されるように、設定部212は、ボケた画像同士を比較することによる深度情報の精度低下を防止するために、複数のデジタル画像のうち、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の被写界深度範囲と後に撮影するデジタル画像の被写界深度範囲とが互いに隣接するように設定する。これにより、図2(c)のように2枚の画像の両方で合焦度が低い領域ができないようにしている。
<合焦位置d1および合焦位置d2の関係について>
 以下、合焦位置d1および合焦位置d2の関係性について説明する。なお、合焦位置d1は、合焦位置d2よりも手前にあるものとする。
 まず始めに、過焦点距離と呼ばれる値を求める。これはこの位置にピントを合わせたときに被写界深度の後端がちょうど無限遠となる距離を表す。過焦点距離Hは、以下の[数1]式で求められる。
Figure JPOXMLDOC01-appb-M000001
 ここで、fは光学系110の焦点距離、Fは光学系110のFナンバー、Cは許容錯乱円径をそれぞれ表す。
 次に、任意の位置dにピントを合わせた時の被写界深度の前端DN、後端DFは、過焦点距離Hを用いて以下の[数2]式で表される。
Figure JPOXMLDOC01-appb-M000002
 ここで、d=d2における被写界深度前端DNと、d=d1における被写界深度後端DFとが等しくなる(すなわち、2つの被写界深度の範囲が互いに隣接する)d1の値を求めると、[数3]式のようになる。
Figure JPOXMLDOC01-appb-M000003
 また、d=d2における被写界深度前端DNと、d=d1における被写界深度後端DFとが等しくなる(すなわち、2つの被写界深度の範囲が互いに隣接する)d2の値を求めると、[数4]式のようになる。
Figure JPOXMLDOC01-appb-M000004
 特に、図4(b)のようにd2が無限遠である場合、d1の値は[数5]式のように近似できる。
Figure JPOXMLDOC01-appb-M000005
 例えば、第1の画像を撮影する前に第2の画像を合焦位置d2で撮影した場合、適切な合焦位置で第1の画像を撮影するには、[数3]式を用いて計算されるd1よりも手前の範囲でピントをあわせることができるか試行すればよい。なお、本明細書においては、撮影の順序に関係なく、より近い合焦位置で撮影する画像を第1の画像、より遠い合焦位置で撮影する画像を第2の画像と称する。第1の画像と第2の画像とは、略同一のシーンを撮影するものである。
 また、第2の画像を撮影する前に第1の画像を合焦位置d1で撮影した場合、適切な合焦位置で第2の画像を撮影するには、[数4]式を用いて計算されるd2よりも奥の範囲でピントをあわせることができるか試行すればよい。
 要するに、第1の画像および第2の画像のうち、どちらの画像を先に撮影したとしても、合焦度の高い被写界深度範囲が1枚目の画像の被写界深度範囲と重ならないように、2枚目に撮影する際にピントを合わせる範囲を設定することができる。
 なお、ここでは2枚の画像について被写界深度の範囲が重ならない合焦位置を算出する方法を説明したが、3枚以上の場合であっても同様にして合焦位置を定めることが出来る。
<コントローラ210の動作の例1>
 以下、コントローラ210における深度情報を算出する動作について図面を参照しながら説明する。本例においては、フォーカス調整部213は、光学像のコントラストに基づいてフォーカスレンズ113を駆動し、撮影画像の合焦位置を探索するコントラストAF方式であるものとする。
 図5は、コントローラ210によって画像処理部160の動作を制御する処理の流れを示すフローチャートである。ここでは、第2の画像を無限遠の合焦位置で撮影し、その後に第1の画像のピント合わせを行う場合について説明する。
 まず始めに、デジタルカメラ1は、無限遠の合焦位置で第2の画像を撮影する(ステップS200)。すなわち、フォーカス調整部213は、フォーカスレンズ113を駆動し、前述の過焦点距離より遠い位置に合焦させた状態で第2の画像を撮影する。
 次に、第1の画像を撮影するためにフォーカス調整部213は、フォーカスレンズ113を駆動させながら撮影画像のコントラストを確認することにより、ピントの合う合焦位置を探索するピント合わせを実行する(ステップS201)。このコントラストAF方式において、ピントが合っているかを探索する範囲は[数3]式で示されるd1よりも手前のみにおいて許可される。
 そして、上記の探索許可範囲内でピントがあったかどうかを判定する(ステップS202)。なお、ピントがあっているかの判定は、ピント判定部163により公知の手法を用いて行われる。ここでは、前述のように、撮影画像のコントラストを導出し、このコントラストが最も高くなったフォーカスレンズ113の位置においてピントがあったものと判定する。
 ステップS202でピントがあったと判定された場合には、操作部材250におけるレリーズボタンの全押しなどをトリガーとして第1の画像を撮影する(ステップS203)。他方、近接領域に被写体が存在しなかった場合など、ステップS202でピントがあっていると判定されなかった場合には、そのまま処理を終了する。
 最後に、第1の画像と第2の画像とに基づいて深度情報を算出する(ステップS204)。具体的には、両画像の各画素についてピントの合い具合を示す合焦度を導出し、各画素について両画像の合焦度を比較することによって、第1の画像および第2の画像の画素ごとに深度情報を設定する。
 このような構成により、無限遠の合焦位置と被写界深度範囲が重なるような合焦位置、すなわち深度情報の算出に不適な合焦位置で画像(第1の画像)を撮影することを抑止することができる。これにより、設定される深度情報の精度を高めることができる。
 なお、上記では第2の画像を先に撮影し、その後に第1の画像を撮影する動作について説明した。しかし、本実施形態は上記に限定されるものではなく、第1の画像を先に撮影して、その後に第2の画像を撮影する動作でも構わない。その際には、ステップS201でピントが合っているかを探索する範囲は[数4]式で示されるd2よりも奥に限定して許可される。
 また、図5の処理において、ステップS202でピントがあっていると判定されなかった場合には、そのまま処理を終了するものとした。しかし、処理を終了する代わりに、無限遠の合焦範囲と被写界深度範囲が重ならない合焦位置が得られるように撮影条件を変更してから、再度、ステップS201以降の処理を繰り返してもよい。
 具体的には、デジタルカメラ1の撮像位置を近距離の被写体に近づける、または、絞りを開くかズームを望遠にして焦点距離を長くするかにより被写界深度を狭くする、のいずれかによって、無限遠の合焦範囲と被写界深度範囲が重ならない合焦位置においてピントが合うように撮影条件を変更する。
 このようにすれば、ステップS202においてピントがあっていると判定される可能性が高まる。このとき、絞りやズームの調整は、適宜の案内メッセージ等に応じて使用者によって行われても良いし、コントローラ210によって自動的に行われても良い。
 もっとも、明るい屋外で絞りをそれ以上開くことができない場合や、人物のすぐ後ろに背景となる壁がある画像を撮影する場合などには、絞りやズームの変更によっても適切な合焦位置は得られないことがある。
<コントローラ210の動作の例1の変形例>
 図6は、コントローラ210によって画像処理部160の動作を制御する処理の変形例の流れを示すフローチャートである。先述の例1との違いは、顔検出部164によって第1の画像から人物の顔画像を検出し、その結果を利用して深度情報を算出するか否かを判定する点である。なお、図6のステップS300、S301、S302、S303、S305は、それぞれ例1のステップS200、S201、S202、S203、S204と同様のため、説明は省略する。
 ステップS304において、顔検出部164によって第1の画像から人物の顔画像を検出する。検出された顔画像の大きさが所定の値より大きい場合、深度情報を算出する処理を実行する。
 顔画像の大きさの閾値は以下のようにして定める。図7より、光学系の主点から距離dにおいて大きさがeの物体は、主点から距離d’の位置に大きさe’の像を結ぶ。図7より物体と像は相似なので、[数6]式が成り立つ。
Figure JPOXMLDOC01-appb-M000006
 また、所謂レンズの公式より、dとd’の間には[数7]式が成り立つ。
Figure JPOXMLDOC01-appb-M000007
 ここで、fは光学系の焦点距離である。[数6]式および[数7]式からd’を消去すると[数8]式が得られる。
Figure JPOXMLDOC01-appb-M000008
 さらにdとして[数5]式で求めた値を用いた時のe’の値は[数9]式で表される。
Figure JPOXMLDOC01-appb-M000009
 顔画像の大きさを判定する際、例えば人間の眼間距離であるおよそ60mmから65mmをeとして用いることで画像上での眼間距離e’を求める。また、[数9]式で求めたe’は像の大きさそのものであるため、CCDイメージセンサ150の1画素の大きさに従って画像上の画素数に換算することができる。
 このような構成により、ピントが合っているか否かで判断に、人物の顔画像の大きさという比較的安定的に求めることのできる指標が加わる。これにより、単にピントが合っているか否かで判断する場合に比べてより判断の精度を高めることができる。
 なぜなら、オートフォーカスによるピント合わせは、そのアルゴリズムによっては、主要な被写体以外の被写体にピントを合わせてしまうことがある。しかし、重要な被写体である人間の顔画像が所定の大きさを超えて検出されるならば、オートフォーカスによるピント合わせは、的確な被写体にピントを合わせていると考えてもよい。また、顔画像が所定の大きさより大きければ、被写体となる人物はデジタルカメラ1から近い距離にいると考えられることになる。
 なお、上記では、第2の画像を無限遠の合焦位置で撮影した場合を説明した。しかし、本実施形態はこの構成に限定されるものではなく、[数8]式に[数3]式または[数4]式を代入することにより得られる式を用いても構わない。
 また、本例においてはピントが合っており、かつ所定の大きさの顔が検出された時に深度情報を算出している。しかし、これをピントが合っているか、または所定の大きさの顔が検出された時に深度情報を算出するように変更してもよい。
 なぜなら、所定の大きさの顔画像が検出されていれば、ピントが合っていなくとも、第1の画像の合焦位置はデジタルカメラ1から十分近い位置にあるものと考えられる。したがって、このような場合、第1の画像の合焦位置と第2の画像の合焦位置とは十分に離れているので、互いの画像の被写界深度による高合焦度範囲が重なることはないと考えられるからである。高合焦度範囲が重ならなければ、画像の合焦度に基づいて的確な深度情報の算出ができる。
<コントローラ210の動作の例2>
 以下、コントローラ210のその他の動作について説明する。本例においても、フォーカス調整部213は、光学像のコントラストに基づいてフォーカスレンズ113を駆動して撮影画像の合焦位置を探索するコントラストAF方式であるものとする。
 前述の例1では、第1の画像を撮影する際、コントラストAF方式においてピントが合っているかを探索する範囲は[数5]式で示されるd1よりも手前の範囲に限定して許可していた。しかし、本例においては、上記のように探索許可範囲を設けず、d1に合焦位置を固定する態様を説明する。
 図8は、コントローラ210によって画像処理部160の動作を制御する処理の流れを示すフローチャートである。ここでは、第2の画像の合焦位置を無限遠として、第1の画像のピント合わせを行う場合について説明する。なお、図8のステップS400、S403、S404は、それぞれ例1のステップS200、S201、S203、S204と同様のため、説明は省略する。
 ステップS401において、所定の合焦位置d1で第1の画像を撮影するためにピント合わせを行う(ステップS401)。この際、フォーカスレンズ113の駆動による合焦位置の探索は行わず、合焦位置は[数5]式で示されるd1に固定される。
 次に、ステップS401の合焦位置d1でピントがあっているかどうかを撮影画像のコントラスト値などを手がかりに判定し(ステップS402)、合焦位置d1でピントがあっていると判定された場合には、第1の画像の撮影処理(ステップS403)に進む。一方、合焦位置d1の近接領域に被写体が存在しない場合など、合焦位置d1ではピントがあっていないと判定された場合には、そのまま処理を終了する。
 このような構成によっても、第2の画像の合焦範囲と被写界深度範囲が重なるような合焦位置、すなわち深度情報の算出に不適当な合焦位置で第1の画像を撮影することを抑止することができる。これにより、設定される深度情報の精度を高めることができる。
<コントローラ210の動作の例3>
 以下、本例では、フォーカス調整部213として、位相差検出AF方式のものを採用した場合において、コントローラ210が深度情報を算出する動作について図面を参照しながら説明する。
 図9は、コントローラ210によって画像処理部160の動作を制御する処理の流れを示すフローチャートである。ここでは、第2の画像の合焦位置を無限遠として、第1の画像のピント合わせを行う場合について説明する。
 まず始めに、デジタルカメラ1は、無限遠の合焦位置で第2の画像を撮影する(ステップS500)。すなわち、フォーカス調整部213は、フォーカスレンズ113を駆動し、前述の過焦点距離より遠い位置に合焦させた状態で第2の画像を撮影する。
 次に、コントローラ210は、光学系110から入った光を2つに分けて専用のセンサへ導き、センサ上で結像した2つの画像の間隔を解析する位相差検出によって、第1の画像の合焦位置(ピントの方向およびフォーカスレンズ113を移動すべき方向と移動量)を導出する(S501)。
 そして、コントローラ210は、ステップS501にて導出した第1の画像の合焦位置が許容範囲内であるか否かを判定する(S502)。ここで、許容範囲とは、例えば[数4]式で示されるd1よりも手前の範囲である。この判定の結果、ステップS501にて導出した第1の画像の合焦位置が許容範囲内であると判定されたならば、ステップS503に進む。一方、ステップS501にて導出した第1の画像の合焦位置が許容範囲外であると判定されたならば、そのまま処理を終了する。
 ステップS502で第1の画像の合焦位置は許容範囲内であると判定されたならば、フォーカス調整部213は、S501で導出した結果に基づいてフォーカスレンズ113を移動し、合焦位置を合わせて第1の画像を撮影する(S503)。
 最後に、第1の画像と第2の画像とに基づいて深度情報を算出する(ステップS504)。具体的には、両画像の各画素についてピントの合い具合を示す合焦度を導出し、各画素について両画像の合焦度を比較することによって、第1の画像および第2の画像の画素ごとに深度情報を設定する。
 このような構成によっても、第2の画像の合焦範囲と被写界深度範囲が重なるような合焦位置、すなわち深度情報の算出に不適当な合焦位置で第1の画像を撮影することを抑止することができる。これにより、設定される深度情報の精度を高めることができる。
 なお、図9の処理において、ステップS502で第1の画像の合焦位置が許容範囲外であると判定されたならば、そのまま処理を終了するものとした。しかし、処理を終了する代わりに、無限遠の合焦範囲と被写界深度範囲が重ならない合焦位置が得られるように撮影条件を変更してから、再度、ステップS501以降の処理を繰り返してもよいのは、例1ないし例2と同様である。
<オーバーインフ>
 本実施形態1におけるデジタルカメラ1は、第2の画像の合焦位置が所謂オーバーインフの場合、すなわち、第2の画像において無限遠よりも遠くに合焦している場合であっても有効に機能する。
 前述の通り、フォーカスレンズ113は、フォーカスモータ140によって駆動され、光学系110の光軸に沿って移動することにより、被写体像のピントを調整する。このとき、フォーカスレンズ113が、有限距離の被写体に対応する合焦位置から無限遠の被写体に対応する合焦位置まで移動し、さらに、無限遠に対応する合焦位置をこえる位置にまで移動されることがある。このレンズ状態がオーバーインフである。
 図10は、画像I2がオーバーインフの状態にある場合の合焦位置(距離)と合焦度との関係を示す模式図である。図10においてはボケた画像同士を比較することによる深度情報の精度低下を防止するために、画像I1の合焦位置の許容範囲を、先に撮影して得られた画像I2の被写界深度範囲と後に撮影する画像I2の被写界深度範囲とが互いに隣接するように設定している。これにより、図2(c)のように2枚の画像の両方で合焦度が低い領域ができないようにしている。
 それゆえ、常に、少なくとも一方の画像の合焦度は高い状態において深度情報の基礎となる合焦位置を定めることになる。この結果、合焦度の精度自体が低い領域での比較を防ぎ、より的確な深度情報を得ることが可能となる。
<深度情報の利用の例>
 以上のようにして生成された深度情報を利用することで、シーンの奥行きを反映した画像処理が可能となる。例えば、基準となる深度を定めてそこからの深度の差に応じて両眼視差を付与することで立体視用の画像を生成することができる。また、基準となる深度を定めてそこからの深度の差に応じてぼかしの強度を変えることで、より正確なぼかし処理が可能となる。
 なお、生成された深度情報を割り当てたり、生成された深度情報に基づいて各種の後処理を施したりするデジタル画像は、深度情報を求めるために用いた複数のデジタル画像とは異なるデジタル画像であってもよい。すなわち、深度情報を求めるために用いた複数のデジタル画像とは別に略同一のシーンを撮影しておき、この撮影画像に深度情報を割り当てたり、深度情報を用いた後処理を施したりすることも可能である。
<効果等>
 以上のように、本実施の形態において、デジタルカメラ1(撮像装置の一例)は、被写体を撮像して、デジタル画像を取得するCCDイメージセンサ150(撮像部の一例)と、被写体の光学像をCCDイメージセンサ150の所定位置に結像する光学系110と、撮影画像の合焦位置の許容範囲を設定する設定部212と、光学系110を駆動して、設定部212によって設定された許容範囲内で撮影画像の合焦位置を調整するフォーカス調整部213と、CCDイメージセンサ150によって取得された同一のシーンかつ合焦位置の異なる複数のデジタル画像に基づいて、デジタルカメラ1から被写体までの距離に関する情報を生成する深度情報算出部162(情報生成部の一例)と、を備え、設定部212は、複数のデジタル画像のうち、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の合焦範囲に基づいて設定する。
 これにより、距離計などの追加のハードウェアを用いること無く、深度情報の算出が困難な状況で画像が撮影されることを防ぎ、深度情報の精度を高めることができる。併せて、誤った深度情報に基づいた後処理を防ぐことができる。
 また、本実施の形態において、設定部212は、複数のデジタル画像のうち、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の被写界深度範囲と後に撮影するデジタル画像の被写界深度範囲とが重ならないように設定するようにしてもよい。
 これにより、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の合焦範囲に基づいて設定するにあたって、先に撮影して得られたデジタル画像の被写界深度範囲と後に撮影するデジタル画像の被写界深度範囲とが重ならないように設定される。
 そのため、先に撮影して得られたデジタル画像の合焦度の値が最高となる範囲と後に撮影するデジタル画像の合焦度の値が最高となる範囲との間に重複する領域がなくなる。それゆえ、合焦度の値に基づいて深度情報の基礎となる合焦位置を一義的に定めることができるので、より的確な深度情報を得ることが可能となる。
 また、本実施の形態において、設定部212は、複数のデジタル画像のうち、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の被写界深度範囲と後に撮影するデジタル画像の被写界深度範囲とが隣接するように設定してもよい。
 これにより、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の合焦範囲に基づいて設定するにあたって、先に撮影して得られたデジタル画像の被写界深度範囲と後に撮影するデジタル画像の被写界深度範囲とが隣接するように設定される。
 そのため、先に撮影して得られたデジタル画像の合焦度の値が最高となる範囲と後に撮影するデジタル画像の合焦度の値が最高となる範囲との間に重複する領域がなくなる。また、先に撮影して得られたデジタル画像の被写界深度範囲と後に撮影するデジタル画像の被写界深度範囲との間に、いずれのデジタル画像の合焦度も低いような領域がなくなる。それゆえ、常に、少なくとも一方の画像の合焦度は高い状態において深度情報の基礎となる合焦位置を定めることになる。この結果、合焦度の精度自体が低い領域での比較を防ぎ、より的確な深度情報を得ることが可能となる。
 また、本実施の形態において、設定部212は、第2の画像(先に撮影して得られたデジタル画像)の合焦範囲が無限遠である場合、第1の画像(後に撮影するデジタル画像)の合焦位置の許容範囲を下記[数10]式で示す位置dよりデジタルカメラ1の自装置側に設定してもよい。
Figure JPOXMLDOC01-appb-M000010
 ただし、fは前記撮像部の焦点距離、Fは前記撮像部のFナンバー、Cは許容錯乱円径である。
 これにより、第2の画像(先に撮影して得られたデジタル画像)の合焦範囲が無限遠である場合のその被写界深度範囲が、第1の画像(後に撮影するデジタル画像)の被写界深度範囲と重ならないことが担保される。
 そのため、第2の画像(先に撮影して得られたデジタル画像)の合焦度の値が最高となる範囲と第1の画像(後に撮影するデジタル画像)の合焦度の値が最高となる範囲との間に重複する領域がなくなる。それゆえ、合焦度の値に基づいて深度情報の基礎となる合焦位置を一義的に定めることができるので、より的確な深度情報を得ることが可能となる。
 また、本実施の形態において、フォーカス調整部213は、CCDイメージセンサ150上の光学像の結像状態に基づいて光学系110を駆動して撮影画像の合焦位置を探索してもよいし、位相差検出方式に基づいて光学系110を駆動してもよい。
 すなわち、デジタルカメラ1は、フォーカス調整部213が採用するオートフォーカス方式の種類に関わらず、本開示を適用することができる。
 また、本実施の形態において、デジタルカメラ1は、CCDイメージセンサ150によって取得されたデジタル画像のピントが合っているか否かを判定するピント判定部163を更に備え、ピント判定部163によって後に撮影されたデジタル画像の少なくとも一部にピントが合っていると判定されたときに、深度情報算出部162は、複数のデジタル画像に基づいて、デジタルカメラ1から被写体までの距離に関する情報を生成してもよい。
 これにより、第1の画像(後に撮影されたデジタル画像)の少なくとも一部にピントが合っていると判定されたときに、デジタルカメラ1から被写体までの距離に関する情報、すなわち深度情報が生成される。
 そのため、第1の画像(後に撮影されたデジタル画像)の少なくとも一部における高い値の合焦度を用いて、精度良く深度情報を得ることができる。
 また、本実施の形態において、デジタルカメラ1は、CCDイメージセンサ150によって取得されたデジタル画像から人物の顔画像を検出する顔検出部164を更に備え、顔検出部164によって第1の画像(後に撮影されたデジタル画像)から所定の大きさより大きい顔画像が検出されたときに、深度情報算出部162は、複数のデジタル画像に基づいて、デジタルカメラ1(撮像装置の一例)から被写体までの距離に関する情報を生成してもよい。
 これにより、デジタル画像中の顔画像の大きさという比較的安定的な指標を用いて、第1の画像(後に撮影されたデジタル画像)が十分に近距離で撮影されたことを担保することができる。
 そのため、オートフォーカスによるピント合わせの信頼性が低い場合であっても、第2の画像(先に撮影されたデジタル画像)と第1の画像(後に撮影されたデジタル画像)との合焦位置が離れた状態を確保しやすくなる。それゆえ、得られるデジタルカメラ1から被写体までの距離に関する情報、すなわち深度情報の精度が向上する。
<他の実施の形態>
 以上のように、本出願において開示する技術の例示として、実施の形態1を説明した。しかしながら、本開示における技術は、これに限定されず、適宜、変更、置き換え、付加、省略などを行った実施の形態にも適用可能である。また、上記実施の形態1で説明した各構成要素を組み合わせて、新たな実施の形態とすることも可能である。
 そこで、以下、他の実施の形態を例示する。
 上記実施の形態で説明したデジタルカメラにおいて、各ブロックは、LSIなどの半導体装置により個別に1チップ化されても良いし、一部又は全部を含むように1チップ化されても良い。
 なお、ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。
 また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用しても良い。
 さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適用等が可能性としてあり得る。
 また、上記実施の形態の各処理をハードウェアにより実現してもよいし、ソフトウェアにより実現してもよい。さらに、ソフトウェアおよびハードウェアの混在処理により実現しても良い。なお、上記実施形態に係るデジタルカメラをハードウェアにより実現する場合、各処理を行うためのタイミング調整を行う必要があるのは言うまでもない。上記実施の形態においては、説明便宜のため、実際のハードウェア設計で生じる各種信号のタイミング調整の詳細については省略している。
 また、上記実施の形態における処理方法の実行順序は、必ずしも、上記実施の形態の記載に制限されるものではなく、本開示の要旨を逸脱しない範囲で、実行順序を入れ替えることができるものである。
 例えば、図6で示した処理の流れにおいて、ステップS302とS303を入れ替え、先に顔画像の検出処理を行うとしてもよい。
 また、コントローラ210の動作の例1および例2で挙げているように第1の画像について判定を行った後に第2の画像を撮影する代わりに、第1の画像を撮影した後第2の画像について判定を行うようにしてもよい。
 なお、本開示の具体的な構成は、前述の実施の形態に限られるものではなく、本開示の要旨を逸脱しない範囲で種々の変更および修正が可能である。
 例えば、コントローラ210の動作の例1および2は第2の画像の合焦位置を無限遠とした場合について説明したが、第2の画像の合焦位置を無限遠より手前の任意の位置としてよい。その際は[数3]式に基づいて第1の画像の合焦範囲を定める。
 また、コントローラ210の動作の例1および2は2枚の画像を用いる場合について説明したが、3枚以上の画像を用いてもよい。その際は[数3]式を順番に適用することで各画像の合焦範囲を定める。多くの画像を用いるほど、画像の深度情報を多階調で得ることができる。
 しかし、多くの画像を用いる場合、各画像での被写界深度範囲が重ならないようにするには、被写界深度を狭くする必要があることに留意する。一般に、コンパクトカメラは被写界深度が広いが、一眼レフカメラは被写界深度を狭く設定することができる。
 また、コントローラ210の動作の例1および例2で挙げているように所定の条件を満たした時のみ深度情報を算出する代わりに、所定の条件を満たさない時には、深度情報を算出した後、その結果を用いないようにしてもよい。
 以上のように、本開示における技術の例示として、実施の形態を説明した。そのために、添付図面および詳細な説明を提供した。したがって、添付図面および詳細な説明に記載された構成要素の中には、課題解決のために必須な構成要素だけでなく、上記技術を例示するために、課題解決のためには必須でない構成要素も含まれ得る。そのため、それらの必須ではない構成要素が添付図面や詳細な説明に記載されていることをもって、直ちに、それらの必須ではない構成要素が必須であるとの認定をするべきではない。
 また、上述の実施の形態は、本開示における技術を例示するためのものであるから、特許請求の範囲またはその均等の範囲において種々の変更、置き換え、付加、省略などを行うことができる。
 本開示に係る撮像装置によると、深度情報の算出に好適な条件での撮影を保証することで、不適切な合焦位置での撮影により得られた画像から深度情報を算出することを防止できる。本開示は、デジタルカメラ(一眼レフカメラ、コンパクトカメラを含む)をはじめとする撮像機器全般に応用可能である。
 110  光学系
 120  ズームモータ
 130  OISアクチュエータ
 140  フォーカスモータ
 150  CCDイメージセンサ
 160  画像処理部
 162  深度情報算出部
 163  ピント判定部
 164  顔検出部
 200  メモリ
 210  コントローラ
 212  設定部
 213  フォーカス調整部
 220  ジャイロセンサ
 230  カードスロット
 240  メモリカード
 250  操作部材
 260  ズームレバー
 270  液晶モニタ
 280  内部メモリ
 290  モード設定ボタン
 300  測距部

Claims (8)

  1.  被写体を撮像して、デジタル画像を取得する撮像部と、
     前記被写体の光学像を前記撮像部の所定位置に結像する光学系と、
     撮影画像の合焦位置の許容範囲を設定する設定部と、
     前記光学系を駆動して、前記設定部によって設定された許容範囲内で撮影画像の合焦位置を調整するフォーカス調整部と、
     前記撮像部によって取得された同一のシーンかつ合焦位置の異なる複数のデジタル画像に基づいて、撮像装置から前記被写体までの距離に関する情報を生成する情報生成部と、を備え、
     前記設定部は、前記複数のデジタル画像のうち、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の合焦範囲に基づいて設定する撮像装置。
  2.  前記設定部は、前記複数のデジタル画像のうち、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の被写界深度範囲と後に撮影するデジタル画像の被写界深度範囲とが重ならないように設定する請求項1に記載の撮像装置。
  3.  前記設定部は、前記複数のデジタル画像のうち、後に撮影するデジタル画像の合焦位置の許容範囲を、先に撮影して得られたデジタル画像の被写界深度範囲と後に撮影するデジタル画像の被写界深度範囲とが隣接するように設定する請求項1に記載の撮像装置。
  4.  前記設定部は、前記先に撮影して得られたデジタル画像の合焦位置が無限遠である場合、前記後に撮影するデジタル画像の合焦位置の許容範囲を下記(数1)式で示す位置dより自装置側に設定する請求項2に記載の撮像装置。
    Figure JPOXMLDOC01-appb-M000011
     ただし、fは前記撮像部の焦点距離、Fは前記撮像部のFナンバー、Cは許容錯乱円径である。
  5.  前記フォーカス調整部は、前記光学像の結像状態に基づいて前記光学系を駆動して前記撮影画像の合焦位置を探索する請求項1に記載の撮像装置。
  6.  前記フォーカス調整部は、位相差検出方式に基づいて前記光学系を駆動する請求項1に記載の撮像装置。
  7.  前記撮像部によって取得されたデジタル画像のピントが合っているか否かを判定するピント判定部を更に備え、
     前記ピント判定部によって後に撮影されたデジタル画像の少なくとも一部にピントが合っていると判定されたときに、前記情報生成部は、前記複数のデジタル画像に基づいて、撮像装置から前記被写体までの距離に関する情報を生成する請求項1に記載の撮像装置。
  8.  前記撮像部によって取得されたデジタル画像から人物の顔画像を検出する顔検出部を更に備え、
     前記顔検出部によって後に撮影されたデジタル画像から所定の大きさより大きい顔画像が検出されたときに、前記情報生成部は、前記複数のデジタル画像に基づいて、撮像装置から前記被写体までの距離に関する情報を生成する請求項1に記載の撮像装置。
PCT/JP2012/007149 2011-11-09 2012-11-07 撮像装置 WO2013069279A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011-245140 2011-11-09
JP2011245140A JP2015017999A (ja) 2011-11-09 2011-11-09 撮像装置

Publications (1)

Publication Number Publication Date
WO2013069279A1 true WO2013069279A1 (ja) 2013-05-16

Family

ID=48289490

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/007149 WO2013069279A1 (ja) 2011-11-09 2012-11-07 撮像装置

Country Status (2)

Country Link
JP (1) JP2015017999A (ja)
WO (1) WO2013069279A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791372A (zh) * 2016-11-30 2017-05-31 努比亚技术有限公司 一种多点清晰成像的方法及移动终端
WO2019115560A1 (de) * 2017-12-12 2019-06-20 Bircher Reglomat Ag Abstandsermittlung basierend auf verschiedenen tiefenschärfebereichen bei unterschiedlichen fokuseinstellungen eines objektivs
WO2020124517A1 (zh) * 2018-12-21 2020-06-25 深圳市大疆创新科技有限公司 拍摄设备的控制方法、拍摄设备的控制装置及拍摄设备

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6569157B1 (ja) * 2018-06-27 2019-09-04 エスゼット ディージェイアイ テクノロジー カンパニー リミテッドSz Dji Technology Co.,Ltd 制御装置、撮像装置、移動体、制御方法、及びプログラム

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002333571A (ja) * 2001-05-09 2002-11-22 Ricoh Co Ltd 自動合焦装置、自動合焦方法、およびその方法をコンピュータが実行するためのプログラム
JP2008070640A (ja) * 2006-05-10 2008-03-27 Canon Inc 点調節装置、撮像装置、焦点調節装置の制御方法及びプログラム及び記憶媒体
JP2011188454A (ja) * 2010-03-11 2011-09-22 Sharp Corp 撮像モジュール

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002333571A (ja) * 2001-05-09 2002-11-22 Ricoh Co Ltd 自動合焦装置、自動合焦方法、およびその方法をコンピュータが実行するためのプログラム
JP2008070640A (ja) * 2006-05-10 2008-03-27 Canon Inc 点調節装置、撮像装置、焦点調節装置の制御方法及びプログラム及び記憶媒体
JP2011188454A (ja) * 2010-03-11 2011-09-22 Sharp Corp 撮像モジュール

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791372A (zh) * 2016-11-30 2017-05-31 努比亚技术有限公司 一种多点清晰成像的方法及移动终端
CN106791372B (zh) * 2016-11-30 2020-06-30 努比亚技术有限公司 一种多点清晰成像的方法及移动终端
WO2019115560A1 (de) * 2017-12-12 2019-06-20 Bircher Reglomat Ag Abstandsermittlung basierend auf verschiedenen tiefenschärfebereichen bei unterschiedlichen fokuseinstellungen eines objektivs
WO2020124517A1 (zh) * 2018-12-21 2020-06-25 深圳市大疆创新科技有限公司 拍摄设备的控制方法、拍摄设备的控制装置及拍摄设备

Also Published As

Publication number Publication date
JP2015017999A (ja) 2015-01-29

Similar Documents

Publication Publication Date Title
US9635280B2 (en) Image pickup apparatus, method of controlling image pickup apparatus, and non-transitory computer-readable storage medium
US8760567B2 (en) Photographing apparatus and method to reduce auto-focus time
JP2010015024A (ja) 撮像装置、その制御方法、プログラム及び記憶媒体
JP2008026802A (ja) 撮像装置
JP2008026788A (ja) 撮像装置及びフォーカス制御方法
JP2009048125A (ja) 撮影装置および撮影装置の制御方法
JP2009036986A (ja) 撮影装置および撮影装置の制御方法
JP2007322922A (ja) 撮像システム及びカメラ並びにレンズユニット
JP6432038B2 (ja) 撮像装置
JP5963552B2 (ja) 撮像装置
WO2013069279A1 (ja) 撮像装置
JP2009065582A (ja) 拡大表示機能付きカメラおよびカメラの制御方法
CN111868474B (zh) 测距摄像机
US20160275657A1 (en) Imaging apparatus, image processing apparatus and method of processing image
JP2009069170A (ja) 撮影装置および撮影装置の制御方法
JP2009036985A (ja) 撮影装置および撮影装置の制御方法
JP5023750B2 (ja) 測距装置および撮像装置
JP2016142924A (ja) 撮像装置及びその制御方法、プログラム、記憶媒体
JP2020008785A (ja) 撮像装置
JP2014134697A (ja) 撮像装置
JP2013061560A (ja) 測距装置および撮像装置
JP5420034B2 (ja) 撮像装置、その制御方法、プログラム及び記憶媒体
JP2009048123A (ja) 撮影装置および撮影装置の制御方法
JP2009036987A (ja) 撮影装置および撮影装置の制御方法
JP2012054919A (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: 12847086

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP