WO2016140066A1 - 信号処理装置、信号処理方法、プログラム、電子機器、及び、撮像素子 - Google Patents

信号処理装置、信号処理方法、プログラム、電子機器、及び、撮像素子 Download PDF

Info

Publication number
WO2016140066A1
WO2016140066A1 PCT/JP2016/054597 JP2016054597W WO2016140066A1 WO 2016140066 A1 WO2016140066 A1 WO 2016140066A1 JP 2016054597 W JP2016054597 W JP 2016054597W WO 2016140066 A1 WO2016140066 A1 WO 2016140066A1
Authority
WO
WIPO (PCT)
Prior art keywords
phase difference
pixel
offset
reliability
defocus
Prior art date
Application number
PCT/JP2016/054597
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 WO2016140066A1 publication Critical patent/WO2016140066A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/673Focus control based on electronic image sensor signals based on contrast or high frequency components of image signals, e.g. hill climbing method

Definitions

  • the present technology relates to a signal processing device, a signal processing method, a program, an electronic device, and an image sensor, and in particular, for example, a signal processing device and a signal that can improve the accuracy of phase difference AF (Auto-Focus).
  • the present invention relates to a processing method, a program, an electronic device, and an image sensor.
  • AF autofocus
  • PDAF phase difference AF
  • CDAF contrast AF
  • phase difference AF is performed using the phase difference between two images obtained by dividing the exit pupil of the imaging optical system.
  • phase difference AF method there is a method in which an external phase difference sensor is provided separately from an image sensor as an image pickup device for taking an image, and the phase difference is obtained from the output of the phase difference sensor. Furthermore, as the phase difference AF method, the detection pixels for detecting the phase difference, which receives light that has passed through different areas of the exit pupil of the imaging optical system, are arranged as a part of pixels constituting the imaging element, There is an image plane phase difference AF method for obtaining a phase difference from a pixel value of a detection pixel.
  • the phase difference between two images obtained by dividing the exit pupil of the imaging optical system into pupils is obtained using the pixel value of the detection pixel. Then, from the phase difference, a defocus amount that is a shift amount including a direction to the in-focus position (infocus position) is obtained for the lens position of the imaging optical system, and the lens position is determined according to the defocus amount, It is moved to the in-focus position.
  • phase difference AF method since it is not necessary to perform an AF scan operation for moving the focal position (lens position) of the imaging optical system in the AF, AF can be executed in a relatively short time.
  • the contrast AF method a contrast evaluation value for evaluating the contrast of an image taken by an image sensor is obtained while performing an AF scan operation. Then, the lens position of the imaging optical system that maximizes the contrast evaluation value is detected as the focus position, and the lens position is moved to the focus position.
  • the contrast AF method Compared with the phase difference AF method, the contrast AF method generally has a higher detection accuracy of the in-focus position. However, since the AF scan operation is performed, it may take time to execute (complete) AF.
  • the phase difference AF method is superior in terms of AF execution time (in-focus position detection time), and the contrast AF method is superior in terms of AF accuracy (in-focus position detection accuracy).
  • the hybrid AF method has excellent aspects of both the phase difference AF method and the contrast AF method.
  • the lens position (of the imaging optical system) is first moved to the vicinity of the in-focus position by the phase difference AF method, and then the lens position is moved to the in-focus position by the contrast AF method.
  • the lens position can be moved to the in-focus position in a short time and with high accuracy.
  • the defocus amount varies according to the position of the detection pixel (on the light receiving surface of the image sensor) used to obtain the defocus amount. Admitted.
  • phase difference AF ⁇ ⁇ ⁇ ⁇ Variation in defocus amount decreases the accuracy of phase difference AF.
  • the decrease in the accuracy of phase difference AF causes the amount of movement of the lens position by contrast AF to increase in the hybrid AF method, and increases the AF execution time as a whole.
  • the present technology has been made in view of such a situation, and is intended to improve the accuracy of phase difference AF.
  • the signal processing device or the program of the present technology includes a conversion coefficient for converting the phase difference between two images obtained by dividing the exit pupil of the imaging optical system into a defocus amount representing a focus shift amount.
  • Defocus offset which is the difference in lens position between the focus position of the phase difference AF (Auto-Focus) method and the focus position of the contrast AF method, and reliability for determining whether the phase difference is reliable
  • An acquisition unit that acquires a threshold value, a reliability determination unit that determines the reliability of the phase difference using the reliability threshold value, and the reliable phase difference using the conversion factor,
  • a conversion unit that performs phase difference AF calculation that converts the focus amount and corrects the defocus amount using the defocus offset, and the conversion coefficient, the defocus offset, and the reliability threshold are: Take picture The shadow image sensor is obtained for each representative point representing each of a plurality of pixel groups constituting the light receiving surface of the image sensor, and the reliability determination unit is configured to determine the reliability threshold value of the representative point in the autofocus frame.
  • the phase difference AF is determined using the conversion factor of the representative point in the autofocus frame, and the defocus offset, and the phase difference AF calculation is performed.
  • the image sensor receives light that has passed through different areas of the exit pupil of the imaging optical system, and has a light receiving surface including a detection pixel for detecting the phase difference, or such signal processing.
  • the signal processing method of the present technology includes a conversion coefficient for converting a phase difference between two images obtained by dividing an exit pupil of an imaging optical system into a defocus amount representing a focus shift amount, and a phase difference AF.
  • Acquires the defocus offset which is the difference in lens position between the focus position of the (Auto-Focus) method and the focus position of the contrast AF method, and the reliability threshold value for determining whether the phase difference is reliable. Determining the reliability of the phase difference using the reliability threshold, converting the reliable phase difference into the defocus amount using the conversion factor, and Performing a phase difference AF operation for correcting the defocus amount using a focus offset, and the conversion factor, the defocus offset, and the reliability threshold value for an imaging device that captures an image.
  • the phase difference AF calculation is performed using the conversion factor of the representative point in the autofocus frame and the defocus offset, and the imaging element has different areas of the exit pupil of the imaging optical system. It is a signal processing method having a light receiving surface including a detection pixel for detecting the phase difference, which receives the passed light.
  • An electronic device of the present technology includes an imaging optical system that collects light, an imaging element that receives light from the imaging optical system and captures an image, and a signal processing unit that processes a signal output from the imaging element
  • the signal processing unit includes a conversion coefficient for converting a phase difference between two images obtained by dividing the exit pupil of the imaging optical system into a defocus amount that represents a focus shift amount, and a phase difference.
  • Defocus offset which is the difference in lens position between the focus position of the AF (Auto-Focus) method and the focus position of the contrast AF method, and a reliability threshold value for determining whether or not the phase difference is reliable
  • An acquisition unit to acquire, a reliability determination unit that determines the reliability of the phase difference using the reliability threshold value, and the phase difference that is reliable using the conversion coefficient is used as the defocus amount.
  • Convert and use the defocus offset A calculation unit that performs a phase difference AF calculation for correcting the defocus amount, and the conversion coefficient, the defocus offset, and the reliability threshold are received by the image sensor for an image sensor that captures an image.
  • the reliability determination unit uses the reliability threshold value of the representative point in the autofocus frame to determine the reliability of the phase difference.
  • the calculation unit performs the phase difference AF calculation using the conversion factor of the representative point in the autofocus frame and the defocus offset, and the imaging element emits light from the imaging optical system.
  • the electronic apparatus has a light receiving surface including a detection pixel for detecting the phase difference, which receives light that has passed through different regions of the pupil.
  • the imaging device of the present technology includes a conversion coefficient for converting the phase difference between two images obtained by dividing the exit pupil of the imaging optical system into a defocus amount representing a focus shift amount, and a phase difference AF (The defocus offset, which is the difference in lens position between the in-focus position of the Auto (Focus) method and the in-focus position of the contrast AF method, and a reliability threshold value for determining whether or not the phase difference is reliable are acquired.
  • An acquisition unit, a reliability determination unit that determines the reliability of the phase difference using the reliability threshold value, and the reliable phase difference is converted into the defocus amount using the conversion coefficient.
  • a phase difference AF calculation that corrects the defocus amount using the defocus offset and a phase difference detection unit that receives light that has passed through different areas of the exit pupil of the imaging optical system.
  • Receiving light including detection pixels for A conversion coefficient, the defocus offset, and the reliability threshold value are obtained for each representative point representing each of a plurality of pixel groups constituting the light receiving surface, and the reliability determination unit includes: The reliability of the phase difference is determined using the reliability threshold value of the representative point in the autofocus frame, and the calculation unit includes the conversion factor of the representative point in the autofocus frame, and the defocus It is an image sensor that performs the phase difference AF calculation using an offset.
  • the phase difference between two images obtained by pupil-dividing the exit pupil of the imaging optical system represents the amount of focus shift.
  • Conversion factor for conversion to defocus amount, defocus offset that is the difference in lens position between the focus position of phase difference AF (Auto-Focus) method and the focus position of contrast AF method, and the phase difference A reliability threshold value for determining the presence or absence of reliability is acquired. Further, the reliability of the phase difference is determined using the reliability threshold. Then, the reliable phase difference is converted into the defocus amount using the conversion factor, and the defocus amount is corrected using the defocus offset.
  • the conversion factor, the defocus offset, and the reliability threshold are determined for each representative point that represents each of a plurality of pixel groups that constitute a light receiving surface of the image sensor, and the image sensor.
  • the determination of the reliability of the phase difference is performed using the reliability threshold value of the representative point in the autofocus frame, and the phase difference AF calculation includes the conversion factor of the representative point in the autofocus frame, and , Using the defocus offset.
  • the signal processing device and the imaging device may be independent devices or may be internal blocks constituting one device.
  • the program can be provided by being transmitted through a transmission medium or by being recorded on a recording medium.
  • FIG. 3 is a diagram illustrating a configuration example of a normal pixel 52.
  • FIG. 3 is a diagram illustrating a configuration example of a detection pixel 53.
  • FIG. It is a figure which shows the example of the series of each pixel value of the normal pixel 52, the left light shielding pixel 53L, and the right light shielding pixel 53L.
  • FIG. 3 is a plan view illustrating a configuration example of a part of pixels on a light receiving surface 50.
  • FIG. It is a figure explaining the light quantity received by each of the left light-shielding pixel 53L and the right light-shielding pixel 53R. It is a figure explaining an adjustment gain.
  • FIG. 6 is a diagram for explaining that an error occurs in the defocus amount when the conversion coefficient varies depending on the position of the light receiving surface 50. It is a figure explaining a conversion factor. It is a top view which shows the example of the to-be-photographed object for the conversion coefficient setting process used in the conversion coefficient setting process which sets a conversion coefficient to a camera module.
  • FIG. 3 is a block diagram illustrating a configuration example of a phase difference AF processing unit 17.
  • FIG. It is a figure explaining the process of the phase difference AF process part.
  • FIG. It is a flowchart explaining the example of the lens movement amount calculation process which calculates a lens movement amount. It is a flowchart following FIG. It is a figure explaining image height. It is a figure which shows the usage example which uses a camera module.
  • FIG. 1 is a block diagram illustrating a configuration example of an embodiment of a camera module to which the present technology is applied.
  • the camera module includes a lens barrel 11, an optical filter 12, an image sensor 13, a main processing unit 14, an illumination control unit 15, a sensor driving unit 16, a phase difference AF processing unit 17, an image processing unit 18, and a focus drive.
  • a unit 19 a display unit 20, an operation unit 21, a flash memory 22, a focus actuator 23, and an illumination unit 24.
  • the camera module is configured integrally with the lens barrel 11.
  • the camera module can be configured such that the lens barrel 11 can be removed.
  • the lens barrel 11 has an imaging optical system 11A such as a lens group and a diaphragm, and condenses light incident on the image sensor 13 via the optical filter 12.
  • an imaging optical system 11A such as a lens group and a diaphragm
  • the lens position (and hence the focal position) of the lens group of the image pickup optical system 11A can be moved in the direction of the optical axis L, so that the focus can be adjusted.
  • the optical filter 12 is an optical element for reducing false colors and moire generated in a photographed image photographed by the image sensor 13. That is, the optical filter 12 is an optical low-pass filter, attenuates a part of the light component from the imaging optical system 11A, and outputs the attenuated component to the image sensor 13.
  • the image sensor 13 is an imaging element that captures a captured image by receiving light (subject light) incident through the optical filter 12 from the imaging optical system 11A.
  • CMOS ComplementarylementMetal ⁇ Oxide Semiconductor
  • the image sensor 13 supplies a photographed image (image signal) obtained by photographing to the sensor driving unit 16.
  • the main processing unit 14 controls each block constituting the camera module.
  • the main processing unit 14 includes a CPU (Central Processing Unit) 31, a memory 32, an ADC (Analog to Digital Converter) 33, a DAC (Digital to Analog Converter) 34, and a communication I / F (Interface) 35.
  • CPU Central Processing Unit
  • ADC Analog to Digital Converter
  • DAC Digital to Analog Converter
  • I / F Interface
  • the CPU 31 controls the illumination control unit 15 or the flash memory 22 by executing a program stored in the memory 32, and performs various operations such as AF, shooting of a shot image, various image processing, and recording of a shot image. Execute the process.
  • the memory 32 includes a volatile memory such as a RAM (Random Access Memory), a non-volatile memory such as an EEPROM (Electrically Erasable Programmable Read Only Memory), and the like, and a program executed by the CPU 31 and data necessary for the operation of the CPU 31.
  • a volatile memory such as a RAM (Random Access Memory)
  • a non-volatile memory such as an EEPROM (Electrically Erasable Programmable Read Only Memory), and the like
  • EEPROM Electrical Erasable Programmable Read Only Memory
  • the data stored in the memory 32 includes AF parameters described later for phase difference AF.
  • ADC33 AD converts analog signal to digital signal.
  • the communication I / F 35 controls communication with the Internet or the like.
  • the illumination control unit 15 controls the illumination unit 24 to emit light that illuminates the subject and light that becomes AF torch auxiliary light.
  • the illumination control unit 15 causes the illumination unit 24 to emit (light) an electronic flash that is light that illuminates the subject in synchronization with the photographing operation of the image sensor 13.
  • the illumination control unit 15 causes the illumination unit 24 to emit torch auxiliary light in synchronization with the AF operation.
  • the sensor driving unit 16 controls the image sensor 13 to capture a captured image.
  • the sensor driving unit 16 performs AD conversion on the image signal of the captured image captured by the image sensor 13 and supplies the image signal to the main processing unit 14 and the phase difference AF processing unit 17 as necessary.
  • the phase difference AF processing unit 17 uses a pixel value of a detection pixel, which will be described later, of the image signal of the captured image from the sensor driving unit 16 to perform a lens of the imaging optical system 11A (lens group) by phase difference AF.
  • a lens movement amount for moving the position is calculated and supplied to the main processing unit 14.
  • the image processing unit 18 captures images captured by the image sensor 13 and supplied via the sensor driving unit 16 and the main processing unit 14, such as ⁇ conversion, color interpolation, JPEG (Joint Photographic Experts Group), and the like. Image processing such as compression / decompression by a predetermined compression / decompression method is performed. Further, the image processing unit 18 calculates a contrast evaluation value representing the contrast of the captured image and supplies it to the main processing unit 14. The main processing unit 14 performs contrast AF (control) using the contrast evaluation value from the image processing unit 18.
  • the focus drive unit 19 drives the focus actuator 23 according to the control of the main processing unit 14 and adjusts the focus by moving the lens position of the imaging optical system 11A in the optical axis L direction.
  • the display unit 20 includes, for example, an LCD (Liquid Crystal Display) panel and the like, and information on the shooting mode of the camera module, a preview image before shooting, a confirmation image after shooting, an image in a focused state during AF, and the like Is displayed.
  • LCD Liquid Crystal Display
  • the operation unit 21 is a group of switches operated by the user, and includes a power switch, a release (shooting trigger) switch, a zoom operation switch, a shooting mode selection switch, and the like.
  • the flash memory 22 is detachable from the camera module. A captured image supplied from the main processing unit 14 is recorded (stored) in the flash memory 22.
  • the focus actuator 23 is driven by the focus drive unit 19 to move the lens position of the imaging optical system 11A in the optical axis L direction.
  • the illumination unit 24 emits light that illuminates the subject and light that serves as AF torch auxiliary light under the control of the illumination control unit 15.
  • the illumination unit 24 for example, a flash illumination device using a xenon tube, an LED illumination device having an LED (Light Emitting Diode) capable of continuous light emission, or the like can be employed.
  • a flash illumination device using a xenon tube an LED illumination device having an LED (Light Emitting Diode) capable of continuous light emission, or the like can be employed.
  • LED Light Emitting Diode
  • the camera module is mounted on a portable device such as a smartphone, a relatively small LED lighting device can be employed as the lighting unit 24.
  • the illuminating unit 24 projects light onto a field through a projection lens (not shown) in which a groove having a predetermined pattern is formed, and improves AF accuracy for a dark subject or a low-contrast subject. Improve.
  • the phase difference AF processing unit 17 can be included (built in) in the image sensor 13.
  • phase difference AF processing unit 17 can be realized by hardware or can be realized by software.
  • a program constituting the software is installed in, for example, a computer such as the main processing unit 14 and is executed by the CPU 31 of the main processing unit 14.
  • the processing performed by the CPU 31 according to the program does not necessarily have to be performed in chronological order in the order described as a flowchart described later. That is, the processing performed by the CPU 31 according to the program includes processing executed in parallel or individually (for example, parallel processing or object processing).
  • the program can be recorded in advance in a memory 32 as a recording medium built in the main processing unit 14 as a computer.
  • the program can be stored (recorded) in a removable recording medium such as the flash memory 22 and provided as so-called package software.
  • the program is downloaded to the main processing unit 14 via a communication network such as the Internet or a broadcasting network such as terrestrial and installed in the built-in memory 32. be able to.
  • FIG. 2 is a plan view showing a configuration example of the image sensor 13 viewed from the imaging optical system 11A side.
  • the image sensor 13 has a light receiving surface 50 that receives light, and the light receiving surface 50 is composed of H ⁇ V pixels in the horizontal and vertical directions.
  • the block when the light receiving surface 50 is divided into, for example, rectangular blocks as a pixel group including a plurality of pixels is also referred to as a pixel block 51.
  • 9 ⁇ 9 pixels are illustrated as a partial pixel group constituting the pixel block 51.
  • a Bayer array R (Red), G (Green), or B (Blue) (primary color) color filter is formed on-chip.
  • R pixel, G pixel, and B pixel the pixels on which the R, G, and B color filters are formed are referred to as R pixel, G pixel, and B pixel, respectively.
  • the R pixel, G pixel, and B pixel have spectral sensitivities of R, G, and B, respectively, by on-chip color filters.
  • G pixels are arranged at diagonal positions with 2 ⁇ 2 pixels in the horizontal and vertical directions as basic units, and R pixels and B pixels are arranged at the remaining two locations.
  • an R pixel is arranged in the upper right
  • a B pixel is arranged in the lower left
  • a B pixel is arranged in the upper left and the lower right
  • a G pixel is arranged.
  • the basic units as described above are repeatedly arranged horizontally and vertically.
  • the upper left G pixel of the basic unit is illustrated as Gr, and the lower right G pixel is illustrated as Gb.
  • the detection pixel 53 for example, in order to receive light that has passed through the right half or the left half as a different region of the exit pupil of the imaging optical system 11A, The right half is shaded.
  • the main component of luminance is acquired from the pixel value of the G pixel.
  • FIG. 3 is a diagram illustrating a configuration example of the normal pixel 52.
  • FIG. 3A is a plan view showing a configuration example of a region of only the normal pixel 52 in the light receiving surface 50.
  • FIG. 3B is a cross-sectional view schematically showing a cross section of the normal pixel 52 taken along the line segment L11 of FIG. 3A.
  • the normal pixel 52 has a configuration in which a PD (Photo Diode) 61, a CL (Contact Layer) 62, a color filter 63, and an on-chip lens (micro lens) 64 are stacked from the bottom in the drawing.
  • a PD Photo Diode
  • CL Contact Layer
  • micro lens micro lens
  • FIG. 4 is a diagram illustrating a configuration example of the detection pixel 53.
  • FIG. 4A is a plan view showing a configuration example of a region including the detection pixel 53 in the light receiving surface 50.
  • FIG. 4A is a plan view showing a configuration example of a region including the detection pixel 53 in the light receiving surface 50.
  • a part of the G pixel among the R pixel, G pixel, and B pixel on the light receiving surface 50 is the detection pixel 53.
  • a detection pixel a part of R pixel or B pixel can be adopted instead of the G pixel.
  • a left light-shielding pixel 53L whose left half is shielded to receive light that has passed through each of the right half and the left half as different areas of the exit pupil of the imaging optical system 11A, There is a right light-shielding pixel 53R in which half is shielded.
  • the left light-shielding pixel 53L and the right light-shielding pixel 53R are paired.
  • 4B is a cross-sectional view schematically showing a cross section of the left light-shielding pixel 53L of the detection pixels 53 taken along the line segment L21 of FIG.
  • 4C is a cross-sectional view schematically showing a cross section of the right light-shielding pixel 53R among the detection pixels 53 taken along the line segment L22 of FIG. 4A.
  • the detection pixel 53 is common to the normal pixel 52 in that it includes a PD 61 or an on-chip lens 64. However, the detection pixel 53 is different from the detection pixel 53 in that a light shielding film 66 is provided on the CL 62.
  • a light-shielding film 66 is provided so as to shield the left half of the left light-shielding pixel 53L. Accordingly, in the left light-shielding pixel 53L, only the right half is opened from the center of the on-chip lens 64 when viewed from the on-chip lens 64 side. As a result, the left light-shielding pixel 53L receives light that has passed, for example, the right half of the exit pupil of the imaging optical system 11A.
  • a light-shielding film 66 is provided so as to shield the right half of the right light-shielding pixel 53R.
  • the right light-shielding pixel 53R only the left half from the center of the on-chip lens 64 is opened as viewed from the on-chip lens 64 side.
  • the right light-shielding pixel 53R receives light that has passed, for example, the left half of the exit pupil of the imaging optical system 11A.
  • the pupil division in the horizontal direction (lateral direction) of the exit pupil of the imaging optical system 11A is performed.
  • the detection pixels 53 are regularly arranged in the horizontal direction over the entire light receiving surface 50, for example. Increasing the number of detection pixels 53 improves the accuracy of the phase difference and thus the phase difference AF, but degrades the image quality of the captured image. Therefore, the number and arrangement position of the detection pixels 53 can be determined in consideration of a trade-off between the accuracy of the phase difference AF and the image quality of the captured image.
  • the arrangement pattern of the detection pixels 53 can be a fixed pattern, or can be a different pattern depending on the location such as the central portion or the peripheral portion of the light receiving surface 50, for example.
  • FIG. 5 is a diagram illustrating an example of a series of pixel values of the normal pixel 52, the left light-shielding pixel 53L, and the right light-shielding pixel 53L.
  • a series of pixel values of the normal pixels 52 arranged in a line is also referred to as a normal series.
  • a series of pixel values of the left light-shielding pixels 53L arranged in the line is also referred to as a left light-shielding series
  • a series of pixel values of the right-shaded pixels 53R arranged in the line is also referred to as a right light-shielding series.
  • FIG. 5 is a diagram illustrating a normal light and right light shielding series obtained from a line in which normal pixels 52 and right light shielding pixels 53R coexist, and a left light shielding light obtained from a line in which the left light shielding pixel 53L is paired with the right light shielding pixel 53R. A series is shown.
  • the horizontal axis represents the pixel position
  • the vertical axis represents the pixel value (brightness).
  • the subject image that appears as a normal series is an image that appears as a left light-shielded series (hereinafter also referred to as a left light-shielded image) and an image that appears as a right light-shielded series ( Hereinafter, it is also referred to as a right light-shielded image).
  • the focus of the subject image is determined based on the phase difference. It is possible to detect a defocus amount that is a shift amount of.
  • FIG. 6 is a diagram illustrating an example of a right light-shielding series obtained from a line in which the right light-shielding pixel 53R exists and a left light-shielding series obtained from a line in which the left light-shielding pixel 53L paired with the right light-shielding pixel 53R is present. .
  • the horizontal axis represents the pixel position
  • the vertical axis represents the pixel value
  • a part of the G pixels in the line L31 where the R pixel which is the normal pixel 52 exists is the right light-shielding pixel 53R.
  • a part of the G pixels in the line L32 immediately after the line L31 is the left light-shielding pixel 53L.
  • the right light-shielding pixel 53R and the left light-shielding pixel 53L diagonally to the left of the right light-shielding pixel 53R form a pair for detecting a phase difference (a left light-shielded image and a right light-shielded image).
  • the phase difference can be obtained (detected) in units of the number of pixels using the left shading series and the right shading series.
  • FIG. 7 is a diagram for explaining contrast AF (CDAF), phase difference AF (PDAF), and hybrid AF.
  • the horizontal axis represents the lens position of the imaging optical system 11A
  • the vertical axis represents the contrast evaluation value and the phase difference.
  • the left direction on the horizontal axis represents the Inf (infinity) direction
  • the right direction represents the macro (closest) direction.
  • the Inf direction is a direction in which a subject at a far position is in focus
  • the macro direction is a direction in which a subject at a near position is in focus.
  • contrast AF In contrast AF (CDAF), a contrast evaluation value representing the contrast of a captured image is obtained at each lens position while moving the lens position. The lens position is moved so that the contrast evaluation value increases.
  • the lens position Since the contrast evaluation value becomes maximum at the in-focus position, in contrast AF, the lens position is moved so as to approach the in-focus position, and once passes the in-focus position. Thereafter, the lens position is gradually moved so as to pass the focus position again, and the lens position where the contrast evaluation value is maximized, that is, the focus position is detected using the contrast evaluation value obtained at that time. The Then, the lens position is moved to the in-focus position where the contrast evaluation value is maximized.
  • phase difference AF when the lens position is in the in-focus position, if the phase difference becomes zero, the lens position is directly moved so that the phase difference becomes zero.
  • the lens position is moved closer to the in-focus position by phase difference AF, and then the lens position is accurately moved to the in-focus position by contrast AF.
  • FIG. 8 is a diagram for explaining the relationship between the phase difference and the defocus amount.
  • phase difference and the defocus amount both represent the amount of focus deviation of the subject image, but in AF, the defocus amount represents how far the current lens position is to the in-focus position. Used as a physical quantity.
  • the defocus amount represents the distance and direction from the focus position to the current lens position.
  • FIG. 8A is a diagram for explaining the defocus amount.
  • the lens position where the contrast evaluation value is maximized is taken as the in-focus position, and the defocus amount represents the distance and direction from the in-focus position to the current lens position.
  • um can be adopted as a unit of the defocus amount.
  • the phase difference represents the amount of focus shift of the subject image as a relative positional relationship between the left light-shielded image and the right light-shielded image, and its unit is the number of pixels.
  • FIG. 8B is a diagram showing the relationship between the phase difference and the defocus amount.
  • the horizontal axis represents the phase difference
  • the vertical axis represents the defocus amount
  • the phase difference and the defocus amount have a linear relationship as shown in FIG. 8B, and therefore the phase difference and the defocus amount can be obtained from one to the other. .
  • the defocus amount can be obtained according to Expression (1) using the phase difference.
  • Defocus amount [um] phase difference [number of pixels] x conversion coefficient a [um / number of pixels] ... (1)
  • the conversion characteristic is ideally represented by a straight line.
  • the conversion coefficient a represents the slope of the conversion characteristic represented by a straight line.
  • the conversion factor a can be obtained in advance (before shipment) by performing a test of the camera module at a manufacturing factory that manufactures the camera module.
  • FIG. 9 is a plan view illustrating a configuration example of a part of pixels on the light receiving surface 50.
  • FIG. 9 parts corresponding to those in FIGS. 3 and 4 are given the same reference numerals, and description thereof will be omitted below as appropriate.
  • the on-chip lens 64, the light shielding film 66, and the like are formed (attached), the on-chip lens 64, the light shielding film 66, and the like are at their original positions (ideal positions). In some cases, misalignment (for example, misalignment during lithography) may occur.
  • FIG 9A shows a pixel in which the light shielding film 66 is formed at the original position.
  • the light-shielding film 66 is formed so as to shield the (substantially) left half of the left light-shielding pixel 53L, and the (substantially) right half is open.
  • the light-shielding film 66 is formed so as to shield the (substantially) right half of the right light-shielding pixel 53R, and the (substantially) left half is open.
  • FIG. 9B shows a pixel in which the light shielding film 66 is formed at a position shifted in the horizontal direction (right direction) from the original position.
  • the light-shielding film 66 shields the left and right ends of the left light-shielding pixel 53L.
  • the light-shielding film 66 shields most of the portion other than the left end of the right light-shielding pixel 53R.
  • the left light shielding pixel 53L and the right light shielding pixel 53R are irradiated with the same amount of light, the left light shielding pixel 53L and the right light shielding pixel.
  • the amount of light received by each of 53R is different.
  • the pixel values of the left light-shielding pixel 53L and the right light-shielding pixel 53R are also different pixel values.
  • FIG. 10 is a diagram for explaining the amount of light received by each of the left light-shielding pixel 53L and the right light-shielding pixel 53R when the left light-shielding pixel 53L and the right light-shielding pixel 53R are irradiated with the same amount of light.
  • FIG. 10A shows the amount of light received by each of the left light shielding pixel 53L and the right light shielding pixel 53R when the light shielding film 66 is formed at the original position.
  • the amounts of light received by the left light-shielding pixel 53L and the right light-shielding pixel 53R are the same.
  • FIG. 10B shows the amount of light received by each of the left light shielding pixel 53L and the right light shielding pixel 53R when the light shielding film 66 is formed at a position shifted to the right from the original position.
  • the amount of light received by the right light shielding pixel 53R is large, and the amount of light received by the left light shielding pixel 53L is small.
  • FIG. 10C shows the amount of light received by each of the left light shielding pixel 53L and the right light shielding pixel 53R when the light shielding film 66 is formed at a position shifted to the left from the original position.
  • the amount of light received by the right light shielding pixel 53R is small, and the amount of light received by the left light shielding pixel 53L is large.
  • the light shielding film 66 when the light shielding film 66 is formed at a position shifted from the original position, the light amounts received by the left light shielding pixel 53L and the right light shielding pixel 53R are different from each other.
  • the on-chip lens 64 is formed at a position shifted from the original position in addition to the light shielding film 66, the amount of light received by each of the left light shielding pixel 53L and the right light shielding pixel 53R is different. Become.
  • misalignment of the on-chip lens 64 and the light shielding film 66 from the original position occurs at the time of manufacturing the camera module (image sensor 13).
  • the misalignment varies depending on the camera module.
  • various manufacturing errors may occur in parameters other than the positional deviation of the on-chip lens 64 and the light shielding film 66, but the manufacturing errors still have individual differences.
  • AF parameters for phase difference AF i.e., for example, the conversion factor described above, adjustment gain, defocus offset, reliability threshold, phase difference offset, movement rate table, and lens position offset table described later are: It is obtained for each individual camera module and used in that camera module.
  • any one or more of the conversion coefficient, adjustment gain, defocus offset, reliability threshold, phase difference offset, movement ratio table, and lens position offset table as AF parameters can be applied to multiple camera modules (eg, multiple camera modules manufactured in the same factory).
  • FIG. 11 is a diagram for explaining the adjustment gain.
  • FIG. 11 shows an example of a normal series, a left shading series, and a right shading series obtained when an all white chart is captured by the image sensor 13.
  • the horizontal axis represents the horizontal position (x coordinate) of the pixel
  • the vertical axis represents the pixel value (level).
  • the normal series, the left shading series, and the right shading series are convex graphs having a peak near the center.
  • the difference diffPP between the left peak value that is the maximum value of the left light-shielding series and the right peak value that is the maximum value of the right light-shielding series is correlated with, for example, the positional deviation of the light shielding film 66.
  • the amount of light received by the left light-shielding pixel 53L and the right light-shielding pixel 53R varies depending on the positional deviation of the light-shielding film 66.
  • the left peak value and the right peak value are equal and the difference diffPP is 0 if there is no positional shift.
  • the light shielding film 66 is provided so as to shield the left half of the left light shielding pixel 53L in the left light shielding pixel 53L, and the light shielding film in the right light shielding pixel 53R. 66 is provided so as to shield the right half of the right light-shielding pixel 53R, the difference diffPA between the normal pixel peak value that is the maximum value of the normal series and the average value ave of the left peak value and the right peak value is The normal pixel peak value is 1 ⁇ 2.
  • the amount of light received by each of the left light shielding pixel 53L and the right light shielding pixel 53R as a pair is different even when the image sensor 13 captures an all-white chart.
  • the pixel values obtained are also different.
  • the difference in the amount of light received by the left light-shielding pixel 53L and the right light-shielding pixel 53R as a pair means that the light-shielding film 66 is misaligned as well as the optical displacement of the imaging optical system 11A and the on-chip lens 64. This is also caused by the above.
  • the pixel value of the detection pixel 53 (the left light-shielding pixel 53L and the right light-shielding pixel 53R) is corrected by the adjustment gain.
  • the adjustment gain can be obtained according to equation (2).
  • Adjustment gain pixel value of normal pixel 52 / pixel value of detection pixel 53 (2)
  • the pixel value of the detection pixel 53 is the pixel value of the left light-shielding pixel 53L or the pixel value of the right light-shielding pixel 53R.
  • FIG. 12 is a diagram illustrating an example of correction of the pixel value of the detection pixel 53 by the adjustment gain.
  • an adjustment gain is obtained for each of the left light-shielding pixel 53L and the right light-shielding pixel 53R according to Equation (2).
  • the adjustment gain is obtained by using the pixel value of the normal pixel 52 and the pixel value of the detection pixel 53 obtained by photographing an all white chart as a predetermined subject, for example, according to the equation (2). It is obtained by taking the ratio of the pixel value and the pixel value of the detection pixel 53.
  • the pixel value is shown in FIG. As shown, it matches the pixel value of the normal pixel 52.
  • the pixel value of the left light shielding pixel 53L is corrected by multiplying the pixel value of the left light shielding pixel 53L by the adjustment gain for the left light shielding pixel 53L.
  • the pixel value of the right light-shielded pixel 53R is corrected by multiplying the pixel value of the right light-shielded pixel 53R by the adjustment gain for the right light-shielded pixel 53R.
  • the phase difference is obtained using the pixel values of the detection pixels 53 (the left light shielding pixel 53L and the right light shielding pixel 53R) corrected using the adjustment gain.
  • phase difference AF As described above, a highly accurate phase difference can be obtained by using the pixel value of the detection pixel 53 corrected using the adjustment gain. Furthermore, by performing phase difference AF using such a highly accurate phase difference, the accuracy of phase difference AF can be improved.
  • FIG. 13 is a diagram illustrating an adjustment gain setting process for setting the adjustment gain in the camera module.
  • FIG. 13 shows the light receiving surface 50 of the image sensor 13.
  • the adjustment gain is obtained for each node that is a representative point representing a plurality of pixels constituting the pixel block 51.
  • the center of gravity of the pixel block 51 can be used as the nodal point.
  • ⁇ Nodal points can be identified by adding vertical and horizontal positions (coordinates) and numbers.
  • FIG. 14 is a flowchart for explaining an example of the adjustment gain setting process.
  • step S11 the main processing unit 14 sets the drive mode of the image sensor 13 via the sensor driving unit 16, and the process proceeds to step S12.
  • examples of the drive mode include an all-pixel mode, a thinning mode, and a pixel addition mode.
  • the all-pixel mode an image composed of pixel values of each pixel constituting the image sensor 13 is output as a captured image.
  • the thinning mode an image composed of the pixel values of the thinned pixels obtained by thinning pixels from the pixels constituting the image sensor 13 with a predetermined pattern is output as a captured image.
  • the pixel addition mode an image having a pixel value obtained by adding the pixel values of the pixels constituting the image sensor 13 in a predetermined pattern is output as a captured image.
  • step S12 the main processing unit 14 moves the lens position of the imaging optical system 11A to a predetermined fixed position in the macro direction, for example, by controlling the focus actuator 23 via the focus driving unit 19. Advances to step S13.
  • an object of white color is prepared as an object for the adjustment gain setting process.
  • the adjustment gain setting processing subject and the camera module are known so as to be in focus when the lens position of the imaging optical system 11A is a predetermined fixed position in the macro direction. Set to a distance of
  • step S13 the main processing unit 14 sets shooting conditions for shooting a white subject that is the subject for the adjustment gain setting process, and the process proceeds to step S14.
  • the shooting conditions set in step S13 include, for example, shutter speed and AE (Automatic Exposure) gain.
  • step S ⁇ b> 14 the image sensor 13 shoots a white-colored subject (chart) that is a subject for the adjustment gain setting process, and a captured image obtained by the shooting is captured via the sensor driving unit 16 in the main processing unit 14. The process proceeds to step S15.
  • step S15 the main processing unit 14 obtains an adjustment gain for the detection pixel 53 (each of the left light-shielding pixel 53L and the right light-shielding pixel 53R) using the captured image from the image sensor 13 according to the equation (2).
  • the main processing unit 14 sequentially selects each pixel block 51 as a target block. For each of the left light-shielding pixel 53L and the right light-shielding pixel 53R that are the detection pixels 53 in the block of interest, the main processing unit 14 uses a representative value such as an average value of the adjustment gain for the left light-shielding pixel at the node of the block of interest. The adjustment gain and the adjustment gain for the right light-shielded pixel are obtained, and the process proceeds from step S15 to step S16.
  • step S16 the main processing unit 14 determines whether or not the adjustment gain obtained in step S15 is a value within a range predetermined as a manufacturing standard (hereinafter also referred to as a value within the manufacturing standard).
  • step S16 If it is determined in step S16 that the adjustment gain is not a value within the manufacturing standard, the adjustment gain setting process ends. In this case, since the camera module may be defective, the camera module is sent for inspection, for example.
  • step S16 determines whether the adjustment gain is a value within the manufacturing standard. If it is determined in step S16 that the adjustment gain is a value within the manufacturing standard, the process proceeds to step S17.
  • step S ⁇ b> 17 the main processing unit 14 writes the adjustment gain for the left light-shielded pixel and the adjustment gain for the right light-shielded pixel for each node of the pixel block 51 obtained in step S ⁇ b> 15 in the memory 32 and adjusts the gain.
  • the setting process ends.
  • the adjustment gain for the left light-shielded pixel and the adjustment gain for the right light-shielded pixel at the node of each pixel block 51 are written in the memory 32, so that the adjustment gain is set in the camera module.
  • correction of the pixel value of the left light-shielded pixel 53L of a certain pixel block 51 can be performed by, for example, multiplying the adjustment gain for the left light-shielded pixel at the node of the pixel block 51.
  • the correction of the pixel value of the left light-shielded pixel 53L of a certain pixel block 51 is obtained by, for example, (three-dimensional) interpolation using an adjustment gain for the left light-shielded pixel at the node of each pixel block 51. This can be done by multiplying the interpolation value of the adjustment gain at the position 53L.
  • the adjustment gain for each nodal point is written (stored) in the memory 32, but the adjustment gain for each detection pixel 53 can be written in the memory 32.
  • the adjustment gain for each detection pixel 53 is written in the memory 32, the correction accuracy of the pixel value of the detection pixel 53 by the adjustment gain can be improved, but the storage capacity for storing the adjustment gain in the memory 32 is large. Become big.
  • FIG. 15 is a diagram showing an example of conversion characteristics that are the relationship between the phase difference and the defocus amount.
  • the horizontal axis represents the phase difference and the vertical axis represents the defocus amount, but in FIG. 15, the horizontal axis and the vertical axis are interchanged. That is, in FIG. 15, the horizontal axis represents the defocus amount, and the vertical axis represents the phase difference.
  • DAC value
  • the DAC is a control unit for controlling the VCM when the VCM (Voice Coil Motor) is adopted as the focus actuator 23.
  • the DAC as the defocus amount, for example, a value represented by 10 bits (range from 0 to 1023) can be adopted.
  • FIG. 15 shows three conversion characteristics R # 1, R # 2, and R # 3.
  • the conversion characteristic R # 1 is a conversion characteristic for the detection pixel 53 at the center of the light receiving surface 50 of the image sensor 13, that is, a conversion characteristic that is a relationship between the phase difference obtained from the detection pixel 53 at the center and the defocus amount. Represents.
  • the conversion characteristic R # 2 represents the conversion characteristic for the detection pixel 53 in the part of the periphery of the light receiving surface 50 of the image sensor 13 that is separated from the center part in the horizontal direction.
  • the conversion characteristic R # 3 represents the conversion characteristic of the detection pixel 53 in a portion away from the central portion in the diagonal direction in the peripheral portion of the light receiving surface 50 of the image sensor 13.
  • the position farthest from the center in the lateral direction Is about 64%.
  • Conversion characteristics R # 1 to R # 3 represent conversion characteristics for the detection pixels 53 at positions of 0%, 64%, and 100%, respectively.
  • the reciprocal 1 / a of the conversion characteristic a which is the inclination, becomes smaller as the conversion characteristic for the detection pixel 53 at a position away from the center of the light receiving surface 50 of the image sensor 13 is obtained. That is, it can be confirmed that the conversion characteristic a is increased.
  • the conversion characteristics that is, the conversion coefficient a varies depending on the position of the light receiving surface 50.
  • the conversion coefficient a is obtained only for the detection pixel 53 at a certain position, such as the detection pixel 53 at the center of the light receiving surface 50 of the image sensor 13, and the conversion coefficient a is calculated for all the image sensors 13.
  • the defocus amount is obtained using the detection pixel 53, an error may occur in the defocus amount.
  • FIG. 16 is a diagram for explaining that an error occurs in the defocus amount when the conversion coefficient “a” varies depending on the position of the light receiving surface 50.
  • FIG. 16 shows a conversion characteristic (hereinafter also referred to as center conversion characteristic) R # 1 for the detection pixel 53 at the center of the light receiving surface 50 and a conversion coefficient (hereinafter referred to as the detection pixel 53 at the periphery of the light receiving surface 50).
  • R # 1 a conversion characteristic for the detection pixel 53 at the center of the light receiving surface 50
  • R # 2 a conversion coefficient for the detection pixel 53 at the periphery of the light receiving surface 50.
  • the horizontal axis represents the lens position of the imaging optical system 11A
  • the vertical axis represents the phase difference and the contrast evaluation value.
  • the left direction is the Inf direction
  • the right direction is the macro direction
  • the in-focus position is assumed to be the lens position where the contrast evaluation value is maximized.
  • phase difference x1 is detected from the detection pixel 53 at the center of the light receiving surface 50.
  • the defocus amount y1 is obtained for the phase difference x1
  • the defocus amount y1 is obtained with respect to the phase difference x1.
  • a large defocus amount y2 is required.
  • the defocus amount y1 obtained using the center conversion characteristic R # 1 is appropriate.
  • the peripheral conversion is performed with respect to the phase difference x1 obtained from the detection pixel 53 at the center of the light receiving surface 50.
  • the defocus amount y2 is obtained using the characteristic R # 2.
  • the defocus amount y2 is larger than the defocus amount y1 appropriate for the phase difference x1 obtained from the detection pixel 53 at the center of the light receiving surface 50, and has an error.
  • the lens position of the imaging optical system 11A When the lens position of the imaging optical system 11A is moved according to the defocus amount y2, the lens position goes too far from the in-focus position, and the accuracy of the phase difference AF deteriorates.
  • the conversion coefficient a is set for each of a plurality of positions on the light receiving surface 50, and the defocus amount is obtained by using the conversion coefficient a.
  • FIG. 17 is a diagram for explaining the conversion coefficient a.
  • the horizontal axis represents the phase difference and the vertical axis represents the defocus amount, as in B of FIG.
  • the conversion coefficient a is the slope of the conversion characteristic that represents the relationship between the phase difference and the defocus amount, and is obtained according to Equation (3).
  • FIG. 18 is a plan view showing an example of a subject for the conversion coefficient setting process used in the conversion coefficient setting process for setting the conversion coefficient in the camera module.
  • a slit subject with a slit can be adopted.
  • a subject having a high contrast can be adopted so that a phase difference with high accuracy can be detected.
  • FIG. 19 is a flowchart for explaining an example of the conversion coefficient setting process.
  • the conversion coefficient setting process for example, as in the adjustment gain described with reference to FIG. 14, the conversion coefficient is obtained for each node that is a representative point representing a plurality of pixels constituting the pixel block 51.
  • step S21 the main processing unit 14 sets the drive mode of the image sensor 13 as in step S11 of FIG. 14, and the process proceeds to step S22.
  • step S22 as in step S13 of FIG. 14, the main processing unit 14 sets shooting conditions for shooting a slit subject that is a subject for the conversion coefficient setting process, and the process proceeds to step S23.
  • step S ⁇ b> 23 the main processing unit 14 controls the focus actuator 23 via the focus driving unit 19, thereby changing the lens position of the imaging optical system 11 ⁇ / b> A from the position in the macro direction to the position in the Inf direction. Move sequentially to the position.
  • the subject for the conversion coefficient setting process and the camera module are set at a known distance. Therefore, the in-focus position and the defocus amount with respect to the lens position of the imaging optical system 11 are known.
  • step S23 The movement of the lens position in step S23 is performed across the in-focus position.
  • step S23 as described above, the lens position of the imaging optical system 11A is sequentially moved to a plurality of positions.
  • the image sensor 13 photographs a slit subject that is a subject for conversion coefficient setting processing. To do.
  • the captured image captured by the image sensor 13 when the lens position of the imaging optical system 11A is moved to each of a plurality of positions is supplied to the main processing unit 14 via the sensor driving unit 16.
  • the main processing unit 14 obtains the phase difference from the pixel values of the detected pixels of the pixel block 51 for each pixel block 51 of the captured image captured at each of the plurality of lens positions as described above. Further, the main processing unit 14 acquires the defocus amount with respect to the lens position when the phase difference obtained from the pixel value of the detection pixel of the pixel block 51 is obtained.
  • the subject for the conversion coefficient setting process and the camera module are set at a known distance, and the defocus amount with respect to the lens position is known.
  • step S23 When the main processing unit 14 obtains a set of phase difference and defocus amount for each pixel block 51 for each of a plurality of lens positions, the process proceeds from step S23 to step S24, and the main processing unit 14 For each point, a conversion coefficient a is obtained.
  • the main processing unit 14 sequentially selects each pixel block 51 as a target block.
  • the main processing unit 14 is defined by Expression (3) using the phase difference obtained from the detection pixel 53 of the block of interest for each of a plurality of lens positions and the defocus amount set as the phase difference.
  • the conversion coefficient a is calculated as the conversion coefficient a of the nodal point of the target block.
  • step S23 a plurality of sets of phase differences and defocus amounts are obtained for the block of interest.
  • the least square method is applied to a plurality of sets of the phase difference and the defocus amount for the block of interest, and the conversion coefficient a of the node of the block of interest can be obtained.
  • the conversion coefficient a is obtained according to the equation (3), and the conversion obtained for each of the plurality of sets.
  • a representative value such as an average value of the coefficient a can be obtained as the conversion coefficient a of the nodal point of the block of interest.
  • step S24 When the conversion factor a of the nodal point of each pixel block 51 is obtained, the process proceeds from step S24 to step S25.
  • step S25 the main processing unit 14 determines whether or not the conversion coefficient a obtained in step S24 is a value within the manufacturing standard. Whether or not the conversion coefficient a is a value within the manufacturing standard can be determined based on whether or not a PDAF focusing position error, which will be described later, obtained from the conversion coefficient a is within a predetermined threshold.
  • step S25 If it is determined in step S25 that the conversion coefficient a is not a value within the manufacturing standard, the conversion coefficient setting process ends. In this case, since the camera module may be defective, the camera module is sent for inspection, for example.
  • step S25 when it is determined in step S25 that the conversion coefficient a is a value within the manufacturing standard, the process proceeds to step S26.
  • step S26 the main processing unit 14 writes the conversion coefficient a of the nodal point of each pixel block 51 obtained in step S24 into the memory 32, and the conversion coefficient setting process ends.
  • the conversion coefficient a of the nodal point of each pixel block 51 is written in the memory 32, whereby the conversion coefficient a is set in the camera module.
  • the conversion of the phase difference obtained from the detection pixel 53 in a certain pixel block 51 into the defocus amount is performed using the conversion coefficient a of the nodal point of the pixel block 51.
  • FIG. 20 is a diagram for explaining the defocus offset.
  • the horizontal axis represents the lens position
  • the vertical axis represents the phase difference and the contrast evaluation value.
  • the phase difference AF may not be as accurate as the contrast AF.
  • the lens position where the contrast evaluation value is maximized in contrast AF is finally the in-focus position. Therefore, in order to increase the speed of hybrid AF, it is important to move the lens position as close as possible to the lens position where the contrast evaluation value is maximized as the in-focus position in phase difference AF.
  • FIG. 20 shows an actual relationship between the lens position, the contrast evaluation value, and the phase difference.
  • the lens position where the contrast evaluation value is maximized is also called the contrast AF focusing position.
  • the current lens position that is, for example, the position where phase difference AF is started in hybrid AF is also referred to as the PDAF execution position, and the lens position after movement according to the defocus amount in phase difference AF is changed to PDAF alignment. It is also called a focal position.
  • the PDAF in-focus position is a position where the lens position is moved from the PDAF execution position so that the defocus amount obtained at the PDAF execution position is zero.
  • the defocus amount is obtained by multiplying the phase difference obtained at the PDAF execution position by the conversion coefficient a.
  • the PDAF focusing position can be obtained according to the equation (4).
  • the PDAF focus position error is expressed by Expression (5).
  • PDAF focus position error PDAF focus position-Contrast AF focus position (5)
  • the PDAF in-focus position error in equation (5) may not be zero due to manufacturing errors.
  • the defocus amount here, the distance from the contrast AF focus position to the PDAF execution position
  • the PDAF focus position error tends to increase.
  • the first factor that increases the PDAF focus position error as the defocus amount increases is that the image on the detection pixel 53 is blurred when the defocus amount is large.
  • the image on the detection pixel 53 is blurred, the contrast of the left light-shielded image and the right light-shielded image obtained as a series of pixel values of the detection pixel 53 is lost, and the phase difference accuracy obtained from the left light-shielded image and the right light-shielded image is lost. Gets worse.
  • the second factor that increases the PDAF focus position error as the defocus amount increases the greater the defocus amount, the greater the amount of deviation between the left and right light-shielded images.
  • the amount of deviation the amount of deviation corresponding to the distance that can be measured
  • the coincidence between the left light-shielded image and the right light-shielded image is lowered, and the accuracy of the phase difference obtained from the left light-shielded image and the right light-shielded image is deteriorated.
  • the PDAF focus position error is obtained as a defocus offset that is an offset of the defocus amount, and the defocus amount is corrected by the defocus offset, thereby improving the accuracy of the phase difference AF.
  • FIG. 21 is a diagram for explaining a defocus offset calculation method and a defocus amount correction method using the defocus offset.
  • the defocus offset can be calculated from PDAF in-focus position error according to equation (6).
  • the PDAF in-focus position error can be obtained using the PDAF in-focus position and the contrast AF in-focus position according to the equation (5).
  • the PDAF focus position can be obtained according to equation (4).
  • the contrast AF focus position can be obtained as the lens position where the contrast evaluation value is maximized.
  • the contrast evaluation value can be obtained from the image processing unit 18.
  • the defocus amount obtained from the phase difference is changed to the defocus amount for moving the lens position from the current position to the contrast AF in-focus position according to Equation (7). It is corrected.
  • Defocus amount after correction Defocus amount + Defocus offset (7)
  • FIG. 22 is a flowchart for explaining an example of defocus offset setting processing for setting a defocus offset in the camera module.
  • the slit subject in FIG. 18 can be employed as the subject for the defocus offset setting process.
  • the defocus offset is obtained for each nodal point (FIG. 13) that is a representative point representing a plurality of pixels constituting the pixel block 51. .
  • step S41 the main processing unit 14 sets the drive mode of the image sensor 13 as in step S11 of FIG. 14, and the process proceeds to step S42.
  • step S42 as in step S13 of FIG. 14, the main processing unit 14 sets shooting conditions for shooting a slit subject, which is a subject for the defocus offset setting process, and the process proceeds to step S43.
  • step S43 the main processing unit 14 controls the focus actuator 23 via the focus driving unit 19 to change the lens position of the imaging optical system 11A from the position in the macro direction, as in step S23 of FIG. Move sequentially to multiple positions in the Inf direction.
  • step S43 as described above, the lens position of the imaging optical system 11A is sequentially moved to a plurality of positions.
  • the image sensor 13 photographs the slit subject.
  • the captured image captured by the image sensor 13 when the lens position of the imaging optical system 11A is moved to each of a plurality of positions is supplied to the main processing unit 14 via the sensor driving unit 16.
  • the main processing unit 14 obtains the phase difference from the pixel values of the detected pixels of the pixel block 51 for each pixel block 51 of the captured image captured at each of the plurality of lens positions as described above.
  • the main processing unit 14 controls the image processing unit 18 to obtain a contrast evaluation value for the captured images captured at each of a plurality of lens positions.
  • step S43 the main processing unit 14 obtains the pixel block 51 for each pixel block 51 using the conversion coefficient a obtained in the conversion coefficient setting process of FIG.
  • a defocus amount is obtained from the obtained phase difference.
  • the main processing unit 14 uses the defocus amount for each pixel block 51 to obtain the PDAF in-focus position according to Expression (4).
  • the main processing unit 14 determines, based on the contrast evaluation value obtained by the image processing unit 18, the lens position where the contrast evaluation value is the maximum for the captured image captured at each of the plurality of lens positions. Find as position.
  • the main processing unit 14 obtains the PDAF in-focus position for the captured image captured at each of the plurality of lens positions for each pixel block 51.
  • a representative value such as an average value of PDAF focus positions obtained for captured images taken at a plurality of lens positions is obtained as the PDAF focus position for the pixel block 51.
  • step S44 the main processing unit 14 determines, for each nodal point. Find the defocus offset.
  • step S45 the main processing unit 14 sequentially selects each pixel block 51 as a target block.
  • the main processing unit 14 uses the PDAF focus position of the block of interest and the contrast AF focus position to determine the PDAF focus position error of equation (5) as a defocus offset of the node of the block of interest, and performs processing Advances from step S45 to step S46.
  • step S46 the main processing unit 14 determines whether or not the defocus offset obtained in step S45 is a value within the manufacturing standard.
  • step S46 If it is determined in step S46 that the defocus offset is not a value within the manufacturing standard, the defocus offset setting process ends. In this case, since the camera module may be defective, the camera module is sent for inspection, for example.
  • step S46 determines whether the defocus offset is a value within the manufacturing standard. If it is determined in step S46 that the defocus offset is a value within the manufacturing standard, the process proceeds to step S47.
  • step S47 the main processing unit 14 writes the defocus offset of the nodal point of each pixel block 51 obtained in step S45 into the memory 32, and the defocus offset setting process ends.
  • the defocus offset of the nodal point of each pixel block 51 is written in the memory 32, whereby the defocus offset is set in the camera module.
  • the correction of the defocus amount obtained from the phase difference obtained from the detection pixel 53 in a certain pixel block 51 is performed according to Expression (7) using the defocus offset of the nodal point of the pixel block 51. Is called.
  • the process of obtaining the PDAF focus position error can be performed a plurality of times.
  • the average value of the PDAF in-focus position error obtained by the plurality of processes can be used as the defocus offset.
  • FIG. 23 is a diagram showing an outline of the relationship between the reliability threshold value of the phase difference reliability and the sensor gain of the image sensor 13.
  • the horizontal axis represents the sensor gain of the image sensor 13
  • the vertical axis represents the phase difference reliability (reliability threshold).
  • the image plane phase difference AF method does not have a very wide defocus amount, and thus the range in which the phase difference can be measured. Therefore, when the defocus amount is large and the phase difference deviates from the range that can be measured (when the subject is blurred), it is difficult to perform the phase difference AF.
  • the phase difference reliability is an index for determining whether or not the phase difference is within a range that can be measured, and the reliability to the extent that an accurate defocus amount can be obtained from the phase difference. To express.
  • phase difference reliability for example, a value defined by Equation (8) can be adopted.
  • Phase difference reliability
  • the phase difference reliability of Expression (8) represents, for example, the phase difference reliability of the phase difference obtained from the detection pixel 53 included in the target block with one pixel block 51 as the target block. .
  • X i represents the position of the i-th detection pixel 53 of the block of interest
  • Y i represents the pixel value of the detection pixel 53 at the position X i
  • represents summation for all the detection pixels 53 in the block of interest.
  • Equation (8) the total sum of the ratios of changes in the pixel values of the detection pixels 53 included in the target block is obtained as the phase difference reliability of the phase difference obtained from the detection pixels 53 included in the target block.
  • Equation (8) Note that the phase difference reliability of Equation (8) is described in Japanese Patent Application Laid-Open No. 2010-139942 previously proposed by the applicant.
  • phase difference reliability in addition to the first value obtained by Expression (8), a second value representing the coincidence between the left light-shielded image and the right light-shielded image, and a third value representing the contrast of the captured image. Or a value corresponding to two or more of the first to third values can be adopted.
  • the reason why the third value representing the contrast can be adopted as the phase difference reliability is that the higher the contrast, the easier it is to detect the phase difference with high accuracy.
  • phase difference reliability for example, a value obtained by Expression (8) itself, a value obtained by normalizing the value obtained by Expression (8) with the maximum value obtained by Expression (8) as 100%, etc. Can be adopted.
  • the sensor gain of the image sensor 13 includes any gain that can be applied as a function of adjusting the exposure (exposure) so that the pixel value obtained in the pixel does not become saturated or blackened.
  • a function for adjusting the exposure for example, there is an AE for adjusting an aperture, a shutter speed, and the like.
  • the sensor gain of the image sensor 13 is high when shooting a dark scene with low illuminance.
  • the S / N (Signal to Noise ratio) of the captured image depends on the exposure mode of the image sensor 13 and the like, but becomes worse as the sensor gain increases. Therefore, as the sensor gain is higher, noise is more likely to be included in the pixel value of the detection pixel 53, and an error is likely to occur in the phase difference obtained from the pixel value.
  • the sensor gain includes a so-called secondary sensor gain such as sharding correction in addition to a so-called primary sensor gain such as AE gain (gain applied as AE). is there.
  • secondary sensor gain such as sharding correction
  • primary sensor gain such as AE gain (gain applied as AE).
  • the phase difference may be trusted when the sensor gain is small, but the phase difference is trusted when the sensor gain is large. There should be no.
  • the reliability threshold value used for thresholding the phase difference reliability a value that increases with increasing sensor gain is introduced as shown in FIG. 23, and the phase difference reliability larger than the reliability threshold value is introduced. Only the phase difference is determined to be reliable and used for phase difference AF.
  • the phase difference for which a certain level of phase difference reliability has been obtained is the phase difference when the sensor gain is high and errors are likely to occur. Also, it is determined that the phase difference is reliable.
  • the reliability threshold that increases with an increase in sensor gain, even if the phase difference has a certain degree of phase difference reliability, the phase difference has a high sensor gain and an error. When the phase difference is likely to occur, it is possible to prevent the phase difference from being determined to be reliable.
  • the reliability threshold value for example, the phase difference reliability with respect to a predetermined sensor gain at each lens position is obtained for each pixel block 51, and a predetermined coefficient is calculated for the average value, median value, and maximum value of the phase difference reliability.
  • a value obtained by multiplying by is obtained as a reliability threshold value for a predetermined sensor gain at the node of each pixel block 51.
  • a reliability threshold for each of the plurality of sensor gains is obtained for the node of each pixel block 51.
  • a reliability threshold for a certain sensor gain G is smaller than a reliability threshold for a sensor gain G ′ lower than the sensor gain G at a node of a certain pixel block 51, the reliability threshold for the sensor gain G is , The sensor gain G ′ is corrected to a value larger than the reliability threshold value.
  • FIG. 24 is a diagram for explaining a reliability threshold calculation method for an arbitrary sensor gain G and a phase difference reliability determination method using the reliability threshold.
  • FIG. 24A is a diagram for explaining a method of calculating a reliability threshold for an arbitrary sensor gain G.
  • the reliability threshold value TH for an arbitrary sensor gain G is obtained by interpolation using four reliability threshold values TH [0] to TH [3].
  • the sensor gain G is a value between the sensor gains G [2] and G [3]
  • the reliability threshold value TH for the sensor gain G is the reliability for the sensor gain G [2].
  • the threshold value TH [2] is obtained by linear interpolation between the sensor threshold value G [3] and the reliability threshold value TH [3].
  • the interpolation method for obtaining the reliability threshold TH is not limited to linear interpolation.
  • FIG. 24B is a diagram for explaining a method of determining the reliability of the phase difference using the reliability threshold value.
  • the current sensor gain is the value G
  • the phase difference reliability of the value R is required for the sensor gain G from the detection pixel 53 of a certain pixel block 51.
  • the reliability threshold values for the four sensor gains G [0] to G [3] at the nodal point of the pixel block 51 for which the phase difference reliability R is obtained are the values TH [0 ] Or TH [3].
  • the reliability thresholds TH [0] to TH [3] obtained for the node of the pixel block 51 for which the phase difference reliability R is obtained are used.
  • the reliability threshold TH for the sensor gain G is obtained by the interpolation performed.
  • phase difference reliability R when the phase difference reliability R is equal to or less than the reliability threshold value TH (or less than), it is determined that the phase difference is not reliable. Further, when the phase difference reliability R is larger (or higher) than the reliability threshold value TH, it is determined that the phase difference is reliable.
  • FIG. 25 is a flowchart for explaining an example of the reliability threshold setting process for setting the reliability threshold in the camera module.
  • the slit subject in FIG. 18 can be adopted as the subject for the reliability threshold setting process, as in the case of the conversion coefficient setting process.
  • the reliability threshold value setting process for example, as in the conversion coefficient setting process, the reliability threshold value is obtained for each nodal point (FIG. 13) that is a representative point representing a plurality of pixels constituting the pixel block 51. .
  • step S61 the main processing unit 14 sets the drive mode of the image sensor 13 as in step S11 of FIG. 14, and the process proceeds to step S62.
  • step S62 as in step S13 of FIG. 14, the main processing unit 14 sets shooting conditions for shooting a slit subject, which is a subject for reliability threshold setting processing, and the process proceeds to step S63.
  • step S63 the main processing unit 14 controls the focus actuator 23 via the focus driving unit 19 to change the lens position of the imaging optical system 11A from the position in the macro direction, as in step S23 of FIG. Move sequentially to multiple positions in the Inf direction.
  • the main processing unit 14 sequentially sets the sensor gain of the image sensor 13 to a plurality of values at each lens position.
  • step S63 as described above, while the lens position of the imaging optical system 11A is sequentially moved to a plurality of positions, the sensor gain is sequentially set to a plurality of values at each lens position.
  • the image sensor 13 photographs the slit subject.
  • the lens position of the imaging optical system 11A When the lens position of the imaging optical system 11A is moved to each of a plurality of positions, the captured image captured by the image sensor 13 with each of a plurality of sensor gains is subjected to main processing via the sensor driving unit 16. Supplied to the unit 14.
  • the main processing unit 14 determines the phase difference reliability based on the pixel value of the detection pixel of the pixel block 51 for each pixel block 51 of the captured image of each of the plurality of sensor gains captured at each of the plurality of lens positions. Seeking sex.
  • step S63 the main processing unit 14 uses the phase difference reliability of each of the plurality of lens positions for the nodal point of each pixel block 51 to determine the reliability for each of the plurality of sensor gains. Find the threshold.
  • phase difference reliability at each of a plurality of lens positions is obtained for each of a plurality of sensor gains.
  • the main processing unit 14 uses the phase difference reliability at each of a plurality of lens positions for one pixel block 51 to obtain a reliability threshold value for each of a plurality of sensor gains as described with reference to FIG. .
  • step S64 When the reliability threshold value for each of the plurality of sensor gains is obtained for the node of each pixel block 51, the process proceeds from step S64 to step S65.
  • step S65 the main processing unit 14 determines whether or not the reliability threshold obtained in step S64 is a value within the manufacturing standard.
  • step S65 If it is determined in step S65 that the reliability threshold value is not within the manufacturing standard, the reliability threshold value setting process ends. In this case, since the camera module may be defective, the camera module is sent for inspection, for example.
  • step S65 when it is determined in step S65 that the reliability threshold value is within the manufacturing standard, the process proceeds to step S66.
  • step S66 the main processing unit 14 writes the reliability threshold value for each of the plurality of sensor gains for the node of each pixel block 51 obtained in step S64 in the memory 32, and the reliability threshold value setting process ends. .
  • the reliability threshold value for each of the plurality of sensor gains for the nodal point of each pixel block 51 is written in the memory 32, whereby the reliability threshold value is set in the camera module.
  • the phase difference reliability of the phase difference and the reliability threshold value for each of the plurality of sensor gains for the node of the pixel block 51 As described with reference to FIG. 24, the reliability is determined.
  • FIG. 26 is a diagram showing an example of conversion characteristics representing the actual relationship between the defocus amount and the phase difference.
  • the defocus amount and the phase difference ideally have a linear relationship, and the conversion characteristic is represented by a straight line.
  • the ideal linear conversion characteristic is called the ideal characteristic.
  • the actual defocus amount is a value D0 smaller than the value D1 obtained from the ideal characteristic according to the actual conversion characteristic.
  • FIG. 27 is a diagram illustrating examples of ideal characteristics, offset characteristics, and contrast evaluation values.
  • the lens position is moved according to the defocus amount D1
  • the position after the movement is too far from the in-focus position, that is, the lens position where the contrast evaluation value is maximized.
  • the phase difference P1 On the other hand, a defocus amount D1 larger than the actual defocus amount D0 is obtained.
  • the lens position is moved from the actual position r0 so that the defocus amount D1 obtained from the ideal characteristics becomes zero. As a result, the lens position passes the in-focus position.
  • the offset of the phase difference between the linear ideal characteristic represented by the conversion coefficient and the non-linear characteristic (hereinafter also referred to as the actual characteristic) representing the actual relationship between the phase difference and the defocus amount.
  • the phase difference is corrected using the phase difference offset.
  • the defocus amount is calculated using the corrected phase difference corrected using the phase difference offset, thereby preventing a defocus amount larger than the actual defocus amount from being calculated. As a result, the accuracy of phase difference AF is improved.
  • FIG. 28 is a diagram for explaining the calculation of the phase difference offset and the correction of the phase difference using the phase difference offset.
  • phase difference offset by moving the lens position of the imaging optical system 11A to a plurality of positions, a set of actual phase differences and defocus amounts is obtained for each of the plurality of lens positions.
  • phase difference and defocus amount are also referred to as measurement phase difference and measurement defocus amount, respectively.
  • a plurality of lens positions are sequentially selected as the target position.
  • the lens position at which the measurement defocus amount is the value D11 is selected as the target position.
  • phase difference P10 phase difference (hereinafter also referred to as an ideal phase difference) P10 with respect to the measurement defocus amount D11 at the target position is obtained. From the ideal characteristics, a set with the measurement defocus amount D11 is obtained. By subtracting the measured phase difference P11, the phase difference offset Poff11 with respect to the measured phase difference P11 is obtained.
  • the phase difference offset is obtained for the measured phase difference at each of the plurality of lens positions.
  • the phase difference obtained from the pixel value of the detection pixel 53 by interpolation using the phase difference offset obtained for the measured phase difference at each of the plurality of lens positions that is, For example, the phase difference offset Poff13 with respect to the phase difference P13 in FIG. 28 is obtained.
  • phase difference P13 is corrected to the value P13-Poff13 by subtracting the phase difference offset Poff13 (absolute value thereof) from the phase difference P13.
  • the defocus amount D13 with respect to the corrected phase difference P13-Poff13 is obtained using ideal characteristics.
  • the defocus amount D13 is a defocus amount with respect to the phase difference P13 in the actual characteristics. Therefore, by correcting the phase difference using the phase difference offset, the actual defocus amount is obtained using the ideal characteristics. Can be requested.
  • the defocus amount of the actual characteristic can be obtained using the ideal characteristic with respect to the phase difference.
  • a phase difference offset (hereinafter also referred to as a measured phase difference offset group) with respect to the measured phase difference at each of the plurality of lens positions is used as a camera module. It is necessary to set to.
  • the measurement phase difference offset group is set in the camera module, for example, the measurement phase difference offset group is stored in the memory 32, or the measurement phase difference offset group is included (embedded) in the program executed by the CPU 31. Can be done by.
  • FIG. 29 is a diagram showing an example of a part of the contents stored in the memory 32 of FIG.
  • the total number N + 1 of nodes [n] is 25.
  • the memory 32 stores the defocus offset d [n] for each node [n] by the defocus offset setting process of FIG.
  • FIG. 30 is a block diagram illustrating a configuration example of the phase difference AF processing unit 17 in FIG.
  • the phase difference AF processing unit 17 includes a sequence separation unit 81, a reliability determination unit 82, multiplication units 83 and 84, a phase difference AF calculation unit 85, an AF frame setting unit 86, and an acquisition unit 87.
  • the series separation unit 81 is supplied with the pixel value of the detection pixel 53 among the pixel values output from the image sensor 13 from the sensor driving unit 16.
  • the sensor drive unit 16 has a black level correction unit (not shown) that corrects the black level.
  • the black level correction unit corrects the pixel value of the detection pixel 53 and then supplies the correction value to the series separation unit 81. To do.
  • the series separating unit 81 supplies the pixel value of the detection pixel 53 supplied thereto to the left light-shielding series that is a series of pixel values of the left light-shielding pixel 53L and the right light-shielding series that is a series of pixel values of the right light-shielding pixel 53R. To separate.
  • the series separation unit 81 supplies the left light-shielding series to the multiplication unit 83 and supplies the right light-shielding series to the multiplication unit 84.
  • the reliability determination unit 82 obtains AF frame phase difference reliability that is phase difference reliability of the phase difference obtained from the pixel value of the detection pixel 53 in the AF frame on the photographed image.
  • the reliability determination unit 82 uses the AF frame phase difference reliability and the reliability threshold value stored in the memory 32 supplied from the acquisition unit 87 to calculate the pixel value of the detection pixel 53 in the AF frame. The reliability of the obtained phase difference is determined.
  • the reliability determination unit 82 uses the phase difference AF calculation unit 85 and other necessary blocks to indicate determination information indicating the determination result of the reliability of the phase difference obtained from the pixel value of the detection pixel 53 in the AF frame. To supply.
  • the AF frame is a frame surrounding the area of the photographed image used for AF, and is set by the main processing unit 14.
  • the AF frame can be set at a fixed position or can be set at a variable position.
  • the AF frame can be set at a position designated by the user, or can be set at a position where a face is reflected by performing face detection.
  • the AF frame can be set at one place or a plurality of places.
  • the multiplication unit 83 is supplied with an adjustment gain for the left light-shielded pixel 53L stored in the memory 32 from the acquisition unit 87, in addition to being supplied with the left light-shielded series from the series separation unit 81.
  • the memory 32 stores the conversion coefficient a [n], the defocus offset d [n], and the reliability threshold value TH [p]. Further, the memory 32 stores an adjustment gain g [n] for each node [n], a phase difference offset (measured phase difference offset group), a movement ratio table, and a lens position offset table.
  • the adjustment gain for the left light-shielded pixel (left light-shielding series adjustment gain) gl [n] for each node [n] (or for each detection pixel 53) is adjusted in the adjustment gain setting process of FIG. Then, the adjustment gain (right shading series adjustment gain) gr [n] for the right shading pixel is stored.
  • the memory 32 stores phase difference offsets (measured phase difference offset groups).
  • the memory 32 stores a movement ratio table and a lens position offset table.
  • the movement ratio when performing phase difference AF using the detection pixel 53 in the pixel block 51 represented by the node is registered as the position of a plurality of pixels. Has been.
  • the movement ratio represents how much the defocus amount required for the phase difference is moved in the phase difference AF according to the ratio of the lens position of the imaging optical system 11A. For example, if the movement rate of a certain node is 90%, the lens position is determined according to 90% of the defocus amount obtained for the phase difference obtained from the detection pixel 53 in the pixel block 51 represented by the node. Moved.
  • the movement ratio is effective when the relationship between the phase difference and the lens position is not linear.
  • each of a plurality of lens positions is registered in association with a lens position offset when the lens is moved from the lens position.
  • the lens position offset is a correction amount for correcting the lens movement amount obtained from the defocus amount when the lens is moved from the lens position associated with the lens position offset.
  • the relationship between the distance from the camera module to the subject (subject distance) and the lens position is non-linear. Due to the non-linear relationship between the subject distance and the lens position, if the lens position is moved by the lens movement amount obtained from the defocus amount, the lens position may go too far (jump over the in-focus position). is there. By correcting the lens movement amount obtained from the defocus amount by the lens position offset, it is possible to prevent the lens position from going too far.
  • the multiplying unit 83 multiplies the pixel value of the left light-shielded pixel 53L constituting the left light-shielded series supplied from the series separating unit 81 by the adjustment gain of the nodal point of the pixel block 51 including the left light-shielded pixel 53L. As described with reference to FIG. 12, the pixel value of the left light-shielding pixel 53L is corrected.
  • the multiplying unit 83 supplies the left light-shielding series composed of the corrected pixel values of the left light-shielding pixel 53L to the phase difference AF calculation unit 85.
  • the multiplication unit 84 is supplied with an adjustment gain for the right light-shielded pixel 53R stored in the memory 32 from the acquisition unit 87 in addition to being supplied with the right light-shielded series from the series separation unit 81.
  • the multiplying unit 84 multiplies the pixel value of the right light-shielded pixel 53R included in the right light-shielded series supplied from the series separating unit 81 by the adjustment gain of the nodal point of the pixel block 51 including the right light-shielded pixel 53R. As described with reference to FIG. 12, the pixel value of the right light-shielding pixel 53R is corrected.
  • the multiplying unit 84 supplies the right light-shielding series composed of the corrected pixel values of the right light-shielding pixel 53R to the phase difference AF calculation unit 85.
  • the phase difference AF calculation unit 85 uses the pixel value of the detection pixel 53 in the AF frame among the pixel values constituting the left light shielding series and the right light shielding series from the multipliers 83 and 84, respectively.
  • the reliability of the AF frame phase difference is recognized from the determination information from the reliability determination unit 82.
  • phase difference AF calculation unit 85 requests the AF frame setting unit 86 to change the AF frame, for example.
  • phase difference AF calculation unit 85 performs phase difference AF calculation.
  • the phase difference AF calculation unit 85 obtains the phase difference of the AF frame from the pixel values constituting the left shading series and the right shading series from the multiplication units 83 and 84, respectively.
  • phase difference AF calculation unit 85 obtains the defocus amount with respect to the phase difference of the AF frame while appropriately using the information stored in the memory 32 supplied from the acquisition unit 87, and the imaging optical is calculated from the defocus amount. A lens movement amount for moving the lens position of the system 11A is obtained.
  • the phase difference AF calculation unit 85 supplies the lens movement amount to the main processing unit 14.
  • the main processing unit 14 controls the focus driving unit 19 to move the lens position of the imaging optical system 11A by the amount of lens movement from the phase difference AF calculation unit 85.
  • the AF frame setting unit 86 sets an AF frame in response to a request from the phase difference AF calculation unit 85 and supplies information on the AF frame to a necessary block.
  • the acquisition unit 87 acquires (reads out) information stored in the memory 32 and supplies it to a necessary block.
  • connection lines such as a connection line that supplies information from the acquisition unit 87 to the phase difference AF calculation unit 85 is omitted in order to avoid complication of the drawing. .
  • FIG. 31 is a diagram for explaining processing of the phase difference AF processing unit 17 in FIG.
  • the reliability determination unit 82 performs interpolation using reliability threshold values for a plurality of sensor gains for each node stored in the memory 32, for example, the center of gravity of the AF frame. A reliability threshold value for a plurality of sensor gains at a representative point representing the AF frame is obtained.
  • the reliability determination unit 82 obtains a reliability threshold value for the current sensor gain by performing interpolation using the reliability threshold values for a plurality of sensor gains of representative points representing the AF frame.
  • phase difference reliability of the phase difference of the AF frame is required, but the reliability determination unit 82 determines the phase difference reliability of the phase difference of the AF frame, for example, Using the pixel value of the detection pixel 53 in the AF frame, calculation is performed according to equation (8) and the like.
  • the reliability determination unit 82 determines the reliability of the phase difference of the AF frame by comparing the phase difference reliability of the phase difference of the AF frame with the reliability threshold for the current sensor gain. Determination information representing the result is supplied to the phase difference AF calculation unit 85.
  • the phase difference AF calculation unit 85 uses the pixel value of the detection pixel 53 in the AF frame to block the left light shielding in the AF frame.
  • a phase difference representing a relative positional relationship between the image and the right light-shielded image is obtained as a phase difference of the AF frame.
  • phase difference AF calculation unit 85 obtains a conversion factor for the representative point of the AF frame by performing interpolation using the conversion factor for each nodal point stored in the memory 32.
  • phase difference AF calculation unit 85 obtains the defocus offset of the representative point of the AF frame by performing interpolation using the defocus offset for each nodal point stored in the memory 32.
  • the interpolation for obtaining the conversion factor of the AF frame representative point can be performed using the conversion factors of all the nodules, or the nodal point conversion factor in the AF frame and the nodal point in the AF frame. It is also possible to use a conversion coefficient of some nodal points, such as a conversion coefficient with the surrounding nodal points.
  • the phase difference AF calculation unit 85 corrects the phase difference of the AF frame in accordance with the phase difference offset stored in the memory 32 supplied from the acquisition unit 87, and the phase difference after correction of the AF frame obtained as a result thereof,
  • the defocus amount of the AF frame is obtained according to the equation (9) using the conversion factor of the representative point of the AF frame.
  • AF frame defocus amount AF frame representative point conversion factor x AF frame corrected phase difference (9)
  • phase difference AF calculation unit 85 uses the defocus amount of the AF frame in Expression (9) as the defocus offset of the representative point of the AF frame, and the defocus amount after correction of the AF frame according to Expression (10). To correct.
  • AF frame defocus amount after correction AF frame defocus amount + AF frame representative point defocus offset (10)
  • phase difference AF calculation unit 85 performs interpolation using the movement rate for each nodal point registered in the movement rate table stored in the memory 32 supplied from the acquisition unit 87, thereby representing the AF frame. Find the percentage of point movement.
  • the interpolation for obtaining the movement rate of the representative point of the AF frame can be performed in the same manner as the interpolation for obtaining the conversion factor of the representative point of the AF frame, for example.
  • phase difference AF calculation unit 85 performs interpolation using the lens position offset for each of the plurality of lens positions registered in the lens position offset table stored in the memory 32 supplied from the acquisition unit 87. Thus, the lens position offset of the current lens position is obtained.
  • the phase difference AF calculation unit 85 uses the defocus amount after correction of the AF frame in Expression (10), the movement rate of the representative point of the AF frame, and the lens position offset of the current lens position to obtain Expression (11). ) To obtain the lens movement amount and supply it to the main processing unit 14.
  • Lens movement amount Defocus amount after AF frame correction x AF frame representative point movement ratio-Lens position offset of current lens position (11)
  • 32 and 33 are flowcharts illustrating an example of a lens movement amount calculation process for calculating a lens movement amount performed by the phase difference AF processing unit 17 in FIG.
  • step S101 the AF frame setting unit 86 sets one or more AF frames, and the process proceeds to step S102.
  • step S101 when a plurality of AF frames are set in step S101, the subsequent processing is performed for each of the plurality of AF frames unless otherwise specified.
  • step S102 the series separation unit 81 acquires the pixel value of the detection pixel 53 in the AF frame from the pixel values output from the image sensor 13 from the sensor driving unit 16, and the process proceeds to step S103.
  • step S103 the reliability determination unit 82 uses the pixel value of the detection pixel 53 in the AF frame acquired by the series separation unit 81 as the phase difference reliability of the phase difference of the AF frame, for example, Equation (8) and the like. And the process proceeds to step S104.
  • step S104 the acquisition unit 87 acquires a reliability threshold value for a plurality of sensor gains for each node stored in the memory 32, and supplies the reliability threshold value to the reliability determination unit 82.
  • the reliability determination unit 82 obtains (acquires) the reliability threshold value for the current sensor gain by interpolation using the reliability threshold values for the plurality of sensor gains for each nodal point from the acquisition unit 87, and the processing is as follows. The process proceeds from step S104 to step S105.
  • step S105 the reliability determination unit 82 compares the phase difference reliability of the phase difference of the AF frame obtained in step S103 with the reliability threshold value for the current sensor gain obtained in step S104. Determines whether or not the phase difference of the AF frame is reliable.
  • step S105 When it is determined in step S105 that the phase difference of the AF frame is not reliable, that is, when the phase difference reliability of the phase difference of the AF frame is not larger than the reliability threshold for the current sensor gain, the processing is performed. Return to step S101. In this case, in step S101, the AF frame setting unit 86 newly sets an AF frame, and thereafter the same processing is repeated.
  • step S105 if it is determined in step S105 that the AF frame phase difference is reliable, that is, the phase difference reliability of the AF frame phase difference is greater than the reliability threshold for the current sensor gain. The process proceeds to step S106.
  • step S105 when a plurality of AF frames are set in the AF frame setting unit 86, when there is no reliability of the phase difference of the AF frames for all of the plurality of AF frames, the processing is step S105. To step S101.
  • the step is performed for the AF frame having the phase difference reliability.
  • the process after S106 is performed.
  • step S106 the series separation unit 81 uses the pixel value of the detection pixel 53 in the AF frame acquired in step S102 as the left shading series that is a series of pixel values of the left shading pixel 53L and the pixel value of the right shading pixel 53R. To the right light-shielding series.
  • the series separation unit 81 supplies the left light-shielding series to the multiplication unit 83 and also supplies the right light-shielding series to the multiplication unit 84, and the process proceeds from step S106 to step S107.
  • step S107 the acquisition unit 87 acquires the adjustment gain of the nodal point in the AF frame from the memory 32. Further, the acquisition unit 87 supplies the adjustment gain for the left light-shielded pixel 53L among the adjustment gains of the nodal points in the AF frame to the multiplication unit 83, and also supplies the adjustment gain for the right light-shielded pixel 53R to the multiplication unit.
  • the process advances from step S107 to step S108.
  • step S108 the multiplication unit 83 multiplies the pixel value of the left light-shielded pixel 53L constituting the left light-shielded series from the series separation unit 81 by the adjustment gain of the nodal point of the pixel block 51 including the left light-shielded pixel 53L.
  • the pixel value of the left light-shielding pixel 53L is corrected.
  • the multiplying unit 83 supplies the left light-shielding series composed of the corrected pixel values of the left light-shielding pixel 53L to the phase difference AF calculation unit 85.
  • step S108 the multiplication unit 84 adds the adjustment gain of the nodal point of the pixel block 51 including the right light-shielded pixel 53R to the pixel value of the right light-shielded pixel 53R constituting the right light-shielded series from the series separation unit 81. By multiplying, the pixel value of the right light-shielding pixel 53R is corrected.
  • the multiplying unit 84 supplies the right light-shielding series composed of the corrected pixel values of the right light-shielding pixel 53R to the phase difference AF calculation unit 85, and the process proceeds to step S109.
  • the (position) adjustment gain of the left light-shielded pixel 53L is obtained by interpolation using the nodal point adjustment gain, and the adjustment gain obtained by the interpolation is interpolated.
  • the pixel value of the left light-shielding pixel 53L can be corrected using the value. The same applies to the correction of the pixel value of the right light-shielding pixel 53R.
  • step S109 the phase difference AF calculation unit 85 calculates the AF frame from the pixel values (corrected pixel values corrected using the adjustment gain) constituting the left shading series and the right shading series from the multiplication units 83 and 84, respectively. And the process proceeds to step S110.
  • step S110 the acquisition unit 87 acquires the phase difference offset from the memory 32, supplies the phase difference offset to the phase difference AF calculation unit 85, and the process proceeds to step S111.
  • step S111 the phase difference AF calculation unit 85 obtains a phase difference offset with respect to the phase difference of the AF frame by interpolation using the phase difference offset from the acquisition unit 87. Further, the phase difference AF calculation unit 85 corrects the phase difference of the AF frame as described with reference to FIG. 28 using the phase difference offset with respect to the phase difference, and the processing is performed from step S111 to step S121 of FIG. Proceed to
  • step S121 of FIG. 33 the acquisition unit 87 acquires the conversion coefficient of the nodal point in the AF frame and the defocus offset from the memory 32, and supplies them to the phase difference AF calculation unit 85. The process proceeds to S122.
  • step S122 the phase difference AF calculation unit 85 obtains a conversion factor of the representative point of the AF frame by interpolation using the conversion factor of the nodal point in the AF frame from the acquisition unit 87. Then, the phase difference AF calculation unit 85 uses the phase difference after correction of the AF frame obtained by correcting the phase difference of the AF frame according to the phase difference offset and the conversion coefficient of the representative point of the AF frame, and the above equation (9). Accordingly, the defocus amount of the AF frame is obtained, and the process proceeds from step S122 to step S123.
  • step S123 the phase difference AF calculation unit 85 obtains the defocus offset of the representative point of the AF frame by interpolation using the defocus offset of the nodal point in the AF frame from the acquisition unit 87. Then, the phase difference AF calculation unit 85 uses the defocus amount of the AF frame in Expression (9) as the defocus offset of the representative point of the AF frame, and uses the defocus offset of the representative point of the AF frame, according to the above Expression (10). After correcting to the focus amount, the process proceeds from step S123 to step S124.
  • step S124 the phase difference AF calculation unit 85 selects an AF frame to be used for calculating the lens movement amount, and the process proceeds to step S125.
  • a selection target AF frame when there is only one AF frame set by the AF frame setting unit 86 and having phase difference reliability (hereinafter also referred to as a selection target AF frame), that one selection target AF frame Is selected as an AF frame (hereinafter also referred to as a calculation AF frame) used for calculating the lens movement amount.
  • one of the plurality of selection target AF frames is selected as a calculation AF frame in accordance with, for example, a user operation.
  • step S125 the acquisition unit 87 acquires the movement ratio table and the lens position offset table from the memory 32, and supplies them to the phase difference AF calculation unit 85.
  • the phase difference AF calculation unit 85 obtains (acquires) the movement rate of the representative point of the AF frame by interpolation using the movement rate for each nodal point registered in the movement rate table from the acquisition unit 87, and the processing is as follows. The process proceeds from step S125 to step S126.
  • step S126 the phase difference AF calculation unit 85 performs lens position offset of the current lens position by interpolation using the lens position offset for each of the plurality of lens positions registered in the lens position offset table from the acquisition unit 87. The process proceeds to step S127.
  • step S127 the phase difference AF calculation unit 85 uses the defocus amount after correction of the AF frame, the movement rate of the representative point of the AF frame, and the lens position offset of the current lens position in Expression (10) above.
  • the amount of lens movement is obtained according to equation (11).
  • phase difference AF calculation unit 85 supplies the lens movement amount to the main processing unit 14, and the lens movement amount calculation process ends.
  • the amount of lens movement is calculated according to equation (11) using the defocus amount after correction of the AF frame, the movement rate of the representative point of the AF frame, and the lens position offset of the current lens position.
  • the lens movement amount the defocus amount after correction of the AF frame in Expression (10) can be used as it is.
  • the defocus amount after correction of the AF frame of Expression (10) can be used as it is as the lens movement amount.
  • the lens movement amount of Expression (11) can be adopted as the lens movement amount in the first phase difference AF performed with the hybrid AF.
  • the lens movement amount in Expression (11) is a value obtained by correcting the lens movement amount as the defocus amount in Expression (10) by the movement ratio and the lens position offset. Therefore, in the phase difference AF, when the lens movement amount of Expression (11) is used, the lens position is the in-focus position compared to the case of using the lens movement amount as the defocus amount of Expression (10). The possibility of jumping over can be reduced.
  • the lens position is moved by the phase difference AF until just before the in-focus position, and then moved by the contrast AF to the in-focus position. Therefore, in contrast AF, it is only necessary to first move the lens position in the same direction as phase difference AF, and it is possible to suppress an increase in the total time required for hybrid AF.
  • the lens position of the imaging optical system 11A may fluctuate. That is, for example, when the camera module is facing downward or upward, the lens position may move from the position where the camera module faces in the horizontal direction due to the weight of the imaging optical system 11A.
  • the posture of the camera module is detected, and the correction for the amount of movement of the lens as described above is performed based on the posture of the camera module (for example, downward or upward). be able to.
  • the contrast AF can be performed to move the lens position.
  • the lens position can be moved to the in-focus position only with contrast AF.
  • contrast AF is performed until a reliable phase difference is obtained, and after a reliable phase difference is obtained, phase difference AF is performed using the phase difference, and then contrast AF is performed.
  • the lens position can be moved to the in-focus position.
  • FIG. 34 is a diagram for explaining the image height.
  • the conversion coefficient, the defocus offset, and the reliability threshold are other than that, for example, a plurality of pixels whose image height, which is a distance from the center of the light receiving surface 50, is within a predetermined range. It can be obtained for each image height representative point that is a point representing a pixel group consisting of.
  • the image height means a distance from the center of the light receiving surface 50 (intersection of the light receiving surface 50 and the optical axis L (FIG. 1)) to the image point.
  • the image height at the center position is 0% image height, and the image height at the diagonal position farthest from the center is 100% image height.
  • the image height at the distant position is about 6.42%.
  • the light receiving surface 50 is divided into rectangular pixel blocks of C ⁇ C pixels and a conversion coefficient, a defocus offset, and a reliability threshold are obtained for each node representing the pixel block, 50 is divided into image heights that increase in increments of C pixels from the center, and a conversion factor, deci
  • a defocus offset and the reliability threshold value it is possible to obtain a defocus amount with higher accuracy by obtaining for each nodal point than for obtaining for each image height representative point, and a highly accurate phase difference. AF can be performed.
  • the storage capacity of the memory 32 for storing the conversion coefficient and the like can be reduced as compared with the case where the conversion coefficient is obtained for each nodal point.
  • defocus offset, and reliability threshold As for the information determined for each nodal point other than the conversion factor, defocus offset, and reliability threshold, as with the conversion factor, defocus offset, and reliability threshold, for each image height representative point. Can be requested.
  • the conversion coefficient, the defocus offset, and the reliability threshold that are obtained for each nodal point (or the image height representative point) are acquired, and the phase difference is calculated using the reliability threshold.
  • Judge reliability If the phase difference is reliable, the conversion factor is used to convert the reliable phase difference into a defocus amount, and the defocus offset is used to correct the defocus amount. Perform the operation.
  • the lens position can be moved almost to the in-focus position.
  • the time required for subsequent contrast AF is reduced, and thus the overall time required for hybrid AF is reduced. be able to.
  • the conversion coefficient and the like are obtained for each node and the like in this technology, individual adjustment related to phase difference AF such as phase difference and defocus amount adjustment (correction) that varies depending on the position of the light receiving surface 50 is accurately performed. Can do. Further, in the present technology, for example, the conversion coefficient or the like can be obtained in a state where the imaging optical system 11A is not provided, and the phase difference AF can be performed in a state where the imaging optical system 11A is provided.
  • phase difference AF is performed using a reliable phase difference, it is possible to perform highly accurate phase difference AF.
  • hybrid AF is possible. It is possible to reduce the total time required for the process.
  • the defocus amount is corrected by the defocus offset for each nodal point. Therefore, in the hybrid AF, the lens position is set near the position where the contrast evaluation value is maximized by the phase difference AF. Can move. As a result, the speed of hybrid AF can be increased.
  • phase difference is converted into the defocus amount using the conversion coefficient for each nodal point, a highly accurate defocus amount can be obtained. As a result, the accuracy of the phase difference AF can be improved.
  • FIG. 35 is a diagram illustrating a usage example in which the above-described camera module is used.
  • the camera module described above can be used in various electronic devices that sense light such as visible light, infrared light, ultraviolet light, and X-rays as follows.
  • Electronic devices that capture images for viewing such as digital cameras and mobile devices with camera functions
  • Electronic devices used for traffic such as in-vehicle sensors that take pictures of the back, surroundings, inside the car, surveillance cameras that monitor traveling vehicles and roads, and ranging sensors that measure distances between vehicles, etc.
  • Electronic devices used in home appliances such as TVs, refrigerators, air conditioners, etc.
  • Electronic devices used for medical and healthcare purposes such as devices to perform
  • Electronic devices used for security such as surveillance cameras for crime prevention and cameras for personal authentication
  • Skin measuring devices for photographing skin Or micro to shoot the scalp
  • Electronic devices used for beauty such as scopes
  • Electronic devices used for sports such as action cameras and wearable cameras for sports applications etc.
  • Cameras for monitoring the condition of fields and crops, etc.
  • this technique can take the following structures.
  • Defocus offset which is the difference in lens position between the focus position of phase difference AF (Auto Focus) method and the focus position of contrast AF method,
  • a reliability determination unit that determines the reliability of the phase difference using the reliability threshold;
  • a calculation unit that converts the reliable phase difference into the defocus amount using the conversion factor, and performs a phase difference AF calculation that corrects the defocus amount using the defocus offset.
  • the conversion factor, the defocus offset, and the reliability threshold are determined for each representative point that represents each of a plurality of pixel groups that constitute a light receiving surface of the imaging element for an imaging element that captures an image
  • the reliability determination unit determines the reliability of the phase difference using the reliability threshold value of the representative point in the autofocus frame
  • the calculation unit performs the phase difference AF calculation using the conversion factor of the representative point in the autofocus frame and the defocus offset
  • the signal processing device includes a light receiving surface including a detection pixel for detecting the phase difference, which receives light that has passed through different regions of an exit pupil of the imaging optical system.
  • the signal processing device wherein the conversion coefficient is obtained from the defocus amounts and the phase differences at a plurality of lens positions.
  • the defocus offset is a difference in lens position between the focus position of the phase difference AF method obtained by photographing a predetermined subject with the image sensor and the focus position of the contrast AF method.
  • the reliability threshold is obtained for a predetermined sensor gain of the image sensor, and the reliability determination unit is From the reliability threshold for the predetermined sensor gain, a reliability threshold for the current sensor gain of the image sensor is obtained,
  • the signal processing device according to any one of ⁇ 1> to ⁇ 3>, wherein reliability of the phase difference is determined using a reliability threshold value with respect to a current sensor gain of the imaging element.
  • the calculation unit performs the phase difference AF calculation using the phase difference obtained from the corrected pixel value obtained by correcting the pixel value of the detection pixel using an adjustment gain,
  • the adjustment gain is a ratio between a pixel value of a normal pixel that is a pixel other than the detection pixel and a pixel value of the detection pixel obtained by photographing a predetermined subject with the image sensor ⁇ 1> to ⁇ 4>
  • the signal processing device according to any one of the above.
  • the computing unit is Using the phase difference offset that is an offset of the phase difference between the linear characteristic represented by the conversion factor and the non-linear characteristic representing the relationship between the phase difference and the defocus amount, the phase difference is corrected,
  • the signal processing device according to any one of ⁇ 1> to ⁇ 5>, wherein the phase difference AF calculation is performed using the corrected phase difference.
  • the representative point is a nodal point that is a point representing the block when the light receiving surface of the image sensor is divided into rectangular blocks as the pixel group.
  • the representative point is a point representing a pixel group of pixels whose image height, which is a distance from the center of the light receiving surface of the image sensor, is within a predetermined range.
  • ⁇ Signal> Processing equipment.
  • ⁇ 9> The signal processing device according to any one of ⁇ 1> to ⁇ 8>, wherein the conversion coefficient, the defocus offset, and the reliability threshold value for each representative point are stored in a memory.
  • Defocus offset which is the difference in lens position between the focus position of phase difference AF (Auto Focus) method and the focus position of contrast AF method,
  • the conversion factor, the defocus offset, and the reliability threshold are determined for each representative point that represents each of a plurality of pixel groups that constitute a light receiving surface of the imaging element for an imaging element that captures an image,
  • the determination of the reliability of the phase difference is performed using the reliability threshold value of the representative point in the autofocus frame
  • the AF calculation is performed using the conversion factor of the representative point in the autofocus frame and the defocus offset,
  • phase difference offset that is an offset of the phase difference between the linear characteristic represented by the conversion factor and the non-linear characteristic representing the relationship between the phase difference and the defocus amount.
  • Defocus offset which is the difference in lens position between the focus position of phase difference AF (Auto Focus) method and the focus position of contrast AF method,
  • the conversion factor, the defocus offset, and the reliability threshold are determined for each representative point that represents each of a plurality of pixel groups that constitute a light receiving surface of the imaging element for an imaging element that captures an image
  • the reliability determination unit determines the reliability of the phase difference using the reliability threshold value of the representative point in the autofocus frame
  • the calculation unit performs the phase difference AF calculation using the conversion factor of the representative point in the autofocus frame and the defocus offset
  • the image pickup device has a light receiving surface including a detection pixel for detecting the phase difference, which receives light that has passed through different regions of an exit pupil of the image pickup optical system.
  • the computing unit is Using the phase difference offset that is an offset of the phase difference between the linear characteristic represented by the conversion factor and the non-linear characteristic representing the relationship between the phase difference and the defocus amount, the phase difference is corrected,
  • An imaging optical system that collects the light;
  • An image sensor that receives light from the imaging optical system and captures an image;
  • a signal processing unit that processes a signal output from the image sensor,
  • the signal processing unit A conversion coefficient for converting the phase difference between two images obtained by dividing the exit pupil of the imaging optical system into a defocus amount representing a focus shift amount;
  • Defocus offset which is the difference in lens position between the focus position of phase difference AF (Auto Focus) method and the focus position of contrast AF method,
  • An acquisition unit for acquiring a reliability threshold for determining whether or not the phase difference is reliable;
  • a reliability determination unit that determines the reliability of the phase difference using the reliability threshold;
  • a calculation unit that converts the reliable phase difference into the defocus amount using the conversion factor, and performs a phase difference AF calculation that corrects the defocus amount using the defocus offset.
  • the conversion factor, the defocus offset, and the reliability threshold are determined for each representative point that represents each of a plurality of pixel groups that constitute a light receiving surface of the imaging element for an imaging element that captures an image
  • the reliability determination unit determines the reliability of the phase difference using the reliability threshold value of the representative point in the autofocus frame
  • the calculation unit performs the phase difference AF calculation using the conversion factor of the representative point in the autofocus frame and the defocus offset
  • the electronic device has a light receiving surface including a detection pixel for detecting the phase difference, which receives light that has passed through different regions of an exit pupil of the imaging optical system.
  • the computing unit is Using the phase difference offset that is an offset of the phase difference between the linear characteristic represented by the conversion factor and the non-linear characteristic representing the relationship between the phase difference and the defocus amount, the phase difference is corrected,
  • Defocus offset which is the difference in lens position between the focus position of phase difference AF (Auto Focus) method and the focus position of contrast AF method,
  • the reliable phase difference is converted into the defocus amount, and the defocus offset is used to perform the phase difference AF calculation for correcting the defocus amount;
  • a light receiving surface that receives light that has passed through different areas of the exit pupil of the imaging optical system and includes a detection pixel for detecting the phase difference, and
  • the conversion factor, the defocus offset, and the reliability threshold are determined for each representative point representing each of a plurality of pixel groups that constitute the light receiving surface,
  • the reliability determination unit determines the reliability of the phase difference using the reliability threshold value of the representative point in
  • the computing unit is Using the phase difference offset that is an offset of the phase difference between the linear characteristic represented by the conversion factor and the non-linear characteristic representing the relationship between the phase difference and the defocus amount, the phase difference is corrected,

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Automatic Focus Adjustment (AREA)
  • Focusing (AREA)

