WO2006035778A1 - カメラモジュールおよびそれを備えた電子機器 - Google Patents

カメラモジュールおよびそれを備えた電子機器 Download PDF

Info

Publication number
WO2006035778A1
WO2006035778A1 PCT/JP2005/017762 JP2005017762W WO2006035778A1 WO 2006035778 A1 WO2006035778 A1 WO 2006035778A1 JP 2005017762 W JP2005017762 W JP 2005017762W WO 2006035778 A1 WO2006035778 A1 WO 2006035778A1
Authority
WO
WIPO (PCT)
Prior art keywords
parallax
image
camera module
imaging
unit
Prior art date
Application number
PCT/JP2005/017762
Other languages
English (en)
French (fr)
Inventor
Tomokuni Iijima
Takashi Ishikawa
Ikuo Numai
Masahito Hayakawa
Aki Takai
Original Assignee
Matsushita Electric Industrial Co., Ltd.
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 Matsushita Electric Industrial Co., Ltd. filed Critical Matsushita Electric Industrial Co., Ltd.
Priority to JP2006515432A priority Critical patent/JP4322921B2/ja
Priority to US11/576,119 priority patent/US7911516B2/en
Publication of WO2006035778A1 publication Critical patent/WO2006035778A1/ja

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • H04N23/13Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths with multiple sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • H04N23/13Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths with multiple sensors
    • H04N23/15Image signal generation with circuitry for avoiding or correcting image misregistration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/55Optical parts specially adapted for electronic image sensors; Mounting thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/40Extracting pixel data from image sensors by controlling scanning circuits, e.g. by modifying the number of pixels sampled or to be sampled
    • H04N25/41Extracting pixel data from a plurality of image sensors simultaneously picking up an image, e.g. for increasing the field of view by combining the outputs of a plurality of sensors
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01LSEMICONDUCTOR DEVICES NOT COVERED BY CLASS H10
    • H01L2224/00Indexing scheme for arrangements for connecting or disconnecting semiconductor or solid-state bodies and methods related thereto as covered by H01L24/00
    • H01L2224/01Means for bonding being attached to, or being formed on, the surface to be connected, e.g. chip-to-package, die-attach, "first-level" interconnects; Manufacturing methods related thereto
    • H01L2224/42Wire connectors; Manufacturing methods related thereto
    • H01L2224/44Structure, shape, material or disposition of the wire connectors prior to the connecting process
    • H01L2224/45Structure, shape, material or disposition of the wire connectors prior to the connecting process of an individual wire connector
    • H01L2224/45001Core members of the connector
    • H01L2224/45099Material
    • H01L2224/451Material with a principal constituent of the material being a metal or a metalloid, e.g. boron (B), silicon (Si), germanium (Ge), arsenic (As), antimony (Sb), tellurium (Te) and polonium (Po), and alloys thereof
    • H01L2224/45138Material with a principal constituent of the material being a metal or a metalloid, e.g. boron (B), silicon (Si), germanium (Ge), arsenic (As), antimony (Sb), tellurium (Te) and polonium (Po), and alloys thereof the principal constituent melting at a temperature of greater than or equal to 950°C and less than 1550°C
    • H01L2224/45144Gold (Au) as principal constituent
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01LSEMICONDUCTOR DEVICES NOT COVERED BY CLASS H10
    • H01L2224/00Indexing scheme for arrangements for connecting or disconnecting semiconductor or solid-state bodies and methods related thereto as covered by H01L24/00
    • H01L2224/01Means for bonding being attached to, or being formed on, the surface to be connected, e.g. chip-to-package, die-attach, "first-level" interconnects; Manufacturing methods related thereto
    • H01L2224/42Wire connectors; Manufacturing methods related thereto
    • H01L2224/47Structure, shape, material or disposition of the wire connectors after the connecting process
    • H01L2224/48Structure, shape, material or disposition of the wire connectors after the connecting process of an individual wire connector
    • H01L2224/4805Shape
    • H01L2224/4809Loop shape
    • H01L2224/48091Arched
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01LSEMICONDUCTOR DEVICES NOT COVERED BY CLASS H10
    • H01L2924/00Indexing scheme for arrangements or methods for connecting or disconnecting semiconductor or solid-state bodies as covered by H01L24/00
    • H01L2924/15Details of package parts other than the semiconductor or other solid state devices to be connected
    • H01L2924/161Cap
    • H01L2924/1615Shape
    • H01L2924/16195Flat cap [not enclosing an internal cavity]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/10Circuitry of solid-state image sensors [SSIS]; Control thereof for transforming different wavelengths into image signals
    • H04N25/11Arrangement of colour filter arrays [CFA]; Filter mosaics
    • H04N25/13Arrangement of colour filter arrays [CFA]; Filter mosaics characterised by the spectral characteristics of the filter elements
    • H04N25/134Arrangement of colour filter arrays [CFA]; Filter mosaics characterised by the spectral characteristics of the filter elements based on three different wavelength filter elements