Abstract

 本技術は、位相差AF(Auto Focus)の精度を向上させることができるようにする信号処理装置、信号処理方法、プログラム、電子機器、及び、撮像素子に関する。 撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、位相差AF方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、位相差の信頼性の有無を判定するための信頼性閾値とが、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められており、これらの変換係数、デフォーカスオフセット、及び、信頼性閾値を用いて、デフォーカス量が求められる。本技術は、位相差AFを行う場合に適用することができる。

Description

信号処理装置、信号処理方法、プログラム、電子機器、及び、撮像素子
 本技術は、信号処理装置、信号処理方法、プログラム、電子機器、及び、撮像素子に関し、特に、例えば、位相差AF(Auto Focus)の精度を向上させることができるようにする信号処理装置、信号処理方法、プログラム、電子機器、及び、撮像素子に関する。
 例えば、ディジタル(ビデオ/スチル)カメラ等の撮影装置のオートフォーカス(以下、AFと略す)方式としては、位相差AF(以下、PDAFとも記載する)方式や、コントラストAF(以下、CDAFとも記載する)方式、PDAFとCDAFとを組み合わせたハイブリッドAF方式が知られている。
 位相差AF方式では、撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を用いて、AFが行われる。
 位相差AF方式としては、画像を撮影する撮像素子としてのイメージセンサとは別に、外付けの位相差センサを設けて、その位相差センサの出力から位相差を求める方式がある。さらに、位相差AF方式としては、撮像光学系の射出瞳の異なる領域を通過した光を受光する、位相差を検出するための検出画素を、撮像素子を構成する一部の画素として配置し、検出画素の画素値から位相差を求める像面位相差AF方式がある。
 像面位相差AF方式では、検出画素の画素値を用いて、撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差が求められる。そして、その位相差から、撮像光学系のレンズ位置について、合焦位置(infocus位置)までの方向を含むずれ量であるデフォーカス量が求められ、そのデフォーカス量に応じて、レンズ位置が、合焦位置に移動される。
 位相差AF方式では、AFにあたって、撮像光学系の焦点位置(レンズ位置)を移動するAFスキャン動作を行う必要がないため、AFを、比較的、短時間で実行することができる。
 一方、コントラストAF方式では、AFスキャン動作が行われながら、イメージセンサで撮影される画像のコントラストを評価するコントラスト評価値が求められる。そして、コントラスト評価値が最大になる撮像光学系のレンズ位置が、合焦位置として検出され、レンズ位置が、合焦位置に移動される。
 コントラストAF方式は、位相差AF方式に比較して、一般に、合焦位置の検出精度は高いが、AFスキャン動作が行われるために、AFの実行(完了)に時間を要することがある。
 位相差AF方式は、AFの実行時間(合焦位置の検出時間)の面で優れており、コントラストAF方式は、AFの精度(合焦位置の検出精度)の面で優れている。ハイブリッドAF方式は、位相差AF方式、及び、コントラストAF方式の両方の優れた面を有している。
 すなわち、ハイブリッド方式では、最初に、位相差AF方式によって、(撮像光学系の)レンズ位置が、合焦位置付近に移動され、その後、コントラストAF方式によって、レンズ位置が、合焦位置に移動される。これにより、レンズ位置を、短時間かつ高精度に、合焦位置に移動することができる。
 ここで、像面位相差AF方式については、撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を求めるための検出画素の対のそれぞれに入射する光の光量のアンバランスを補償するように、検出画素の対それぞれの画素値を補正する技術が提案されている(例えば、特許文献1を参照)。
特開2010-049209号公報
 本件発明者によれば、像面位相差AF方式において、デフォーカス量が、そのデフォーカス量を求めるのに用いた検出画素の(イメージセンサの受光面上の)位置によってばらつくことが、経験上認められた。
 さらに、かかるデフォーカス量のばらつきには、イメージセンサの個体によってばらつきがあることが、経験上認められた。
 デフォーカス量のばらつきは、位相差AFの精度を低下させる。位相差AFの精度の低下は、ハイブリッドAF方式において、コントラストAFによるレンズ位置の移動量を増加させ、AFの実行時間を、全体として増加させる原因となる。
 本技術は、このような状況に鑑みてなされたものであり、位相差AFの精度を向上させることができるようにするものである。
 本技術の信号処理装置、又は、プログラムは、撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、前記位相差の信頼性の有無を判定するための信頼性閾値とを取得する取得部と、前記信頼性閾値を用いて、前記位相差の信頼性を判定する信頼性判定部と、前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行う演算部とを備え、前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、前記信頼性判定部は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて、前記位相差の信頼性を判定し、前記演算部は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて、前記位相差AF演算を行い、前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有する信号処理装置、又は、そのような信号処理装置として、コンピュータを機能させるためのプログラムである。
 本技術の信号処理方法は、撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、前記位相差の信頼性の有無を判定するための信頼性閾値とを取得することと、前記信頼性閾値を用いて、前記位相差の信頼性を判定することと、前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行うこととを含み、前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、前記位相差の信頼性の判定は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて行われ、前記位相差AF演算は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて行われ、前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有する信号処理方法である。
 本技術の電子機器は、光を集光する撮像光学系と、前記撮像光学系からの光を受光し、画像を撮影する撮像素子と、前記撮像素子が出力する信号を処理する信号処理部とを備え、前記信号処理部は、撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、前記位相差の信頼性の有無を判定するための信頼性閾値とを取得する取得部と、前記信頼性閾値を用いて、前記位相差の信頼性を判定する信頼性判定部と、前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行う演算部とを有し、前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、前記信頼性判定部は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて、前記位相差の信頼性を判定し、前記演算部は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて、前記位相差AF演算を行い、前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有する電子機器である。
 本技術の撮像素子は、撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、前記位相差の信頼性の有無を判定するための信頼性閾値とを取得する取得部と、前記信頼性閾値を用いて、前記位相差の信頼性を判定する信頼性判定部と、前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行う演算部と、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面とを備え、前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、前記受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、前記信頼性判定部は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて、前記位相差の信頼性を判定し、前記演算部は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて、前記位相差AF演算を行う撮像素子である。
 本技術の信号処理装置、信号処理方法、プログラム、電子機器、及び、撮像素子においては、撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、前記位相差の信頼性の有無を判定するための信頼性閾値とが取得される。さらに、前記信頼性閾値を用いて、前記位相差の信頼性が判定される。そして、前記換算係数を用いて、信頼性がある前記位相差が、前記デフォーカス量に変換され、前記デフォーカスオフセットを用いて、前記デフォーカス量が補正される。前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められており、前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有している。前記位相差の信頼性の判定は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて行われ、前記位相差AF演算は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて行われる。
 なお、信号処理装置、及び、撮像素子は、独立した装置であっても良いし、1つの装置を構成している内部ブロックであっても良い。
 また、プログラムは、伝送媒体を介して伝送することにより、又は、記録媒体に記録して、提供することができる。
 本技術によれば、位相差AFの精度を向上させることができる。
 なお、ここに記載された効果は必ずしも限定されるものではなく、本開示中に記載されたいずれかの効果であってもよい。