Definitions

  • the present invention relates to a camera module that is small and thin and has an autofocus control function, and an electronic device that includes the camera module.
  • FIG. 47 is a cross-sectional view showing the configuration of the camera module described in Japanese Patent Laid-Open No. 2001-78213.
  • an imaging system 9010 is an optical processing system that forms an image of light from an object on an imaging surface of an imaging element 9120 via an aperture 9110 and an imaging lens 9100.
  • the diaphragm 9110 has three circular openings 9110a, 9110b, and 9110c.
  • the apertures 9110a, 9110b, and 9110c also have their respective forces incident on the light incident surface 9100e of the imaging lens 9100, and the three lens parts 9100a, 9100b, and 9100c of the imaging lens 9100 also emit the forces on the imaging surface of the image sensor 9120.
  • Three object images are formed.
  • a light-shielding film is formed on the plane portion 9100d of the light exit surface of the imaging lens 9100.
  • Three optical finoleta 9052a, 9052b, and 9052c forces that transmit light of different wavelength bands are formed on the light incident surface 9100e of the imaging lens 9100!
  • the image sensor 9120 three lenses of the image pickup lens 9100 ⁇ 9100 &, 9100b, 9100c [corresponding to the three corresponding imaging regions 9120a, 9120b, 9120c, respectively, have different wavelength bands.
  • Three optical finores that transmit light 9053a, 9053b, and 9053c forces are formed!
  • the optical filter 9052a and the optical filter 9053a have spectral transmittance characteristics that mainly transmit green (indicated by G), and the optical filter 9052b and the optical filter 9053b mainly display in red (indicated by R).
  • the optical filter 9052c and the optical filter 9053c have spectral transmittance characteristics that mainly transmit blue (indicated by B). Therefore, the imaging region 9120a has sensitivity to green light (G), the imaging region 9120b has sensitivity to red light (R), and the imaging region 9120c has sensitivity to blue light (B).
  • the virtual subject distance D [m] is defined as a function of the shooting field angles ⁇ [°] of a plurality of imaging systems. tan ( ⁇ ⁇ 2)), the change between the mutual interval of multiple object images when the object is at the virtual subject distance D [m] and the mutual interval of multiple object images when it is at infinity
  • the optical axis intervals of the plurality of imaging systems are set so that the pixel pitch is smaller than twice the pixel pitch of the reference image signal.
  • 2001-78213 performs the same image processing as the image processing optimized for photographing an object at a virtual subject distance D [m], and an object at infinity.
  • the distance between the optical axes is set so that the difference in the distance between the two object images on the imaging surface is smaller than twice the pixel pitch of the reference signal. The color shift of the object image can be suppressed to an acceptable level.
  • the camera module described in Japanese Patent Application Laid-Open No. 2001-78213 achieves a reduction in thickness because of having a plurality of lens portions 9100a, 9100b, and 9100c.
  • this conventional camera module does not have an automatic focus control function.
  • the virtual subject distance D [m] is set with human photography in mind. For this reason, this conventional camera module cannot handle landscape photography or portrait photography.
  • FIG. 48 shows a camera module described in JP-A-2002-330332. An example of a captured image and a divided small area are shown. The detection areas kl, k2, k3, and k4 are provided at the center kO and the periphery of the shooting screen. Then, the parallax p0, pl, p2, p3, and p4 of each detection area is obtained.
  • the parallax in a predetermined range is extracted from these parallaxes, and when there are a plurality of extracted parallaxes, the parallax in the region near the center is selected. Further, the entire captured image is corrected using the selected parallax.
  • a part of an image to be captured is set as a plurality of small areas, parallax of these areas is obtained, and one of these parallaxes is selected. Then, the entire captured image is corrected based on the selected parallax. For example, as shown in Fig. 48, when a person M 2m away from the camera and a person N 10m away from the camera coexist in the center of the shooting screen, the person M located in the center of the shooting screen As a result, the entire captured image is corrected based on the parallax ⁇ in this region kO.
  • the parallax of the person M is the same as the selected parallax ⁇ , the influence of the parallax can be corrected, and a clear image can be obtained in the area of the person M.
  • the parallax of person N is different from the selected visual difference ⁇ , the influence of the parallax cannot be corrected. Therefore, color unevenness occurs in the area of person N, and the image is not clean.
  • the present invention has been made in view of the above problems, and an object of the present invention is to provide a camera module that can be reduced in size and thickness, and can obtain an accurate image in an entire image area regardless of the subject distance. To do.
  • the camera module of the present invention has a plurality of lens units each including at least one lens, and a one-to-one correspondence with the plurality of lens units, and with respect to the optical axis direction of the corresponding lens unit.
  • a plurality of imaging regions each having a substantially vertical light-receiving surface; an imaging signal input unit to which a plurality of imaging signals output from the plurality of imaging regions are input; and at least one of the plurality of imaging signals
  • a block division unit that divides one imaging signal into a plurality of blocks, a parallax calculation unit that calculates parallax between images formed by the plurality of lens units for each block using the imaging signal,
  • a parallax correction unit that corrects the plurality of imaging signals and combines the images based on the parallax.
  • a program according to the present invention corresponds to a plurality of lens units each including at least one lens, and the plurality of lens units on a one-to-one basis, with respect to the optical axis direction of the corresponding lens unit.
  • a plurality of imaging regions each having a substantially vertical light receiving surface, an imaging signal input unit to which a plurality of imaging signals respectively output from the plurality of imaging regions are input, and image processing of the input imaging signals.
  • a camera module including an image processing unit for performing a block division process for controlling an operation of the image processing unit, and dividing at least one of the plurality of imaging signals into a plurality of blocks; A parallax calculation process for calculating parallax between images formed by the plurality of lens units for each block using the imaging signal; and the plurality of the parallax based on the parallax! / A parallax correction processing for combining the compensation image pickup signal, characterized in that to be executed by the image processing unit.
  • a program recording medium is a computer-readable recording medium on which the above program is recorded.
  • the present invention has been made in view of the above problems, and can provide a camera module that can be reduced in size and thickness, and that can obtain a clear image in the entire image region regardless of the subject distance.
  • FIG. 1 is a cross-sectional view showing a configuration of a camera module according to Embodiment 1 of the present invention.
  • FIG. 2 is a top view of the lens of the camera module according to Embodiment 1 of the present invention.
  • FIG. 3 is a top view of a circuit section of the camera module according to the first embodiment of the present invention.
  • FIG. 4 is a characteristic diagram of a color filter of a camera module according to Embodiment 1 of the present invention.
  • FIG. 5 is a characteristic diagram of the IR filter of the camera module according to Embodiment 1 of the present invention.
  • FIG. 6 is a diagram for explaining the position of an object image at infinity in the camera module according to the first embodiment of the present invention.
  • FIG. 7 is a diagram for explaining the position of an object image at a finite distance in the camera module according to Embodiment 1 of the present invention.
  • FIG. 8] (A) is an in-focus image in the camera module according to Embodiment 1 of the present invention.
  • FIG. 9B is a diagram for explaining the relationship between the contrast evaluation value and
  • FIG. 9B is a diagram for explaining the relationship between the image when out of focus and the contrast evaluation value in the camera module according to Embodiment 1 of the present invention.
  • FIG. 10 is a block diagram of a camera module according to Embodiment 1 of the present invention.
  • FIG. 11 is a flowchart showing the operation of the camera module according to the first embodiment of the present invention.
  • ⁇ 12 The coordinates of the imaging signal of the camera module according to the first embodiment of the present invention are described.
  • FIG. 13A is an original image for explaining edge detection of the camera module according to Embodiment 1 of the present invention
  • FIG. 13B is an edge detection for explaining edge detection of the camera module according to Embodiment 1 of the present invention
  • (C) is an edge image for explaining edge detection of the camera module according to Embodiment 1 of the present invention.
  • ⁇ 14 A diagram for explaining a calculation area of a parallax evaluation value in the camera module according to Embodiment 1 of the present invention.
  • FIG. 16A is a diagram for explaining the relationship between the actuator operation amount and the contrast evaluation value when the contrast evaluation value is maximized without correction in the camera module according to Embodiment 1 of the present invention; ) Is a diagram for explaining the relationship between the amount of operation of the actuator and the contrast evaluation value when the contrast evaluation value after the positive side correction is maximum, and (C) is the maximum contrast evaluation value after the negative side correction. Is a diagram for explaining the relationship between the amount of actuating the actuator and the contrast evaluation value
  • FIG. 17 (A) shows the amount of operation of the actuator that maximizes the contrast evaluation value before this positive correction when further positive correction is performed in the camera module according to Embodiment 1 of the present invention.
  • FIG. 5B is a diagram illustrating the relationship between the contrast evaluation values, and FIG. 5B illustrates the relationship between the actuator operation amount that maximizes the contrast evaluation value after the positive correction and the contrast evaluation value after further positive correction.
  • FIG. 18 (A) shows a further negative effect in the camera module according to Embodiment 1 of the present invention.
  • FIG. 6 is a diagram for explaining the relationship between the actuator operation amount at which the contrast evaluation value after the negative correction is maximized and the contrast evaluation value.
  • FIG. 20 is a block diagram of a camera module according to Embodiment 2 of the present invention.
  • FIG. 21 is a flowchart showing the operation of the camera module according to the second embodiment of the present invention.
  • ⁇ 22] The coordinates of the imaging signal of the camera module according to the second embodiment of the present invention are described.
  • FIG. 24 is a block diagram of a camera module according to Embodiment 3 of the present invention.
  • FIG. 25 is a flowchart showing the operation of the camera module according to Embodiment 3 of the present invention.
  • ⁇ 26] A flowchart showing the operation of automatic focus control according to Embodiment 3 of the present invention.
  • FIG. 28 is a diagram for explaining block division in the camera module according to Embodiment 3 of the present invention.
  • ⁇ 29 A diagram for explaining a calculation area of a parallax evaluation value in the camera module according to Embodiment 3 of the present invention.
  • ⁇ 30 A diagram for explaining a calculation area of a correlation value for parallax accuracy evaluation in the camera module according to Embodiment 3 of the present invention.
  • FIG. 3 is a diagram for explaining a state before block re-division in the camera module according to Embodiment 3 of the present invention
  • (B) is in the camera module according to Embodiment 3 of the present invention. The figure explaining the state after subdivision of a block
  • ⁇ 32 A diagram for explaining the relationship between the correlation value for parallax accuracy evaluation and the parallax correction method flag in the camera module according to Embodiment 3 of the present invention.
  • ⁇ 33 A diagram for explaining the relationship between the parallax accuracy evaluation contrast evaluation value and the parallax correction method flag in the camera module according to Embodiment 3 of the present invention.
  • FIG. 35 (A) is an original image for explaining edge detection of the low correlation parallax correction unit of the camera module according to Embodiment 3 of the present invention, and (B) is a camera module according to Embodiment 3 of the present invention.
  • Image of contrast evaluation value for edge detection explaining edge detection of low correlation parallax correction unit of FIG. 5 (C) illustrates edge detection of low correlation parallax correction unit of camera module according to Embodiment 3 of the present invention.
  • Edge image is an original image for explaining edge detection of the low correlation parallax correction unit of the camera module according to Embodiment 3 of the present invention
  • (B) is a camera module according to Embodiment 3 of the present invention.
  • Image of contrast evaluation value for edge detection explaining edge detection of low correlation parallax correction unit of FIG. 5 (C) illustrates edge detection of low correlation parallax correction unit of camera module according to Embodiment 3 of the present invention.
  • FIG. 36 is a cross-sectional view showing a configuration of a camera module according to Embodiment 4 of the present invention.
  • FIG. 37 is a block diagram of a camera module according to Embodiment 4 of the present invention.
  • FIGS. 38A to 38D are diagrams for explaining field images of a camera module according to Embodiment 4 of the present invention.
  • FIG. 39 is a flowchart showing the operation of the camera module according to Embodiment 4 of the present invention.
  • FIG. 40 is a time chart showing the operation of the camera module according to Embodiment 4 of the present invention.
  • C) is a plan view schematically showing a preferable example of color filter arrangement in the camera module according to Embodiment 4 of the present invention.
  • FIG. 42 is a cross-sectional view showing a configuration of a camera module according to Embodiment 5 of the present invention.
  • FIG. 43 is a block diagram of a camera module according to Embodiment 5 of the present invention.
  • FIG. 44 is a flowchart showing the operation of the camera module according to Embodiment 5 of the present invention.
  • FIG. 45] (A) to (C) are diagrams for explaining background replacement of the camera module according to Embodiment 5 of the present invention.
  • FIG. 46 (A) and (B) are diagrams showing an example of an electronic apparatus according to Embodiment 6 of the present invention.
  • FIG. 47 Configuration of a conventional camera module (described in Japanese Patent Laid-Open No. 2001-78213) Cross section showing
  • FIG. 48 is a diagram showing an example of an image captured by a conventional camera module (described in Japanese Patent Laid-Open No. 2002-330332).
  • the camera module of the present invention has a plurality of lens portions each including at least one lens, and a one-to-one correspondence with the plurality of lens portions, and is substantially perpendicular to the optical axis direction of the corresponding lens portion.
  • a plurality of imaging regions each having a light receiving surface; and the plurality of imaging regions.
  • a parallax calculation unit for calculating parallax between images formed by the plurality of lens units for each block, and correcting the plurality of imaging signals based on the parallax! And a parallax correction unit to be combined.
  • the position of the object image changes relatively according to the subject distance. That is, as the subject distance decreases, the parallax increases. Therefore, when multiple subjects with different distances are taken at the same time, the parallax differs for each subject.
  • the parallax for each block is calculated, and after the imaging signal is corrected based on the parallax for each block so that the influence of the parallax is reduced, the image is synthesized. As a result, even when a plurality of subjects having different distances are simultaneously photographed, it is possible to appropriately correct the parallax of each subject and obtain a clear image in which the influence of the difference in view is reduced in the entire image region.
  • an actuator that changes a relative distance between the plurality of lens units and the plurality of imaging regions, and a focus control unit that controls the actuator based on the parallax, Also preferred to have.
  • the actuator since the actuator is operated based on the parallax and the automatic focus control is performed, the focus can be achieved by one actuator operation, so that the automatic focus control can be performed at high speed.
  • the camera module further includes a contrast calculation unit that calculates contrast based on at least one of the plurality of imaging signals, and the focus control unit includes the parallax and the parallax It is preferable to control the actuator based on the contrast.
  • the focus control unit controls the actuator a plurality of times, controls the actuator based on the parallax for the first time, and based on the contrast after the second time. It is preferable to control the actuator.
  • the actuator is operated to perform autofocus control.
  • the auto focus control is performed by operating the actuator based on the contrast.
  • the automatic focus control based on parallax is fast because it is focused by a single actuator operation.
  • the automatic focus control based on contrast has high accuracy because it is not affected by fluctuations in the actuator because the image power also directly determines the focus. Therefore, first, coarse adjustment is performed at high speed by automatic focus control based on parallax, and then fine adjustment with high accuracy is performed by automatic focus control based on contrast, so that automatic focus control can be performed at high speed with high accuracy.
  • the focus control unit learns an operation amount with respect to the actuator when the actuator is controlled based on the contrast.
  • the manipulated variable function is corrected more accurately even if there is variation in the actuator, etc., so that the automatic focus control based on the first parallax becomes more accurate, and the fineness by the automatic focus control based on the contrast from the next time onward becomes finer. Since the number of adjustments is reduced, faster autofocus control can be realized.
  • the block dividing unit detects outlines of a plurality of image areas based on the at least one imaging signal, and the plurality of image areas are detected based on the outlines.
  • the at least one imaging signal is divided into a plurality of blocks so as to be divided.
  • the contour is detected, divided into blocks, and after correcting the imaging signal so as to reduce the influence of the parallax based on the parallax for each block, the image is synthesized.
  • the imaging signal so as to reduce the influence of the parallax based on the parallax for each block.
  • a contour parallax calculation unit for obtaining a contour parallax that is a parallax of the contour based on the imaging signal is added.
  • the plurality of lens portions are formed for each block based on the contour parallax. It is preferable to calculate the parallax between images.
  • the block dividing unit divides the at least one imaging signal into a plurality of rectangular blocks.
  • the parallax of the parallax is calculated for each block, and after correcting the imaging signal so as to reduce the influence of the parallax based on the parallax, the image is synthesized. Accordingly, it is possible to obtain a clear image in which the influence of parallax is reduced in the entire image area.
  • the camera module of the present invention described above further includes a parallax evaluation value calculation unit that calculates at least one parallax accuracy evaluation value indicating the parallax accuracy for each of the plurality of blocks based on the imaging signal.
  • the parallax correction unit corrects the plurality of imaging signals based on the parallax and the parallax accuracy evaluation value for each of the plurality of blocks to synthesize an image.
  • a plurality of objects with different subject distances may be included in the divided blocks, and in this case, the parallax differs for each object image.
  • the accuracy of the parallax force S calculated for each block is determined, and the method of correcting the imaging signal is changed based on this accuracy.
  • the image can be corrected by an optimal correction method for each block, and a clear image in which the influence of parallax is further reduced in the entire image region can be obtained.
  • the parallax correction unit determines whether to divide the block into at least two based on the parallax accuracy evaluation value for each of the plurality of blocks. It is preferable to synthesize an image based on the parallax of the divided block for the block that is determined to be divided.
  • the parallax evaluation value calculator calculates the size of the contrast for each of the plurality of blocks based on at least one of the plurality of imaging signals. It is preferable to calculate the first parallax accuracy evaluation value shown.
  • the accuracy of the parallax calculated for each block is evaluated based on the contrast, and the method of correcting the imaging signal is changed based on the contrast.
  • the image can be corrected by an optimal correction method for each block, and a clear image in which the influence of parallax is further reduced in the entire image region can be obtained.
  • the parallax evaluation value calculation unit uses the imaging signal divided into the plurality of blocks and uses at least two for each of the plurality of blocks. It is preferable to calculate a second parallax accuracy evaluation value indicating how much an image obtained by moving the images formed by the lens units by the parallax is correlated.
  • the accuracy of the parallax calculated for each block is calculated and evaluated as to how much the image moved by the parallax has a correlation, and a method of correcting the imaging signal based on the correlation is obtained. change.
  • the image can be corrected by an optimal correction method for each block, and a clear image in which the influence of parallax is further reduced in the entire image region can be obtained.
  • the parallax correction unit divides the block into at least two when the second parallax accuracy evaluation value is small for each of the plurality of blocks. For the divided blocks, it is preferable to synthesize an image based on the parallax of the divided blocks.
  • the accuracy of the parallax calculated for each block is evaluated using the second parallax accuracy evaluation value indicating how much the image moved by the parallax is correlated. . Then, the block for which the second parallax accuracy evaluation value is small, that is, the correlation is determined to be small is divided into at least two blocks. As a result, the image can always be corrected with the optimum block size, so that an image with a clear V can be obtained in which the influence of parallax is further reduced in the entire image region.
  • the parallax evaluation value calculation unit performs the copying for each of the plurality of blocks based on at least one of the plurality of imaging signals.
  • a second parallax accuracy evaluation value indicating how much the image moved by the parallax is correlated is calculated, and the parallax correction unit has a large first parallax accuracy evaluation value for each of the plurality of blocks and the first parallax accuracy evaluation value.
  • the parallax accuracy evaluation value of 2 is small, it is preferable to divide the block into at least two and synthesize an image based on the parallax of the divided blocks in the divided blocks.
  • the correlation between the first parallax accuracy evaluation value indicating the magnitude of contrast for each block and the accuracy of the calculated parallax is correlated with the image.
  • the evaluation is performed using the second parallax accuracy evaluation value indicating the above.
  • a block that is determined to have a high first parallax accuracy evaluation value, that is, a high contrast and a second parallax accuracy evaluation value, that is, a low correlation is divided into at least two blocks.
  • the imaging signal input unit inputs the plurality of imaging signals for each of a plurality of fields
  • the parallax calculation unit inputs each of the plurality of fields. Therefore, it is preferable to calculate the parallax for each block.
  • a color filter in which a plurality of color filters are arranged in a one-to-one correspondence with the plurality of lens units, and the scanning direction of the field among the plurality of lens units is included. More preferably, filters of the same color are arranged corresponding to at least two lens parts arranged in parallel to each other! /.
  • the camera module of the present invention further includes another image storage unit that stores another image different from the captured image, and the parallax correction unit includes an image obtained by correcting the imaging signal based on the parallax. It is preferable to combine with the separate image.
  • the parallax correction unit is preferably combined so that the ratio of the image obtained by correcting the imaging signal is increased and the ratio of the different image is decreased as the parallax is increased.
  • an electronic apparatus includes the above-described camera module of the present invention.
  • the program according to the present invention corresponds to a plurality of lens units each including at least one lens and the plurality of lens units on a one-to-one basis with respect to the optical axis direction of the corresponding lens unit.
  • a plurality of imaging regions each having a substantially vertical light receiving surface, an imaging signal input unit to which a plurality of imaging signals respectively output from the plurality of imaging regions are input, and an image for performing image processing of the input imaging signals
  • a camera module comprising a processing unit, a program for controlling the operation of the image processing unit, the block division processing for dividing at least one of the plurality of imaging signals into a plurality of blocks Based on the parallax and the parallax calculation processing for calculating the parallax between images formed by the plurality of lens units, for each block, using the imaging signal.
  • a parallax correction processing for combining the corrected images a plurality of image pickup signals, and wherein the to be executed by the image processing unit.
  • a program recording medium is a program recording medium in which the above-described program is recorded and can be read by a computer.
  • the parallax for each block is calculated, the image signal is corrected based on the parallax for each block so that the influence of the parallax is reduced, and then the image is synthesized. . Accordingly, even when a plurality of subjects having different distances are simultaneously imaged, it is possible to appropriately correct the parallax of each subject and obtain a clear image in which the influence of the parallax is reduced in the entire image region.
  • the camera module according to Embodiment 1 of the present invention detects an edge, divides the image into blocks, and corrects the parallax based on the parallax for each block, thereby obtaining a clear image in the entire image region.
  • automatic focus control can be performed at high speed and with high accuracy.
  • the fine adjustment amount is learned to improve the accuracy of the next coarse adjustment.
  • a camera module according to Embodiment 1 of the present invention will be described with reference to the drawings.
  • FIG. 1 is a cross-sectional view showing a configuration of a camera module according to Embodiment 1 of the present invention.
  • the camera module 101 includes a lens module unit 110 and a circuit unit 120.
  • the lens module unit 110 includes a lens barrel 111, an upper cover glass 112, a lens 113, a finisher fixing unit 114, and an actuator movable unit 115.
  • the circuit unit 120 includes a substrate 121, a package 122, an image sensor 123, a package cover glass 124, and a system LSI (hereinafter referred to as SLSI) 125.
  • the lens barrel 111 has a cylindrical shape, and its inner wall surface is black with a matte finish to prevent irregular reflection of light, and is formed by injection molding of resin.
  • the upper cover glass 112 has a disk shape, is formed of a transparent resin, and is fixed to the upper surface of the lens barrel 111 with an adhesive or the like. The surface of the upper cover glass 112 prevents a damage due to friction, and prevents reflection of incident light. An antireflection film is provided.
  • FIG. 2 is a top view of lens 113 of the camera module according to Embodiment 1 of the present invention.
  • the lens 113 has a substantially disc shape and is made of glass or transparent resin, and has a first lens portion.
  • 113a, the second lens portion 113b, the third lens portion 113c, and the fourth lens portion 113d are arranged in a grid pattern.
  • the X axis and the Y axis are set along the arrangement direction of the first to fourth lens portions 113a to 113d.
  • the light incident from the subject side is emitted to the image sensor 123 side, and then on the image sensor 123.
  • Four images are formed on
  • the actuator fixing portion 114 is fixed to the inner wall surface of the lens barrel 111 with an adhesive or the like.
  • the actuator movable portion 115 is fixed to the outer peripheral edge of the lens 113 with an adhesive or the like.
  • the actuator fixing unit 114 and the actuator moving unit 115 constitute a voice coil motor.
  • the actuator fixing portion 114 has a permanent magnet (not shown) and a ferromagnetic yoke (not shown), and the actuator movable portion 115 has a coil (not shown).
  • the actuator movable portion 115 is elastically supported by an elastic body (not shown) with respect to the actuator fixing portion 114. When the coil of the actuator movable portion 115 is energized, the actuator movable portion 115 moves relative to the actuator fixing portion 114, and the relative distance along the optical axis between the lens 113 and the image sensor 123 changes. .
  • the substrate 121 is made of a resin substrate, and the lens barrel 111 is fixed to the upper surface with an adhesive or the like in contact with the bottom surface. In this way, the lens module unit 110 and the circuit unit 120 are fixed, and the camera module 101 is configured.
  • the nodule / cage 122 is made of a resin having a metal terminal, and the metal terminal portion is fixed to the upper surface of the base plate 121 by soldering or the like inside the lens barrel 111.
  • the image sensor 123 includes a first image sensor 123a, a second image sensor 123b, a third image sensor 123c, and a fourth image sensor 124d.
  • the first image sensor 123a, the second image sensor 123b, the third image sensor 123c, and the fourth image sensor 124d are solid-state image sensors such as a CCD sensor and a CMOS sensor, respectively.
  • the centers of the first lens portion 113a, the second lens portion 113b, the third lens portion 113c, and the fourth lens portion 113d are substantially coincident with each other, and the light receiving of each imaging element is performed. It is arranged so that the surface is substantially perpendicular to the optical axis of the corresponding lens part.
  • the terminals of the first image sensor 123a, the second image sensor 123b, the third image sensor 123c, and the fourth image sensor 123d are connected to the metal terminals at the bottom inside the socket 122 by wire wires. It is connected by a gold wire 127 by the indexing, and is electrically connected to the SLSI 125 via the substrate 121.
  • the light emitted from each of the lens portion 113c and the fourth lens portion 113d forms an image, and electrical information whose light information power is converted by the photodiode is output to the SLSI 125.
  • FIG. 3 is a top view of circuit unit 120 of the camera module according to Embodiment 1 of the present invention.
  • the package cover glass 124 has a flat plate shape, is formed of a transparent resin, and is fixed to the upper surface of the package 122 by adhesion or the like.
  • a first color filter 124a, a second color filter 124b, a third color filter 124c, a fourth color filter 124d, and a light shielding portion 124e are arranged by vapor deposition or the like.
  • an infrared cut filter (not shown; hereinafter referred to as an IR filter) is disposed on the lower surface of the knock cover glass 124 by vapor deposition or the like.
  • FIG. 4 is a characteristic diagram of the color filter of the camera module according to Embodiment 1 of the present invention
  • FIG. 5 is a characteristic diagram of the IR filter of the camera module according to Embodiment 1 of the present invention.
  • the first color filter 124a has a spectral transmission characteristic that mainly transmits green as indicated by G in FIG. 4, and the second color filter 124b is an element that mainly transmits blue as indicated by B in FIG.
  • the third color filter 124c has a light transmission characteristic, and has a spectral transmission characteristic that mainly transmits red as indicated by R in FIG. 4, and the fourth color filter has a main transmission characteristic indicated by G in FIG. Has a spectral transmission characteristic that allows green to pass through.
  • the IR filter has a spectral transmission characteristic that blocks infrared light indicated by IR in FIG.
  • the object light incident from the upper part of the first lens unit 113a is also emitted by the lower force of the first lens unit 113a, and mainly green is transmitted by the first color filter 124a and the IR filter.
  • the first image sensor 123a receives the green component of the object light.
  • the object light incident from the upper part of the second lens unit 113b is emitted from the lower part of the second lens unit 113b, and mainly the blue color is transmitted by the second color filter 124b and the IR filter.
  • the second image sensor 123b receives the blue component of the object light.
  • the third lens The object light incident from the upper part of the part 113c is emitted from the lower part of the third lens part 113c, and mainly the red color is transmitted through the third color filter 124c and the IR filter.
  • the light receiving part of the third imaging element 123c Therefore, the third image sensor 123c receives the red component of the object light.
  • the object light incident from the upper part of the fourth lens unit 113d is also emitted by the lower force of the fourth lens unit 113d, and mainly the green color is transmitted through the fourth color filter 124d and the IR filter, In order to form an image on the light receiving portion of the image sensor 123d, the fourth image sensor 123d receives the green component of the object light.
  • the SLSI 125 controls the energization of the coil of the actuator movable unit 115, drives the image sensor 123, inputs electrical information from the image sensor 123, performs various image processing, and performs higher-level CPU in a method described later. And output the image to the outside.
  • the camera module according to Embodiment 1 of the present invention has four lens units (first lens unit 113a, second lens unit 113b, third lens unit 113c, and fourth lens unit 113d). For this reason, the relative positions of the four object images formed by the four lens units change according to the subject distance.
  • FIG. 6 is a diagram for explaining the position of the object image at infinity in the camera module according to Embodiment 1 of the present invention.
  • FIG. 6 for the sake of simplicity, only the first lens unit 113a, the first image sensor 123a, the second lens unit 113b, and the second image sensor 123b are shown.
  • the light L1 incident on the first lens portion 113a from the object 10 at infinity is parallel to the light L2 incident on the second lens portion 113b. Therefore, the distance between the first lens unit 113a and the second lens unit 113b and the distance between the object image 11a on the first image sensor 123a and the object image 1 lb on the second image sensor 123b. U, etc.
  • the optical axis of the first lens unit 113a, the optical axis of the second lens unit 113b, the optical axis of the third lens unit 113c, and the optical axis of the fourth lens unit 113d are respectively The center of the light receiving surface of the first image sensor 123a, the center of the light receiving surface of the second image sensor 123b, the center of the light receiving surface of the third image sensor 123c, and the center of the light receiving surface of the fourth image sensor 123d. They are arranged to match. Therefore, the center of each light receiving surface of the first image sensor 123a, the second image sensor 123b, the third image sensor 123c, and the fourth image sensor 123d and the infinity imaged on each light receiving surface, respectively.
  • the relative positional relationship with the object image is the same for all image sensors. is there. That is, there is no parallax.
  • FIG. 7 is a diagram for explaining the position of the object image at a finite distance in the camera module according to Embodiment 1 of the present invention.
  • the first lens unit 113a, the first image sensor 123a, the second lens unit 113b, and the second image sensor 123b are shown for simplicity.
  • the light L1 incident on the first lens unit 113a and the light L2 incident on the second lens unit 113b of light from the object 12 having a finite distance are not parallel. Therefore, the distance between the object image 13a on the first image sensor 123a and the object image 13b on the second image sensor 123b is longer than the distance between the first lens unit 113a and the second lens unit 113b. .
  • the relative positional relationship with the object image differs for each image sensor. That is, there is parallax.
  • the distance to the object image 12 (subject distance) is A
  • the distance between the first lens unit 113a and the second lens unit 113b is D
  • the focal length of the lens units 113a and 113b is f
  • the parallax ⁇ is given by the following formula (1 ).
  • the relative positions of the four object images formed by the four lens portions 113a, 113b, 113c, and 113d change according to the subject distance. For example, as the subject distance A decreases, the parallax ⁇ increases.
  • FIG. 8 ( ⁇ ) illustrates the relationship between the image at the time of focusing (when the focus is adjusted) and the contrast evaluation value in the camera module according to Embodiment 1 of the present invention.
  • FIG. 8 ( ⁇ ) illustrates the relationship between the image at the time of out-of-focus (when the focus is not adjusted) and the contrast evaluation value in the camera module according to Embodiment 1 of the present invention.
  • FIGS. 8 (A) and 8 (B) are images obtained by photographing a rectangle in which the left half is white and the right half is black.
  • the contour of the photographed image is clear and the contrast is large when focused.
  • the contour of the photographed image is blurred and the contrast is small.
  • the right diagrams in FIGS. 8A and 8B show the results when a bandpass filter (BPF) is applied to the information signal in the left diagram.
  • the horizontal axis is the position in the X-axis direction
  • the vertical axis is the output value after BPF.
  • the signal amplitude after BPF is large during focusing.
  • the signal amplitude after BPF is small when out of focus.
  • the signal amplitude after BPF is defined as the contrast evaluation value indicating how much the contrast is high. Then, as shown in the right figure of Fig. 8 (A), the contrast evaluation value is large when focused, and as shown in the right figure of Fig. 8 (B), the contrast evaluation value is small when out of focus.
  • FIG. 9 is a diagram for explaining the relationship between the lens position and the contrast evaluation value of the camera module according to Embodiment 1 of the present invention.
  • FIG. 10 is a block diagram of the camera module according to Embodiment 1 of the present invention.
  • the SLSI 125 includes a system control unit 131, an image sensor driving unit 132, an image signal input unit 133, an actuator operation amount output unit 134, an image processing unit 135, and an input / output unit 136.
  • the circuit unit 120 includes an amplifier 126 in addition to the above-described configuration.
  • the amplifier 126 applies a voltage corresponding to the output from the actuator operation amount output unit 134 to the coil of the actuator movable unit 115.
  • the system control unit 131 includes a CPU (Central Processing Unit), memory, and other forces, and controls the entire SLSI 125.
  • the image sensor driving unit 132 is configured by a logic circuit or the like, generates a signal for driving the image sensor 123, and applies a voltage corresponding to the signal to the image sensor 123.
  • the imaging signal input unit 133 includes a first imaging signal input unit 133a, a second imaging signal input unit 133b, a third imaging signal input unit 133c, and a fourth imaging signal input unit 133d.
  • the power unit 133c and the fourth imaging signal input unit 133d are each a CDS circuit (correlated double sampling circuit: Correlated
  • Double Sampling Circuit Double Sampling Circuit
  • AGC Automatic Gain Controller
  • AGC Automatic Gain Controller
  • the Digital Converter are connected in series and connected to the first image sensor 123a, the second image sensor 123b, the third image sensor 123c, and the fourth image sensor 123d, respectively.
  • the signal is input, the fixed noise is removed by the CDS circuit, the gain is adjusted by the AGC, the analog signal power is also converted to a digital value by the ADC, and it is written in the memory of the system control unit 131.
  • the actuator operation amount output unit 134 is composed of a DAC (Digital Analog Converter), and outputs a voltage signal corresponding to the voltage to be applied to the coil of the actuator movable unit 115.
  • DAC Digital Analog Converter
  • the image processing unit 135 is configured to include a logic circuit, a DSP, or both of them, and performs various types of image processing according to predetermined program control using the memory information of the system control unit 131.
  • the image processing unit 135 includes an edge detection unit 141, a block division unit 142, a parallax calculation unit 143, a parallax correction unit 144, a parallax type autofocus control unit 145, an actuator control unit 146, a contrast type autofocus control unit 147, and autofocus.
  • a control contrast evaluation value calculation unit 148 and an actuator operation amount function correction unit 149 are provided.
  • the input / output unit 136 communicates with an upper CPU (not shown), and outputs an image signal to an upper CPU, an external memory (not shown), and an external display device (not shown) such as a liquid crystal display. .
  • FIG. 11 is a flowchart showing the operation of the camera module according to Embodiment 1 of the present invention. From the system controller 131 of the SLSI 125, the camera module 101 is operated according to this flowchart.
  • step S100 the operation is started. For example, when the upper CPU (not shown) force shutter button or the like is detected and the camera module 101 is instructed to start the operation via the input / output unit 136, the camera module 101 starts the operation. .
  • step S110 is executed.
  • step S110 shooting is performed. Imaging by command of system controller 131
  • the element drive unit 132 outputs a signal for electronic shutter and transfer as needed.
  • the first imaging signal input unit 133a, the second imaging signal input unit 133b, the third imaging signal input unit 133c, and the fourth imaging signal input unit 133d are synchronized with the signal generated by the imaging element driving unit 132.
  • an image pickup signal which is an analog signal of each image output from the first image pickup device 123a, the second image pickup device 123b, the third image pickup device 123c, and the fourth image pickup device 123d is input by the CDS.
  • FIG. 12 is a diagram for explaining the coordinates of the imaging signal of the camera module according to Embodiment 1 of the present invention.
  • Il (x, y) indicates the first image signal that is Xth in the horizontal direction and yth in the vertical direction.
  • the number of pixels in the vertical direction of the input image is H
  • the number of pixels in the horizontal direction is H
  • the total number of pixels is HXL
  • X varies from 0 to L—1
  • y varies from 0 to H—1.
  • I2 (x, y), I3 (x, y), and I4 (x, y) are respectively the Xth image in the horizontal direction and the yth image signal in the vertical direction, the third image signal, And the fourth image signal.
  • step S121 is executed.
  • step S 121 and step S 122 the edge detection unit 141 uses the data in the memory of the system control unit 131 to detect an edge. Then, the result is written in the memory of the system control unit 131. Details are as follows.
  • a contrast evaluation value for edge detection is calculated. This calculation is performed only for the first imaging signal.
  • the Laplacian is calculated as in the following equation (2), and the LPF (low-pass filter) is applied spatially as in the following equation (3) to obtain the contrast evaluation value for edge detection C2 (x, y ).
  • FIG. 13 (A) is an original image explaining edge detection of the camera module according to Embodiment 1 of the present invention
  • FIG. 13 (B) is edge detection of the camera module according to Embodiment 1 of the present invention.
  • Contrast evaluation for edge detection It is an image of value.
  • the edge evaluation contrast evaluation value C2 (x, y) of the original image in FIG. 13A is calculated by the equations (2) and (3), the result is as shown in FIG. 13B.
  • Fig. 13 (B) locations where the absolute value of Equation (3) is large are displayed in black.
  • step S122 is executed.
  • Cl (x, y) Il (x-l, y) + Il (x + l, y) + Il (x, y-l) + Il (x, y + l) -4Il (x, y)
  • FIG. 13C is an edge image for explaining edge detection of the camera module according to Embodiment 1 of the present invention.
  • step S130 the block dividing unit 142 uses the data in the memory of the system control unit 131 to divide the data into blocks. Then, the result is written in the memory of the system control unit 131. As shown in Fig. 13 (C), numbers such as BO, Bl,... ⁇ Bi ⁇ ... ⁇ Bn are assigned to the area surrounded by the edges. Note that the edge may be corrected by using an expansion algorithm or a contraction algorithm in order to prevent erroneous detection or disappearance of the edge due to noise or the like.
  • step S140 is executed.
  • FIG. 14 is a diagram illustrating a parallax evaluation value calculation region in the camera module according to Embodiment 1 of the present invention.
  • a region indicated by Bi is the i-th block obtained in step S130 from the first imaging signal II.
  • the region indicated by 14 is a region where Bi is moved by k in the X direction and by k in the y direction. Then, for all image signals Il (x, y) and I4 (x, y) in each area, the absolute value difference sum shown in the following equation (4) is expressed as the parallax evaluation value Ri (k). Calculate.
  • Ri (k)
  • This parallax evaluation value Ri (k) is the value of the first image signal II of the i-th block Bi and the fourth image signal 14 in the region separated by (k, k) in the x and y directions, respectively. The smaller the value, the larger (similar) the correlation.
  • step S151 is executed.
  • step S151 and step S152 a preview image is output.
  • step S151 the parallax correction unit 144 uses the data in the memory of the system control unit 131 to correct the parallax for each block using the parallax value corresponding to the block, and then synthesize the image. . Then, the result is written in the memory of the system control unit 131. Since the first imaging element 123a and the fourth imaging element 123d mainly receive the green component of the object light, the first imaging signal II and the fourth imaging signal 14 are information on the green component of the object light. It is an information signal. In addition, since the second imaging signal 123b mainly receives the blue component of the object light, the second imaging signal 12 is an information signal of the blue component of the object light.
  • the third imaging signal 123c mainly receives the red component of the object light
  • the third imaging signal 13 is an information signal of the red component of the object light. Since the parallax between the first image sensor 123a and the fourth image sensor 123d was predicted to be ( ⁇ i, ⁇ i), the green color at the pixel coordinates (x, y) as shown in the following equation (5) G (x, y) indicating the intensity of the first imaging signal is an average of the first imaging signal Il (x, y) and the fourth imaging signal 14 (X ⁇ A i, y ⁇ 0.
  • the blue intensity at the pixel coordinates ( x , y) is B (x, y) indicating the second imaging signal I2 (x ⁇ A i, y) and the first imaging Since the parallax between the element 123a and the third image sensor 123c was predicted to be (0, A i), R (x, y indicating the intensity of red at (x, y) as shown in the following equation (7) ) Is the third imaging signal I3 (x, y ⁇ 0.
  • the disparity value is a block including pixel coordinates ( x , y).
  • step S152 is executed.
  • G (x, y) [Il (x, y) + I4 (x- ⁇ i, y- ⁇ i)] / 2 ⁇ ⁇ ⁇ (5)
  • step S152 an image is output.
  • the input / output unit 136 uses G (x, y), B (x, y), and R (x, y), which are data in the memory of the system control unit 131, to display a host CPU (not shown) or an external display device (Not shown).
  • G ( X , y), B ( X , y), R (x, y) for example, outputs such as luminance and color difference signals may be output.
  • values after image processing such as white balance and gamma correction may be output.
  • S161 is executed.
  • steps S161, S162, and S163 automatic focus control using a parallax value is performed.
  • step S161 the parallax type autofocus control unit 145 selects an autofocus control block based on the data on the memory of the system control unit 131. Then, the result is written in the memory of the system control unit 131. For example, select at least one block near the center of the image area (eg, three blocks Bj l, Bj2, and Bj3). Note that these blocks do not necessarily have to be near the center, but reflect the user's intention to operate the camera (for example, the viewpoint direction is detected by a sensor), and the blocks may be selected.
  • step S162 is executed.
  • step S162 an actuator position command is calculated.
  • the average of the parallax values Aj l, Aj2, and Aj3 of the blocks Bj1, Bj2, and Bj3 is set as the parallax value for automatic focus control Aaf, as shown in the following formula (8).
  • the actuator position command Xact is calculated as shown in the following equation (9). Note that the position command Xact indicates a command of a position in the direction toward the subject, with the in-focus position of the infinity image as a reference.
  • step S163 the actuator control unit 146 calculates the actuator operation amount (voltage applied to the coil of the actuator movable unit 115) Vact using the operation amount function expressed by the following equation (10). In order to learn the manipulated variable function described later, the actuator manipulated variable is saved as VactO. Next, step S164 is executed.
  • Vact ka ⁇ Xact + kb ⁇ ⁇ ⁇ (10)
  • VactO Vact ⁇ ⁇ ⁇ ( ⁇ ')
  • step S164 the actuator is operated.
  • the actuator operation amount output unit 134 changes the voltage signal to be output so that the voltage force SVact is applied to the coil (not shown) of the actuator movable unit 115 through the amplifier 126.
  • step S171 is executed.
  • step S176 the contrast type autofocus control unit 147 performs autofocus control using contrast. As shown in Fig. 9 above, the contrast evaluation value is maximized at the in-focus position. Using this principle, the actuator manipulated variable that maximizes the contrast evaluation value is searched.
  • step S171 a contrast evaluation value for automatic focus control without correcting the actuator operation amount is created.
  • Step S171 consists of steps S171c and S171d. First, step S171c is executed.
  • step S171c shooting is performed. This operation is the same as that in step S110, but only the imaging signal II of the block for automatic focus control selected in S161 may be transferred out of the imaging signal II from the first imaging element 123a. In this case, the transfer time can be shortened compared to transferring all image signals.
  • step S171d is executed.
  • step S171d the automatic focus control contrast evaluation value calculation unit 148 uses the data in the memory of the system control unit 131 to create an automatic focus control contrast evaluation value. This calculation is performed only for the first imaging signal II for the auto focus control block.
  • the absolute value of Laplacian is calculated as in the following equation (11), and the following equation (12) In this way, an LPF (low-pass filter) is applied spatially, and this is averaged in the autofocus control block as shown in the following formula (13) to obtain the autofocus contrast evaluation value C5.
  • N is the number of C4 (x, y) in the auto focus control block.
  • the contrast evaluation value C5 at this time is written as C50 in the memory of the system control unit 131.
  • step S172 is executed.
  • step S172 a contrast evaluation value for automatic focus control at the time of positive correction of the actuator operation amount is created.
  • Step S172 also comprises step S172a, step S172b, step S172c, and step SI 72d forces.
  • Step S 172a is executed.
  • step S172a as shown in the following equation (15), the amount of actuator operation without correction (the voltage applied to the coil of the actuator fixing unit 114) The value obtained by adding dVact to VactO is the actuator for the positive side correction. The operation amount is Vact, and the memory is saved as Vactp as shown in the following equation (16).
  • step S172b executes step S172b, step S172c, and step S172d.
  • Vact VactO + dVact ⁇ ⁇ ⁇ ⁇ (15)
  • step S172b the actuator is operated.
  • step S172c photographing is performed.
  • step S172d a contrast evaluation value for automatic focus control is created.
  • Step S172b performs the same operation as step S164.
  • Step S172c and Step S172d perform the same operation as Step 171c and Step S171d, and the contrast evaluation value C5 is set to the contrast evaluation value C5p for autofocus after positive side correction as shown in the following equation (17).
  • step S173 is executed. [0114]
  • C5p C5 ⁇ ⁇ ⁇ (17)
  • Step S173 a contrast evaluation value for automatic focus control at the time of negative correction of the actuator operation amount is created.
  • Step S173 also comprises step S173a, step S173b, step S173c, and step SI 73d forces. First, Step S173a is executed.
  • step S173a as shown in the following equation (18), the amount of actuator operation without correction (voltage applied to the coil of the actuator fixing unit 114) The value obtained by subtracting dVact from VactO is the actuator for negative correction. The operation amount is Vact, and the memory is saved as Vactn as shown in the following equation (19).
  • step S173b, step S173c, and step S173d are executed.
  • Vact VactO— dVact (18)
  • step S173b the actuator is operated.
  • step S173c photographing is performed.
  • step S173d a contrast evaluation value for automatic focus control is created. The same operation as step 172b, step S172c, and step S172d is performed, and the contrast evaluation value C5 is set to the contrast evaluation value C5n for autofocus after negative side correction as shown in the following equation (20), and is stored in the memory of the system control unit 131. Write.
  • step S174 is executed.
  • step S174 the focus control contrast evaluation value is evaluated. Compares C50, C5p, and C5n, and branches depending on which is the maximum value.
  • FIG. 16 (A) is a diagram for explaining the relationship between the actuator operation amount and the contrast evaluation value when the contrast evaluation value is maximized without correction in the camera module according to Embodiment 1 of the present invention.
  • the actuator operating amount without correction VactO gives almost the maximum value of the contrast value C5 for autofocus control, so the final actuator operating amount Vactf is set to VactO as shown in the following equation (21).
  • FIG. 16 (B) shows a contrast after positive side correction in the camera module according to Embodiment 1 of the present invention.
  • FIG. 10 is a diagram for explaining a relationship between an actuator operation amount and a contrast evaluation value when a test evaluation value is maximum.
  • the actuator operating amount Vactp after the positive correction or the actuator operating amount Vact after further correcting to the positive side shows an almost maximum value of the contrast evaluation value C5 for automatic focus control.
  • the actuator operation amount is further corrected to the positive side, and the maximum value is searched.
  • C5p is stored as C5pp as the previous value.
  • FIG. 16 (C) is a diagram for explaining the relationship between the actuator operation amount and the contrast evaluation value when the contrast evaluation value after negative side correction becomes maximum in the camera module according to Embodiment 1 of the present invention. is there.
  • the actuator operation amount Vactn after negative correction or the actuator operation amount Vact after further correction to the negative side shows an almost maximum value of the contrast evaluation value C5 for automatic focus control.
  • the actuator operation amount is further corrected to the negative side, and the maximum value is searched.
  • C5n is stored as C5np as the previous value.
  • Step S175 a contrast evaluation value for autofocus at the time of further positive side correction is created and evaluated.
  • Step S175 also comprises step S175a, step S175b, step S175c, step S175d, and step SI 75e forces. First, step S175a is executed.
  • step S175a the actuator operating amount (applied voltage to the coil of the actuator fixing unit 114) after the previous positive correction as shown in the following formula (24) is obtained by adding dVact to Vactp to the positive side Save the actuator operation amount Vact during correction as Vac tp as shown in the following equation (25).
  • step S175b, step S175c, and step S175d are executed.
  • Vact Vactp + dVact ⁇ ⁇ ⁇ ⁇ (24)
  • step S175b the actuator is operated.
  • step S175c Shooting is performed, and a contrast evaluation value for automatic focus control is created in step S175d.
  • step S172b, step S172c, and step S172d The same operation as step 172b, step S172c, and step S172d is performed, and the contrast evaluation value C5 is set as the autofocus contrast evaluation value C5p after positive side correction in the memory of the system control unit 131 as shown in the following equation (26). Write.
  • step S175e is executed.
  • step S175e the focus control contrast evaluation value is evaluated. Compares C5pp and C5p, and branches depending on which is the maximum value.
  • A) illustrates the relationship between the actuator operation amount and the contrast evaluation value that maximizes the contrast evaluation value before the positive correction when the camera module according to Embodiment 1 of the present invention performs further positive correction. It is a figure to do. As shown in Fig. 17 (A), the actuator operating amount Vactp-dVact after the previous positive correction gives the almost maximum value of the contrast value C5 for automatic focus control. Actuator manipulated variable Vactf is set to Vactp-dVact.
  • step S175a is executed.
  • FIG. 17 (B) illustrates the relationship between the actuator operation amount and the contrast evaluation value at which the contrast evaluation value after the positive correction is maximized when further positive correction is performed in the camera module according to Embodiment 1 of the present invention. It is a figure to do.
  • the actuator operating amount Vactp after this positive correction or the actuator operating amount Vcorrected after further correction to the positive side Vact force Almost maximum value of contrast evaluation value C5 for automatic focus control Therefore, the actuator operation amount is corrected to the positive side and the maximum value is searched.
  • C5p is saved as C5pp as the previous value.
  • step S176 a contrast evaluation value for autofocus at the time of further negative side correction is created and evaluated.
  • Step S176 also comprises step S176a, step S176b, step S176c, step S176d, and step SI 76e forces.
  • step S176a the actuator operating amount (applied voltage to the coil of the actuator fixing unit 114) after the previous negative correction as shown in the following formula (29): Vactp minus dVact Save the actuator operation amount Vact during correction as V actn in the memory as shown in the following equation (30).
  • step S176b, step S176c, and step S176d are executed.
  • Vact Vactn— dVact ⁇ ⁇ ⁇ (29)
  • step S176b the actuator is operated.
  • step S176c photographing is performed.
  • step S176d a contrast evaluation value for automatic focus control is created. The same operation as step 172b, step S172c, and step S172d is performed, and the contrast evaluation value C5 is set as the autofocus contrast evaluation value C5n after negative side correction in the memory of the system control unit 131 as shown in the following equation (31). Write.
  • step S176e is executed.
  • step S176e the contrast evaluation value for focus control is evaluated. Compares C5np and C5n, and branches depending on which is the maximum value.
  • A) illustrates the relationship between the amount of operation of the actuator and the contrast evaluation value that maximizes the contrast evaluation value before the negative side correction when further negative side correction is performed in the camera module according to Embodiment 1 of the present invention. It is a figure to do. As shown in Fig. 18 (A), the actuator operating amount Vactp + dVact after the previous negative correction gives the almost maximum value of the contrast value C5 for automatic focus control. Actuator manipulated variable Vactf is set to Vactp + dVact.
  • B) is an actuator operation amount that maximizes the contrast evaluation value after the negative side correction in the camera module according to Embodiment 1 of the present invention. It is a figure explaining the relationship between a contrast evaluation value. As shown in Fig. 18 (B), the actuator operating amount Vactn after this negative correction, or the actuator operating amount Vc after further correcting to the negative side Vact force Almost maximum value of contrast evaluation value C5 for automatic focus control Therefore, the actuator manipulated variable is corrected to the negative side and the maximum value is searched. As shown in the following equation (33), C5n is stored as C5np as the previous value.
  • step S181 the final actuator operation amount Vactf obtained above is set as the actuator operation amount Vact as shown in the following equation (34).
  • step S182 is executed.
  • Vact Vactf ⁇ ⁇ ⁇ ⁇ (34)
  • step S182 the actuator is operated. This step is operated in the same way as step S164. Next, step S183 is executed.
  • step S183 photographing is performed. This step is operated in the same manner as step S110. Next, step S184 is executed.
  • step S184 each block is subjected to a visual field correction using the parallax value corresponding to the block, and then combined. This step is operated in the same way as step S151.
  • step S185 is executed.
  • step S185 an image is output. This step is operated in the same manner as S152. Next, step S190 is executed.
  • step S190 the actuator operation amount function correction unit 149 corrects the operation amount function based on the correction value of the contrast type automatic focus control. That is, as shown in the following equation (35), the coefficient kb of the manipulated variable function is corrected, and the value written in the memory of the system control unit 131 is changed. This value is used for the next shooting.
  • step S199 is executed.
  • kb kb + kc-(Vactf-VactO) ⁇ ⁇ ⁇ (35)
  • step SI 99 the process ends.
  • step S161, step S162, step S163, and step S164 the actuator position command Xact is created based on the parallax value Aaf for automatic focus control, Actuator operation amount Vact is calculated, voltage is applied to the coil of the actuator fixing unit 114 to operate the actuator, and automatic focus control is performed.
  • step S161, step S162, step S163, and step S164 the actuator position command Xact is created based on the parallax value Aaf for automatic focus control
  • Actuator operation amount Vact is calculated
  • voltage is applied to the coil of the actuator fixing unit 114 to operate the actuator
  • automatic focus control is performed.
  • focusing can be performed with a single actuator operation, enabling automatic focus control at high speed.
  • step S161, step SI62, step S163, and step S164 the actuator is operated based on the parallax to perform automatic focus control.
  • steps S171, S172, S173, S174, S175, and S176 the actuator is operated based on the contrast to perform automatic focus control.
  • the automatic focus control based on parallax is fast because the focus is achieved by a single actuator operation.
  • the automatic focus control based on contrast determines the in-focus state directly from the image, it has high accuracy without being influenced by variations in the actuators. Therefore, since the coarse adjustment is performed by the automatic focus control based on the high-speed parallax and the fine adjustment is performed by the automatic focus control based on the high-precision contrast, the automatic focus control can be performed at high speed and with high accuracy.
  • the coefficient of the operation amount function is calculated based on the actuator operation amount (Vactf-VactO) corrected in step S190 for the automatic focus control based on the contrast. Learning to correct kb. This makes it possible to more accurately correct the manipulated variable function even if there is variation in the actuator, etc., and the automatic focus control based on parallax becomes more accurate, and the number of fine adjustments by automatic focus control based on the next contrast can be reduced. Since it can be reduced, faster autofocus control is realized.
  • the relative positions of the four object images formed by the first to fourth lens portions 113a to 113d change in accordance with the subject distance A as shown in Expression (1). That is, as subject distance A decreases, parallax ⁇ increases. Therefore, when a plurality of subjects having different distances are simultaneously photographed, the parallax ⁇ differs for each subject.
  • the entire image area is divided into blocks in step S130, the parallax for each block is calculated in step S140, and the parallax is calculated based on the parallax for each block in step S184.
  • Parallax correction is performed by synthesizing images so as to reduce the influence of the image. As a result, even when a plurality of subjects with different distances are simultaneously photographed, the parallax of each subject can be corrected as appropriate, and the effect of the parallax can be reduced in all image areas! .
  • an edge is detected in step S121 and step S122, and is divided into blocks in step S130. This makes it possible to appropriately perform blocking, so that it is possible to obtain a clear image in which the influence of parallax is reduced in the entire image region.
  • the calculated parallax is used as it is, but it may be limited as appropriate.
  • the image becomes unclear. Therefore, if this value is determined as the minimum value of the subject distance A, the maximum value of the parallax ⁇ can be determined. Parallax greater than this value may be ignored as an error. In such a case, use the second smallest parallax evaluation value as the parallax.
  • the parallax is calculated based on the first imaging signal II (mainly green) and the fourth imaging signal 14 (mainly green).
  • the present invention is not limited to this.
  • a purple subject contains a large amount of blue and red components with less green component, so the first image signal II (mainly green) and the fourth image signal 14 (mainly green)
  • the parallax may also be calculated for the second imaging signal 12 (mainly showing blue), the third imaging signal 13 (mainly showing red), and the force.
  • the parallax cannot be calculated from the first parallax signal II (mainly green) and the fourth parallax signal 14 (mainly green), and the second image signal 12 (mainly blue) If the parallax cannot be calculated from the third imaging signal 13 (mainly red), it can be assumed that there is no parallax effect and no parallax is required.
  • the first to the second imaging elements 123a are arranged on the upper side and the third imaging element 123c is arranged on the lower side.
  • the fourth imaging elements 123a to 123d By arranging the fourth imaging elements 123a to 123d, the upper side becomes sensitive to blue and the lower side becomes sensitive to red, so that color reproduction of a landscape photograph can be made more natural.
  • the larger parallax may be adopted. Good. Such a block contains the subject and the background, and since the subject distance and the background distance are different, two extreme values appear. Since the subject distance is small compared to the background distance, the subject parallax is large compared to the background parallax.
  • the larger parallax is adopted, the influence of the parallax of the background cannot be reduced, but the influence of the parallax of the subject that directly affects the image quality can be reduced.
  • the timing of image output is not limited to the above, and preview output may be performed as appropriate.
  • an image without parallax correction may be output after shooting in step S110.
  • the block division of step S130 when one block is divided, the result may be reflected and the preview screen may be updated.
  • the camera module according to Embodiment 1 operates the actuator using parallax in S164, and then S171, S172, S173, S175, and S182. You can only activate the actuator with This is because when a lens with a deep focal depth is used, a slight error is allowed in the distance between the lens and the image sensor, so that it is not necessary to operate the actuator according to the contrast and improve the accuracy.
  • the camera module of Embodiment 1 corrects the correction amount function in S190, that is, performs learning based on the operation amount when the actuator is operated based on the contrast, but even if this step is omitted.
  • the effector of the camera module of the first embodiment is a voice coil type, and the amount of movement of the lens changes due to temperature changes and posture changes, so the accuracy is significantly improved by learning, but when using a stepping motor Since the change in the lens movement amount due to temperature change and posture change is small, learning may be omitted.
  • the actuator may not be operated.
  • the relative distance between the lens and the image sensor is set to a distance at which infinity is focused in advance, and when the parallax is small, it is not necessary to operate the actuator, and the actuator does not have to be operated.
  • the camera module according to Embodiment 2 of the present invention detects the parallax of the edge using the contrast of a plurality of images, calculates the parallax of the entire image area based on the parallax, and reduces the influence of the parallax based on the parallax. By combining images and correcting parallax in this way, an image can be obtained in which the influence of parallax can be reduced in the entire image region.
  • a camera module according to Embodiment 2 of the present invention will be described with reference to the drawings.
  • FIG. 19 is a cross-sectional view showing the configuration of the camera module according to Embodiment 2 of the present invention.
  • the components other than the SLSI 225 of the circuit unit 220 of the camera module 201 are the same as those of the first embodiment, and the same members as those of the portable device 1 are denoted by the same reference numerals and description thereof is omitted.
  • FIG. 20 is a block diagram of the camera module according to Embodiment 2 of the present invention.
  • the SLSI 225 includes a system control unit 231, an image sensor driving unit 132, an imaging signal input unit 133, an actuator operation amount output unit 134, an image processing unit 235, and an input / output unit 136. Further, the circuit unit 220 includes an amplifier 126 in addition to the above-described configuration.
  • the system control unit 231 is configured with power such as a CPU and a memory, and controls the entire SLSI 225.
  • the image processing unit 235 includes a logic circuit and / or a DSP, and performs various types of image processing using the memory information of the system control unit 231.
  • the image processing unit 235 includes a contrast calculation unit 241, an automatic focus control unit 242, an edge parallax calculation unit 243, an entire image region parallax calculation unit 244, and a parallax correction unit 245.
  • the image sensor driving unit 132, the imaging signal input unit 133, the actuator operation amount output unit 134, the input / output unit 136, and the amplifier 126 are the same as those in the first embodiment, and a description thereof is omitted.
  • FIG. 21 is a flowchart showing the operation of the camera module according to Embodiment 2 of the present invention. From the system controller 231 of the SLSI 225, the camera module 201 operates according to this flowchart. [0164] In step S200, the operation is started. For example, when the upper CPU (not shown) detects that a shirt button or the like has been pressed and instructs the camera module to start an operation via the input / output unit 136, the camera module 201 operates. Start. Next, execute step S211.
  • step S211 In step S211, step S212, step S213, step S214, step S215, step S216, and step S217, imaging is performed multiple times, the contrast evaluation value is calculated, and the imaging signal and the contrast evaluation value are stored. .
  • step S211 the counter i is initialized as shown in the following equation (36).
  • step S212 is executed.
  • step S212 an actuator position command Xact is created.
  • the position command Xact indicates a command for the position in the direction toward the subject, based on the focus position of the infinity image.
  • step S213 is executed.
  • step S213 the actuator control amount Vact is calculated using the control amount function based on the actuator position command Xact as shown in the following equation (38). Then step S21
  • Vact ka-Xact + kb ⁇ ⁇ ⁇ (38)
  • step S214 the actuator is operated. This operation is the same as the operation in step S162 in the first embodiment, and a description thereof will be omitted.
  • step S215 is executed.
  • step S215 shooting is performed and the imaging signal is stored.
  • the image sensor driving unit 132 outputs a signal for electronic shutter and transfer as needed.
  • the first imaging signal input unit 133a, the second imaging signal input unit 133b, the third imaging signal input unit 133c, and the fourth imaging signal input unit 133d are synchronized with the signal generated by the imaging element driving unit 132.
  • an image pickup signal that is an analog signal of each image output from the first image pickup device 123a, the second image pickup device 123b, the third image pickup device 123c, and the fourth image pickup device 123d is input, and the CDS Fixed noise is removed and input gain is automatically set by AGC.
  • the analog signal is converted into a digital value by the ADC, and the first imaging signal Il (i, x, y), the second imaging signal I2 (i, x, y ), the third imaging signal I3 ( i, x, y ) and the fourth imaging signal I4 (i, x, y ) are written into the memory at a predetermined address of the system control unit 131 as digital values.
  • FIG. 22 is a diagram for explaining the coordinates of the imaging signal of the camera module according to Embodiment 2 of the present invention. Il (i, x, y) indicates that the i-th imaged signal is the first imaged signal in the X direction in the horizontal direction and y-th in the vertical direction.
  • the number of pixels in the vertical direction of the input image is H
  • the number of pixels in the horizontal direction is L
  • the total number of pixels is HXL
  • X varies from 0 to L—1
  • y varies from 0 to H—1. It changes with.
  • i is a counter indicating that it is an image of the (i + 1) th shot. The same applies to the second imaging signal I2 (i, x, y ), the third imaging signal I3 (i, x, y ), and the fourth imaging signal I4 (i, x, y ).
  • I2 (i, x, y), I3 (i, x, y), and I4 (i, x, y) are respectively X + 1 in the horizontal direction and y in the vertical direction.
  • the second imaging signal, the third imaging signal, and the fourth imaging signal are indicated.
  • the number of pixels in the vertical direction of the input image is H
  • the number of horizontal pixels is L
  • the total number of pixels is HXL
  • X varies from 0 to L—1
  • y varies from 0 to H— Changes to 1.
  • i is a counter indicating that it is an image of the (i + 1) th shot.
  • step S126 is executed.
  • step S216 the contrast calculation unit 241 calculates and stores a contrast evaluation value using data on the memory of the system control unit 231. This calculation is performed only for the first imaging signal II.
  • the Laplacian is calculated as in the following equation (39), and the LPF (low-pass filter) is applied spatially as in the following equation (40) as the contrast evaluation value C2 (i, x, y) . Then, this is written into the memory of the system control unit 231.
  • execute step S217 executes and stores a contrast evaluation value using data on the memory of the system control unit 231. This calculation is performed only for the first imaging signal II.
  • the Laplacian is calculated as in the following equation (39), and the LPF (low-pass filter) is applied spatially as in the following equation (40) as the contrast evaluation value C2 (i, x, y) . Then, this is written into the memory of the system control unit 231.
  • execute step S217 executes step S217.
  • Cl (i, x, y) Il (i, xl, y) + Il (i, x + l, y) + Il (i, x, yl) + Il (i, x, y + l ) -4Il (i, x, y)
  • step S217 the number of shots is checked. Branch off. First, the counter i is incremented by 1 as shown in the following equation (41). If counter i is smaller than Np Step S212 is executed. If the counter i is equal to the number of shots Np, next, step S221 is executed.
  • step S221 and step S222 the automatic focus control unit 242 uses the data on the memory of the system control unit 231 to select an image photographed at the in-focus position.
  • step S221 an autofocus block is created.
  • a rectangular block near the center of the image area is used as the autofocus block. Note that this block does not necessarily need to be near the center, but may reflect the user's intention to operate the camera (for example, the viewpoint direction is detected by a sensor) and the block may be created.
  • step S222 is executed.
  • step S222 an image photographed at the in-focus position is selected.
  • the image taken at the in-focus position has the maximum contrast.
  • an image taken at the in-focus position is selected.
  • the average of the contrast evaluation value C2 (i, x, y) in each photographing in the autofocus block is set as the autofocus control contrast evaluation value C3.
  • represents the total sum in the autofocus block.
  • i which gives the maximum value among C3G
  • ip is an in-focus counter value ip, and shows an image at the in-focus position.
  • step S230 is executed.
  • step S230 the edge parallax calculation unit 243 detects the edge using the data on the memory of the system control unit 231 and detects the parallax.
  • the contrast evaluation value C2 ip, x, y
  • crosses 0 the point at which the value changes to positive and negative, and the value is Point that changes from negative to positive.
  • Equation (44) For the point (xe, ye) on the edge, a rectangular block centered on (xe, ye) is set, and for all the captured images, the following equation (44) is given:
  • C4 (i, xe, ye) be the sum of absolute values of contrast evaluation values C2 (i, x, y).
  • represents the total sum in the set rectangular block.
  • ipe (xe, ye) indicating the in-focus position at the point (xe, ye) on the edge is expressed as C4 (i, xe, ye
  • the maximum value of) is i.
  • Equation (46) the parallax A (xe, ye) at the point (xe, ye) on the edge is expressed by Equation (46) below. It is.
  • step S240 is executed.
  • step S240 the edge parallax calculation unit 244 uses the data in the memory of the system control unit 231 to calculate the parallax ⁇ (xe, ye) force at the point (xe, ye) on the edge as well as the parallax ⁇ in the entire image region. Calculate (x, y).
  • the parallax A (xe, ye) on this edge is adopted as the parallax ⁇ (x, y) of the region surrounded by the parallax ⁇ (xe, ye) on almost the same edge.
  • step S250 is executed.
  • step S250 the parallax correction unit 245 uses the data on the memory of the system control unit 231 to correct the parallax using the parallax A (x, y) in the entire area, and then synthesizes the image. . Then, the result is written in the memory of the system control unit 231. Since the first image sensor 123a and the fourth image sensor 123d mainly receive the green component of the object light, the first image signal II and the fourth image signal 14 are the green component of the object light. Information signal. Further, since the second imaging signal 123b mainly receives the blue component of the object light, the second imaging signal 12 is an information signal of the blue component of the object light.
  • the third imaging signal 123c mainly receives the red component of the object light
  • the third imaging signal 13 is an information signal of the red component of the object light. Since the parallax between the first image sensor 123a and the fourth image sensor 123d at (x, y) is predicted to be ( ⁇ (x, y), ⁇ (x, y)), the following equation (47) Thus, G (x, y) indicating the intensity of green at (x, y) is expressed as the first imaging signal Il (ip, x, y) and the fourth imaging signal I4 (ip, x-A ( x, y), y- A (x, y)).
  • step S260 is executed.
  • G (x, y) [Il (ip, x, y) + I4 (ip, x- ⁇ (x, y), y- ⁇ (x, y))] / 2 ⁇ ⁇ ⁇ (47 )
  • B (x, y) I2 (ip, x- ⁇ (x, y), y) (48)
  • step S260 an image is output. This step is operated in the same manner as S152 in the first embodiment. Next, step S299 is executed.
  • step S299 the process ends.
  • the parallax of the edge is detected using the contrast of a plurality of images, the parallax of the entire image region is calculated based on the parallax, and the parallax correction is performed by synthesizing the images based on the parallax to reduce the influence of the parallax .
  • the parallax correction is performed by synthesizing the images based on the parallax to reduce the influence of the parallax .
  • the parallax of the edge is obtained using the contrast evaluation value of a plurality of shootings, but the present invention is not limited to this.
  • a block centered on a point on the edge to be obtained may be set, the parallax of this block may be obtained by the method used in Embodiment 1, and this parallax may be adopted.
  • some of the points on the edge may be merged, and the parallax may be calculated as a line connecting the points.
  • a linear edge may be divided into end points or branch points to form a plurality of line segments, and the parallax thereof may be calculated.
  • a block including the periphery of this line segment may be created, and the parallax of this block may be obtained by the method used in the first embodiment. Further, the parallax obtained with the contrast evaluation value power may be combined with the visual difference obtained with the method used in the first embodiment. For example, the average parallax may be used, or the coefficient of the actuator manipulated variable function may be learned.
  • Embodiment 1 and Embodiment 2 although the blocks are divided based on the edge information, the present invention is not limited to this. For example, it may be divided into a plurality of rectangular blocks.
  • the camera module divides the imaging region into blocks, calculates the parallax for each block, and calculates the parallax based on the contrast value calculated for each block and the correlation of the image moved by the parallax. evaluate. When the correlation is large and the contrast is large, it is determined that the obtained parallax is correct, and normal parallax correction is performed based on the parallax. And the correlation is small When the contrast is small, it is judged that the obtained parallax is low accuracy, and parallax correction for low contrast is performed.
  • FIG. 23 is a cross-sectional view showing the configuration of the camera module according to Embodiment 3 of the present invention.
  • the components other than the SLSI 325 of the circuit unit 320 of the camera module 301 are the same as those in the first embodiment, and the same members as those in the first embodiment are denoted by the same reference numerals and the description thereof is omitted.
  • FIG. 24 is a block diagram of a camera module according to Embodiment 3 of the present invention.
  • the SLSI 225 includes a system control unit 331, an imaging element driving unit 132, an imaging signal input unit 133, an actuator operation amount output unit 134, an image processing unit 335, and an input / output unit 136.
  • the circuit unit 320 includes an amplifier 126 in addition to the above-described configuration.
  • the image processing unit 335 includes a logic circuit, a DSP (Digital Signal Processor), or both, and performs various types of image processing using the memory information of the system control unit 331. .
  • the image processing unit 335 includes an automatic focus control unit 341, a block division unit 342, a parallax calculation unit 343, a correlation calculation unit 344, a contrast calculation unit 345, a block re-division unit 346, a normal parallax correction unit 347, and a low-contrast parallax correction. 348 and a low correlation parallax correction unit 349.
  • FIG. 25 is a flowchart showing the operation of the camera module according to Embodiment 3 of the present invention. From the system control unit 331 of the SLSI 325, the camera module 301 operates according to this flowchart.
  • the host CPU detects that a shutter button (not shown) or the like has been pressed, and instructs the camera module 301 to start an operation via the input / output unit 136. Starts operation.
  • step S3100 is executed.
  • step S3100 the automatic focus control unit 341 executes automatic focus control.
  • Figure FIG. 26 is a flowchart showing the operation of automatic focus control according to Embodiment 3 of the present invention. The flowchart in FIG. 26 shows details of the operation in step S3100.
  • step S3121 is executed.
  • step S3121 counter i is initialized to zero.
  • step S3122 is executed.
  • step S3122 an actuator position command is calculated.
  • Actuator position command Xact is calculated using counter i as shown in equation (50) below.
  • the position command Xact indicates a position command in which the direction toward the subject is positive with reference to the focus position of the infinity image. Where is the set value.
  • step S3123 is executed.
  • step S3123 the actuator manipulated variable (the voltage applied to the coil of the actuator movable unit 115) Vact is calculated using the manipulated variable function expressed by the following equation (51).
  • ka and kb are respectively set values.
  • step S3124 is executed.
  • Vact ka ⁇ Xact + kb ⁇ ⁇ ⁇ (51)
  • step S3124 the actuator is operated.
  • the actuator operation amount output unit 134 changes the output voltage signal so that the voltage applied to the coil (not shown) of the actuator movable unit 115 via the amplifier 126 becomes Vact.
  • step S3125 executes step S3125.
  • step S3125 shooting is performed.
  • the imaging element driving unit 132 outputs a signal for electronic shutter and transfer as needed.
  • the first imaging signal input unit 133a, the second imaging signal input unit 133b, the third imaging signal input unit 133c, and the fourth imaging signal input unit 133d are synchronized with the signal generated by the imaging element driving unit 132.
  • FIG. 12 shows an embodiment of the present invention. 6 is a diagram for explaining coordinates of an imaging signal of the camera module according to the first aspect.
  • Il (x, y) indicates the first image signal that is Xth in the horizontal direction and yth in the vertical direction.
  • the number of pixels in the vertical direction of the input image is H
  • the number of pixels in the horizontal direction the total number of pixels is HXL
  • X varies from 0 to L—1
  • y varies from 0 to H—1.
  • Change. The same applies to the second imaging signal I2 (x, y), the third imaging signal I3 (x, y), and the fourth imaging signal I4 (x, y). That is, I2 (x, y), I3 (x, y), and I4 (x, y) are respectively the Xth image in the horizontal direction and the yth image signal in the vertical direction, the third image signal, And the fourth image signal.
  • step S3126 is executed.
  • an automatic focus control block is set.
  • a rectangular area near the center of the image area is used as an autofocus control block.
  • this block does not necessarily need to be near the center, but may reflect the user's intention to operate the camera (for example, the viewpoint direction is detected by a sensor), and the block may be set.
  • a plurality of blocks may be selected instead of a single block, and an average of contrast evaluation values for automatic focus control described later may be used in the plurality of blocks.
  • a contrast evaluation value for automatic focus control described later may be calculated in a plurality of blocks, and at least one block may be selected later as an automatic focus control block.
  • step S3127 is executed.
  • step S3127 using the data in the memory of the system control unit 331, a contrast evaluation value for automatic focus control is created. This calculation is performed for the pixels of the automatic focus control block of the first imaging signal II. Calculate the absolute value of the Laplacian, which is the sum of the 2nd floor of the X and y directions, as shown in the following equation (52), and spatially LPF (single pass filter. Low as shown in the following equation (53).
  • step S3128 is executed.
  • step S3128 the contrast evaluation value C3 is written into the memory of the system control unit 331 as C3 (i) as shown in the following equation (55).
  • step S3129 is executed.
  • step S3129 1 is added to the counter i as shown in the following formula (56).
  • step S3130 is executed.
  • step S3130 the counter i is compared with the threshold value Saf, and the result is branched.
  • step 3122 is executed.
  • step S3140 is executed.
  • the counter i is initialized to 0 in step S3121, 1 is added to the counter i in step S3129, and step S3130 is executed at the counter i to branch to the S3122 force to S3128. Repeat Saf times.
  • step S3140 the contrast evaluation value C3 is evaluated. As shown in Fig. 9, the contrast evaluation value C3 is maximized at the in-focus position. As shown in the following equation (57), the counter value i giving this maximum value is set as the counter value iaf giving the maximum contrast value.
  • step S3151 is executed.
  • step S3151 the position command of the actuator is calculated.
  • the actuator position command Xact is calculated using the counter value iaf that gives the maximum contrast value. Note that the position command Xact indicates a command with a positive directional force on the subject, based on the focus position of the infinity image.
  • step S3152 is executed.
  • step S3152 the actuator manipulated variable (actuator variable) using the manipulated variable function.
  • the voltage applied to the coil of the data mover 115) Vact is calculated. This operation is the same as that in step S3123, and a description thereof will be omitted.
  • step S3153 is executed.
  • step S3153 the actuator is operated. This operation is the same as that in step S3124, and a description thereof will be omitted.
  • step S3160 is executed.
  • step S3160 the automatic focus control is terminated, and the process returns to the main routine. Therefore, next, step S3200 of FIG. 25 is executed.
  • step S3200 parallax correction is executed.
  • FIG. 27 is a flowchart showing a parallax correction operation according to Embodiment 1 of the present invention. The flowchart in FIG. 27 shows details of the operation of step S3200.
  • step S3220 is executed.
  • step S3220 photographing is executed.
  • the imaging element driving unit 132 In response to a command from the system control unit 131, the imaging element driving unit 132 outputs a signal for electronic shutter and transfer as needed.
  • the first imaging signal input unit 133a, the second imaging signal input unit 133b, the third imaging signal input unit 133c, and the fourth imaging signal input unit 133d are synchronized with the signal generated by the imaging element driving unit 132.
  • FIG. 12 is a diagram for explaining the coordinates of the imaging signal of the camera module according to Embodiment 1 of the present invention.
  • Il (x, y) indicates the first image signal that is Xth in the horizontal direction and yth in the vertical direction.
  • the number of pixels in the vertical direction of the input image is H
  • the number of pixels in the horizontal direction the total number of pixels is HXL
  • X varies from 0 to L—1
  • y varies from 0 to H—1.
  • Change. The same applies to the second imaging signal I2 (x, y), the third imaging signal I3 (x, y), and the fourth imaging signal I4 (x, y). That is, I2 (x, y), I3 (x, y), and I4 (x, y) are respectively the Xth image in the horizontal direction and the yth image signal in the vertical direction, the third image signal, And the fourth image signal.
  • step S3230 is executed.
  • step S3230 the block division unit 342 uses the data in the memory of the system control unit 331 to perform block division. Then, the result is written in the memory of the system control unit 331.
  • FIG. 28 is a diagram for explaining block division in the camera module according to Embodiment 3 of the present invention. As shown in FIG. 28, the first imaging signal II is divided into M blocks in the horizontal direction, N blocks in the vertical direction, and M X N in total, and each block is denoted by Bi. Here, i varies from 0 to M X N ⁇ 1. Next, step S3240 is executed.
  • FIG. 29 is a diagram for explaining the calculation area of the parallax evaluation value in the camera module according to Embodiment 3 of the present invention.
  • a region indicated by Bi is the i-th block obtained in step S3230 from the first imaging signal II.
  • the region indicated by 14 is a region moved from Bi by k in the X direction and by k in the y direction. Then, for all image signals Il (x, y) and I4 (xk, yk) in each area, the absolute value difference sum shown in the following equation (59) is calculated as the visual evaluation value Ri (k).
  • Ri (k)
  • step S3251 the correlation calculation unit 344 uses the data on the memory of the system control unit 331 to calculate a correlation value for evaluation of parallax accuracy for each block. Then, the result is written in the memory of the system control unit 131.
  • FIG. 30 is a diagram for explaining the calculation area of the correlation value for evaluation of parallax accuracy in the camera module according to Embodiment 3 of the present invention.
  • a region denoted by Bi (also denoted by II) is the i-th block obtained in step S1230 from the first imaging signal II.
  • the area indicated by 14 is an area where Bi is moved by ⁇ in the X direction and by ⁇ in the y direction.
  • step S3252 is executed.
  • R2i ⁇ ⁇ Il (x, y) -avg (ll (x, y)) ⁇ X ⁇ 4 ( ⁇ - ⁇ i, y- ⁇ i) — avg (I4 (x— ⁇ i, y - ⁇ i)) ⁇
  • step S3252 the parallax correction method for each block Bi is selected based on the correlation value R2i for parallax accuracy evaluation. As shown in the following equation (61), when the correlation value R for parallax accuracy evaluation is larger than the threshold value R20, 1 indicating normal parallax correction is substituted into the parallax correction method flag Fi and stored in the memory of the system control unit 331. . Next, step S3261 is executed.
  • step S3261 the contrast calculation unit 345 uses the data on the memory of the system control unit 331 to calculate the parallax accuracy evaluation contrast value for each block. Then, the data is written into the memory of the system control unit 331. Calculate the absolute value of the Laplacian, which is the sum of the second derivative in the X and y directions, as shown in the following equation (62), and spatially L PF (low-pass filter, as shown in the following equation (63).
  • step S3262 is executed.
  • step S3262 the parallax correction method for each block Bi is selected based on the contrast evaluation value C6i for parallax accuracy evaluation.
  • the system control unit Save to 331 memory.
  • step S3271 is executed.
  • step S3271 it is determined whether or not it is necessary to re-divide the block based on the parallax correction method flag and the size of the block, and the process branches according to the determination result. If the parallax correction method flag Fi of at least one block is 3 and the number of pixels of the smallest block among all the blocks Bi is larger than SO, it is determined that the block needs to be subdivided ( If the determination result in step S1271 is Yes), next, step S3272 is executed.
  • step S3280 executes step S3280.
  • step S3272 the block re-dividing unit 346 re-divides the block using the data on the memory of the system control unit 331.
  • FIG. 31 (A) is a diagram for explaining a state before block re-division in the camera module according to Embodiment 3 of the present invention
  • FIG. 31 (B) is a diagram illustrating the embodiment of the present invention.
  • 4 is a diagram for explaining a state after block re-division in the camera module according to FIG. 3.
  • the operation is repeated until the smallest block size of all the blocks becomes SO, or until the parallax correction method flag Fi power ⁇ or 2 of all the blocks.
  • the size of the block and the block number are changed by subdivision of the block after step S3240 and step S3272, the operation of these steps is appropriately changed.
  • step S3271 when the determination result in step S3271 is N (that is, when execution of step S3280 is started), the disparity for all blocks Bi including the block divided in step S3272
  • the correction method flag Fi is assigned 1 indicating normal parallax correction, 2 indicating low contrast parallax correction, or 3 indicating low correlation parallax correction.
  • the normal parallax correction unit 347, the low-contrast parallax correction unit 348, and the low-correlation parallax correction unit 349 use the data in the memory of the system control unit 331, and set the parallax correction method flag Fi for each block. Parallax correction according to the value of The image is synthesized and the result is written in the memory of the system control unit 331.
  • FIG. 32 is a diagram illustrating the relationship between the parallax accuracy evaluation correlation value R2i and the parallax correction method flag Fi in the camera module according to Embodiment 3 of the present invention.
  • the correlation value R2i for evaluating the parallax accuracy obtained in step S3251 is the first imaging signal Il (x, y) in the i-th block Bi and the fourth imaging that has moved by the parallax ⁇ ⁇ in the X and y directions.
  • the imaging signal Il (x, y) in FIG. 4 is similar to the fourth imaging signal ⁇ 4 ( ⁇ i, y ⁇ i) moved by the parallax ⁇ i. This is because, in the i-th block Bi, the accuracy of the parallax is high and the fourth imaging signal ⁇ 4 ( ⁇ - ⁇ i, which has moved by the parallax ⁇ and the first imaging signal Il (x, y) It shows that only subjects with the same distance from y- ⁇ i) exist.
  • the image pickup signal in the i-th block Bi can be reproduced by moving the fourth image pickup signal 14 by ⁇ i in the X direction and by ⁇ i in the y direction.
  • the second image signal 12 has a parallax effect only in the X direction
  • the third image signal 13 has a parallax effect only in the y direction
  • the second image signal 12 is only ⁇ ⁇ in the X direction.
  • the blue imaging signal in block Bi can be reproduced by moving, and the red imaging signal in block Bi can be reproduced by moving in the third imaging signal 13 direction by ⁇ .
  • the normal parallax correction unit 347 uses the data on the memory of the system control unit 331 and uses the parallax value corresponding to the block for each block. After correcting the parallax, the images are combined. Then, the result is written in the memory of the system control unit 331. Since the first imaging device 123a and the fourth imaging device 123d mainly receive the green component of the object light, the first imaging signal II and the fourth imaging signal 14 are information on the green component of the object light. Signal. Further, since the second image sensor 123b mainly receives the blue component of the object light, the second image pickup signal 12 is an information signal of the blue component of the object light. No.
  • the third imaging signal 13 is an information signal of the red component of the object light. Since the parallax between the first image sensor 123a and the fourth image sensor 123d is predicted to be (A i, A i) in the i-th block Bi, the pixel is expressed by the following equation (67). G (x, y) indicating the intensity of green at the coordinates ( x , y), the first imaging signal Il (x, y), and the fourth imaging signal ⁇ 4 ( ⁇ - ⁇ ⁇ , ⁇ - ⁇ ⁇ ) The average of. By taking the average in this way, the influence of random noise can be reduced.
  • G (x, y) [Il (x, y) + I4 (x- ⁇ i, y- ⁇ i)] / 2 ⁇ ⁇ ⁇ (67)
  • FIG. 33 is a diagram for explaining the relationship between the parallax accuracy evaluation contrast evaluation value and the parallax correction method flag in the camera module according to Embodiment 3 of the present invention.
  • the contrast evaluation value C6 for parallax accuracy evaluation obtained in step S3261 becomes large when the first imaging signal Il (x, y) in the i-th block Bi is clear, i.e., shows an image with a large change in shading. It is close to 0 when it shows a blurred image, that is, an image with little change in shading.
  • the first imaging signal Il (x, y) in the i-th block Bi is shown.
  • the image is an image with little shading and little change. Therefore, it can be determined that the noise component with respect to the signal component increases and the accuracy of the parallax ⁇ ⁇ is poor.
  • the image is small in shade, there is no practical problem even if a small amount of error is included in the reproduced image. Therefore, the color is reproduced mainly based on the information of the first imaging signal Il (x, y).
  • the color may be reproduced based on the information of the second imaging signal I2 (x, y), the third imaging signal I3 (x, y), or the fourth imaging signal I4 (x, y). .
  • red, blue and In comparison, green has the highest visual sensitivity, so it may be based on the first imaging signal Il (x, y) or the fourth imaging signal I4 (x, y), which has information on the green component of the object light. preferable.
  • the first imaging signal Il (x, y) or the fourth imaging signal I4 (x, y) alone.
  • the low-contrast parallax correction unit 348 uses the data in the memory of the system control unit 331 and uses the parallax value corresponding to the block for each block. After parallax correction, the image is synthesized. Then, the result is written in the memory of the system control unit 331. Since the first image sensor 123a and the fourth image sensor 123d mainly receive the green component of the object light, the first image signal II and the fourth image signal 14 represent the green component of the object light. Information signal. Further, since the second imaging element 123b mainly receives the blue component of the object light, the second imaging signal 12 is an information signal of the blue component of the object light.
  • the third imaging element 123c mainly receives the red component of the object light
  • the third imaging signal 13 is an information signal of the red component of the object light.
  • the parallax between the first image sensor 123a and the fourth image sensor 123d is predicted to be (A i, A i), but the error is expected to be large.
  • G (x, y) indicating the green intensity at the pixel coordinates (x, y) is defined as the first imaging signal Il (x, y).
  • B (x, y) indicating the intensity of blue is multiplied by the proportional coefficient kB to the first imaging signal Il (x, y).
  • the proportional coefficient kB is a constant.
  • the proportional coefficient kB can be changed for each block Bi.
  • the second image signal I2 (x, y) for the center value of the block Bi of the first image signal Il (x, y).
  • the ratio of the center value of the block Bi of the first image signal Il (x, y) and the second image signal ⁇ 2 ( ⁇ - The ratio of the center value of block Bi in ( ⁇ i, y), the ratio of the average of the second imaging signal I2 (x, y) to the average of the first imaging signal Il (x, y) in block Bi,
  • the average ratio of the second imaging signal I2 (x ⁇ A i, y) moved in the X direction by the parallax ⁇ i with respect to the average of the first imaging signal Il (x, y) of the block Bi may be used.
  • R (x, y) indicating the intensity of red is obtained by multiplying the first imaging signal Il (x, y) by a proportional coefficient kR.
  • the proportionality coefficient kR is a constant. Note that the proportionality coefficient kR may be changed for each block Bi.
  • Is predicted to be (A i, 0), and B (x, y) indicating the blue intensity at the pixel coordinates ( x , y) is expressed by the second imaging signal I2 as shown in equation (68).
  • (x-A i, y), and the first image sensor 123a and the third Since the parallax of the image element 123c is predicted to be (0, A i), R (x, y) indicating the red intensity in (x, y) is expressed by the third equation (69). It can also be used as the imaging signal I3 (x, y- ⁇ i).
  • the threshold value R20 is set to a value close to 1 (for example, 0.9) and the correlation value R2i for evaluating the parallax accuracy is smaller than this
  • the first imaging signal in the block Bi of the mesh It can be determined that the fourth imaging signal) 4 ( ⁇ - ⁇ i, y- ⁇ i) moved by Il (x, y) and the parallax ⁇ is similar. This indicates that the i-th block Bi includes a plurality of subjects with different subject distances and the parallax ⁇ cannot be applied to all subjects.
  • FIG. 34 is a flowchart showing operations of the low correlation parallax correction unit 349 according to Embodiment 3 of the present invention.
  • step S3310 the operation of the low correlation parallax correction unit 349 is started.
  • step S3320 Execute step S3320.
  • a contrast evaluation value for edge detection is calculated. This calculation is performed only for the first imaging signal II.
  • the Laplacian is calculated as shown in the following equation (73), and the LPF (low-pass filter) is applied spatially as shown in the following equation (74) to obtain the edge evaluation contrast evaluation value C8 (x, y).
  • FIG. 35 (A) is an original image illustrating edge detection of the low correlation parallax correction unit 349 of the camera module according to Embodiment 3 of the present invention
  • FIG. 35 (B) is an embodiment of the present invention.
  • 4 is an image of a contrast evaluation value for edge detection illustrating edge detection of a low correlation parallax correction unit 349 of the camera module according to FIG.
  • step S3330 is executed.
  • C7 (x, y) Il (x-l, y) + Il (x + l, y) + Il (x, y-l) + Il (x, y + l) -4Il (x, y)
  • FIG. 35 (C) is an edge image for explaining edge detection of the low correlation parallax correction unit 349 of the camera module according to Embodiment 3 of the present invention.
  • step S3340 the block is subdivided.
  • numbers such as 8; 1, 8] +1, ⁇ ⁇ + ⁇ are assigned to the area surrounded by the edges.
  • j, j + l,... J + n are unused as numbers indicating blocks.
  • the edge may be corrected using an expansion algorithm or a contraction algorithm in order to prevent erroneous detection or disappearance of the edge due to noise or the like.
  • step S3350 is executed.
  • step S3350 a disparity value for each block is calculated. This behavior is a step This is the same as S3240, and the description is omitted.
  • step S3360 is executed.
  • step S3360 the parallax is corrected and the image is synthesized. This operation is the same as the operation of the normal parallax correction unit 347, and a description thereof is omitted.
  • step S3370 executes step S3370.
  • step S3670 the low correlation parallax correction operation ends.
  • step S3280 is operated, and then step S3290 is executed.
  • step S3290 the parallax correction is terminated and the process returns to the main routine. That is, next, Step S3800 shown in FIG. 25 is executed.
  • step S3800 an image is output.
  • the input / output unit 136 receives G (x, y), B (x, y), and R (x, y), which are data on the memory of the system control unit 331, from an upper CPU (not shown) or an external display device. (Not shown).
  • G ( X , y), B ( X , y), R (x, y) for example, outputs such as luminance and chromaticity signals may be output.
  • values after image processing such as white balance and gamma correction may be output.
  • data with lossy compression or lossy compression such as JPEG may be output. A plurality of them may be output.
  • S3900 is executed.
  • step S3900 the operation is terminated.
  • the relative positions of the four object images formed by the first to fourth lens portions 113a to 113d change in accordance with the subject distance A as shown in Expression (1). That is, as subject distance A decreases, parallax ⁇ increases. Therefore, when a plurality of subjects having different distances are simultaneously photographed, the parallax ⁇ differs for each subject.
  • the entire image region is divided into blocks in step S3230, the parallax for each block is calculated in step S3240, and the influence of the parallax is based on the parallax for each block in step S3280.
  • Parallax correction is performed by synthesizing images so as to reduce. As a result, even when a plurality of subjects having different distances are simultaneously photographed, it is possible to appropriately correct the parallax of each subject and obtain an image in which the influence of the parallax can be reduced in the entire image region.
  • step S3230 the whole image area is divided into rectangular blocks in step S3230, and the parallax for each block is calculated in step S3240.
  • step S3280 parallax correction is performed by combining images so as to reduce the influence of parallax based on the parallax for each block.
  • a plurality of objects with different subject distances may be included in the block divided in step S3230.
  • the parallax is different for each object image.
  • the parallax accuracy evaluation correlation value R2i is calculated in step S3251
  • the parallax accuracy evaluation correlation value R2i is evaluated in step S3252
  • the accuracy of the parallax ⁇ ⁇ is evaluated.
  • the contrast evaluation value C6i for parallax accuracy evaluation is calculated in S3261
  • the accuracy of the parallax ⁇ ⁇ is evaluated by evaluating the contrast evaluation value C6i for parallax accuracy evaluation in step S 3262
  • the parallax correction method flag Fi is set. Then, determine the parallax correction method.
  • the image can be corrected by an optimal correction method for each block, and a clear image in which the influence of parallax is further reduced in the entire image region can be obtained.
  • the contrast evaluation value C6i for parallax accuracy evaluation is calculated in step S3261, and the accuracy of the parallax ⁇ S calculated for each block in step S3262 is accurate.
  • the image can be corrected by an optimal correction method for each block, it is possible to obtain a clear image in which the influence of the parallax is further reduced in the entire image region.
  • the correlation value R2i for parallax accuracy evaluation is calculated in Step S3251.
  • the correlation value R2i for evaluating the parallax accuracy is one of the parallax system evaluation values that represents the accuracy with which the difference calculated for each block represents the accuracy, and represents the correlation between the images that have moved by the parallax. It is.
  • the correlation value R2i for parallax accuracy evaluation is large in step S3252, normal parallax correction is performed in step S3280 !, and when the correlation value R2i for parallax accuracy evaluation is small, parallax correction for low correlation is performed in step S3280 Do.
  • the image can be corrected with an optimal correction method for each block, so that the parallax can be applied to the entire image area. It is possible to obtain a clear image in which the influence of the above is further reduced.
  • the correlation value R2i for parallax accuracy evaluation is calculated in step S3251.
  • the correlation value R2i for evaluating the parallax accuracy is one of the parallax system evaluation values that represents the accuracy with which the difference calculated for each block represents the accuracy. It is.
  • step S3280 normal parallax correction is performed in step S3280 !
  • step S3272 when the correlation value R2i for parallax accuracy evaluation is small, step S3272 and the low correlation parallax correction unit 349 in step S3280
  • the block is subdivided and parallax correction is performed for each subdivided block. In other words, blocks that are determined to have low correlation are subdivided. As a result, the image can be corrected by an optimal correction method for each block, and a clear image in which the influence of parallax is further reduced in the entire image region can be obtained.
  • the correlation value R2i for parallax accuracy evaluation is calculated in Step S3251.
  • the correlation value R2i for evaluating the parallax accuracy is one of the parallax system evaluation values that represents the accuracy with which the difference calculated for each block represents the accuracy, and represents the correlation between the images that have moved by the parallax. It is.
  • a contrast evaluation value C6i for parallax accuracy evaluation is calculated.
  • the contrast evaluation value C6i for evaluating the parallax accuracy is one of the parallax system evaluation values representing the accuracy with which the calculated parallax is accurate, and is a value representing how high the contrast is.
  • step S3280 When the correlation value R2i for parallax accuracy evaluation is large and the contrast evaluation value C & for evaluation of parallax accuracy is large, normal parallax correction is performed in step S3280, and the correlation value R2i for parallax accuracy evaluation is small and the contrast evaluation value C & When it is small, parallax correction for low contrast is performed in step S3280, and when the correlation value R2i for parallax accuracy evaluation is small and the contrast evaluation value C6i for parallax accuracy evaluation is large, in step S3272, and in the parallax correction unit 349 for low correlation in step S3280 The block is subdivided and parallax correction is performed for each subdivided block.
  • the blocks determined to have low correlation and high contrast are subdivided.
  • the image can be corrected by an optimal correction method for each block, the influence of the parallax can be further reduced in the entire image region, and a correct image can be obtained.
  • the timing of image output is not limited to the above, and Preview output may be performed.
  • an image without parallax correction may be output during the automatic focus control in step S3100.
  • the preview screen may be updated without performing parallax correction on the other blocks that can be parallax-corrected.
  • the edge evaluation contrast evaluation value C8 (x, y) is calculated as shown in equation (74) in step S3320, and the zero cross force is also detected in step S3330. It is not limited to this.
  • a histogram in a block may be created, and the block may be divided by binary values using the minimum value as a threshold value.
  • a plurality of threshold values may be provided. You can also detect edges using the absolute value of the first derivative.
  • parallax is obtained for each field and image synthesis is performed, and a synthesized image for each field is synthesized to be a final image.
  • the parallax for each field is correctly corrected even when the image of each field differs due to the shooting time of each field when shooting a moving subject. Therefore, since the image can be synthesized using this parallax, it is possible to obtain a beautiful image in which the influence of the parallax is further reduced in the entire image region.
  • FIG. 36 is a cross-sectional view showing the configuration of the camera module according to Embodiment 4 of the present invention.
  • the components other than the SLSI 425 of the circuit unit 420 of the camera module 401 are the same as those in the first embodiment, and the same members as those in the first embodiment are denoted by the same reference numerals and the description thereof is omitted.
  • FIG. 37 is a block diagram of a camera module according to Embodiment 4 of the present invention.
  • the SLSI 425 includes a system control unit 431, an image sensor driving unit 132, an imaging signal input unit 133, an actuator operation amount output unit 134, an image processing unit 435, and an input / output unit 136.
  • the circuit unit 420 includes an amplifier 126 in addition to the above-described configuration.
  • the image processing unit 435 is a logic circuit or DSP (digital signal processor. Digital (Signal Processor) or both of them, and uses the memory information of the system control unit 431 to perform various image processing.
  • the image processing unit 435 includes an automatic focus control unit 341, a block division unit 342, a parallax calculation unit 343, a correlation calculation unit 344, a contrast calculation unit 345, a block subdivision unit 346, a normal parallax correction unit 347, and a low-contrast parallax correction. 348, a low correlation parallax correction unit 349, and a frame image creation unit 451.
  • FIG. 38 (A) to FIG. 38 (D) are diagrams illustrating a field image according to the camera module of Embodiment 4 of the present invention.
  • the first field image and the second field image are alternately arranged.
  • an imaging signal constituting the first field image is transferred, and then an imaging signal constituting the second field image is transferred.
  • the entire image is reproduced by alternately arranging them line by line.
  • the width of the entire image (frame image) is L and the height is H as shown in Fig. 38 (B)
  • the first field image and the first image are displayed as shown in Figs. 38 (C) and 38 (D).
  • the width of field image 2 is L and the height is HZ2.
  • FIG. 39 is a flowchart showing the operation of the camera module according to Embodiment 4 of the present invention.
  • FIG. 40 is a time chart showing the operation of the camera module according to Embodiment 4 of the present invention. is there.
  • the camera module 401 is operated by the system control unit 431 of the SLSI 425 as shown in the flowchart and the time chart.
  • Step S4000 starts the operation! For example, the host CPU (not shown) detects that the shutter button (not shown) or the like has been pressed, and instructs the camera module 401 to start the operation via the input / output unit 136. Starts operation. Next, step S4100 is executed.
  • step S4100 the automatic focus control section 341 executes automatic focus control. This operation is the same as that in step S3100 of the third embodiment, and a description thereof is omitted. However, as shown in FIG. 40, since only the first field is transferred and only the first field image is used, a change is appropriately made. Therefore, compared to the case where the entire image (the first field and the second field) is transferred, the time required for the transfer is substantially halved, so that the time required for automatic focus control can be shortened accordingly.
  • step S4200 is executed.
  • step S4200 the first field parallax correction is performed. This behavior is This is the same as step S3200 in the third embodiment, and a description thereof is omitted. However, as shown in Figure 40, only the first field is transferred, only the first field image is used, Rfl ( X , y) indicating the red intensity of the first field, and the green intensity. Appropriate changes will be made to produce Gfl (x, y) indicating B and Bfl (x, y) indicating blue intensity. Next, execute step S4300.
  • step S4300 the parallax correction of the second field is executed. This operation is the same as that in step S3200 of the third embodiment, and a description thereof is omitted. However, as shown in Figure 40, only the second field is transferred, only the second field image is used, R12 ( X , y), which indicates the red intensity of the second field, and the green intensity Appropriate changes are made to create Gf2 (x, y) indicating B and Bf2 (x, y) indicating blue intensity.
  • step S4400 is executed.
  • Rfl (x, y) indicating the red intensity of the first frame is set as R (x, 2 * y) indicating the red intensity of even-numbered rows of the frame image
  • Ri2 (x, y) indicating the red intensity of the second frame is set to R (x, 2 * y + 1) indicating the red intensity of the odd-numbered row of the frame image.
  • Gfl (x, y) indicating the green intensity of the first frame is set to G (x, 2 * y) indicating the green intensity of the even-numbered row of the frame image
  • Gf2 (x, y) indicating the green intensity of the second frame is set to G (x, 2 * y + 1) indicating the green intensity of the odd-numbered row of the frame image.
  • Bfl (x, y) indicating the blue intensity of the first frame is set to B (x, 2 * y) indicating the blue intensity of the even-numbered row of the frame image
  • Bf2 (x, y) indicating the blue intensity of the second frame is set to B (x, 2 * y + 1) indicating the blue intensity of the odd-numbered row of the frame image.
  • X is changed from 0 to L
  • y is changed from 0 to H / 2 ⁇ 1.
  • R (x, 2 * y) Rfl (x, y)... (75)
  • B (x, 2 * y) Bfl (x, y) (79)
  • B (x, 2 * y + l) B12 (x, y) (80)
  • step S4800 an image is output. This operation is the same as in the third embodiment, and a description thereof is omitted. Next, S4900 is executed.
  • step S4900 the operation ends.
  • the camera module of the fourth embodiment has the same effects as those of the third embodiment.
  • the camera module of Embodiment 4 obtains the parallax of the first field in step S4200, performs the parallax correction based on the obtained parallax, and outputs the image (Rfl, Gfl , Bfl).
  • step S4300 the parallax of the second field is obtained, and parallax correction is performed based on the obtained parallax to create an image (R12, Gf2, Bf2).
  • a combined image for each field is combined to form a final image.
  • the camera module of Embodiment 4 has a force in which the number of fields is two. There may be more fields (eg, 3 fields, 4 fields).
  • the camera module of the fourth embodiment may prepare the region of the 1S frame image in which the image of each field is created and substitute it directly. Also, disparity information of each field may be stored, and a frame image may be created directly without creating a field image.
  • the camera module of Embodiment 4 includes a first color filter 124a, a second color filter 124b, and a third color filter, as shown in FIGS. 41 (A) and 41 (B), respectively.
  • the filter 124c and the fourth color filter 124d two color filters adjacent in the X direction may have spectral transmission characteristics that mainly transmit green.
  • FIGS. 41A to 41C the colors transmitted by the respective color filters are indicated by R, G, and B symbols in the figure.
  • the image sensor 123 is adjacent in the X direction.
  • the two image sensors that is, the first image sensor 123a and the second image sensor 123b, or the third image sensor 123c and the fourth image sensor 123d) receive the green component of the object light. It will be.
  • the first color filter 124a, the second color filter 124b, the third color filter 124c, and the fourth color filter 124d are arranged, and the X direction is set.
  • Two color filters adjacent to may have a spectral transmission characteristic that mainly transmits green. Note that when four color filters are arranged as shown in FIG. 41C, the first lens portion 113a, the second lens portion 113b, the third lens portion 113c, and the fourth lens portion in the lens 113.
  • the lens portion 113d is arranged so that the optical axis coincides with the centers of these color filters.
  • the first image sensor 123a, the second image sensor 123b, the third image sensor 123c, and the fourth image sensor 123d in the image sensor 123 are also combined with the arrangement of the lens units in the lens unit 113. Be placed.
  • the first imaging signal II, the second imaging signal 12, and the power parallax are appropriately changed.
  • FIG. 41A to FIG. 41C show examples of preferable color filter arrangements, and the embodiment of the present invention is not limited to this.
  • the B and R force filter positions may be reversed!
  • a block having a small parallax, that is, a large subject distance is recognized as a background, and is replaced with another image such as a background image stored in advance.
  • another image such as a background image stored in advance.
  • FIG. 42 is a cross-sectional view showing the configuration of the camera module according to Embodiment 5 of the present invention.
  • the components other than the SLSI 525 of the circuit unit 520 of the camera module 501 are the same as those in the first embodiment, and the same members as those in the first embodiment are denoted by the same reference numerals and the description thereof is omitted.
  • FIG. 43 is a block diagram of a camera module according to Embodiment 5 of the present invention.
  • the SLSI 525 includes a system control unit 531, an image sensor driving unit 132, an imaging signal input unit 133, an actuator operation amount output unit 134, an image processing unit 535, an input / output unit 136, and a background image storage unit 551.
  • the circuit unit 520 includes an amplifier 126 in addition to the above structure.
  • the image processing unit 535 includes a logic circuit, a DSP (Digital Signal Processor), or both, and performs various types of image processing using the memory information of the system control unit 331.
  • the image processing unit 335 includes an automatic focus control unit 341, a block division unit 342, a parallax calculation unit 343, a correlation calculation unit 344, a contrast calculation unit 345, a block re-division unit 346, a normal parallax correction unit 347, and a low-contrast parallax correction.
  • the background image storage unit 551 includes a rewritable memory such as a RAM or a flash memory, stores image information, and can be rewritten from the outside via the input / output unit 136 and the system control unit 531 as needed. .
  • FIG. 44 is a flowchart showing the operation of the camera module according to Embodiment 5 of the present invention. From the system control unit 531 of the SLSI 525, the camera module 501 is operated as shown in this flowchart.
  • Step S5000! / Starts operation For example, when a host CPU (not shown) detects that a shutter button (not shown) or the like has been pressed, and commands the camera module 501 to start an operation via the input / output unit 136, the camera module 501 Starts operation. Next, step 54100 is executed.
  • step S5100 the automatic focus control section 341 executes automatic focus control. This operation is the same as that in step S3100 of the third embodiment, and a description thereof is omitted.
  • step Execute S 5200 step Execute S 5200.
  • step S5200 parallax correction is executed. This operation is the same as that in step S3200 of the third embodiment, and a description thereof is omitted. Next, step S5300 is executed.
  • step S5300 the background is replaced.
  • pixels larger than the difference ⁇ threshold Ash do not change the image.
  • pixels whose parallax ⁇ is equal to or less than the threshold Ash are replaced with images (Rback, Gback, Bback) stored in the background image storage unit 551.
  • represents the parallax of the block Bi obtained in step S5200.
  • step S5800 an image is output. This operation is the same as in the third embodiment, and a description thereof is omitted.
  • step S5900 is executed.
  • step S5900 the operation is terminated.
  • the camera module of Embodiment 5 has the same effects as Embodiment 3.
  • step S5300 a block Bi having a small parallax ⁇ ⁇ , that is, a large subject distance is recognized as a background, and a background image (Rback, Gback, Bback) stored in advance is recognized.
  • a background image Rback, Gback, Bback
  • FIG. 45 (A) to FIG. 45 (C) are diagrams for explaining background replacement of the camera module according to Embodiment 5 of the present invention. According to the fifth embodiment, for example, when a human image having a mountain background is photographed as shown in FIG.
  • the parallax ⁇ of the human image is large and the parallax ⁇ of the background mountain is small.
  • the threshold of visibility and the value ⁇ sh are set between the parallax of the human image and the parallax of the mountain, the image of the mountain in the background By replacing the element with the background image of the sea stored in the background image storage unit (Fig. 45 (B). Rback, Gback, Bback), as shown in Fig. 45 (C), You can create an image.
  • FIGS. 46 (A) and 46 (B) One embodiment of an electronic device according to the present invention is shown in FIGS. 46 (A) and 46 (B).
  • the camera-equipped mobile phone 600 as one embodiment of the electronic device according to the present invention includes a speaker 601, an antenna 602, a liquid crystal display 603, a key portion 605, A microphone 606 is provided and can be folded by a hinge portion 604.
  • the mobile phone 600 has a lens module 110 built in the back side of the liquid crystal display 603, and can shoot still images and moving images.
  • the electronic device is not limited to a mobile phone, and can be implemented as an in-vehicle camera, a digital camera, a camera-equipped PDA, or the like.
  • the force using the calculated parallax may be appropriately limited.
  • the image becomes unclear. Therefore, if this value is determined as the minimum value of the subject distance A, the maximum value of the parallax ⁇ can be determined. Parallax greater than this value may be ignored as an error.
  • the parallax evaluation value is the second smallest V, and the value may be adopted as the parallax!
  • the present invention is not limited to this.
  • the first imaging signal II (mainly showing green) and fourth imaging signal I4 (mainly showing green) The force may not be calculated.
  • the parallax may be calculated from the second imaging signal 12 (mainly indicating blue) and the third imaging signal 13 (mainly indicating red).
  • the first parallax signal II (mainly green), the fourth parallax signal 14 (mainly green) and the force parallax cannot be calculated, and the second image signal 12 (mainly blue) And third shot If the parallax cannot be calculated from the image signal 13 (mainly showing red), the parallax is not affected, and it can be assumed that there is no parallax.
  • the second image sensor 123a is on the upper side during shooting, and the third image pickup is on the lower side.
  • the 1st to 4th image sensors 123a to 123d so that the element 123c is arranged, the upper side becomes sensitive to blue and the lower side becomes sensitive to red. Can be natural.
  • the larger parallax may be adopted.
  • Such a block contains the subject and the background, and since the subject distance and the background distance are different, two extreme values appear. Since the subject distance is small compared to the background distance, the subject parallax is large compared to the background parallax.
  • the larger parallax is adopted, the influence of the parallax of the background cannot be reduced, but the influence of the parallax of the subject that directly affects the image quality can be reduced.
  • the image sensor 123 includes a first image sensor 123a, a second image sensor 123b, a third image sensor 123c, and a fourth image sensor.
  • the imaging signal input unit 133 includes a first imaging signal input unit 133a, a second imaging signal input unit 133b, a third imaging signal input unit 133c, and a fourth imaging signal input unit 133d. It was. However, it is also possible to form the image sensor 123 with one image sensor and form four images by the first to fourth lens portions 113a to 113d at different positions on the light receiving surface.
  • the imaging signal input unit 133 may be configured as one imaging signal to which a signal from one imaging element 123 is input. In this case, select the appropriate area from the data card placed on the memory of the system ⁇ 1 ⁇ 131, 231, 331, 431, 531, the first image signal II, the second image signal 12, The third imaging signal 13 and the fourth imaging signal 14 may be used.
  • the force S using the sum of absolute differences as in equations (4) and (59) as the parallax evaluation value Ri (k) is limited to this.
  • the first imaging signal II force The difference between the block averages and the fourth imaging signal 14 from the block averages The sum of the squares of the difference between the first and second images, and the square of the difference between the difference between the first imaging signal II and the average within the block from the fourth imaging signal 14 Divide the sum by the square root of the sum of the squares of the difference between the averages in the first imaging signal II force block and divide by the square root of the sum of the squares of the sum of the squares in the fourth imaging signal 14 You can use what you did.
  • the parallax evaluation value Ri (k) the difference between the average in the block from Equation (60) and the first imaging signal II and the average in the block from the fourth imaging signal 14 are subtracted. You can use the sum of multiplication results with things. However, since the parallax evaluation value Ri (k) in the first to fifth embodiments becomes smaller as the correlation becomes larger (similar), k giving a minimum value as shown in FIG. However, when using equation (60) etc., the correlation becomes larger! /, (Similar! /,), The value increases, so the maximum value is given. Change is required.
  • the centers of the optical axes of the first lens unit 113a, the second lens unit 113b, the third lens 113c, and the fourth lens unit 113d are mutually aligned.
  • the rectangles obtained by joining are arranged so as to be square, but this is not a limitation.
  • the length of this rectangle in the X direction may be different from the length in the y direction.
  • appropriate changes are required, such as when parallax correction is performed in step S151, step S184, step S250, and step S3280. That is, instead of using the same k in the X direction and the y direction, k is changed so as to maintain the ratio between the length in the X direction and the length in the y direction of the rectangle.
  • the power obtained as an integer for the parallax is not limited to this.
  • parallax can be calculated up to / J and number in steps S140, S240, and S3240, and parallax can be corrected using linear interpolation in steps S184, S250, and S3280, respectively! /.
  • Embodiments 1 to 5 focus control may be omitted, and the block may be divided and parallax correction may be performed without including the actuator.
  • the error between the lens and the image sensor is allowed to be somewhat large, so there is no need to operate the actuator.
  • the first imaging signal II is mainly a green component.
  • the second imaging signal 12 mainly indicates a blue component
  • the third imaging signal 13 mainly indicates a red component
  • the fourth imaging element 123d mainly indicates a green component
  • the first imaging signal Although the parallax is detected by comparing the signal II with the fourth imaging signal 14, the parallax correction is performed, but the present invention is not limited to this.
  • the design of the lens and color filter is changed so that the first imaging signal II mainly shows the green component, the second imaging signal 12 mainly shows the green component, and the third imaging signal mainly blue.
  • the fourth imaging signal 14 may be changed so as to mainly indicate a red component. In this case, it is necessary to change the parallax evaluation function as shown in the following formula (87) and to correct the parallax as shown in the following formulas (88), (89), and (90).
  • Ri (k)
  • the first imaging signal II mainly shows the green component
  • the second imaging signal 12 mainly shows the blue component
  • the third imaging signal mainly shows the green component
  • the fourth imaging signal 14 May be changed to show mainly red component.
  • Ri (k)
  • the present invention is not limited to the force provided with four imaging regions in a grid pattern.
  • the first image sensor, the second image sensor, the third image sensor, and the fourth image sensor are arranged so that they are on one straight line, and the first image signal II mainly shows blue,
  • the second image pickup signal 12 may be changed to be mainly green,
  • the third image pickup signal 13 may be mainly green, and
  • the fourth image pickup signal may be mainly red.
  • Ri (k)
  • G (x, y) [I2 (x, y) + I3 (x- ⁇ i, y)] / 2 ⁇ ⁇ ⁇ (96)
  • Embodiments 1 to 5 four imaging regions are provided, but the present invention is not limited to this.
  • it has three imaging areas, the first imaging element, the second imaging element, and the third imaging element force are arranged to be on a straight line, and the first imaging signal II mainly shows blue, It may be changed so that the second imaging signal 12 mainly indicates green and the third imaging signal 13 mainly indicates red.
  • the disparity evaluation function is changed as in the following equations (99) and (100), the green component G is created as in the following equation (101), and the disparity ⁇ i obtained using the equation (99) is calculated.
  • Ri (k)
  • the second imaging element is placed to the right of the first imaging element (at the positive position of the X axis), and under the first imaging element (positive of the y axis)
  • the third image sensor is placed (in the position), the first image signal II is mainly green, the second image signal 12 is mainly blue, and the third image signal 13 is mainly red. Changes may be made as shown.
  • the parallax evaluation function is changed as in the following formulas (104) and (105), the green component G is created as in the following formula (106), and the parallax ⁇ i obtained using the formula (104) is calculated.
  • the blue component B is created as shown in the following formula (107), and the red component R is created as shown in the following formula (108) using the parallax ⁇ i obtained using the formula (105) to correct the parallax. Such changes are necessary. Further, instead of the expressions (104) and (105), a form such as the expression (60) may be used.
  • Ri (k)
  • the parallax correction for each block using the parallax ⁇ i for each block is performed using the parallax ⁇ i in the block. x, y), and parallax correction using each pixel's parallax ⁇ (x, y)
  • the camera module of the present invention is a camera module having an autofocus function that can be reduced in size and thickness, it is useful for a mobile phone having a camera function, a digital still camera, an in-vehicle camera, a surveillance camera, and the like. It is.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)
  • Color Television Image Signal Generators (AREA)
  • Focusing (AREA)