本技術を適用したカメラモジュールの一実施の形態の構成例を示すブロック図である。 撮像光学系11A側から見たイメージセンサ13の構成例を示す平面図である。 通常画素52の構成例を示す図である。 検出画素53の構成例を示す図である。 通常画素52、左遮光画素53L、及び、右遮光画素53Lそれぞれの画素値の系列の例を示す図である。 右遮光画素53Rが存在するラインから得られる右遮光系列と、その右遮光画素53Rとペアの左遮光画素53Lが存在するラインから得られる左遮光系列との例を示す図である。 コントラストAF(CDAF)、位相差AF(PDAF)、及び、ハイブリッドAFを説明する図である。 位相差とデフォーカス量との関係を説明する図である。 受光面50上の一部の画素の構成例を示す平面図である。 左遮光画素53L及び右遮光画素53Rそれぞれで受光される光量を説明する図である。 調整ゲインを説明する図である。 調整ゲインによる検出画素53の画素値の補正の例を示す図である。 調整ゲインをカメラモジュールに設定する調整ゲイン設定処理を説明する図である。 調整ゲイン設定処理の例を説明するフローチャートである。 位相差とデフォーカス量との関係である換算特性の例を示す図である。 換算係数が、受光面50の位置によってばらつくことによって、デフォーカス量に誤差が生じることを説明する図である。 換算係数を説明する図である。 換算係数をカメラモジュールに設定する換算係数設定処理において使用する換算係数設定処理用の被写体の例を示す平面図である。 換算係数設定処理の例を説明するフローチャートである。 デフォーカスオフセットを説明する図である。 デフォーカスオフセットの算出方法と、デフォーカスオフセットを用いたデフォーカス量の補正方法とを説明する図である。 デフォーカスオフセットをカメラモジュールに設定するデフォーカスオフセット設定処理の例を説明するフローチャートである。 位相差信頼性の信頼性閾値と、イメージセンサ13のセンサーゲインとの関係の概要を示す図である。 任意のセンサーゲインに対する信頼性閾値の算出方法と、信頼性閾値を用いた、位相差の信頼性の判定方法とを説明する図である。 信頼性閾値をカメラモジュールに設定する信頼性閾値設定処理の例を説明するフローチャートである。 デフォーカス量と位相差との実際の関係を表す換算特性の例を示す図である。 理想特性、オフセット特性、及び、コントラスト評価値の例を示す図である。 位相差オフセットの算出と、位相差オフセットを用いた位相差の補正とを説明する図である。 メモリ32の記憶内容の一部の例を示す図である。 位相差AF処理部17の構成例を示すブロック図である。 位相差AF処理部17の処理を説明する図である。 レンズ移動量を算出するレンズ移動量算出処理の例を説明するフローチャートである。 図32に続くフローチャートである。 像高を説明する図である。 カメラモジュールを使用する使用例を示す図である。
 <本技術を適用したカメラモジュールの一実施の形態>
 図1は、本技術を適用したカメラモジュールの一実施の形態の構成例を示すブロック図である。
 図1において、カメラモジュールは、レンズ鏡筒11、光学フィルタ12、イメージセンサ13、メイン処理部14、照明制御部15、センサ駆動部16、位相差AF処理部17、画像処理部18、フォーカス駆動部19、表示部20、操作部21、フラッシュメモリ22、フォーカスアクチュエータ23、及び、照明部24を有する。
 なお、図1において、カメラモジュールは、レンズ鏡筒11と一体的に構成される。但し、カメラモジュールは、レンズ鏡筒11を取り外し可能なように構成することができる。
 レンズ鏡筒11は、レンズ群や絞り等の撮像光学系11Aを有し、そこに入射する光を、光学フィルタ12を介して、イメージセンサ13上に集光する。
 なお、撮像光学系11Aのレンズ群のレンズ位置(ひいては焦点位置)は、光軸L方向に移動可能になっており、これにより、フォーカスの調整を行うことができるようになっている。
 光学フィルタ12は、イメージセンサ13で撮影される撮影画像に生じる偽色やモアレを軽減するための光学素子である。すなわち、光学フィルタ12は、光学的なローパスフィルタであり、撮像光学系11Aからの光の一部の成分を減衰して、イメージセンサ13に出射する。
 イメージセンサ13は、撮像光学系11Aから、光学フィルタ12を介して入射する光(被写体光)を受光することにより、撮影画像を撮影する撮像素子である。イメージセンサ13としては、例えば、CMOS(Complementary Metal Oxide Semiconductor)イメージセンサ等を採用することができる。
 イメージセンサ13は、撮影により得られる撮影画像(の画像信号)を、センサ駆動部16に供給する。
 メイン処理部14は、カメラモジュールを構成する各ブロックを制御する。
 メイン処理部14は、CPU(Central Processing Unit)31、メモリ32、ADC(Analog to Digital Converter)33、DAC(Digital to Analog Converter)34、及び、通信I/F(Interface)35を有する。
 CPU31は、メモリ32に記憶されたプログラムを実行することにより、照明制御部15ないしフラッシュメモリ22等を制御し、AFや、撮影画像の撮影、各種の画像処理、撮影画像の記録等の各種の処理を実行させる。
 メモリ32は、RAM(Random Access Memory)等の揮発性メモリや、EEPROM(Electrically Erasable Programmable Read Only Memory)等の不揮発性メモリ等で構成され、CPU31が実行するプログラムや、CPU31の動作上必要なデータを記憶する。
 メモリ32に記憶されるデータとしては、位相差AFのための後述するAFパラメータがある。
 ADC33は、アナログ信号をディジタル信号にAD変換する。DAC34は、ディジタル信号をアナログ信号にDA変換する。通信I/F35は、インターネット等との間の通信を制御する。
 照明制御部15は、照明部24を制御し、被写体を照明する光や、AF用のトーチ補助光となる光を発光させる。
 すなわち、照明制御部15は、イメージセンサ13の撮影動作に同期して、照明部24に、被写体を照明する光となる電子フラッシュを発光(点灯)させる。また、照明制御部15は、AFの動作に同期して、照明部24に、トーチ補助光を発光させる。
 センサ駆動部16は、イメージセンサ13を制御することにより、撮影画像を撮影させる。また、センサ駆動部16は、イメージセンサ13で撮影された撮影画像の画像信号を、必要に応じて、AD変換して、メイン処理部14や位相差AF処理部17に供給する。
 位相差AF処理部17は、センサ駆動部16からの撮影画像の画像信号のうちの、後述する検出画素の画素値を用いて、位相差AFにより、撮像光学系11A(のレンズ群)のレンズ位置を移動させるレンズ移動量を算出して、メイン処理部14に供給する。
 画像処理部18は、イメージセンサ13で撮影され、センサ駆動部16、及び、メイン処理部14を介して供給される撮影画像について、γ変換や、カラー補間、JPEG(Joint Photographic Experts Group)等の所定の圧縮伸張方式による圧縮伸張等の画像処理を行う。また、画像処理部18は、撮影画像のコントラストを表すコントラスト評価値を算出し、メイン処理部14に供給する。メイン処理部14では、画像処理部18からのコントラスト評価値を用いて、コントラストAF(の制御)が行われる。
 フォーカス駆動部19は、メイン処理部14の制御に従って、フォーカスアクチュエータ23を駆動し、撮像光学系11Aのレンズ位置を、光軸L方向に移動させることで、フォーカス調節を行う。
 表示部20は、例えば、LCD(Liquid Crystal Display)パネル等で構成され、カメラモジュールの撮影モードに関する情報や、撮影前のプレビュー画像、撮影後の確認用画像、AF時の合焦状態の画像等を表示する。
 操作部21は、ユーザによって操作されるスイッチ群であり、電源スイッチや、レリーズ(撮影トリガ)スイッチ、ズーム操作スイッチ、撮影モード選択スイッチ等を含む。
 フラッシュメモリ22は、カメラモジュールに着脱可能になっている。フラッシュメモリ22には、メイン処理部14から供給される撮影画像が記録(記憶)される。
 フォーカスアクチュエータ23は、フォーカス駆動部19により駆動され、撮像光学系11Aのレンズ位置を、光軸L方向に移動させる。
 照明部24は、照明制御部15の制御に従って、被写体を照明する光や、AF用のトーチ補助光となる光を発光する。
 照明部24としては、例えば、キセノン管を用いた閃光照明装置や、連続発光が可能なLED(Light Emitting Diode)を有するLED照明装置等を採用することができる。カメラモジュールが、スマートフォン等の携帯機器に搭載される場合には、照明部24としては、比較的小型のLED照明装置を採用することができる。
 照明部24は、所定のパターンの溝が形成された投光レンズ(図示せず)を介して、光を、被写界に投光し、暗い被写体や、低コントラストの被写体に対するAFの精度を向上させる。
 なお、位相差AF処理部17は、イメージセンサ13に含める(内蔵させる)ことができる。
 また、位相差AF処理部17は、ハードウェアにより実現することもできるし、ソフトウェアにより実現することもできる。位相差AF処理部17を、ソフトウェアによって実現する場合には、そのソフトウェアを構成するプログラムが、例えば、メイン処理部14等のコンピュータにインストールされ、メイン処理部14のCPU31によって実行される。
 この場合、CPU31がプログラムに従って行う処理は、必ずしも、後述するフローチャートとして記載された順序に沿って時系列に行われる必要はない。すなわち、CPU31がプログラムに従って行う処理は、並列的あるいは個別に実行される処理(例えば、並列処理あるいはオブジェクトによる処理)も含む。
 ここで、プログラムは、コンピュータとしてのメイン処理部14に内蔵されている記録媒体としてのメモリ32にあらかじめ記録しておくことができる。
 あるいはまた、プログラムは、リムーバブルな記録媒体である、例えば、フラッシュメモリ22に格納(記録)し、いわゆるパッケージソフトウエアとして提供することができる。
 なお、プログラムは、フラッシュメモリ22からメイン処理部14にインストールする他、インターネット等の通信網や、地上波等の放送網を介して、メイン処理部14にダウンロードし、内蔵するメモリ32にインストールすることができる。
 <イメージセンサ13の構成例>
 図2は、撮像光学系11A側から見たイメージセンサ13の構成例を示す平面図である。
 イメージセンサ13は、光を受光する受光面50を有し、受光面50は、横×縦がH×V個の画素で構成される。
 ここで、本実施の形態では、受光面50を、複数の画素からなる画素グループとしての、例えば、矩形のブロックに分割したときの、そのブロックを、画素ブロック51ともいう。
 図2では、画素ブロック51を構成する一部の画素群として、9×9画素を図示してある。
 画素には、例えば、オンチップで、ベイヤ配列のR(Red),G(Green)、又は、B(Blue)の(原色)カラーフィルタが形成されている。
 いま、R,G,Bのカラーフィルタが形成された画素を、それぞれ、R画素、G画素、B画素ということとする。R画素、G画素、B画素は、オンチップのカラーフィルタにより、それぞれ、R,G,Bの光の分光感度を有する。ベイヤ配列では、横×縦が2×2画素を基本単位として、対角の位置に、G画素が配置され、残りの2箇所に、R画素とB画素が配置される。
 図2では、基本単位としての2×2画素として、例えば、右上に、R画素が、左下に、B画素が、左上及び右下に、G画素が、それぞれ配置されている。
 ベイヤ配列では、以上のような基本単位が、横及び縦に繰り返し並んでいる。
 なお、図2では、基本単位の左上のG画素は、Grと図示してあり、右下のG画素は、Gbと図示してある。
 受光面50には、位相差AFに用いる位相差を検出するための検出画素53と、検出画素53以外の、位相差の検出には用いられない通常画素(撮影画像となる画像を得る目的の画素)52とが含まれる。
 検出画素53の詳細については、後述するが、検出画素53では、撮像光学系11Aの射出瞳の異なる領域としての、例えば、右半分又は左半分を通過した光を受光するために、左半分又は右半分が遮光されている。
 なお、撮影画像については、G画素の画素値から、輝度の主成分が取得される。
 <画素の構成例>
 図3は、通常画素52の構成例を示す図である。
 図3のAは、受光面50のうちの、通常画素52のみの領域の構成例を示す平面図である。
 図3のBは、通常画素52を、図3のAの線分L11に沿って切断した断面を模式的に示す断面図である。
 通常画素52は、図中、下から、PD(Photo Diode)61、CL(Contact Layer)62、カラーフィルタ63、オンチップレンズ(マイクロレンズ)64が積層された構成になっている。
 通常画素52では、オンチップレンズ64に入射した光のうちの所定の色成分の光が、カラーフィルタ63を通過し、透明のCL42を介して、PD61に入射する。PD61では、そこに入射する光が受光され、光電変換される。PD61での光電変換の結果得られる電気信号が、通常画素52の画素値として出力される。
 図4は、検出画素53の構成例を示す図である。
 図4のAは、受光面50のうちの、検出画素53を含む領域の構成例を示す平面図である。
 図4では、受光面50のR画素、G画素、B画素のうちの、G画素の一部が、検出画素53になっている。なお、検出画素としては、G画素ではなく、R画素やB画素の一部を採用することができる。
 検出画素53では、撮像光学系11Aの射出瞳の異なる領域としての、例えば、右半分と左半分のそれぞれを通過した光を受光するために、左半分が遮光された左遮光画素53Lと、右半分が遮光された右遮光画素53Rとがある。
 撮像光学系11Aの射出瞳を瞳分割して得られる2つの像の位相差を検出するために、左遮光画素53Lと、右遮光画素53Rとは、ペア(対)になっている。
 図4のBは、検出画素53のうちの左遮光画素53Lを、図4のAの線分L21に沿って切断した断面を模式的に示す断面図である。
 図4のCは、検出画素53のうちの右遮光画素53Rを、図4のAの線分L22に沿って切断した断面を模式的に示す断面図である。
 なお、図4の検出画素53において、図3の通常画素52と同様に構成される部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。
 検出画素53は、PD61ないしオンチップレンズ64を有する点で、通常画素52と共通する。但し、検出画素53は、CL62に、遮光膜66が設けられている点で、検出画素53と相違する。
 検出画素53のうちの左遮光画素53Lでは、図4のBに示すように、遮光膜66が、左遮光画素53Lの左半分を遮光するように設けられている。これにより、左遮光画素53Lでは、オンチップレンズ64側から見て、オンチップレンズ64の中心から右半分だけが開口している。その結果、左遮光画素53Lでは、撮像光学系11Aの射出瞳の、例えば、右半分を通過した光が受光される。
 検出画素53のうちの右遮光画素53Rでは、図4のCに示すように、遮光膜66が、右遮光画素53Rの右半分を遮光するように設けられている。これにより、右遮光画素53Rでは、オンチップレンズ64側から見て、オンチップレンズ64の中心から左半分だけが開口している。その結果、右遮光画素53Rでは、撮像光学系11Aの射出瞳の、例えば、左半分を通過した光が受光される。
 以上のような左遮光画素53Lと右遮光画素53Rとのペアにより、撮像光学系11Aの射出瞳の、水平方向(横方向)への瞳分割が行われる。
 なお、検出画素53は、例えば、水平方向に規則的に、受光面50の全体に亘って配置される。検出画素53の数を多くすれば、位相差、ひいては、位相差AFの精度は向上するが、撮影画像の画質が劣化する。そのため、検出画素53の数や配置位置は、位相差AFの精度と、撮影画像の画質とのトレードオフを考慮して決定することができる。
 また、検出画素53の配置パターンは、一定パターンにすることもできるし、例えば、受光面50の中心部や周辺部といった場所によって、異なるパターンにすることもできる。
 図5は、通常画素52、左遮光画素53L、及び、右遮光画素53Lそれぞれの画素値の系列の例を示す図である。
 ここで、ライン(水平ライン)に並ぶ通常画素52の画素値の系列を、通常系列ともいう。また、ラインに並ぶ左遮光画素53Lの画素値の系列を、左遮光系列ともいい、ラインに並ぶ右遮光画素53Rの画素値の系列を、右遮光系列ともいう。
 図5は、通常画素52と右遮光画素53Rとが混在するラインから得られる通常系列と右遮光系列、及び、その右遮光画素53Rとペアの左遮光画素53Lが存在するラインから得られる左遮光系列を示している。
 図5において、横軸は、画素の位置を表し、縦軸は、画素値(明るさ)を表す。
 検出画素53(左遮光画素53L及び右遮光画素53R)によれば、通常系列として現れる被写体像が、左遮光系列として現れる像(以下、左遮光像ともいう)と、右遮光系列として現れる像(以下、右遮光像ともいう)とに分離される。
 左遮光像と右遮光像との相対的な位置関係を表す位相差を、左遮光像と右遮光像との相関演算を行うこと等によって検出することで、その位相差から、被写体像のフォーカスのずれ量であるデフォーカス量を検出することができる。
 図6は、右遮光画素53Rが存在するラインから得られる右遮光系列と、その右遮光画素53Rとペアの左遮光画素53Lが存在するラインから得られる左遮光系列との例を示す図である。
 図6において、横軸は、画素の位置を表し、縦軸は、画素値を表す。
 図6では、通常画素52であるR画素が存在するラインL31の一部のG画素が、右遮光画素53Rになっている。さらに、図6では、ラインL31の直後のラインL32の一部のG画素が、左遮光画素53Lになっている。そして、例えば、右遮光画素53Rと、その右遮光画素53Rの左斜め下の左遮光画素53Lとが、(左遮光像と右遮光像との)位相差を検出するためのペアになっている。
 位相差は、左遮光系列及び右遮光系列を用いて、画素数を単位として求める(検出する)ことができる。
 被写体像が合焦状態になっているときのデフォーカス量は0であるから、位相差から検出されるデフォーカス量を0にするように、撮像光学系11Aのレンズ位置を移動することで、AFを行うことができる。
 <AFの説明>
 図7は、コントラストAF(CDAF)、位相差AF(PDAF)、及び、ハイブリッドAFを説明する図である。
 図7において、横軸は、撮像光学系11Aのレンズ位置を表し、縦軸は、コントラスト評価値及び位相差を表す。
 また、図7において、横軸の左方向は、Inf(無限遠)方向を表し、右方向は、マクロ(至近)方向を表す。
 ここで、Inf方向は、遠い位置の被写体にフォーカスが合う方向であり、マクロ方向とは、近い位置の被写体にフォーカスが合う方向である。
 コントラストAF(CDAF)では、レンズ位置を移動しながら、各レンズ位置において、撮影画像のコントラストを表すコントラスト評価値が求められる。レンズ位置の移動は、コントラスト評価値が上昇するように行われる。
 コントラスト評価値は、合焦位置で最大になるので、コントラストAFでは、レンズ位置が、合焦位置に近づくように移動されていき、一旦、合焦位置を追い越す。その後、レンズ位置は、少しずつ、合焦位置を再び追い越すように移動され、そのときに得られるコントラスト評価値を用いて、コントラスト評価値が最大になるレンズ位置、すなわち、合焦位置が検出される。そして、レンズ位置が、コントラスト評価値が最大になる位置である合焦位置に移動される。
 位相差AF(PDAF)では、レンズ位置が合焦位置にあるときに、位相差が0になるとすると、位相差が0になるように、レンズ位置が、いわば直接的に移動される。
 ハイブリッドAFでは、ますに、位相差AFによって、レンズ位置が合焦位置付近に移動され、その後、コントラストAFによって、レンズ位置が合焦位置に精度良く移動される。
 <位相差とデフォーカス量>
 図8は、位相差とデフォーカス量との関係を説明する図である。
 位相差、及び、デフォーカス量は、いずれも、被写体像のフォーカスのずれ量を表すが、AFでは、デフォーカス量は、現在のレンズ位置から合焦位置までが、どれだけ離れているかを表す物理量として用いる。
 すなわち、AFにおいて、デフォーカス量は、合焦位置から現在のレンズ位置までの距離と方向を表す。
 図8のAは、デフォーカス量を説明する図である。
 コントラスト評価値が最大になるレンズ位置を合焦位置として、デフォーカス量は、合焦位置から現在のレンズ位置までの距離と方向を表す。
 いま、レンズ位置の移動量を、um(マイクロメートル)で表すこととすると、デフォーカス量の単位としては、umを採用することができる。
 一方、位相差は、被写体像のフォーカスのずれ量を、左遮光像と右遮光像との相対的な位置関係として表し、その単位は、画素数である。
 図8のBは、位相差とデフォーカス量との関係を示す図である。
 図8のBにおいて、横軸は、位相差を表し、縦軸は、デフォーカス量を表す。
 位相差とデフォーカス量とは、理想的には、図8のBに示すように、線形の関係を有し、したがって、位相差とデフォーカス量とについては、一方から他方を求めることができる。
 いま、位相差を、デフォーカス量に変換(換算)する係数を、換算係数aということとすると、デフォーカス量は、位相差を用いて、式(1)に従って求めることができる。
 デフォーカス量[um]=位相差[画素数]×換算係数a[um/画素数]
                        ・・・(1)
 位相差とデフォーカス量との関係を、換算特性ということとすると、換算特性は、理想的には、直線で表される。図8のBに示すように、横軸を位相差とし、縦軸をデフォーカス量とした2次元平面において、換算係数aは、直線で表される換算特性の傾きを表す。
 換算係数aは、カメラモジュールを製造する製造工場において、カメラモジュールの試験等を行うことによって、事前に(出荷前に)取得することができる。
 <半導体プロセスでの重ね合わせずれに起因する誤差の補正>
 図9は、受光面50上の一部の画素の構成例を示す平面図である。
 なお、図9において、図3及び図4の場合と対応する部分については、同一符号を付してあり、以下では、その説明は、適宜省略する。
 イメージセンサ13を製造する半導体プロセスでは、例えば、オンチップレンズ64や遮光膜66等を形成する(取り付ける)ときに、そのオンチップレンズ64や遮光膜66等が本来の位置(理想的な位置)からずれる重ね合わせずれ(例えば、リソグラフィの際の合わせずれ等)が生じることがある。
 図9のAは、遮光膜66が本来の位置に形成された画素を示している。
 図9のAでは、左遮光画素53Lについては、遮光膜66が、左遮光画素53Lの(ほぼ)左半分を遮光するように形成され、(ほぼ)右半分が開口している。同様に、右遮光画素53Rについては、遮光膜66が、右遮光画素53Rの(ほぼ)右半分を遮光するように形成され、(ほぼ)左半分が開口している。
 なお、通常画素52については、その(ほぼ)全体が開口している。
 図9のBは、遮光膜66が本来の位置から水平方向(右方向)にずれた位置に形成された画素を示している。
 図9のBでは、左遮光画素53Lについては、遮光膜66が、左遮光画素53Lの左右の端部を遮光している。一方、右遮光画素53Rについては、遮光膜66が、右遮光画素53Rの左の端部以外のほとんどの部分を遮光している。
 以上のように、遮光膜66が本来の位置から水平方向にずれている場合、左遮光画素53L及び右遮光画素53Rに、同一光量の光が照射されても、左遮光画素53L及び右遮光画素53Rそれぞれで受光される光量は、異なる光量になる。その結果、左遮光画素53L及び右遮光画素53Rそれぞれの画素値も、異なる画素値になる。
 図10は、左遮光画素53L及び右遮光画素53Rに、同一光量の光が照射されている場合に、その左遮光画素53L及び右遮光画素53Rそれぞれで受光される光量を説明する図である。
 図10のAは、遮光膜66が本来の位置に形成されている場合の、左遮光画素53L及び右遮光画素53Rそれぞれで受光される光量を示している。
 この場合、左遮光画素53L及び右遮光画素53Rそれぞれで受光される光量は、同一になる。
 図10のBは、遮光膜66が本来の位置から右にずれた位置に形成されている場合の、左遮光画素53L及び右遮光画素53Rそれぞれで受光される光量を示している。
 この場合、右遮光画素53Rで受光される光量は大になり、左遮光画素53Lで受光される光量は小になる。
 図10のCは、遮光膜66が本来の位置から左にずれた位置に形成されている場合の、左遮光画素53L及び右遮光画素53Rそれぞれで受光される光量を示している。
 この場合、右遮光画素53Rで受光される光量は小になり、左遮光画素53Lで受光される光量は大になる。
 以上のように、遮光膜66が、本来の位置からずれた位置に形成されている場合には、左遮光画素53L及び右遮光画素53Rそれぞれで受光される光量が、異なる光量になる。
 遮光膜66の他、オンチップレンズ64が、本来の位置からずれた位置に形成されている場合も、同様に、左遮光画素53L及び右遮光画素53Rそれぞれで受光される光量が、異なる光量になる。
 ここで、オンチップレンズ64や遮光膜66が、本来の位置からずれる位置ずれは、カメラモジュール(イメージセンサ13)の製造時に生じるが、その位置ずれには、個体差があり、カメラモジュールによってばらつきがある。また、カメラモジュールでは、オンチップレンズ64や遮光膜66の位置ずれ以外のパラメータにも、種々の製造誤差が生じ得るが、その製造誤差には、やはり、個体差がある。
 そのため、位相差AFのためのAFパラメータ、すなわち、例えば、上述の換算係数や、後述する調整ゲイン、デフォーカスオフセット、信頼性閾値、位相差オフセット、移動割合テーブル、及び、レンズ位置オフセットテーブルは、個々のカメラモジュールごとに求められ、そのカメラモジュールで使用される。
 但し、AFパラメータとしての換算係数、調整ゲイン、デフォーカスオフセット、信頼性閾値、位相差オフセット、移動割合テーブル、及び、レンズ位置オフセットテーブルの任意の1以上については、必要に応じて、代表的な値を、複数のカメラモジュール(例えば、同一工場で製造された複数のカメラモジュール)に適用することができる。
 <調整ゲイン>
 図11は、調整ゲインを説明する図である。
 すなわち、図11は、全白色のチャートを、イメージセンサ13で撮影した場合に得られる通常系列、左遮光系列、及び、右遮光系列の例を示している。
 図11において、横軸は、画素の水平方向の位置(x座標)を表し、縦軸は、画素値(レベル)を表す。
 全白色のチャートを、イメージセンサ13で撮影した場合、撮像光学系11Aを構成するレンズの特性等に起因して、イメージセンサ13の中央部から周辺部に向かって、イメージセンサ13で受光される光量が低下する。そのため、通常系列、左遮光系列、及び、右遮光系列は、中央付近にピークを有する凸状のグラフになる。
 左遮光系列の最大値である左ピーク値と、右遮光系列の最大値である右ピーク値との差diffPPは、例えば、遮光膜66の位置ずれと相関がある。
 すなわち、図10で説明したように、遮光膜66の位置ずれによって、左遮光画素53L及び右遮光画素53Rで受光される光量は、異なる光量になる。
 そのため、遮光膜66の位置ずれのずれ量が大であるほど、左遮光系列の最大値である左ピーク値と、右遮光系列の最大値である右ピーク値との差diffPP(の絶対値)も大になる。
 なお、遮光膜66だけに注目した場合、その位置ずれがなければ、左ピーク値と右ピーク値とは等しくなり、それらの差diffPPは0になる。
 また、遮光膜66の位置ずれがない場合において、左遮光画素53Lにおいて、遮光膜66が、左遮光画素53Lの左半分を遮光するように設けられているとともに、右遮光画素53Rにおいて、遮光膜66が、右遮光画素53Rの右半分を遮光するように設けられているときには、通常系列の最大値である通常画素ピーク値と、左ピーク値及び右ピーク値の平均値aveとの差diffPAは、通常画素ピーク値の1/2になる。
 遮光膜66の位置ずれがある場合には、イメージセンサ13で、全白色のチャートが撮影されていても、ペアとなる左遮光画素53Lと右遮光画素53Rとのそれぞれで受光される光量が異なり、得られる画素値も異なる。ペアとなる左遮光画素53Lと右遮光画素53Rとのそれぞれで受光される光量が異なることは、遮光膜66の位置ずれの他、撮像光学系11Aやオンチップレンズ64をマウントする際の位置ずれ等にも起因して生じる。
 そこで、本技術では、通常画素52と左遮光画素53L及び右遮光画素53Rそれぞれとの受光感度比を、左遮光画素53L及び右遮光画素53Rのそれぞれで受光される光量の違いを調整する調整ゲインとして設定しておき、その調整ゲインによって、検出画素53(左遮光画素53L及び右遮光画素53R)の画素値を補正する。
 調整ゲインは、式(2)に従って求めることができる。
 調整ゲイン=通常画素52の画素値/検出画素53の画素値
                        ・・・(2)
 ここで、検出画素53の画素値とは、左遮光画素53Lの画素値、又は、右遮光画素53Rの画素値である。
 図12は、調整ゲインによる検出画素53の画素値の補正の例を示す図である。
 カメラモジュールの製造工場等において、左遮光画素53L及び右遮光画素53Rのそれぞれについて、式(2)に従い、調整ゲインが求められる。
 調整ゲインは、所定の被写体としての、例えば、全白色のチャートを撮影して得られる通常画素52の画素値と、検出画素53の画素値とを用い、式(2)に従って、通常画素52の画素値と検出画素53の画素値との比をとることで求められる。
 以上のようにして求められる調整ゲインを、全白色のチャートを撮影して得られる検出画素53の画素値に乗算して、その画素値を補正した場合には、その画素値は、図12に示すように、通常画素52の画素値に一致する。
 カメラモジュールの使用時には、左遮光画素53Lの画素値に、その左遮光画素53Lについての調整ゲインが乗算されることで、左遮光画素53Lの画素値が補正される。同様に、右遮光画素53Rの画素値に、その右遮光画素53Rについての調整ゲインが乗算されることで、右遮光画素53Rの画素値が補正される。
 そして、以上のように、調整ゲインを用いて補正された検出画素53(左遮光画素53L及び右遮光画素53R)の画素値を用いて、位相差が求められる。
 以上のように、調整ゲインを用いて補正された検出画素53の画素値を用いることにより、高精度の位相差を求めることができる。さらに、そのような高精度の位相差を用いて、位相差AFを行うことにより、位相差AFの精度を向上させることができる。
 <調整ゲイン設定処理>
 図13は、調整ゲインをカメラモジュールに設定する調整ゲイン設定処理を説明する図である。
 すなわち、図13は、イメージセンサ13の受光面50を示している。
 図13では、受光面50が、5×5=25個の画素ブロック51に分割されている。
 調整ゲインは、画素ブロック51を構成する複数の画素を代表する代表点である結節点ごとに求められる。
 なお、結節点としては、例えば、画素ブロック51の重心等を採用することができる。
 結節点は、縦と横の位置(座標)や、番号を付して、識別することができる。
 図14は、調整ゲイン設定処理の例を説明するフローチャートである。
 ステップS11において、メイン処理部14は、センサ駆動部16を介して、イメージセンサ13の駆動モードを設定し、処理は、ステップS12に進む。
 ここで、駆動モードとしては、例えば、全画素モードや、間引きモード、画素加算モード等がある。全画素モードでは、イメージセンサ13を構成する各画素の画素値で構成される画像が、撮影画像として出力される。間引きモードでは、イメージセンサ13を構成する画素から所定のパターンで画素を間引いた、間引き後の画素の画素値で構成される画像が、撮影画像として出力される。画素加算モードでは、イメージセンサ13を構成する画素の画素値を、所定のパターンで加算した値を画素値とする画像が、撮影画像として出力される。
 ステップS12では、メイン処理部14は、フォーカス駆動部19を介して、フォーカスアクチュエータ23を制御することで、撮像光学系11Aのレンズ位置を、例えば、マクロ方向の所定の定位置に移動させ、処理は、ステップS13に進む。
 ここで、調整ゲイン設定処理にあたっては、調整ゲイン設定処理用の被写体として、例えば、白一色の被写体が用意される。そして、例えば、撮像光学系11Aのレンズ位置が、マクロ方向の所定の定位置になっているときに、合焦状態となるように、調整ゲイン設定処理用の被写体と、カメラモジュールとが、既知の距離にセットされる。
 ステップS13では、メイン処理部14は、調整ゲイン設定処理用の被写体である白一色の被写体を撮影するにあたっての撮影条件を設定し、処理は、ステップS14に進む。
 ここで、ステップS13で設定される撮影条件としては、例えば、シャッタスピードやAE(Automatic Exposure)ゲイン等がある。
 ステップS14では、イメージセンサ13が、調整ゲイン設定処理用の被写体である白一色の被写体(チャート)を撮影し、その撮影により得られる撮影画像を、センサ駆動部16を介して、メイン処理部14に供給して、処理は、ステップS15に進む。
 ステップS15では、メイン処理部14は、イメージセンサ13からの撮影画像を用いて、検出画素53(左遮光画素53L及び右遮光画素53Rのそれぞれ)について、式(2)に従い、調整ゲインを求める。
 さらに、メイン処理部14は、各画素ブロック51を、順次、注目ブロックとして選択する。メイン処理部14は、注目ブロック内の検出画素53である左遮光画素53L及び右遮光画素53Rのそれぞれについて、調整ゲインの平均値等の代表値を、注目ブロックの結節点の左遮光画素用の調整ゲイン、及び、右遮光画素用の調整ゲインとして求め、処理は、ステップS15からステップS16に進む。
 ステップS16では、メイン処理部14は、ステップS15で求められた調整ゲインが、製造規格としてあらかじめ決められた範囲内の値(以下、製造規格内の値ともいう)であるかどうかを判定する。
 ステップS16において、調整ゲインが、製造規格内の値でないと判定された場合、調整ゲイン設定処理は、終了する。この場合、カメラモジュールに欠陥がある可能性があるため、カメラモジュールは、例えば、検査に回される。
 一方、ステップS16において、調整ゲインが、製造規格内の値であると判定された場合、処理は、ステップS17に進む。
 ステップS17では、メイン処理部14は、ステップS15で求められた画素ブロック51の結節点ごとの左遮光画素用の調整ゲイン、及び、右遮光画素用の調整ゲインを、メモリ32に書き込み、調整ゲイン設定処理は、終了する。
 以上のように、各画素ブロック51の結節点の左遮光画素用の調整ゲイン、及び、右遮光画素用の調整ゲインが、メモリ32に書き込まれることで、調整ゲインがカメラモジュールに設定される。
 なお、ある画素ブロック51の左遮光画素53Lの画素値の補正は、例えば、その画素ブロック51の結節点の左遮光画素用の調整ゲインを乗算することで行うことができる。
 また、ある画素ブロック51の左遮光画素53Lの画素値の補正は、例えば、各画素ブロック51の結節点の左遮光画素用の調整ゲインを用いた(3次元)補間によって得られる、左遮光画素53Lの位置の調整ゲインの補間値を乗算することで行うことができる。
 画素ブロック51の右遮光画素53Lの画素値の補正についても、同様である。
 また、図14では、結節点ごとの調整ゲインを、メモリ32に書き込む(記憶させる)こととしたが、メモリ32には、検出画素53ごとの調整ゲインを書き込むことが可能である。但し、検出画素53ごとの調整ゲインをメモリ32に書き込む場合には、調整ゲインによる検出画素53の画素値の補正の精度を向上させることができるが、調整ゲインをメモリ32に記憶させる記憶容量が大になる。
 <換算係数>
 図15は、位相差とデフォーカス量との関係である換算特性の例を示す図である。
 なお、図8のBでは、横軸は、位相差を表し、縦軸は、デフォーカス量を表すが、図15では、横軸と縦軸とが入れ替わっている。すなわち、図15において、横軸は、デフォーカス量を表し、縦軸は、位相差を表す。
 また、図8のBでは、デフォーカス量の単位として、umを採用したが、図15では、デフォーカス量の単位として、DAC(値)が採用されている。DACは、フォーカスアクチュエータ23として、VCM(Voice Coil Motor)が採用されている場合の、そのVCMを制御する制御単位である。デフォーカス量としてのDACとしては、例えば、10ビットで表される値(0から1023の範囲)を採用することができる。
 図15では、3つの換算特性R#1,R#2、及び、R#3が図示されている。
 ここで、図15では、上述したように、横軸は、デフォーカス量を表し、縦軸は、位相差を表すため、換算特性R#1,R#2、及び、R#3の傾きは、換算係数aの逆数1/aを表す。
 換算特性R#1は、イメージセンサ13の受光面50の中心部の検出画素53についての換算特性、すなわち、中心部の検出画素53から得られる位相差とデフォーカス量との関係である換算特性を表す。
 換算特性R#2は、イメージセンサ13の受光面50の周辺部のうちの、中心部から横方向に離れた部分の検出画素53についての換算特性を表す。換算特性R#3は、イメージセンサ13の受光面50の周辺部のうちの、中心部から対角方向に離れた部分の検出画素53について換算特性を表す。
 ここで、受光面50において、中心の位置を0%の位置というとともに、中心から最も離れている対角の位置を、100%の位置ということとすると、中心から横方向に最も離れている位置は、約64%の位置になる。
 換算特性R#1ないしR#3は、それぞれ、0%,64%,100%の位置の検出画素53についての換算特性を表す。
 換算特性R#1ないしR#3から、イメージセンサ13の受光面50の中心部から離れた位置の検出画素53についての換算特性ほど、その傾きである換算特性aの逆数1/aが小さくなること、つまり、換算特性aが大きくなることを確認することができる。
 また、本件発明者によれば、換算特性、すなわち、換算係数aは、受光面50の位置によってばらつくことが確認された。
 したがって、例えば、イメージセンサ13の受光面50の中心部の検出画素53等の、ある位置の検出画素53についてだけ、換算係数aを求めておき、その換算係数aを、イメージセンサ13のすべての検出画素53に用いて、デフォーカス量を求める場合には、デフォーカス量に誤差が生じることがある。
 図16は、換算係数aが、受光面50の位置によってばらつくことによって、デフォーカス量に誤差が生じることを説明する図である。
 すなわち、図16は、受光面50の中心部の検出画素53についての換算特性(以下、中心換算特性ともいう)R#1と、受光面50の周辺部の検出画素53についての換算係数(以下、周辺換算特性ともいう)R#2との例を示している。
 図16において、横軸は、撮像光学系11Aのレンズ位置を表し、縦軸は、位相差、及び、コントラスト評価値を表す。
 また、図16において、左方向は、Inf方向であり、右方向は、マクロ方向である。
 さらに、図16において、合焦位置は、コントラスト評価値が最大になるレンズ位置であることとする。
 いま、例えば、受光面50の中心部の検出画素53から、位相差x1が検出されたこととする。
 この場合、中心換算特性R#1によれば、位相差x1に対して、デフォーカス量y1が求められ、周辺換算特性R#2によれば、位相差x1に対して、デフォーカス量y1より大のデフォーカス量y2が求められる。
 受光面50の中心部の検出画素53から求められた位相差x1に対するデフォーカス量としては、中心換算特性R#1を用いて求められるデフォーカス量y1が適切である。
 しかしながら、カメラモジュールに、周辺換算特性R#2を表す換算係数aだけが設定されている場合には、受光面50の中心部の検出画素53から求められた位相差x1に対して、周辺換算特性R#2を用いて、デフォーカス量y2が求められる。
 このデフォーカス量y2は、受光面50の中心部の検出画素53から求められた位相差x1にとって適切なデフォーカス量y1よりも大きく、誤差を有する。
 デフォーカス量y2に従って、撮像光学系11Aのレンズ位置を移動した場合には、レンズ位置は、合焦位置を行き過ぎることになり、位相差AFの精度が劣化する。
 以上のように、デフォーカス量が誤差を有すると、位相差AFの精度が劣化する。ハイブリッドAFにおいて、位相差AFの精度が劣化すると、コントラストAFが行われる時間が大になり、結果として、ハイブリッドAF全体の時間が大になる。
 そこで、本技術では、例えば、受光面50上の複数の位置それぞれについて、換算係数aを設定しておき、その換算係数aを用いて、デフォーカス量を求めることで、デフォーカス量、ひいては、位相差AFの精度を向上させる。
 図17は、換算係数aを説明する図である。
 図17では、図8のBと同様に、横軸は、位相差を表し、縦軸は、デフォーカス量を表す。
 但し、図8のBでは、デフォーカス量の単位として、umを採用したが、図17では、デフォーカス量の単位として、図15と同様に、DACが採用されている。
 換算係数aは、位相差とデフォーカス量との関係を表す換算特性の傾きであり、式(3)に従って求められる。
 換算係数a[DAC/画素数]=デフォーカス量[DAC]/位相差[画素数]
                        ・・・(3)
 <換算係数設定処理>
 図18は、換算係数をカメラモジュールに設定する換算係数設定処理において使用する換算係数設定処理用の被写体の例を示す平面図である。
 換算係数設定処理用の被写体としては、例えば、図18に示すように、スリットがあるスリット被写体を採用することができる。その他、換算係数設定処理用の被写体としては、精度の良い位相差を検出することができるように、例えば、コントラストの大きい被写体を採用することができる。
 図19は、換算係数設定処理の例を説明するフローチャートである。
 換算係数設定処理では、例えば、図14で説明した調整ゲインと同様に、換算係数は、画素ブロック51を構成する複数の画素を代表する代表点である結節点ごとに求められる。
 ステップS21において、メイン処理部14は、図14のステップS11と同様に、イメージセンサ13の駆動モードを設定し、処理は、ステップS22に進む。
 ステップS22では、メイン処理部14は、図14のステップS13と同様に、換算係数設定処理用の被写体であるスリット被写体を撮影するにあたっての撮影条件を設定し、処理は、ステップS23に進む。
 ステップS23では、メイン処理部14は、フォーカス駆動部19を介して、フォーカスアクチュエータ23を制御することで、撮像光学系11Aのレンズ位置を、マクロ方向の位置からInf方向の位置までの間の複数の位置に順次移動させる。
 ここで、換算係数設定処理では、換算係数設定処理用の被写体と、カメラモジュールとが、既知の距離にセットされる。したがって、合焦位置、及び、撮像光学系11のレンズ位置に対するデフォーカス量は、既知である。
 ステップS23のレンズ位置の移動は、合焦位置を跨ぐように行われる。
 ステップS23では、上述のように、撮像光学系11Aのレンズ位置が、複数の位置に順次移動されるが、その一方で、イメージセンサ13が、換算係数設定処理用の被写体であるスリット被写体を撮影する。
 撮像光学系11Aのレンズ位置が、複数の位置のそれぞれに移動されたときにイメージセンサ13で撮影される撮影画像は、センサ駆動部16を介して、メイン処理部14に供給される。
 メイン処理部14は、以上のように、複数のレンズ位置それぞれで撮影された撮影画像の各画素ブロック51について、その画素ブロック51の検出画素の画素値から位相差を求める。さらに、メイン処理部14は、画素ブロック51の検出画素の画素値から求めた位相差が得られたときのレンズ位置に対するデフォーカス量を取得する。
 ここで、上述したように、換算係数設定処理用の被写体と、カメラモジュールとは、既知の距離にセットされており、レンズ位置に対するデフォーカス量は、既知である。
 メイン処理部14は、複数のレンズ位置それぞれにつき、各画素ブロック51について、位相差とデフォーカス量とのセットを得ると、処理は、ステップS23からステップS24に進み、メイン処理部14は、結節点ごとに、換算係数aを求める。
 すなわち、メイン処理部14は、各画素ブロック51を、順次、注目ブロックとして選択する。メイン処理部14は、複数のレンズ位置それぞれについて注目ブロックの検出画素53から得られた位相差と、その位相差とセットになっているデフォーカス量とを用いて、式(3)により定義される換算係数aを、注目ブロックの結節点の換算係数aとして求める。
 ここで、ステップS23では、注目ブロックについて、位相差とデフォーカス量とのセットが、複数セット得られる。
 メイン処理部14では、例えば、注目ブロックについての位相差とデフォーカス量との複数セットに、最小自乗法を適用して、注目ブロックの結節点の換算係数aを求めることができる。
 また、メイン処理部14では、例えば、注目ブロックについての位相差とデフォーカス量との複数セットのそれぞれについて、式(3)に従い、換算係数aを求め、その複数セットのそれぞれについて求められた換算係数aの平均値等の代表値を、注目ブロックの結節点の換算係数aとして求めることができる。
 各画素ブロック51の結節点の換算係数aが求められると、処理は、ステップS24からステップS25に進む。
 ステップS25では、メイン処理部14は、ステップS24で求められた換算係数aが、製造規格内の値であるかどうかを判定する。換算係数aが製造規格内の値であるかどうかは、その換算係数aから得られる、後述するPDAF合焦位置誤差が所定の閾値以内であるかどうかによって判定することができる。
 ステップS25において、換算係数aが、製造規格内の値でないと判定された場合、換算係数設定処理は、終了する。この場合、カメラモジュールに欠陥がある可能性があるため、カメラモジュールは、例えば、検査に回される。
 一方、ステップS25において、換算係数aが、製造規格内の値であると判定された場合、処理は、ステップS26に進む。
 ステップS26では、メイン処理部14は、ステップS24で求められた各画素ブロック51の結節点の換算係数aを、メモリ32に書き込み、換算係数設定処理は、終了する。
 以上のように、各画素ブロック51の結節点の換算係数aが、メモリ32に書き込まれることで、換算係数aがカメラモジュールに設定される。
 そして、例えば、ある画素ブロック51内の検出画素53から得られた位相差の、デフォーカス量への変換は、その画素ブロック51の結節点の変換係数aを用いて行われる。
 <デフォーカスオフセット>
 図20は、デフォーカスオフセットを説明する図である。
 図20において、横軸は、レンズ位置を表し、縦軸は、位相差、及び、コントラスト評価値を表す。
 ここで、カメラモジュールについては、製造誤差等の変動要因に起因して、位相差AFでは、コントラストAFに比較して、精度がでないことがある。
 また、ハイブリッドAFでは、最終的には、コントラストAFにおいて、コントラスト評価値が最大になるレンズ位置が、合焦位置になる。したがって、ハイブリッドAFの高速化では、位相差AFにおいて、合焦位置としての、コントラスト評価値が最大になるレンズ位置になるべく近い位置に、レンズ位置を移動させることが重要である。
 図20は、レンズ位置とコントラスト評価値及び位相差それぞれとの実際の関係を示している。
 いま、コントラスト評価値が最大になるレンズ位置を、コントラストAF合焦位置ともいうこととする。さらに、現在のレンズ位置、すなわち、例えば、ハイブリッドAFにおいて、位相差AFを開始する位置を、PDAF実行位置ともいうとともに、位相差AFにおいて、デフォーカス量に従って移動した後のレンズ位置を、PDAF合焦位置ともいうこととする。
 PDAF合焦位置は、PDAF実行位置で求められるデフォーカス量を0にするように、レンズ位置を、PDAF実行位置から移動した位置である。
 ここで、デフォーカス量は、PDAF実行位置で求められる位相差に、換算係数aを乗算して求められる。
 したがって、PDAF合焦位置は、式(4)に従って求めることができる。
 PDAF合焦位置=PDAF実行位置-デフォーカス量
        =PDAF実行位置-換算係数a×PDAF実行位置で求められる位相差
                        ・・・(4)
 いま、コントラストAF合焦位置に対するPDAF合焦位置の誤差を、PDAF合焦位置誤差ともいうこととすると、PDAF合焦位置誤差は、式(5)で表される。
 PDAF合焦位置誤差=PDAF合焦位置-コントラストAF合焦位置
                        ・・・(5)
 式(5)のPDAF合焦位置誤差は、製造誤差等に起因して、0にならないことがある。
 PDAF合焦位置誤差をより小さくすることにより、位相差AFの精度を向上させることができ、さらに、ハイブリッドAFに要する時間の短縮化(高速化)を図ることができる。
 ここで、一般に、デフォーカス量(ここでは、コントラストAF合焦位置からPDAF実行位置までの距離)が大きくなるにつれて、PDAF合焦位置誤差は、大きくなる傾向がある。
 デフォーカス量が大きくなるほど、PDAF合焦位置誤差が大きくなる第1の要因は、デフォーカス量が大きいと、検出画素53上の像がぼけてしまうことにある。検出画素53上の像がぼけると、検出画素53の画素値の系列として得られる左遮光像及び右遮光像のコントラストが失われ、それらの左遮光像及び右遮光像から求められる位相差の精度が悪化する。
 デフォーカス量が大きくなるほど、PDAF合焦位置誤差が大きくなる第2の要因は、デフォーカス量が大きいほど、左遮光像と右遮光像との間のずれ量が大きくなり、被写体までの距離を測ることができるずれ量(測距可能な距離に対応するずれ量)からはみ出すことがある。この場合、左遮光像と右遮光像との一致性が低下し、それらの左遮光像と右遮光像とから求められる位相差の精度が悪化する。
 そこで、本技術では、PDAF合焦位置誤差を、デフォーカス量のオフセットであるデフォーカスオフセットとして求め、そのデフォーカスオフセットによって、デフォーカス量を補正することで、位相差AFの精度を向上させる。
 図21は、デフォーカスオフセットの算出方法と、デフォーカスオフセットを用いたデフォーカス量の補正方法とを説明する図である。
 デフォーカスオフセットは、PDAF合焦位置誤差から、式(6)に従って算出することができる。
 デフォーカスオフセット[DAC]=PDAF合焦位置誤差[DAC]
                        ・・・(6)
 ここで、PDAF合焦位置誤差は、式(5)に従い、PDAF合焦位置とコントラストAF合焦位置とを用いて求めることができる。
 PDAF合焦位置は、式(4)に従って求めることができる。
 コントラストAF合焦位置は、コントラスト評価値が最大になるレンズ位置として求めることができる。メイン処理部14において、コントラスト評価値は、画像処理部18から得ることができる。
 デフォーカスオフセットを用いたデフォーカス量の補正では、位相差から求められたデフォーカス量が、式(7)に従い、レンズ位置を、現在位置から、コントラストAF合焦位置に移動させるデフォーカス量に補正される。
 補正後のデフォーカス量=デフォーカス量+デフォーカスオフセット
                        ・・・(7)
 <デフォーカスオフセット設定処理>
 図22は、デフォーカスオフセットをカメラモジュールに設定するデフォーカスオフセット設定処理の例を説明するフローチャートである。
 デフォーカスオフセット設定処理では、例えば、換算係数設定処理の場合と同様に、図18のスリット被写体を、デフォーカスオフセット設定処理用の被写体として採用することができる。
 また、デフォーカスオフセット設定処理では、例えば、換算係数設定処理と同様に、デフォーカスオフセットは、画素ブロック51を構成する複数の画素を代表する代表点である結節点(図13)ごとに求められる。
 ステップS41において、メイン処理部14は、図14のステップS11と同様に、イメージセンサ13の駆動モードを設定し、処理は、ステップS42に進む。
 ステップS42では、メイン処理部14は、図14のステップS13と同様に、デフォーカスオフセット設定処理用の被写体であるスリット被写体を撮影するにあたっての撮影条件を設定し、処理は、ステップS43に進む。
 ステップS43では、メイン処理部14は、図19のステップS23と同様に、フォーカス駆動部19を介して、フォーカスアクチュエータ23を制御することで、撮像光学系11Aのレンズ位置を、マクロ方向の位置からInf方向の位置までの間の複数の位置に順次移動させる。
 ステップS43では、上述のように、撮像光学系11Aのレンズ位置が、複数の位置に順次移動されるが、その一方で、イメージセンサ13が、スリット被写体を撮影する。
 撮像光学系11Aのレンズ位置が、複数の位置のそれぞれに移動されたときにイメージセンサ13で撮影された撮影画像は、センサ駆動部16を介して、メイン処理部14に供給される。
 メイン処理部14は、以上のように、複数のレンズ位置それぞれで撮影された撮影画像の各画素ブロック51について、その画素ブロック51の検出画素の画素値から位相差を求める。
 また、メイン処理部14は、画像処理部18を制御することにより、複数のレンズ位置それぞれで撮影された撮影画像について、コントラスト評価値を求めさせる。
 その後、処理は、ステップS43からステップS44に進み、メイン処理部14は、各画素ブロック51について、図19の換算係数設定処理で得られている換算係数aを用いて、その画素ブロック51について得られた位相差から、デフォーカス量を求める。そして、メイン処理部14は、各画素ブロック51について、デフォーカス量を用い、式(4)に従って、PDAF合焦位置を求める。
 さらに、メイン処理部14は、複数のレンズ位置それぞれで撮影された撮影画像について、画像処理部18で求められたコントラスト評価値から、そのコントラスト評価値が最大になるレンズ位置を、コントラストAF合焦位置として求める。
 ここで、メイン処理部14では、1個の画素ブロック51につき、複数のレンズ位置それぞれで撮影された撮影画像について、PDAF合焦位置が求められる。1個の画素ブロック51については、複数のレンズ位置それぞれで撮影された撮影画像について求められたPDAF合焦位置の平均値等の代表値が、画素ブロック51についてのPDAF合焦位置として求められる。
 メイン処理部14が、各画素ブロック51についてのPDAF合焦位置と、コントラストAF合焦位置とを求めると、処理は、ステップS44からステップS45に進み、メイン処理部14は、結節点ごとに、デフォーカスオフセットを求める。
 すなわち、ステップS45では、メイン処理部14は、各画素ブロック51を、順次、注目ブロックとして選択する。メイン処理部14は、注目ブロックのPDAF合焦位置と、コントラストAF合焦位置とを用いて、式(5)のPDAF合焦位置誤差を、注目ブロックの結節点のデフォーカスオフセットとして求め、処理は、ステップS45からステップS46に進む。
 ステップS46では、メイン処理部14は、ステップS45で求められたデフォーカスオフセットが、製造規格内の値であるかどうかを判定する。
 ステップS46において、デフォーカスオフセットが、製造規格内の値でないと判定された場合、デフォーカスオフセット設定処理は、終了する。この場合、カメラモジュールに欠陥がある可能性があるため、カメラモジュールは、例えば、検査に回される。
 一方、ステップS46において、デフォーカスオフセットが、製造規格内の値であると判定された場合、処理は、ステップS47に進む。
 ステップS47では、メイン処理部14は、ステップS45で求められた各画素ブロック51の結節点のデフォーカスオフセットを、メモリ32に書き込み、デフォーカスオフセット設定処理は、終了する。
 以上のように、各画素ブロック51の結節点のデフォーカスオフセットが、メモリ32に書き込まれることで、デフォーカスオフセットがカメラモジュールに設定される。
 そして、例えば、ある画素ブロック51内の検出画素53から得られた位相差から求められたデフォーカス量の補正は、その画素ブロック51の結節点のデフォーカスオフセットを用い、式(7)に従って行われる。
 なお、PDAF合焦位置誤差を求める処理は、複数回行うことができる。そして、その複数回の処理で得られたPDAF合焦位置誤差の平均値等を、デフォーカスオフセットとして採用することができる。
 <位相差信頼性>
 図23は、位相差信頼性の信頼性閾値と、イメージセンサ13のセンサーゲインとの関係の概要を示す図である。
 図23において、横軸は、イメージセンサ13のセンサーゲインを表し、縦軸は、位相差信頼性(の信頼性閾値)を表す。
 ここで、位相差AF方式のうちの、像面位相差AF方式は、デフォーカス量、ひいては、位相差の測距可能な範囲がそれほど広くない。そのため、デフォーカス量が大きく、位相差が測距可能な範囲を逸脱している場合(被写体が、大ぼけしている場合)、位相差AFを行うことが困難となる。
 この場合、位相差が測距可能な範囲内の値になるまで、レンズ位置を移動する必要があるが、レンズ位置を、合焦位置に向かう方向と逆方向に移動してしまうと、迅速なAFを行うことが困難となる。
 位相差信頼性は、位相差が測距可能な範囲内にあるかどうかを判定するための指標であり、その位相差から、精度の良いデフォーカス量を求めることができる程度としての信頼性を表す。
 位相差信頼性としては、例えば、式(8)で定義される値を採用することができる。
 位相差信頼性=Σ|(Yi+1-Yi)/(Xi+1-Xi)|
                        ・・・(8)
 ここで、式(8)の位相差信頼性は、例えば、ある1個の画素ブロック51を、注目ブロックとして、その注目ブロックに含まれる検出画素53から得られる位相差の位相差信頼性を表す。
 Xiは、注目ブロックのi番目の検出画素53の位置を表し、Yiは、位置Xiの検出画素53の画素値を表す。また、Σは、注目ブロック内の検出画素53のすべてについてのサメーションを表す。
 式(8)によれば、注目ブロックに含まれる検出画素53の画素値の変化の割合の総和が、その注目ブロックに含まれる検出画素53から得られる位相差の位相差信頼性として求められる。
 なお、式(8)の位相差信頼性については、本件出願人が先に提案した特開2010-139942号公報に記載されている。
 また、位相差信頼性としては、式(8)で求められる第1の値の他、左遮光像と右遮光像との一致性を表す第2の値や、撮影画像のコントラストを表す第3の値、第1ないし第3の値のうちの2以上に対応する値等を採用することができる。
 位相差信頼性として、コントラストを表す第3の値を採用することができるのは、コントラストが高いほど、精度の高い位相差を検出しやすいためである。
 位相差信頼性としては、例えば、式(8)で求められる値そのものや、式(8)で求められる値の最大値を100%として、式(8)で求められる値を正規化した値等を採用することができる。
 一方、イメージセンサ13のセンサーゲインには、画素で得られる画素値が飽和又は黒つぶれしないように、露出(露光)を調整する機能としてかけられるあらゆるゲインが含まれる。露出を調整する機能としては、例えば、絞りやシャッタスピード等を調整するAEがある。
 照度が低く、暗いシーンの撮影では、イメージセンサ13のセンサーゲインは高くなる。撮影画像のS/N(Signal to Noise ratio)は、イメージセンサ13の露光モード等にも依存するが、センサーゲインが高くなるほど、悪くなる。したがって、センサーゲインが高いほど、検出画素53の画素値にノイズが含まれやすく、その画素値から求められる位相差に、誤差が生じやすい。
 ここで、センサーゲインには、例えば、AEゲイン(AEとしてかけられるゲイン)のような、いわば1次的なセンサーゲインの他、例えば、シャーディング補正のような、いわば2次的なセンサーゲインがある。シャーディング補正とは、図11に示したような、全白色のチャートを撮影した場合でも、撮影画像の中央部に比較して、周辺部の輝度が落ちる特性を、一定の輝度の特性に修正する補正である。
 以上のように、センサーゲインが高いと、検出画素53の画素値から求められる位相差に、誤差が生じやすい。
 したがって、ある値の位相差信頼性が得られている位相差については、センサーゲインが小さい場合には、位相差を信頼しても良いが、センサーゲインが大きい場合には、位相差を信頼すべきでないことがある。
 本技術では、位相差信頼性を閾値処理するのに用いる信頼性閾値として、図23に示すように、センサーゲインの増加に対して増加する値を導入し、信頼性閾値より大きい位相差信頼性の位相差だけを、信頼することができると判定して、位相差AFに用いる。
 センサーゲインに対して一定値の信頼性閾値では、ある程度の位相差信頼性が得られている位相差については、その位相差が、センサーゲインが高く、誤差が生じやすい場合の位相差であっても、位相差が信頼することができると判定される。
 これに対して、センサーゲインの増加に対して増加する信頼性閾値によれば、ある程度の位相差信頼性が得られている位相差であっても、その位相差が、センサーゲインが高く、誤差が生じやすい場合の位相差であるときには、位相差が信頼することができると判定されることを防止することができる。
 信頼性閾値の算出では、例えば、各レンズ位置の所定のセンサーゲインに対する位相差信頼性が、画素ブロック51ごとに求められ、位相差信頼性の平均値や、中央値、最大値に所定の係数を乗じた値等が、各画素ブロック51の結節点の所定のセンサーゲインに対する信頼性閾値として求められる。
 以下、同様の処理を、複数のセンサーゲインに対して行うことで、各画素ブロック51の結節点について、複数のセンサーゲインそれぞれに対する信頼性閾値が求められる。
 なお、ある画素ブロック51の結節点において、あるセンサーゲインGに対する信頼性閾値が、そのセンサーゲインGより低いセンサーゲインG'に対する信頼性閾値よりも小さい場合には、センサーゲインGに対する信頼性閾値は、センサーゲインG'に対する信頼性閾値よりも大きい値に補正される。
 図24は、任意のセンサーゲインGに対する信頼性閾値の算出方法と、信頼性閾値を用いた、位相差の信頼性の判定方法とを説明する図である。
 図24のAは、任意のセンサーゲインGに対する信頼性閾値の算出方法を説明する図である。
 図24のAでは、4つのセンサーゲインG[0],G[1],G[2],G[3]それぞれに対する信頼性閾値TH[0],TH[1],TH[2],TH[3]が、後述する信頼性閾値設定処理によって、既に求められている。
 任意のセンサーゲインGに対する信頼性閾値THは、4つの信頼性閾値TH[0]ないしTH[3]を用いた補間によって求められる。
 図24のAでは、センサーゲインGは、センサーゲインG[2]とG[3]の間の値になっており、そのセンサーゲインGに対する信頼性閾値THは、センサーゲインG[2]に対する信頼性閾値TH[2]と、センサーゲインG[3]に対する信頼性閾値TH[3]との線形補間によって求められている。
 なお、信頼性閾値THを求める補間の方法は、線形補間に限定されるものではない。
 図24のBは、信頼性閾値を用いた、位相差の信頼性の判定方法を説明する図である。
 図24のBでは、現在のセンサーゲインが値Gであり、そのセンサーゲインGに対して、ある画素ブロック51の検出画素53から、値Rの位相差信頼性が求められている。
 また、図24のBでは、位相差信頼性Rが求められた画素ブロック51の結節点について、4つのセンサーゲインG[0]ないしG[3]それぞれに対する信頼性閾値は、それぞれ値TH[0]ないしTH[3]になっている。
 信頼性閾値を用いた、位相差の信頼性の判定では、位相差信頼性Rが求められた画素ブロック51の結節点について得られている信頼性閾値TH[0]ないしTH[3]を用いた補間により、センサーゲインGに対する信頼性閾値THが求められる。
 そして、位相差信頼性Rと、センサーゲインGに対する信頼性閾値THとの大小関係に基づいて、その位相差信頼性Rが求められた画素ブロック51の検出画素53から求められる位相差の信頼性が判定される。
 すなわち、位相差信頼性Rが信頼性閾値TH以下(、又は、未満)である場合には、位相差は、信頼性がないと判定される。また、位相差信頼性Rが信頼性閾値THより大(、又は、以上)である場合には、位相差は、信頼性があると判定される。
 <信頼性閾値設定処理>
 図25は、信頼性閾値をカメラモジュールに設定する信頼性閾値設定処理の例を説明するフローチャートである。
 信頼性閾値設定処理では、例えば、換算係数設定処理の場合と同様に、図18のスリット被写体を、信頼性閾値設定処理用の被写体として採用することができる。
 また、信頼性閾値設定処理では、例えば、換算係数設定処理と同様に、信頼性閾値は、画素ブロック51を構成する複数の画素を代表する代表点である結節点(図13)ごとに求められる。
 ステップS61において、メイン処理部14は、図14のステップS11と同様に、イメージセンサ13の駆動モードを設定し、処理は、ステップS62に進む。
 ステップS62では、メイン処理部14は、図14のステップS13と同様に、信頼性閾値設定処理用の被写体であるスリット被写体を撮影するにあたっての撮影条件を設定し、処理は、ステップS63に進む。
 ステップS63では、メイン処理部14は、図19のステップS23と同様に、フォーカス駆動部19を介して、フォーカスアクチュエータ23を制御することで、撮像光学系11Aのレンズ位置を、マクロ方向の位置からInf方向の位置までの間の複数の位置に順次移動させる。
 さらに、メイン処理部14は、各レンズ位置において、イメージセンサ13のセンサーゲインを、複数の値に順次設定する。
 ステップS63では、上述のように、撮像光学系11Aのレンズ位置が、複数の位置に順次移動されながら、各レンズ位置において、センサーゲインが、複数の値に順次設定されるが、その一方で、イメージセンサ13が、スリット被写体を撮影する。
 撮像光学系11Aのレンズ位置が、複数の位置のそれぞれに移動されたときに、複数のセンサーゲインのそれぞれで、イメージセンサ13により撮影された撮影画像は、センサ駆動部16を介して、メイン処理部14に供給される。
 メイン処理部14は、以上のように、複数のレンズ位置それぞれで撮影された、複数のセンサーゲインそれぞれの撮影画像の各画素ブロック51について、その画素ブロック51の検出画素の画素値から位相差信頼性を求める。
 その後、処理は、ステップS63からステップS64に進み、メイン処理部14は、各画素ブロック51の結節点について、複数のレンズ位置それぞれの位相差信頼性を用いて、複数のセンサーゲインそれぞれに対する信頼性閾値を求める。
 すなわち、メイン処理部14では、1個の画素ブロック51につき、複数のレンズ位置それぞれでの位相差信頼性が、複数のセンサーゲインそれぞれに対して求められている。メイン処理部14は、1個の画素ブロック51につき、複数のレンズ位置それぞれでの位相差信頼性を用いて、複数のセンサーゲインそれぞれに対する信頼性閾値が、図23で説明したようにして求められる。
 各画素ブロック51の結節点について、複数のセンサーゲインそれぞれに対する信頼性閾値が求められると、処理は、ステップS64からステップS65に進む。
 ステップS65では、メイン処理部14は、ステップS64で求められた信頼性閾値が、製造規格内の値であるかどうかを判定する。
 ステップS65において、信頼性閾値が、製造規格内の値でないと判定された場合、信頼性閾値設定処理は、終了する。この場合、カメラモジュールに欠陥がある可能性があるため、カメラモジュールは、例えば、検査に回される。
 一方、ステップS65において、信頼性閾値が、製造規格内の値であると判定された場合、処理は、ステップS66に進む。
 ステップS66では、メイン処理部14は、ステップS64で求められた各画素ブロック51の結節点についての複数のセンサーゲインそれぞれに対する信頼性閾値を、メモリ32に書き込み、信頼性閾値設定処理は、終了する。
 以上のように、各画素ブロック51の結節点についての複数のセンサーゲインそれぞれに対する信頼性閾値が、メモリ32に書き込まれることで、信頼性閾値がカメラモジュールに設定される。
 そして、例えば、ある画素ブロック51内の検出画素53から得られた位相差については、その位相差の位相差信頼性と、その画素ブロック51の結節点についての複数のセンサーゲインそれぞれに対する信頼性閾値とを用い、図24で説明したようにして、信頼性が判定される。
 <位相差オフセット>
 図26は、デフォーカス量と位相差との実際の関係を表す換算特性の例を示す図である。
 デフォーカス量と位相差とは、図8のBで説明したように、理想的には、線形の関係を有し、換算特性は、直線で表される。
 しかしながら、実際には、デフォーカス量及び位相差が大きくなると、図26に示すように、デフォーカス量と位相差と間の線形性が失われ、換算特性は、曲線になる。
 いま、理想的な直線の換算特性を、理想特性ということとする。位相差がある値P1である場合に、理想特性によれば、デフォーカス量は、位相差P1に、理想特性の傾きを表す換算係数aを乗じた値D1(=P1×a)になる。
 しかしながら、実際のデフォーカス量は、実際の換算特性に従い、理想特性から求められる値D1よりも小さい値D0になる。
 位相差P1に対し、理想特性を用いて、実際のデフォーカス量D0を求めるには、例えば、図26に示すような、横軸をデフォーカス量とし、縦軸を位相差とした2次元平面において、理想特性を、点(D0,P1)を通るように、横軸方向にオフセットしたオフセット特性を用いる必要がある。
 図27は、理想特性、オフセット特性、及び、コントラスト評価値の例を示す図である。
 デフォーカス量及び位相差が大きい場合、図26で説明したように、理想特性によれば、位相差P1に対して、実際のデフォーカス量D0より大きいデフォーカス量D1が求められる。
 したがって、デフォーカス量D1に従って、レンズ位置を移動すると、その移動後の位置は、合焦位置、すなわち、コントラスト評価値が最大になるレンズ位置を行き過ぎる。
 すなわち、撮像光学系11Aの実際のレンズ位置が、合焦位置から実際のデフォーカス量D0だけ離れた位置r0であり、位相差が値P1である場合に、理想特性によれば、位相差P1に対して、実際のデフォーカス量D0よりも大きいデフォーカス量D1が求められる。
 そして、レンズ位置の移動が、実際の位置r0から、理想特性から求められるデフォーカス量D1を0にするように行われる。その結果、レンズ位置は、合焦位置を通り過ぎる。
 位相差AFの精度を向上させるには、以上のような、デフォーカス量及び位相差が大きくなったときに、換算特性が非線形になることに起因して、実際のデフォーカス量よりも大きなデフォーカス量が算出されることを防止する必要がある。
 そこで、本技術では、換算係数が表す線形の理想特性と、位相差とデフォーカス量との実際の関係を表す非線形の特性(以下、実際特性ともいう)との間の位相差のオフセットである位相差オフセットを用いて、位相差を補正する。
 そして、本技術では、位相差オフセットを用いた補正した補正後の位相差を用いて、デフォーカス量を算出することで、実際のデフォーカス量よりも大きなデフォーカス量が算出されることを防止し、ひいては、位相差AFの精度を向上させる。
 図28は、位相差オフセットの算出と、位相差オフセットを用いた位相差の補正とを説明する図である。
 位相差オフセットの算出では、撮像光学系11Aのレンズ位置を、複数の位置に移動することで、複数のレンズ位置それぞれについて、実際の位相差とデフォーカス量とのセットが求められる。
 ここで、実際の位相差とデフォーカス量とを、それぞれ、測定位相差と測定デフォーカス量ともいう。
 位相差オフセットの算出では、その後、複数のレンズ位置を、順次、注目位置に選択する。図28では、測定デフォーカス量が値D11になっているレンズ位置が、注目位置に選択されている。
 位相差オフセットの算出では、理想特性において、注目位置の測定デフォーカス量D11に対する位相差(以下、理想位相差ともいう)P10が求められ、理想特性から、測定デフォーカス量D11とセットになっている測定位相差P11を減算することで、測定位相差P11に対する位相差オフセットPoff11が求められる。
 以上のようにして、複数のレンズ位置それぞれの測定位相差に対して、位相差オフセットが求められる。
 位相差オフセットを用いた位相差の補正では、複数のレンズ位置それぞれの測定位相差に対して求められた位相差オフセットを用いた補間によって、検出画素53の画素値から得られた位相差、すなわち、例えば、図28の位相差P13に対する位相差オフセットPoff13が求められる。
 そして、位相差P13から、位相差オフセットPoff13(の絶対値)を減算することで、位相差P13が値P13-Poff13に補正される。
 以上のようにして、補正後の位相差P13-Poff13が得られた後は、理想特性を用いて、補正後の位相差P13-Poff13に対するデフォーカス量D13が求められる。
 デフォーカス量D13は、実際特性において、位相差P13に対するデフォーカス量になっており、したがって、位相差オフセットを用いた位相差の補正を行うことにより、理想特性を用いて、実際のデフォーカス量を求めることができる。
 すなわち、位相差オフセットによれば、位相差に対して、理想特性を用いて、実際特性のデフォーカス量を求めることができる。
 なお、以上のように、位相差オフセットを用いた位相差の補正を行うには、複数のレンズ位置それぞれの測定位相差に対する位相差オフセット(以下、測定位相差オフセット群ともいう)を、カメラモジュールに設定しておく必要がある。
 測定位相差オフセット群の、カメラモジュールへの設定は、例えば、測定位相差オフセット群を、メモリ32に記憶させることや、測定位相差オフセット群を、CPU31が実行するプログラムに含める(埋め込む)こと等によって行うことができる。
 <メモリ32の記憶内容>
 図29は、図1のメモリ32の記憶内容の一部の例を示す図である。
 メモリ32には、図19の換算係数設定処理によって、結節点[n]ごとの換算係数a[n]が記憶される(n=0,1,2...,N)。
 ここで、図29では、結節点[n]の総数N+1が25になっている。
 メモリ32には、図22のデフォーカスオフセット設定処理によって、結節点[n]ごとのデフォーカスオフセットd[n]が記憶される。
 さらに、メモリ32には、図25の信頼性閾値設定処理によって、結節点[n]ごとの、複数のセンサーゲインそれぞれに対する信頼性閾値TH[p]が記憶される(p=0,1,2...,P)。
 ここで、図29では、1の結節点[n]につき、4個のセンサーゲインに対する4=P+1個の信頼性閾値TH[0]ないしTH[3]が、メモリ32に記憶されている。
 <位相差AF処理部17の構成例>
 図30は、図1の位相差AF処理部17の構成例を示すブロック図である。
 図30において、位相差AF処理部17は、系列分離部81、信頼性判定部82、乗算部83及び84、位相差AF演算部85、AF枠設定部86、並びに、取得部87を有する。
 系列分離部81には、センサ駆動部16から、イメージセンサ13が出力する画素値のうちの、検出画素53の画素値が供給される。
 ここで、センサ駆動部16は、黒レベルを補正する図示せぬ黒レベル補正部を有し、その黒レベル補正部で、検出画素53の画素値を補正してから、系列分離部81に供給する。
 系列分離部81は、そこに供給される検出画素53の画素値を、左遮光画素53Lの画素値の系列である左遮光系列と、右遮光画素53Rの画素値の系列である右遮光系列とに分離する。
 そして、系列分離部81は、左遮光系列を、乗算部83に供給するとともに、右遮光系列を、乗算部84に供給する。
 信頼性判定部82は、撮影画像上のAF枠内の検出画素53の画素値から得られる位相差の位相差信頼性であるAF枠位相差信頼性を求める。
 さらに、信頼性判定部82は、AF枠位相差信頼性と、取得部87から供給される、メモリ32に記憶された信頼性閾値とを用いて、AF枠内の検出画素53の画素値から得られる位相差の信頼性を判定する。
 そして、信頼性判定部82は、AF枠内の検出画素53の画素値から得られる位相差の信頼性の有無の判定結果を表す判定情報を、位相差AF演算部85、その他の必要なブロックに供給する。
 ここで、AF枠は、AFに用いる撮影画像の領域を囲む枠であり、メイン処理部14が設定する。AF枠は、固定の位置に設定することもできるし、可変の位置に設定することもできる。例えば、AF枠は、ユーザが指示する位置に設定することや、顔検出を行い、顔が映っている位置に設定すること等ができる。また、AF枠は、1箇所、又は、複数箇所に設定することができる。
 乗算部83には、系列分離部81から、左遮光系列が供給される他、取得部87から、メモリ32に記憶された、左遮光画素53Lについての調整ゲインが供給される。
 ここで、メモリ32には、図29で説明したように、換算係数a[n]、デフォーカスオフセットd[n]、及び、信頼性閾値TH[p]が記憶される。さらに、メモリ32には、結節点[n]ごとの調整ゲインg[n]、位相差オフセット(測定位相差オフセット群)、移動割合テーブル、及び、レンズ位置オフセットテーブルが記憶される。
 すなわち、メモリ32には、図14の調整ゲイン設定処理によって、結節点[n]ごと(又は検出画素53ごと)の左遮光画素用の調整ゲイン(左遮光系列調整ゲイン)gl[n]、及び、右遮光画素用の調整ゲイン(右遮光系列調整ゲイン)gr[n]が記憶される。
 また、メモリ32には、図28で説明したように、位相差オフセット(測定位相差オフセット群)が記憶される。
 さらに、メモリ32には、移動割合テーブル、及び、レンズ位置オフセットテーブルが記憶される。
 移動割合テーブルには、複数の画素の位置としての、例えば、結節点ごとに、その結節点が代表する画素ブロック51内の検出画素53を用いて、位相差AFを行う場合の移動割合が登録されている。
 移動割合とは、位相差AFにおいて、位相差に対して求められるデフォーカス量のどの程度の割合に従って、撮像光学系11Aのレンズ位置を移動させるかを表す。例えば、ある結節点の移動割合が90%であれば、その結節点が代表する画素ブロック51内の検出画素53から得られる位相差に対して求められるデフォーカス量の90%に従って、レンズ位置が移動される。
 移動割合は、位相差とレンズ位置との関係が線形でない場合等に有効である。
 レンズ位置オフセットテーブルには、複数のレンズ位置それぞれと、そのレンズ位置からレンズを移動するときのレンズ位置オフセットとが対応付けて登録されている。
 レンズ位置オフセットは、そのレンズ位置オフセットと対応付けられているレンズ位置からレンズを移動するときに、デフォーカス量から得られるレンズ移動量を補正する補正量である。
 カメラモジュールから被写体までの距離(被写体距離)と、レンズ位置との関係は、非線形である。この、被写体距離とレンズ位置との関係が非線形であることに起因して、デフォーカス量から得られるレンズ移動量だけ、レンズ位置を移動すると、レンズ位置が行き過ぎる(合焦位置を飛び越える)ことがある。レンズ位置オフセットによって、デフォーカス量から得られるレンズ移動量を補正することで、レンズ位置が行き過ぎることを防止することができる。
 乗算部83は、系列分離部81から供給される左遮光系列を構成する、左遮光画素53Lの画素値に、その左遮光画素53Lを含む画素ブロック51の結節点の調整ゲインを乗算することで、図12で説明したように、左遮光画素53Lの画素値を補正する。
 そして、乗算部83は、左遮光画素53Lの補正後の画素値で構成される左遮光系列を、位相差AF演算部85に供給する。
 乗算部84には、系列分離部81から、右遮光系列が供給される他、取得部87から、メモリ32に記憶された、右遮光画素53Rについての調整ゲインが供給される。
 乗算部84は、系列分離部81から供給される右遮光系列を構成する、右遮光画素53Rの画素値に、その右遮光画素53Rを含む画素ブロック51の結節点の調整ゲインを乗算することで、図12で説明したように、右遮光画素53Rの画素値を補正する。
 そして、乗算部84は、右遮光画素53Rの補正後の画素値で構成される右遮光系列を、位相差AF演算部85に供給する。
 位相差AF演算部85は、乗算部83及び84それぞれからの左遮光系列及び右遮光系列を構成する画素値のうちの、AF枠内の検出画素53の画素値を用いて求められる位相差(以下、AF枠の位相差ともいう)の信頼性を、信頼性判定部82からの判定情報から認識する。
 AF枠の位相差の信頼性がない場合、位相差AF演算部85は、例えば、AF枠設定部86に、AF枠の変更を要求する。
 AF枠の位相差の信頼性がある場合、位相差AF演算部85は、位相差AF演算を行う。
 すなわち、位相差AF演算部85は、乗算部83及び84それぞれからの左遮光系列及び右遮光系列を構成する画素値から、AF枠の位相差を求める。
 さらに、位相差AF演算部85は、取得部87から供給される、メモリ32に記憶された情報を適宜用いながら、AF枠の位相差に対するデフォーカス量を求め、そのデフォーカス量から、撮像光学系11Aのレンズ位置を移動するレンズ移動量を求める。
 そして、位相差AF演算部85は、レンズ移動量を、メイン処理部14に供給する。メイン処理部14は、フォーカス駆動部19を制御することにより、位相差AF演算部85からのレンズ移動量だけ、撮像光学系11Aのレンズ位置を移動させる。
 AF枠設定部86は、位相差AF演算部85からの要求等に応じて、AF枠を設定し、そのAF枠の情報を、必要なブロックに供給する。
 取得部87は、メモリ32に記憶された情報を取得し(読み出し)、必要なブロックに供給する。
 なお、図30では、図が煩雑になるのを避けるため、取得部87から、位相差AF演算部85に情報を供給する接続線等の一部の接続線については、図示を省略してある。
 <位相差AF演算部85の処理>
 図31は、図30の位相差AF処理部17の処理を説明する図である。
 位相差AF処理部17において、信頼性判定部82は、メモリ32に記憶された結節点ごとの、複数のセンサーゲインに対する信頼性閾値を用いて補間を行うことにより、AF枠の、例えば、重心等の、AF枠を代表する代表点の、複数のセンサーゲインに対する信頼性閾値を求める。
 さらに、信頼性判定部82は、AF枠を代表する代表点の、複数のセンサーゲインに対する信頼性閾値を用いて補間を行うことにより、現在のセンサーゲインに対する信頼性閾値を求める。
 また、位相差AF演算部85において、後述するようにAF枠の位相差の位相差信頼性が求められるが、信頼性判定部82は、そのAF枠の位相差の位相差信頼性を、例えば、AF枠内の検出画素53の画素値を用い、式(8)等に従って算出する。
 そして、信頼性判定部82は、AF枠の位相差の位相差信頼性と、現在のセンサーゲインに対する信頼性閾値とを比較することにより、AF枠の位相差の信頼性を判定し、その判定結果を表す判定情報を、位相差AF演算部85に供給する。
 判定情報が、AF枠の位相差の信頼性があることを表している場合、位相差AF演算部85は、AF枠内の検出画素53の画素値を用いて、そのAF枠内の左遮光像と右遮光像との相対的な位置関係を表す位相差を、AF枠の位相差として求める。
 さらに、位相差AF演算部85は、メモリ32に記憶された結節点ごとの換算係数を用いて補間を行うことにより、AF枠の代表点の換算係数を求める。
 同様に、位相差AF演算部85は、メモリ32に記憶された結節点ごとのデフォーカスオフセットを用いて補間を行うことにより、AF枠の代表点のデフォーカスオフセットを求める。
 ここで、AF枠の代表点の換算係数を求める補間は、すべての結節点の換算係数を用いて行うこともできるし、AF枠内の結節点の換算係数や、AF枠内の結節点とその周辺の結節点との換算係数等の、一部の結節点の換算係数を用いて行うこともできる。
 AF枠の代表点の、現在のセンサーゲインに対する信頼性閾値を求める補間や、AF枠の代表点のデフォーカスオフセットを求める補間についても、同様である。
 位相差AF演算部85は、AF枠の位相差を、取得部87から供給される、メモリ32に記憶された位相差オフセットに従って補正し、その結果得られるAF枠の補正後の位相差と、AF枠の代表点の換算係数とを用い、式(9)に従って、AF枠のデフォーカス量を求める。
 AF枠のデフォーカス量=AF枠の代表点の換算係数×AF枠の補正後の位相差
                        ・・・(9)
 さらに、位相差AF演算部85は、式(9)のAF枠のデフォーカス量を、AF枠の代表点のデフォーカスオフセットを用い、式(10)に従って、AF枠の補正後のデフォーカス量に補正する。
 AF枠の補正後のデフォーカス量=AF枠のデフォーカス量+AF枠の代表点のデフォーカスオフセット
                        ・・・(10)
 また、位相差AF演算部85は、取得部87から供給される、メモリ32に記憶された移動割合テーブルに登録された結節点ごとの移動割合を用いて補間を行うことにより、AF枠の代表点の移動割合を求める。AF枠の代表点の移動割合を求める補間は、例えば、上述の、AF枠の代表点の換算係数を求める補間と同様に行うことができる。
 さらに、位相差AF演算部85は、取得部87から供給される、メモリ32に記憶されたレンズ位置オフセットテーブルに登録された、複数のレンズ位置それぞれごとのレンズ位置オフセットを用いて補間を行うことにより、現在のレンズ位置のレンズ位置オフセットを求める。
 そして、位相差AF演算部85は、式(10)のAF枠の補正後のデフォーカス量、AF枠の代表点の移動割合、及び、現在のレンズ位置のレンズ位置オフセットを用い、式(11)に従って、レンズ移動量を求め、メイン処理部14に供給する。
 レンズ移動量=AF枠の補正後のデフォーカス量×AF枠の代表点の移動割合-現在のレンズ位置のレンズ位置オフセット
                        ・・・(11)
 <位相差AF処理部17によるレンズ移動量算出処理>
 図32及び図33は、図30の位相差AF処理部17が行う、レンズ移動量を算出するレンズ移動量算出処理の例を説明するフローチャートである。
 ステップS101において、AF枠設定部86は、1以上のAF枠を設定し、処理は、ステップS102に進む。
 ここで、ステップS101において、複数のAF枠が設定された場合には、以降の処理は、特に断らない限り、その複数のAF枠のそれぞれについて行われる。
 ステップS102では、系列分離部81が、センサ駆動部16から、イメージセンサ13が出力する画素値のうちの、AF枠内の検出画素53の画素値を取得し、処理は、ステップS103に進む。
 ステップS103では、信頼性判定部82は、AF枠の位相差の位相差信頼性を、例えば、系列分離部81が取得したAF枠内の検出画素53の画素値を用い、式(8)等に従って算出し、処理は、ステップS104に進む。
 ステップS104では、取得部87が、メモリ32に記憶された結節点ごとの、複数のセンサーゲインに対する信頼性閾値を取得し、信頼性判定部82に供給する。信頼性判定部82は、取得部87からの、結節点ごとの、複数のセンサーゲインに対する信頼性閾値を用いた補間により、現在のセンサーゲインに対する信頼性閾値を求め(取得し)、処理は、ステップS104からステップS105に進む。
 ステップS105では、信頼性判定部82は、ステップS103で求められたAF枠の位相差の位相差信頼性と、ステップS104で求められた現在のセンサーゲインに対する信頼性閾値とを比較することにより、AF枠の位相差の信頼性の有無を判定する。
 ステップS105において、AF枠の位相差の信頼性がないと判定された場合、すなわち、AF枠の位相差の位相差信頼性が、現在のセンサーゲインに対する信頼性閾値よりも大でない場合、処理は、ステップS101に戻る。この場合、ステップS101において、AF枠設定部86は、AF枠を新たに設定し、以下、同様の処理が繰り返される。
 一方、ステップS105において、AF枠の位相差の信頼性があると判定された場合、すなわち、AF枠の位相差の位相差信頼性が、現在のセンサーゲインに対する信頼性閾値よりも大である場合、処理は、ステップS106に進む。
 ここで、AF枠設定部86において、複数のAF枠が設定されている場合には、その複数のAF枠のすべてについて、AF枠の位相差の信頼性がない場合に、処理は、ステップS105からステップS101に戻る。
 AF枠設定部86において設定された複数のAF枠のうちの、1以上のAF枠について、AF枠の位相差の信頼性がある場合には、位相差の信頼性があるAF枠について、ステップS106以降の処理が行われる。
 ステップS106では、系列分離部81は、ステップS102で取得したAF枠内の検出画素53の画素値を、左遮光画素53Lの画素値の系列である左遮光系列と、右遮光画素53Rの画素値の系列である右遮光系列とに分離する。
 そして、系列分離部81は、左遮光系列を、乗算部83に供給するとともに、右遮光系列を、乗算部84に供給し、処理は、ステップS106からステップS107に進む。
 ステップS107では、取得部87が、AF枠内の結節点の調整ゲインを、メモリ32から取得する。さらに、取得部87は、AF枠内の結節点の調整ゲインのうちの、左遮光画素53Lについての調整ゲインを、乗算部83に供給するとともに、右遮光画素53Rについての調整ゲインを、乗算部84に供給し、処理は、ステップS107からステップS108に進む。
 ステップS108では、乗算部83は、系列分離部81からの左遮光系列を構成する、左遮光画素53Lの画素値に、その左遮光画素53Lを含む画素ブロック51の結節点の調整ゲインを乗算することで、左遮光画素53Lの画素値を補正する。
 そして、乗算部83は、左遮光画素53Lの補正後の画素値で構成される左遮光系列を、位相差AF演算部85に供給する。
 さらに、ステップS108では、乗算部84は、系列分離部81からの右遮光系列を構成する、右遮光画素53Rの画素値に、その右遮光画素53Rを含む画素ブロック51の結節点の調整ゲインを乗算することで、右遮光画素53Rの画素値を補正する。
 そして、乗算部84は、右遮光画素53Rの補正後の画素値で構成される右遮光系列を、位相差AF演算部85に供給し、処理は、ステップS109に進む。
 ここで、左遮光画素53Lの画素値の補正では、その左遮光画素53Lの(位置の)調整ゲインを、結節点の調整ゲインを用いた補間によって求め、その補間により求められた調整ゲインの補間値を用いて、左遮光画素53Lの画素値の補正を行うことができる。右遮光画素53Rの画素値の補正も、同様である。
 ステップS109では、位相差AF演算部85は、乗算部83及び84それぞれからの左遮光系列及び右遮光系列を構成する画素値(調整ゲインを用いて補正した補正後の画素値)から、AF枠の位相差を求め、処理は、ステップS110に進む。
 ステップS110では、取得部87は、メモリ32から、位相差オフセットを取得し、位相差AF演算部85に供給して、処理は、ステップS111に進む。
 ステップS111では、位相差AF演算部85は、取得部87からの位相差オフセットを用いた補間により、AF枠の位相差に対する位相差オフセットを求める。さらに、位相差AF演算部85は、AF枠の位相差を、その位相差に対する位相差オフセットを用い、図28で説明したように補正して、処理は、ステップS111から、図33のステップS121に進む。
 図33のステップS121では、取得部87は、AF枠内の結節点の換算係数、及び、デフォーカスオフセットを、メモリ32から取得し、位相差AF演算部85に供給して、処理は、ステップS122に進む。
 ステップS122では、位相差AF演算部85は、取得部87からのAF枠内の結節点の換算係数を用いた補間により、AF枠の代表点の換算係数を求める。そして、位相差AF演算部85は、AF枠の位相差を位相差オフセットに従って補正したAF枠の補正後の位相差と、AF枠の代表点の換算係数とを用い、上述の式(9)に従って、AF枠のデフォーカス量を求め、処理は、ステップS122からステップS123に進む。
 ステップS123では、位相差AF演算部85は、取得部87からのAF枠内の結節点のデフォーカスオフセットを用いた補間により、AF枠の代表点のデフォーカスオフセットを求める。そして、位相差AF演算部85は、式(9)のAF枠のデフォーカス量を、AF枠の代表点のデフォーカスオフセットを用い、上述の式(10)に従って、AF枠の補正後のデフォーカス量に補正して、処理は、ステップS123からステップS124に進む。
 ステップS124では、位相差AF演算部85は、レンズ移動量の算出に用いるAF枠を選択し、処理は、ステップS125に進む。
 ここで、AF枠設定部86で設定され、かつ、位相差の信頼性があるAF枠(以下、選択対象AF枠ともいう)が、1つだけの場合には、その1つの選択対象AF枠が、レンズ移動量の算出に用いるAF枠(以下、算出用AF枠ともいう)として選択される。
 選択対象AF枠が、複数ある場合には、その複数の選択対象AF枠のうちの、1つの選択対象AF枠が、例えば、ユーザの操作等に応じて、算出用AF枠として選択される。
 ステップS125では、取得部87は、メモリ32から移動割合テーブルと、レンズ位置オフセットテーブルを取得し、位相差AF演算部85に供給する。
 位相差AF演算部85は、取得部87からの移動割合テーブルに登録された結節点ごとの移動割合を用いた補間により、AF枠の代表点の移動割合を求め(取得し)、処理は、ステップS125からステップS126に進む。
 ステップS126では、位相差AF演算部85は、取得部87からのレンズ位置オフセットテーブルに登録された、複数のレンズ位置それぞれごとのレンズ位置オフセットを用いた補間により、現在のレンズ位置のレンズ位置オフセットを求め、処理は、ステップS127に進む。
 ステップS127では、位相差AF演算部85は、式(10)のAF枠の補正後のデフォーカス量、AF枠の代表点の移動割合、及び、現在のレンズ位置のレンズ位置オフセットを用い、上述の式(11)に従って、レンズ移動量を求める。
 そして、位相差AF演算部85は、レンズ移動量を、メイン処理部14に供給し、レンズ移動量算出処理は、終了する。
 なお、図32及び図33では、AF枠の補正後のデフォーカス量、AF枠の代表点の移動割合、及び、現在のレンズ位置のレンズ位置オフセットを用い、式(11)に従って、レンズ移動量を求めることとしたが、レンズ移動量としては、式(10)のAF枠の補正後のデフォーカス量をそのまま採用することができる。
 例えば、AFとして、位相差AFのみを行う場合には、レンズ移動量としては、式(10)のAF枠の補正後のデフォーカス量をそのまま採用することができる。
 また、例えば、AFとして、ハイブリッドAFを採用する場合には、そのハイブリッドAFで、最初に行われる位相差AFにおいて、レンズ移動量として、式(11)のレンズ移動量を採用することができる。
 式(11)のレンズ移動量は、移動割合と、レンズ位置オフセットとによって、式(10)のデフォーカス量としてのレンズ移動量が補正された値になっている。そのため、位相差AFにおいて、式(11)のレンズ移動量を使用する場合には、式(10)のデフォーカス量としてのレンズ移動量を使用する場合に比較して、レンズ位置が合焦位置を飛び越える可能性を低くすることができる。
 この場合、レンズ位置は、合焦位置の直前まで、位相差AFで移動され、その後、合焦位置まで、コントラストAFで移動される。したがって、コントラストAFでは、最初に、レンズ位置を、位相差AFと同様の方向に移動すれば良く、ハイブリッドAFに要するトータルの時間が長くなることを抑制することができる。
 ここで、カメラモジュールの向きによっては、撮像光学系11Aのレンズ位置が変動することがある。すなわち、例えば、カメラモジュールが下向きや上向きになっている場合には、撮像光学系11Aの自重により、レンズ位置が、カメラモジュールが水平方向を向いている場合の位置から移動することがある。
 そこで、式(11)のレンズ移動量については、カメラモジュールの姿勢を検出し、そのカメラモジュールの姿勢(例えば、下向きや上向き等)によって、上述のようなレンズ位置が移動する分の補正を行うことができる。
 なお、ハイブリッドAFを行う場合において、位相差AFで用いられる位相差の信頼性がないときには、コントラストAFを行って、レンズ位置を移動させることができる。
 この場合、コントラストAFだけで、レンズ位置を合焦位置まで移動させることができる。あるいは、信頼性のある位相差が得られるまで、コントラストAFを行い、信頼性のある位相差が得られた後は、その位相差を用いて、位相差AFを行い、その後に、コントラストAFを行って、レンズ位置を合焦位置に移動させることができる。
 <像高ごとの情報の記憶>
 図34は、像高を説明する図である。
 上述の場合には、イメージセンサ13の受光面50を画素グループとしての矩形の画素ブロックに分割したときの、その画素ブロックを代表する点である結節点ごとに、換算係数、デフォーカスオフセット、及び、信頼性閾値を求めることとしたが、換算係数、デフォーカスオフセット、及び、信頼性閾値は、その他、例えば、受光面50の中心からの距離である像高が所定の範囲内の複数の画素からなる画素グループを代表する点である像高代表点ごとに求めることができる。
 ここで、本実施の形態において、像高とは、受光面50の中心(受光面50と光軸L(図1)との交点)から、像点までの距離を意味する。
 受光面50において、中心の位置の像高を、像高0割いうとともに、中心から最も離れている対角の位置の像高を、像高10割ということとすると、中心から横方向に最も離れている位置の像高は、像高約6.42割になる。
 例えば、受光面50を、C×C画素の矩形の画素ブロックに分割し、その画素ブロックを代表する結節点ごとに、換算係数、デフォーカスオフセット、及び、信頼性閾値を求める場合と、受光面50を、中心からC画素ずつ増加する像高に区切り、ある像高から、次の像高までのドーナツ状の領域の画素からなる画素グループを代表する像高代表点ごとに、換算係数、デフォーカスオフセット、及び、信頼性閾値を求める場合とでは、結節点ごとに求める方が、像高代表点ごとに求める場合よりも、精度の高いデフォーカス量を求めることができ、高精度の位相差AFを行うことができる。
 但し、換算係数等を、像高代表点ごとに求める場合には、結節点ごとに求める場合よりも、換算係数等を記憶するメモリ32の記憶容量を少なくすることができる。
 なお、換算係数、デフォーカスオフセット、及び、信頼性閾値以外の、結節点ごとに求めることとした情報についても、換算係数、デフォーカスオフセット、及び、信頼性閾値と同様に、像高代表点ごとに求めることができる。
 以上のように、本技術では、結節点(や像高代表点)ごとに求められている換算係数、デフォーカスオフセット、及び、信頼性閾値を取得し、信頼性閾値を用いて、位相差の信頼性を判定する。そして、位相差の信頼性がある場合には、換算係数を用いて、信頼性がある位相差を、デフォーカス量に変換し、デフォーカスオフセットを用いて、デフォーカス量を補正する位相差AF演算を行う。
 したがって、個体ばらつきが低減された、精度の高いデフォーカス量を求めることができるので、位相差AFの精度を向上させることができる。
 さらに、位相差AFだけで、コントラストAFと同様な精度のAFを行うこと、すなわち、レンズ位置を合焦位置に移動させることが可能となる。
 あるいは、位相差AFで、レンズ位置を、ほぼ合焦位置に移動することができ、ハイブリッドAFにおいて、その後に行われるコントラストAFの時間を短縮し、ひいては、ハイブリッドAFに要する全体の時間を短縮することができる。
 また、本技術では、換算係数等を結節点等ごとに求めるので、受光面50の位置によってばらつく位相差やデフォーカス量の調整(補正)等の、位相差AFに関する個体調整を正確に行うことができる。さらに、本技術では、例えば、換算係数等は、撮像光学系11Aを設けていない状態で求め、位相差AFは、撮像光学系11Aを設けた状態で行うことができる。
 さらに、本技術では、位相差の信頼性が、結節点ごとの、イメージセンサ13の現在のセンサーゲインに対して求められた信頼性閾値を用いて判定されるので、位相差の信頼性の判定精度を向上させることができる。そして、信頼性のある位相差を用いて、位相差AFが行われるので、高精度の位相差AFを行うことができ、かかる位相差AFを用いて、ハイブリッドAFを行う場合には、ハイブリッドAFに要する全体の時間を短縮することができる。
 また、本技術によれば、結節点ごとのデフォーカスオフセットによって、デフォーカス量を補正するので、ハイブリッドAFにおいて、位相差AFにより、コントラスト評価値が最大になる位置に近い位置に、レンズ位置を移動することができる。その結果、ハイブリッドAFの高速化を図ることができる。
 さらに、本技術によれば、結節点ごとの換算係数を用いて、位相差をデフォーカス量に変換するので、精度の高いデフォーカス量を求めることができる。その結果、位相差AFの精度を向上させることができる。
 <カメラモジュールの使用例>
 図35は、上述のカメラモジュールを使用する使用例を示す図である。
 上述したカメラモジュールは、例えば、以下のように、可視光や、赤外光、紫外光、X線等の光をセンシングする様々な電子機器に使用することができる。
 ・ディジタルカメラや、カメラ機能付きの携帯機器等の、鑑賞の用に供される画像を撮影する電子機器
 ・自動停止等の安全運転や、運転者の状態の認識等のために、自動車の前方や後方、周囲、車内等を撮影する車載用センサ、走行車両や道路を監視する監視カメラ、車両間等の測距を行う測距センサ等の、交通の用に供される電子機器
 ・ユーザのジェスチャを撮影して、そのジェスチャに従った機器操作を行うために、TVや、冷蔵庫、エアーコンディショナ等の家電に供される電子機器
 ・内視鏡や、赤外光の受光による血管撮影を行う装置等の、医療やヘルスケアの用に供される電子機器
 ・防犯用途の監視カメラや、人物認証用途のカメラ等の、セキュリティの用に供される電子機器
 ・肌を撮影する肌測定器や、頭皮を撮影するマイクロスコープ等の、美容の用に供される電子機器
 ・スポーツ用途等向けのアクションカメラやウェアラブルカメラ等の、スポーツの用に供される電子機器
 ・畑や作物の状態を監視するためのカメラ等の、農業の用に供される電子機器
 なお、本技術の実施の形態は、上述した実施の形態に限定されるものではなく、本技術の要旨を逸脱しない範囲において種々の変更が可能である。
 また、本明細書に記載された効果はあくまで例示であって限定されるものではなく、他の効果があってもよい。
 なお、本技術は、以下のような構成をとることができる。
 <1>
  撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、
  位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、
  前記位相差の信頼性の有無を判定するための信頼性閾値と
 を取得する取得部と、
 前記信頼性閾値を用いて、前記位相差の信頼性を判定する信頼性判定部と、
 前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行う演算部と
 を備え、
 前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、
 前記信頼性判定部は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて、前記位相差の信頼性を判定し、
 前記演算部は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて、前記位相差AF演算を行い、
 前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有する
 信号処理装置。
 <2>
 前記換算係数は、複数のレンズ位置の前記デフォーカス量と前記位相差とから求められる
 <1>に記載の信号処理装置。
 <3>
 前記デフォーカスオフセットは、前記撮像素子で所定の被写体を撮影することにより得られる前記位相差AF方式の合焦位置と、前記コントラストAF方式の合焦位置とのレンズ位置の差である
 <1>又は<2>に記載の信号処理装置。
 <4>
 前記信頼性閾値は、前記撮像素子の所定のセンサーゲインに対して求められ
 前記信頼性判定部は、
  前記所定のセンサーゲインに対する前記信頼性閾値から、前記撮像素子の現在のセンサーゲインに対する信頼性閾値を求め、
  前記撮像素子の現在のセンサーゲインに対する信頼性閾値を用いて、前記位相差の信頼性を判定する
 <1>ないし<3>のいずれかに記載の信号処理装置。
 <5>
 前記演算部は、調整ゲインを用いて前記検出画素の画素値を補正した補正後の画素値から求められる前記位相差を用いて、前記位相差AF演算を行い、
 前記調整ゲインは、前記撮像素子で所定の被写体を撮影することにより得られる、前記検出画素以外の画素である通常画素の画素値と、前記検出画素の画素値との比である
 <1>ないし<4>のいずれかに記載の信号処理装置。
 <6>
 前記演算部は、
  前記換算係数が表す線形の特性と、前記位相差と前記デフォーカス量との関係を表す非線形の特性との間の位相差のオフセットである位相差オフセットを用いて、前記位相差を補正し、
  補正後の前記位相差を用いて、前記位相差AF演算を行う
 <1>ないし<5>のいずれかに記載の信号処理装置。
 <7>
 前記代表点は、前記撮像素子の受光面を前記画素グループとしての矩形のブロックに分割したときの、そのブロックを代表する点である結節点である
 <1>ないし<6>のいずれかに記載の信号処理装置。
 <8>
 前記代表点は、前記撮像素子の受光面の中心からの距離である像高が所定の範囲内の画素の画素グループを代表する点である
 <1>ないし<6>のいずれかに記載の信号処理装置。
 <9>
 前記代表点ごとの前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、メモリに記憶されている
 <1>ないし<8>のいずれかに記載の信号処理装置。
 <10>
  撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、
  位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、
  前記位相差の信頼性の有無を判定するための信頼性閾値と
 を取得することと、
 前記信頼性閾値を用いて、前記位相差の信頼性を判定することと、
 前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行うことと
 を含み、
 前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、
 前記位相差の信頼性の判定は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて行われ、
 前記AF演算は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて行われ、
 前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有する
 信号処理方法。
 <11>
 前記換算係数が表す線形の特性と、前記位相差と前記デフォーカス量との関係を表す非線形の特性との間の位相差のオフセットである位相差オフセットを用いて、前記位相差を補正し、
 補正後の前記位相差を用いて、前記位相差AF演算を行う
 請求項10に記載の信号処理方法。
 <12>
  撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、
  位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、
  前記位相差の信頼性の有無を判定するための信頼性閾値と
 を取得する取得部と、
 前記信頼性閾値を用いて、前記位相差の信頼性を判定する信頼性判定部と、
 前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行う演算部と
 して、コンピュータを機能させるためのプログラムであり、
 前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、
 前記信頼性判定部は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて、前記位相差の信頼性を判定し、
 前記演算部は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて、前記位相差AF演算を行い、
 前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有する
 プログラム。
 <13>
 前記演算部は、
  前記換算係数が表す線形の特性と、前記位相差と前記デフォーカス量との関係を表す非線形の特性との間の位相差のオフセットである位相差オフセットを用いて、前記位相差を補正し、
  補正後の前記位相差を用いて、前記位相差AF演算を行う
 <12>に記載のプログラム。
 <14>
 光を集光する撮像光学系と、
 前記撮像光学系からの光を受光し、画像を撮影する撮像素子と、
 前記撮像素子が出力する信号を処理する信号処理部と
 を備え、
 前記信号処理部は、
  撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、
  位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、
  前記位相差の信頼性の有無を判定するための信頼性閾値と
 を取得する取得部と、
 前記信頼性閾値を用いて、前記位相差の信頼性を判定する信頼性判定部と、
 前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行う演算部と
 を有し、
 前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、
 前記信頼性判定部は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて、前記位相差の信頼性を判定し、
 前記演算部は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて、前記位相差AF演算を行い、
 前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有する
 電子機器。
 <15>
 前記演算部は、
  前記換算係数が表す線形の特性と、前記位相差と前記デフォーカス量との関係を表す非線形の特性との間の位相差のオフセットである位相差オフセットを用いて、前記位相差を補正し、
  補正後の前記位相差を用いて、前記位相差AF演算を行う
 <14>に記載の電子機器。
 <16>
  撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、
  位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、
  前記位相差の信頼性の有無を判定するための信頼性閾値と
 を取得する取得部と、
 前記信頼性閾値を用いて、前記位相差の信頼性を判定する信頼性判定部と、
 前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行う演算部と、
 前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面と
 を備え、
 前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、前記受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、
 前記信頼性判定部は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて、前記位相差の信頼性を判定し、
 前記演算部は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて、前記位相差AF演算を行う
 撮像素子。
 <17>
 前記演算部は、
  前記換算係数が表す線形の特性と、前記位相差と前記デフォーカス量との関係を表す非線形の特性との間の位相差のオフセットである位相差オフセットを用いて、前記位相差を補正し、
  補正後の前記位相差を用いて、前記位相差AF演算を行う
 <16>に記載の撮像素子。
 11 レンズ鏡筒, 11A 撮像光学系, 12 光学フィルタ, 13 イメージセンサ, 14 メイン処理部, 15 照明制御部, 16 センサ駆動部, 17 位相差AF処理部, 18 画像処理部, 19 フォーカス駆動部, 20 表示部, 21 操作部, 22 フラッシュメモリ, 31 CPU, 32 メモリ, 33 ADC, 34 DAC, 35 通信I/F, 50 受光面, 51 画素ブロック, 52 通常画素, 53 検出画素, 53L 左遮光画素, 53R 右遮光画素, 61 PD, 62 CL, 63 カラーフィルタ, 64 オンチップレンズ, 66 遮光膜, 81 系列分離部, 82 信頼性判定部, 83,84 乗算部, 85 位相差AF演算部, 86 AF枠設定部, 87 取得部

Claims (17)

  1.   撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、
      位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、
      前記位相差の信頼性の有無を判定するための信頼性閾値と
     を取得する取得部と、
     前記信頼性閾値を用いて、前記位相差の信頼性を判定する信頼性判定部と、
     前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行う演算部と
     を備え、
     前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、
     前記信頼性判定部は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて、前記位相差の信頼性を判定し、
     前記演算部は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて、前記位相差AF演算を行い、
     前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有する
     信号処理装置。
  2.  前記換算係数は、複数のレンズ位置の前記デフォーカス量と前記位相差とから求められる
     請求項1に記載の信号処理装置。
  3.  前記デフォーカスオフセットは、前記撮像素子で所定の被写体を撮影することにより得られる前記位相差AF方式の合焦位置と、前記コントラストAF方式の合焦位置とのレンズ位置の差である
     請求項1に記載の信号処理装置。
  4.  前記信頼性閾値は、前記撮像素子の所定のセンサーゲインに対して求められ
     前記信頼性判定部は、
      前記所定のセンサーゲインに対する前記信頼性閾値から、前記撮像素子の現在のセンサーゲインに対する信頼性閾値を求め、
      前記撮像素子の現在のセンサーゲインに対する信頼性閾値を用いて、前記位相差の信頼性を判定する
     請求項1に記載の信号処理装置。
  5.  前記演算部は、調整ゲインを用いて前記検出画素の画素値を補正した補正後の画素値から求められる前記位相差を用いて、前記位相差AF演算を行い、
     前記調整ゲインは、前記撮像素子で所定の被写体を撮影することにより得られる、前記検出画素以外の画素である通常画素の画素値と、前記検出画素の画素値との比である
     請求項1に記載の信号処理装置。
  6.  前記演算部は、
      前記換算係数が表す線形の特性と、前記位相差と前記デフォーカス量との関係を表す非線形の特性との間の位相差のオフセットである位相差オフセットを用いて、前記位相差を補正し、
      補正後の前記位相差を用いて、前記位相差AF演算を行う
     請求項1に記載の信号処理装置。
  7.  前記代表点は、前記撮像素子の受光面を前記画素グループとしての矩形のブロックに分割したときの、そのブロックを代表する点である結節点である
     請求項1に記載の信号処理装置。
  8.  前記代表点は、前記撮像素子の受光面の中心からの距離である像高が所定の範囲内の画素の画素グループを代表する点である
     請求項1に記載の信号処理装置。
  9.  前記代表点ごとの前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、メモリに記憶されている
     請求項1に記載の信号処理装置。
  10.   撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、
      位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、
      前記位相差の信頼性の有無を判定するための信頼性閾値と
     を取得することと、
     前記信頼性閾値を用いて、前記位相差の信頼性を判定することと、
     前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行うことと
     を含み、
     前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、
     前記位相差の信頼性の判定は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて行い、
     前記位相差AF演算は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて行われ、
     前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有する
     信号処理方法。
  11.  前記換算係数が表す線形の特性と、前記位相差と前記デフォーカス量との関係を表す非線形の特性との間の位相差のオフセットである位相差オフセットを用いて、前記位相差を補正し、
     補正後の前記位相差を用いて、前記位相差AF演算を行う
     請求項10に記載の信号処理方法。
  12.   撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、
      位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置との間のオフセットであるデフォーカスオフセットと、
      前記位相差の信頼性の有無を判定するための信頼性閾値と
     を取得する取得部と、
     前記信頼性閾値を用いて、前記位相差の信頼性を判定する信頼性判定部と、
     前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行う演算部と
     して、コンピュータを機能させるためのプログラムであり、
     前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、
     前記信頼性判定部は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて、前記位相差の信頼性を判定し、
     前記演算部は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて、前記位相差AF演算を行い、
     前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有する
     プログラム。
  13.  前記演算部は、
      前記換算係数が表す線形の特性と、前記位相差と前記デフォーカス量との関係を表す非線形の特性との間の位相差のオフセットである位相差オフセットを用いて、前記位相差を補正し、
      補正後の前記位相差を用いて、前記位相差AF演算を行う
     請求項12に記載のプログラム。
  14.  光を集光する撮像光学系と、
     前記撮像光学系からの光を受光し、画像を撮影する撮像素子と、
     前記撮像素子が出力する信号を処理する信号処理部と
     を備え、
     前記信号処理部は、
      撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、
      位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、
      前記位相差の信頼性の有無を判定するための信頼性閾値と
     を取得する取得部と、
     前記信頼性閾値を用いて、前記位相差の信頼性を判定する信頼性判定部と、
     前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行う演算部と
     を有し、
     前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、画像を撮影する撮像素子について、その撮像素子の受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、
     前記信頼性判定部は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて、前記位相差の信頼性を判定し、
     前記演算部は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて、前記位相差AF演算を行い、
     前記撮像素子は、前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面を有する
     電子機器。
  15.  前記演算部は、
      前記換算係数が表す線形の特性と、前記位相差と前記デフォーカス量との関係を表す非線形の特性との間の位相差のオフセットである位相差オフセットを用いて、前記位相差を補正し、
      補正後の前記位相差を用いて、前記位相差AF演算を行う
     請求項14に記載の電子機器。
  16.   撮像光学系の射出瞳を瞳分割して得られる2つの像の位相差を、フォーカスのずれ量を表すデフォーカス量に変換するための換算係数と、
      位相差AF(Auto Focus)方式の合焦位置と、コントラストAF方式の合焦位置とのレンズ位置の差であるデフォーカスオフセットと、
      前記位相差の信頼性の有無を判定するための信頼性閾値と
     を取得する取得部と、
     前記信頼性閾値を用いて、前記位相差の信頼性を判定する信頼性判定部と、
     前記換算係数を用いて、信頼性がある前記位相差を、前記デフォーカス量に変換し、前記デフォーカスオフセットを用いて、前記デフォーカス量を補正する位相差AF演算を行う演算部と、
     前記撮像光学系の射出瞳の異なる領域を通過した光を受光する、前記位相差を検出するための検出画素を含む受光面と
     を備え、
     前記換算係数、前記デフォーカスオフセット、及び、前記信頼性閾値は、前記受光面を構成する複数の画素グループそれぞれを代表する代表点ごとに求められ、
     前記信頼性判定部は、オートフォーカス枠内の前記代表点の前記信頼性閾値を用いて、前記位相差の信頼性を判定し、
     前記演算部は、オートフォーカス枠内の前記代表点の前記換算係数、及び、前記デフォーカスオフセットを用いて、前記位相差AF演算を行う
     撮像素子。
  17.  前記演算部は、
      前記換算係数が表す線形の特性と、前記位相差と前記デフォーカス量との関係を表す非線形の特性との間の位相差のオフセットである位相差オフセットを用いて、前記位相差を補正し、
      補正後の前記位相差を用いて、前記位相差AF演算を行う
     請求項16に記載の撮像素子。