Abstract

 薄型化が可能で、被写体距離によらず全画像領域できれいな画像を得るカメラモジュールを提供する。それぞれが少なくとも1枚のレンズを含む複数のレンズ部と、前記複数のレンズ部に一対一に対応し、対応する前記レンズ部の光軸方向に対して略垂直な受光面をそれぞれ備える複数の撮像領域と、前記複数の撮像領域からそれぞれ出力される複数の撮像信号が入力される撮像信号入力部と、前記複数の撮像信号のうちの少なくとも1つの撮像信号を複数のブロックに分割するブロック分割部と、前記撮像信号を用いて、前記ブロックごとに、前記複数のレンズ部がそれぞれ形成する像間の視差を演算する視差演算部と、前記視差に基づいて前記複数の撮像信号を補正し画像を合成する視差補正部と、を有する。

Description

カメラモジュールおよびそれを備えた電子機器
技術分野
[0001] 本発明は、小型かつ薄型で、自動焦点制御機能を備えたカメラモジュールおよび このカメラモジュールを備えた電子機器に関する。
背景技術
[0002] 従来のカメラモジュールとして、特開 2001— 78213号公報に記載のカメラモジュ ールがある。図 47は、特開 2001— 78213号公報に記載のカメラモジュールの構成 を示す断面図である。
[0003] 図 47において、撮像系 9010は、物体からの光を、絞り 9110及び撮像レンズ 9100 を介して、撮像素子 9120の撮像面に結像する光学処理系である。絞り 9110は、 3 つの円形開口 9110a、 9110b, 9110cを有する。開口 9110a、 9110b, 9110cの 各々力も撮像レンズ 9100の光入射面 9100eに入射した物体光は、撮像レンズ 910 0の 3つのレンズ部 9100a、 9100b, 9100c力も射出して、撮像素子 9120の撮像面 上に 3つの物体像を形成する。
[0004] 撮像レンズ 9100の光出射面の平面部 9100dには遮光性膜が形成されている。撮 像レンズ 9100の光入射面 9100e上には互いに異なる波長帯域の光を透過させる 3 つの光学フイノレタ 9052a、 9052b, 9052c力 ^形成されて!ヽる。また、撮像素子 9120 【こお ヽて、撮像レンズ 9100の3っのレンズ咅^9100&、 9100b, 9100c【こそれぞれ対 応する 3つの撮像領域 9120a、 9120b, 9120c上にも、互いに異なる波長帯域の光 を透過させる 3つの光学フイノレタ 9053a、 9053b, 9053c力 ^形成されて!ヽる。
[0005] 光学フィルタ 9052aと光学フィルタ 9053aは、主に緑色(Gで示す)を透過する分光 透過率特性を有し、光学フィルタ 9052bと光学フィルタ 9053bは、主に赤色(Rで示 す)を透過する分光透過率特性を有し、さらに、光学フィルタ 9052cと光学フィルタ 9 053cは、主に青色 (Bで示す)を透過する分光透過率特性を有する。そのため、撮 像領域 9120aは緑色光 (G)に対して、撮像領域 9120bは赤色光 (R)に対して、撮 像領域 9120cは青色光 (B)に対して、それぞれ感度を持つ。 [0006] このような複数の撮像レンズを備えたカメラモジュールでは、カメラモジュールから 物体 (被写体)までの距離が変化すると、撮像素子 9120の撮像面上に複数の撮像 レンズがそれぞれ形成する複数の物体像の相互間隔が変化する。
[0007] 特開 2001— 78213号公報に記載のカメラモジュールでは、仮想被写体距離 D[m ]を、複数の結像系の撮影画角 Θ [° ]の関数として、 D= l. 4/ (tan( θ Ζ2) )と定 義したとき、物体が仮想被写体距離 D[m]にあるときの複数の物体像の相互間隔と、 無限遠にあるときの複数の物体像の相互間隔との変化が、基準画像信号の画素ピッ チの 2倍よりも小さくなるように、複数の結像系の光軸間隔が設定されている。すなわ ち、特開 2001— 78213号公報に記載のカメラモジュールは、仮想被写体距離 D[m ]にある物体の撮影に最適化された画像処理と同一の画像処理を、無限遠にある物 体の撮影に対して行つても、撮像面上での両物体像の相互間隔の差が基準信号の 画素ピッチの 2倍より小さくなるように光軸間隔が設定されているので、無限遠にある 物体像の色ズレを許容可能なレベルに抑えることができる。
[0008] 近年、カメラが搭載された携帯電話などの携帯機器が普及して ヽる。これら携帯機 器の小型化、薄型化および高性能化に伴い、小型化、薄型化および高性能化され たカメラモジュールが要求されている。例えば、自動焦点制御機能を備え、風景撮影 (ほぼ無限遠の物体の撮影)や人物撮影 (通常数 mの距離の物体の撮影)のみなら ず、マクロ撮影 (数 cm力も数十 cmの距離の物体の撮影)も可能であることが要求さ れる。
[0009] しかしながら、特開 2001— 78213号公報に記載のカメラモジュールでは、複数の レンズ部 9100a、 9100b, 9100cを有すること〖こより、薄型化を実現している。しかし 、この従来のカメラモジュールは、自動焦点制御機能を持たない。また、仮想被写体 距離 D[m]は、人物撮影を念頭に設定されている。そのため、この従来のカメラモジ ユールでは、風景撮影や人物撮影には対応できる力 マクロ撮影には対応できない
[0010] 特開 2001— 78213号公報に記載のカメラモジュールによる未解決の課題を解決 する従来のカメラジュールとして、特開 2002— 330332号公報に記載されたカメラモ ジュールがある。図 48は、特開 2002— 330332号公報に記載のカメラモジュールで 撮影される画像画像の一例と、分割された小領域を示している。撮影画面に対し、そ の中央部 kOとその周辺に検出領域 kl、 k2、 k3、 k4を設ける。そして、それぞれの検 出領域の視差 p0、 pl、 p2、 p3、 p4を求める。そして、これらの視差のうち所定範囲 のものを抽出し、抽出されるものが複数ある場合は、中央に近い領域での視差を選 択する。さらに、選択された視差を用いて撮影画像全体の補正を行う。
[0011] 特開 2002— 330332号公報に記載された従来のカメラモジュールでは、撮影され る画像の一部を複数の小領域とし、これらの領域の視差を求め、これらの視差から 1 つを選択し、この選択された視差に基づき撮影画像全体を補正する。例えば、図 48 に示すように、撮影画面の中央にカメラから 2m程度離れた人物 Mと、端に 10m程度 離れた人物 Nが共存して 、る場合、撮影画面中央に位置する人物 Mが被写体であ るとみなして、この領域 kOにおける視差 ρθに基づいて、撮影画像全体を補正する。 このとき、人物 Mの視差は選択された視差 ρθと同一であるので、視差の影響を補正 でき、人物 Mの領域ではきれいな画像を得る。しかし、人物 Nの視差は選択された視 差 ρθと異なり、視差の影響を補正できないため、人物 Nの領域では色むらが発生し、 きれいな画像とならない。
発明の開示
発明が解決しょうとする課題
[0012] 本発明は、上記問題に鑑みなされたもので、小型化、薄型化が可能で、被写体距 離によらず全画像領域できれ ヽな画像を得るカメラモジュールを提供することを目的 とする。
[0013] 本発明のカメラモジュールは、それぞれが少なくとも 1枚のレンズを含む複数のレン ズ部と、前記複数のレンズ部に一対一に対応し、対応する前記レンズ部の光軸方向 に対して略垂直な受光面をそれぞれ備える複数の撮像領域と、前記複数の撮像領 域からそれぞれ出力される複数の撮像信号が入力される撮像信号入力部と、前記複 数の撮像信号のうちの少なくとも 1つの撮像信号を複数のブロックに分割するブロック 分割部と、前記撮像信号を用いて、前記ブロックごとに、前記複数のレンズ部がそれ ぞれ形成する像間の視差を演算する視差演算部と、前記視差に基づ!、て前記複数 の撮像信号を補正し画像を合成する視差補正部と、を有する。 [0014] 本発明に力かるプログラムは、それぞれが少なくとも 1枚のレンズを含む複数のレン ズ部と、前記複数のレンズ部に一対一に対応し、対応する前記レンズ部の光軸方向 に対して略垂直な受光面をそれぞれ備える複数の撮像領域と、前記複数の撮像領 域からそれぞれ出力される複数の撮像信号が入力される撮像信号入力部と、入力さ れた撮像信号の画像処理を行う画像処理部とを備えたカメラモジュールにおいて、 前記画像処理部の動作を制御するプログラムであって、前記複数の撮像信号のうち の少なくとも 1つの撮像信号を複数のブロックに分割するブロック分割処理と、前記撮 像信号を用いて、前記ブロックごとに、前記複数のレンズ部がそれぞれ形成する像間 の視差を演算する視差演算処理と、前記視差に基づ!/、て前記複数の撮像信号を補 正し画像を合成する視差補正処理とを、前記画像処理部に実行させることを特徴と する。
[0015] 本発明に力かるプログラム記録媒体は、上記のプログラムを記録した、コンピュータ により読み取りが可能な記録媒体である。
発明の効果
[0016] 本発明は、上記問題に鑑みなされたもので、小型化、薄型化が可能で、被写体距 離によらず全画像領域できれいな画像を得るカメラモジュールを提供することができ る。
図面の簡単な説明
[0017] [図 1]本発明の実施の形態 1に係るカメラモジユールの構成を示す断面図
[図 2]本発明の実施の形態 1に係るカメラモジユールのレンズの上面図
[図 3]本発明の実施の形態 1に係るカメラモジユーノレの回路部の上面図
[図 4]本発明の実施の形態 1に係るカメラモジユールのカラーフィルタの特性図
[図 5]本発明の実施の形態 1に係るカメラモジユールの IRフィルタの特性図
[図 6]本発明の実施の形態 1に係るカメラモジユーノレにおいて、無限遠にある物体像 の位置を説明するための図
[図 7]本発明の実施の形態 1に係るカメラモジユールにおいて、有限距離の位置にあ る物体像の位置を説明するための図
[図 8] (A)は本発明の実施の形態 1に係るカメラモジュールにおいて、合焦時の画像 とコントラスト評価値の関係を説明する図、 (B)は本発明の実施の形態 1に係るカメラ モジュールにおいて、非合焦時の画像とコントラスト評価値の関係を説明する図 [図 9]本発明の実施の形態 1に係るカメラモジュールのレンズ位置とコントラスト評価 値の関係を説明する図
[図 10]本発明の実施の形態 1に係るカメラモジュールのブロック図
[図 11]本発明の実施の形態 1に係るカメラモジュールの動作を示すフローチャート 圆 12]本発明の実施の形態 1に係るカメラモジュールの撮像信号の座標を説明する 図
[図 13] (A)は本発明の実施の形態 1に係るカメラモジュールのエッジ検出を説明する 元画像、(B)本発明の実施の形態 1に係るカメラモジュールのエッジ検出を説明する エッジ検出用コントラスト評価値の画像、 (C)は本発明の実施の形態 1に係るカメラモ ジュールのエッジ検出を説明するエッジの画像
圆 14]本発明の実施の形態 1に係るカメラモジュールにおいて、視差評価値の演算 領域を説明する図
圆 15]本発明の実施の形態 1に係るカメラモジュールの視差と視差評価値との関係 を説明する図
[図 16] (A)は本発明の実施の形態 1に係るカメラモジュールにおいて、補正なし時に コントラスト評価値が最大となるときのァクチユエータ操作量とコントラスト評価値の関 係を説明する図、(B)は、正側補正後のコントラスト評価値が最大となるときのァクチ ユエータ操作量とコントラスト評価値の関係を説明する図、(C)は、負側補正後のコン トラスト評価値が最大となるときのァクチユエータ操作量とコントラスト評価値の関係を 説明する図
[図 17] (A)は、本発明の実施の形態 1に係るカメラモジュールにおいて、さらなる正 側補正をしたとき、この正側補正前でのコントラスト評価値が最大となるァクチユエ一 タ操作量とコントラスト評価値の関係を説明する図、(B)は、さらなる正側補正をした とき、この正側補正後でのコントラスト評価値が最大となるァクチユエータ操作量とコ ントラスト評価値の関係を説明する図
[図 18] (A)は、本発明の実施の形態 1に係るカメラモジュールにおいて、さらなる負 側補正をしたとき、この負側補正前でのコントラスト評価値が最大となるァクチユエ一 タ操作量とコントラスト評価値の関係を説明する図、(B)は、さらなる負側補正をした とき、この負側補正後でのコントラスト評価値が最大となるァクチユエータ操作量とコ ントラスト評価値の関係を説明する図
圆 19]本発明の実施の形態 2に係るカメラモジュールの構成を示す断面図
[図 20]本発明の実施の形態 2に係るカメラモジュールのブロック図
[図 21]本発明の実施の形態 2に係るカメラモジュールの動作を示すフローチャート 圆 22]本発明の実施の形態 2に係るカメラモジュールの撮像信号の座標を説明する 図
圆 23]本発明の実施の形態 3に係るカメラモジュールの構成を示す断面図
[図 24]本発明の実施の形態 3に係るカメラモジュールのブロック図
[図 25]本発明の実施の形態 3に係るカメラモジュールの動作を示すフローチャート 圆 26]本発明の実施の形態 3に係る自動焦点制御の動作を示すフローチャート 圆 27]本発明の実施の形態 3に係る視差補正の動作を示すフローチャート
[図 28]本発明の実施の形態 3に係るカメラモジュールにお 、て、ブロック分割を説明 する図
圆 29]本発明の実施の形態 3に係るカメラモジュールにおいて、視差評価値の演算 領域を説明する図
圆 30]本発明の実施の形態 3に係るカメラモジュールにおいて、視差精度評価用相 関値の演算領域を説明する図
[0311 (A)は、本発明の実施の形態 3に係るカメラモジュールにおいて、ブロックの再 分割の前の状態を説明する図、(B)は、本発明の実施の形態 3に係るカメラモジユー ルにおいて、ブロックの再分割の後の状態を説明する図
圆 32]本発明の実施の形態 3に係るカメラモジュールにおいて、視差精度評価用相 関値と視差補正方式フラッグの関係を説明する図
圆 33]本発明の実施の形態 3に係るカメラモジュールにおいて、視差精度評価用コ ントラスト評価値と視差補正方式フラッグの関係を説明する図
圆 34]本発明の実施の形態 3に係る低相関用視差補正部の動作を示すフローチヤ ート
[図 35] (A)は本発明の実施の形態 3に係るカメラモジュールの低相関用視差補正部 のエッジ検出を説明する元画像、 (B)は本発明の実施の形態 3に係るカメラモジユー ルの低相関用視差補正部のエッジ検出を説明するエッジ検出用コントラスト評価値 の画像、 (C)は本発明の実施の形態 3に係るカメラモジュールの低相関用視差補正 部のエッジ検出を説明するエッジの画像
[図 36]本発明の実施の形態 4に係るカメラモジュールの構成を示す断面図
[図 37]本発明の実施の形態 4に係るカメラモジュールのブロック図
[図 38] (A)〜(D)は、本発明の実施の形態 4に係るカメラモジュールのフィールド画 像を説明する図
[図 39]本発明の実施の形態 4に係るカメラモジュールの動作を示すフローチャート [図 40]本発明の実施の形態 4に係るカメラモジュールの動作を示すタイムチャート [図 41] (A)〜(C)は、本発明の実施の形態 4に係るカメラモジュールにおけるカラー フィルタの好ま 、配置例を模式的に示す平面図
[図 42]本発明の実施の形態 5に係るカメラモジュールの構成を示す断面図
[図 43]本発明の実施の形態 5に係るカメラモジュールのブロック図
[図 44]本発明の実施の形態 5に係るカメラモジュールの動作を示すフローチャート
[図 45] (A)〜 (C)は、本発明の実施の形態 5に係るカメラモジュールの背景置換を説 明する図
[図 46] (A)および (B)は、本発明の実施の形態 6に係る電子機器の一例を示す図 [図 47]従来 (特開 2001— 78213号公報に記載)のカメラモジュールの構成を示す断 面図
[図 48]従来 (特開 2002— 330332号公報に記載)のカメラモジュールで撮像される 画像の一例を示す図
発明を実施するための最良の形態
本発明のカメラモジュールは、それぞれが少なくとも 1枚のレンズを含む複数のレン ズ部と、前記複数のレンズ部に一対一に対応し、対応する前記レンズ部の光軸方向 に対して略垂直な受光面をそれぞれ備える複数の撮像領域と、前記複数の撮像領 域からそれぞれ出力される複数の撮像信号が入力される撮像信号入力部と、前記複 数の撮像信号のうちの少なくとも 1つの撮像信号を複数のブロックに分割するブロック 分割部と、前記撮像信号を用いて、前記ブロックごとに、前記複数のレンズ部がそれ ぞれ形成する像間の視差を演算する視差演算部と、前記視差に基づ!/、て前記複数 の撮像信号を補正し画像を合成する視差補正部と、を有する。
[0019] 物体像の位置は、被写体距離に応じて相対的に変化する。すなわち、被写体距離 が小さくなると、視差が大きくなる。そのため、距離が異なる複数の被写体を同時に撮 像すると、被写体毎に視差が異なる。本発明のカメラモジュールによれば、ブロック毎 の視差を演算し、このブロック毎の視差に基づき視差の影響が低減するように撮像信 号を補正した後、画像合成する。これにより、距離が異なる複数の被写体を同時に撮 像するときにおいても、適宜それぞれの被写体の視差を補正して、全画像領域で視 差の影響が低減されたきれいな画像を得ることができる。
[0020] 上記の本発明のカメラモジュールにおいて、前記複数のレンズ部と前記複数の撮 像領域との相対距離を変化させるァクチユエータと、前記視差に基づきァクチユエ一 タを制御する焦点制御部と、を更に有することが好ま 、。
[0021] この好ましい構成によれば、視差に基づきァクチユエータを動作させ、自動焦点制 御すること〖こより、 1回のァクチユエータ動作で合焦させることができるので、高速に自 動焦点制御できる。
[0022] 上記の本発明のカメラモジュールにおいて、前記複数の撮像信号のうち少なくとも 1つの撮像信号に基づいてコントラストを演算するコントラスト演算部を更に有し、前 記焦点制御部は、前記視差と前記コントラストとに基づき前記ァクチユエータを制御 することが好ましい。
[0023] この好ましい構成によれば、高速な視差に基づく自動焦点制御と高精度なコントラ ストに基づく自動焦点制御とを併用するので、高速で高精度に自動焦点制御できる
[0024] 上記の本発明のカメラモジュールにおいて、前記焦点制御部は、前記ァクチユエ一 タを複数回制御し、初回は前記視差に基づき前記ァクチユエータを制御し、 2回目以 降は前記コントラストに基づき前記ァクチユエータを制御することが好ましい。 [0025] この好ま 、構成によれば、最初に視差に基づ 、てァクチユエータを動作させ自動 焦点制御を行う。続いて、コントラストに基づいてァクチユエータを動作させ自動焦点 制御を行う。視差に基づく自動焦点制御は、 1回のァクチユエータ動作で合焦するた め、高速である。一方、コントラストに基づく自動焦点制御は、画像力も直接合焦を判 断するため、ァクチユエータのばらつきなどに左右されず、精度がよい。したがって、 最初に視差に基づく自動焦点制御により高速に粗調整し、次いでコントラストに基づ く自動焦点制御により高精度な微調整をするので、高速で高精度に自動焦点制御で きる。
[0026] 上記の本発明のカメラモジュールにおいて、前記焦点制御部は、前記コントラスト に基づき前記ァクチユエータを制御したときの前記ァクチユエータに対する操作量を 学習することが好ましい。
[0027] この好ましい構成によれば、コントラストに基づく自動焦点制御において実行したァ クチユエータ操作量に基づき、操作量関数を補正するような学習を行う。これにより、 ァクチユエータのばらつきなどがあっても操作量関数がより正確に補正されるので、 初回の視差に基づく自動焦点制御がより正確になり、次回以降のコントラストに基づ く自動焦点制御による微調整の回数が減少するため、より高速な自動焦点制御を実 現できる。
[0028] 上記の本発明のカメラモジュールにお 、て、前記ブロック分割部は、前記少なくとも 1つの撮像信号に基づいて複数の画像領域の輪郭を検出し、前記輪郭により前記複 数の画像領域に分割されるように、前記少なくとも 1つの撮像信号を複数のブロック に分割することが好ましい。
[0029] この好ましい構成によれば、輪郭を検出し、ブロックに分割し、ブロック毎の視差に 基づき視差の影響を低減するように撮像信号を補正した後、画像合成する。これによ り、適切にブロック化を行うことができるので、全画像領域で視差の影響が低減された きれ ヽな画像を得ることができる。
[0030] 上記の本発明のカメラモジュールにお 、て、前記撮像信号に基づ!/、て前記輪郭の 視差である輪郭視差を求める輪郭視差演算部が付加され、前記視差演算部は、前 記輪郭視差に基づいて、前記ブロックごとに、前記複数のレンズ部がそれぞれ形成 する像間の視差を演算することが好ま 、。
[0031] この好ましい構成によれば、輪郭の視差を検出し、この視差に基づきブロックごとに 視差の視差を演算し、この視差に基づき視差の影響を低減するように撮像信号を補 正した後、画像合成する。従って、全画像領域で視差の影響が低減されたきれいな 画像を得ることができる。
[0032] 上記の本発明のカメラモジュールにお 、て、前記ブロック分割部は、前記少なくとも 1つの撮像信号を矩形状の複数のブロックに分割することが好ましい。
[0033] この好ましい構成によれば、ブロックごとに視差の視差を演算し、この視差に基づき 視差の影響を低減するように撮像信号を補正した後、画像合成する。従って、全画 像領域で視差の影響が低減されたきれいな画像を得ることができる。
[0034] 上記の本発明のカメラモジュールにおいて、前記撮像信号に基づき前記複数のブ ロックごとに前記視差の精度を示す少なくとも 1つの視差精度評価値を演算する視差 評価値演算部を更に有し、前記視差補正部は、前記複数のブロックごとに前記視差 と前記視差精度評価値とに基づいて前記複数の撮像信号を補正し画像を合成する ことが好ましい。
[0035] 分割したブロック内に被写体距離が異なる複数の物体が含まれることがあり、その 場合、物体像毎に視差が異なる。この好ましい構成では、ブロック毎に演算した視差 力 Sどれだけ精度があるかを判断し、この精度に基づき撮像信号の補正の方法を変更 する。これにより、ブロック毎に最適な補正方法で画像を補正できるため、全画像領 域で視差の影響がさらに低減されたきれいな画像を得ることができる。
[0036] 上記の本発明のカメラモジュールにお 、て、前記視差補正部は、前記複数のプロ ックごとに前記視差精度評価値に基づき当該ブロックを少なくとも 2つに分割するか どうかを決定し、分割すべきと判断されたブロックにお 、て分割後のブロックの視差に 基づき画像を合成することが好まし ヽ。
[0037] この好ましい構成によれば、ブロック毎に演算した視差がどれだけ精度があるかを 判断し、精度がないブロックは複数の視差が混在するとし少なくとも 2つのブロックに 分割する。これにより、常に最適なブロックサイズで画像を補正できるため、全画像領 域で視差の影響がさらに低減されたきれいな画像を得ることができる。 [0038] 上記の本発明のカメラモジュールにお 、て、前記視差評価値演算部は、前記複数 の撮像信号のうち少なくとも 1つの撮像信号に基づいて前記複数のブロックごとにコ ントラストの大きさを示す第 1の視差精度評価値を演算することが好ましい。
[0039] この好ましい構成によれば、ブロック毎に演算した視差がどれだけ精度があるかを コントラストによって演算評価し、コントラストによって撮像信号の補正の方法を変更 する。これにより、ブロック毎に最適な補正方法で画像を補正できるため、全画像領 域で視差の影響がさらに低減されたきれいな画像を得ることができる。
[0040] 上記の本発明のカメラモジュールにお 、て、前記視差評価値演算部は、前記複数 のブロックに分割された前記撮像信号を用いて、前記複数のブロックごとに、少なくと も 2つの前記レンズ部がそれぞれ形成する像を前記視差だけ移動した像がどれだけ 相関があるかを示す第 2の視差精度評価値を演算することが好ましい。
[0041] この好ましい構成によれば、ブロック毎に演算した視差がどれだけ精度があるかを 視差だけ移動した像がどれだけ相関がある力を演算評価し、相関によって撮像信号 の補正の方法を変更する。これにより、ブロック毎に最適な補正方法で画像を補正で きるため、全画像領域で視差の影響がさらに低減されたきれいな画像を得ることがで きる。
[0042] 上記の本発明のカメラモジュールにお 、て、前記視差補正部は、前記複数のプロ ックごとに前記第 2の視差精度評価値が小さいとき当該ブロックを少なくとも 2つに分 割し、分割されたブロックにお ヽて分割後のブロックの視差に基づき画像を合成する ことが好ましい。
[0043] この好ましい構成によれば、ブロック毎に演算した視差がどれだけ精度があるかを 視差だけ移動した像がどれだけ相関であるかを示す第 2の視差精度評価値を用いて 評価する。そして、第 2の視差精度評価値が小さい、すなわち相関が小さいと判断さ れたブロックは少なくとも 2つのブロックに分割する。これにより、常に最適なブロック サイズで画像を補正できるため、全画像領域で視差の影響がさらに低減されたきれ V、な画像を得ることができる。
[0044] 上記の本発明のカメラモジュールにお 、て、前記視差評価値演算部は、前記複数 の撮像信号のうち少なくとも 1つの撮像信号に基づいて前記複数のブロックごとにコ ントラストの大きさを示す第 1の視差精度評価値と、前記複数のブロックに分割された 前記撮像信号を用いて、前記複数のブロックごとに、少なくとも 2つの前記レンズ部が それぞれ形成する像を前記視差だけ移動した像がどれだけ相関があるかを示す第 2 の視差精度評価値を演算し、前記視差補正部は、前記複数のブロックごとに前記第 1の視差精度評価値が大きくかつ前記第 2の視差精度評価値が小さいとき当該プロ ックを少なくとも 2つに分割し、分割されたブロックにおいて分割後のブロックの視差 に基づき画像を合成することが好まし 、。
[0045] この好ましい構成によれば、ブロック毎にコントラストの大きさを示す第 1の視差精度 評価値と演算した視差がどれだけ精度があるかを視差だけ移動した像がどれだけ相 関であるかを示す第 2の視差精度評価値とを用いて評価する。そして、第 1の視差精 度評価値が大きい、すなわちコントラストが大きい、かつ第 2の視差精度評価値が小 さい、すなわち相関が小さいと判断されたブロックは少なくとも 2つのブロックに分割 する。これにより、常に最適なブロックサイズで画像を補正できるため、全画像領域で 視差の影響がさらに低減されたきれいな画像を得ることができる。
[0046] 上記の本発明のカメラモジュールにお 、て、前記撮像信号入力部は、前記複数の 撮像信号を複数のフィールドごとに入力し、前記視差演算部は、前記複数のフィー ルドのそれぞれにつ 、て、前記ブロック毎の視差を演算することが好ま 、。
[0047] この好ましい構成によれば、各フィールドごとに視差演算を行うことにより、動く被写 体の撮影時に各フィールドの撮影時間が異なることにより各フィールドの画像が異な る場合においても、各フィールドごとの視差を正しく求められ、この視差を用いて画像 合成することができるため、全画像領域で視差の影響がさらに低減されたきれいな画 像を得ることができる。
[0048] また、上記の好ましい構成において、前記複数のレンズ部に一対一に対応し、複数 色のフィルタが配置されたカラーフィルタをさらに備え、前記複数のレンズ部のうち、 前記フィールドの走査方向に平行に配置された少なくとも 2つのレンズ部に対応して 、同色のフィルタが配置されて!、ることがさらに好まし!/、。
[0049] このさらに好ましい構成によれば、動く被写体の撮影時に各フィールドの撮影時間 が異なることにより、各フィールドの画像が異なる場合においても、各フィールドごとの 視差をより正確に求めることができる。
[0050] 上記の本発明のカメラモジュールにおいて、撮影画像とは異なる別画像を保存す る別画像保存部を更に有し、前記視差補正部は、前記視差に基づき前記撮像信号 を補正した画像と前記別画像とを組み合わせることが好ましい。
[0051] この好ましい構成によれば、視差に基づき補正した画像と別画像を組み合わせるこ とにより、補正した画像カゝら正しく画像を抽出できるため、きれいにこれらの画像を組 み合わせることができる。
[0052] 上記の本発明のカメラモジュールにおいて、前記視差補正部は、前記視差が大き いほど前記撮像信号を補正した画像の割合を大きく前記別画像の割合を小さくなる ように組み合わせることが好ま 、。
[0053] この好ましい構成によれば、視差に基づき補正した画像と別画像を組み合わせるこ とにより、補正した画像力 視差が大きい部分の画像を正しく抽出できるため、きれい にこれらの画像を組み合わせることができる。
[0054] また、本発明に力かる電子機器は、上記の本発明のカメラモジュールを備えたこと を特徴とする。
[0055] また、本発明にかかるプログラムは、それぞれが少なくとも 1枚のレンズを含む複数 のレンズ部と、前記複数のレンズ部に一対一に対応し、対応する前記レンズ部の光 軸方向に対して略垂直な受光面をそれぞれ備える複数の撮像領域と、前記複数の 撮像領域からそれぞれ出力される複数の撮像信号が入力される撮像信号入力部と、 入力された撮像信号の画像処理を行う画像処理部とを備えたカメラモジュールにお いて、前記画像処理部の動作を制御するプログラムであって、前記複数の撮像信号 のうちの少なくとも 1つの撮像信号を複数のブロックに分割するブロック分割処理と、 前記撮像信号を用いて、前記ブロックごとに、前記複数のレンズ部がそれぞれ形成 する像間の視差を演算する視差演算処理と、前記視差に基づ!、て前記複数の撮像 信号を補正し画像を合成する視差補正処理とを、前記画像処理部に実行させること を特徴とする。
[0056] また、本発明に力かるプログラム記録媒体は、上記のプログラムを記録した、コンビ ユータによる読み取りが可能なプログラム記録媒体である。 [0057] 本発明のプログラムまたはプログラム記録媒体によれば、ブロック毎の視差を演算 し、このブロック毎の視差に基づき、視差の影響が低減するように撮像信号を補正し た後、画像合成する。これにより、距離が異なる複数の被写体を同時に撮像するとき においても、適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響 が低減されたきれ ヽな画像を得ることができる。
[0058] 以下、本発明の具体的な実施の形態について、図面を用いて説明する。
[0059] (実施の形態 1)
本発明の実施の形態 1に係るカメラモジュールは、エッジを検出し、ブロックに分割 し、ブロック毎の視差に基づき視差補正することにより、全画像領域できれいな画像 を得る。また、視差に基づく自動焦点制御により粗調整を行い、高精度なコントラスト に基づく自動焦点制御により微調整を行うことにより、高速で高精度に自動焦点制御 できる。また、微調整量を学習し、次回の粗調整の精度を向上する。
[0060] 本発明の実施の形態 1に係るカメラモジュールについて、図面を参照しながら説明 する。
[0061] 図 1は、本発明の実施の形態 1に係るカメラモジュールの構成を示す断面図である 。図 1において、カメラモジュール 101は、レンズモジュール部 110、および回路部 12 0を有する。
[0062] レンズモジュール部 110は、鏡筒 111、上部カバーガラス 112、レンズ 113、了クチ ユエータ固定部 114、およびァクチユエータ可動部 115を有する。回路部 120は、基 板 121、パッケージ 122、撮像素子 123、パッケージカバーガラス 124、およびシステ ム LSI (以下、 SLSIと記す) 125を有する。
[0063] 鏡筒 111は、円筒状であり、その内壁面は光の乱反射を防止するためにつやが消 された黒色であり、榭脂を射出成形し形成される。上部カバーガラス 112は、円盤状 であり、透明樹脂から形成され、鏡筒 111の上面に接着剤などにより固着され、その 表面は摩擦などによる損傷を防止する保護膜と、入射光の反射を防止する反射防止 膜とが設けられている。
[0064] 図 2は、本発明の実施の形態 1に係るカメラモジュールのレンズ 113の上面図であ る。レンズ 113は、略円盤状であり、ガラスや透明樹脂から形成され、第 1のレンズ部 113a,第 2のレンズ部 113b、第 3のレンズ部 113c、および第 4のレンズ部 113d力碁 盤目状に配置される。第 1〜第 4のレンズ部 113a〜113dの配置方向に沿って、図 2 に示すように X軸及び Y軸を設定する。第 1のレンズ部 113a、第 2のレンズ部 113b、 第 3のレンズ部 113c、および第 4のレンズ部 113dにおいて、被写体側から入射した 光は、撮像素子 123側へ射出し、撮像素子 123上に 4つの像を結像する。
[0065] ァクチユエータ固定部 114は、鏡筒 111の内壁面に接着剤などにより固着される。
ァクチユエータ可動部 115は、レンズ 113の外周縁に接着剤などにより固着される。 ァクチユエータ固定部 114およびァクチユエータ可動部 115は、ボイスコイルモータ を構成する。ァクチユエータ固定部 114は永久磁石(図示せず)と強磁性体ヨーク(図 示せず)とを有し、ァクチユエータ可動部 115はコイル(図示せず)を有する。ァクチュ エータ可動部 115は、ァクチユエータ固定部 114に対し、弾性体(図示せず)により 弾性支持される。ァクチユエータ可動部 115のコイルに通電することにより、ァクチュ エータ可動部 115がァクチユエータ固定部 114に対して相対的に移動し、レンズ 11 3と撮像素子 123との光軸に沿った相対距離が変化する。
[0066] 基板 121は、榭脂基板から構成され、上面に鏡筒 111がその底面を接して接着剤 などにより固着される。このようにして、レンズモジュール部 110と回路部 120とが固 定され、カメラモジュール 101を構成する。
[0067] ノ¾ /ケージ 122は、金属端子を有する榭脂からなり、鏡筒 111の内側において、基 板 121の上面にその金属端子部が半田づけ等されて固着される。撮像素子 123は、 第 1の撮像素子 123a、第 2の撮像素子 123b、第 3の撮像素子 123c、および第 4の 撮像素子 124dから構成される。第 1の撮像素子 123a、第 2の撮像素子 123b、第 3 の撮像素子 123c、および第 4の撮像素子 124dは、それぞれ CCDセンサや CMOS センサのような固体撮像素子であり、これらの受光面の中心が、それぞれ第 1のレン ズ部 113a、第 2のレンズ部 113b、第 3のレンズ部 113c、および第 4のレンズ部 113d の光軸中心と略一致するように、また各撮像素子の受光面が対応するレンズ部の光 軸と略垂直になるようにして配置される。
[0068] 第 1の撮像素子 123a、第 2の撮像素子 123b、第 3の撮像素子 123c、および第 4の 撮像素子 123dの各端子は、ノ ッケージ 122の内側の底部の金属端子にワイヤーボ ンデイングにより金線 127で接続され、基板 121を介して、 SLSI125と電気的に接続 される。第 1の撮像素子 123a、第 2の撮像素子 123b、第 3の撮像素子 123c、および 第 4の撮像素子 123dの各受光面に、第 1のレンズ部 113a、第 2のレンズ部 113b、 第 3のレンズ部 113c、および第 4のレンズ部 113dから射出された光がそれぞれ結像 し、フォトダイオードにより光の情報力も変換された電気の情報が、 SLSI125に出力 される。
[0069] 図 3は、本発明の実施の形態 1に係るカメラモジュールの回路部 120の上面図であ る。ノ ッケージカバーガラス 124は、平板状であり、透明榭脂により形成され、パッケ ージ 122の上面に接着などにより固着される。パッケージカバーガラス 124の上面に は、第 1のカラーフィルタ 124a、第 2のカラーフィルタ 124b、第 3のカラーフィルタ 12 4c、第 4のカラーフィルタ 124d、および遮光部 124eが蒸着などにより配置される。ま た、ノ ッケージカバーガラス 124の下面には、赤外遮断フィルタ(図示せず。以下、 I Rフィルタと記す)が蒸着などにより配置される。
[0070] 図 4は、本発明の実施の形態 1に係るカメラモジュールのカラーフィルタの特性図で あり、図 5は、本発明の実施の形態 1に係るカメラモジュールの IRフィルタの特性図で ある。第 1のカラーフィルタ 124aは、図 4の Gで示した主に緑色を透過する分光透過 特性を有し、第 2のカラーフィルタ 124bは、図 4の Bで示した主に青色を透過する分 光透過特性を有し、第 3のカラーフィルタ 124cは、図 4の Rで示した主に赤色を透過 する分光透過特性を有し、第 4のカラーフィルタは、図 4の Gで示した主に緑色を透 過する分光透過特性を有する。また、 IRフィルタは、図 5の IRで示した赤外光を遮断 する分光透過特性を有する。
[0071] したがって、第 1のレンズ部 113aの上部から入射した物体光は、第 1のレンズ部 11 3aの下部力も射出され、第 1のカラーフィルタ 124aおよび IRフィルタにより主に緑色 が透過し、第 1の撮像素子 123aの受光部に結像するため、第 1の撮像素子 123aは 物体光のうち緑色成分を受光する。また、第 2のレンズ部 113bの上部から入射した 物体光は、第 2のレンズ部 113bの下部から射出され、第 2のカラーフィルタ 124bお よび IRフィルタにより主に青色が透過し、第 2の撮像素子 123bの受光部に結像する ため、第 2の撮像素子 123bは物体光のうち青色成分を受光する。また、第 3のレンズ 部 113cの上部から入射した物体光は、第 3のレンズ部 113cの下部から射出され、 第 3のカラーフィルタ 124cおよび IRフィルタにより主に赤色が透過し、第 3の撮像素 子 123cの受光部に結像するため、第 3の撮像素子 123cは物体光のうち赤色成分を 受光する。更に、第 4のレンズ部 113dの上部から入射した物体光は、第 4のレンズ部 113dの下部力も射出され、第 4のカラーフィルタ 124dおよび IRフィルタにより主に緑 色が透過し、第 4の撮像素子 123dの受光部に結像するため、第 4の撮像素子 123d は物体光のうち緑色成分を受光する。
[0072] SLSI125は、後述の方法で、ァクチユエータ可動部 115のコイルの通電を制御し、 撮像素子 123を駆動し、撮像素子 123からの電気情報を入力し、各種画像処理を行 い、上位 CPUと通信を行い、外部に画像出力する。
[0073] 次に、被写体距離と視差との関係を説明する。本発明の実施の形態 1に係るカメラ モジュールは、 4つのレンズ部(第 1のレンズ部 113a、第 2のレンズ部 113b、第 3のレ ンズ部 113c、および第 4のレンズ部 113d)を有するため、 4つのレンズ部がそれぞれ 形成する 4つの物体像の相対的位置が、被写体距離に応じて変化する。
[0074] 図 6は、本発明の実施の形態 1に係るカメラモジュールにおいて、無限遠にある物 体像の位置を説明するための図である。図 6においては、簡単のため、第 1のレンズ 部 113a、第 1の撮像素子 123a、第 2のレンズ部 113b、第 2の撮像素子 123bのみを 記す。無限遠の物体 10からの光の第 1のレンズ部 113aへの入射光 L1と、第 2のレン ズ部 113bへの入射光 L2とは平行である。このため、第 1のレンズ部 113aと第 2のレ ンズ部 113bとの距離と、第 1の撮像素子 123a上の物体像 11aと第 2の撮像素子 12 3b上の物体像 1 lbとの距離は等 U、。
[0075] ここで、第 1のレンズ部 113aの光軸、第 2のレンズ部 113bの光軸、第 3のレンズ部 1 13cの光軸、および第 4のレンズ部 113dの光軸が、それぞれ第 1の撮像素子 123a の受光面の中心、第 2の撮像素子 123bの受光面の中心、第 3の撮像素子 123cの 受光面の中心、および第 4の撮像素子 123dの受光面の中心と略一致するように配 置されている。従って、第 1の撮像素子 123a、第 2の撮像素子 123b、第 3の撮像素 子 123c、および第 4の撮像素子 123dの各受光面の中心と、各受光面にそれぞれ結 像される無限遠の物体像との相対的位置関係は、全ての撮像素子について同一で ある。すなわち、視差はない。
[0076] 図 7は、本発明の実施の形態 1に係るカメラモジュールにおいて、有限距離の位置 にある物体像の位置を説明するための図である。図 7において、簡単のため、第 1の レンズ部 113a、第 1の撮像素子 123a、第 2のレンズ部 113b、第 2の撮像素子 123b のみを記す。有限距離の物体 12からの光の第 1のレンズ部 113aへの入射光 L1と第 2のレンズ部 113bへの入射光 L2とは平行ではない。従って、第 1のレンズ部 113aと 第 2のレンズ部 113bとの距離に比べて、第 1の撮像素子 123a上の物体像 13aと第 2 の撮像素子 123b上の物体像 13bとの距離は長い。そのため、第 1の撮像素子 123a 、第 2の撮像素子 123b、第 3の撮像素子 123c、および第 4の撮像素子 123dの各受 光面の中心と、各受光面にそれぞれ結像される有限距離の物体像との相対的位置 関係は、撮像素子ごとに異なる。すなわち、視差がある。
[0077] 物体像 12までの距離 (被写体距離)を A、第 1のレンズ部 113aと第 2のレンズ部 11 3bとの距離を D、レンズ部 113a, 113bの焦点距離を fとすると、図 7の直角を挟む 2 辺の長さが A、 Dの直角三角形と、直角を挟む 2辺の長さが f、 Δの直角三角形とが 相似であることより、視差 Δは、下記式(1)のように表される。その他のレンズ部間に ついても同様の関係が成立する。このように、被写体距離に応じて 4つのレンズ部 11 3a, 113b, 113c, 113dがそれぞれ形成する 4つの物体像の相対的位置が変化す る。例えば、被写体距離 Aが小さくなると、視差 Δが大きくなる。
[0078] Δ =ί·ϋ/Α · · · (1)
次に、コントラストと焦点距離との関係を説明する。
[0079] 図 8 (Α)は、本発明の実施の形態 1に係るカメラモジュールにお 、て、合焦時 (焦点 調整が合っているとき)の画像とコントラスト評価値との関係を説明する図であり、図 8 (Β)は、本発明の実施の形態 1に係るカメラモジュールにおいて、非合焦時 (焦点調 整が合っていないとき)の画像とコントラスト評価値との関係を説明する図である。
[0080] 図 8 (A)及び図 8 (B)の各左図は、左半分が白色、右半分が黒色の矩形を撮影し たときの画像である。図 8 (A)の左図のように、合焦時は、撮影画像の輪郭がはっきり し、コントラストが大きい。一方、図 8 (B)の左図のように、非合焦時は、撮影画像の輪 郭がぼやけ、コントラストが小さい。 [0081] 図 8 (A)及び図 8 (B)の各右図は、左図の情報信号にバンドパスフィルタ(BPF)を 作用させたときの結果を示している。横軸は X軸方向位置であり、縦軸は BPF後の出 力値である。図 8 (A)の右図のように、合焦時は、 BPF後の信号振幅が大きぐ図 8 ( B)の右図のように、非合焦時は BPF後の信号振幅が小さい。ここで、この BPF後の 信号振幅をどれだけコントラストが大き!ヽかを示すコントラスト評価値と定義する。する と、図 8 (A)の右図のように、合焦時はコントラスト評価値が大きぐ図 8 (B)の右図の ように、非合焦時はコントラスト評価値が小さ 、。
[0082] 図 9は、本発明の実施の形態 1に係るカメラモジュールのレンズ位置とコントラスト評 価値との関係を説明する図である。ある物体を撮影するとき、レンズ 113と撮像素子 1 23との距離が小さいとき (zlのとき)、非合焦であるためコントラスト評価値が小さい。 レンズ 113と撮像素子 123との距離を徐々に大きくすると、コントラスト評価値が徐々 に大きくなり、合焦時 (z2のとき)はコントラスト評価値が極大となる。さらに、レンズ 11 3と撮像素子 123との距離を徐々に大きくすると (z3のとき)、非合焦となり、コントラス ト評価値が小さくなる。このように、合焦時において、コントラスト評価値は極大となる。
[0083] 次に、本発明の実施の形態 1に係るカメラモジュールの動作を説明する。図 10は、 本発明の実施の形態 1に係るカメラモジュールのブロック図である。 SLSI125は、シ ステム制御部 131、撮像素子駆動部 132、撮像信号入力部 133、ァクチユエータ操 作量出力部 134、画像処理部 135、および入出力部 136を有する。また、回路部 12 0は、前述の構成にカ卩えて、アンプ 126を有する。
[0084] アンプ 126は、ァクチユエータ操作量出力部 134からの出力に応じた電圧をァクチ ユエータ可動部 115のコイルに印加する。
[0085] システム制御部 131は、 CPU (中央演算処理装置: Central Processing Unit)、メモ リなど力も構成され、 SLSI125の全体を制御する。撮像素子駆動部 132は、ロジック 回路などカゝら構成され、撮像素子 123を駆動する信号を発生し、この信号に応じた 電圧を撮像素子 123に印加する。
[0086] 撮像信号入力部 133は、第 1の撮像信号入力部 133a、第 2の撮像信号入力部 13 3b、第 3の撮像信号入力部 133c、および第 4の撮像信号入力部 133dから構成され る。第 1の撮像信号入力部 133a、第 2の撮像信号入力部 133b、第 3の撮像信号入 力部 133c、および第 4の撮像信号入力部 133dは、それぞれ CDS回路 (相関二重 サンプリング回路: Correlated
Double Sampling Circuit)、 AGC (自動利得制御器: Automatic Gain Controller)、 A
Figure imgf000022_0001
Digital Converter)が直列に接続されて構成され、それぞれ第 1の撮像素子 123a、 第 2の撮像素子 123b、第 3の撮像素子 123c、および第 4の撮像素子 123dに接続さ れ、これらからの電気信号が入力され、 CDS回路により固定ノイズを除去し、 AGCに よりゲインを調整し、 ADCによりアナログ信号力もディジタル値に変換し、システム制 御部 131のメモリに書き込む。
[0087] ァクチユエータ操作量出力部 134は、 DAC (デジタルディジタル Zアナログ変換器 : Digital Analog Converter)から構成され、ァクチユエータ可動部 115のコイルに印加 すべき電圧に応じた電圧信号を出力する。
[0088] 画像処理部 135は、ロジック回路、または DSP、あるいはこれらの両者を含んで構 成され、システム制御部 131のメモリ情報を利用し、所定のプログラム制御に従って 各種画像処理を行う。画像処理部 135は、エッジ検出部 141、ブロック分割部 142、 視差演算部 143、視差補正部 144、視差式自動焦点制御部 145、ァクチユエータ制 御部 146、コントラスト式自動焦点制御部 147、自動焦点制御用コントラスト評価値演 算部 148、およびァクチユエータ操作量関数補正部 149を有する。
[0089] 入出力部 136は、上位 CPU (図示せず)との通信や、上位 CPU、外部メモリ(図示 せず)、および液晶などの外部表示装置 (図示せず)へ画像信号を出力する。
[0090] 図 11は、本発明の実施の形態 1に係るカメラモジュールの動作を示すフローチヤ一 トである。 SLSI125のシステム制御部 131〖こより、カメラモジュール 101は、このフロ 一チャートのとおりに動作される。
[0091] ステップ S100において、動作を開始する。例えば、上位 CPU (図示せず)力 シャ ッターボタンなどが押されたことを検知し、入出力部 136を介し、カメラモジュールに 動作の開始を命令することにより、カメラモジュール 101は、動作を開始する。次に、 ステップ S 110を実行する。
[0092] ステップ S110において、撮影を実行する。システム制御部 131の命令により、撮像 素子駆動部 132が電子シャッターや転送を行うための信号を随時出力する。第 1の 撮像信号入力部 133a、第 2の撮像信号入力部 133b、第 3の撮像信号入力部 133c 、および第 4の撮像信号入力部 133dは、撮像素子駆動部 132が発生する信号に同 期して、第 1の撮像素子 123a、第 2の撮像素子 123b、第 3の撮像素子 123c、およ び第 4の撮像素子 123dが出力する各画像のアナログ信号である撮像信号を入力し 、 CDSにより固定ノイズを除去し、 AGCにより自動的に入力ゲインを調整し、 ADCに よりアナログ信号をディジタル値に変換し、第 1の撮像信号 Il(x,y)、第 2の撮像信号 12 (x,y)、第 3の撮像信号 I3(x,y)、および第 4の撮像信号 I4(x,y)として、システム制御部 1 31の所定アドレスのメモリにディジタル値を書き込む。図 12は、本発明の実施の形 態 1に係るカメラモジュールの撮像信号の座標を説明する図である。 Il(x,y)は、水平 方向に X番目、垂直方向に y番目の第 1の撮像信号であることを示す。入力される画 像の縦方向の画素数が H、横方向の画素数力 であり、総画素数は H X Lであり、 X は 0から L— 1まで変化し、 yは 0から H— 1まで変化する。第 2の撮像信号 I2(x,y)、第 3 の撮像信号 I3(x,y)、第 4の撮像信号 I4(x,y)も同様である。すなわち、 I2(x,y)、 I3(x,y)、 および I4(x,y)は、それぞれ水平方向に X番目、垂直方向に y番目の第 2の撮像信号、 第 3の撮像信号、および第 4の撮像信号であることを示す。入力される画像の縦方向 の画素数が H、横方向の画素数力 であり、それぞれの総画素数は H X Lであり、 X は 0から L— 1まで変化し、 yは 0から H— 1まで変化する。次に、ステップ S121を実行 する。
[0093] ステップ S 121とステップ S 122とにおいて、エッジ検出部 141は、システム制御部 1 31のメモリ上データを利用し、エッジを検出する。そして、その結果をシステム制御部 131のメモリに書き込む。詳細は以下の通りである。
[0094] ステップ S121において、エッジ検出用コントラスト評価値を演算する。この演算は、 第 1の撮像信号のみについて行う。下記式(2)のように、ラプラシアンを演算し、さら に下記式(3)のように空間的に LPF (ローパスフィルタ)を作用させたものを、エッジ 検出用コントラスト評価値 C2(x,y)とする。図 13 (A)は、本発明の実施の形態 1に係る カメラモジュールのエッジ検出を説明する元画像であり、図 13 (B)は、本発明の実施 の形態 1に係るカメラモジュールのエッジ検出を説明するエッジ検出用コントラスト評 価値の画像である。式(2) (3)により、図 13 (A)の元画像のエッジ検出用コントラスト 評価値 C2(x,y)を計算すると、図 13 (B)のようになる。なお、図 13 (B)は、式(3)の絶 対値が大きい場所を黒で表示している。次に、ステップ S 122を実行する。
[0095] Cl(x,y)=Il(x-l,y)+Il(x+l,y)+Il(x,y-l)+Il(x,y+l)-4Il(x,y)
•••(2)
C2(x,y)=Cl(x-l,y-l)+Cl(x,y-l)+Cl(x+l,y-l)
+Cl(x-l,y)+Cl(x,y)+Cl(x+l,y)
+Cl(x-l,y+l)+Cl(x,y+l)+Cl(x+l,y+l)- · · (3)
ステップ S122において、エッジを検出する。図 13 (C)は、本発明の実施の形態 1 に係るカメラモジュールのエッジ検出を説明するエッジの画像である。図 13 (B)のェ ッジ検出用コントラスト評価値 C2(x,y)の 0クロス (値が正力 負に変化する点、および 値が負から正に変化する点)を検知することにより、図 13 (C)のようなエッジを検出で きる。次に、ステップ S 130を実行する。
[0096] ステップ S130において、ブロック分割部 142は、システム制御部 131のメモリ上の データを利用し、ブロックに分割する。そして、その結果をシステム制御部 131のメモ リに書き込む。図 13 (C)のように、エッジに囲まれた領域に BO、 Bl、…ゝ Biゝ…ゝ Bn のように番号を付与する。なお、ノイズなどによるエッジの誤検出や消失の防止のた めに、膨張アルゴリズムや収縮アルゴリズムを用いて、エッジを補正してもよい。次に 、ステップ S 140を実行する。
[0097] ステップ S140において、視差演算部 143は、システム制御部 131のメモリ上のデ ータを利用し、各ブロック毎の視差値を演算する。そして、システム制御部 131のメモ リに書き込む。まず、各ブロック(BO、 Bl、 · ··、 Bi、 · ··、 Bn)毎に、視差評価値 (R0(k) 、 Rl(k)、…ゝ Ri(k)、…ゝ Rn(k)0 k=0、 1、…ゝ m)を演算する。図 14は、本発明の実施 の形態 1に係るカメラモジュールにおいて、視差評価値の演算領域を説明する図で ある。 Biで示される (IIとしても示されている)領域は、第 1の撮像信号 IIからステップ S 130で求められた i番目のブロックである。 14で示される領域は、 Biを X方向に kだけ 、 y方向に kだけ移動した領域である。そして、それぞれの領域の全画像信号 Il(x,y)、 I4(x,y)について、下記式 (4)に示される絶対値差分総和を視差評価値 Ri(k)として演 算する。
[0098] Ri(k)=∑∑ |ll(x,y)-I4(x-k,y-k)| · · · (4)
この視差評価値 Ri(k)は、 i番目のブロック Biの第 1の画像信号 IIと、 x、 y方向にそれ ぞれ (k、 k)だけ離れた領域における第 4の画像信号 14がどれだけ相関があるかを示 し、値が小さいほど相関が大きい(よく似ている)ことを示す。図 15は、本発明の実施 の形態 1に係るカメラモジュールの視差と視差評価値との関係を説明する図である。 図 15のように、視差評価値 Ri(k)は kの値によって変化し、 k= A iのとき極小値を持つ 。これは、第 4の画像信号 14の i番目のブロック Biを x、 y方向にそれぞれ(一 A i、 一 Δ i)だけ移動させて得られるブロックの画像信号は、第 1の画像信号 IIと最も相関があ る(最も似ている)ことを示す。したがって、 i番目のブロックについての第 1の撮像信 号 IIと第 4の撮像信号 14との x、 y方向の視差が(A i、 A i)であることが分かる。以下、 この A iを、 i番目のブロック Biの視差値 A iと呼ぶ。このように、 i=0から i=nまでの全 てのブロック Biの視差値 A iを求める。次に、ステップ S 151を実行する。
[0099] ステップ S151とステップ S152とにおいて、プレビュー用の画像を出力する。
[0100] ステップ S151において、視差補正部 144は、システム制御部 131のメモリ上のデ ータを利用し、ブロックごとに、そのブロックに対応する視差値を用いて視差補正した のち、画像合成する。そして、その結果をシステム制御部 131のメモリに書き込む。第 1の撮像素子 123aおよび第 4の撮像素子 123dは、主に物体光の緑色成分を受光 するため、第 1の撮像信号 II、および第 4の撮像信号 14は、物体光の緑色成分の情 報信号である。また、第 2の撮像信号 123bは、主に物体光の青色成分を受光するた め、第 2の撮像信号 12は、物体光の青色成分の情報信号である。さらに、第 3の撮像 信号 123cは、主に物体光の赤色成分を受光するため、第 3の撮像信号 13は、物体 光の赤色成分の情報信号である。第 1の撮像素子 123aと第 4の撮像素子 123dとの 視差が( Δ i、 Δ i)であると予測されたため、下記式 (5)のように、画素座標 (x、 y)に おける緑色の強度を示す G(x,y)を、第 1の撮像信号 Il(x,y)、および第 4の撮像信号 14( X- A i,y- Δ 0の平均とする。また、第 1の撮像素子 123aと第 2の撮像素子 123bの視 差が(A i、 0)であると予測されたため、下記式 (6)のように、画素座標 (x、 y)におけ る青色の強度を示す B(x,y)を、第 2の撮像信号 I2(x- A i,y)とする。さらに、第 1の撮像 素子 123aと第 3の撮像素子 123cの視差が(0、 A i)であると予測されたため、下記 式(7)のように、(x、 y)における赤色の強度を示す R(x,y)を、第 3の撮像信号 I3(x,y- Δ 0とする。なお、視差値 としては、画素座標 (x、 y)を含むブロック
Biの視差値 A iを利用する。次に、ステップ S 152を実行する。
[0101] G(x,y)=[Il(x,y)+I4(x- Δ i,y- Δ i)]/2 · · · (5)
B(x,y)=I2(x- A i,y) · · · (6)
R(x,y)=I3(x,y- A i) …(7)
ステップ S152において、画像を出力する。入出力部 136は、システム制御部 131 のメモリ上のデータである G(x,y),B(x,y),R(x,y)を、上位 CPU (図示せず)や外部表示 装置(図示せず)に出力する。なお、 G(X,y),B(X,y),R(x,y)の代わりに、例えば、輝度、 色差信号などの出力を出力してもよい。また、ホワイトバランスや γ補正などの画像処 理後の値を出力してもよい。次に、 S161を実行する。
[0102] ステップ S161とステップ S162と S163とにおいて、視差値を用いた自動焦点制御 を行う。
[0103] ステップ S161において、視差式自動焦点制御部 145は、システム制御部 131のメ モリ上のデータに基づき、自動焦点制御用ブロックを選択する。そして、その結果を システム制御部 131のメモリに書き込む。例えば画像領域の中心付近の少なくとも 1 つのブロック(例えば、 3つのブロック Bj l、 Bj2、および Bj3)を選択する。なお、これら のブロックは必ずしも中央付近である必要はなぐカメラを操作するユーザの意思な どを反映し (例えば、センサで視点方向を検出し)、ブロックを選択してもよい。次に、 ステップ S 162を実行する。
[0104] ステップ S162において、ァクチユエータの位置指令を演算する。上記の例であれ ば、下記式(8)のように、ブロック Bj l、 Bj2、および Bj3の視差値 Aj l、 Aj2、および Aj3の平均を自動焦点制御用視差値 A afとする。なお、ブロックの面積やより中心に 近いかどうかなどの情報により、適宜重み付けしてもよい。さらに、下記式(9)のように 、ァクチユエータの位置指令 Xactを演算する。なお、位置指令 Xactは、無限遠像の 合焦位置を基準とし、被写体に向かう向きの位置の指令を示す。次に、ステップ S16 3を実行する。 [0105] A af =( Aj l+ Aj2+ Aj3)/3 · · · (8)
Xact=kx- A af · · · (9)
ステップ S163において、ァクチユエータ制御部 146は、下記式(10)で示した操作 量関数を用いてァクチユエータ操作量 (ァクチユエータ可動部 115のコイルへの印加 電圧) Vactを演算する。また、後述の操作量関数の学習のために、ァクチユエータ操 作量を VactOとして保存する。次に、ステップ S 164を実行する。
[0106] Vact=ka · Xact+kb · · · (10)
VactO=Vact · · · (ΙΟ' )
ステップ S164において、ァクチユエータを動作させる。ァクチユエータ操作量出力 部 134は、アンプ 126を介したのちァクチユエータ可動部 115のコイル(図示せず)に 印加される電圧力 SVactになるように出力する電圧信号を変更する。次に、ステップ S 171を実行する。 テツプ S176とにおいて、コントラスト式自動焦点制御部 147は、コントラストを用いた 自動焦点制御を行う。前述の図 9ように、合焦位置ではコントラスト評価値が極大とな る。この原理を用いて、コントラスト評価値が極大となるァクチユエータ操作量を探索 する。
[0108] ステップ S171において、ァクチユエータ操作量の補正なしの自動焦点制御用コン トラスト評価値を作成する。ステップ S171は、ステップ S171cとステップ S171dと力ら 成る。まず、ステップ S171cを実行する。
[0109] ステップ S171cにおいて、撮影を実行する。この動作は、ステップ S110と同様であ るが、第 1の撮像素子 123aからの撮像信号 IIのうち、 S161で選択された自動焦点 制御用ブロックの撮像信号 IIのみを転送しても良い。その場合、全ての撮像信号を 転送することと比較し、転送時間を短縮できる。次に、ステップ S171dを実行する。
[0110] ステップ S171dにおいて、自動焦点制御用コントラスト評価値演算部 148は、シス テム制御部 131のメモリ上のデータを用いて、自動焦点制御用コントラスト評価値を 作成する。この演算は、自動焦点制御用ブロックについての第 1の撮像信号 IIのみ について行う。下記式(11)のように、ラプラシアンの絶対値を演算し、下記式(12)の ように空間的に LPF (ローパスフィルタ)を作用させ、これを下記式( 13)のように自動 焦点制御用ブロック内で平均して自動焦点用コントラスト評価値 C5を得る。ここで、 N は、自動焦点制御用ブロック内の C4(x,y)の数である。そして、下記式(14)のように、 このときのコントラスト評価値 C5を C50として、システム制御部 131のメモリに書き込む 。次に、ステップ S 172を実行する。
[0111] C3(x,y)=|ll(x-l,y)+Il(x+l,y)+Il(x,y-l)+Il(x,y+l)-4Il(x,y)|
•••(11)
C4(x,y)=C3(x-l,y-l)+C3(x,y-l)+C3(x+l,y-l)
+C3(x-1 ,y)+C3(x,y)+C3(x+l ,y)
+C3(x-l,y+l)+C3(x,y+l)+C3(x+l,y+l) · · · (12)
C5=∑C4(x,y)/N · · · (13)
C50=C5 · · · (14)
ステップ S172において、ァクチユエータ操作量の正側補正時の自動焦点制御用コ ントラスト評価値を作成する。ステップ S 172は、ステップ S172a、ステップ S172b、ス テツプ S172c、およびステップ SI 72d力も成る。まず、ステップ S 172aを実行する。
[0112] ステップ S172aにおいて、下記式(15)のように、補正なし時のァクチユエータ操作 量(ァクチユエータ固定部 114のコイルへの印加電圧) VactOに dVactをカ卩えたもの を正側補正時のァクチユエータ操作量 Vactとし、下記式(16)のように、 Vactpとして メモリ【こ保存する。次【こ、ステップ S172b、ステップ S172c、およびステップ S172dを 実行する。
[0113] Vact=VactO+dVact · · · (15)
Vactp=Vact - - - (16)
ステップ S172bにおいて、ァクチユエータを動作させ、ステップ S172cにおいて、 撮影を実行し、ステップ S172dにおいて、自動焦点制御用コントラスト評価値を作成 する。ステップ S172bはステップ S164と同様な動作を行う。また、ステップ S172c、 ステップ S172dは、ステップ 171c、ステップ S171dと同様な動作を行い、下記式(17 )のように、コントラスト評価値 C5を正側補正後の自動焦点用コントラスト評価値 C5p とし、システム制御部 131のメモリに書き込む。次に、ステップ S 173を実行する。 [0114] C5p=C5 · · · (17)
ステップ S173において、ァクチユエータ操作量の負側補正時の自動焦点制御用コ ントラスト評価値を作成する。ステップ S173は、ステップ S173a、ステップ S173b、ス テツプ S173c、およびステップ SI 73d力も成る。まず、ステップ S 173aを実行する。
[0115] ステップ S173aにおいて、下記式(18)のように、補正なし時のァクチユエータ操作 量(ァクチユエータ固定部 114のコイルへの印加電圧) VactOから dVactを減じたも のを負側補正時のァクチユエータ操作量 Vactとし、下記式(19)のように、 Vactnとし てメモリ【こ保存する。次【こ、ステップ S173b、ステップ S173c、およびステップ S173d を実行する。
[0116] Vact=VactO— dVact · · · (18)
Vactn=Vact …(19)
ステップ S173bにおいて、ァクチユエータを動作させ、ステップ S173cにおいて、 撮影を実行し、ステップ S173dにおいて、自動焦点制御用コントラスト評価値を作成 する。ステップ 172b、ステップ S172c、ステップ S172dと同様な動作を行い、下記式 (20)のように、コントラスト評価値 C5を負側補正後の自動焦点用コントラスト評価値 C5nとし、システム制御部 131のメモリに書き込む。次に、ステップ S 174を実行する。
[0117] C5n=C5 · · · (20)
ステップ S174において、焦点制御用コントラスト評価値を評価する。 C50、 C5p、 C 5nを比較し、どれが最大値であるかによって分岐する。
[0118] C50が最大値のとき、以下の動作を行い、次にステップ S 181を実行する。図 16 (A )は、本発明の実施の形態 1に係るカメラモジュールにおいて、補正なし時にコントラ スト評価値が最大となるときのァクチユエータ操作量とコントラスト評価値の関係を説 明する図である。図 16 (A)のように、補正なしのァクチユエータ操作量 VactOが自動 焦点制御用コントラスト値 C5のほぼ極大値を与えるため、下記式(21)のように、最終 的なァクチユエータ操作量 Vactfを VactOとする。
[0119] Vactl^VactO (C50が最大のとき) · · ·(21)
C5pが最大値のとき、以下の動作を行い、次にステップ S 175を実行する。図 16 (B )は、本発明の実施の形態 1に係るカメラモジュールにおいて、正側補正後のコントラ スト評価値が最大となるときのァクチユエータ操作量とコントラスト評価値の関係を説 明する図である。図 16 (B)のように、正側補正後のァクチユエータ操作量 Vactp、あ るいは、さらに正側に補正した後のァクチユエータ操作量 Vactが、自動焦点制御用 コントラスト評価値 C5のほぼ極大値を与えるため、さらにァクチユエータ操作量を正 側に補正し、極大値を探索する。なお、下記式(22)のように、 C5pを前回値として C 5ppとして保存する。
[0120] C5pp=C5p · · · (22)
C5nが最大値のとき、以下の動作を行い、次にステップ S 176を実行する。図 16 (C )は、本発明の実施の形態 1に係るカメラモジュールにおいて、負側補正後のコントラ スト評価値が最大となるときのァクチユエータ操作量とコントラスト評価値の関係を説 明する図である。図 16 (C)のように、負側補正後のァクチユエータ操作量 Vactn、あ るいは、さらに負側に補正した後のァクチユエータ操作量 Vactが、自動焦点制御用 コントラスト評価値 C5のほぼ極大値を与えるため、さらにァクチユエータ操作量を負 側に補正し、極大値を探索する。なお、下記式(23)のように、 C5nを前回値として C 5npとして保存する。
[0121] C5np=C5p . . . (23)
ステップ S175において、さらなる正側補正時の自動焦点用コントラスト評価値の作 成と評価を行う。ステップ S175は、ステップ S175a、ステップ S175b、ステップ S175 c、ステップ S175d、およびステップ SI 75e力も成る。まず、ステップ S 175aを実行す る。
[0122] ステップ S175aにおいて、下記式(24)のように、前回の正側補正後のァクチユエ ータ操作量(ァクチユエータ固定部 114のコイルへの印加電圧) Vactpに dVactを加 えたものを正側補正時のァクチユエータ操作量 Vactとし、下記式(25)のように、 Vac tpとしてメモリに保存する。次に、ステップ S175b、ステップ S175c、およびステップ S 175dを実行する。
[0123] Vact=Vactp+dVact · · · (24)
Vactp=Vact · · · (25)
ステップ S175bにおいて、ァクチユエータを動作させ、ステップ S175cにおいて、 撮影を実行し、ステップ S175dにおいて、自動焦点制御用コントラスト評価値を作成 する。ステップ 172b、ステップ S172c、ステップ S172dと同様な動作を行い、下記式 (26)のように、コントラスト評価値 C5を正側補正後の自動焦点用コントラスト評価値 C5pとして、システム制御部 131のメモリに書き込む。次に、ステップ S175eを実行す る。
[0124] C5p=C5 · · · (26)
ステップ S175eにおいて、焦点制御用コントラスト評価値を評価する。 C5pp、 C5p を比較し、どれが最大値であるかによって分岐する。
[0125] C5ppが最大値のとき、以下の動作を行い、次にステップ S 181を実行する。図 17 (
A)は、本発明の実施の形態 1に係るカメラモジュールにおいて、さらなる正側補正を したとき、この正側補正前でのコントラスト評価値が最大となるァクチユエータ操作量 とコントラスト評価値の関係を説明する図である。図 17 (A)のように、前回の正側補正 後のァクチユエータ操作量 Vactp-dVactが自動焦点制御用コントラスト値 C5のほぼ 極大値を与えるため、下記式(27)のように、最終的なァクチユエータ操作量 Vactfを Vactp— dVactとする。
[0126] Vactl^Vactp- dVact (C5ppが最大値のとき) · · ·(27)
C5pが最大値のとき、以下の動作を行い、次にステップ S 175aを実行する。図 17 (
B)は、本発明の実施の形態 1に係るカメラモジュールにおいて、さらなる正側補正を したとき、この正側補正後でのコントラスト評価値が最大となるァクチユエータ操作量 とコントラスト評価値の関係を説明する図である。図 17 (B)のように、今回の正側補正 後のァクチユエータ操作量 Vactp、あるいは、さらに正側に補正した後のァクチユエ ータ操作量 Vact力 自動焦点制御用コントラスト評価値 C5のほぼ極大値を与えるた め、さらにァクチユエータ操作量を正側に補正し、極大値を探索する。なお、下記式( 28)のように、 C5pを前回値として C5ppとして保存する。
[0127] C5pp=C5p · · · (28)
ステップ S176において、さらなる負側補正時の自動焦点用コントラスト評価値の作 成と評価を行う。ステップ S176は、ステップ S176a、ステップ S176b、ステップ S176 c、ステップ S176d、およびステップ SI 76e力も成る。まず、ステップ S 176aを実行す る。
[0128] ステップ S176aにおいて、下記式(29)のように、前回の負側補正後のァクチユエ ータ操作量(ァクチユエータ固定部 114のコイルへの印加電圧) Vactpから dVactを 減じたものを負側補正時のァクチユエータ操作量 Vactとし、下記式(30)のように、 V actnとしてメモリに保存する。次に、ステップ S176b、ステップ S 176c、およびステツ プ S176dを実行する。
[0129] Vact=Vactn— dVact · · · (29)
Vactn=Vact . · · (30)
ステップ S176bにおいて、ァクチユエータを動作させ、ステップ S 176cにおいて、 撮影を実行し、ステップ S 176dにおいて、自動焦点制御用コントラスト評価値を作成 する。ステップ 172b、ステップ S172c、ステップ S172dと同様な動作を行い、下記式 (31)のように、コントラスト評価値 C5を負側補正後の自動焦点用コントラスト評価値 C5nとして、システム制御部 131のメモリに書き込む。次に、ステップ S176eを実行す る。
[0130] C5n=C5 · · · (31)
ステップ S176eにおいて、焦点制御用コントラスト評価値を評価する。 C5np、 C5n を比較し、どれが最大値であるかによって分岐する。
[0131] C5npが最大値のとき、以下の動作を行い、次にステップ S 181を実行する。図 18 (
A)は、本発明の実施の形態 1に係るカメラモジュールにおいて、さらなる負側補正を したとき、この負側補正前でのコントラスト評価値が最大となるァクチユエータ操作量 とコントラスト評価値の関係を説明する図である。図 18 (A)のように、前回の負側補正 後のァクチユエータ操作量 Vactp+dVactが自動焦点制御用コントラスト値 C5のほぼ 極大値を与えるため、下記式(32)のように、最終的なァクチユエータ操作量 Vactfを Vactp+dVactとする。
[0132] Vactl^Vactp+dVact (C5npが最大値のとき) · · ·(32)
C5nが最大値のとき、以下の動作を行い、次にステップ S 176aを実行する。図 18 (
B)は、本発明の実施の形態 1に係るカメラモジュールにおいて、さらなる負側補正を したとき、この負側補正後でのコントラスト評価値が最大となるァクチユエータ操作量 とコントラスト評価値の関係を説明する図である。図 18 (B)のように、今回の負側補正 後のァクチユエータ操作量 Vactn、あるいは、さらに負側に補正した後のァクチユエ ータ操作量 Vact力 自動焦点制御用コントラスト評価値 C5のほぼ極大値を与えるた め、さらにァクチユエータ操作量を負側に補正し、極大値を探索する。なお、下記式( 33)のように、 C5nを前回値として C5npとして保存する。
[0133] C5np=C5n · · · (33) おいて、最終的な撮影と画像出力を行う。
[0134] ステップ S181において、下記式(34)のように、ァクチユエータ操作量 Vactとして、 上記で得た最終的なァクチユエータ操作量 Vactfを設定する。次に、ステップ S 182 を実行する。
[0135] Vact=Vactf · · · (34)
S182において、ァクチユエータを動作させる。このステップは、ステップ S164と同 様に動作させる。次に、ステップ S 183を実行する。
[0136] ステップ S183において、撮影を行う。このステップは、ステップ S110と同様に動作 させる。次に、ステップ S 184を実行する。
[0137] ステップ S184において、各ブロックを、そのブロックに対応する視差値を用いて視 差補正したのち、画像合成する。このステップは、ステップ S151と同様に動作させる
。次に、ステップ S 185を実行する。
[0138] ステップ S185において、画像出力する。このステップは、 S152と同様に動作させ る。次に、ステップ S 190を実行する。
[0139] ステップ S190において、ァクチユエータ操作量関数補正部 149は、コントラスト式 自動焦点制御の補正値に基づき操作量関数を補正する。即ち、下記式 (35)のよう に、操作量関数の係数 kbを補正し、システム制御部 131のメモリに書かれた値を変 更する。次回の撮影時はこの値を利用する。次に、ステップ S 199を実行する。
[0140] kb=kb+kc - (Vactf-VactO) · · · (35)
ステップ SI 99において、処理を終了する。
[0141] 以上のように構成し、動作させることにより、以下の効果を有する。 [0142] 第 1の実施の形態のカメラモジュールでは、ステップ S161、ステップ S162、ステツ プ S163、ステップ S164のように、自動焦点制御用視差値 A afに基づきァクチユエ ータ位置指令 Xactを作成し、ァクチユエータ操作量 Vactを演算し、ァクチユエータ固 定部 114のコイルに電圧を印加しァクチユエータを動作させ、自動焦点制御する。こ のことにより、 1回のァクチユエータ動作で合焦するため、高速に自動焦点制御できる
[0143] また、第 1の実施の形態のカメラモジュールでは、まず、ステップ S161、ステップ SI 62、ステップ S163、ステップ S164において、視差に基づきァクチユエータを動作さ せ自動焦点制御を行う。続いて、ステップ S171、ステップ S172、ステップ S173、ス テツプ S174、ステップ S175、ステップ S176にお!/、て、コントラストに基づきァクチュ エータを動作させ自動焦点制御を行う。視差に基づく自動焦点制御は、 1回のァクチ ユエータ動作で合焦するため、高速である。一方、コントラストに基づく自動焦点制御 は、画像から直接合焦を判断するため、ァクチユエータのばらつきなどに左右されず 、精度がよい。したがって、高速な視差に基づく自動焦点制御により粗調整し、高精 度なコントラストに基づく自動焦点制御により微調整するため、高速で高精度に自動 焦点制御できる。
[0144] また、第 1の実施の形態のカメラモジュールでは、ステップ S190において、コントラ ストに基づく自動焦点制御にぉ 、て補正されたァクチユエータ操作量 (Vactf-VactO) に基づき、操作量関数の係数 kbを補正するような学習を行う。このことにより、ァクチ ユエータのばらつきなどがあっても操作量関数をより正確に補正し、視差に基づく自 動焦点制御がより正確になり、次回のコントラストに基づく自動焦点制御による微調 整の回数を減少できるため、より高速な自動焦点制御を実現する。
[0145] 式( 1)のように被写体距離 Aに応じて第 1〜第 4のレンズ部 113a〜 113dがそれぞ れ形成する 4つの物体像の相対的位置が変化する。すなわち、被写体距離 Aが小さ くなると、視差 Δが大きくなる。そのため、距離が異なる複数の被写体を同時に撮影 するとき、被写体毎に視差 Δが異なる。第 1の実施の形態のカメラモジュールでは、 ステップ S 130において、全画像領域をブロックに分割し、ステップ S 140において、 ブロック毎の視差を演算し、ステップ S 184において、ブロック毎の視差に基づき視差 の影響を低減するように画像合成することで視差補正する。これにより、距離が異な る複数の被写体を同時に撮影するときにおいても、適宜それぞれの被写体の視差を 補正し、全画像領域で視差の影響が低減されたきれ!/、な画像を得ることができる。
[0146] また、第 1の実施の形態のカメラモジュールでは、ステップ S121、ステップ S122に おいて、エッジを検出し、ステップ S130において、ブロックに分割する。このことにより 、適切にブロック化を行うことができるため、全画像領域で視差の影響が低減された きれ ヽな画像を得ることができる。
[0147] なお、第 1の実施の形態のカメラモジュールにおいて、演算された視差をそのまま 利用したが、適宜リミットしてもよい。レンズ特性よつては被写体距離 Aがある値よりも 小さいとき、画像が不鮮明となる。そのため、この値を被写体距離 Aの最小値と定め れば、視差 Δの最大値を定められる。この値よりも大きい視差は、誤差であるとして無 視してもよい。また、このような場合、視差評価値が 2番目に小さい値を視差として採 用してちょい。
[0148] また、第 1の実施の形態のカメラモジュールでは、視差を第 1の撮像信号 II (主に緑 色を示す)と第 4の撮像信号 14 (主に緑色を示す)とカゝら演算したが、本発明はこれに 限定されない。例えば、紫色の被写体は緑色成分が少なぐ青色成分、赤色成分を 多く含むため、第 1の撮像信号 II (主に緑色を示す)と第 4の撮像信号 14 (主に緑色 を示す)とから演算できな 、場合、第 2の撮像信号 12 (主に青色を示す)と第 3の撮像 信号 13 (主に赤色を示す)と力も視差を演算してもよい。また、第 1の視差信号 II (主 に緑色を示す)と第 4の視差信号 14 (主に緑色を示す)とから視差が演算不能であり、 かつ、第 2の撮像信号 12 (主に青色を示す)と第 3の撮像信号 13 (主に赤色を示す)と から視差が演算不能であれば、視差の影響がないものとみなし、視差なしとすればよ い。
[0149] また、第 1の実施の形態のカメラモジュールをカメラに搭載するとき、上側に第 2の 撮像素子 123aが、下側に第 3の撮像素子 123cが配置されるように、第 1〜第 4の撮 像素子 123a〜123dを配置することにより、上側が青色に敏感となり、下側が赤色に 敏感となるので、風景写真の色再現をより自然にできる。
[0150] また、視差評価値に目立つ極値が 2つあるときは、より大きい方の視差を採用しても よい。このようなブロックには、被写体と背景が含まれており、被写体距離と背景距離 とが異なるため、極値が 2つ現れる。背景距離と比較して被写体距離は小さいため、 背景の視差と比較して被写体の視差は大きい。ここで、大きい方の視差を採用すれ ば、背景の視差の影響は低減できないが、画質に直接影響する被写体の視差の影 響を低減できる。
[0151] また、画像出力のタイミングは、上記に限定されず、適宜プレビュー出力をしてもよ い。例えば、ステップ S110の撮影後、視差補正なしの画像を出力してもよい。また、 ステップ S 130のブロック分割において、 1つのブロックを分割した際にその結果を反 映し、プレビュー画面を更新してもよい。
[0152] また、実施の形態 1のカメラモジュールは、 S164において視差によりァクチユエ一 タを動作させ、その後 S171、 S172、 S173、 S175、 S182【こお!ヽてコントラスト【こより ァクチユエータを動作させる力 視差によりのみァクチユエータを動作させてもよ 、。 焦点深度が深いレンズを利用した場合は、レンズと撮像素子の距離には多少の誤差 が許容されるため、コントラストによりァクチユエータを動作させ、精度を向上する必要 がないからである。
[0153] また、実施の形態 1のカメラモジュールは、 S190において補正量関数を補正する、 すなわちコントラストに基づきァクチユエータを動作させたときの操作量に基づき学習 を行うが、このステップが省略されてもよい。実施の形態 1のカメラモジュールのァクチ ユエータは、ボイスコイル型であり、温度変化や姿勢変化によりレンズの移動量が変 化するため、学習により精度が著しく向上するが、ステッピングモータを利用した場合 には、温度変化や姿勢変化によりレンズ移動量の変化が小さいため、学習を省略し てもよい。
[0154] また、視差による焦点制御を行うがァクチユエータを動作させない場合があってもよ い。例えば、レンズと撮像素子の相対距離をあらかじめ無限遠を撮影時に合焦する 距離とし、視差が小さいときはァクチユエータを動作させる必要がないとみなし、ァク チユエータを動作させなくてもよ 、。
[0155] また、適宜、ブロック分割を繰り返し、ブロックを更新する動作を付加してもよ 、。例 え ίま、、実施の形態: Uこお ヽて、 S183のお!/ヽて撮影を行った後、 S121, S122,およ び S 130を行 、ブロックを更新し、その後ステップ S 184にお 、て視差補正してもよ!/ヽ
[0156] (実施の形態 2)
本発明の実施の形態 2に係るカメラモジュールは、複数画像のコントラストを用いて エッジの視差を検出し、この視差に基づき全画像領域の視差を演算し、この視差に 基づき視差の影響を低減するように画像合成し視差補正することにより、全画像領域 で視差の影響が低減されたきれ 、な画像を得る。
[0157] 本発明の実施の形態 2に係るカメラモジュールについて、図面を参照しながら説明 する。
[0158] 図 19は、本発明の実施の形態 2に係るカメラモジュールの構成を示す断面図であ る。カメラモジュール 201の回路部 220の SLSI225以外は、実施の形態 1と同様で あり、実施の携帯 1と同様の部材には同一の符号を付してそれらについての説明を 省略する。
[0159] 図 20は、本発明の実施の形態 2に係るカメラモジュールのブロック図である。 SLSI 225は、システム制御部 231、撮像素子駆動部 132、撮像信号入力部 133、ァクチュ エータ操作量出力部 134、画像処理部 235、および入出力部 136を有する。また、 回路部 220は、前述の構成にカ卩えて、アンプ 126を有する。
[0160] システム制御部 231は、 CPU、メモリなど力も構成され、 SLSI225の全体を制御す る。
[0161] 画像処理部 235は、ロジック回路、または DSP、あるいは両者を含んで構成され、 システム制御部 231のメモリ情報を利用し、各種画像処理を行う。画像処理部 235は 、コントラスト演算部 241、自動焦点制御部 242、エッジ視差演算部 243、全画像領 域視差演算部 244、視差補正部 245を有する。
[0162] 撮像素子駆動部 132、撮像信号入力部 133、ァクチユエータ操作量出力部 134、 入出力部 136、およびアンプ 126は、実施の形態 1と同様であり、説明を省略する。
[0163] 図 21は、本発明の実施の形態 2に係るカメラモジュールの動作を示すフローチヤ一 トである。 SLSI225のシステム制御部 231〖こより、カメラモジュール 201は、このフロ 一チャートのとおりに動作する。 [0164] ステップ S200にお 、て、動作を開始する。例えば、上位 CPU (図示せず)がシャツ ターボタンなどが押されたことを検知し、入出力部 136を介し、カメラモジュールに動 作の開始を命令することにより、カメラモジュール 201は、動作を開始する。次に、ス テツプ S211を実行する。
[0165] ステップ S211、ステップ S212、ステップ S213、ステップ S214、ステップ S215、ス テツプ S216、およびステップ S217において、複数回の撮影を行い、コントラスト評価 値を演算し、撮像信号とコントラスト評価値を保存する。
[0166] ステップ S211において、下記式(36)のように、カウンタ iを初期化する。次に、ステ ップ S 212を実行する。
[0167] i=0 · · · (36)
ステップ S212において、ァクチユエータ位置指令 Xactを作成する。なお、位置指 令 Xactは、無限遠像の合焦位置を基準とし、被写体に向かう向きの位置の指令を示 す。次に、ステップ S 213を実行する。
[0168] Xact=kx2 -i · · · (37)
ステップ S213において、下記式(38)のように、ァクチユエータ位置指令 Xactに基 づき制御量関数を用いてァクチユエータ制御量 Vactを演算する。次に、ステップ S21
4を実行する。
[0169] Vact=ka-Xact+kb · · · (38)
ステップ S214において、ァクチユエータを動作させる。この動作は、実施の形態 1 のステップ S162の動作と同様であり、説明を省略する。次に、ステップ S215を実行 する。
[0170] ステップ S215において、撮影を行い、撮像信号を保存する。システム制御部 231 の命令により、撮像素子駆動部 132が電子シャッターや転送を行うための信号を随 時出力する。第 1の撮像信号入力部 133a、第 2の撮像信号入力部 133b、第 3の撮 像信号入力部 133c、および第 4の撮像信号入力部 133dは、撮像素子駆動部 132 が発生する信号に同期して、第 1の撮像素子 123a、第 2の撮像素子 123b、第 3の撮 像素子 123c、および第 4の撮像素子 123dが出力する各画像のアナログ信号である 撮像信号を入力し、 CDSにより固定ノイズを除去し、 AGCにより自動的に入力ゲイン を調整し、 ADCによりアナログ信号をディジタル値に変換し、第 1の撮像信号 Il(i,x,y) 、第 2の撮像信号 I2(i,x,y)、第 3の撮像信号 I3(i,x,y)、および第 4の撮像信号 I4(i,x,y)と して、システム制御部 131の所定アドレスのメモリにディジタル値を書き込む。図 22は 、本発明の実施の形態 2に係るカメラモジュールの撮像信号の座標を説明する図で ある。 Il(i,x,y)は、 i番目に撮影された水平方向に X番目、垂直方向に y番目の第 1の 撮像信号であることを示す。入力される画像の縦方向の画素数が H、横方向の画素 数が Lであり、総画素数は H X Lであり、 Xは 0から L— 1まで変化し、 yは 0から H— 1ま で変化する。また、 iはカウンタであり、 i+1回目の撮影の画像であることを示す。第 2の 撮像信号 I2(i,x,y)、第 3の撮像信号 I3(i,x,y)、第 4の撮像信号 I4(i,x,y)も同様である。 すなわち、 I2(i,x,y)、 I3(i,x,y)、および I4(i,x,y)は、それぞれ i+ 1番目に撮影された水 平方向に X番目、垂直方向に y番目の第 2の撮像信号、第 3の撮像信号、および第 4 の撮像信号であることを示す。入力される画像の縦方向の画素数が H、横方向の画 素数が Lであり、それぞれの総画素数は H X Lであり、 Xは 0から L— 1まで変化し、 y は 0から H— 1まで変化する。また、 iはカウンタであり、 i+1回目の撮影の画像であるこ とを示す。次に、ステップ S 126を実行する。
[0171] ステップ S216において、コントラスト演算部 241は、システム制御部 231のメモリ上 のデータを用いて、コントラスト評価値の演算と保存を行う。この演算は、第 1の撮像 信号 IIについてのみ行う。下記式(39)のように、ラプラシアンを演算し、さらに下記 式 (40)のように空間的に LPF (ローパスフィルタ)を作用させたものをコントラスト評価 値 C2(i,x,y)とする。そして、これをシステム制御部 231のメモリに書き込む。次に、ステ ップ S 217を実行する。
[0172] Cl(i,x,y)=Il(i,x-l,y)+Il(i,x+l,y)+Il(i,x,y-l)+Il(i,x,y+l)-4Il(i,x,y)
•••(39)
C2(i,x,y)=Cl(i,x-l,y-l)+Cl(i,x,y-l)+Cl(i,x+l,y-l)
+Cl(i,x-l,y)+Cl(i,x,y)+Cl(i,x+l,y)
+Cl(i,x-l,y+l)+Cl(i,x,y+l)+Cl(i,x+l,y+l) · · · (40) ステップ S217において、撮影枚数をチェックし、分岐する。まず、下記式 (41)のよ うに、カウンタ iを 1だけ増加させる。カウンタ iが撮影枚数 Npより小さければ、次にステ ップ S212を実行する。カウンタ iが撮影枚数 Npに等しければ、次に、ステップ S221 を実行する。
[0173] i=i+l · · · (41)
ステップ S221、およびステップ S222において、自動焦点制御部 242は、システム 制御部 231のメモリ上のデータを用いて、合焦位置で撮影された画像を選択する。
[0174] ステップ S221において、自動焦点用ブロックを作成する。画像領域の中央付近の 長方形状のブロックを自動焦点用ブロックとする。なお、このブロックは必ずしも中央 付近である必要はなぐカメラを操作するユーザの意思などを反映し (例えば、センサ で視点方向を検出し)、ブロックを作成してもよい。次に、ステップ S222を実行する。
[0175] ステップ S222において、合焦位置で撮影された画像を選択する。図 9で説明した ように、合焦位置で撮影された画像は、コントラストが極大となる。この原理に基づき、 合焦位置で撮影された画像を選択する。まず、下記式 (42)のように、各撮影におけ るコントラスト評価値 C2(i,x,y)の自動焦点用ブロックでの平均を自動焦点制御用コント ラスト評価値 C3とする。なお、∑は、自動焦点用ブロックでの総和を表す。次に、 C3G )のうちの最大値を与える iを、合焦カウンタ値 ipとし、合焦位置での画像を示す。次に 、ステップ S230を実行する。
[0176] C3(i)=|∑ C2(i,x,y)|/N . . . (42)
ip: C3(i)で最大値を与える i · · · (43)
ステップ S230において、エッジ視差演算部 243は、システム制御部 231のメモリ上 のデータを用いて、エッジを検出し、その視差を検出する。実施の形態 1のステップ S 122と同様に、合焦位置での画像を利用し、コントラスト評価値 C2(ip,x,y)の 0クロス( 値が正力 負に変化する点、および値が負から正に変化する点)を検知する。
[0177] 次に、エッジ上の点(xe,ye)について、(xe,ye)を中心とする長方形のブロックを設定 し、撮影した全ての画像に対し、下記式 (44)のように、コントラスト評価値 C2(i,x,y)の 絶対値の総和を C4(i,xe,ye)とする。ここで、∑は設定した長方形ブロックでの総和を 表す。そして、図 9で説明した原理に基づき、下記式 (45)のように、エッジ上の点 (xe, ye)での合焦位置を示す ipe(xe,ye)を C4(i,xe,ye)の最大値を与える iとする。ここで、式( 9)、式(37)を利用し、エッジ上の点 (xe,ye)での視差 A (xe,ye)は、下記式 (46)に表さ れる。次に、ステップ S 240を実行する。
[0178] C4(i,xe,ye)=∑ |C2(i,x,y)| . . . (44)
ipe(xe,ye): C4(i,xe,ye)で最大値を与える i · · · (45)
Δ (xe,ye)=(kx2/kx)ipe(xe,ye) · · · (46)
ステップ S240において、エッジ視差演算部 244は、システム制御部 231のメモリ上 のデータを用いて、エッジ上の点 (xe,ye)での視差 Δ (xe,ye)力も全画像領域での視差 Δ (x,y)を演算する。ほぼ同一のエッジ上の視差 Δ (xe,ye)で囲まれた領域の視差 Δ (x ,y)として、このエッジ上での視差 A (xe,ye)を採用する。次に、ステップ S250を実行す る。
[0179] ステップ S250において、視差補正部 245は、システム制御部 231のメモリ上のデ ータを用いて、全領域での視差 A (x,y)を用いて視差補正したのち、画像合成する。 そして、その結果をシステム制御部 231のメモリに書き込む。第 1の撮像素子 123a、 および第 4の撮像素子 123dは、主に物体光の緑色成分を受光するため、第 1の撮 像信号 II、および第 4の撮像信号 14は、物体光の緑色成分の情報信号である。また 、第 2の撮像信号 123bは、主に物体光の青色成分を受光するため、第 2の撮像信号 12は、物体光の青色成分の情報信号である。さらに、第 3の撮像信号 123cは、主に 物体光の赤色成分を受光するため、第 3の撮像信号 13は、物体光の赤色成分の情 報信号である。(x、 y)における第 1の撮像素子 123aと第 4の撮像素子 123dの視差 が( Δ (x,y)、 Δ (x,y))であると予測されたため、下記式 (47)のように、(x、 y)における 緑色の強度を示す G(x,y)を、第 1の撮像信号 Il(ip,x,y)、および第 4の撮像信号 I4(ip,x - A (x,y),y- A (x,y))の平均とする。また、(x、 y)における第 1の撮像素子 123aと第 2 の撮像素子 123bの視差が(A (x,y)、 0)であると予測されたため、下記式 (48)のよう に、(x、 y)における青色の強度を示す B(x,y)を、第 2の撮像信号 I2(ip,x- Δ (x,y),y)と する。さらに、(x、y)における第 1の撮像素子 123aと第 3の撮像素子 123cの視差が (0、 A (x,y))であると予測されたため、下記式 (49)のように、(x、y)における赤色の 強度を示す R(x,y)を、第 3の撮像信号 I3(ip,x,y- A (x,y))とする。次に、ステップ S260 を実行する。
[0180] G(x,y)=[Il(ip,x,y)+I4(ip,x- Δ (x,y),y- Δ (x,y))]/2 · · · (47) B(x,y)=I2(ip,x- Δ (x,y),y) · · · (48)
R(x,y)=I3(ip,x,y- Δ (x,y)) · · · (49)
ステップ S260において、画像出力する。このステップは、実施の形態 1の S152と 同様に動作させる。次に、ステップ S299を実行する。
[0181] ステップ S299において、処理を終了する。
[0182] 以上のように構成し、動作させることにより、以下の効果を有する。
[0183] 複数画像のコントラストを用いてエッジの視差を検出し、この視差に基づき全画像 領域の視差を演算し、この視差に基づき視差の影響を低減するように画像合成する ことで視差補正する。これにより、全画像領域で視差の影響が低減されたきれいな画 像を得ることができる。
[0184] なお、実施の形態 2のカメラモジュールにおいて、エッジの視差を複数回の撮影の コントラスト評価値を用いて求めたが、本発明はこれに限定されない。例えば、求める エッジ上の点を中心とするブロックを設定し、実施の形態 1で用いた方法でこのブロッ クの視差を求め、この視差を採用してもよい。また、エッジ上の点の幾つかを合体さ せ、点ではなぐ線として視差を演算してもよい。また、線状のエッジを端点や分岐点 において分割し複数の線分とし、その視差を演算してもよい。また、この線分の周りを 含むブロックを作成し、実施の形態 1で用いた方法でこのブロックの視差を求めてよ い。また、コントラスト評価値力も求めた視差と実施の形態 1で用いた方法で求めた視 差を組み合わせてもよい。例えば、平均の視差を用いたり、ァクチユエータ操作量関 数の係数を学習してもよ 、。
[0185] また、実施の形態 1および実施の形態 2において、エッジ情報によりブロックに分割 したが、本発明はこれに限定されない。例えば、複数の矩形ブロックに分割してもよ い。
[0186] (実施の形態 3)
本発明の実施の形態 3に係るカメラモジュールは、撮像領域をブロックに分割し、ブ ロック毎の視差を演算し、ブロック毎に演算したコントラスト値と視差だけ移動した像 の相関とに基づき視差を評価する。相関が大きくコントラストが大きいときは、求めた 視差が正しいと判断し、視差に基づき通常の視差補正を行う。そして、相関が小さく コントラストが小さいときは求めた視差が低精度である判断し、低コントラスト用の視差 補正を行う。さらに、相関が小さくコントラストが大きいときは、複数の距離の被写体が 含まれるため求めた視差が正しくないと判断し、ブロックを再分割する。このようにして 、全画像領域できれいな画像を得る。
[0187] 以下、本発明の実施の形態 3に係るカメラモジュールについて、図面を参照しなが ら説明する。
[0188] 図 23は、本発明の実施の形態 3に係るカメラモジュールの構成を示す断面図であ る。カメラモジュール 301の回路部 320の SLSI325以外は、実施の形態 1と同様で あり、実施の形態 1と同様の部材には同一の符号を付してそれらについての説明を 省略する。
[0189] 図 24は、本発明の実施の形態 3に係るカメラモジュールのブロック図である。 SLSI 225は、システム制御部 331、撮像素子駆動部 132、撮像信号入力部 133、ァクチュ エータ操作量出力部 134、画像処理部 335、および入出力部 136を有する。また、 回路部 320は、前述の構成にカ卩えて、アンプ 126を有する。
[0190] 画像処理部 335は、ロジック回路、または DSP (ディジタル信号プロセッサ: Digital Signal Processor)、あるいはこれらの両者を含んで構成され、システム制御部 331の メモリ情報を利用し、各種画像処理を行う。画像処理部 335は、自動焦点制御部 34 1、ブロック分割部 342、視差演算部 343、相関演算部 344、コントラスト演算部 345 、ブロック再分割部 346、通常視差補正部 347、低コントラスト用視差補正部 348、お よび低相関用視差補正部 349を有する。
[0191] 図 25は、本発明の実施の形態 3に係るカメラモジュールの動作を示すフローチヤ一 トである。 SLSI325のシステム制御部 331〖こより、カメラモジュール 301は、このフロ 一チャートのとおりに動作する。
[0192] ステップ S3000にお!/、て、動作を開始する。例えば、上位 CPU (図示せず)がシャ ッターボタン(図示せず)などが押されたことを検知し、入出力部 136を介し、カメラモ ジュール 301に動作の開始を命令することにより、カメラモジュール 301は、動作を開 始する。次に、ステップ S3100を実行する。
[0193] ステップ S3100において、自動焦点制御部 341は、自動焦点制御を実行する。図 26は、本発明の実施の形態 3に係る自動焦点制御の動作を示すフローチャートであ る。図 26のフローチャートは、ステップ S3100の動作の詳細を示す。
[0194] ステップ S3100の自動焦点制御では、まず、ステップ S3121を実行する。
[0195] ステップ S3121〖こおいて、カウンタ iを 0に初期化する。次に、ステップ S3122を実 行する。
[0196] ステップ S3122において、ァクチユエータの位置指令を演算する。下記式(50)の ように、カウンタ iを用いてァクチユエータの位置指令 Xactを演算する。なお、位置指 令 Xactは、無限遠像の合焦位置を基準とし、被写体に向かう向きが正である位置の 指令を示す。ここで、 は、設定された値である。次に、ステップ S3123を実行する。
[0197] Xact=kx-i · · · (50)
ステップ S3123において、下記式(51)で示した操作量関数を用いてァクチユエ一 タ操作量(ァクチユエータ可動部 115のコイルへの印加電圧) Vactを演算する。ここで 、 ka、および kbは、それぞれ設定された値である。次に、ステップ S3124を実行する。
[0198] Vact=ka · Xact+kb · · · (51)
ステップ S3124において、ァクチユエータを動作させる。ァクチユエータ操作量出 力部 134は、アンプ 126を介したのちァクチユエータ可動部 115のコイル(図示せず) に印加される電圧が Vactになるように、出力する電圧信号を変更する。次に、ステツ プ S3125を実行する。
[0199] ステップ S3125において、撮影を実行する。システム制御部 131の命令により、撮 像素子駆動部 132が電子シャッターや転送を行うための信号を随時出力する。第 1 の撮像信号入力部 133a、第 2の撮像信号入力部 133b、第 3の撮像信号入力部 13 3c、および第 4の撮像信号入力部 133dは、撮像素子駆動部 132が発生する信号に 同期して、第 1の撮像素子 123a、第 2の撮像素子 123b、第 3の撮像素子 123c、お よび第 4の撮像素子 123dが出力する各画像のアナログ信号である撮像信号を入力 し、 CDSにより固定ノイズを除去し、 AGCにより自動的に入力ゲインを調整し、 ADC によりアナログ信号をディジタル値に変換し、第 1の撮像信号 Il(x,y)、第 2の撮像信号 I2(x,y)、第 3の撮像信号 I3(x,y)、および第 4の撮像信号 I4(x,y)として、システム制御部 131の所定アドレスのメモリにディジタル値を書き込む。図 12は、本発明の実施の形 態 1に係るカメラモジュールの撮像信号の座標を説明する図である。 Il(x,y)は、水平 方向に X番目、垂直方向に y番目の第 1の撮像信号であることを示す。入力される画 像の縦方向の画素数が H、横方向の画素数力 であり、総画素数は H X Lであり、 X は 0から L— 1まで変化し、 yは 0から H— 1まで変化する。第 2の撮像信号 I2(x,y)、第 3 の撮像信号 I3(x,y)、第 4の撮像信号 I4(x,y)も同様である。すなわち、 I2(x,y)、 I3(x,y)、 および I4(x,y)は、それぞれ水平方向に X番目、垂直方向に y番目の第 2の撮像信号、 第 3の撮像信号、および第 4の撮像信号であることを示す。入力される画像の縦方向 の画素数が H、横方向の画素数力 であり、それぞれの総画素数は H X Lであり、 X は 0から L— 1まで変化し、 yは 0から H— 1まで変化する。次に、ステップ S3126を実 行する。
[0200] ステップ S3126において、自動焦点制御用ブロックを設定する。画像領域の中心 付近の矩形状の領域を自動焦点制御用ブロックとする。なお、このブロックは必ずし も中央付近である必要はなぐカメラを操作するユーザの意思などを反映し (例えば、 センサで視点方向を検出し)、ブロックを設定してもよい。なお、単一のブロックではな く複数のブロックを選択し、複数のブロックにおいて後述の自動焦点制御用コントラス ト評価値の平均を用いてもよい。また、複数のブロックにおいて後述の自動焦点制御 用コントラスト評価値を演算し、後に少なくとも 1つのブロックを自動焦点制御用ブロッ クとして選択してもよい。次に、ステップ S3127を実行する。
[0201] ステップ S3127において、システム制御部 331のメモリ上のデータを用いて、 自動 焦点制御用コントラスト評価値を作成する。この演算は、第 1の撮像信号 IIの自動焦 点制御用ブロックの画素について行う。下記式(52)のように、 X方向と y方向の 2階微 分の和であるラプラシアンの絶対値を演算し、下記式(53)のように空間的に LPF (口 一パスフィルタ。 Low
Pass Filter)を作用させ、これを下記式(54)のように自動焦点制御用ブロック内で平 均して自動焦点用コントラスト評価値 C3を得る。ここで、 Nafは、自動焦点制御用プロ ックの画素数である。次に、ステップ S3128を実行する。
[0202] Cl(x,y)=|ll(x-l,y)+Il(x+l,y)+Il(x,y-l)+Il(x,y+l)-4Il(x,y)|
•••(52) C2(x,y)=Cl(x-l,y-l)+Cl(x,y-l)+Cl(x+l,y-l)
+Cl(x-l,y)+Cl(x,y)+Cl(x+l,y)
+Cl(x-l,y+l)+Cl(x,y+l)+Cl(x+l,y+l) · · · (53)
C3=∑C2(x,y)/Naf · · · (54)
ステップ S3128において、下記式(55)のように、コントラスト評価値 C3を C3(i)として 、システム制御部 331のメモリに書き込む。次に、ステップ S3129を実行する。
[0203] C3(i)=C3 · · · (55)
ステップ S3129において、下記式(56)のように、カウンタ iに 1を加える。次に、ステ ップ S3130を実行する。
[0204] i=i+ l · · · (56)
ステップ S3130において、カウンタ iをしきい値 Safと比較し、その結果により分岐す る。カウンタ iがしきい値 Saはり小さいとき (ステップ S3130の比較結果が Y)、次に、 ステップ 3122を実行する。一方、カウンタ iがしきい値 Saf以上のとき(ステップ S313 0の比較結果が N)、次に、ステップ S3140を実行する。このように、ステップ S3121 においてカウンタ iを 0に初期化し、ステップ S3129においてカウンタ iに 1を加え、ス テツプ S3130にお!/、てカウンタ iで分岐を行うことにより、 S3122力ら S3128までの処 理を Saf回だけ繰り返す。
[0205] ステップ S3140において、コントラスト評価値 C3の評価を行う。図 9のように、合焦 位置では、コントラスト評価値 C3が最大となる。下記式(57)のように、この最大値を 与えるカウンタ値 iを、コントラスト最大値を与えるカウンタ値 iafとする。次に、ステップ S3151を実行する。
[0206] iaf=C3の最大値を与える i · · · (57)
ステップ S3151〖こおいて、ァクチユエータの位置指令を演算する。下記式(58)の ように、コントラスト最大値を与えるカウンタ値 iafを用いてァクチユエータの位置指令 X actを演算する。なお、位置指令 Xactは、無限遠像の合焦位置を基準とし、被写体に 向力 向きが正の位置の指令を示す。次に、ステップ S3152を実行する。
[0207] Xact=kx-iaf · · · (58)
ステップ S3152にお 、て、操作量関数を用いてァクチユエータ操作量 (ァクチユエ ータ可動部 115のコイルへの印加電圧) Vactを演算する。この動作は、ステップ S31 23と同様であり、説明を省略する。次に、ステップ S3153を実行する。
[0208] ステップ S3153において、ァクチユエータを動作させる。この動作は、ステップ S31 24と同様であり、説明を省略する。次に、ステップ S3160を実行する。
[0209] ステップ S3160において、自動焦点制御を終了し、メインルーチンへ戻る。従って 、次に、図 25のステップ S3200を実行する。
[0210] ステップ S3200において、視差補正を実行する。図 27は、本発明の実施の形態 1 に係る視差補正の動作を示すフローチャートである。図 27のフローチャートは、ステ ップ S3200の動作の詳細を示す。
[0211] ステップ S3200の視差補正では、まず、ステップ S3220を実行する。
[0212] ステップ S3220において、撮影を実行する。システム制御部 131の命令により、撮 像素子駆動部 132が電子シャッターや転送を行うための信号を随時出力する。第 1 の撮像信号入力部 133a、第 2の撮像信号入力部 133b、第 3の撮像信号入力部 13 3c、および第 4の撮像信号入力部 133dは、撮像素子駆動部 132が発生する信号に 同期して、第 1の撮像素子 123a、第 2の撮像素子 123b、第 3の撮像素子 123c、お よび第 4の撮像素子 123dが出力する各画像のアナログ信号である撮像信号を入力 し、 CDSにより固定ノイズを除去し、 AGCにより自動的に入力ゲインを調整し、 ADC によりアナログ信号をディジタル値に変換し、第 1の撮像信号 Il(x,y)、第 2の撮像信号 I2(x,y)、第 3の撮像信号 I3(x,y)、および第 4の撮像信号 I4(x,y)として、システム制御部 131の所定アドレスのメモリにディジタル値を書き込む。図 12は、本発明の実施の形 態 1に係るカメラモジュールの撮像信号の座標を説明する図である。 Il(x,y)は、水平 方向に X番目、垂直方向に y番目の第 1の撮像信号であることを示す。入力される画 像の縦方向の画素数が H、横方向の画素数力 であり、総画素数は H X Lであり、 X は 0から L— 1まで変化し、 yは 0から H— 1まで変化する。第 2の撮像信号 I2(x,y)、第 3 の撮像信号 I3(x,y)、第 4の撮像信号 I4(x,y)も同様である。すなわち、 I2(x,y)、 I3(x,y)、 および I4(x,y)は、それぞれ水平方向に X番目、垂直方向に y番目の第 2の撮像信号、 第 3の撮像信号、および第 4の撮像信号であることを示す。入力される画像の縦方向 の画素数が H、横方向の画素数力 であり、それぞれの総画素数は H X Lであり、 X は 0から L— 1まで変化し、 yは 0から H— 1まで変化する。次に、ステップ S3230を実 行する。
[0213] ステップ S3230において、ブロック分割部 342は、システム制御部 331のメモリ上の データを利用し、ブロック分割を行う。そして、その結果をシステム制御部 331のメモリ に書き込む。図 28は、本発明の実施の形態 3に係るカメラモジュールにおいて、プロ ック分割を説明する図である。図 28のように、第 1の撮像信号 IIを、横方向に M個の ブロックに、縦方向に N個のブロックに、総数で M X N個に分割し、それぞれのブロッ クを Biで示す。ここで、 iは 0から M X N— 1まで変化する。次に、ステップ S3240を実 行する。
[0214] ステップ S3240において、視差演算部 343は、システム制御部 331のメモリ上のデ ータを利用し、各ブロック毎の視差値を演算する。そして、システム制御部 331のメモ リに書き込む。まず、各ブロック(B0、 Bl、 · ··、 Bi、 · ··、 BMN-1)毎に、視差評価値(R0( k)ゝ Rl(k)ゝ…ゝ Ri(k)ゝ…ゝ RMN-l(k)0 k=0、 1、…ゝ kmax)を演算する。図 29は、本発 明の実施の形態 3に係るカメラモジュールにおいて、視差評価値の演算領域を説明 する図である。 Biで示される(IIとしても示されている)領域は、第 1の撮像信号 IIから ステップ S3230で求められた i番目のブロックである。 14で示される領域は、 Biから X 方向に kだけ、 y方向に kだけ移動した領域である。そして、それぞれの領域の全画 像信号 Il(x,y)、 I4(x-k,y-k)について、下記式(59)に示される絶対値差分総和を視 差評価値 Ri(k)として演算する。
[0215] Ri(k)=∑∑ |ll(x,y)-I4(x-k,y-k)| · · · (59)
この視差評価値 Ri(k)は、 i番目のブロック Biの第 1の画像信号 IIと、 x、 y方向にそれ ぞれ (k、 k)だけ離れた領域における第 4の画像信号 14がどれだけ相関があるかを示 し、値が小さいほど相関が大きい (よく似ている)ことを示す。図 15のように、視差評価 値 Ri(k)は kの値によって変化し、 k= Δ ίのとき極小値を持つ。これは、第 4の画像信 号 14の i番目のブロック Biを x、 y方向にそれぞれ (- Δ i、 - Δ i)だけ移動させて得られる 画像信号は、第 1の画像信号 IIと最も相関がある (最も似ている)ことを示す。したが つて、 i番目のブロック Biについての第 1の撮像信号 IIと第 4の撮像信号 14との x、 y方 向の視差が(Δ ί、 Δ ί)であることが分かる。以下、この A (i,j)を、 i番目のブロック B(i,j) の視差値 Δ (ί,』·)と呼ぶ。このように、 i=0から i=M X N—lまで Biの視差値 Δ ίを求め る。次に、ステップ S3251を実行する。
[0216] ステップ S3251において、相関演算部 344は、システム制御部 331のメモリ上のデ ータを利用し、各ブロック毎の視差精度評価用相関値を演算する。そして、結果をシ ステム制御部 131のメモリに書き込む。図 30は、本発明の実施の形態 3に係るカメラ モジュールにおいて、視差精度評価用相関値の演算領域を説明する図である。 Biで 示される(IIとしても示されている)領域は、第 1の撮像信号 IIからステップ S1230で 求められた i番目のブロックである。 14で示される領域は、 Biを X方向に Δ ίだけ、 y方 向に Δ ίだけ移動した領域である。そして、それぞれの領域の全画像信号 Il(x,y)、 I4(x - Δ ί,γ- Δ ί)について、下記式 (60)のように、視差精度評価用相関値 R2iとする。ここ で、∑∑はブロック Bi内での総和を示し、 avgはブロック Bi内での加算平均を示す。 次に、ステップ S3252を実行する。
[0217] R2i=∑∑ {Il(x,y)-avg(ll(x,y))} X {Ι4(χ- Δ i,y- Δ i)— avg(I4(x— Δ i,y- Δ i))}
/^∑∑{ll(x,y)-avg(Il(x,y))}2
/ ∑∑ {I4(x- Δ i,y- Δ i)-avg(I4(x- Δ i,y- Δ i》}2 · · · (60)
ステップ S3252において、視差精度評価用相関値 R2iに基づき各ブロック Biごとの 視差補正方式を選択する。下記式 (61)のように、視差精度評価用相関値 R がしき い値 R20より大きいとき、視差補正方式フラッグ Fiに通常視差補正を示す 1を代入し、 システム制御部 331のメモリに保存する。次に、ステップ S3261を実行する。
[0218] Fi=l (R2i>R20) · · · (61)
ステップ S3261において、コントラスト演算部 345は、システム制御部 331のメモリ 上のデータを利用し、各ブロック毎の視差精度評価用コントラスト値を演算する。そし て、システム制御部 331のメモリに書き込む。下記式(62)のように、 X方向と y方向の 2階微分の和であるラプラシアンの絶対値を演算し、下記式 (63)のように空間的に L PF (ローパスフィルタ。 Low
Pass Filter)を作用させ、これを下記式(64)のように各ブロック Bi内で平均して視差 精度評価用コントラスト評価値 C6iを得て、システム制御部 331のメモリに書き込む。 ここで、 NBiは、ブロック Biの画素数である。なお、コントラスト評価値は式(62)力 式 (64)に限定されず、コントラストを表現できるものであればよぐ例えば、式(62)にお いて、ラプラシアンの変わりに 1次微分を用いたり、ラプラシアンの絶対値ではなく x、 yそれぞれの 2階微分の絶対値の和を用いてもよい。また、式 (63)以外の形式の LP Fを用いてもよい。さらに、式(64)の結果に対して、 IIの大きさの平均で除するなど の正規ィ匕をしてもよい。次に、ステップ S3262を実行する。
[0219] C4(x,y)=|ll(x-l,y)+Il(x+l,y)+Il(x,y-l)+Il(x,y+l)-4Il(x,y)|
•••(62)
C5(x,y)=C4(x-l,y-l)+C4(x,y-l)+C4(x+l,y-l)
+C4(x-1 ,y)+C4(x,y)+C4(x+l ,y)
+C4(x-l,y+l)+C4(x,y+l)+C4(x+l,y+l) · · · (63)
C6i=∑C5(x,y)/NBi · · · (64)
ステップ S3262において、視差精度評価用コントラスト評価値 C6iに基づき各ブロッ ク Biごとの視差補正方式を選択する。ここで、ステップ S3262において、ステップ S32 51で視差補正方式フラッグ Fiに 1が代入されな 、ブロックにお 、てのみ評価を行う。 そのため、ステップ S3261において、視差補正方式フラッグ Fi=lのブロック Biでは、 視差精度評価用コントラスト値 C6iの演算を省略してもよい。下記式 (65)のように、視 差精度評価用コントラスト評価値 C&がしきい値 C60より小さいとき、視差補正方式フラ ッグ Fiに低コントラスト用視差補正を示す 2を代入し、システム制御部 331のメモリに 保存する。また、下記式 (66)のように、視差精度評価用コントラスト評価値 C&がしき い値 C60以上のとき、視差補正方式フラッグ Fiに低相関用視差補正を示す 3を代入し 、システム制御部 331のメモリに保存する。次に、ステップ S3271を実行する。
[0220] Fi=2 (C6KC60、かつ、 Fi=lではない) · · ·(65)
Fi=3 (C6i〉=C60、かつ、 Fi=lではな!/、) · · · (66)
ステップ S3271において、視差補正方式フラッグとブロックのサイズの大きさにより、 ブロックの再分割が必要力否かを判断し、その判断結果に応じて分岐する。少なくと も 1つのブロックの視差補正方式フラッグ Fiが 3であり、かつ、全てのブロック Biの中で 最小のブロックの画素数が SOより大きいとき、ブロックの再分割が必要であると判断し (ステップ S1271の判断結果が Yes)、次に、ステップ S3272を実行する。全てのブ ロックの視差補正方式フラッグ Rが 1または 2のとき、あるいは、全てのブロック Biの中 で最小のブロックの画素数が SO以下のとき、ブロックの再分割が不要と判断し (ステツ プ S3271の判断結果が No)、次に、ステップ S3280を実行する。
[0221] ステップ S3272において、ブロック再分割部 346は、システム制御部 331のメモリ上 のデータを利用し、ブロックを再分割する。図 31 (A)は、本発明の実施の形態 3に係 るカメラモジュールにおいて、ブロックの再分割の前の状態を説明する図であり、図 3 1 (B)は、本発明の実施の形態 3に係るカメラモジュールにおいて、ブロックの再分割 の後の状態を説明する図である。図 31において、簡単のため、ブロックが 4つであり、 視差補正方式フラッグ Fiに低相関用視差補正を示す 3が代入されているブロック B2 ( 図 31 (A) )を 4つのブロック B2、 B4、 B5、 B6に分割する例(図 31 (B) )が示されている 。ブロック B2を再分割のした後のブロックを示す番号は、分割したブロックの番号(2) と、未使用の番号 (4、 5、 6)をあてはめる。次に、 S3240を実行する。
[0222] このように、低相関(Fi=3)であるブロックを再分割し (ステップ S3272)、再分割した ブロックに対する視差を演算し (ステップ S3240)、相関を演算し評価し (ステップ S3 251、ステップ S3252)、コントラストを演算し評価し (ステップ S3261、ステップ S326 2)、ブロックを再分割するかどうか判断し (ステップ S3271)さらに、低相関(Fi=3)で あるブロックを再分割する (ステップ S3272)動作を、全てのブロックのうちで最小の ブロックのサイズが SOになるまで、あるいは全てのブロックの視差補正方式フラッグ Fi 力 ^または 2になるまで、繰り返す。なお、ステップ S3240力らステップ S3272〖こおい て、ブロックの再分割によりブロックのサイズやブロックの番号が変更されるため、それ らのステップの動作が適宜変更される。
[0223] 以上の処理により、上記のステップ S3271の判断結果が Nとなった時点(すなわち ステップ S3280の実行を開始する時点)では、ステップ S3272において分割された ブロックを含め、全てのブロック Biに対する視差補正方式フラッグ Fiには、通常視差 補正を示す 1、低コントラスト用視差補正を示す 2、あるいは低相関用視差補正を示 す 3が代入されている。ステップ S3280において、通常視差補正部 347、低コントラ スト用視差補正部 348、低相関用視差補正部 349は、システム制御部 331のメモリ上 のデータを利用し、各ブロック毎に視差方正方式フラッグ Fiの値に応じたの視差補正 を行 ヽ画像を合成し、その結果をシステム制御部 331のメモリに書き込む。
[0224] ステップ S3280にお 、て視差補正方式フラッグ Fi=lのブロックでは、視差精度評価 用相関値 R2iが大きい。図 32は、本発明の実施の形態 3に係るカメラモジュールにお いて、視差精度評価用相関値 R2iと視差補正方式フラッグ Fiの関係を説明する図で ある。ステップ S3251において求めた視差精度評価用相関値 R2iは、 i番目のブロッ ク Bi内の第 1の撮像信号 Il(x,y)と X方向と y方向に視差 Δ ίだけ移動した第 4の撮像信 号 Ι4(χ- Δ i,y- Δ i)がー致するとき 1となり、両者力ランダムノイズのときのようにランダム に異なる場合 0となり、両者が白黒反転のような関係にあるとき一 1となる。このように、 両者が似て 、るとき視差精度評価用相関値 R2iが大きく 1に近くなり、両者が似て!/、な いとき、視差精度評価用相関値 R2iが小さく 1から離れる。ここで、図 32のように、しき い値 R20を 1に近い値 (例えば 0. 9)に設定し、これより視差精度評価用相関値 R2iが 大きいとき、潘目のブロック Bi内の第 1の撮像信号 Il(x,y)と視差 Δ iだけ移動した第 4 の撮像信号 Ι4(χ- Δ i,y- Δ i)が似て 、ると判断できる。これは、 i番目のブロック Biにお いて、視差 の精度が高ぐかつ、第 1の撮像信号 Il(x,y)と視差 Δ ίだけ移動した第 4 の撮像信号 Ι4(χ- Δ i,y- Δ i)との間で同一に距離の被写体のみが存在することを示す 。そのため、第 4の撮像信号 14を X方向に Δ iだけ移動し、 y方向に Δ iだけ移動するこ とにより、 i番目のブロック Biにおける撮像信号を再現できる。さて、第 2の撮像信号 12 は X方向にのみ視差の影響があり、第 3の撮像信号 13は y方向にのみ視差の影響が あるため、第 2の撮像信号 12を X方向に Δ ίだけ移動することによりブロック Biにおける 青色の撮像信号を再現でき、第 3の撮像信号 13 方向に Δ ίだけ移動することにより ブロック Biにおける赤色の撮像信号を再現できる。
[0225] そこで、視差補正方式フラッグ Fi=lのブロックでは、通常視差補正部 347は、システ ム制御部 331のメモリ上のデータを利用し、ブロックごとに、そのブロックに対応する 視差値を用いて視差補正したのち、画像合成する。そして、その結果をシステム制御 部 331のメモリに書き込む。第 1の撮像素子 123aおよび第 4の撮像素子 123dは、主 に物体光の緑色成分を受光するため、第 1の撮像信号 II、および第 4の撮像信号 14 は、物体光の緑色成分の情報信号である。また、第 2の撮像素子 123bは、主に物体 光の青色成分を受光するため、第 2の撮像信号 12は、物体光の青色成分の情報信 号である。さらに、第 3の撮像素子 123cは、主に物体光の赤色成分を受光するため 、第 3の撮像信号 13は、物体光の赤色成分の情報信号である。 i番目のブロック Biに おいて、第 1の撮像素子 123aと第 4の撮像素子 123dとの視差が(A i、 A i)であると 予測されたため、下記式 (67)のように、画素座標 (x、 y)における緑色の強度を示す G(x,y)を、第 1の撮像信号 Il(x,y)、および第 4の撮像信号 Ι4(χ- Δ ί,γ- Δ ί)の平均とする 。このように平均をとることにより、ランダムノイズの影響を低減できる。また、第 1の撮 像素子 123aと第 2の撮像素子 123bの視差が(A i、 0)であると予測されたため、下 記式 (68)のように、画素座標 (x、 y)における青色の強度を示す B(x,y)を、第 2の撮 像信号 I2(x- A i,y)とする。さらに、第 1の撮像素子 123aと第 3の撮像素子 123cの視 差が(0、 A i)であると予測されたため、下記式 (69)のように、(x、y)における赤色の 強度を示す R(x,y)を、第 3の撮像信号 I3(x,y- Δ i)とする。
G(x,y)=[Il(x,y)+I4(x- Δ i,y- Δ i)]/2 · · · (67)
B(x,y)=I2(x- A i,y) · · · (68)
R(x,y)=I3(x,y- A i) …(69)
ステップ S3280にお 、て視差補正方式フラッグ Fi=2のブロックでは、視差精度評価 用相関値 R2iが小さぐ視差精度評価用コントラスト評価値 C6iが小さい。図 33は、本 発明の実施の形態 3に係るカメラモジュールにおいて、視差精度評価用コントラスト 評価値と視差補正方式フラッグの関係を説明する図である。ステップ S3261におい て求めた視差精度評価用コントラスト評価値 C6は、 i番目のブロック Bi内の第 1の撮像 信号 Il(x,y)がはっきりした、すなわち濃淡の変化が大きい画像を示すとき大きくなり、 ぼやけた、すなわち濃淡の変化が少ない画像を示すとき 0に近くなる。ここで、図 33 のように、しきい値 C60を設定し、これより視差精度評価用コントラスト評価値が小さい とき、 i番目のブロック Bi内の第 1の撮像信号 Il(x,y)の示す画像は濃淡が小さぐ変化 に乏しい画像である。そのため、信号成分に対するノイズ成分が大きくなり、視差 Δ ί の精度が悪いと判断できる。また、濃淡が小さい画像であるため、再現する画像に多 少の誤差が含まれても実用上問題ない。そこで、主に第 1の撮像信号 Il(x,y)の情報 に基づき色を再現する。なお、第 2の撮像信号 I2(x,y)、第 3の撮像信号 I3(x,y)、ある いは第 4の撮像信号 I4(x,y)の情報に基づき色を再現してよい。ただし、赤色、青色と 比較し、緑色に最も視覚感度が高いため、物体光の緑色成分の情報を持つ第 1の撮 像信号 Il(x,y)、あるいは第 4の撮像信号 I4(x,y)に基づくことが好ましい。また、視差 Δ iの精度が悪いため、第 1の撮像信号 Il(x,y)、あるいは第 4の撮像信号 I4(x,y)を単独 で用いることが好ましい。
そこで、視差補正方式フラッグ Fi=2のブロックでは、低コントラスト用視差補正部 34 8は、システム制御部 331のメモリ上のデータを利用し、ブロックごとに、そのブロック に対応する視差値を用いて視差補正したのち、画像合成する。そして、その結果を システム制御部 331のメモリに書き込む。第 1の撮像素子 123aおよび第 4の撮像素 子 123dは、主に物体光の緑色成分を受光するため、第 1の撮像信号 II、および第 4 の撮像信号 14は、物体光の緑色成分の情報信号である。また、第 2の撮像素子 123 bは、主に物体光の青色成分を受光するため、第 2の撮像信号 12は、物体光の青色 成分の情報信号である。さらに、第 3の撮像素子 123cは、主に物体光の赤色成分を 受光するため、第 3の撮像信号 13は、物体光の赤色成分の情報信号である。 i番目の ブロック Biにおいて、第 1の撮像素子 123aと第 4の撮像素子 123dとの視差が(A i、 A i)であると予測されたが誤差が大きいと予想されるため、下記式(70)のように、画 素座標 (x、 y)における緑色の強度を示す G(x,y)を、第 1の撮像信号 Il(x,y)とする。ま た、下記式(71)のように、青色の強度を示す B(x,y)を、第 1の撮像信号 Il(x,y)に比例 係数 kBを乗じたものとする。ここで、比例係数 kBは、定数とする。なお、比例係数 kB はブロック Biごとに変更してもよぐ第 1の撮像信号 Il(x,y)のブロック Biの中央の値に 対する第 2の撮像信号 I2(x,y)
のブロック Biの中央の値の比や、第 1の撮像信号 Il(x,y)のブロック Biの中央の値に対 する視差 Δ iだけ X方向に移動した第 2の撮像信号 Ι2(χ- Δ i,y)のブロック Biの中央の 値の比や、ブロック Biの第 1の撮像信号 Il(x,y)の平均に対する第 2の撮像信号 I2(x,y) の平均の比や、ブロック Biの第 1の撮像信号 Il(x,y)の平均に対する視差 Δ iだけ X方 向に移動した第 2の撮像信号 I2(x- A i,y)の平均の比でもよい。さらに、下記式(72)の ように、赤色の強度を示す R(x,y)を、第 1の撮像信号 Il(x,y)に比例係数 kRを乗じたも のとする。ここで、比例係数 kRは、定数とする。なお、比例係数 kRはブロック Biごとに 変更してもよぐ第 1の撮像信号 Il(x,y)のブロック Biの中央の値に対する第 3の撮像 信号 I3(x,y)
のブロック Biの中央の値の比や、第 1の撮像信号 Il(x,y)のブロック Biの中央の値に対 する視差 Δ iだけ y方向に移動した第 3の撮像信号 I3(x,y- Δ i)のブロック Biの中央の 値の比や、ブロック Biの第 1の撮像信号 Il(x,y)の平均に対する第 3の撮像信号 I3(x,y) の平均の比や、ブロック Biの第 1の撮像信号 Il(x,y)の平均に対する視差 Δ iだけ y方 向に移動した第 3の撮像信号 I3(x,y- Δ 0の平均の比でもよい。なお、濃淡が小さいた め、多少の誤差が含まれてもわ力 ないことを考慮すれば、視差補正方式フラッグ Fi =1のときと同様に、第 1の撮像素子 123aと第 2の撮像素子 123bの視差が(A i、 0)で あると予測されたため、式 (68)のように、画素座標 (x、 y)における青色の強度を示 す B(x,y)を、第 2の撮像信号 I2(x- A i,y)とし、さらに、第 1の撮像素子 123aと第 3の撮 像素子 123cの視差が(0、 A i)であると予測されたため、式 (69)のように、(x、y)に おける赤色の強度を示す R(x,y)を、第 3の撮像信号 I3(x,y- Δ i)としてもよ 、。
[0228] G(x,y)=Il(x,y) · · · (70)
B(x,y)=Il(x,y)*kB · · · (71)
R(x,y)=Il(x,y)*kR · · · (72)
ステップ S3280にお 、て視差補正方式フラッグ Fi=3のブロックでは、視差精度評価 用相関値 R2iが小さぐ視差精度評価用コントラスト評価値 C6iが大きい。図 32のよう に、しきい値 R20を 1に近い値 (例えば 0. 9)に設定し、これより視差精度評価用相関 値 R2iが小さいとき、潘目のブロック Bi内の第 1の撮像信号 Il(x,y)と視差 Δ ίだけ移動 した第 4の撮像信号 Ι4(χ- Δ i,y- Δ i)が似て 、な 、と判断できる。これは、 i番目のプロ ック Biにおいて、異なる被写体距離の被写体が複数含まれ、視差 Δ ίが全ての被写体 に対応できないことを示す。
[0229] そこで、視差補正方式フラッグ Fi=3のブロックでは、低相関用視差補正部 349は、 システム制御部 331のメモリ上のデータを利用し、ブロックをさらにエッジを用いて複 数のブロックに再分割し、視差補正を行い、画像合成する。そして、その結果をシス テム制御部 331のメモリに書き込む。図 34は、本発明の実施の形態 3に係る低相関 用視差補正部 349の動作を示すフローチャートである。
[0230] ステップ S3310において、低相関用視差補正部 349の動作を開始する。次に、ス テツプ S3320を実行する。
[0231] ステップ S3320において、エッジ検出用コントラスト評価値を演算する。この演算は 、第 1の撮像信号 IIのみについて行う。下記式(73)のように、ラプラシアンを演算し、 さらに下記式(74)のように空間的に LPF (ローパスフィルタ)を作用させたものを、ェ ッジ検出用コントラスト評価値 C8(x,y)とする。図 35 (A)は、本発明の実施の形態 3に 係るカメラモジュールの低相関用視差補正部 349のエッジ検出を説明する元画像で あり、図 35 (B)は、本発明の実施の形態 3に係るカメラモジュールの低相関用視差補 正部 349のエッジ検出を説明するエッジ検出用コントラスト評価値の画像である。式( 73) (74)により、図 35 (A)の元画像のエッジ検出用コントラスト評価値 C8(x,y)を計算 すると、図 35 (B)のようになる。なお、図 35 (B)は、式(74)の絶対値が大きい場所を 黒で表示している。次に、ステップ S3330を実行する。
[0232] C7(x,y)=Il(x-l,y)+Il(x+l,y)+Il(x,y-l)+Il(x,y+l)-4Il(x,y)
•••(73)
C8(x,y)=C7(x-l,y-l)+C7(x,y-l)+C7(x+l,y-l)
+C7(x-l,y)+C7(x,y)+C7(x+l,y)
+C7(x-l,y+l)+C7(x,y+l)+C7(x+l,y+l) · · · (74)
ステップ S3330において、エッジを検出する。図 35 (C)は、本発明の実施の形態 3 に係るカメラモジュールの低相関用視差補正部 349のエッジ検出を説明するエッジ の画像である。図 35 (B)のエッジ検出用コントラスト評価値 C2(x,y)の 0クロス (値が正 力 負に変化する点、および値が負から正に変化する点)を検知することにより、図 3 5 (C)のようなエッジを検出できる。次に、ステップ S3340を実行する。
[0233] ステップ S3340において、ブロックを再分割する。図 35 (C)のように、エッジに囲ま れた領域に 、8;1、8】+ 1、 · ' ·Βί +ηのように番号を付与する。なお、; j、j + l、 · · · J +nはブロックを示す番号として未使用のものである。ここで、図 35において、簡単の ため、ブロック Biを 5つのブロックに再分割する例を示しており、 n= 3である。なお、ノ ィズなどによるエッジの誤検出や消失の防止のために、膨張アルゴリズムや収縮アル ゴリズムを用いて、エッジを補正してもよい。次に、ステップ S3350を実行する。
[0234] ステップ S3350において、各ブロック毎の視差値を演算する。この動作は、ステップ S3240と同様であり、説明を省略する。次に、ステップ S3360を実行する。
[0235] ステップ S3360において、視差を補正し、画像を合成する。この動作は、通常視差 補正部 347の動作と同様であり、説明を省略する。次に、ステップ S3370を実行する
[0236] ステップ S3670において、低相関用視差補正の動作を終了する。
[0237] 以上のように、ステップ S3280を動作させ、次に、ステップ S3290を実行する。
[0238] ステップ S3290において、視差補正を終了し、メインルーチンへ戻る。すなわち、 次に、図 25に示すステップ S3800を実行する。
[0239] ステップ S3800において、画像を出力する。入出力部 136は、システム制御部 331 のメモリ上のデータである G(x,y),B(x,y),R(x,y)を、上位 CPU (図示せず)や外部表示 装置(図示せず)に出力する。なお、 G(X,y),B(X,y),R(x,y)の代わりに、例えば、輝度、 色度信号などの出力を出力してもよい。また、ホワイトバランスや γ補正などの画像処 理後の値を出力してもよい。さらに、可逆圧縮や JPEG等のような非可逆圧縮をしたデ ータを出力してもよい。また、それらの複数を出力してもよい。次に、 S3900を実行す る。
[0240] ステップ S3900において、動作を終了する。
[0241] 以上のように構成し、動作させることにより、以下の効果を有する。
[0242] 式( 1)のように被写体距離 Aに応じて第 1〜第 4のレンズ部 113a〜 113dがそれぞ れ形成する 4つの物体像の相対的位置が変化する。すなわち、被写体距離 Aが小さ くなると、視差 Δが大きくなる。そのため、距離が異なる複数の被写体を同時に撮影 するとき、被写体毎に視差 Δが異なる。実施の形態 3のカメラモジュールでは、ステツ プ S3230において、全画像領域をブロックに分割し、ステップ S3240において、ブロ ック毎の視差を演算し、ステップ S3280において、ブロック毎の視差に基づき視差の 影響を低減するように画像合成することで視差補正する。これにより、距離が異なる 複数の被写体を同時に撮影するときにおいても、適宜それぞれの被写体の視差を補 正し、全画像領域で視差の影響が低減されたきれ 、な画像を得ることができる。
[0243] 実施の形態 3のカメラモジュールでは、ステップ S3230にお!/、て、全画像領域を矩 形状のブロックに分割し、ステップ S3240において、ブロック毎の視差を演算し、ステ ップ S3280において、ブロック毎の視差に基づき視差の影響を低減するように画像 合成することで視差補正する。これにより、距離が異なる複数の被写体を同時に撮影 するときにおいても、適宜それぞれの被写体の視差を補正し、全画像領域で視差の 影響が低減されたきれ ヽな画像を得ることができる。
[0244] また、ステップ S3230において分割したブロック内に被写体距離が異なる複数の物 体が含まれることがあり、その場合、物体像毎に視差が異なる。実施の形態 3のカメラ モジュールでは、ステップ S3251において視差精度評価用相関値 R2iを演算し、ステ ップ S3252において視差精度評価用相関値 R2iを評価することにより視差 Δ ίの精度 を評価し、ステップ S3261において視差精度評価用コントラスト評価値 C6iを演算し、 ステップ S 3262にお 、て視差精度評価用コントラスト評価値 C6iを評価することにより 視差 Δ ίの精度を評価し、視差補正方式フラッグ Fiを設定し、視差補正の方式を決定 する。これにより、ブロック毎に最適な補正方法で画像を補正できるため、全画像領 域で視差の影響がさらに低減されたきれいな画像を得ることができる。
[0245] また、実施の形態 3のカメラモジュールでは、ステップ S3261にお 、て視差精度評 価用コントラスト評価値 C6iを演算し、ステップ S3262においてブロック毎に演算した 視差 Δ Sどれだけ精度があるかをブロック毎の視差精度評価用コントラスト評価値 c
6iコントラストの大小によって判断し、コントラストが大きいとき視差補正方式フラッグ Fi =1としステップ S3280において通常視差補正を行い、コントラストが小さいとき視差補 正方式フラッグ Fi=2としてステップ S3280において低コントラスト用の視差補正を行う 。これにより、ブロック毎に最適な補正方法で画像を補正できるため、全画像領域で 視差の影響がさらに低減されたきれいな画像を得ることができる。
[0246] また、実施の形態 3のカメラモジュールでは、ステップ S3251にお 、て視差精度評 価用相関値 R2iを演算する。視差精度評価用相関値 R2iは、ブロック毎に演算した視 差がどれだけ精度がある力を表す視差制度評価値の一つであり、視差だけ移動した 像がどれだけ相関があるかを表す値である。ステップ S3252にお 、て視差精度評価 用相関値 R2iが大き 、ときステップ S3280にお 、て通常視差補正を行!、、視差精度 評価用相関値 R2iが小さいときステップ S3280において低相関用視差補正を行う。こ れにより、ブロック毎に最適な補正方法で画像を補正できるため、全画像領域で視差 の影響がさらに低減されたきれいな画像を得ることができる。
[0247] また、実施の形態 3のカメラモジュールでは、ステップ S3251にお 、て視差精度評 価用相関値 R2iを演算する。視差精度評価用相関値 R2iは、ブロック毎に演算した視 差がどれだけ精度がある力を表す視差制度評価値の一つであり、視差だけ移動した 像がどれだけ相関がある力を表す値である。視差精度評価用相関値 R2iの大きいとき ステップ S3280にお 、て通常視差補正を行!、、視差精度評価用相関値 R2iが小さ ヽ ときステップ S3272、およびステップ S3280の低相関用視差補正部 349においてブ ロックを再分割し再分割したブロック毎に視差補正を行う。すなわち、低相関と判断さ れたブロックを再分割する。これにより、ブロック毎に最適な補正方法で画像を補正 できるため、全画像領域で視差の影響がさらに低減されたきれいな画像を得ることが できる。
[0248] また、実施の形態 3のカメラモジュールでは、ステップ S3251にお 、て視差精度評 価用相関値 R2iを演算する。視差精度評価用相関値 R2iは、ブロック毎に演算した視 差がどれだけ精度がある力を表す視差制度評価値の一つであり、視差だけ移動した 像がどれだけ相関があるかを表す値である。ステップ S3261にお 、て視差精度評価 用コントラスト評価値 C6iを演算する。視差精度評価用コントラスト評価値 C6iは、演算 した視差がどれだけ精度がある力を表す視差制度評価値の一つであり、どれだけコ ントラストが高いかを表す値である。視差精度評価用相関値 R2iが大きくかつ視差精 度評価用コントラスト評価値 C&が大きいときステップ S3280において通常視差補正 を行い、視差精度評価用相関値 R2iが小さくかつ視差精度評価用コントラスト評価値 C&が小さいときステップ S3280において低コントラスト用視差補正を行い、視差精度 評価用相関値 R2iが小さくかつ視差精度評価用コントラスト評価値 C6iが大きいときス テツプ S3272、およびステップ S3280の低相関用視差補正部 349においてブロック を再分割し再分割したブロック毎に視差補正を行う。すなわち、低相関でありかつ高 コントラストであると判断されたブロックを再分割する。これにより、ブロック毎に最適な 補正方法で画像を補正できるため、全画像領域で視差の影響がさらに低減されたき れ 、な画像を得ることができる。
[0249] なお、実施の形態 3において、画像出力のタイミングは、上記に限定されず、適宜 プレビュー出力をしてもよい。例えば、実施の形態 3において、ステップ S3100にお いて自動焦点制御を行う途中で、視差補正なしの画像を出力してもよい。また、ステ ップ S3271の後、視差補正が可能なブロックのみ視差補正を行い、その他のブロッ クは視差補正を行わずに、プレビュー画面を更新してもよ 、。
[0250] また、実施の形態 3において、ステップ S3320で式(74)のようにエッジ検出用コン トラスト評価値 C8(x,y)を演算し、ステップ S3330で 0クロス力もエッジを検出した力 こ れに限定されない。例えば、ブロック内のヒストグラムを作成し、極小値をしきい値とし て 2値ィ匕によりブロック分割してもよい。ここで、複数のしきい値を持ってもよい。また、 1回微分の絶対値を用いてエッジ検出してもよ 、。
[0251] (実施の形態 4)
本発明の実施の形態 4は、インターレース読み込みをする場合に、それぞれのフィ 一ルド毎に視差を求め画像合成し、それぞれのフィールド毎の合成画像を合成し最 終画像とする。このようにして、各フィールドごとに視差演算を行うことにより、動く被写 体の撮影時に各フィールドの撮影時間が異なることにより各フィールドの画像が異な る場合においても、各フィールドごとの視差を正しく求められ、この視差を用いて画像 合成することができるため、全画像領域で視差の影響がさらに低減されたきれいな画 像を得ることができる。
[0252] 以下、本発明の実施の形態 4に係るカメラモジュールについて、図面を参照しなが ら説明する。
[0253] 図 36は、本発明の実施の形態 4に係るカメラモジュールの構成を示す断面図であ る。カメラモジュール 401の回路部 420の SLSI425以外は、実施の形態 1と同様で あり、実施の形態 1と同様の部材には同一の符号を付してそれらについての説明を 省略する。
[0254] 図 37は、本発明の実施の形態 4に係るカメラモジュールのブロック図である。 SLSI 425は、システム制御部 431、撮像素子駆動部 132、撮像信号入力部 133、ァクチュ エータ操作量出力部 134、画像処理部 435、および入出力部 136を有する。また、 回路部 420は、前述の構成にカ卩えて、アンプ 126を有する。
[0255] 画像処理部 435は、ロジック回路、または DSP (ディジタル信号プロセッサ。 Digital Signal Processor)、あるいはこれらの両者を含んで構成され、システム制御部 431の メモリ情報を利用し、各種画像処理を行う。画像処理部 435は、自動焦点制御部 34 1、ブロック分割部 342、視差演算部 343、相関演算部 344、コントラスト演算部 345 、ブロック再分割部 346、通常視差補正部 347、低コントラスト用視差補正部 348、低 相関用視差補正部 349、フレーム画像作成部 451を有する。
[0256] 図 38 (A)〜図 38 (D)は、本発明の実施の形態 4のカメラモジュールに係るフィー ルド画像を説明する図である。画像全体は、図 38 (A)に示すように、第 1のフィール ド画像と第 2のフィールド画像が交互に配置される。まず、第 1のフィールド画像を構 成する撮像信号が転送され、次に第 2のフィールド画像を構成する撮像信号が転送 される。通常の白黒画像では、これらを 1ラインずつ交互に配置することにより画像全 体を再現する。図 38 (B)のように画像全体 (フレーム画像)の幅が L、高さが Hである とき、図 38 (C)および図 38 (D)のように、第 1のフィールド画像、および第 2のフィー ルド画像の幅はそれぞれ Lであり、高さは HZ2である。
[0257] 図 39は、本発明の実施の形態 4に係るカメラモジュールの動作を示すフローチヤ一 トであり、図 40は、本発明の実施の形態 4に係るカメラモジュールの動作を示すタイ ムチャートである。 SLSI425のシステム制御部 431により、カメラモジュール 401は、 このフローチャートとタイムチャートに示されるとおりに動作される。
[0258] ステップ S4000にお!/、て、動作を開始する。例えば、上位 CPU (図示せず)がシャ ッターボタン(図示せず)などが押されたことを検知し、入出力部 136を介し、カメラモ ジュール 401に動作の開始を命令することにより、カメラモジュール 401は、動作を開 始する。次に、ステップ S4100を実行する。
[0259] ステップ S4100において、自動焦点制御部 341は、自動焦点制御を実行する。こ の動作は、実施の形態 3のステップ S3100と同様であり説明を省略する。ただし、図 40に示すように、第 1のフィールドのみを転送し、第 1のフィールド画像のみを使用す るため、適宜変更が加えられる。そのため、画像全体 (第 1のフィールド、および第 2 のフィールド)を転送する場合と比較し、転送に要する時間が略半分になるため、そ の分だけ自動焦点制御の時間を短縮できる。次に、ステップ S4200を実行する。
[0260] ステップ S4200において、第 1のフィールドの視差補正を実行する。この動作は、 実施の形態 3のステップ S3200と同様であり説明を省略する。ただし、図 40に示すよ うに、第 1のフィールドのみを転送し、第 1のフィールド画像のみを使用し、第 1のフィ 一ルドの赤色の強度を示す Rfl(X,y)、緑色の強度を示す Gfl(x,y)、および青色の強度 を示す Bfl(x,y)を作成するように、適宜変更が加えられる。次にステップ S4300を実 行する。
[0261] ステップ S4300において、第 2のフィールドの視差補正を実行する。この動作は、 実施の形態 3のステップ S3200と同様であり説明を省略する。ただし、図 40に示すよ うに、第 2のフィールドのみを転送し、第 2のフィールド画像のみを使用し、第 2のフィ 一ルドの赤色の強度を示す R12(X,y)、緑色の強度を示す Gf2(x,y)、および青色の強度 を示す Bf2(x,y)を作成するように、適宜変更が加えられる。次にステップ S4400を実 行する。
[0262] ステップ S4400〖こお!/、て、フレーム画像(画像全体)を作成する。下記式(75)のよ うに、第 1フレームの赤色の強度を示す Rfl(x,y)をフレーム画像の偶数行の赤色の強 度を示す R(x,2*y)とし、下記式(76)のように、第 2フレームの赤色の強度を示す Ri2(x ,y)をフレーム画像の奇数行の赤色の強度を示す R(x,2*y+1)とする。また、下記式(77 )のように、第 1フレームの緑色の強度を示す Gfl(x,y)をフレーム画像の偶数行の緑 色の強度を示す G(x,2*y)とし、下記式(78)のように、第 2フレームの緑色の強度を示 す Gf2(x,y)をフレーム画像の奇数行の緑色の強度を示す G(x,2*y+1)とする。また、下 記式(79)のように、第 1フレームの青色の強度を示す Bfl(x,y)をフレーム画像の偶数 行の青色の強度を示す B(x,2*y)とし、下記式 (80)のように、第 2フレームの青色の強 度を示す Bf2(x,y)をフレーム画像の奇数行の青色の強度を示す B(x,2*y+1)とする。こ こで、 Xは 0から Lまで変化させ、 yは 0から H/2— 1まで変化させる。次に、ステップ S 4800を実行する。
[0263] R(x,2*y)=Rfl(x,y) . . . (75)
R(x,2*y+l)=R12(x,y) · · · (76)
G(x,2*y)=Gfl(x,y) · · · (77)
G(x,2*y+l)=G12(x,y) · · · (78)
B(x,2*y)=Bfl(x,y) · · · (79) B(x,2*y+l)=B12(x,y) · · · (80)
ステップ S4800において、画像を出力する。この動作は実施の形態 3と同様であり 、説明を省略する。次に、 S4900を実行する。
[0264] ステップ S4900において、動作を終了する。
[0265] 上記のように構成し動作させることにより、実施の形態 4のカメラモジュールは、実施 の形態 3と同様の効果を有する。
[0266] また、実施の形態 4のカメラモジュールは、インターレース読み込みをする場合に、 ステップ S4200において第 1のフィールドの視差を求め、求められた視差に基づい て視差補正を行って画像 (Rfl,Gfl,Bfl)を作成する。また、ステップ S4300において 第 2のフィールドの視差を求め、求められた視差に基づいて視差補正を行って画像( R12,Gf2,Bf2)を作成する。さらに、ステップ S4400において、それぞれのフィールド毎 の合成画像を合成し、最終画像とする。このようにして、各フィールドごとに視差演算 を行うことにより、動く被写体の撮影時に各フィールドの撮影時間が異なることにより 各フィールドの画像が異なる場合においても、各フィールドごとの視差を正しく求める ことができる。これにより、この視差を用いて画像合成することができるため、全画像 領域で視差の影響がさらに低減されたきれいな画像を得ることができる。
[0267] なお、実施の形態 4のカメラモジュールはフィールドの数が 2であった力 これに限 定されない。より多いフィールド(例えば、 3フィールド、 4フィールド)であってもよい。
[0268] なお、実施の形態 4のカメラモジュールは、それぞれのフィールドの画像を作成した 1S フレーム画像の領域をあら力じめ用意し、直接代入してもよい。また、それぞれの フィールドの視差情報などを保持し、フィールド画像を作成せず、直接フレーム画像 を作成してもよい。
[0269] また、実施の形態 4のカメラモジュールは、図 41 (A)および図 41 (B)にそれぞれ示 すように、第 1のカラーフィルタ 124a、第 2のカラーフィルタ 124b、第 3のカラーフィル タ 124c、および第 4のカラーフィルタ 124dのうち、 X方向に隣接する 2つのカラーフィ ルタが、主に緑色を透過する分光透過特性を有しても良い。なお、図 41 (A)〜図 41 (C)では、それぞれのカラーフィルタが透過する色を R, G, Bの記号で図中に示した 。図 41 (A)または図 41 (B)の構成によれば、撮像素子 123において X方向に隣接 する 2つの撮像素子 (すなわち、第 1の撮像素子 123aと第 2の撮像素子 123b、また は、第 3の撮像素子 123cと第 4の撮像素子 123d)が、物体光における緑色の成分を 受光することとなる。
[0270] あるいは、図 41 (C)に示すように、第 1のカラーフィルタ 124a、第 2のカラーフィルタ 124b,第 3のカラーフィルタ 124c、および第 4のカラーフィルタ 124dを配置し、 X方 向に隣接する 2つのカラーフィルタ(この例では第 2のカラーフィルタ 124bと第 3の力 ラーフィルタ 124c)力 主に緑色を透過する分光透過特性を有するようにしても良い 。なお、図 41 (C)に示すように 4つのカラーフィルタが配置されている場合、レンズ 11 3における第 1のレンズ部 113a、第 2のレンズ部 113b、第 3のレンズ部 113c、および 第 4のレンズ部 113dは、これらのカラーフィルタの中心に光軸が一致するように配置 される。同様に、撮像素子 123における第 1の撮像素子 123a、第 2の撮像素子 123b 、第 3の撮像素子 123c、および第 4の撮像素子 123dも、レンズ部 113における各レ ンズ部の配置に併せて配置される。ここで、第 1の撮像信号 IIと第 2の撮像信号 12と 力 視差を求めるように、適宜変更が加えられる。
[0271] 本実施形態のカメラモジュール 401において、図 41 (A)〜図 41 (C)に示すような カラーフィルタ配置を採用することにより、以下のような利点がある。第 1の撮像信号 I 1と第 2の撮像信号 12との比較により視差を求めるため、視差の発生する方向が X方 向のみであり、各フィールド間をまたがることがない。そのため、より正確な視差を求 めることができる。
[0272] なお、図 41 (A)〜図 41 (C)は、あくまでも好ましいカラーフィルタ配置の例を示した ものであって、本発明の実施形態をこれに限定するものではない。例えば、 Bと Rの力 ラーフィルタの位置が逆であっても良!、。
[0273] (実施の形態 5)
本発明の実施の形態 5は、視差が小さい、すなわち被写体距離が大きいブロックを 背景であると認識し、あらかじめ保存された背景画像等の別画像と置き換える。この ようにして、視差に基づき補正した画像と別画像とを組み合わせることにより、補正し た画像力も視差が大きい部分の画像を正しく抽出できるため、きれいにこれらの画像 を組み合わせることができる。 [0274] 以下、本発明の実施の形態 5に係るカメラモジュールについて、図面を参照しなが ら説明する。
[0275] 図 42は、本発明の実施の形態 5に係るカメラモジュールの構成を示す断面図であ る。カメラモジュール 501の回路部 520の SLSI525以外は、実施の形態 1と同様で あり、実施の形態 1と同様の部材には同一の符号を付してそれらについての説明を 省略する。
[0276] 図 43は、本発明の実施の形態 5に係るカメラモジュールのブロック図である。 SLSI 525は、システム制御部 531、撮像素子駆動部 132、撮像信号入力部 133、ァクチュ エータ操作量出力部 134、画像処理部 535、入出力部 136、および背景画像保存 部 551を有する。また、回路部 520は、前述の構成に加えて、アンプ 126を有する。
[0277] 画像処理部 535は、ロジック回路、または DSP (ディジタル信号プロセッサ: Digital Signal Processor)、あるいは両者を含んで構成され、システム制御部 331のメモリ情 報を利用し、各種画像処理を行う。画像処理部 335は、自動焦点制御部 341、ブロッ ク分割部 342、視差演算部 343、相関演算部 344、コントラスト演算部 345、ブロック 再分割部 346、通常視差補正部 347、低コントラスト用視差補正部 348、低相関用 視差補正部 349、および背景画像置換部 552を有する。
[0278] 背景画像保存部 551は、 RAMやフラッシュメモリのような書き換え可能なメモリから 構成され、画像情報が記憶され、適宜、外部から入出力部 136、およびシステム制御 部 531を介し、書き換えられる。
[0279] 図 44は、本発明の実施の形態 5に係るカメラモジュールの動作を示すフローチヤ一 トである。 SLSI525のシステム制御部 531〖こより、カメラモジュール 501は、このフロ 一チャートに示されるとおりに動作される。
[0280] ステップ S5000にお!/、て、動作を開始する。例えば、上位 CPU (図示せず)がシャ ッターボタン(図示せず)などが押されたことを検知し、入出力部 136を介し、カメラモ ジュール 501に動作の開始を命令することにより、カメラモジュール 501は、動作を開 始する。次に、ステップ 54100を実行する。
[0281] ステップ S5100において、自動焦点制御部 341は、自動焦点制御を実行する。こ の動作は、実施の形態 3のステップ S3100と同様であり説明を省略する。次に、ステ ップ S 5200を実行する。
[0282] ステップ S5200にお 、て、視差補正を実行する。この動作は、実施の形態 3のステ ップ S3200と同様であり説明を省略する。次に、ステップ S5300を実行する。
[0283] ステップ S5300において、背景を置き換える。下記式(81) (82) (83)のように、視 差 Δ しきい値 Ashよりも大きい画素は、画像の変更を行わない。一方、下記式 (84 ) (85) (86)のように、視差 Δίがしきい値 Ash以下の画素は、背景画像保存部 551 に保存された画像(Rback,Gback,Bback)と置き換える。なお、 Δίはステップ S5200で 求められたブロック Biの視差を示す。次に、ステップ S5800を実行する。
[0284] R(x,y)=R(x,y) (Ai>Ash) ··· (81)
G(x,y)=G(x,y) (Ai>Ash) · · · (82)
B(x,y)=B(x,y) (Ai>Ash) · · · (83)
R(x,y)=Rback(x,y) (Δί≤ Ash) · · · (84)
G(x,y)=Gback(x,y) (Δί≤ Ash) · · · (85)
B(x,y)=Bback(x,y) (Δί≤ Ash) · · · (86)
ステップ S5800において、画像を出力する。この動作は実施の形態 3と同様であり 、説明を省略する。次に、 S5900を実行する。
[0285] ステップ S5900において、動作を終了する。
[0286] 上記のように構成し動作させることにより、実施の形態 5のカメラモジュールは、実施 の形態 3と同様の効果を有する。
[0287] 本発明の実施の形態 5は、ステップ S5300において、視差 Δ ^小さい、すなわち 被写体距離が大きいブロック Biを背景であると認識し、あらかじめ保存された背景画 像 (Rback,Gback,Bback)と置き換える。このようにして、視差に基づき補正した画像と 別画像を組み合わせることにより、補正した画像から視差が大き 、部分の画像を正し く抽出できるため、きれいにこれらの画像を組み合わせることができる。図 45(A)〜 図 45 (C)は、本発明の実施の形態 5に係るカメラモジュールの背景置換を説明する 図である。実施の形態 5によれば、例えば、図 45(A)のような背景が山である人物像 を撮影した場合、人物像の視差 Δίは大きく背景の山の視差 Δίは小さい。ここで、視 差のしき 、値 Δ shを人物像の視差と山の視差との間に設定すれば、背景の山の画 素を背景画像保存部に保存された海の背景画像(図 45 (B)。 Rback,Gback,Bback) と置き換えることにより、図 45 (C)に示すように、背景が海である人物像の画像を作 成できる。
[0288] (実施の形態 6)
本発明に力かる電子機器の一実施形態を図 46 (A)および図 46 (B)に示す。図 46 (A)および図 46 (B)に示すように、本発明にかかる電子機器の一実施形態としての カメラ付き携帯電話 600は、スピーカ 601、アンテナ 602、液晶ディスプレイ 603、キ 一部 605、マイクロフォン 606を備えており、ヒンジ部 604によって折りたたみが可能 である。また、携帯電話 600は、図 46 (B)に示すように、液晶ディスプレイ 603の背面 側にレンズモジュール 110を内蔵し、静止画や動画の撮影が可能である。
[0289] なお、本発明にかかる電子機器は、携帯電話に限らず、車載用カメラや、ディジタ ルカメラやカメラ付き PDA等としても実施可能である。
[0290] 以上、本発明のいくつかの実施形態を説明したが、これらはあくまでも例示であつ て、本発明の実施に際しては、以下のとおり、種々の変更が可能である。
[0291] 例えば、実施の形態 1から実施の形態 5のカメラモジュールにおいて、演算された 視差をそのまま利用した力 適宜リミットしてもよい。レンズ特性によっては被写体距 離 Aがある値よりも小さいとき、画像が不鮮明となる。そのため、この値を被写体距離 Aの最小値と定めれば、視差 Δの最大値を定められる。この値よりも大きい視差は、 誤差であるとして無視してもよい。また、このような場合、視差評価値が 2番目に小さ V、値を視差として採用してもよ!、。
[0292] また、実施の形態 1から実施の形態 5のカメラモジュールでは、視差を第 1の撮像信 号 II (主に緑色を示す)と第 4の撮像信号 14 (主に緑色を示す)とから演算したが、本 発明はこれに限定されない。例えば、紫色の被写体は緑色成分が少なぐ青色成分 、赤色成分を多く含むため、第 1の撮像信号 II (主に緑色を示す)と第 4の撮像信号 I 4 (主に緑色を示す)と力も演算できないことがある。この場合、第 2の撮像信号 12 (主 に青色を示す)と第 3の撮像信号 13 (主に赤色を示す)とから視差を演算してもよ!ヽ。 また、第 1の視差信号 II (主に緑色を示す)と第 4の視差信号 14 (主に緑色を示す)と 力 視差が演算不能であり、かつ、第 2の撮像信号 12 (主に青色を示す)と第 3の撮 像信号 13 (主に赤色を示す)とから視差が演算不能であれば、視差の影響がな!、も のとみなし、視差なしとすればよい。
[0293] また、実施の形態 1から実施の形態 5のカメラモジュールをカメラに搭載するとき、撮 影時に上側になる方に第 2の撮像素子 123aが、下側になる方に第 3の撮像素子 12 3cが配置されるように、第 1〜第 4の撮像素子 123a〜123dを配置することにより、上 側が青色に敏感となり、下側が赤色に敏感となるので、風景写真の色再現をより自然 にできる。
[0294] また、視差評価値に目立つ極値が 2つあるときは、より大きい方の視差を採用しても よい。このようなブロックには、被写体と背景が含まれており、被写体距離と背景距離 とが異なるため、極値が 2つ現れる。背景距離と比較して被写体距離は小さいため、 背景の視差と比較して被写体の視差は大きい。ここで、大きい方の視差を採用すれ ば、背景の視差の影響は低減できないが、画質に直接影響する被写体の視差の影 響を低減できる。
[0295] また、実施の形態 1から実施の形態 5において、撮像素子 123は、第 1の撮像素子 123a,第 2の撮像素子 123b、第 3の撮像素子 123c、および第 4の撮像素子から構 成され、撮像信号入力部 133は、第 1の撮像信号入力部 133a、第 2の撮像信号入 力部 133b、第 3の撮像信号入力部 133c、および第 4の撮像信号入力部 133dから 構成された。しかし、撮像素子 123を 1つの撮像素子で構成し、この受光面上の異な る位置に第 1〜第 4のレンズ部 113a〜 113dによる 4つの像を形成しても良 ヽ。また、 撮像信号入力部 133が 1つの撮像素子 123からの信号が入力される 1つの撮像信号 人力咅カら構成されてもよ ヽ。この場合、システム帘1』御咅 131、 231、 331、 431、 53 1のメモリ上に置かれたデータカゝら適宜領域を選択し、第 1の撮像信号 II、第 2の撮 像信号 12、第 3の撮像信号 13、および第 4の撮像信号 14とすればよい。
[0296] また、実施の形態 1から実施の形態 5にお 、て、視差評価値 Ri(k)として式 (4)、 (59 )のような差分絶対値総和を用いた力 Sこれに限定されない。例えば、差分の二乗値の 総和や、第 1の撮像信号 IIからブロック内の平均を差分したものと第 4の撮像信号 14 力 ブロック内の平均を差分したものとの差分の二乗値の総和や、第 1の撮像信号 II 力 ブロック内の平均を差分したものと第 4の撮像信号 14からブロック内の平均を差分 したものとの差分の二乗値の総和や、第 1の撮像信号 IIからブロック内の平均を差分 したものと第 4の撮像信号 14からブロック内の平均を差分したものとの差分の二乗値 の総和を第 1の撮像信号 II力 ブロック内の平均を差分したものの二乗値の総和の 平方根で除し第 4の撮像信号 14からブロック内の平均を差分したものの二乗値の総 和の平方根で除したものを利用してもよ 、。
[0297] また、視差評価値 Ri(k)として、式 (60)や、第 1の撮像信号 IIからブロック内の平均 を差分したものと第 4の撮像信号 14からブロック内の平均を差分したものとの乗算結 果の総和を用いてよい。ただし、第 1から第 5の実施の形態の視差評価値 Ri(k)は相 関が大き ヽ (似て 、る)ほど小さくなるため、図 15のように極小値を与える kが視差 Δ i を与えたが、式 (60)などを用いたとき相関が大き!/、 (似て!/、る)ほど値が大きくなるた め、極大値を与える kを視差 Δ ίにするなどの適宜変更が必要である。
[0298] また、実施の形態 1から実施の形態 5において、第 1のレンズ部 113a、第 2のレンズ 部 113b、第 3のレンズ 113c、および第 4のレンズ部 113dの光軸の中心を互いに結 んで得られる矩形が正方形になるように配置されたがこれに限定されな 、。この矩形 の X方向の長さと y方向の長さが異なってもよい。この場合、例えば、ステップ S 140、 およびステップ S3240において視差を求めるとき、ステップ S151、ステップ S184、 ステップ S250、およびステップ S3280において視差補正をするときなど適宜変更を 要する。すなわち、 X方向と y方向とで同一の kを用いるのではなぐ前述の矩形の X 方向の長さと y方向の長さとの比を保つように kを変更する。
[0299] また、実施の形態 1から実施の形態 5において、視差は整数として求めた力 これに 限定されない。直線補間などにより、ステップ S140、ステップ S240、およびステップ S3240において視差を/ J、数まで求め、ステップ S184、 S250、およびステップ S328 0にお 、てそれぞれ直線補間を利用し視差補正してもよ!/、。
[0300] また、実施の形態 1から実施の形態 5において、焦点制御を省略し、ァクチユエータ を構成に含まず、ブロック分割と視差補正を行ってもよい。非常に焦点深度が深いレ ンズを利用した場合は、レンズと撮像素子の距離には多少の誤差が大きく許容され るため、ァクチユエータを動作させる必要がない。
[0301] また、実施の形態 1から実施の形態 5において、第 1の撮像信号 IIは主に緑色成分 を示し、第 2の撮像信号 12は主に青色成分を示し、第 3の撮像信号 13は主に赤色成 分を示し、第 4の撮像素子 123dは主に緑色成分を示し、第 1の撮像信号 IIと第 4の 撮像信号 14とを比較し視差を検知し、視差補正を行ったが、これに限定されない。例 えば、レンズとカラーフィルタの設計を変更し、第 1の撮像信号 IIが主に緑色成分を 示し、第 2の撮像信号 12は主に緑色成分を示し、第 3の撮像信号は主に青色成分を 示し、第 4の撮像信号 14は主に赤色成分を示すように変更してもよい。この場合、下 記式 (87)のように視差評価関数を変更し、下記式 (88) (89) (90)のように視差補正 するなどの変更が必要である。
[0302] Ri(k)=∑∑ |ll(x,y)-I2(x-k,y)| · · · (87)
G(x,y)=[Il(x,y)+I2(x- Δ i,y)]/2 · · · (88)
B(x,y)=I3(x,y- A i) …(89)
R(x,y)=I4(x,y- A i) …(90)
また、第 1の撮像信号 IIが主に緑色成分を示し、第 2の撮像信号 12は主に青色成 分を示し、第 3の撮像信号は主に緑色成分を示し、第 4の撮像信号 14は主に赤色成 分を示すように変更してもよい。この場合、下記式 (91)のように視差評価関数を変更 し、下記式(92) (93) (94)のように視差補正するなどの変更が必要である。
[0303] Ri(k)=∑∑ |ll(x,y)-I3(x,y-k)| · · · (91)
G(x,y)=[Il(x,y)+I3(x,y- Δ i)]/2 · · · (92)
B(x,y)=I2(x- A i,y) · · · (93)
R(x,y)=I4(x- Δ i,y- Δ i) · · · (94)
また、実施の形態 1から実施の形態 5において、格子状に 4つの撮像領域を設けた 力 れに限定されない。例えば、第 1の撮像素子、第 2の撮像素子、第 3の撮像素子 、第 4の撮像素子が 1直線上になるように配置し、第 1の撮像信号 IIが主に青色を示 し、第 2の撮像信号 12が主に緑色を示し、第 3の撮像信号 13が主に緑色を示し、第 4 の撮像信号が主に赤色を示すように変更してもよい。この場合、下記式(95)のように 視差評価関数を変更し、下記式 (96) (97) (98)のように視差補正するなどの変更が 必要である。
[0304] Ri(k)=∑∑ |l2(x,y)-I3(x-k,y)| · · · (95) G(x,y)=[I2(x,y)+I3(x- Δ i,y)]/2 · · · (96)
B(x,y)=Il(x+ A i,y) …(97)
R(x,y)=I4(x-2* Δ i,y) · · · (98)
また、実施の形態 1から実施の形態 5において、 4つの撮像領域を設けたがこれに 限定されない。例えば、 3つの撮像領域を持ち、第 1の撮像素子、第 2の撮像素子、 第 3の撮像素子力 直線上になるように配置し、第 1の撮像信号 IIが主に青色を示し 、第 2の撮像信号 12が主に緑色を示し、第 3の撮像信号 13が主に赤色を示すよう〖こ 変更してもよい。この場合、下記式 (99)、(100)のように視差評価関数を変更し、下 記式(101)のように緑色成分 Gを作成し、式(99)を用いて求めた視差 Δ iを利用し下 記式(102)のように青色成分 Bを作成し、式(100)を用いて求めた視差 Δ iを利用し 下記式(103)のように赤色成分 Rを作成し、視差補正するなどの変更が必要である。 また、式(99) (100)の代わりに、式(60)のような形式を使用してもよい。
[0305] Ri(k)=∑∑ |l2(x,y)-Il(x+k,y)| · · · (99)
Ri(k)=∑∑ |l2(x,y)-I3(x-k,y)| · · · (100)
G(x,y)=I2(x,y) …(101)
B(x,y)=Il(x+ A i,y) · ' · (102)
R(x,y)=I3(x-* Δ i,y) · · · (103)
また、 3つの撮像領域を持ち、第 1の撮像素子の右に (X軸の正の位置に)第 2の撮 像素子が配置され、第 1の撮像素子の下に (y軸の正の位置に)第 3の撮像素子を配 置し、第 1の撮像信号 IIが主に緑色を示し、第 2の撮像信号 12が主に青色を示し、第 3の撮像信号 13が主に赤色を示すように変更してもよい。この場合、下記式(104)、 ( 105)のように視差評価関数を変更し、下記式(106)のように緑色成分 Gを作成し、 式(104)を用いて求めた視差 Δ iを利用し下記式(107)のように青色成分 Bを作成し 、式( 105)を用いて求めた視差 Δ iを利用し下記式(108)のように赤色成分 Rを作成 し、視差補正するなどの変更が必要である。また、式(104) (105)の代わりに、式 (6 0)のような形式を使用してもよい。
[0306] Ri(k)=∑∑ |ll(x,y)-Il(x-k,y)| · · · (104)
Ri(k)=∑∑ |ll(x,y)-I3(x,y-k)| · · · (105) G(x,y)=Il(x,y) ·'·(106)
B(x,y)=I2(x-Ai,y) ·'·(107)
R(x,y)=I3(x,y-Ai) ·'·(108)
実施の形態 1、実施の形態 3から実施の形態 5のカメラモジュールにおいて、ブロッ クにおける視差 Δ iを用いて視差補正を行った力 ブロック毎の視差 Δ iを用いて各画 素の視差 Δ (x,y)を定め、この各画素の視差 Δ (x,y)を用いて視差補正を行ってもょ 、 産業上の利用可能性
本発明のカメラモジュールは、小型化、薄型化が可能な自動焦点機能を有するカメ ラモジュールであるため、カメラ機能を備えた携帯電話、デジタルスチルカメラ、車載 用カメラ、および監視用カメラなどに有用である。

Claims

請求の範囲
[1] それぞれが少なくとも 1枚のレンズを含む複数のレンズ部と、
前記複数のレンズ部に一対一に対応し、対応する前記レンズ部の光軸方向に対し て略垂直な受光面をそれぞれ備える複数の撮像領域と、
前記複数の撮像領域からそれぞれ出力される複数の撮像信号が入力される撮像 信号入力部と、
前記複数の撮像信号のうちの少なくとも 1つの撮像信号を複数のブロックに分割す るブロック分割部と、
前記撮像信号を用いて、前記ブロックごとに、前記複数のレンズ部がそれぞれ形成 する像間の視差を演算する視差演算部と、
前記視差に基づいて前記複数の撮像信号を補正し画像を合成する視差補正部と 、を有するカメラモジュール。
[2] 前記複数のレンズ部と前記複数の撮像領域との相対距離を変化させるァクチユエ ータと、
前記視差に基づきァクチユエータを制御する焦点制御部とを更に有する、請求項 1 に記載のカメラモジュール。
[3] 前記複数の撮像信号のうち少なくとも 1つの撮像信号に基づいてコントラストを演算 するコントラスト演算咅を更に有し、
前記焦点制御部は、前記視差と前記コントラストとに基づき前記ァクチユエ一タを制 御する、請求項 2に記載のカメラモジュール。
[4] 前記焦点制御部は、前記ァクチユエータを複数回制御し、初回は前記視差に基づ き前記ァクチユエータを制御し、 2回目以降は前記コントラストに基づき前記ァクチュ エータを制御する、請求項 3に記載のカメラモジュール。
[5] 前記焦点制御部は、前記コントラストに基づき前記ァクチユエータを制御したときの 前記ァクチユエータに対する操作量を学習する、請求項 3に記載のカメラモジュール
[6] 前記ブロック分割部は、前記少なくとも 1つの撮像信号に基づいて複数の画像領域 の輪郭を検出し、前記輪郭により前記複数の画像領域に分割されるように、前記少 なくとも 1つの撮像信号を複数のブロックに分割する、請求項 5に記載のカメラモジュ 一ノレ。
[7] 前記撮像信号に基づいて前記輪郭の視差である輪郭視差を求める輪郭視差演算 部が付加され、
前記視差演算部は、前記輪郭視差に基づいて、前記ブロックごとに、前記複数のレ ンズ部がそれぞれ形成する像間の視差を演算する、請求項 6に記載のカメラモジュ 一ノレ。
[8] 前記ブロック分割部は、前記少なくとも 1つの撮像信号を矩形状の複数のブロック に分割する、請求項 1に記載のカメラモジュール。
[9] 前記撮像信号に基づき前記複数のブロックごとに前記視差の精度を示す少なくとも
1つの視差精度評価値を演算する視差評価値演算部を更に有し、
前記視差補正部は、前記複数のブロックごとに前記視差と前記視差精度評価値と に基づ!/ヽて前記複数の撮像信号を補正し画像を合成する、請求項 1に記載のカメラ モジユーノレ。
[10] 前記視差補正部は、前記複数のブロックごとに前記視差精度評価値に基づき当該 ブロックを少なくとも 2つに分割するかどうかを決定し、分割すべきと判断されたブロッ クにお!/ヽて分割後のブロックの視差に基づき画像を合成する、請求項 9に記載のカメ ラモシユーノレ。
[11] 前記視差評価値演算部は、前記複数の撮像信号のうち少なくとも 1つの撮像信号 に基づいて前記複数のブロックごとにコントラストの大きさを示す第 1の視差精度評価 値を演算する、請求項 9に記載のカメラモジュール。
[12] 前記視差評価値演算部は、前記複数のブロックに分割された前記撮像信号を用い て、前記複数のブロックごとに、少なくとも 2つの前記レンズ部がそれぞれ形成する像 を前記視差だけ移動した像がどれだけ相関があるかを示す第 2の視差精度評価値を 演算する、請求項 9に記載のカメラモジュール。
[13] 前記視差補正部は、前記複数のブロックごとに前記第 2の視差精度評価値が小さ いとき当該ブロックを少なくとも 2つに分割し、分割されたブロックにおいて分割後の ブロックの視差に基づき画像を合成する、請求項 11に記載のカメラモジュール。
[14] 前記視差評価値演算部は、前記複数の撮像信号のうち少なくとも 1つの撮像信号 に基づいて前記複数のブロックごとにコントラストの大きさを示す第 1の視差精度評価 値と、
前記複数のブロックに分割された前記撮像信号を用いて、前記複数のブロックごと に、少なくとも 2つの前記レンズ部がそれぞれ形成する像を前記視差だけ移動した像 力 Sどれだけ相関があるかを示す第 2の視差精度評価値を演算し、
前記視差補正部は、前記複数のブロックごとに前記第 1の視差精度評価値が大きく かつ前記第 2の視差精度評価値が小さいとき当該ブロックを少なくとも 2つに分割し、 分割されたブロックにお ヽて分割後のブロックの視差に基づき画像を合成する、請求 項 10に記載のカメラモジュール。
[15] 前記撮像信号入力部は、前記複数の撮像信号を複数のフィールドごとに入力し、 前記視差演算部は、前記複数のフィールドのそれぞれについて、前記ブロック毎の 視差を演算する、請求項 1に記載のカメラモジュール。
[16] 前記複数のレンズ部に一対一に対応し、複数色のフィルタが配置されたカラーフィ ノレタをさらに備え、
前記複数のレンズ部のうち、前記フィールドの走査方向に平行に配置された少なく とも 2つのレンズ部に対応して、同色のフィルタが配置されている、請求項 15に記載 のカメラモジユーノレ。
[17] 撮影画像とは異なる別画像を保存する別画像保存部を更に有し、
前記視差補正部は、前記視差に基づき前記撮像信号を補正した画像と前記別画 像とを組み合わせる、請求項 1に記載のカメラモジュール。
[18] 前記視差補正部は、前記視差が大き!ヽほど前記撮像信号を補正した画像の割合 を大きく前記別画像の割合を小さくなるように組み合わせる、請求項 17に記載のカメ ラモシユーノレ。
[19] 請求項 1〜18のいずれか一項に記載のカメラモジュールを備えた電子機器。
[20] それぞれが少なくとも 1枚のレンズを含む複数のレンズ部と、前記複数のレンズ部に 一対一に対応し、対応する前記レンズ部の光軸方向に対して略垂直な受光面をそ れぞれ備える複数の撮像領域と、前記複数の撮像領域からそれぞれ出力される複 数の撮像信号が入力される撮像信号入力部と、入力された撮像信号の画像処理を 行う画像処理部とを備えたカメラモジュールにお 、て、前記画像処理部の動作を制 御するプログラムであって、
前記複数の撮像信号のうちの少なくとも 1つの撮像信号を複数のブロックに分割す るブロック分割処理と、
前記撮像信号を用いて、前記ブロックごとに、前記複数のレンズ部がそれぞれ形成 する像間の視差を演算する視差演算処理と、
前記視差に基づいて前記複数の撮像信号を補正し画像を合成する視差補正処理 とを、前記画像処理部に実行させることを特徴とするプログラム。
それぞれが少なくとも 1枚のレンズを含む複数のレンズ部と、前記複数のレンズ部に 一対一に対応し、対応する前記レンズ部の光軸方向に対して略垂直な受光面をそ れぞれ備える複数の撮像領域と、前記複数の撮像領域からそれぞれ出力される複 数の撮像信号が入力される撮像信号入力部と、入力された撮像信号の画像処理を 行う画像処理部とを備えたカメラモジュールにお 、て、前記画像処理部の動作を制 御するプログラムを記録したプログラム記録媒体であって、
前記プログラムは、
前記複数の撮像信号のうちの少なくとも 1つの撮像信号を複数のブロックに分割す るブロック分割処理と、
前記撮像信号を用いて、前記ブロックごとに、前記複数のレンズ部がそれぞれ形成 する像間の視差を演算する視差演算処理と、
前記視差に基づいて前記複数の撮像信号を補正し画像を合成する視差補正処理 とを、前記画像処理部に実行させることを特徴とするプログラム記録媒体。
PCT/JP2005/017762 2004-09-27 2005-09-27 カメラモジュールおよびそれを備えた電子機器 WO2006035778A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2006515432A JP4322921B2 (ja) 2004-09-27 2005-09-27 カメラモジュールおよびそれを備えた電子機器
US11/576,119 US7911516B2 (en) 2004-09-27 2005-09-27 Camera module and electronic apparatus provided with it

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2004-279794 2004-09-27
JP2004279794 2004-09-27
JP2004-371849 2004-12-22
JP2004371849 2004-12-22

Publications (1)

Publication Number Publication Date
WO2006035778A1 true WO2006035778A1 (ja) 2006-04-06

Family

ID=36118924

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2005/017762 WO2006035778A1 (ja) 2004-09-27 2005-09-27 カメラモジュールおよびそれを備えた電子機器

Country Status (3)

Country Link
US (1) US7911516B2 (ja)
JP (1) JP4322921B2 (ja)
WO (1) WO2006035778A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015025734A1 (ja) * 2013-08-22 2015-02-26 コニカミノルタ株式会社 レンズユニット、撮像装置及びマルチアレイレンズ

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BRPI0506340A (pt) * 2005-12-12 2007-10-02 Univ Fed Sao Paulo Unifesp sistema de visualização de realidade aumentada com computação pervasiva
US7539412B2 (en) * 2006-05-17 2009-05-26 Terrasem Co. Ltd. Camera module with first and second image sensor chips, holders and lens
JP5472584B2 (ja) * 2008-11-21 2014-04-16 ソニー株式会社 撮像装置
JP5299188B2 (ja) * 2009-09-16 2013-09-25 富士通株式会社 撮像装置、それを備えた電子装置、及び撮像装置の製造方法
KR101630303B1 (ko) * 2010-02-02 2016-06-14 삼성전자주식회사 디지털 영상 처리 장치 및 그 제어 방법
WO2011097038A1 (en) * 2010-02-08 2011-08-11 Thomson Licensing Reducing chromatic aberration
JP5387856B2 (ja) * 2010-02-16 2014-01-15 ソニー株式会社 画像処理装置、画像処理方法、画像処理プログラムおよび撮像装置
JP5641200B2 (ja) * 2010-05-28 2014-12-17 ソニー株式会社 画像処理装置、画像処理方法および画像処理プログラムならびに記録媒体
US8922704B2 (en) * 2010-09-01 2014-12-30 Apple Inc. Techniques for collection of auto-focus statistics
JP5673032B2 (ja) * 2010-11-29 2015-02-18 ソニー株式会社 画像処理装置、表示装置、画像処理方法及びプログラム
US20120133747A1 (en) * 2010-11-29 2012-05-31 Sony Corporation Image processing apparatus, display apparatus, image processing method and image processing program
US8581995B2 (en) * 2011-01-25 2013-11-12 Aptina Imaging Corporation Method and apparatus for parallax correction in fused array imaging systems
DE102012200200B4 (de) * 2012-01-09 2020-09-17 Robert Bosch Gmbh Kamerasystem, insbesondere für ein Fahrzeug, sowie ein Fahrzeug
JP6167525B2 (ja) * 2012-03-21 2017-07-26 株式会社リコー 距離計測装置及び車両
US9124762B2 (en) 2012-12-20 2015-09-01 Microsoft Technology Licensing, Llc Privacy camera
US20160295097A1 (en) * 2015-03-31 2016-10-06 Qualcomm Incorporated Dual camera autofocus

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04330411A (ja) * 1991-05-02 1992-11-18 Olympus Optical Co Ltd 自動合焦装置
JPH07220113A (ja) * 1994-01-28 1995-08-18 Canon Inc 画像記録再生装置
JP2001116513A (ja) * 1999-10-18 2001-04-27 Toyota Central Res & Dev Lab Inc 距離画像算出装置
JP2001175863A (ja) * 1999-12-21 2001-06-29 Nippon Hoso Kyokai <Nhk> 多視点画像内挿方法および装置
JP2002204462A (ja) * 2000-10-25 2002-07-19 Canon Inc 撮像装置及びその制御方法及び制御プログラム及び記憶媒体
JP2002330332A (ja) * 2001-04-27 2002-11-15 Canon Inc 画像処理装置、撮像装置、その制御方法、及び記録媒体
JP2003067782A (ja) * 2001-08-27 2003-03-07 Namco Ltd 立体視画像生成情報、情報記憶媒体、及び立体視画像生成装置
JP2003143459A (ja) * 2001-11-02 2003-05-16 Canon Inc 複眼撮像系およびこれを備えた装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5220441A (en) * 1990-09-28 1993-06-15 Eastman Kodak Company Mechanism for determining parallax between digital images
US6519358B1 (en) * 1998-10-07 2003-02-11 Sony Corporation Parallax calculating apparatus, distance calculating apparatus, methods of the same, and information providing media
US6859229B1 (en) 1999-06-30 2005-02-22 Canon Kabushiki Kaisha Image pickup apparatus
JP3397755B2 (ja) 1999-06-30 2003-04-21 キヤノン株式会社 撮像装置
US7262799B2 (en) 2000-10-25 2007-08-28 Canon Kabushiki Kaisha Image sensing apparatus and its control method, control program, and storage medium
JP2002320133A (ja) 2001-04-23 2002-10-31 Nikon Corp 電子カメラ
US7286168B2 (en) * 2001-10-12 2007-10-23 Canon Kabushiki Kaisha Image processing apparatus and method for adding blur to an image
US7251346B2 (en) * 2002-11-19 2007-07-31 Honda Motor Co., Ltd. Moving object detection device, moving object detection method, and moving object detection program
US7511749B2 (en) * 2003-12-18 2009-03-31 Aptina Imaging Corporation Color image sensor having imaging element array forming images on respective regions of sensor elements

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04330411A (ja) * 1991-05-02 1992-11-18 Olympus Optical Co Ltd 自動合焦装置
JPH07220113A (ja) * 1994-01-28 1995-08-18 Canon Inc 画像記録再生装置
JP2001116513A (ja) * 1999-10-18 2001-04-27 Toyota Central Res & Dev Lab Inc 距離画像算出装置
JP2001175863A (ja) * 1999-12-21 2001-06-29 Nippon Hoso Kyokai <Nhk> 多視点画像内挿方法および装置
JP2002204462A (ja) * 2000-10-25 2002-07-19 Canon Inc 撮像装置及びその制御方法及び制御プログラム及び記憶媒体
JP2002330332A (ja) * 2001-04-27 2002-11-15 Canon Inc 画像処理装置、撮像装置、その制御方法、及び記録媒体
JP2003067782A (ja) * 2001-08-27 2003-03-07 Namco Ltd 立体視画像生成情報、情報記憶媒体、及び立体視画像生成装置
JP2003143459A (ja) * 2001-11-02 2003-05-16 Canon Inc 複眼撮像系およびこれを備えた装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015025734A1 (ja) * 2013-08-22 2015-02-26 コニカミノルタ株式会社 レンズユニット、撮像装置及びマルチアレイレンズ

Also Published As

Publication number Publication date
US7911516B2 (en) 2011-03-22
JPWO2006035778A1 (ja) 2008-05-15
US20080259201A1 (en) 2008-10-23
JP4322921B2 (ja) 2009-09-02

Similar Documents

Publication Publication Date Title
JP4322921B2 (ja) カメラモジュールおよびそれを備えた電子機器
JP4524717B2 (ja) 画像処理装置、撮像装置、画像処理方法及びプログラム
KR101265358B1 (ko) 컬러 디지털 이미지를 사용하여 선명도 변경과 같은 액션을제어하는 방법
US9215389B2 (en) Image pickup device, digital photographing apparatus using the image pickup device, auto-focusing method, and computer-readable medium for performing the auto-focusing method
CN102457681B (zh) 图像处理设备和图像处理方法
WO2017101572A1 (zh) 图像传感器及输出方法、相位对焦方法、成像装置和终端
RU2585235C2 (ru) Устройство захвата изображения
RU2474850C1 (ru) Устройство съемки изображения
US8023016B2 (en) Imaging device and manufacturing method thereof
CN102404507B (zh) 焦点调节设备
JP5642433B2 (ja) 撮像装置及び画像処理方法
WO2006022373A1 (ja) 撮像装置および撮像方法
CN108462830A (zh) 摄像装置及摄像装置的控制方法
JP5092565B2 (ja) 撮像装置、画像処理装置およびプログラム
CN107960120A (zh) 图像处理设备、摄像设备、图像处理方法、程序和存储介质
CN105391934B (zh) 焦点检测设备、其控制方法以及摄像装置
JP4364847B2 (ja) 撮像装置および画像変換方法
JP2012256118A (ja) 画像復元装置およびその方法
JP2007235862A (ja) 撮像装置
CN100546345C (zh) 摄像机模组以及具有其的电子设备
CN106993110A (zh) 摄像设备及其控制方法
US7898591B2 (en) Method and apparatus for imaging using sensitivity coefficients
KR20210158201A (ko) 이미지 센서를 포함하는 전자 장치 및 이에 대한 제어 방법
JP6639208B2 (ja) 撮像装置及びその制御方法
JP2016066015A (ja) 焦点検出装置及びその制御方法、プログラム、記憶媒体

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2006515432

Country of ref document: JP

AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KM KP KR KZ LC LK LR LS LT LU LV LY MA MD MG MK MN MW MX MZ NA NG NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SM SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LT LU LV MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 200580032738.5

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 11576119

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 05787731

Country of ref document: EP

Kind code of ref document: A1