PCT/JP2016/054597 2015-03-02 2016-02-17 信号処理装置、信号処理方法、プログラム、電子機器、及び、撮像素子 WO2016140066A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015-040110 2015-03-02
JP2015040110 2015-03-02

Publications (1)

Publication Number Publication Date
WO2016140066A1 true WO2016140066A1 (ja) 2016-09-09

Family

ID=56849309

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/054597 WO2016140066A1 (ja) 2015-03-02 2016-02-17 信号処理装置、信号処理方法、プログラム、電子機器、及び、撮像素子

Country Status (1)

Country Link
WO (1) WO2016140066A1 (ja)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106231203A (zh) * 2016-09-29 2016-12-14 深圳聚融科技股份有限公司 在可见光和非可见光下拍摄时都能精确对焦的方法和装置
WO2018133322A1 (zh) * 2017-01-17 2018-07-26 中兴通讯股份有限公司 一种相位对焦方法及其装置
EP3627204A4 (en) * 2017-05-24 2020-06-17 Guangdong Oppo Mobile Telecommunications Corp., Ltd. DEVELOPMENT PROCESS AND RELATED PRODUCT
JP2021110794A (ja) * 2020-01-08 2021-08-02 エスゼット ディージェイアイ テクノロジー カンパニー リミテッドSz Dji Technology Co., Ltd 制御装置、撮像装置、制御方法、及びプログラム
WO2022064659A1 (ja) * 2020-09-25 2022-03-31 オリンパス株式会社 オートフォーカスシステム、内視鏡システムおよび制御方法
WO2023178626A1 (en) * 2022-03-24 2023-09-28 Qualcomm Incorporated Systems and methods of adaptive phase detection autofocus offset correction

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010062640A (ja) * 2008-09-01 2010-03-18 Canon Inc 撮像装置、撮像装置の制御方法及びプログラム
JP2010139520A (ja) * 2008-12-09 2010-06-24 Canon Inc ハイブリッドaf装置及びその制御方法
JP2010139942A (ja) * 2008-12-15 2010-06-24 Sony Corp 撮像装置および合焦制御方法
JP2012042668A (ja) * 2010-08-18 2012-03-01 Sony Corp 顕微鏡制御装置及び領域判定方法
JP2013254194A (ja) * 2012-05-11 2013-12-19 Canon Inc 撮像装置およびその制御方法
WO2013187447A1 (ja) * 2012-06-14 2013-12-19 オリンパスイメージング株式会社 撮像装置及び撮像装置の制御方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010062640A (ja) * 2008-09-01 2010-03-18 Canon Inc 撮像装置、撮像装置の制御方法及びプログラム
JP2010139520A (ja) * 2008-12-09 2010-06-24 Canon Inc ハイブリッドaf装置及びその制御方法
JP2010139942A (ja) * 2008-12-15 2010-06-24 Sony Corp 撮像装置および合焦制御方法
JP2012042668A (ja) * 2010-08-18 2012-03-01 Sony Corp 顕微鏡制御装置及び領域判定方法
JP2013254194A (ja) * 2012-05-11 2013-12-19 Canon Inc 撮像装置およびその制御方法
WO2013187447A1 (ja) * 2012-06-14 2013-12-19 オリンパスイメージング株式会社 撮像装置及び撮像装置の制御方法

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106231203A (zh) * 2016-09-29 2016-12-14 深圳聚融科技股份有限公司 在可见光和非可见光下拍摄时都能精确对焦的方法和装置
WO2018133322A1 (zh) * 2017-01-17 2018-07-26 中兴通讯股份有限公司 一种相位对焦方法及其装置
CN108337424A (zh) * 2017-01-17 2018-07-27 中兴通讯股份有限公司 一种相位对焦方法及其装置
US10827113B2 (en) 2017-01-17 2020-11-03 Zte Corporation Phase-detection auto focus method and device therefor
CN108337424B (zh) * 2017-01-17 2021-04-16 中兴通讯股份有限公司 一种相位对焦方法及其装置
EP3627204A4 (en) * 2017-05-24 2020-06-17 Guangdong Oppo Mobile Telecommunications Corp., Ltd. DEVELOPMENT PROCESS AND RELATED PRODUCT
JP2021110794A (ja) * 2020-01-08 2021-08-02 エスゼット ディージェイアイ テクノロジー カンパニー リミテッドSz Dji Technology Co., Ltd 制御装置、撮像装置、制御方法、及びプログラム
WO2022064659A1 (ja) * 2020-09-25 2022-03-31 オリンパス株式会社 オートフォーカスシステム、内視鏡システムおよび制御方法
WO2023178626A1 (en) * 2022-03-24 2023-09-28 Qualcomm Incorporated Systems and methods of adaptive phase detection autofocus offset correction

Similar Documents

Publication Publication Date Title
WO2016140066A1 (ja) 信号処理装置、信号処理方法、プログラム、電子機器、及び、撮像素子
US9615017B2 (en) Focus detection apparatus and method, method of controlling focus detection apparatus, and image capturing apparatus
US9407813B2 (en) Image capturing apparatus, control method of image capturing apparatus, and image capturing system
JP7156352B2 (ja) 撮像装置、撮像方法、及びプログラム
JP6182681B2 (ja) 合焦制御装置、合焦制御方法、合焦制御プログラム、レンズ装置、撮像装置
JP5857547B2 (ja) 焦点検出装置および焦点調節装置
US9485409B2 (en) Image capturing apparatus and control method therefor
JP7131638B2 (ja) 制御装置、制御方法、コンピュータプログラム及び電子機器
JP2016197231A (ja) 表示制御装置及び方法、及び撮像装置
WO2016080157A1 (ja) 合焦制御装置、合焦制御方法、合焦制御プログラム、レンズ装置、撮像装置
JP2014235417A (ja) 撮像装置およびその制御方法
JP2012128248A (ja) 撮像装置
US20200092489A1 (en) Optical apparatus, control method, and non-transitory computer-readable storage medium
JP6941011B2 (ja) 撮像装置及びその制御方法、プログラム、記憶媒体
JPWO2019202984A1 (ja) 撮像装置並びに距離計測方法、距離計測プログラム及び記録媒体
JP5338113B2 (ja) 相関演算装置、焦点検出装置および撮像装置
JP2014142497A (ja) 撮像装置及びその制御方法
JP5338119B2 (ja) 相関演算装置、焦点検出装置および撮像装置
JP5685892B2 (ja) 焦点検出装置、焦点調節装置および撮像装置
JP5949893B2 (ja) 撮像装置
JP4968009B2 (ja) 相関演算方法、相関演算装置、焦点検出装置および撮像装置
JP2009151155A (ja) 焦点検出装置、焦点調節装置および撮像装置
JP2020003686A (ja) 焦点検出装置、撮像装置および交換レンズ装置
JP2022112125A (ja) 距離計測装置、コンピュータプログラム及び距離計測方法
JP2009258230A (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: 16758760

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: JP

122 Ep: pct application non-entry in european phase

Ref document number: 16758760

Country of ref document: EP

Kind code of ref document: A1