JP2007235862A - Image-taking device - Google Patents

Image-taking device Download PDF

Info

Publication number
JP2007235862A
JP2007235862A JP2006058082A JP2006058082A JP2007235862A JP 2007235862 A JP2007235862 A JP 2007235862A JP 2006058082 A JP2006058082 A JP 2006058082A JP 2006058082 A JP2006058082 A JP 2006058082A JP 2007235862 A JP2007235862 A JP 2007235862A
Authority
JP
Japan
Prior art keywords
parallax
imaging
lens
image
unit
Prior art date
Legal status (The legal status 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 status listed.)
Withdrawn
Application number
JP2006058082A
Other languages
Japanese (ja)
Inventor
Tomokuni Iijima
友邦 飯島
Ichiro Oyama
一朗 大山
Takashi Ishikawa
隆 石川
Aki Takai
亜季 高井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
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 JP2006058082A priority Critical patent/JP2007235862A/en
Publication of JP2007235862A publication Critical patent/JP2007235862A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image-taking device by which a clear image can be taken in an entire image region irrespective of a distance from a photographic subject. <P>SOLUTION: The image-taking device is equipped with a plurality of lenses 113, a plurality of image taking regions 123 each equipped with an acceptance surface nearly perpendicular to an optical-axis direction of the lenses 113, an image signal input section 133 to which a plurality of image signals each input from the image taking regions 123 are input, a block dividing section 143 which divides at least one of the plurality of the image signals into a plurality of blocks, a parallax component calculator 144 which performs, by using finer resolution than that of pixels, calculation operations of parallax components which are each formed by the lenses 113 and appear between images, and a parallax component correcting section 145 which corrects the plurality of the image signals and produces an image by synthesizing the image signals based on the parallax components. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、小型かつ薄型な撮像装置に関する。   The present invention relates to a small and thin imaging apparatus.

従来のカメラモジュールとして、特許文献1のカメラモジュールがある。図35は、特許文献1のカメラモジュールの構成を示す断面図である。   There exists a camera module of patent document 1 as a conventional camera module. FIG. 35 is a cross-sectional view showing the configuration of the camera module of Patent Document 1. As shown in FIG.

図35において、撮像系9010は、物体からの光を絞り9110及び撮像レンズ9100を介して撮像素子9120の撮像面に結像する光学処理系である。絞り9110は、3つの円形開口9110a、9110b、9110cを有する。開口9110a、9110b、9110cの各々から撮像レンズ9100の光入射面9100eに入射した物体光は、撮像レンズ9100の3つのレンズ部9100a、9100b、9100cから射出して撮像素子9120の撮像面上に3つの物体像を形成する。撮像レンズ9100の平面部9100dには遮光性膜(図示せず)が形成されている。撮像レンズ9100の光入射面9100e上には互いに異なる波長帯域の光を透過させる3つの光学フィルタ9052a、9052b、9052cが形成されている。また、撮像素子9120上の3つの撮像領域9120a、9120b、9120c上にも、互いに異なる波長帯域の光を透過させる3つの光学フィルタ9053a、9053b、9053cが形成されている。光学フィルタ9052aと光学フィルタ9053aは、主に緑色(Gで示す)を透過する分光透過率特性を有し、光学フィルタ9052bと光学フィルタ9053bは、主に赤色(Rで示す)を透過する分光透過率特性を有し、さらに、光学フィルタ9052cと光学フィルタ9053cは、主に青色(Bで示す)を透過する分光透過率特性を有する。そのため、撮像領域9120aは緑色光(G)に対して、撮像領域9120bは赤色光(R)に対して、撮像領域9120cは青色光(B)に対して、それぞれ感度を持つ。   In FIG. 35, 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 a diaphragm 9110 and an imaging lens 9100. The diaphragm 9110 has three circular openings 9110a, 9110b, and 9110c. Object light that has entered the light incident surface 9100e of the imaging lens 9100 from each of the apertures 9110a, 9110b, and 9110c is emitted from the three lens portions 9100a, 9100b, and 9100c of the imaging lens 9100, and 3 on the imaging surface of the imaging element 9120. Two object images are formed. A light-shielding film (not shown) is formed on the flat portion 9100 d of the imaging lens 9100. Three optical filters 9052a, 9052b, and 9052c that transmit light in different wavelength bands are formed on the light incident surface 9100e of the imaging lens 9100. In addition, three optical filters 9053a, 9053b, and 9053c that transmit light in different wavelength bands are also formed on the three imaging regions 9120a, 9120b, and 9120c on the imaging element 9120. 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 transmit spectral light that transmits through red (indicated by R). Further, 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).

このような複数の撮像レンズを備えたカメラモジュールでは、カメラモジュールから物体までの距離が変化すると、撮像素子9120の撮像面上に複数の撮像レンズがそれぞれ形成する複数の物体像の相互間隔が変化する。   In such a camera module having a plurality of imaging lenses, when the distance from the camera module to the object changes, the mutual interval between the plurality of object images formed by the plurality of imaging lenses on the imaging surface of the imaging element 9120 changes. To do.

特許文献1のカメラモジュールでは、仮想被写体距離D[m]を複数の結像系の撮影画角θ[°]の関数として、D=1.4/(tan(θ/2))と定義したとき、物体が仮想被写体距離D[m]にあるときの複数の物体像の相互間隔と無限遠にあるときの複数の物体像の相互間隔との変化が、基準画像信号の画素ピッチの2倍よりも小さくなるように、複数の結像系の光軸間隔が設定されている。すなわち、仮想被写体距離D[m]にある物体の撮影に最適化された画像処理と同一の画像処理を、無限遠にある物体の撮影に対して行っても、撮像面上での両物体像の相互間隔の差が基準信号の画素ピッチの2倍より小さくなるように光軸間隔が設定されているので、無限遠にある物体像の色ズレを許容可能なレベルに抑えることができる。   In the camera module of Patent Document 1, the virtual subject distance D [m] is defined as D = 1.4 / (tan (θ / 2)) as a function of the shooting angle of view θ [°] of a plurality of imaging systems. When the object is at the virtual subject distance D [m], the change between the mutual interval of the plurality of object images and the mutual interval of the plurality of object images when the object is at infinity is twice the pixel pitch of the reference image signal. The optical axis intervals of the plurality of imaging systems are set so as to be smaller than the above. That is, even if the same image processing as the image processing optimized for photographing the object at the virtual subject distance D [m] is performed on the photographing of the object at infinity, both object images on the imaging surface are obtained. Since the optical axis interval is set so that the difference between the two is smaller than twice the pixel pitch of the reference signal, the color shift of the object image at infinity can be suppressed to an acceptable level.

近年、カメラが搭載された携帯電話などの携帯機器が普及している。これら携帯機器の小型化、薄型化および高性能化に伴い、小型化、薄型化および高性能化されたカメラモジュールが要求されている。高性能化として、自動焦点制御機能を備え、風景撮影(ほぼ無限遠の物体の撮影)や人物撮影(通常数mの距離の物体の撮影)のみならず、マクロ撮影(数cmから数十cmの距離の物体の撮影)も可能であることが要求される。   In recent years, mobile devices such as mobile phones equipped with cameras have become widespread. As these portable devices become smaller, thinner, and higher in performance, camera modules that are smaller, thinner, and higher in performance are required. As a high performance, equipped with auto focus control function, not only landscape shooting (shooting objects at almost infinity) and portrait shooting (usually shooting objects at a distance of several meters), but also macro shooting (several centimeters to several tens of centimeters) (Photographing an object at a distance of 2) is required.

しかしながら、特許文献1のカメラモジュールでは、複数のレンズ部9100a、9100b、9100cを有することにより、薄型化を実現している。しかし、従来のカメラモジュールは、自動焦点制御機能を持たない。また、仮想被写体距離D[m]は、人物撮影を念頭に設定されている。そのため、従来のカメラモジュールでは、風景撮影や人物撮影には対応できるが、マクロ撮影には対応できない。   However, the camera module disclosed in Patent Document 1 has a plurality of lens units 9100a, 9100b, and 9100c, thereby realizing a reduction in thickness. However, the conventional camera module does not have an automatic focus control function. Further, the virtual subject distance D [m] is set in consideration of person photographing. Therefore, the conventional camera module can cope with landscape photography and portrait photography, but cannot cope with macro photography.

特許文献1の課題を解決する従来のカメラジュールとして、特許文献2に記載されたカメラモジュールがある。図36は、特許文献2のカメラモジュールの一例を示す図であり、撮影される画像と分割された小領域を示している。撮影画面に対し、その中央部k0とその周辺に検出領域k1、k2、k3、k4を設ける。そして、それぞれの検出領域の視差p0、p1、p2、p3、p4を求める。そして、これらの視差のうち所定範囲のものを抽出し、抽出されるものが複数ある場合は、中央に近い領域での視差を選択する。さらに、選択された視差を用いて撮影画像全体の補正を行う。
特開2001−78213号公報 特開2002−330332号公報
As a conventional camera module that solves the problem of Patent Document 1, there is a camera module described in Patent Document 2. FIG. 36 is a diagram illustrating an example of a camera module disclosed in Patent Document 2, and illustrates a captured image and divided small areas. Detection areas k1, k2, k3, and k4 are provided in the center k0 and the periphery thereof on the photographing screen. Then, the parallaxes p0, p1, p2, p3, and p4 of the respective detection areas are obtained. Then, 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.
JP 2001-78213 A JP 2002-330332 A

前述のように、特許文献1に記載された従来のカメラモジュールでは、複数のレンズ部9100a、9100b、9100cを有することにより、薄型化を実現している。しかし、従来のカメラモジュールは、自動焦点制御機能を持たない。また、仮想被写体距離D[m]は、人物撮影を念頭に設定されている。そのため、従来のカメラモジュールでは、風景撮影や人物撮影には対応できるが、マクロ撮影には対応できない。   As described above, the conventional camera module described in Patent Document 1 has a plurality of lens portions 9100a, 9100b, and 9100c, thereby realizing a reduction in thickness. However, the conventional camera module does not have an automatic focus control function. Further, the virtual subject distance D [m] is set with the person shooting in mind. Therefore, the conventional camera module can cope with landscape photography and portrait photography, but cannot cope with macro photography.

また、特許文献2に記載された従来のカメラモジュールでは、撮影される画像の一部を複数の小領域とし、これらの領域の視差を求め、これらの視差から1つを選択し、この選択された視差に基づき撮影画像全体の補正をかける。例えば、撮影画面の中央にカメラから2m程度離れた人物Mと、端に10m程度離れた人物Nが共存している場合、撮影画面中央に位置する人物Mが被写体であると考えて、この領域k0における視差p0を元に撮影画像全体の補正をかける。このとき、人物Mの視差は選択された視差と同一であり、視差の影響を補正でき、人物Mの領域ではきれいな画像を得る。しかし、人物Nの視差は選択された視差と異なり、視差の影響を補正できないため、人物Nの領域では色むらが発生しきれいな画像とならない。   Further, in the conventional camera module described in Patent Document 2, a part of an image to be taken is set as a plurality of small areas, parallax of these areas is obtained, one of these parallaxes is selected, and the selected one is selected. The whole captured image is corrected based on the parallax. For example, when a person M that is about 2 m away from the camera and a person N that is about 10 m away from the camera coexist in the center of the shooting screen, the person M located in the center of the shooting screen is considered to be the subject, and this area The entire captured image is corrected based on the parallax p0 at k0. At this time, 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 is obtained in the area of the person M. However, since the parallax of the person N is different from the selected parallax, the influence of the parallax cannot be corrected. Therefore, color unevenness occurs in the area of the person N, and a beautiful image is not obtained.

本発明は、上記問題に鑑みなされたもので、小型化、薄型化が可能で、被写体距離によらず全画像領域できれいな画像を得るカメラモジュールを提供することを目的とする。   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 a clear image in the entire image region regardless of the subject distance.

本発明の撮像装置は、それぞれが少なくとも1枚のレンズを含む複数のレンズ部と、前記複数のレンズ部に一対一に対応し、対応する前記レンズ部の光軸方向に対して略垂直な受光面をそれぞれ備える複数の撮像領域と、前記複数の撮像領域からそれぞれ出力される複数の撮像信号が入力される撮像信号入力部と、前記複数の撮像信号のうちの少なくとも1つの撮像信号を複数のブロックに分割するブロック分割部と、前記撮像信号を用いて、前記ブロックごとに、前記複数のレンズ部がそれぞれ形成する像間の視差を画素の分解能よりも細かな分解能で演算する視差演算部と、前記視差に基づいて前記複数の撮像信号を補正し画像を合成する視差補正部と、を有する。   The imaging apparatus according to the present invention includes a plurality of lens units each including at least one lens, and a light reception that corresponds to the plurality of lens units on a one-to-one basis and is substantially perpendicular to the optical axis direction of the corresponding lens unit. A plurality of imaging regions each having a plane; an imaging signal input unit to which a plurality of imaging signals output from the plurality of imaging regions are input; and a plurality of imaging signals at least one of the plurality of imaging signals. A block division unit that divides the image into blocks, and a parallax calculation unit that calculates the parallax between the images formed by the plurality of lens units for each of the blocks at a resolution finer than the resolution of the pixels, using the imaging signal. A parallax correction unit that corrects the plurality of imaging signals based on the parallax and combines the images.

本発明は、上記問題に鑑みなされたもので、小型化、薄型化が可能で、被写体距離によらず全画像領域できれいな画像を得る撮像装置を提供することができる。   The present invention has been made in view of the above problems, and can provide an imaging apparatus 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.

本発明の撮像装置は、それぞれが少なくとも1枚のレンズを含む複数のレンズ部と、前記複数のレンズ部に一対一に対応し、対応する前記レンズ部の光軸方向に対して略垂直な受光面をそれぞれ備える複数の撮像領域と、前記複数の撮像領域からそれぞれ出力される複数の撮像信号が入力される撮像信号入力部と、前記複数の撮像信号のうちの少なくとも1つの撮像信号を複数のブロックに分割するブロック分割部と、前記撮像信号を用いて、前記ブロックごとに、前記複数のレンズ部がそれぞれ形成する像間の視差を、画素の分解能よりも細かな分解能で演算する視差演算部と、前記視差に基づいて前記複数の撮像信号を補正し画像を合成する視差補正部と、を有する。   The imaging apparatus according to the present invention includes a plurality of lens units each including at least one lens, and a light reception that corresponds to the plurality of lens units on a one-to-one basis and is substantially perpendicular to the optical axis direction of the corresponding lens unit. A plurality of imaging regions each having a plane; an imaging signal input unit to which a plurality of imaging signals output from the plurality of imaging regions are input; and a plurality of imaging signals at least one of the plurality of imaging signals. A block division unit that divides the image into blocks, and a parallax calculation unit that calculates the parallax between the images formed by the plurality of lens units for each of the blocks with a resolution finer than the resolution of the pixels. And a parallax correction unit that corrects the plurality of imaging signals based on the parallax and combines the images.

物体像の位置は、被写体距離に応じて相対的に変化する。すなわち、被写体距離が小さくなると、視差が大きくなる。そのため、距離が異なる複数の被写体を同時に撮像すると、被写体毎に視差が異なる。本発明の撮像装置によれば、ブロック毎の視差を演算し、このブロック毎の視差に基づき視差の影響が低減するように撮像信号を補正した後、画像合成する。これにより、距離が異なる複数の被写体を同時に撮像するときにおいても、適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   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 a plurality of subjects having different distances are simultaneously imaged, the parallax differs for each subject. According to the imaging apparatus of the present invention, the parallax for each block is calculated, and after the imaging signal is corrected so as to reduce the influence of the parallax based on the parallax for each block, the image is synthesized. Accordingly, even when a plurality of subjects having different distances are simultaneously imaged, the parallax of each subject can be corrected as appropriate, and a clear image in which the influence of the parallax is reduced in the entire image region can be obtained.

さらに、本発明の撮像装置によれば、ブロックごとに、視差を画素の分解能よりも細かな分解能で演算し、このブロック毎の細かな分解能の視差に基づき視差の影響が低減するように撮像信号を補正した後、画像合成する。これにより、距離が異なる複数の被写体を同時に撮像するときにおいても、適宜それぞれの被写体の視差を補正して、全画像領域でさらに視差の影響が低減されたきれいな画像を得ることができる。   Furthermore, according to the imaging apparatus of the present invention, for each block, the parallax is calculated with a resolution finer than the pixel resolution, and the imaging signal is reduced so that the influence of the parallax is reduced based on the fine resolution parallax for each block. After correcting the image, 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 further reduced in the entire image region.

上記の本発明の撮像装置において、前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号とを、前記ブロックのずらし量を変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値の極値を与える前記ずらし量である極値ずらし量を得て、前記極値ずらし量の前記視差評価値と前記極値ずらし量の前後のずらし量の前記視差評価値とに基づき、前記視差を画素の分解能よりも細かな分解能で演算することが好ましい。   In the imaging apparatus of the present invention, the parallax calculation unit includes an imaging signal indicating an image formed by one lens unit among the plurality of lens units, and an image formed by a lens unit different from the one lens unit. A plurality of parallax evaluation values are created by comparing the imaging signal indicating a plurality of times while changing the shift amount of the block, and an extreme value shift amount that is the shift amount that gives the extreme value of the parallax evaluation value is set. It is preferable to calculate the parallax with a resolution finer than the resolution of the pixel based on the parallax evaluation value of the extreme value shift amount and the parallax evaluation value of the shift amount before and after the extreme value shift amount. .

この好ましい構成によれば、ブロックごとに、ずらし量に対する極値を与える視差評価値とそのずらし量の前後の記視差評価値とに基づき視差を画素の分解能よりも細かな分解能で演算し、このブロック毎の細かな分解能の視差に基づき視差の影響が低減するように撮像信号を補正した後、画像合成する。これにより、距離が異なる複数の被写体を同時に撮像するときにおいても、適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   According to this preferred configuration, for each block, the parallax is calculated with a resolution finer than the pixel resolution based on the parallax evaluation value that gives an extreme value with respect to the shift amount and the parallax evaluation value before and after the shift amount. After correcting the imaging signal so as to reduce the influence of the parallax based on the fine resolution parallax for each block, the image is synthesized. Accordingly, even when a plurality of subjects having different distances are simultaneously imaged, the parallax of each subject can be corrected as appropriate, and a clear image in which the influence of the parallax is reduced in the entire image region can be obtained.

上記の本発明の撮像装置において、前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号とを、前記ブロックのずらし量を画素の分解能よりも細かな分解能で変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値の極値を与える前記ずらし量である極値ずらし量を得て、前記極値ずらし量の前記視差評価値と前記極値ずらし量に基づき、前記視差を画素の分解能よりも細かな分解能で演算することが好ましい。   In the imaging apparatus of the present invention, the parallax calculation unit includes an imaging signal indicating an image formed by one lens unit among the plurality of lens units, and an image formed by a lens unit different from the one lens unit. A plurality of parallax evaluation values by changing the block shift amount at a resolution finer than the resolution of a pixel, and a plurality of parallax evaluation values, and giving an extreme value of the parallax evaluation value It is preferable to obtain an extreme value shift amount that is a shift amount, and to calculate the parallax with a resolution finer than the resolution of a pixel based on the parallax evaluation value and the extreme value shift amount of the extreme value shift amount.

この好ましい構成によれば、ブロックごとに1つのレンズ部が形成する像を示す撮像信号と異なる1つのレンズ部が形成する像を示す撮像信号とを画素の分解能よりも細かな分解能で複数回だけずらし量を変化させ比較することにより、視差を画素の分解能よりも細かな分解能で演算し、このブロック毎の細かな分解能の視差に基づき視差の影響が低減するように撮像信号を補正した後、画像合成する。これにより、距離が異なる複数の被写体を同時に撮像するときにおいても、適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   According to this preferable configuration, an imaging signal indicating an image formed by one lens unit for each block and an imaging signal indicating an image formed by a different lens unit only a plurality of times with a resolution finer than the pixel resolution. By changing and comparing the shift amount, the parallax is calculated with a resolution finer than the resolution of the pixel, and after correcting the imaging signal so that the influence of the parallax is reduced based on the fine resolution parallax for each block, Composite images. Accordingly, even when a plurality of subjects having different distances are simultaneously imaged, the parallax of each subject can be corrected as appropriate, and a clear image in which the influence of the parallax is reduced in the entire image region can be obtained.

上記の本発明の撮像装置において、前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号とを、前記ブロックのずらし量を変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値の極値を与える前記ずらし量である極値ずらし量を得て、前記極値ずらし量の前後で前記ブロックを前記ずらし量よりも小さくずらして前記撮像信号を比較することにより微少ずらし時視差評価値を作成し、前記視差評価値と前記微少ずらし時評価値とに基づき前記視差を演算することが好ましい。   In the imaging apparatus of the present invention, the parallax calculation unit includes an imaging signal indicating an image formed by one lens unit among the plurality of lens units, and an image formed by a lens unit different from the one lens unit. A plurality of parallax evaluation values are created by comparing the imaging signal indicating a plurality of times while changing the shift amount of the block, and an extreme value shift amount that is the shift amount that gives the extreme value of the parallax evaluation value is set. To obtain a slightly shifted parallax evaluation value by comparing the image pickup signal by shifting the block smaller than the shifting amount before and after the extreme value shifting amount, and the parallax evaluation value and the slightly shifting time evaluation value. It is preferable to calculate the parallax based on the above.

この好ましい構成によれば、ある特定の幅だけずらし量を変化させ概略の視差を求め、その後、概略視差の前後で、より微少な幅だけずらし量を変化させ詳細な視差を求める。これにより、一定の幅でずらし量を変化させるときと比較し、演算量を減少できるため、より低コストな演算回路で、距離が異なる複数の被写体を同時に撮像するときにおいても、適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   According to this preferred configuration, the approximate amount of parallax is obtained by changing the shift amount by a specific width, and then the detailed amount of parallax is obtained by changing the amount of shift by a finer width before and after the approximate parallax. As a result, the amount of calculation can be reduced as compared with the case where the shift amount is changed with a constant width, so that even when a plurality of subjects with different distances are simultaneously imaged with a lower cost arithmetic circuit, each subject is appropriately selected. By correcting the parallax, it is possible to obtain a clear image in which the influence of the parallax is reduced in the entire image region.

上記の本発明の撮像装置において、前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号を間引いた信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号を間引いた信号とを、前記ブロックのずらし量を変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値に基づき前記視差を演算することが好ましい。   In the imaging apparatus of the present invention, the parallax calculation unit includes a signal obtained by thinning out an imaging signal indicating an image formed by one lens unit among the plurality of lens units, and a lens unit different from the one lens unit. A plurality of parallax evaluation values are created by comparing a signal obtained by thinning an imaging signal indicating an image formed by changing the shift amount of the block a plurality of times, and the parallax is calculated based on the parallax evaluation values It is preferable.

この好ましい構成によれば、撮像信号を間引いた信号を用いて視差を求める。これにより、全ての撮像信号を用いて視差を求めるときと比較し、演算量を減少できるため、より低コストな演算回路で、距離が異なる複数の被写体を同時に撮像するときにおいても、適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   According to this preferable configuration, the parallax is obtained using a signal obtained by thinning the imaging signal. As a result, the amount of calculation can be reduced compared with the case of obtaining parallax using all imaging signals, so that even when a plurality of subjects with different distances are simultaneously imaged with a lower cost arithmetic circuit, By correcting the parallax of the subject, it is possible to obtain a beautiful image in which the influence of the parallax is reduced in the entire image region.

上記の本発明の撮像装置において、前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号を千鳥状に間引いた信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号を千鳥状に間引いた信号とを、前記ブロックのずらし量を変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値に基づき前記視差を演算することが好ましい。   In the imaging apparatus according to the present invention, the parallax calculation unit includes a signal obtained by thinning out an imaging signal indicating an image formed by one lens unit among the plurality of lens units, and the one lens unit. A plurality of parallax evaluation values are created by comparing a signal obtained by thinning out imaging signals indicating images formed by different lens portions in a zigzag manner by changing the shift amount of the block, and the parallax evaluation values are generated. It is preferable to calculate the parallax based on this.

この好ましい構成によれば、撮像信号を千鳥状に間引いた信号を用いて視差を求める。これにより、全ての撮像信号を用いて視差を求めるときと比較し、演算量を減少できるため、より低コストな演算回路で、距離が異なる複数の被写体を同時に撮像するときにおいても、適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   According to this preferable configuration, the parallax is obtained using a signal obtained by thinning the imaging signals in a zigzag pattern. As a result, the amount of calculation can be reduced compared with the case of obtaining parallax using all imaging signals, so that even when a plurality of subjects with different distances are simultaneously imaged with a lower cost arithmetic circuit, By correcting the parallax of the subject, it is possible to obtain a beautiful image in which the influence of the parallax is reduced in the entire image region.

上記の本発明の撮像装置において、前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号を一行おきに間引いた信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号を一行おきに間引いた信号とを、前記ブロックのずらし量を変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値に基づき前記視差を演算することが好ましい。   In the imaging apparatus of the present invention described above, the parallax calculation unit includes a signal obtained by thinning out an imaging signal indicating an image formed by one lens unit among the plurality of lens units, and the one lens unit. A plurality of parallax evaluation values are created by comparing a signal obtained by thinning out every other row of imaging signals indicating images formed by different lens portions by changing the shift amount of the block, and a plurality of parallax evaluation values are created. It is preferable to calculate the parallax based on this.

この好ましい構成によれば、撮像信号を一行おきに間引いた信号を用いて視差を求める。これにより、全ての撮像信号を用いて視差を求めるときと比較し、演算量を減少できるため、より低コストな演算回路で、距離が異なる複数の被写体を同時に撮像するときにおいても、適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   According to this preferable configuration, the parallax is obtained using a signal obtained by thinning the imaging signal every other line. As a result, the amount of calculation can be reduced compared with the case of obtaining parallax using all imaging signals, so that even when a plurality of subjects with different distances are simultaneously imaged with a lower cost arithmetic circuit, By correcting the parallax of the subject, it is possible to obtain a beautiful image in which the influence of the parallax is reduced in the entire image region.

上記の本発明の撮像装置において、前記視差演算部は、前記複数のレンズ部のうち前記撮像素子の対角方向に並べられた2つのレンズ部の撮像信号を比較し前記視差を演算し、前記2つのレンズ部は、互いの光軸間の水平方向の距離と垂直方向の距離とが異なるものであって、前記視差演算部は、前記垂直方向の距離に対する前記水平方向の距離の比に応じて、前記撮像信号の垂直方向の画素数と水平方向の画素数とがほぼ等しくなるように、前記撮像信号を垂直方向または水平方向に伸張し、前記2つのレンズ部のうち一方のレンズ部が形成する像を示す撮像信号を伸張した信号と、前記2つのレンズ部のうち他方のレンズ部が形成する像を示す撮像信号を伸張した信号とを、前記ブロックのずらし量を45°方向に変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値に基づき前記視差を演算することが好ましい。   In the imaging apparatus of the present invention, the parallax calculation unit compares the imaging signals of two lens units arranged in a diagonal direction of the imaging element among the plurality of lens units, calculates the parallax, The two lens units have different horizontal distances and vertical distances between optical axes, and the parallax calculation unit responds to a ratio of the horizontal distance to the vertical distance. Thus, the imaging signal is expanded in the vertical direction or the horizontal direction so that the number of pixels in the vertical direction and the number of pixels in the horizontal direction of the imaging signal are substantially equal, and one of the two lens units is The shift amount of the block is changed in a 45 ° direction between a signal obtained by expanding an image pickup signal indicating an image to be formed and a signal obtained by expanding an image pickup signal indicating an image formed by the other lens portion of the two lens portions. Let me compare multiple times Rukoto by creating a plurality of parallax evaluation value, it is preferable to calculate the parallax based on the parallax evaluation value.

この好ましい構成によれば、垂直方向の距離に対する水平方向の距離の比だけ垂直方向に伸張した撮像信号を初期に作成することにより、ずらし時に補間処理が不要となる。これにより、伸張しない撮像信号を利用するときと比較し、演算量を減少できるため、より低コストな演算回路で、距離が異なる複数の被写体を同時に撮像するときにおいても、適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   According to this preferable configuration, the imaging signal expanded in the vertical direction by the ratio of the distance in the horizontal direction to the distance in the vertical direction is initially generated, so that no interpolation processing is required at the time of shifting. As a result, the amount of calculation can be reduced as compared with the case of using a non-expanded imaging signal, so that when a plurality of subjects with different distances are simultaneously imaged with a lower cost arithmetic circuit, the parallax of each subject is appropriately selected. Is corrected, and a clear image in which the influence of parallax is reduced in the entire image region can be obtained.

上記の本発明の撮像装置において、前記視差演算部は、前記複数のレンズ部のうち前記撮像素子の対角方向に並べられた2つのレンズ部の撮像信号を比較し前記視差を演算しても良い。あるいは、上記の本発明の撮像装置において、前記視差演算部は、前記複数のレンズ部のうち前記撮像素子の横方向に並べられた2つのレンズ部の撮像信号を比較し前記視差を演算しても良い。   In the above-described imaging device of the present invention, the parallax calculation unit may calculate the parallax by comparing imaging signals of two lens units arranged in a diagonal direction of the imaging element among the plurality of lens units. good. Alternatively, in the above-described imaging device of the present invention, the parallax calculation unit compares the imaging signals of two lens units arranged in the horizontal direction of the imaging element among the plurality of lens units and calculates the parallax. Also good.

以下、本発明の具体的な実施の形態について、図面を用いて説明する。   Hereinafter, specific embodiments of the present invention will be described with reference to the drawings.

(実施の形態1)
本発明の実施の形態1に係る撮像装置は、ブロックに分割し、ブロック毎に視差を画素の分解能よりも細かな分解能で演算し、この視差に基づき視差補正することにより、全画像領域できれいな画像を得る。また、概略の視差を求めた後詳細な視差を求めること、間引いた撮像信号を用いて視差を求めること、水平方向と垂直方向との比を変更すること、および結合前のブロックの視差評価値を用いて結合後の視差評価値を演算すること、により、演算時間を減少できる。
(Embodiment 1)
The imaging apparatus according to Embodiment 1 of the present invention divides the image into blocks, calculates the parallax with a resolution finer than the resolution of the pixels for each block, and corrects the parallax based on the parallax, so that the entire image area is clean. Get an image. Also, after obtaining the approximate parallax, obtaining the detailed parallax, obtaining the parallax using the thinned imaging signal, changing the ratio between the horizontal direction and the vertical direction, and the parallax evaluation value of the block before combining By calculating the combined parallax evaluation value using, the calculation time can be reduced.

本発明の実施の形態1に係る撮像装置について、図面を参照しながら説明する。   An imaging apparatus according to Embodiment 1 of the present invention will be described with reference to the drawings.

図1は、本発明の実施の形態1に係る撮像装置の構成を示す断面図である。図1において、撮像装置撮像装置は、レンズモジュール部110、および回路部120を有する。   FIG. 1 is a cross-sectional view showing a configuration of an imaging apparatus according to Embodiment 1 of the present invention. In FIG. 1, the imaging device imaging apparatus includes a lens module unit 110 and a circuit unit 120.

レンズモジュール部110は、鏡筒111、上部カバーガラス112、レンズ113、アクチュエータ固定部114、およびアクチュエータ可動部115を有する。回路部120は、基板121、パッケージ122、撮像素子123、パッケージカバーガラス124、およびシステムLSI(以下、SLSIと記す)125を有する。   The lens module unit 110 includes a lens barrel 111, an upper cover glass 112, a lens 113, an actuator 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.

鏡筒111は、円筒状であり、その内壁面は光の乱反射を防止するためにつやが消された黒色であり、樹脂を射出成形し形成される。上部カバーガラス112は、円盤状であり、透明樹脂から形成され、鏡筒111の上面に接着剤などにより固着され、その表面は摩擦などによる損傷を防止する保護膜と、入射光の反射を防止する反射防止膜とが設けられている。   The lens barrel 111 has a cylindrical shape, and an inner wall surface thereof is black which is matted to prevent irregular reflection of light, and is formed by injection molding a resin. The upper cover glass 112 has a disc 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 damage due to friction and the like, and prevents reflection of incident light. An antireflection film is provided.

図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つの像を結像する。なお、図2のように、第1のレンズ部113aの光軸と第2のレンズ部113bの光軸は、水平方向(x軸方向)はDxだけ離れており、垂直方向(y軸方向)は一致する。第2のレンズ部113bの光軸と第3のレンズ部113cの光軸は、水平方向(x軸方向)はDxだけ離れており、垂直方向(y軸方向)はDyだけ離れている。第3のレンズ部113cの光軸と第4のレンズ部113dの光軸は、水平方向(x軸方向)はDxだけ離れており、垂直方向(y軸方向)は一致する。第4のレンズ部113dの光軸と第1のレンズ部113aの光軸は、水平方向(x軸方向)はDxだけ離れており、垂直方向(y軸方向)はDyだけ離れている。また、第1のレンズ部113aは緑色を、第2のレンズ部113bは青色を、第3のレンズ部113cは赤色を、第4のレンズ部113dは緑色を透過するための最適設計がなされたものである。   FIG. 2 is a top view of the lens 113 of the imaging apparatus according to Embodiment 1 of the present invention. The lens 113 has a substantially disc shape and is formed of glass or transparent resin, and the first lens portion 113a, the second lens portion 113b, the third lens portion 113c, and the fourth lens portion 113d are in a grid shape. Placed in. As shown in FIG. 2, the X axis and the Y axis are set along the arrangement direction of the first to fourth lens portions 113a to 113d. In the first lens unit 113a, the second lens unit 113b, the third lens unit 113c, and the fourth lens unit 113d, the light incident from the subject side is emitted to the image sensor 123 side, and is on the image sensor 123. Four images are formed on the screen. As shown in FIG. 2, the optical axis of the first lens unit 113a and the optical axis of the second lens unit 113b are separated by Dx in the horizontal direction (x-axis direction), and in the vertical direction (y-axis direction). Match. The optical axis of the second lens portion 113b and the optical axis of the third lens portion 113c are separated by Dx in the horizontal direction (x-axis direction) and separated by Dy in the vertical direction (y-axis direction). The optical axis of the third lens portion 113c and the optical axis of the fourth lens portion 113d are separated from each other by Dx in the horizontal direction (x-axis direction) and coincide with each other in the vertical direction (y-axis direction). The optical axis of the fourth lens portion 113d and the optical axis of the first lens portion 113a are separated by Dx in the horizontal direction (x-axis direction) and separated by Dy in the vertical direction (y-axis direction). The first lens unit 113a is designed to transmit green, the second lens unit 113b transmits blue, the third lens unit 113c transmits red, and the fourth lens unit 113d transmits green. Is.

アクチュエータ固定部114は、鏡筒111の内壁面に接着剤などにより固着される。アクチュエータ可動部115は、レンズ113の外周縁に接着剤などにより固着される。アクチュエータ固定部114およびアクチュエータ可動部115は、ボイスコイルモータを構成する。アクチュエータ固定部114は永久磁石(図示せず)と強磁性体ヨーク(図示せず)とを有し、アクチュエータ可動部115はコイル(図示せず)を有する。アクチュエータ可動部115は、アクチュエータ固定部114に対し、弾性体(図示せず)により弾性支持される。アクチュエータ可動部115のコイルに通電することにより、アクチュエータ可動部115がアクチュエータ固定部114に対して相対的に移動し、レンズ113と撮像素子123との光軸に沿った相対距離が変化する。   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. Actuator fixing part 114 and actuator movable part 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 the elastic body (not shown) with respect to the actuator fixing portion 114. By energizing the coil of the actuator movable portion 115, 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.

基板121は、樹脂基板から構成され、上面に鏡筒111がその底面を接して接着剤などにより固着される。このようにして、レンズモジュール部110と回路部120とが固定され、撮像装置101を構成する。   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 with the bottom surface in contact therewith. In this way, the lens module unit 110 and the circuit unit 120 are fixed, and the imaging apparatus 101 is configured.

パッケージ122は、金属端子を有する樹脂からなり、鏡筒111の内側において、基板121の上面にその金属端子部が半田づけ等されて固着される。撮像素子123は、第1の撮像素子123a、第2の撮像素子123b、第3の撮像素子123c、および第4の撮像素子123dから構成される。第1の撮像素子123a、第2の撮像素子123b、第3の撮像素子123c、および第4の撮像素子123dは、それぞれCCDセンサやCMOSセンサのような固体撮像素子であり、これらの受光面の中心が、それぞれ第1のレンズ部113a、第2のレンズ部113b、第3のレンズ部113c、および第4のレンズ部113dの光軸中心と略一致するように、また各撮像素子の受光面が対応するレンズ部の光軸と略垂直になるようにして配置される。   The package 122 is made of a resin having metal terminals, and the metal terminal portion is fixed to the upper surface of the substrate 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 123d. The first imaging element 123a, the second imaging element 123b, the third imaging element 123c, and the fourth imaging element 123d are solid-state imaging elements such as a CCD sensor and a CMOS sensor, respectively. The light receiving surface of each image sensor is such that the center is substantially coincident with the optical axis center of each of the first lens portion 113a, the second lens portion 113b, the third lens portion 113c, and the fourth lens portion 113d. Are arranged so as to be substantially perpendicular to the optical axis of the corresponding lens portion.

第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に出力される。   Each terminal of the first image sensor 123a, the second image sensor 123b, the third image sensor 123c, and the fourth image sensor 123d is connected to a metal terminal at the bottom inside the package 122 with a gold wire 127 by wire bonding. Connected and electrically connected to the SLSI 125 through the substrate 121. The first lens unit 113a, the second lens unit 113b, and the third lens unit are provided on the light receiving surfaces of the first image sensor 123a, the second image sensor 123b, the third image sensor 123c, and the fourth image sensor 123d. The light emitted from the lens portion 113c and the fourth lens portion 113d forms an image, and the electrical information converted from the light information by the photodiode is output to the SLSI 125.

図3は、本発明の実施の形態1に係る撮像装置の回路部120の上面図である。パッケージカバーガラス124は、平板状であり、透明樹脂により形成され、パッケージ122の上面に接着などにより固着される。パッケージカバーガラス124の上面には、第1のカラーフィルタ124a、第2のカラーフィルタ124b、第3のカラーフィルタ124c、第4のカラーフィルタ124d、および遮光部124eが蒸着などにより配置される。また、パッケージカバーガラス124の下面には、赤外遮断フィルタ(図示せず。以下、IRフィルタと記す)が蒸着などにより配置される。   FIG. 3 is a top view of the circuit unit 120 of the imaging apparatus 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. On the upper surface of the package cover glass 124, 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 disposed by vapor deposition or the like. In addition, an infrared cut filter (not shown; hereinafter referred to as an IR filter) is disposed on the lower surface of the package cover glass 124 by vapor deposition or the like.

図4は、本発明の実施の形態1に係る撮像装置のカラーフィルタの特性図であり、図5は、本発明の実施の形態1に係る撮像装置のIRフィルタの特性図である。第1のカラーフィルタ124aは、図4のGで示した主に緑色を透過する分光透過特性を有し、第2のカラーフィルタ124bは、図4のBで示した主に青色を透過する分光透過特性を有し、第3のカラーフィルタ124cは、図4のRで示した主に赤色を透過する分光透過特性を有し、第4のカラーフィルタは、図4のGで示した主に緑色を透過する分光透過特性を有する。また、IRフィルタは、図5のIRで示した赤外光を遮断する分光透過特性を有する。   4 is a characteristic diagram of the color filter of the imaging device according to Embodiment 1 of the present invention, and FIG. 5 is a characteristic diagram of the IR filter of the imaging device 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 has a spectral transmission characteristic that mainly transmits blue as indicated by B in FIG. The third color filter 124c has a spectral transmission characteristic that mainly transmits red as indicated by R in FIG. 4, and the fourth color filter is mainly indicated by G in FIG. It has spectral transmission characteristics that transmit green. The IR filter has a spectral transmission characteristic for blocking infrared light indicated by IR in FIG.

したがって、第1のレンズ部113aの上部から入射した物体光は、第1のレンズ部113aの下部から射出され、第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は物体光のうち緑色成分を受光する。   Accordingly, the object light incident from the upper part of the first lens unit 113a is emitted from the lower part of the first lens unit 113a, and mainly green is transmitted through the first color filter 124a and the IR filter, so that the first imaging is performed. In order to form an image on the light receiving portion of the element 123a, the first imaging element 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 blue light is transmitted through the second color filter 124b and the IR filter, so that the second imaging is performed. In order to form an image on the light receiving portion of the element 123b, the second imaging element 123b receives the blue component of the object light. Further, the object light incident from the upper part of the third lens unit 113c is emitted from the lower part of the third lens unit 113c, and mainly the red color is transmitted through the third color filter 124c and the IR filter. In order to form an image on the light receiving portion of the element 123c, the third imaging element 123c receives the red component of the object light. Further, the object light incident from the upper part of the fourth lens unit 113d is emitted from the lower part of the fourth lens unit 113d, and mainly green is transmitted through the fourth color filter 124d and the IR filter, so that the fourth imaging is performed. In order to form an image on the light receiving portion of the element 123d, the fourth imaging element 123d receives the green component of the object light.

SLSI125は、後述の方法で、アクチュエータ可動部115のコイルの通電を制御し、撮像素子123を駆動し、撮像素子123からの電気情報を入力し、各種画像処理を行い、上位CPUと通信を行い、外部に画像出力する。   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 communicates with the host CPU by a method described later. Output the image to the outside.

次に、被写体距離と視差との関係を説明する。本発明の実施の形態1に係る撮像装置は、4つのレンズ部(第1のレンズ部113a、第2のレンズ部113b、第3のレンズ部113c、および第4のレンズ部113d)を有するため、4つのレンズ部がそれぞれ形成する4つの物体像の相対的位置が、被写体距離に応じて変化する。   Next, the relationship between subject distance and parallax will be described. The imaging apparatus 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). The relative positions of the four object images formed by the four lens units change according to the subject distance.

図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の撮像素子123b上の物体像11bとの距離は等しい。   FIG. 6 is a diagram for explaining the position of an object image at infinity in the imaging apparatus according to Embodiment 1 of the present invention. In FIG. 6, only 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 incident light L1 to the first lens unit 113a of the light from the object 10 at infinity is parallel to the incident light L2 to the second lens unit 113b. For this reason, the distance between the first lens unit 113a and the second lens unit 113b is equal to the distance between the object image 11a on the first image sensor 123a and the object image 11b on the second image sensor 123b.

ここで、第1のレンズ部113aの光軸、第2のレンズ部113bの光軸、第3のレンズ部113cの光軸、および第4のレンズ部113dの光軸が、それぞれ第1の撮像素子123aの受光面の中心、第2の撮像素子123bの受光面の中心、第3の撮像素子123cの受光面の中心、および第4の撮像素子123dの受光面の中心と略一致するように配置されている。従って、第1の撮像素子123a、第2の撮像素子123b、第3の撮像素子123c、および第4の撮像素子123dの各受光面の中心と、各受光面にそれぞれ結像される無限遠の物体像との相対的位置関係は、全ての撮像素子について同一である。すなわち、視差はない。   Here, 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 first imaging. The center of the light receiving surface of the element 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 are substantially matched. Has been placed. Accordingly, 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 infinite image formed on each light receiving surface, respectively. The relative positional relationship with the object image is the same for all image sensors. That is, there is no parallax.

図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の各受光面の中心と、各受光面にそれぞれ結像される有限距離の物体像との相対的位置関係は、撮像素子ごとに異なる。すなわち、視差がある。   FIG. 7 is a diagram for explaining the position of an object image at a finite distance in the imaging apparatus according to Embodiment 1 of the present invention. In FIG. 7, only 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 portion 113a and the light L2 incident on the second lens portion 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. . 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 a finite distance imaged on each light-receiving surface. The relative positional relationship with the object image differs for each image sensor. That is, there is parallax.

物体像12までの距離(被写体距離)をA、第1のレンズ部113aと第2のレンズ部113bとの距離をD、レンズ部113a,113bの焦点距離をfとすると、図7の直角を挟む2辺の長さがA、Dの直角三角形と、直角を挟む2辺の長さがf、Δの直角三角形とが相似であることより、視差Δは、下記式(1)のように表される。その他のレンズ部間についても同様の関係が成立する。このように、被写体距離に応じて4つのレンズ部113a,113b,113c,113dがそれぞれ形成する4つの物体像の相対的位置が変化する。例えば、被写体距離Aが小さくなると、視差Δが大きくなる。   If the distance to the object image 12 (subject distance) is A, the distance between the first lens portion 113a and the second lens portion 113b is D, and the focal length of the lens portions 113a and 113b is f, the right angle in FIG. Since the right triangle with two sides A and D sandwiching the right triangle and the right triangle with two sides f and Δ sandwiching the right angle are similar, the parallax Δ is expressed by the following equation (1). expressed. The same relationship is established between the other lens portions. In this way, 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.

Δ = f・D/A ・・・(1)         Δ = f · D / A (1)

次に、コントラストと焦点距離との関係を説明する。   Next, the relationship between contrast and focal length will be described.

図8(a)は、本発明の実施の形態1に係る撮像装置において、合焦時(焦点調整が合っているとき)の画像とコントラスト評価値との関係を説明する図であり、図8(b)は、本発明の実施の形態1に係る撮像装置において、非合焦時(焦点調整が合っていないとき)の画像とコントラスト評価値との関係を説明する図である。   FIG. 8A is a diagram for explaining the relationship between the image at the time of focusing (when the focus is adjusted) and the contrast evaluation value in the imaging apparatus according to Embodiment 1 of the present invention. (B) is a figure explaining the relationship between the image at the time of out-of-focus (when focus adjustment is not suitable) and a contrast evaluation value in the imaging device which concerns on Embodiment 1 of this invention.

図8(a)及び図8(b)の各左図は、左半分が白色、右半分が黒色の矩形を撮影したときの画像である。図8(a)の左図のように、合焦時は、撮影画像の輪郭がはっきりし、コントラストが大きい。一方、図8(b)の左図のように、非合焦時は、撮影画像の輪郭がぼやけ、コントラストが小さい。   Each of the left diagrams in FIGS. 8A and 8B is an image obtained by photographing a rectangle in which the left half is white and the right half is black. As shown in the left diagram of FIG. 8A, at the time of focusing, the contour of the captured image is clear and the contrast is large. On the other hand, as shown in the left diagram of FIG. 8B, when out of focus, the contour of the photographed image is blurred and the contrast is small.

図8(a)及び図8(b)の各右図は、左図の情報信号にバンドパスフィルタ(BPF)を作用させたときの結果を示している。横軸はX軸方向位置であり、縦軸はBPF後の出力値である。図8(a)の右図のように、合焦時は、BPF後の信号振幅が大きく、図8(b)の右図のように、非合焦時はBPF後の信号振幅が小さい。ここで、このBPF後の信号振幅をどれだけコントラストが大きいかを示すコントラスト評価値と定義する。すると、図8(a)の右図のように、合焦時はコントラスト評価値が大きく、図8(b)の右図のように、非合焦時はコントラスト評価値が小さい。   Each of the right diagrams in FIGS. 8A and 8B shows the results when a band-pass filter (BPF) is applied to the information signal in the left diagram. The horizontal axis is the position in the X-axis direction, and the vertical axis is the output value after BPF. 8A, the signal amplitude after BPF is large at the time of focusing, and the signal amplitude after BPF is small at the time of out-of-focusing, as shown in the right diagram of FIG. 8B. Here, the signal amplitude after the BPF is defined as a contrast evaluation value indicating how large the contrast is. Then, as shown in the right diagram of FIG. 8A, the contrast evaluation value is large when focused, and as shown in the right diagram of FIG. 8B, the contrast evaluation value is small when out of focus.

図9は、本発明の実施の形態1に係る撮像装置のレンズ位置とコントラスト評価値との関係を説明する図である。ある物体を撮影するとき、レンズ113と撮像素子123との距離が小さいとき(z1のとき)、非合焦であるためコントラスト評価値が小さい。レンズ113と撮像素子123との距離を徐々に大きくすると、コントラスト評価値が徐々に大きくなり、合焦時(z2のとき)はコントラスト評価値が極大となる。さらに、レンズ113と撮像素子123との距離を徐々に大きくすると(z3のとき)、非合焦となり、コントラスト評価値が小さくなる。このように、合焦時において、コントラスト評価値は極大となる。   FIG. 9 is a diagram illustrating the relationship between the lens position and the contrast evaluation value of the imaging apparatus according to Embodiment 1 of the present invention. When photographing a certain object, when the distance between the lens 113 and the image sensor 123 is small (when z1), the contrast evaluation value is small because of out-of-focus. When the distance between the lens 113 and the image sensor 123 is gradually increased, the contrast evaluation value is gradually increased, and the contrast evaluation value is maximized at the time of focusing (when z2). Furthermore, when the distance between the lens 113 and the image sensor 123 is gradually increased (when z3), the lens becomes out of focus and the contrast evaluation value decreases. Thus, at the time of focusing, the contrast evaluation value is maximized.

次に、本発明の実施の形態1に係る撮像装置の動作を説明する。図10は、本発明の実施の形態1に係る撮像装置のブロック図である。SLSI125は、システム制御部131、撮像素子駆動部132、撮像信号入力部133、アクチュエータ操作量出力部134、画像処理部135、および入出力部136を有する。また、回路部120は、前述の構成に加えて、アンプ126を有する。   Next, the operation of the imaging apparatus according to Embodiment 1 of the present invention will be described. FIG. 10 is a block diagram of the imaging apparatus 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. Further, the circuit unit 120 includes an amplifier 126 in addition to the above-described configuration.

アンプ126は、アクチュエータ操作量出力部134からの出力に応じた電圧をアクチュエータ可動部115のコイルに印加する。   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.

システム制御部131は、CPU(中央演算処理装置:Central Processing Unit)、メモリなどから構成され、SLSI125の全体を制御する。撮像素子駆動部132は、ロジック回路などから構成され、撮像素子123を駆動する信号を発生し、この信号に応じた電圧を撮像素子123に印加する。   The system control unit 131 includes a CPU (Central Processing Unit), a memory, and the like, and controls the entire SLSI 125. The image sensor driving unit 132 includes a logic circuit and the like, generates a signal for driving the image sensor 123, and applies a voltage corresponding to the signal to the image sensor 123.

撮像信号入力部133は、第1の撮像信号入力部133a、第2の撮像信号入力部133b、第3の撮像信号入力部133c、および第4の撮像信号入力部133dから構成される。第1の撮像信号入力部133a、第2の撮像信号入力部133b、第3の撮像信号入力部133c、および第4の撮像信号入力部133dは、それぞれCDS回路(相関二重サンプリング回路:Correlated Double Sampling Circuit)、AGC(自動利得制御器:Automatic Gain Controller)、ADC(アナログ/ディジタル変換器:Analog Digital Converter)が直列に接続されて構成され、それぞれ第1の撮像素子123a、第2の撮像素子123b、第3の撮像素子123c、および第4の撮像素子123dに接続され、これらからの電気信号が入力され、CDS回路により固定ノイズを除去し、AGCによりゲインを調整し、ADCによりアナログ信号からディジタル値に変換し、システム制御部131のメモリに書き込む。   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 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 each a CDS circuit (correlated double sampling circuit: Correlated Double sampling circuit). Sampling Circuit), AGC (Automatic Gain Controller), ADC (Analog / Digital Converter) are connected in series. The first image sensor 123a and the second image sensor, respectively. 123b, the third image sensor 123c, and the fourth image sensor 123d are connected, and electric signals from these are input, the fixed noise is removed by the CDS circuit, the gain is adjusted by the AGC, and the analog signal is obtained by the ADC. It is converted into a digital value and written in the memory of the system control unit 131.

アクチュエータ操作量出力部134は、DAC(デジタルディジタル/アナログ変換器:Digital Analog Converter)から構成され、アクチュエータ可動部115のコイルに印加すべき電圧に応じた電圧信号を出力する。   The actuator operation amount output unit 134 includes a DAC (Digital Analog Converter) and outputs a voltage signal corresponding to a voltage to be applied to the coil of the actuator movable unit 115.

画像処理部135は、ロジック回路、またはDSP、あるいはこれらの両者を含んで構成され、システム制御部131のメモリ情報を利用し、所定のプログラム制御に従って各種画像処理を行う。画像処理部135は、自動焦点制御部141、画像伸張部142、ブロック分割部143、視差演算部144、視差補正部145、および距離演算部146を有する。   The image processing unit 135 includes 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 automatic focus control unit 141, an image expansion unit 142, a block division unit 143, a parallax calculation unit 144, a parallax correction unit 145, and a distance calculation unit 146.

入出力部136は、上位CPU(図示せず)との通信や、上位CPU、外部メモリ(図示せず)、および液晶ディスプレイなどの外部表示装置(図示せず)へ画像信号を出力する。   The input / output unit 136 communicates with an upper CPU (not shown), and outputs an image signal to an upper display, an external memory (not shown), and an external display device (not shown) such as a liquid crystal display.

図11は、本発明の実施の形態1に係る撮像装置の動作を示すフローチャートである。SLSI125のシステム制御部131により、撮像装置101は、このフローチャートのとおりに動作される。   FIG. 11 is a flowchart showing the operation of the imaging apparatus according to Embodiment 1 of the present invention. The imaging apparatus 101 is operated according to this flowchart by the system control unit 131 of the SLSI 125.

ステップS1000において、動作を開始する。例えば、上位CPU(図示せず)が、シャッターボタンなどが押されたことを検知し、入出力部136を介し、撮像装置に動作の開始を命令することにより、撮像装置101は、動作を開始する。次に、ステップS1100を実行する。   In step S1000, the operation is started. For example, the host CPU (not shown) detects that a shutter button or the like has been pressed, and instructs the imaging device to start the operation via the input / output unit 136, whereby the imaging device 101 starts the operation. To do. Next, step S1100 is executed.

ステップS1100において、自動焦点制御部141は、自動焦点制御を実行する。図12は、本発明の実施の形態1に係る自動焦点制御の動作を示すフローチャートである。図12のフローチャートは、ステップS1100の動作の詳細を示す。   In step S1100, the automatic focus control unit 141 executes automatic focus control. FIG. 12 is a flowchart showing the operation of automatic focus control according to Embodiment 1 of the present invention. The flowchart in FIG. 12 shows details of the operation in step S1100.

ステップS1100の自動焦点制御では、まず、ステップS1121を実行する。   In the automatic focus control in step S1100, first, step S1121 is executed.

ステップS1121において、カウンタiを0に初期化する。次に、ステップS1122を実行する。   In step S1121, the counter i is initialized to 0. Next, step S1122 is executed.

ステップS1122において、アクチュエータの位置指令を演算する。下記式(2)のように、カウンタiを用いてアクチュエータの位置指令Xactを演算する。なお、位置指令Xactは、無限遠像の合焦位置を基準とし、被写体に向かう向きが正である位置の指令を示す。ここで、kxは、設定された値である。次に、ステップS1123を実行する。   In step S1122, an actuator position command is calculated. As shown in the following equation (2), the actuator position command Xact is calculated using the counter i. 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. Here, kx is a set value. Next, step S1123 is executed.

Xact = kx・i ・・・(2)     Xact = kx · i (2)

ステップS1123において、下記式(3)で示した操作量関数を用いてアクチュエータ操作量(アクチュエータ可動部115のコイルへの印加電圧)Vactを演算する。ここで、ka、およびkbは、それぞれ設定された値である。次に、ステップS1124を実行する。   In step S1123, an actuator operation amount (applied voltage to the coil of the actuator movable portion 115) Vact is calculated using the operation amount function expressed by the following equation (3). Here, ka and kb are respectively set values. Next, step S1124 is executed.

Vact = ka・Xact + kb ・・・(3)     Vact = ka · Xact + kb (3)

ステップS1124において、アクチュエータを動作させる。アクチュエータ操作量出力部134は、アンプ126を介したのちアクチュエータ可動部115のコイル(図示せず)に印加される電圧がVactになるように、出力する電圧信号を変更する。次に、ステップS1125を実行する。   In step S1124, the actuator is operated. The actuator operation amount output unit 134 changes the voltage signal to be output so that the voltage applied to the coil (not shown) of the actuator movable unit 115 via the amplifier 126 becomes Vact. Next, step S1125 is executed.

ステップS1125において、撮影を実行する。システム制御部131の命令により、撮像素子駆動部132が電子シャッターや転送を行うための信号を随時出力する。第1の撮像信号入力部133a、第2の撮像信号入力部133b、第3の撮像信号入力部133c、および第4の撮像信号入力部133dは、撮像素子駆動部132が発生する信号に同期して、第1の撮像素子123a、第2の撮像素子123b、第3の撮像素子123c、および第4の撮像素子123dが出力する各画像のアナログ信号である撮像信号を入力し、CDSにより固定ノイズを除去し、AGCにより自動的に入力ゲインを調整し、ADCによりアナログ信号をディジタル値に変換し、第1の撮像信号I1(x,y)、第2の撮像信号I2(x,y)、第3の撮像信号I3(x,y)、および第4の撮像信号I4(x,y)として、システム制御部131の所定アドレスのメモリにディジタル値を書き込む。図13は、本発明の実施の形態1に係る撮像装置の撮像信号の座標を説明する図である。I1(x,y)は、水平方向にx番目、垂直方向にy番目の第1の撮像信号であることを示す。入力される画像の縦方向の画素数がH、横方向の画素数がLであり、総画素数はH×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の撮像信号であることを示す。次に、ステップS1126を実行する。   In step S1125, shooting is performed. In response to a command from the system control unit 131, 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. Then, an image pickup signal that is an analog signal of each image output from the first image pickup element 123a, the second image pickup element 123b, the third image pickup element 123c, and the fourth image pickup element 123d is input, and fixed noise is generated by the CDS. , The AGC automatically adjusts the input gain, the ADC converts the analog signal into a digital value, the first imaging signal I1 (x, y), the second imaging signal I2 (x, y), As the third imaging signal I3 (x, y) and the fourth imaging signal I4 (x, y), digital values are written in a memory at a predetermined address of the system control unit 131. FIG. 13 is a diagram for explaining the coordinates of the imaging signal of the imaging apparatus according to Embodiment 1 of the present invention. I1 (x, y) indicates that the first imaging signal is the xth image in the horizontal direction and the yth image signal 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 H × L, x varies from 0 to L−1, and y varies from 0 to H−. It changes to 1. 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 x-th second imaging signal in the horizontal direction and the y-th second imaging signal in the vertical direction, the third imaging signal, And the fourth imaging signal. Next, step S1126 is executed.

ステップS1126において、自動焦点制御用ブロックを設定する。画像領域の中心付近の矩形状の領域を自動焦点制御用ブロックとする。なお、このブロックは必ずしも中央付近である必要はなく、カメラを操作するユーザの意思などを反映し(例えば、センサで視点方向を検出し)、ブロックを設定してもよい。なお、単一のブロックではなく複数のブロックを選択し、複数のブロックにおいて後述の自動焦点制御用コントラスト評価値の平均を用いてもよい。また、複数のブロックにおいて後述の自動焦点制御用コントラスト評価値を演算し、後に少なくとも1つのブロックを自動焦点制御用ブロックとして選択してもよい。次に、ステップS1127を実行する。   In step S1126, an automatic focus control block is set. A rectangular area near the center of the image area is defined as an autofocus control block. Note that this block does not necessarily have to be in the vicinity of the center, and the block may be set by reflecting the intention of the user who operates the camera (for example, the viewpoint direction is detected by a sensor). Note that 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. Further, a contrast evaluation value for automatic focus control, which will be 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. Next, step S1127 is executed.

ステップS1127において、システム制御部131のメモリ上のデータを用いて、自動焦点制御用コントラスト評価値を作成する。この演算は、第1の撮像信号I1の自動焦点制御用ブロックの画素について行う。下記式(4)のように、x方向とy方向の2階微分の和であるラプラシアンの絶対値を演算し、下記式(5)のように空間的にLPF(ローパスフィルタ。Low Pass Filter)を作用させ、これを下記式(6)のように自動焦点制御用ブロック内で平均して自動焦点用コントラスト評価値C3を得る。ここで、Nafは、自動焦点制御用ブロックの画素数である。次に、ステップS1128を実行する。   In step S1127, a contrast evaluation value for automatic focus control is created using data on the memory of the system control unit 131. This calculation is performed for the pixels of the automatic focus control block of the first imaging signal I1. The absolute value of the Laplacian that is the sum of the second derivative in the x direction and the y direction is calculated as in the following equation (4), and spatially LPF (low pass filter) as in the following equation (5). Then, this is averaged in the autofocus control block as shown in the following formula (6) to obtain the autofocus contrast evaluation value C3. Here, Naf is the number of pixels of the automatic focus control block. Next, step S1128 is executed.

C1(x,y) = |I1(x-1,y) + I1(x+1,y) + I1(x,y-1) + I1(x,y+1) - 4I1(x,y)|
・・・(4)
C1 (x, y) = | I1 (x-1, y) + I1 (x + 1, y) + I1 (x, y-1) + I1 (x, y + 1)-4I1 (x, y) |
... (4)

C2(x,y) = C1(x-1,y-1) + C1(x,y-1) + C1(x+1,y-1)
+ C1(x-1,y) + C1(x,y) + C1(x+1,y)
+ C1(x-1,y+1) + C1(x,y+1) + C1(x+1,y+1) ・・・(5)
C2 (x, y) = C1 (x-1, y-1) + C1 (x, y-1) + C1 (x + 1, y-1)
+ C1 (x-1, y) + C1 (x, y) + C1 (x + 1, y)
+ C1 (x-1, y + 1) + C1 (x, y + 1) + C1 (x + 1, y + 1) (5)

C3 = ΣC2(x,y)/Naf ・・・(6)     C3 = ΣC2 (x, y) / Naf (6)

ステップS1128において、下記式(7)のように、コントラスト評価値C3をC3(i)として、システム制御部131のメモリに書き込む。次に、ステップS1129を実行する。   In step S1128, the contrast evaluation value C3 is written as C3 (i) in the memory of the system control unit 131 as shown in the following equation (7). Next, step S1129 is executed.

C3(i) = C3 ・・・(7)     C3 (i) = C3 (7)

ステップS1129において、下記式(8)のように、カウンタiに1を加える。次に、ステップS1130を実行する。   In step S1129, 1 is added to the counter i as shown in the following equation (8). Next, step S1130 is executed.

i = i+1 ・・・(8)   i = i + 1 (8)

ステップS1130において、カウンタiをしきい値Safと比較し、その結果により分岐する。カウンタiがしきい値Safより小さいとき(ステップS1130の比較結果がY)、次に、ステップ1122を実行する。一方、カウンタiがしきい値Saf以上のとき(ステップS1130の比較結果がN)、次に、ステップS1140を実行する。このように、ステップS1121においてカウンタiを0に初期化し、ステップS1129においてカウンタiに1を加え、ステップS1130においてカウンタiで分岐を行うことにより、S1122からS1128までの処理をSaf回だけ繰り返す。   In step S1130, the counter i is compared with the threshold value Saf, and the result is branched. When the counter i is smaller than the threshold value Saf (the comparison result in step S1130 is Y), next, step 1122 is executed. On the other hand, when the counter i is equal to or greater than the threshold value Saf (the comparison result in step S1130 is N), next, step S1140 is executed. In this way, the counter i is initialized to 0 in step S1121, 1 is added to the counter i in step S1129, and branching is performed by the counter i in step S1130, so that the processing from S1122 to S1128 is repeated Saf times.

ステップS1140において、コントラスト評価値C3の評価を行う。図9のように、合焦位置では、コントラスト評価値C3が最大となる。下記式(9)のように、この最大値を与えるカウンタ値iを、コントラスト最大値を与えるカウンタ値iafとする。次に、ステップS1151を実行する。   In step S1140, 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 (9), the counter value i that gives the maximum value is set as a counter value iaf that gives the maximum contrast value. Next, step S1151 is executed.

iaf = C3の最大値を与えるi ・・・(9)   iaf = i giving the maximum value of C3 (9)

ステップS1151において、アクチュエータの位置指令を演算する。下記式(10)のように、コントラスト最大値を与えるカウンタ値iafを用いてアクチュエータの位置指令Xactを演算する。なお、位置指令Xactは、無限遠像の合焦位置を基準とし、被写体に向かう向きが正の位置の指令を示す。次に、ステップS1152を実行する。   In step S1151, an actuator position command is calculated. As shown in the following equation (10), the actuator position command Xact is calculated using the counter value iaf that gives the maximum contrast value. The position command Xact indicates a command in which the direction toward the subject is a positive position with reference to the focus position of the infinity image. Next, step S1152 is executed.

Xact = kx・iaf ・・・(10)     Xact = kx · iaf (10)

ステップS1152において、操作量関数を用いてアクチュエータ操作量(アクチュエータ可動部115のコイルへの印加電圧)Vactを演算する。この動作は、ステップS1123と同様であり、説明を省略する。次に、ステップS1153を実行する。   In step S1152, an actuator operation amount (voltage applied to the coil of the actuator movable portion 115) Vact is calculated using an operation amount function. This operation is the same as that in step S1123, and a description thereof will be omitted. Next, step S1153 is executed.

ステップS1153において、アクチュエータを動作させる。この動作は、ステップS1124と同様であり、説明を省略する。次に、ステップS1160を実行する。   In step S1153, the actuator is operated. This operation is the same as that in step S1124, and a description thereof will be omitted. Next, step S1160 is executed.

ステップS1160において、自動焦点制御を終了し、メインルーチンへ戻る。従って、次に、図11のステップS1200を実行する。   In step S1160, the automatic focus control is terminated and the process returns to the main routine. Therefore, step S1200 in FIG. 11 is executed next.

ステップS1200において、視差補正を実行する。図14は、本発明の実施の形態1に係る視差補正の動作を示すフローチャートである。図14のフローチャートは、ステップS1200の動作の詳細を示す。ステップS1200の視差補正では、まず、ステップS1210を実行する。   In step S1200, parallax correction is performed. FIG. 14 is a flowchart showing the parallax correction operation according to Embodiment 1 of the present invention. The flowchart in FIG. 14 shows details of the operation in step S1200. In the parallax correction in step S1200, first, step S1210 is executed.

ステップS1210において、撮影を実行する。システム制御部131の命令により、撮像素子駆動部132が電子シャッターや転送を行うための信号を随時出力する。第1の撮像信号入力部133a、第2の撮像信号入力部133b、第3の撮像信号入力部133c、および第4の撮像信号入力部133dは、撮像素子駆動部132が発生する信号に同期して、第1の撮像素子123a、第2の撮像素子123b、第3の撮像素子123c、および第4の撮像素子123dが出力する各画像のアナログ信号である撮像信号を入力し、CDSにより固定ノイズを除去し、AGCにより自動的に入力ゲインを調整し、ADCによりアナログ信号をディジタル値に変換し、第1の撮像信号I1(x,y)、第2の撮像信号I2(x,y)、第3の撮像信号I3(x,y)、および第4の撮像信号I4(x,y)として、システム制御部131の所定アドレスのメモリにディジタル値を書き込む。次に、ステップS1220を実行する。   In step S1210, shooting is performed. In response to a command from the system control unit 131, 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. Then, an image pickup signal that is an analog signal of each image output from the first image pickup element 123a, the second image pickup element 123b, the third image pickup element 123c, and the fourth image pickup element 123d is input, and fixed noise is generated by the CDS. , The AGC automatically adjusts the input gain, the ADC converts the analog signal into a digital value, the first imaging signal I1 (x, y), the second imaging signal I2 (x, y), As the third imaging signal I3 (x, y) and the fourth imaging signal I4 (x, y), digital values are written in a memory at a predetermined address of the system control unit 131. Next, step S1220 is executed.

ステップS1220において、画像伸張部142は、システム制御部131のメモリ上のデータを利用し、画像伸張を行う。そして、その結果をシステム制御部131のメモリに書き込む。図15は、本発明の実施の形態1に係る撮像装置において、画像伸張を説明する図である。後述の視差評価値の演算に用いるのは第1の撮像信号I1、および第4の撮像信号I4のみであるため、この画像伸張の処理は、第1の撮像信号I1、および第4の撮像信号I4についてのみ行い、それぞれ第1の伸張後撮像信号I1s、第4の伸張後撮像信号I4sを作成する。具体的には、下記式(11)(12)に示すようにy座標を変換する。なお、一般にDx/Dy・yは整数とならないため、適宜補間処理を行う。例えば、下記式(13)(14)(15)(16)のような、線形補間処理を行う。ここで、補間方法は線形補間に限定されず、高次の補間を用いてもよい。この処理を行うことにより、図15のように、垂直方向の画素数がDx/Dy倍され、第1の伸張後撮像信号I1s、および第4の伸張後撮像信号I4sの垂直方向の画素数はH・Dx/Dyとなる。次に、ステップS1230を実行する。   In step S1220, the image expansion unit 142 performs image expansion using data on the memory of the system control unit 131. Then, the result is written in the memory of the system control unit 131. FIG. 15 is a diagram for explaining image expansion in the imaging apparatus according to Embodiment 1 of the present invention. Since only the first imaging signal I1 and the fourth imaging signal I4 are used for the calculation of the parallax evaluation value, which will be described later, this image expansion processing is performed by the first imaging signal I1 and the fourth imaging signal. Only for I4, the first post-expansion imaging signal I1s and the fourth post-expansion imaging signal I4s are created. Specifically, the y coordinate is converted as shown in the following formulas (11) and (12). In general, since Dx / Dy · y is not an integer, interpolation processing is performed as appropriate. For example, linear interpolation processing such as the following formulas (13), (14), (15), and (16) is performed. Here, the interpolation method is not limited to linear interpolation, and higher-order interpolation may be used. By performing this processing, the number of pixels in the vertical direction is multiplied by Dx / Dy as shown in FIG. 15, and the number of pixels in the vertical direction of the first post-expansion imaging signal I1s and the fourth post-expansion imaging signal I4s is H · Dx / Dy. Next, step S1230 is executed.

I1s(x,y) = I1(x,Dx/Dy・y) ・・・(11)
I4s(x,y) = I4s(x,Dx/Dy・y) ・・・(12)
I1s (x, y) = I1 (x, Dx / Dy · y) (11)
I4s (x, y) = I4s (x, Dx / Dy · y) (12)

yi = 整数部分(Dx/Dy・y) ・・・(13)
yf = 小数部分(Dx/Dy・y) ・・・(14)
I1s(x,y) = (1-yf)・I1(x,yi) + yf・I1(x,yi+1) ・・・(15)
I4s(x,y) = (1-yf)・I4(x,yi) + yf・I4(x,yi+1) ・・・(16)
yi = integer part (Dx / Dy · y) (13)
yf = Decimal part (Dx / Dy · y) (14)
I1s (x, y) = (1-yf) · I1 (x, yi) + yf · I1 (x, yi + 1) (15)
I4s (x, y) = (1-yf) · I4 (x, yi) + yf · I4 (x, yi + 1) (16)

ステップS1230において、ブロック分割部143は、システム制御部131のメモリ上のデータを利用し、ブロック分割を行う。そして、その結果をシステム制御部131のメモリに書き込む。図16は、本発明の実施の形態1に係る撮像装置において、ブロック分割を説明する図である。図16のように、第1の伸張後撮像信号I1sを、横方向にM個のブロックに、縦方向にN個のブロックに、総数でM×N個に分割し、それぞれのブロックをB(u,v)で示す。ここで、uは0からM−1まで、vはN−1まで変化する。次に、ステップS1240を実行する。   In step S1230, the block dividing unit 143 performs block division using data on the memory of the system control unit 131. Then, the result is written in the memory of the system control unit 131. FIG. 16 is a diagram for explaining block division in the imaging apparatus according to Embodiment 1 of the present invention. As shown in FIG. 16, the first post-expansion imaging signal I1s is divided into M blocks in the horizontal direction, N blocks in the vertical direction, and M × N in total, and each block is divided into B ( u, v). Here, u changes from 0 to M-1, and v changes from N-1. Next, step S1240 is executed.

ステップS1240において、視差演算部144は、システム制御部131のメモリ上のデータを利用し、各ブロック毎の視差値を演算する。そして、システム制御部131のメモリに書き込む。図17は、本発明の実施の形態1に係る視差演算の動作を示すフローチャートである。図17のフローチャートは、ステップS1240の動作の詳細を示す。ステップS1240の視差演算では、まず、ステップS1241を実行する。   In step S1240, the parallax calculation unit 144 uses the data on the memory of the system control unit 131 to calculate the parallax value for each block. Then, the data is written in the memory of the system control unit 131. FIG. 17 is a flowchart showing an operation of parallax calculation according to Embodiment 1 of the present invention. The flowchart in FIG. 17 shows details of the operation in step S1240. In the parallax calculation in step S1240, first, step S1241 is executed.

ステップS1241において、概略の視差を演算する。まず、各ブロック(B(0,0)、B(1,0)、…、B(u,v)、…、B(M-1,N-1))毎に、視差評価値(R(0,0)(k)、R(1,0)(k)、…、R(u,v)(k)、…、R(M-1,N-1)(k))を演算する。ここで、kは画像をどれだけずらすかを示すずらし量であり、k=1、3、5、…、kmax(kmaxは奇数)のように変化させる。このように、ずらし量kは奇数のみを取るように変化させる。すなわち、kが1つ置きの値を取るように変化させる。図18は、本発明の実施の形態1に係る撮像装置において、視差評価値の演算領域を説明する図である。図18(b)のように、B(u,v)で示される(I1sとしても示されている)領域は、第1の伸張後撮像信号I1sからステップS1230で求められたx方向にu番目、y方向にv番目のブロックである。   In step S1241, approximate parallax is calculated. First, for each block (B (0,0), B (1,0),..., B (u, v),..., B (M-1, N-1)), the parallax evaluation value (R ( (0,0) (k), R (1,0) (k), ..., R (u, v) (k), ..., R (M-1, N-1) (k)). Here, k is a shift amount indicating how much the image is shifted, and is changed as k = 1, 3, 5,..., Kmax (kmax is an odd number). In this way, the shift amount k is changed so as to take only odd numbers. That is, k is changed so as to take every other value. FIG. 18 is a diagram for explaining the calculation area of the parallax evaluation value in the imaging apparatus according to Embodiment 1 of the present invention. As shown in FIG. 18B, the region indicated by B (u, v) (also indicated as I1s) is the u-th in the x direction obtained from the first post-expansion imaging signal I1s in step S1230. , The vth block in the y direction.

I4sで示される領域は、B(u,v)からx方向にずらし量kだけ、y方向にずらし量kだけ移動、すなわち45°の方向に移動した領域である。そして、それぞれの領域の全伸張後撮像信号I1s(x,y)、I4s(x-k,y-k)について、下記式(17)に示される絶対値差分総和(SAD。Sum of Absolute Differences)を演算し、視差評価値R(u,v)(k)とする。ただし、式(17)において総和演算は画素を千鳥状に間引いて行う。すなわち、図18(b)において、黒塗りされた画素のみを総和演算に利用する。なお、第1の撮像信号I1、および第4の撮像信号I4を伸張した第1の伸張後撮像信号I1s、および第4の伸張後撮像信号I4sにより視差評価値R(u,v)(k)を求めるため、視差の方向は45°であり、移動方向が45°である。仮に、伸張前の第1の撮像信号I1、および第4の撮像信号I4から視差評価値Riを求める場合は、図18(a)のように、x方向にずらし量k、y方向にk・Dy/Dxだけ移動するため、下記式(18)のように、第4の撮像信号I4のy座標が整数になるとは限らない。従って、一般に補間処理が必要となる。そのため、伸張前の第1の撮像信号I1、および第4の撮像信号I4から視差評価値Riを求める場合、演算量が多い。   The region indicated by I4s is a region moved from B (u, v) by the shift amount k in the x direction and by the shift amount k in the y direction, that is, moved by 45 °. Then, with respect to the image signals I1s (x, y) and I4s (xk, yk) after full expansion of each region, the absolute value difference sum (SAD: Sum of Absolute Differences) shown in the following equation (17) is calculated, The parallax evaluation value R (u, v) (k). However, in equation (17), the sum operation is performed by thinning out pixels in a zigzag pattern. That is, in FIG. 18B, only the blacked pixels are used for the sum calculation. It should be noted that the parallax evaluation value R (u, v) (k) is determined by the first post-expansion image signal I1s and the fourth post-expansion image signal I4s obtained by expanding the first image pickup signal I1 and the fourth image pickup signal I4. Therefore, the parallax direction is 45 ° and the moving direction is 45 °. If the parallax evaluation value Ri is obtained from the first image pickup signal I1 and the fourth image pickup signal I4 before expansion, as shown in FIG. 18A, the shift amount k in the x direction and k · Since it moves only by Dy / Dx, the y coordinate of the fourth imaging signal I4 is not always an integer as shown in the following equation (18). Therefore, an interpolation process is generally required. Therefore, when calculating the parallax evaluation value Ri from the first imaging signal I1 and the fourth imaging signal I4 before expansion, the amount of calculation is large.

R(u,v)(k) = ΣΣ|I1s(x,y)-I4s(x-k,y-k)| ・・・(17)
R(u,v)(k) = ΣΣ|I1(x,y)-I4(x-k,y-k・Dy/Dx)| ・・・(18)
R (u, v) (k) = ΣΣ | I1s (x, y) −I4s (xk, yk) | (17)
R (u, v) (k) = ΣΣ | I1 (x, y) −I4 (xk, yk · Dy / Dx) | (18)

この視差評価値R(u,v)(k)は、x方向にu番目、y方向にv番目のブロックB(u,v)の第1の伸張後画像信号I1sと、x、y方向にそれぞれ(k、k)だけ離れた領域における第4の伸張後画像信号I4sがどれだけ相関があるかを示し、値が小さいほど相関が大きい(よく似ている)ことを示す。図19は、本発明の実施の形態1に係る撮像装置の概略の視差と視差評価値との関係を説明する図である。図19のように、視差評価値R(u,v)(k)はずらし量kの値によって変化し、ずらし量k=Δg(u,v)のとき極小値を持つ。これは、第4の伸張後画像信号I4sのx方向にu番目、y方向にv番目のブロックB(u,v)をx、y方向にそれぞれ(-Δg(u,v)、-Δg(u,v))だけ移動させて得られる画像信号は、第1の伸張後画像信号I1sと最も相関がある(最も似ている)ことを示す。したがって、ブロックB(u,v)についての第1の伸張後撮像信号I1sと第4の撮像信号I4sとのx、y方向の視差が(Δg(u,v)、Δg(u,v))であることが分かる。以下、このΔg(u,v)を、ブロックB(u,v)の概略の視差値Δg(u,v)と呼ぶ。このように、u=0からM−1、v=0からN−1までB(u,v)の概略の視差値Δg(u,v)を求める。次に、ステップS1242を実行する。   The parallax evaluation value R (u, v) (k) is the first decompressed image signal I1s of the u-th block in the x direction and the v-th block B (u, v) in the y direction, and the x and y directions. It indicates how much the fourth decompressed image signal I4s in the region separated by (k, k) has a correlation, and indicates that the smaller the value, the larger (similar) the correlation. FIG. 19 is a diagram for explaining the relationship between the schematic parallax and the parallax evaluation value of the imaging apparatus according to Embodiment 1 of the present invention. As shown in FIG. 19, the parallax evaluation value R (u, v) (k) varies depending on the value of the shift amount k, and has a minimum value when the shift amount k = Δg (u, v). This means that the u-th block in the x direction and the v-th block B (u, v) in the y direction of the fourth decompressed image signal I4s are (−Δg (u, v), −Δg ( The image signal obtained by moving only u, v)) is most correlated (similar) with the first decompressed image signal I1s. Therefore, the parallaxes in the x and y directions between the first post-expansion imaging signal I1s and the fourth imaging signal I4s for the block B (u, v) are (Δg (u, v), Δg (u, v)). It turns out that it is. Hereinafter, this Δg (u, v) is referred to as an approximate parallax value Δg (u, v) of the block B (u, v). In this way, the approximate parallax value Δg (u, v) of B (u, v) is obtained from u = 0 to M−1 and v = 0 to N−1. Next, step S1242 is executed.

ステップS1242において、詳細な視差を演算する。ステップS1241ではずらし量kは奇数のみであったため、分解能は2である。ステップS1242において、分解能1の視差を演算する。図20は、本発明の実施の形態1に係る撮像装置の詳細な視差と視差評価値との関係を説明する図である。ステップ1241では、図20の黒丸(●)に示されるように、ブロックB(u,v)においてkを2ずつ変化させ、視差評価値R(u,v)(k)の極小値を与えるk(概略の視差Δg(u,v))を求めた。ステップS1242において、図20の白丸(○)に示されるように、概略の視差Δg(u,v)の前後のkでの視差評価値R(u,v)(Δg(u,v)-1)、R(u,v)(Δg(u,v)+1)を演算し、これらの視差評価値(R(u,v)(Δg(u,v)-1)、R(u,v)(Δg(u,v))、R(u,v)(Δg(u,v)+1))のうち最小値を与えるずらし量kを詳細な視差Δs(u,v)とする。すなわち、図20(a)、下記式(19)のように、R(u,v)(Δg(u,v)-1)が最小のとき、概略の視差Δg(u,v)から1引いたものを詳細な視差Δs(u,v)とする。また、図20(b)、下記式(20)のように、R(u,v)(Δg(u,v))が最小のとき、概略の視差Δg(u,v)を詳細な視差Δs(u,v)とする。また、図20(c)、下記式(21)のように、R(u,v)(Δg(u,v)+1)が最小のとき、概略の視差Δg(u,v)に1を加えたものを詳細な視差Δs(u,v)とする。概略の視差Δg(u,v)の分解能は2であったが、上記の動作により分解能が1である詳細な視差Δs(u,v)を求められる。次に、ステップS1243を実行する。   In step S1242, a detailed parallax is calculated. In step S1241, since the shift amount k is only an odd number, the resolution is 2. In step S1242, the parallax with resolution 1 is calculated. FIG. 20 is a diagram for explaining the relationship between the detailed parallax and the parallax evaluation value of the imaging apparatus according to Embodiment 1 of the present invention. In step 1241, as indicated by a black circle (●) in FIG. 20, k is changed by 2 in the block B (u, v) to give the minimum value of the parallax evaluation value R (u, v) (k). (Approximate parallax Δg (u, v)) was obtained. In step S1242, the parallax evaluation value R (u, v) (Δg (u, v) −1 at k before and after the approximate parallax Δg (u, v), as indicated by the white circle (◯) in FIG. ), R (u, v) (Δg (u, v) +1), and these parallax evaluation values (R (u, v) (Δg (u, v) -1), R (u, v) ) (Δg (u, v)), R (u, v) (Δg (u, v) +1)), the shift amount k that gives the minimum value is the detailed parallax Δs (u, v). That is, when R (u, v) (Δg (u, v) -1) is minimum as shown in FIG. 20A and the following equation (19), 1 is subtracted from the approximate parallax Δg (u, v). This is defined as a detailed parallax Δs (u, v). Further, as shown in FIG. 20B and the following equation (20), when R (u, v) (Δg (u, v)) is minimum, the approximate parallax Δg (u, v) is changed to the detailed parallax Δs. (u, v). Further, as shown in FIG. 20C and the following equation (21), when R (u, v) (Δg (u, v) +1) is minimum, 1 is set to the approximate parallax Δg (u, v). The addition is defined as a detailed parallax Δs (u, v). Although the resolution of the approximate parallax Δg (u, v) is 2, a detailed parallax Δs (u, v) having a resolution of 1 can be obtained by the above operation. Next, step S1243 is executed.

Δs(u,v) = Δg(u,v) - 1 (R(u,v)(Δg(u,v)-1)が最小のとき)
・・・(19)
Δs(u,v) = Δg(u,v) (R(u,v)(Δg(u,v))が最小のとき)
・・・(20)
Δs(u,v) = Δg(u,v) + 1 (R(u,v)(Δg(u,v)+1)が最小のとき)
・・・(21)
Δs (u, v) = Δg (u, v)-1 (when R (u, v) (Δg (u, v) -1) is minimum)
... (19)
Δs (u, v) = Δg (u, v) (when R (u, v) (Δg (u, v)) is minimum)
... (20)
Δs (u, v) = Δg (u, v) + 1 (when R (u, v) (Δg (u, v) +1) is minimum)
(21)

ステップS1243において、サブピクセルの視差を演算する。詳細な視差を与える視差評価値R(u,v)(Δs(u,v))とその前後のずらし量kでの視差評価値R(u,v)(Δs(u,v)-1)、 R(u,v)(Δs(u,v)+1)とを用いて、サブピクセルの(画素の分解能よりも細かい)視差Δf(u,v)を、面積按分法を用いて演算する。具体的には、R(u,v)(Δg(u,v)-1) ≧ R(u,v)(Δg(u,v)+1)のとき下記式(22)のように演算し、R(u,v)(Δg(u,v)-1) < R(u,v)(Δg(u,v)+1)のとき(23)のように演算する。また、シフト演算を用いて演算を行うために、サブピクセルの視差Δf(u,v)の分解能は0.5、0.25、0.125、0.0625のような、1を2のべき乗で割った値が好ましい。次に、ステップS1244を実行する。   In step S1243, the parallax of the subpixel is calculated. Parallax evaluation value R (u, v) (Δs (u, v) -1) with a parallax evaluation value R (u, v) (Δs (u, v)) giving a detailed parallax and a shift amount k before and after that , R (u, v) (Δs (u, v) +1) is used to calculate the parallax Δf (u, v) of the sub-pixel (finer than the pixel resolution) using the area distribution method . Specifically, when R (u, v) (Δg (u, v) -1) ≧ R (u, v) (Δg (u, v) +1), the calculation is performed as in the following formula (22). When R (u, v) (Δg (u, v) −1) <R (u, v) (Δg (u, v) +1), the calculation is performed as in (23). In order to perform the calculation using the shift calculation, the resolution of the sub-pixel parallax Δf (u, v) is preferably a value obtained by dividing 1 by a power of 2, such as 0.5, 0.25, 0.125, and 0.0625. Next, step S1244 is executed.

Δf(u,v) = Δs(u,v) - 0.5
+ 0.5・(R(u,v)(Δg(u,v)-1) - R(u,v)(Δg(u,v)))
/ (R(u,v)(Δg(u,v)+1) - R(u,v)(Δg(u,v)))
(R(u,v)(Δg(u,v)-1) ≧ R(u,v)(Δg(u,v)+1)のとき)
・・・(22)
Δf(u,v) = Δs(u,v) + 0.5
- 0.5・(R(u,v)(Δg(u,v)+1) - R(u,v)(Δg(u,v)))
/ (R(u,v)(Δg(u,v)-1) - R(u,v)(Δg(u,v)))
(R(u,v)(Δg(u,v)-1) < R(u,v)(Δg(u,v)+1)のとき)
・・・(23)
Δf (u, v) = Δs (u, v)-0.5
+ 0.5 ・ (R (u, v) (Δg (u, v) -1)-R (u, v) (Δg (u, v)))
/ (R (u, v) (Δg (u, v) +1)-R (u, v) (Δg (u, v)))
(When R (u, v) (Δg (u, v) -1) ≧ R (u, v) (Δg (u, v) +1))
(22)
Δf (u, v) = Δs (u, v) + 0.5
-0.5 ・ (R (u, v) (Δg (u, v) +1)-R (u, v) (Δg (u, v)))
/ (R (u, v) (Δg (u, v) -1)-R (u, v) (Δg (u, v)))
(When R (u, v) (Δg (u, v) -1) <R (u, v) (Δg (u, v) +1))
... (23)

ステップS1244において、視差演算を終了し、上位のルーチンへ戻る。従って、次に、図14のステップS1250を実行する。   In step S1244, the parallax calculation is terminated and the process returns to the upper routine. Therefore, next, step S1250 of FIG. 14 is executed.

ステップS1250において、視差補正部145は、システム制御部131のメモリ上のデータを利用し、ブロックごとに、そのブロックに対応する視差値を用いて視差補正したのち、画像合成する。そして、その結果をシステム制御部131のメモリに書き込む。第1の撮像素子123aおよび第4の撮像素子123dは、主に物体光の緑色成分を受光するため、第1の撮像信号I1、および第4の撮像信号I4は、物体光の緑色成分の情報信号である。また、第2の撮像信号123bは、主に物体光の青色成分を受光するため、第2の撮像信号I2は、物体光の青色成分の情報信号である。さらに、第3の撮像信号123cは、主に物体光の赤色成分を受光するため、第3の撮像信号I3は、物体光の赤色成分の情報信号である。第1の撮像素子123aと第4の撮像素子123dとの視差が(Δf(u,v)、Δf(u,v)・Dy/Dx)であると予測されたため、下記式(23)のように、画素座標(x、y)における緑色の強度を示すG(x,y)を、第1の撮像信号I1(x,y)、および第4の撮像信号I4(x-Δf(u,v),y-Δf(u,v)・Dy/Dx)の平均とする。また、第1の撮像素子123aと第2の撮像素子123bの視差が(Δf(u,v)、0)であると予測されたため、下記式(24)のように、画素座標(x、y)における青色の強度を示すB(x,y)を、第2の撮像信号I2(x-Δf(u,v),y)とする。さらに、第1の撮像素子123aと第3の撮像素子123cの視差が(0、Δf(u,v)・Dy/Dx)であると予測されたため、下記式(25)のように、(x、y)における赤色の強度を示すR(x,y)を、第3の撮像信号I3(x,y-Δf(u,v)・Dy/Dx)とする。なお、視差値Δf(u,v)としては、画素座標(x、y)を第1の伸張後撮像信号I1に写像したときのブロックB(u,v)の視差値Δf(u,v)を利用する。次に、ステップS1700を実行する。   In step S1250, the parallax correction unit 145 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 combines the images. Then, the result is written in the memory of the system control unit 131. 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 I1 and the fourth image signal I4 are information on the green component of the object light. Signal. Further, since the second imaging signal 123b mainly receives the blue component of the object light, the second imaging signal I2 is an information signal of the blue component of the object light. Further, since the third imaging signal 123c mainly receives the red component of the object light, the third imaging signal I3 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 (Δf (u, v), Δf (u, v) · Dy / Dx), the following equation (23) is satisfied. G (x, y) indicating the green intensity at the pixel coordinates (x, y), the first imaging signal I1 (x, y), and the fourth imaging signal I4 (x−Δf (u, v ), y−Δf (u, v) · Dy / Dx). Further, since the parallax between the first image sensor 123a and the second image sensor 123b is predicted to be (Δf (u, v), 0), the pixel coordinates (x, y B (x, y) indicating the intensity of blue in) is defined as a second imaging signal I2 (x−Δf (u, v), y). Furthermore, since the parallax between the first image sensor 123a and the third image sensor 123c is predicted to be (0, Δf (u, v) · Dy / Dx), (x , Y) R (x, y) indicating the intensity of red is a third imaging signal I3 (x, y-Δf (u, v) · Dy / Dx). As the parallax value Δf (u, v), the parallax value Δf (u, v) of the block B (u, v) when the pixel coordinates (x, y) are mapped to the first post-expansion imaging signal I1. Is used. Next, step S1700 is executed.

G(x,y) = [I1(x,y) I4(x-Δf(u,v),y-Δf(u,v)・Dy/Dx)]/2 ・・・(23)
B(x,y) = I2(x-Δf(u,v),y) ・・・(24)
R(x,y) = I3(x,y-Δf(u,v)・Dy/Dx) ・・・(25)
G (x, y) = [I1 (x, y) I4 (x-Δf (u, v), y-Δf (u, v) · Dy / Dx)] / 2 (23)
B (x, y) = I2 (x-Δf (u, v), y) (24)
R (x, y) = I3 (x, y-Δf (u, v) · Dy / Dx) (25)

ステップS1700において、距離演算部146は、システム制御部131のメモリ上のデータを利用し、距離演算を行う。そして、その結果をシステム制御部131のメモリに書き込む。式(1)を距離Aについて解くと、下記式(26)のように示される。したがって、ブロックB(u,v)における被写体の距離は、下記式(27)のように演算され、そのブロックB(u,v)に含まれる画素(x,y)における被写体の距離は、下記式(28)のように示され、システム制御部131のメモリ上に保存する。なお、単位は演算時に適宜変更されている。次に、ステップS1800を実行する。   In step S1700, the distance calculation unit 146 uses the data on the memory of the system control unit 131 to perform distance calculation. Then, the result is written in the memory of the system control unit 131. Solving equation (1) for distance A gives the following equation (26). Therefore, the distance of the subject in the block B (u, v) is calculated as in the following equation (27), and the distance of the subject in the pixel (x, y) included in the block B (u, v) is This is expressed as Expression (28) and stored in the memory of the system control unit 131. Note that the unit is appropriately changed at the time of calculation. Next, step S1800 is executed.

A = f・D/Δ ・・・(26)
A(u,v) = f・D/Δf(u,v) ・・・(27)
A(x,y) = A(u,v) ((x,y)はBiに含まれる) ・・・(28)
A = f · D / Δ (26)
A (u, v) = f · D / Δf (u, v) (27)
A (x, y) = A (u, v) ((x, y) is included in Bi) (28)

ステップS1800において、結果を出力する。入出力部136は、システム制御部131のメモリ上のデータである画像データG(x,y),B(x,y),R(x,y)、および距離データA(x,y)を、上位CPU(図示せず)や外部表示装置(図示せず)に出力する。なお、G(x,y),B(x,y),R(x,y)の代わりに、例えば、輝度、色差信号などを出力してもよい。また、ホワイトバランスやγ補正などの画像処理後の値を出力してもよい。さらに、可逆圧縮やJPEG等のような非可逆圧縮をしたデータを出力してもよい。次に、S1900を実行する。   In step S1800, the result is output. The input / output unit 136 receives image data G (x, y), B (x, y), R (x, y), and distance data A (x, y), which are data on the memory of the system control unit 131. And output to a host CPU (not shown) or an external display device (not shown). Instead of G (x, y), B (x, y), R (x, y), for example, luminance, color difference signals, etc. may be output. Further, values after image processing such as white balance and γ correction may be output. Furthermore, data that has been subjected to lossy compression or lossy compression such as JPEG may be output. Next, S1900 is executed.

ステップS1900において、動作を終了する。   In step S1900, the operation ends.

以上のように構成し、動作させることにより、以下の効果を有する。   The configuration and operation as described above have the following effects.

式(1)のように被写体距離Aに応じて第1〜第4のレンズ部113a〜113dがそれぞれ形成する4つの物体像の相対的位置が変化する。すなわち、被写体距離Aが小さくなると、視差Δが大きくなる。そのため、距離が異なる複数の被写体を同時に撮影するとき、被写体毎に視差Δが異なる。実施の形態1の像装置では、ステップS1230において、全画像領域をブロックに分割し、ステップS1240において、ブロック毎の視差を演算し、ステップS1250において、ブロック毎の視差に基づき視差の影響を低減するように画像合成することで視差補正する。これにより、距離が異なる複数の被写体を同時に撮影するときにおいても、ブロック毎に求められた視差を用いて適宜それぞれの被写体の視差を補正し、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   The relative positions of the four object images respectively formed by the first to fourth lens portions 113a to 113d change according to the subject distance A as shown in Expression (1). That is, as the subject distance A decreases, the parallax Δ increases. Therefore, when a plurality of subjects having different distances are simultaneously photographed, the parallax Δ is different for each subject. In the image device according to Embodiment 1, in step S1230, the entire image region is divided into blocks, in step S1240, the parallax for each block is calculated, and in step S1250, the influence of parallax is reduced based on the parallax for each block. Thus, parallax correction is performed by combining the images. As a result, even when simultaneously shooting a plurality of subjects at different distances, the parallax of each subject is appropriately corrected using the parallax obtained for each block, and a clean image in which the influence of the parallax is reduced in the entire image area Can be obtained.

また、実施の形態1の撮像装置では、S1243において按分法を利用し、画素の分解能よりも細かな分解能で視差を演算し、このブロック毎の細かな分解能の視差に基づき視差の影響が低減するように撮像信号を補正した後、ステップS1250において画像合成する。このとき、視差をサブピクセルの分解能で(画素の分解能よりも細かな分解能で)求める。これにより、距離が異なる複数の被写体を同時に撮像するときにおいても、ブロック毎に求められた分解能が細かい視差を用いて適宜それぞれの被写体の視差をサブピクセルの分解能で(画素の分解能よりも細かな分解能で)補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   Further, in the imaging apparatus according to the first embodiment, the disparity method is used in S1243 to calculate the parallax with a resolution finer than the pixel resolution, and the influence of the parallax is reduced based on the fine resolution parallax for each block. After correcting the imaging signal as described above, the image is synthesized in step S1250. At this time, the parallax is obtained with sub-pixel resolution (with finer resolution than the pixel resolution). As a result, even when a plurality of subjects with different distances are simultaneously imaged, the parallax of each subject is appropriately reduced with sub-pixel resolution (a finer resolution than the pixel resolution) using fine parallax obtained for each block. Can be corrected (with resolution) to obtain a clean image with reduced parallax effects in the entire image area.

また、実施の形態1の撮像装置では、ステップS1241において分解能2である概略の視差Δg(u,v)を求め、ステップS1242において分解能が1である詳細な視差Δs(u,v)を求める。これにより、kを1ずつ変化させるときと比較し、演算評価値の演算を減少できるため、より低コストな演算回路で、距離が異なる複数の被写体を同時に撮像するときにおいても、ブロック毎に求められた視差を用いて適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。例えば、kを128まで変化させるとき、詳細な視差Δs(u,v)を求めるために、kを1ずつ変化させるとき撮像装置は視差評価値の演算が129回必要だが、実施の形態1の撮像装置は視差評価値の演算を66回に抑制できる。   In the imaging apparatus of Embodiment 1, the approximate parallax Δg (u, v) having a resolution of 2 is obtained in step S1241, and the detailed parallax Δs (u, v) having a resolution of 1 is obtained in step S1242. As a result, the calculation evaluation value can be reduced as compared with the case where k is changed one by one. Therefore, even when a plurality of subjects having different distances are simultaneously imaged with a lower cost calculation circuit, the calculation is calculated for each block. It is possible to appropriately correct the parallax of each subject using the parallax, and obtain a clean image in which the influence of the parallax is reduced in the entire image area. For example, when k is changed to 128, in order to obtain detailed parallax Δs (u, v), the imaging apparatus needs to calculate the parallax evaluation value 129 times when k is changed one by one. The imaging apparatus can suppress the calculation of the parallax evaluation value to 66 times.

また、実施の形態1の撮像装置では、ステップS1240において伸張後撮像信号を千鳥状に間引いた信号を用いて視差を求める。これにより、全ての伸張後撮像信号を用いて視差を求めるときと比較し、視差評価値の演算を減少できるため、より低コストな演算回路で、距離が異なる複数の被写体を同時に撮像するときにおいても、ブロック毎に求められた視差を用いて適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   In the imaging device of Embodiment 1, the parallax is obtained using a signal obtained by thinning out the expanded imaging signal in a staggered manner in step S1240. As a result, it is possible to reduce the calculation of the parallax evaluation value as compared with the case where the parallax is calculated using all the post-expansion imaging signals, and therefore when a plurality of subjects with different distances are simultaneously imaged with a lower cost arithmetic circuit. In addition, it is possible to appropriately correct the parallax of each subject using the parallax obtained for each block, and to obtain a beautiful image in which the influence of the parallax is reduced in the entire image region.

また、実施の形態1の撮像装置では、ステップS1220において第1の撮像信号I1、および第4の撮像信号I4をDx/Dyだけ垂直方向に伸張し、第1の伸張後撮像信号I1s、および第4の伸張後撮像信号I4sを作成することにより、ステップS1240の視差評価値を演算する際に、補間処理が不要となる。これにより、第1の撮像信号I1、および第4の撮像信号I4を利用するときと比較し、演算量を減少できるため、より低コストな演算回路で、距離が異なる複数の被写体を同時に撮像するときにおいても、ブロック毎に求められた視差を用いて適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   In the imaging device of Embodiment 1, in step S1220, the first imaging signal I1 and the fourth imaging signal I4 are expanded in the vertical direction by Dx / Dy, and the first post-expansion imaging signal I1s and By creating the post-expansion image signal I4s of 4, interpolation processing becomes unnecessary when calculating the parallax evaluation value in step S1240. As a result, the amount of calculation can be reduced as compared with the case where the first imaging signal I1 and the fourth imaging signal I4 are used, so that a plurality of subjects with different distances can be simultaneously imaged with a lower cost arithmetic circuit. Even in this case, it is possible to appropriately correct the parallax of each subject using the parallax obtained for each block, and to obtain a beautiful image in which the influence of the parallax is reduced in the entire image region.

なお、上述の実施の形態1では、図15に示すように、垂直方向の画素数Hが水平方向の画素数Lよりも少なかったため、ステップS1220において撮像信号を垂直方向に伸張することとしたが、垂直方向の画素数Hが水平方向の画素数Lよりも多い場合は、ステップS1220において撮像信号を水平方向に伸張すれば良い。   In the above-described first embodiment, as shown in FIG. 15, since the number of pixels H in the vertical direction is smaller than the number of pixels L in the horizontal direction, the imaging signal is expanded in the vertical direction in step S1220. If the number of pixels H in the vertical direction is larger than the number of pixels L in the horizontal direction, the imaging signal may be expanded in the horizontal direction in step S1220.

また、実施の形態1の撮像装置では、ステップS1200において視差を演算し、ステップS1700においてこの視差に基づき距離を演算し、ステップS1800において結果を出力する。このことにより、画像のみならず被写体の距離をも出力ができ、上位において距離情報を用いた処理(例えば、障害物検知)を行うことができる。さらに、サブピクセルの視差(視差を画素の分解能よりも細かな分解能の視差)を求めることにより、より詳細な距離情報を得ることができる。   In the imaging apparatus of Embodiment 1, the parallax is calculated in step S1200, the distance is calculated based on this parallax in step S1700, and the result is output in step S1800. Thus, not only the image but also the distance of the subject can be output, and processing using distance information (for example, obstacle detection) can be performed at the upper level. Furthermore, more detailed distance information can be obtained by obtaining the parallax of the sub-pixel (the parallax having a finer resolution than the resolution of the pixel).

(実施の形態2)
本発明の実施の形態1に係る撮像装置は、按分法を利用し、画素の分解能よりも細かな分解能で視差を演算した。本発明の実施の形態2に係る撮像装置は、1つのレンズ部が形成する像を示す撮像信号と、前記レンズ部とは異なる1つのレンズ部が形成する像を示す撮像信号とを、画素の分解能よりも細かな分解能でずらし比較することにより、視差を画素の分解能よりも細かな分解能で演算し、この視差に基づき視差の影響を低減するように画像合成し視差補正することにより、全画像領域で視差の影響が低減されたきれいな画像を得る。
(Embodiment 2)
The imaging apparatus according to Embodiment 1 of the present invention uses a proration method to calculate the parallax with a resolution finer than the resolution of the pixels. The imaging device according to Embodiment 2 of the present invention is configured to obtain an imaging signal indicating an image formed by one lens unit and an imaging signal indicating an image formed by one lens unit different from the lens unit. By shifting and comparing with a resolution finer than the resolution, the parallax is calculated with a resolution finer than the resolution of the pixel, and the image is synthesized and parallax corrected so as to reduce the influence of the parallax based on this parallax. A clear image in which the influence of parallax is reduced in a region is obtained.

また、本発明の実施の形態1に係る撮像装置は、千鳥状に伸張後撮像素子を間引いて視差評価値を作成した。本発明の実施の形態2に係る撮像装置は、1行おきに伸張後撮像素子を間引いて視差評価値を作成することにより、視差評価値の演算を減少できるため、より低コストな演算回路で、距離が異なる複数の被写体を同時に撮像するときにおいても、適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   In addition, the imaging apparatus according to Embodiment 1 of the present invention creates parallax evaluation values by thinning out the imaging elements after stretching in a zigzag pattern. The imaging apparatus according to Embodiment 2 of the present invention can reduce the calculation of the parallax evaluation value by thinning out the image sensor after every other row to create the parallax evaluation value, so that the calculation circuit with a lower cost can be used. 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.

本発明の実施の形態2に係る撮像装置について、図面を参照しながら説明する。   An imaging apparatus according to Embodiment 2 of the present invention will be described with reference to the drawings.

図21は、本発明の実施の形態2に係るカメラモジュールの構成を示す断面図である。カメラモジュール201の回路部220のSLSI225以外は、実施の形態1と同様であり、実施の形態1と同様の部材には同一の符号を付してそれらについての説明を省略する。   FIG. 21 is a cross-sectional view showing a configuration of a 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 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.

図22は、本発明の実施の形態2に係るカメラモジュールのブロック図である。SLSI225は、システム制御部231、撮像素子駆動部132、撮像信号入力部133、アクチュエータ操作量出力部134、画像処理部235、および入出力部136を有する。また、回路部220は、前述の構成に加えて、アンプ126を有する。   FIG. 22 is a block diagram of a camera module according to Embodiment 2 of the present invention. The SLSI 225 includes a system control unit 231, an imaging element 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. The circuit unit 220 includes an amplifier 126 in addition to the above-described configuration.

システム制御部231は、CPU、メモリなどから構成され、SLSI225の全体を制御する。   The system control unit 231 includes a CPU, a memory, and the like, and controls the entire SLSI 225.

画像処理部235は、ロジック回路、またはDSP、あるいは両者を含んで構成され、システム制御部231のメモリ情報を利用し、各種画像処理を行う。画像処理部235は、自動焦点制御部141、画像伸張部142、ブロック分割部143、視差演算部244、視差補正部145、および距離演算部146を有する。   The image processing unit 235 includes a logic circuit, a DSP, or both, and performs various types of image processing using the memory information of the system control unit 231. The image processing unit 235 includes an automatic focus control unit 141, an image expansion unit 142, a block division unit 143, a parallax calculation unit 244, a parallax correction unit 145, and a distance calculation unit 146.

撮像素子駆動部132、撮像信号入力部133、アクチュエータ操作量出力部134、入出力部136、およびアンプ126は、実施の形態1と同様であり、説明を省略する。   The imaging element 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.

実施の形態2に係る撮像装置は、実施の形態1に係る撮像装置と比較し、視差演算のステップ(図14のステップS1240)の動作のみが異なる。その他の動作は、実施の形態1と同様であり、説明を省略する。   The imaging apparatus according to the second embodiment is different from the imaging apparatus according to the first embodiment only in the operation of the parallax calculation step (step S1240 in FIG. 14). Other operations are the same as those in the first embodiment, and a description thereof will be omitted.

ステップS1240において、視差演算部244は、システム制御部231のメモリ上のデータを利用し、各ブロック毎の視差値を演算する。そして、システム制御部231のメモリに書き込む。図23は、本発明の実施の形態2に係る視差演算の動作を示すフローチャートである。図23のフローチャートは、ステップS1240の動作の詳細を示す。ステップS1240の視差演算では、まず、ステップS2241を実行する。   In step S1240, the parallax calculation unit 244 uses the data on the memory of the system control unit 231 to calculate the parallax value for each block. Then, the data is written in the memory of the system control unit 231. FIG. 23 is a flowchart showing an operation of parallax calculation according to Embodiment 2 of the present invention. The flowchart in FIG. 23 shows details of the operation in step S1240. In the parallax calculation in step S1240, first, step S2241 is executed.

ステップS2241において、概略の視差を演算する。図24は、本発明の実施の形態2に係る撮像装置において、視差評価値の演算領域を説明する図である。
このステップの動作は、実施の形態1のステップS1241と同様であるため、説明を省略する。ただし、実施の形態1に係る撮像装置は式(17)において総和演算は画素を千鳥状に間引いて行ったが、実施の形態2に係る撮像装置は式(17)において総和演算は画素を1行おきに間引いて行う。すなわち、図24(b)において、黒塗りされた画素のみを総和演算に利用する。次に、ステップS2242を実行する。
In step S2241, approximate parallax is calculated. FIG. 24 is a diagram illustrating a parallax evaluation value calculation region in the imaging apparatus according to Embodiment 2 of the present invention.
Since the operation in this step is the same as that in step S1241 in the first embodiment, description thereof is omitted. However, in the imaging apparatus according to the first embodiment, the summation calculation is performed by thinning out the pixels in a staggered manner in Expression (17). However, in the imaging apparatus according to the second embodiment, the summation calculation is performed by adding one pixel in Expression (17). Thin out every other line. That is, in FIG. 24B, only the blacked pixels are used for the sum calculation. Next, step S2242 is executed.

ステップS2242において、詳細な視差を演算する。この動作は、実施の形態のステップS1242と同様であり、説明を省略する。次に、ステップS2243を実行する。   In step S2242, a detailed parallax is calculated. This operation is the same as step S1242 in the embodiment, and a description thereof will be omitted. Next, step S2243 is executed.

ステップS2243において、サブピクセルで(画素の分解能よりも細かい分解能で)視差を演算する。図25は、本発明の実施の形態2に係る撮像装置のサブピクセルの視差と視差評価値との関係を説明する図である。図25の黒丸(●で示される点)は、詳細な視差Δs(u,v)での視差評価値と、その前後1だけずらし量kを変化させたときの視差評価値である。詳細な視差Δs(u,v)の前後の1でkを0.125の分解能で変化させ(白丸、○で示される点)、視差評価値R(u,v)(k)を極小にするkをサブピクセルの視差Δf(u,v)とする。なお、kが小数であるため、補間処理を行い第4の伸張後撮像信号I4を作成し、式(17)に代入する。例えば、下記式(29)のように、線形補間を用いて求めればよい。ここで、式(29)において、kiはkの整数部分であり、kfはkの小数部分である。また、乗算演算の変わりに、シフト演算を用いて演算を行うために、ずらし量kの分解能は0.5、0.25、0.125、0.0625のような、1を2のべき乗で割った値が好ましい。次に、ステップS2244を実行する。   In step S2243, the parallax is calculated with sub-pixels (with a resolution finer than the pixel resolution). FIG. 25 is a diagram for explaining the relationship between the parallax of the sub-pixel and the parallax evaluation value of the imaging apparatus according to Embodiment 2 of the present invention. The black circles (points indicated by ●) in FIG. 25 are the parallax evaluation value with the detailed parallax Δs (u, v) and the parallax evaluation value when the shift amount k is changed by 1 before and after. Change k with a resolution of 0.125 at 1 before and after the detailed parallax Δs (u, v) (points indicated by white circles and circles) to minimize the parallax evaluation value R (u, v) (k) The sub-pixel parallax Δf (u, v). Since k is a decimal, interpolation processing is performed to create a fourth post-expansion imaging signal I4, which is substituted into equation (17). For example, what is necessary is just to obtain | require using linear interpolation like following formula (29). Here, in Expression (29), ki is an integer part of k, and kf is a decimal part of k. Further, since the shift operation is used instead of the multiplication operation, the resolution of the shift amount k is preferably a value obtained by dividing 1 by a power of 2, such as 0.5, 0.25, 0.125, and 0.0625. Next, step S2244 is executed.

I4s = (1-kf)・I4s(x-ki,y-ki) + kf・I4s(x-ki-1,y-ki-1) ・・・(29)   I4s = (1-kf) ・ I4s (x-ki, y-ki) + kf ・ I4s (x-ki-1, y-ki-1) (29)

ステップS2244において、視差演算を終了し、上位のルーチンへ戻る。従って、次に、図14のステップS1250を実行する。   In step S2244, the parallax calculation is terminated and the process returns to the upper routine. Therefore, next, step S1250 of FIG. 14 is executed.

上記のように構成し動作させることにより、実施の形態2の撮像装置は、実施の形態1と同様の効果を有する。   By configuring and operating as described above, the imaging apparatus of the second embodiment has the same effect as that of the first embodiment.

すなわち、本発明の実施の形態2に係る撮像装置は、1つのレンズ部が形成する像を示す撮像信号と、前記レンズ部とは異なる1つのレンズ部が形成する像を示す撮像信号とを、画素の分解能よりも細かな分解能でずらし比較することにより、視差を画素の分解能よりも細かな分解能で演算する。これにより、距離が異なる複数の被写体を同時に撮像するときにおいても、ブロック毎に求められた分解能が細かい視差を用いて適宜それぞれの被写体の視差をサブピクセルの分解能で(画素の分解能よりも細かな分解能で)補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   That is, the imaging apparatus according to Embodiment 2 of the present invention includes an imaging signal indicating an image formed by one lens unit and an imaging signal indicating an image formed by one lens unit different from the lens unit, The parallax is calculated with a finer resolution than the pixel resolution by shifting and comparing with a finer resolution than the pixel resolution. As a result, even when a plurality of subjects with different distances are simultaneously imaged, the parallax of each subject is appropriately reduced with sub-pixel resolution (a finer resolution than the pixel resolution) using fine parallax obtained for each block. Can be corrected (with resolution) to obtain a clean image with reduced parallax effects in the entire image area.

また、本発明の実施の形態2に係る撮像装置は、1行おきに伸張後撮像素子を間引いて視差評価値を作成することにより、視差評価値の演算を減少できるため、より低コストな演算回路で、距離が異なる複数の被写体を同時に撮像するときにおいても、ブロック毎に求められた視差を用いて適宜それぞれの被写体の視差を補正して、全画像領域で視差の影響が低減されたきれいな画像を得ることができる。   In addition, the imaging apparatus according to Embodiment 2 of the present invention can reduce the calculation of the parallax evaluation value by thinning out the image sensor after every other row to create the parallax evaluation value, thereby reducing the calculation at a lower cost. Even when a plurality of subjects with different distances are picked up simultaneously by the circuit, the parallax of each subject is corrected appropriately using the parallax obtained for each block, and the effect of the parallax is reduced in the entire image area. An image can be obtained.

(実施の形態3)
本発明の実施の形態1に係る撮像装置は、4つのレンズ部を有し、対角のレンズ部(第1のレンズ部113a、および第4のレンズ部113d)に対応するカラーフィルタ(第1のカラーフィルタ124a、および第4のカラーフィルタ124d)の分光透過率を同等とし、対応する撮像信号(第1の撮像信号I1、および第4の撮像信号I4を垂直方向に伸張した第1の伸張後撮像信号I1s、第4の伸張後撮像信号I4s)を比較し視差を求めた。本発明の実施の形態3に係る撮像装置は、4つのレンズ部を有し、水平方向の1対のレンズ部(第1のレンズ部113a、および第2のレンズ部113b)に対応するカラーフィルタ(第1のカラーフィルタ124a、および第4のカラーフィルタ124b)の分光透過率を同等とし、対応する撮像信号(第1の撮像信号I1、および第2の撮像信号I2)を比較し視差を求めるものである。
(Embodiment 3)
The imaging apparatus according to Embodiment 1 of the present invention includes four lens units, and color filters (first lens units) corresponding to diagonal lens units (first lens unit 113a and fourth lens unit 113d). The first color expansion 124a and the fourth color filter 124d have the same spectral transmittance, and the corresponding image signals (the first image signal I1 and the fourth image signal I4) are expanded in the vertical direction. The post-imaging signal I1s and the fourth post-expansion imaging signal I4s) were compared to determine the parallax. The imaging apparatus according to Embodiment 3 of the present invention has four lens units, and corresponds to a pair of lens units in the horizontal direction (first lens unit 113a and second lens unit 113b). The spectral transmittances of the first color filter 124a and the fourth color filter 124b are made equal, and the corresponding imaging signals (the first imaging signal I1 and the second imaging signal I2) are compared to obtain the parallax. Is.

本発明の実施の形態3に係る撮像装置について、図面を参照しながら説明する。   An imaging apparatus according to Embodiment 3 of the present invention will be described with reference to the drawings.

図26は、本発明の実施の形態3に係る撮像装置の構成を示す断面図である。図26において、撮像装置は、レンズモジュール部310、および回路部320を有する。   FIG. 26 is a cross-sectional view showing the configuration of the imaging apparatus according to Embodiment 3 of the present invention. In FIG. 26, the imaging device includes a lens module unit 310 and a circuit unit 320.

レンズモジュール部310は、鏡筒111、上部カバーガラス112、レンズ313、アクチュエータ固定部114、およびアクチュエータ可動部115を有する。回路部320は、基板121、パッケージ122、撮像素子123、パッケージカバーガラス324、およびシステムLSI(以下、SLSIと記す)325を有する。   The lens module unit 310 includes a lens barrel 111, an upper cover glass 112, a lens 313, an actuator fixing unit 114, and an actuator movable unit 115. The circuit unit 320 includes a substrate 121, a package 122, an image sensor 123, a package cover glass 324, and a system LSI (hereinafter referred to as SLSI) 325.

鏡筒111、および上部カバーガラス112は、実施の形態1と同様であり、説明を省略する。   The lens barrel 111 and the upper cover glass 112 are the same as those in the first embodiment, and a description thereof is omitted.

実施の形態1のレンズ113は、第1のレンズ部113aは緑色を、第2のレンズ部113bは青色を、第3のレンズ部113cは赤色を、第4のレンズ部113dは緑色を透過するための最適設計がなされたものであった。実施の形態3のレンズ313は、第1のレンズ部313aは緑色を、第2のレンズ部313bは緑色を、第3のレンズ部313cは赤色を、第4のレンズ部313dは青色を透過するための最適設計がなされたものである。レンズ313のその他の部分は、実施の形態1のレンズ113と同様であり、説明を省略する。   In the lens 113 of the first embodiment, the first lens portion 113a transmits green, the second lens portion 113b transmits blue, the third lens portion 113c transmits red, and the fourth lens portion 113d transmits green. The optimum design was made. In the lens 313 of Embodiment 3, the first lens portion 313a transmits green, the second lens portion 313b transmits green, the third lens portion 313c transmits red, and the fourth lens portion 313d transmits blue. The optimum design for this purpose has been made. The other parts of the lens 313 are the same as those of the lens 113 of the first embodiment, and a description thereof is omitted.

アクチュエータ固定部114、およびアクチュエータ可動部115は、実施の形態1と同様であり説明を省略する
基板121は、樹脂基板から構成され、上面に鏡筒111がその底面を接して接着剤などにより固着される。このようにして、レンズモジュール部310と回路部320とが固定され、撮像装置301を構成する。
The actuator fixing unit 114 and the actuator movable unit 115 are the same as those in the first embodiment, and the description thereof is omitted. The substrate 121 is made of a resin substrate, and the lens barrel 111 is in contact with the bottom surface of the upper surface and fixed by an adhesive or the like. Is done. In this way, the lens module unit 310 and the circuit unit 320 are fixed to constitute the imaging device 301.

パッケージ122、および撮像素子123は、実施の形態1と同様であり説明を省略する。   The package 122 and the image sensor 123 are the same as those in the first embodiment, and a description thereof is omitted.

図27は、本発明の実施の形態3に係る撮像装置の回路部320の上面図である。パッケージカバーガラス324は、平板状であり、透明樹脂により形成され、パッケージ122の上面に接着などにより固着される。パッケージカバーガラス324の上面には、第1のカラーフィルタ324a、第2のカラーフィルタ324b、第3のカラーフィルタ324c、第4のカラーフィルタ324d、および遮光部324eが蒸着などにより配置される。また、パッケージカバーガラス324の下面には、赤外遮断フィルタ(図示せず。以下、IRフィルタと記す)が蒸着などにより配置される。   FIG. 27 is a top view of the circuit unit 320 of the imaging apparatus according to Embodiment 3 of the present invention. The package cover glass 324 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. On the upper surface of the package cover glass 324, a first color filter 324a, a second color filter 324b, a third color filter 324c, a fourth color filter 324d, and a light shielding portion 324e are disposed 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 package cover glass 324 by vapor deposition or the like.

図28は、本発明の実施の形態3に係る撮像装置のカラーフィルタの特性図である。第1のカラーフィルタ324aは、図28のGで示した主に緑色を透過する分光透過特性を有し、第2のカラーフィルタ324bは、図28のGで示した主に緑色を透過する分光透過特性を有し、第3のカラーフィルタ324cは、図28のRで示した主に赤色を透過する分光透過特性を有し、第4のカラーフィルタ324dは、図28のBで示した主に青色を透過する分光透過特性を有する。また、IRフィルタは、実施の形態1と同様であり、説明を省略する。   FIG. 28 is a characteristic diagram of the color filter of the imaging apparatus according to Embodiment 3 of the present invention. The first color filter 324a has a spectral transmission characteristic that mainly transmits green shown by G in FIG. 28, and the second color filter 324b has a spectral transmission characteristic that mainly transmits green shown by G in FIG. The third color filter 324c has a spectral transmission characteristic mainly transmitting red as indicated by R in FIG. 28, and the fourth color filter 324d is a main color indicated by B in FIG. Has a spectral transmission characteristic of transmitting blue light. The IR filter is the same as that of the first embodiment, and the description thereof is omitted.

したがって、第1のレンズ部313aの上部から入射した物体光は、第1のレンズ部313aの下部から射出され、第1のカラーフィルタ324aおよびIRフィルタにより主に緑色が透過し、第1の撮像素子123aの受光部に結像するため、第1の撮像素子123aは物体光のうち緑色成分を受光する。また、第2のレンズ部313bの上部から入射した物体光は、第2のレンズ部313bの下部から射出され、第2のカラーフィルタ324bおよびIRフィルタにより主に緑色が透過し、第2の撮像素子123bの受光部に結像するため、第2の撮像素子123bは物体光のうち緑色成分を受光する。また、第3のレンズ部313cの上部から入射した物体光は、第3のレンズ部313cの下部から射出され、第3のカラーフィルタ324cおよびIRフィルタにより主に赤色が透過し、第3の撮像素子123cの受光部に結像するため、第3の撮像素子123cは物体光のうち赤色成分を受光する。更に、第4のレンズ部313dの上部から入射した物体光は、第4のレンズ部313dの下部から射出され、第4のカラーフィルタ324dおよびIRフィルタにより主に青色が透過し、第4の撮像素子123dの受光部に結像するため、第4の撮像素子123dは物体光のうち青色成分を受光する。   Therefore, the object light incident from the upper part of the first lens unit 313a is emitted from the lower part of the first lens unit 313a, and mainly the green color is transmitted through the first color filter 324a and the IR filter. In order to form an image on the light receiving portion of the element 123a, the first imaging element 123a receives the green component of the object light. In addition, the object light incident from the upper part of the second lens unit 313b is emitted from the lower part of the second lens unit 313b, and mainly the green color is transmitted through the second color filter 324b and the IR filter. In order to form an image on the light receiving portion of the element 123b, the second imaging element 123b receives the green component of the object light. Further, the object light incident from the upper part of the third lens unit 313c is emitted from the lower part of the third lens unit 313c, and mainly the red color is transmitted through the third color filter 324c and the IR filter. In order to form an image on the light receiving portion of the element 123c, the third imaging element 123c receives the red component of the object light. Further, the object light incident from the upper part of the fourth lens unit 313d is emitted from the lower part of the fourth lens unit 313d, and mainly blue light is transmitted through the fourth color filter 324d and the IR filter, so that the fourth imaging is performed. In order to form an image on the light receiving portion of the element 123d, the fourth imaging element 123d receives the blue component of the object light.

SLSI325は、後述の方法で、アクチュエータ可動部115のコイルの通電を制御し、撮像素子123を駆動し、撮像素子123からの電気情報を入力し、各種画像処理を行い、上位CPUと通信を行い、外部に画像出力する。   The SLSI 325 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 communicates with the host CPU by a method described later. Output the image to the outside.

次に、本発明の実施の形態3に係る撮像装置の動作を説明する。図29は、本発明の実施の形態3に係る撮像装置のブロック図である。SLSI325は、システム制御部331、撮像素子駆動部132、撮像信号入力部133、アクチュエータ操作量出力部134、画像処理部335、および入出力部136を有する。また、回路部320は、前述の構成に加えて、アンプ126を有する。   Next, the operation of the imaging apparatus according to Embodiment 3 of the present invention will be described. FIG. 29 is a block diagram of an imaging apparatus according to Embodiment 3 of the present invention. The SLSI 325 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 configuration.

アンプ126は、アクチュエータ操作量出力部134からの出力に応じた電圧をアクチュエータ可動部115のコイルに印加する。   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.

システム制御部331は、CPU(中央演算処理装置:Central Processing Unit)、メモリなどから構成され、SLSI325の全体を制御する。   The system control unit 331 includes a CPU (Central Processing Unit), a memory, and the like, and controls the entire SLSI 325.

撮像素子駆動部132、撮像信号入力部133、アクチュエータ操作量出力部134は、実施の形態1と同様であり説明を省略する。   The imaging element driving unit 132, the imaging signal input unit 133, and the actuator operation amount output unit 134 are the same as those in the first embodiment, and a description thereof is omitted.

画像処理部335は、ロジック回路、またはDSP、あるいはこれらの両者を含んで構成され、システム制御部331のメモリ情報を利用し、所定のプログラム制御に従って各種画像処理を行う。画像処理部335は、自動焦点制御部141、ブロック分割部343、視差演算部344、視差補正部345、および距離演算部146を有する。   The image processing unit 335 includes a logic circuit, a DSP, or both of them, and uses the memory information of the system control unit 331 to perform various image processing according to predetermined program control. The image processing unit 335 includes an automatic focus control unit 141, a block division unit 343, a parallax calculation unit 344, a parallax correction unit 345, and a distance calculation unit 146.

入出力部136は、実施の形態1と同様であり、説明を省略する。   The input / output unit 136 is the same as that of the first embodiment, and a description thereof will be omitted.

図30は、本発明の実施の形態3に係る撮像装置の動作を示すフローチャートである。SLSI325のシステム制御部331により、撮像装置301は、このフローチャートのとおりに動作される。   FIG. 30 is a flowchart showing the operation of the imaging apparatus according to Embodiment 3 of the present invention. The imaging apparatus 301 is operated according to this flowchart by the system control unit 331 of the SLSI 325.

ステップS3000において、動作を開始する。例えば、上位CPU(図示せず)が、シャッターボタンなどが押されたことを検知し、入出力部136を介し、撮像装置に動作の開始を命令することにより、撮像装置301は、動作を開始する。次に、ステップS3100を実行する。   In step S3000, the operation is started. For example, the host CPU (not shown) detects that a shutter button or the like has been pressed, and instructs the imaging device to start the operation via the input / output unit 136, whereby the imaging device 301 starts the operation. To do. Next, step S3100 is executed.

ステップS3100において、自動焦点制御部141は、自動焦点制御を実行する。この動作は、実施の形態1のステップS1100と同様であり説明を省略する。次に、ステップS3200を実行する。   In step S3100, the automatic focus control unit 141 executes automatic focus control. This operation is the same as step S1100 of the first embodiment, and a description thereof is omitted. Next, step S3200 is executed.

ステップS3200において、視差補正を実行する。図31は、本発明の実施の形態3に係る視差補正の動作を示すフローチャートである。図31のフローチャートは、ステップS3200の動作の詳細を示す。ステップS3200の視差補正では、まず、ステップS3210を実行する。   In step S3200, parallax correction is performed. FIG. 31 is a flowchart showing a parallax correction operation according to Embodiment 3 of the present invention. The flowchart in FIG. 31 shows details of the operation in step S3200. In the parallax correction in step S3200, first, step S3210 is executed.

ステップS3210において、撮影を実行する。この動作は、実施の形態1のステップS1210と同様であり説明を省略する。次に、ステップS3230を実行する。   In step S3210, shooting is performed. This operation is the same as that in step S1210 of the first embodiment, and a description thereof is omitted. Next, step S3230 is executed.

ステップS3230において、ブロック分割部343は、システム制御部331のメモリ上のデータを利用し、ブロック分割を行う。そして、その結果をシステム制御部331のメモリに書き込む。図32は、本発明の実施の形態3に係る撮像装置において、ブロック分割を説明する図である。図32のように、第1の撮像信号I1を、横方向にM個のブロックに、縦方向にN個のブロックに、総数でM×N個に分割し、それぞれのブロックをB(u,v)で示す。ここで、uは0からM−1まで、vはN−1まで変化する。次に、ステップS3240を実行する。   In step S3230, the block division unit 343 performs block division using data on the memory of the system control unit 331. Then, the result is written in the memory of the system control unit 331. FIG. 32 is a diagram for explaining block division in the imaging apparatus according to Embodiment 3 of the present invention. As shown in FIG. 32, the first imaging signal I1 is divided into M blocks in the horizontal direction, N blocks in the vertical direction, and M × N in total, and each block is divided into B (u, Shown in v). Here, u changes from 0 to M-1, and v changes from N-1. Next, step S3240 is executed.

ステップS3240において、視差演算部344は、システム制御部331のメモリ上のデータを利用し、各ブロック毎の視差値を演算する。そして、システム制御部331のメモリに書き込む。図33は、本発明の実施の形態3に係る視差演算の動作を示すフローチャートである。図33のフローチャートは、ステップS3240の動作の詳細を示す。ステップS3240の視差演算では、まず、ステップS3241を実行する。   In step S3240, the parallax calculation unit 344 uses the data on the memory of the system control unit 331 to calculate the parallax value for each block. Then, the data is written in the memory of the system control unit 331. FIG. 33 is a flowchart showing an operation of parallax calculation according to Embodiment 3 of the present invention. The flowchart in FIG. 33 shows details of the operation in step S3240. In the parallax calculation in step S3240, first, step S3241 is executed.

ステップS3241において、概略の視差を演算する。まず、各ブロック(B(0,0)、B(1,0)、…、B(u,v)、…、B(M-1,N-1))毎に、視差評価値(R(0,0)(k)、R(1,0)(k)、…、R(u,v)(k)、…、R(M-1,N-1)(k)。k=1、3、5、…、kmax。ただし、kmaxは奇数)を演算する。このように、kは奇数のみを取るように変化させる。図34は、本発明の実施の形態3に係る撮像装置において、視差評価値の演算領域を説明する図である。図34のように、I2で示される領域は、B(u,v)からx方向にkだけ移動した領域である。そして、それぞれの領域の全撮像信号I1(x,y)、I2(x-k,y)について、下記式(30)に示される絶対値差分総和(SAD。Sum of Absolute Differences)を視差評価値R(u,v)(k)として演算する。ただし、式(30)において総和演算は画素を千鳥状に間引いて行う。すなわち、図34において、黒塗りされた画素のみを総和演算に利用する。   In step S3241, approximate parallax is calculated. First, for each block (B (0,0), B (1,0),..., B (u, v),..., B (M-1, N-1)), the parallax evaluation value (R ( 0,0) (k), R (1,0) (k), ..., R (u, v) (k), ..., R (M-1, N-1) (k), k = 1, 3, 5, ..., kmax (where kmmax is an odd number). Thus, k is changed so as to take only odd numbers. FIG. 34 is a diagram for explaining the calculation area of the parallax evaluation value in the imaging apparatus according to Embodiment 3 of the present invention. As shown in FIG. 34, the area indicated by I2 is an area moved from B (u, v) by k in the x direction. Then, for all the imaging signals I1 (x, y) and I2 (xk, y) in each region, the absolute value difference sum (SAD: Sum of Absolute Differences) shown in the following equation (30) is used as the parallax evaluation value R ( Calculate as u, v) (k). However, in equation (30), the sum operation is performed by thinning out pixels in a zigzag pattern. That is, in FIG. 34, only the blacked pixels are used for the sum calculation.

R(u,v)(k) = ΣΣ|I1(x,y)-I2(x-k,y)| ・・・(30)     R (u, v) (k) = ΣΣ | I1 (x, y) -I2 (x-k, y) | (30)

この視差評価値R(u,v)(k)は、x方向にu番目、y方向にv番目のブロックB(u,v)の第1の画像信号I1と、x方向にずらし量kだけ離れた領域における第2の画像信号I2がどれだけ相関があるかを示し、値が小さいほど相関が大きい(よく似ている)ことを示す。図19のように、視差評価値R(u,v)(k)はずらし量kの値によって変化し、ずらし量k=Δg(u,v)のとき極小値を持つ。これは、第2の画像信号I2のx方向にu番目、y方向にv番目のブロックB(u,v)をx方向に-Δg(u,v)だけ移動させて得られる画像信号は、第1の画像信号I1と最も相関がある(最も似ている)ことを示す。したがって、ブロックB(u,v)についての第1の撮像信号I1と第2の画像信号I2とのx方向の視差がΔg(u,v)であることが分かる。以下、このΔg(u,v)を、ブロックB(u,v)の概略の視差値Δg(u,v)と呼ぶ。このように、u=0からM−1、v=0からN−1までB(u,v)の概略の視差値Δg(u,v)を求める。次に、ステップS3242を実行する。   The parallax evaluation value R (u, v) (k) is the first image signal I1 of the u-th block B (u, v) in the x-direction and the v-th block in the y-direction and the shift amount k in the x-direction. It shows how much the second image signal I2 in the remote area is correlated, and the smaller the value, the larger (similarly) the correlation. As shown in FIG. 19, the parallax evaluation value R (u, v) (k) varies depending on the value of the shift amount k, and has a minimum value when the shift amount k = Δg (u, v). This is because the image signal obtained by moving the u-th block B (u, v) in the x-direction and the v-th block in the y-direction by −Δg (u, v) in the second image signal I2 is It shows that it is most correlated (similar) with the first image signal I1. Therefore, it can be seen that the parallax in the x direction between the first imaging signal I1 and the second image signal I2 for the block B (u, v) is Δg (u, v). Hereinafter, this Δg (u, v) is referred to as an approximate parallax value Δg (u, v) of the block B (u, v). In this way, the approximate parallax value Δg (u, v) of B (u, v) is obtained from u = 0 to M−1 and v = 0 to N−1. Next, step S3242 is executed.

ステップS3242において、詳細な視差を演算する。この動作は、実施の形態1と同様であり説明を省略する。ただし、視差評価値R(u,v)(k)として、式(30)を利用する。次に、ステップS3243を実行する。   In step S3242, detailed parallax is calculated. This operation is the same as in the first embodiment, and a description thereof is omitted. However, Expression (30) is used as the parallax evaluation value R (u, v) (k). Next, step S3243 is executed.

ステップS1243において、サブピクセルで視差を演算する。この動作は、実施の形態1と同様であり説明を省略する。ただし、視差評価値R(u,v)(k)として、式(30)を利用する。次に、ステップS3244を実行する。   In step S1243, the parallax is calculated with subpixels. This operation is the same as in the first embodiment, and a description thereof is omitted. However, Expression (30) is used as the parallax evaluation value R (u, v) (k). Next, step S3244 is executed.

ステップS3244において、視差演算を終了し、上位のルーチンへ戻る。従って、次に、図33のステップS3250を実行する。   In step S3244, the parallax calculation is terminated, and the process returns to the upper routine. Therefore, next, step S3250 of FIG. 33 is executed.

ステップS3250において、視差補正部345は、システム制御部331のメモリ上のデータを利用し、ブロックごとに、そのブロックに対応する視差値を用いて視差補正したのち、画像合成する。そして、その結果をシステム制御部331のメモリに書き込む。第1の撮像素子123aおよび第2の撮像素子123bは、主に物体光の緑色成分を受光するため、第1の撮像信号I1、および第2の撮像信号I2は、物体光の緑色成分の情報信号である。また、第2の撮像信号123cは、主に物体光の赤色成分を受光するため、第3の撮像信号I3は、物体光の赤色成分の情報信号である。さらに、第4の撮像信号123dは、主に物体光の青色成分を受光するため、第4の撮像信号I4は、物体光の青色成分の情報信号である。第1の撮像素子123aと第4の撮像素子123dとの視差が(Δf(u,v)、0)であると予測されたため、下記式(31)のように、画素座標(x、y)における緑色の強度を示すG(x,y)を、第1の撮像信号I1(x,y)、および第2の撮像信号I2(x-Δf(u,v),y)の平均とする。さらに、第1の撮像素子123aと第3の撮像素子123cの視差が(0、Δf(u,v)・Dy/Dx)であると予測されたため、下記式(32)のように、(x、y)における赤色の強度を示すR(x,y)を、第3の撮像信号I3(x,y-Δf(u,v)・Dy/Dx)とする。また、第1の撮像素子123aと第4の撮像素子123dの視差が(Δf(u,v)、Δf(u,v)・Dy/Dx)であると予測されたため、下記式(33)のように、画素座標(x、y)における青色の強度を示すB(x,y)を、第4の撮像信号I4(x-Δf(u,v),y-Δf(u,v)・Dy/Dx)とする。なお、視差値Δf(u,v)としては、画素座標(x、y)が含まれるブロックB(u,v)の視差値Δf(u,v)を利用する。次に、ステップS3700を実行する。   In step S3250, the parallax correction unit 345 uses the data on the memory of the system control unit 331 to correct the parallax for each block using the parallax value corresponding to the block, and then combines the images. Then, the result is written in the memory of the system control unit 331. Since the first image sensor 123a and the second image sensor 123b mainly receive the green component of the object light, the first image signal I1 and the second image signal I2 are information on the green component of the object light. Signal. Further, since the second imaging signal 123c mainly receives the red component of the object light, the third imaging signal I3 is an information signal of the red component of the object light. Furthermore, since the fourth imaging signal 123d mainly receives the blue component of the object light, the fourth imaging signal I4 is an information signal of the blue component of the object light. Since the parallax between the first image sensor 123a and the fourth image sensor 123d is predicted to be (Δf (u, v), 0), the pixel coordinates (x, y) are expressed by the following equation (31). G (x, y) indicating the green intensity at is the average of the first imaging signal I1 (x, y) and the second imaging signal I2 (x−Δf (u, v), y). Furthermore, since the parallax between the first image sensor 123a and the third image sensor 123c is predicted to be (0, Δf (u, v) · Dy / Dx), (x , Y) R (x, y) indicating the intensity of red is a third imaging signal I3 (x, y-Δf (u, v) · Dy / Dx). Further, since the parallax between the first image sensor 123a and the fourth image sensor 123d is predicted to be (Δf (u, v), Δf (u, v) · Dy / Dx), the following equation (33) is satisfied. In this way, B (x, y) indicating the blue intensity at the pixel coordinates (x, y) is expressed as the fourth imaging signal I4 (x−Δf (u, v), y−Δf (u, v) · Dy. / Dx). As the parallax value Δf (u, v), the parallax value Δf (u, v) of the block B (u, v) including the pixel coordinates (x, y) is used. Next, step S3700 is executed.

G(x,y) = [I1(x,y) + I2(x-Δf(u,v),y)]/2 ・・・(31)
R(x,y) = I3(x,y-Δf(u,v)・Dy/Dx) ・・・(32)
B(x,y) = I4(x-Δf(u,v),y-Δf(u,v)・Dy/Dx) ・・・(33)
G (x, y) = [I1 (x, y) + I2 (x−Δf (u, v), y)] / 2 (31)
R (x, y) = I3 (x, y-Δf (u, v) · Dy / Dx) (32)
B (x, y) = I4 (x-Δf (u, v), y-Δf (u, v) · Dy / Dx) (33)

ステップS3700において、距離演算部146は、システム制御部331のメモリ上のデータを利用し、距離演算を行う。そして、その結果をシステム制御部331のメモリに書き込む。この動作は、実施の形態1のステップS1700と同様であり説明を省略する。次に、ステップS3800を実行する。   In step S3700, the distance calculation unit 146 uses the data on the memory of the system control unit 331 to perform a distance calculation. Then, the result is written in the memory of the system control unit 331. This operation is the same as that in step S1700 of the first embodiment, and a description thereof is omitted. Next, step S3800 is executed.

ステップS3800において、結果を出力する。この動作は、実施の形態1のステップS1800と同様であり、説明を省略する。次に、S3900を実行する。   In step S3800, the result is output. This operation is the same as step S1800 in the first embodiment, and a description thereof will be omitted. Next, S3900 is executed.

ステップS3900において、動作を終了する。   In step S3900, the operation ends.

以上のように構成し、動作させることにより、実施の形態1と同様の効果を得る。   By configuring and operating as described above, the same effects as those of the first embodiment can be obtained.

以上、本発明のいくつかの実施形態を説明したが、これらはあくまでも例示であって、本発明の実施に際しては、以下のとおり、種々の変更が可能である。   As mentioned above, although some embodiment of this invention was described, these are illustration to the last, Comprising: When implementing this invention, various changes are possible as follows.

例えば、実施の形態1から実施の形態3の撮像装置において、演算された視差をそのまま利用したが、適宜リミットしてもよい。レンズ特性によっては被写体距離Aがある値よりも小さいとき、画像が不鮮明となる。そのため、この値を被写体距離Aの最小値と定めれば、視差の最大値を定められる。この値よりも大きい視差は、誤差であるとして無視してもよい。また、このような場合、視差評価値が2番目に小さい値を視差として採用してもよい。   For example, in the imaging devices according to the first to third embodiments, the calculated parallax is used as it is, but it may be appropriately limited. Depending on the lens characteristics, when the subject distance A is smaller than a certain value, the image becomes unclear. Therefore, if this value is determined as the minimum value of the subject distance A, the maximum value of parallax can be determined. Parallax greater than this value may be ignored as an error. In such a case, a value having the second smallest parallax evaluation value may be adopted as the parallax.

また、視差評価値に目立つ極値が2つあるときは、より大きい方の視差を採用してもよい。このようなブロックには、被写体と背景が含まれており、被写体距離と背景距離とが異なるため、極値が2つ現れる。背景距離と比較して被写体距離は小さいため、背景の視差と比較して被写体の視差は大きい。ここで、大きい方の視差を採用すれば、背景の視差の影響は低減できないが、画質に直接影響する被写体の視差の影響を低減できる。   Further, when there are two extreme values that are conspicuous in the parallax evaluation value, the larger parallax may be adopted. Such a block includes a subject and a background, and since the subject distance and the background distance are different, two extreme values appear. Since the subject distance is smaller than the background distance, the subject parallax is larger than the background parallax. Here, if 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.

なお、第1の実施の形態、および第2の実施の形態の撮像装置では、視差を第1の撮像信号I1(主に緑色を示す)と第4の撮像信号I4(主に緑色を示す)とから演算したが、本発明はこれに限定されない。例えば、紫色の被写体は緑色成分が少なく、青色成分、赤色成分を多く含むため、第1の撮像信号I1(主に緑色を示す)と第4の撮像信号I4(主に緑色を示す)とから演算できない場合、第2の撮像信号I2(主に青色を示す)と第3の撮像信号I3(主に赤色を示す)とから視差を演算してもよい。また、第1の視差信号I1(主に緑色を示す)と第4の視差信号I4(主に緑色を示す)とから視差が演算不能であり、かつ、第2の撮像信号I2(主に青色を示す)と第3の撮像信号I3(主に赤色を示す)とから視差が演算不能であれば、視差の影響がないものとみなし、視差なしとすればよい。   Note that in the imaging devices of the first embodiment and the second embodiment, the first imaging signal I1 (mainly showing green) and the fourth imaging signal I4 (mainly showing green) are parallax. However, the present invention is not limited to this. For example, since a purple subject has a small green component and a large amount of blue and red components, the first imaging signal I1 (mainly green) and the fourth imaging signal I4 (mainly green) are used. If the calculation cannot be performed, the parallax may be calculated from the second imaging signal I2 (mainly showing blue) and the third imaging signal I3 (mainly showing red). In addition, the parallax cannot be calculated from the first parallax signal I1 (mainly green) and the fourth parallax signal I4 (mainly green), and the second imaging signal I2 (mainly blue) If the parallax cannot be calculated from the third imaging signal I3 (mainly red), it is considered that there is no parallax effect, and no parallax is required.

第3の実施の形態についても同様である。例えば、紫色の被写体は緑色成分が少なく、青色成分、赤色成分を多く含むため、第1の撮像信号I1(主に緑色を示す)と第2の撮像信号I2(主に緑色を示す)とから演算できない場合、第3の撮像信号I3(主に赤色を示す)と第4の撮像信号I4(主に青色を示す)とから視差を演算してもよい。また、第1の視差信号I1(主に緑色を示す)と第2の視差信号I2(主に緑色を示す)とから視差が演算不能であり、かつ、第3の撮像信号I3(主に赤色を示す)と第4の撮像信号I4(主に青色を示す)とから視差が演算不能であれば、視差の影響がないものとみなし、視差なしとすればよい。   The same applies to the third embodiment. For example, since a purple subject has a small green component and a large amount of blue and red components, the first imaging signal I1 (mainly green) and the second imaging signal I2 (mainly green) are used. If the calculation is impossible, the parallax may be calculated from the third imaging signal I3 (mainly showing red) and the fourth imaging signal I4 (mainly showing blue). Further, the parallax cannot be calculated from the first parallax signal I1 (mainly showing green) and the second parallax signal I2 (mainly showing green), and the third imaging signal I3 (mainly red) If the parallax cannot be calculated from the fourth imaging signal I4 (mainly blue), it is considered that there is no influence of the parallax, and no parallax is required.

また、第1の実施の形態、および第2の実施の形態の撮像装置をカメラに搭載するとき、上側に第2の撮像素子123b(主に青色を結像する)が、下側に第3の撮像素子123c(主に赤色を結像する)が配置されるように、第1〜第4の撮像素子123a〜123dを配置することにより、上側が青色に敏感となり、下側が赤色に敏感となるので、風景写真の色再現をより自然にできる。   In addition, when the imaging device according to the first embodiment and the second embodiment is mounted on a camera, the second imaging element 123b (mainly forms an image of blue) on the upper side and the third on the lower side. By arranging the first to fourth image sensors 123a to 123d so that the image sensor 123c (mainly imaging red) is arranged, the upper side is sensitive to blue and the lower side is sensitive to red. Therefore, the color reproduction of landscape photos can be made more natural.

また、第3の実施の形態の撮像装置をカメラに搭載するとき、第1の撮像素子123a(主に緑色を結像する。視差補正時に座標変換しない)の下側に第3の撮像素子123c(主に赤色を結像する。視差補正時にy方向に座標変換する)を配置し、第1の撮像素子123aの対角に第4の撮像素子123d(主に青色を結像する。視差補正時にx方向、y方向ともに座標変換する)が配置されるように、第1〜第4の撮像素子123a〜123dを配置することにより、青色と比較し赤色の座標変換による移動を小さくする。被視感度は、青色よりも赤色の方が大きいため、青色の色むらと比較し赤色の色むらの方が目立つ。第3の実施の形態の撮像装置のように配置し、青色と比較し赤色の座標変換による移動を小さくすることにより、色むら発生時においても、色むらが目立たない撮像装置を実現する。   Further, when the image pickup apparatus according to the third embodiment is mounted on a camera, the third image pickup device 123c below the first image pickup device 123a (mainly forms an image of green color and does not perform coordinate conversion during parallax correction). (Mainly forms an image of red. Coordinate conversion is performed in the y direction during parallax correction), and a fourth image sensor 123d (mainly forms an image of blue color on the diagonal of the first image sensor 123a). By arranging the first to fourth imaging elements 123a to 123d so that the coordinate conversion is sometimes performed in both the x direction and the y direction, the movement due to the coordinate conversion of the red color is reduced compared to the blue color. The visual sensitivity is higher in red than in blue, and therefore, red color unevenness is more conspicuous than blue color unevenness. By disposing like the image pickup apparatus of the third embodiment and reducing movement by coordinate conversion of red compared to blue, an image pickup apparatus in which color unevenness is not noticeable even when color unevenness occurs is realized.

また、実施の形態1から実施の形態3の撮像装置は、焦点制御を行うがアクチュエータを動作させない場合があってもよい。また、アクチュエータを省き、焦点制御を省略してもよい。   In addition, the imaging apparatuses according to the first to third embodiments perform focus control but may not operate the actuator. Further, the actuator may be omitted and focus control may be omitted.

また、実施の形態1から実施の形態3において、撮像素子123は、第1の撮像素子123a、第2の撮像素子123b、第3の撮像素子123c、および第4の撮像素子123dから構成され、撮像信号入力部133は、第1の撮像信号入力部133a、第2の撮像信号入力部133b、第3の撮像信号入力部133c、および第4の撮像信号入力部133dから構成された。しかし、撮像素子123を1つの撮像素子で構成し、この受光面上の異なる位置に第1〜第4のレンズ部113a〜113dによる4つの像を形成しても良い。また、撮像信号入力部133が1つの撮像素子123からの信号が入力される1つの撮像信号入力部から構成されてもよい。この場合、システム制御部131、231、331のメモリ上に置かれたデータから適宜領域を選択し、第1の撮像信号I1、第2の撮像信号I2、第3の撮像信号I3、および第4の撮像信号I4とすればよい。   In Embodiments 1 to 3, 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 123d. 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. However, the image sensor 123 may be configured by one image sensor, and four images may be formed by the first to fourth lens portions 113a to 113d at different positions on the light receiving surface. Further, the imaging signal input unit 133 may be configured by one imaging signal input unit to which a signal from one imaging element 123 is input. In this case, a region is appropriately selected from data placed on the memory of the system control units 131, 231, and 331, and the first imaging signal I1, the second imaging signal I2, the third imaging signal I3, and the fourth imaging signal are selected. The imaging signal I4 may be used.

また、実施の形態1から実施の形態3において、視差評価値R(u,v)(k)として式(17)(30)のような差分絶対値総和を用いたがこれに限定されない。例えば、実施の形態1、および実施の形態2において、差分の二乗値の総和や、第1の撮像信号I1からブロック内の平均を差分したものと第4の撮像信号I4からブロック内の平均を差分したものとの差分の二乗値の総和や、第1の撮像信号I1からブロック内の平均を差分したものと第4の撮像信号I4からブロック内の平均を差分したものとの差分の二乗値の総和や、第1の撮像信号I1からブロック内の平均を差分したものと第4の撮像信号I4からブロック内の平均を差分したものとの差分の二乗値の総和を第1の撮像信号I1からブロック内の平均を差分したものの二乗値の総和の平方根で除し第4の撮像信号I4からブロック内の平均を差分したものの二乗値の総和の平方根で除したものを利用してもよい。   In Embodiments 1 to 3, the sum of absolute differences as in equations (17) and (30) is used as the parallax evaluation value R (u, v) (k), but the present invention is not limited to this. For example, in the first embodiment and the second embodiment, the sum of the squares of the differences, the difference between the first imaging signal I1 and the average in the block, and the fourth imaging signal I4 in the block average are calculated. The sum of the squares of the difference from the difference and the square value of the difference between the difference between the first imaging signal I1 and the average within the block from the fourth imaging signal I4. Or the sum of the squares of the difference between the difference between the first imaging signal I1 and the average within the block from the fourth imaging signal I4 and the difference between the averages within the block from the first imaging signal I1 Alternatively, a difference obtained by dividing the average in the block by the square root of the sum of the square values and dividing the average in the block from the fourth imaging signal I4 by the square root of the sum of the square values may be used.

また、実施の形態1から実施の形態3において、格子状に4つの撮像領域を設けたがこれに限定されない。例えば、第1の撮像素子、第2の撮像素子、第3の撮像素子、第4の撮像素子が1直線上になるように配置し、第1の撮像信号I1が主に青色を示し、第2の撮像信号I2が主に緑色を示し、第3の撮像信号I3が主に緑色を示し、第4の撮像信号が主に赤色を示すように変更してもよい。この場合、下記式(34)のように視差評価関数を変更し、下記式(35)(36)(37)のように視差補正するなどの変更が必要である。   In the first to third embodiments, four imaging regions are provided in a grid pattern, but the present invention is not limited to this. For example, the first image sensor, the second image sensor, the third image sensor, and the fourth image sensor are arranged so as to be on one straight line, the first image signal I1 mainly shows blue, Alternatively, the second imaging signal I2 may be mainly green, the third imaging signal I3 may be mainly green, and the fourth imaging signal may be mainly red. In this case, it is necessary to change the parallax evaluation function as shown in the following formula (34) and to correct the parallax as shown in the following formulas (35), (36), and (37).

R(u,v)(k) = ΣΣ|I2(x,y)-I3(x-k,y)| ・・・(34)
G(x,y) = [I2(x,y) + I3(x-Δf(u,v),y)]/2 ・・・(35)
B(x,y) = I1(x+Δf(u,v),y) ・・・(36)
R(x,y) = I4(x-2*Δf(u,v),y) ・・・(37)
R (u, v) (k) = ΣΣ | I2 (x, y) -I3 (xk, y) | (34)
G (x, y) = [I2 (x, y) + I3 (x-Δf (u, v), y)] / 2 (35)
B (x, y) = I1 (x + Δf (u, v), y) (36)
R (x, y) = I4 (x-2 * Δf (u, v), y) (37)

また、実施の形態1から実施の形態3において、4つの撮像領域を設けたがこれに限定されない。例えば、3つの撮像領域を持ち、第1の撮像素子、第2の撮像素子、第3の撮像素子が1直線上になるように配置し、第1の撮像信号I1が主に青色を示し、第2の撮像信号I2が主に緑色を示し、第3の撮像信号I3が主に赤色を示すように変更してもよい。この場合、下記式(38)、(39)のように視差評価関数を変更し、下記式(40)のように緑色成分Gを作成し、式(38)を用いて求めた視差Δf(u,v)を利用し下記式(41)のように青色成分Bを作成し、式(39)を用いて求めた視差Δf(u,v)を利用し下記式(42)のように赤色成分Rを作成し、視差補正するなどの変更が必要である。また、式(38)(39)の代わりに、正規化相関関数を使用してもよい。   In Embodiments 1 to 3, four imaging regions are provided, but the present invention is not limited to this. For example, it has three imaging areas, the first imaging element, the second imaging element, and the third imaging element are arranged so as to be on one straight line, and the first imaging signal I1 mainly shows blue, You may change so that the 2nd imaging signal I2 may mainly show green and the 3rd imaging signal I3 may mainly show red. In this case, the parallax evaluation function is changed as in the following formulas (38) and (39), the green component G is created as in the following formula (40), and the parallax Δf (u calculated using the formula (38) , v) is used to create a blue component B as shown in the following equation (41), and the parallax Δf (u, v) obtained using the equation (39) is used as a red component as shown in the following equation (42) Changes such as creating R and correcting parallax are required. Further, a normalized correlation function may be used instead of the equations (38) and (39).

R(u,v)(k) = ΣΣ|I2(x,y)-I1(x+k,y)| ・・・(38)
R(u,v)(k) = ΣΣ|I2(x,y)-I3(x-k,y)| ・・・(39)
G(x,y) = I2(x,y) ・・・(40)
B(x,y) = I1(x+Δf(u,v),y) ・・・(41)
R(x,y) = I3(x-Δf(u,v),y) ・・・(42)
R (u, v) (k) = ΣΣ | I2 (x, y) -I1 (x + k, y) | (38)
R (u, v) (k) = ΣΣ | I2 (x, y) -I3 (xk, y) | (39)
G (x, y) = I2 (x, y) (40)
B (x, y) = I1 (x + Δf (u, v), y) (41)
R (x, y) = I3 (x-Δf (u, v), y) (42)

実施の形態1から実施の形態3の撮像装置において、ブロックにおける視差Δf(u,v)を用いて視差補正を行ったが、ブロック毎の視差Δf(u,v)を用いて各画素の視差Δ(x,y)を定め、この各画素の視差Δ(x,y)を用いて視差補正を行ってもよい。   In the imaging device according to the first to third embodiments, the parallax correction is performed using the parallax Δf (u, v) in the block, but the parallax of each pixel using the parallax Δf (u, v) for each block Δ (x, y) may be determined, and parallax correction may be performed using the parallax Δ (x, y) of each pixel.

なお、実施の形態1から実施の形態3において、ブロックを矩形状に分割したが、これに限定されない。例えば、エッジを検出し、エッジに基づき非矩形状のブロックに分割してもよい。また、ブロック毎の領域の視差を求めずに、エッジを複数の線分に分割し、この線分の視差を求めてもよい。また、あるブロックにおいて求められた視差を評価し、ブロックを分割したり結合してもよい。   In the first to third embodiments, the blocks are divided into rectangular shapes, but the present invention is not limited to this. For example, an edge may be detected and divided into non-rectangular blocks based on the edge. Further, instead of obtaining the parallax of the area for each block, the edge may be divided into a plurality of line segments, and the parallax of the line segments may be obtained. Moreover, the parallax calculated | required in a certain block may be evaluated and a block may be divided | segmented or combined.

本発明の撮像装置は、小型化、薄型化が可能な撮像装置であるため、カメラ機能を備えた携帯電話、デジタルスチルカメラ、車載用カメラ、および監視用カメラなどに有用である。   Since the imaging device of the present invention is an imaging device 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.

本発明の実施の形態1に係る撮像装置の構成を示す断面図Sectional drawing which shows the structure of the imaging device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る撮像装置のレンズの上面図1 is a top view of a lens of an imaging apparatus according to Embodiment 1 of the present invention. 本発明の実施の形態1に係る撮像装置の回路部の上面図FIG. 3 is a top view of a circuit unit of the imaging apparatus according to Embodiment 1 of the present invention. 本発明の実施の形態1に係る撮像装置のカラーフィルタの特性図FIG. 6 is a characteristic diagram of the color filter of the imaging apparatus according to Embodiment 1 of the present invention. 本発明の実施の形態1に係る撮像装置のIRフィルタの特性図IR filter characteristic diagram of the imaging apparatus according to Embodiment 1 of the present invention 本発明の実施の形態1に係る撮像装置において、無限遠にある物体像の位置を説明するための図The figure for demonstrating the position of the object image in infinity in the imaging device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る撮像装置において、有限距離の位置にある物体像の位置を説明するための図The figure for demonstrating the position of the object image in the position of a finite distance in the imaging device which concerns on Embodiment 1 of this invention. (a)は本発明の実施の形態1に係る撮像装置において、合焦時の画像とコントラスト評価値の関係を説明する図、(b)は本発明の実施の形態1に係る撮像装置において、非合焦時の画像とコントラスト評価値の関係を説明する図(A) is a figure explaining the relationship between the image at the time of focusing and the contrast evaluation value in the imaging apparatus according to Embodiment 1 of the present invention, and (b) is the imaging apparatus according to Embodiment 1 of the present invention. The figure explaining the relationship between the image at the time of out-of-focus and the contrast evaluation value 本発明の実施の形態1に係る撮像装置のレンズ位置とコントラスト評価値の関係を説明する図The figure explaining the relationship between the lens position of the imaging device which concerns on Embodiment 1 of this invention, and contrast evaluation value 本発明の実施の形態1に係る撮像装置のブロック図1 is a block diagram of an imaging apparatus according to Embodiment 1 of the present invention. 本発明の実施の形態1に係る撮像装置の動作を示すフローチャートThe flowchart which shows operation | movement of the imaging device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る自動焦点制御の動作を示すフローチャートThe flowchart which shows the operation | movement of the automatic focus control which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る撮像装置の撮像信号の座標を説明する図The figure explaining the coordinate of the imaging signal of the imaging device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る視差補正の動作を示すフローチャートThe flowchart which shows the operation | movement of the parallax correction which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る撮像装置において、画像伸張を説明する図The figure explaining image expansion | extension in the imaging device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る撮像装置において、ブロック分割を説明する図The figure explaining block division in the imaging device concerning Embodiment 1 of the present invention. 本発明の実施の形態1に係る視差演算の動作を示すフローチャートThe flowchart which shows the operation | movement of the parallax calculation which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る撮像装置において、視差評価値の演算領域を説明する図The figure explaining the calculation area | region of a parallax evaluation value in the imaging device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る撮像装置の概略の視差と視差評価値との関係を説明する図The figure explaining the relationship between the rough parallax and parallax evaluation value of the imaging device which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る撮像装置の詳細な視差と視差評価値との関係を説明する図The figure explaining the relationship between the detailed parallax of the imaging device which concerns on Embodiment 1 of this invention, and a parallax evaluation value. 本発明の実施の形態2に係る撮像装置の構成を示す断面図Sectional drawing which shows the structure of the imaging device which concerns on Embodiment 2 of this invention. 本発明の実施の形態2に係る撮像装置のブロック図Block diagram of an imaging apparatus according to Embodiment 2 of the present invention 本発明の実施の形態2に係る視差演算の動作を示すフローチャートThe flowchart which shows the operation | movement of the parallax calculation which concerns on Embodiment 2 of this invention. 本発明の実施の形態2に係る撮像装置において、視差評価値の演算領域を説明する図The figure explaining the calculation area | region of a parallax evaluation value in the imaging device which concerns on Embodiment 2 of this invention. 本発明の実施の形態2に係る撮像装置のサブピクセルの視差と視差評価値との関係を説明する図The figure explaining the relationship between the parallax of the sub pixel of the imaging device which concerns on Embodiment 2 of this invention, and a parallax evaluation value. 本発明の実施の形態3に係る撮像装置の構成を示す断面図Sectional drawing which shows the structure of the imaging device which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る撮像装置の回路部の上面図FIG. 6 is a top view of a circuit unit of an imaging apparatus according to Embodiment 3 of the present invention. 本発明の実施の形態3に係る撮像装置のカラーフィルタの特性図Characteristic diagram of color filter of imaging device according to embodiment 3 of the present invention 本発明の実施の形態3に係る撮像装置のブロック図Block diagram of an imaging apparatus according to Embodiment 3 of the present invention 本発明の実施の形態3に係る撮像装置の動作を示すフローチャートThe flowchart which shows operation | movement of the imaging device which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る視差補正の動作を示すフローチャートThe flowchart which shows the operation | movement of the parallax correction which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る撮像装置において、ブロック分割を説明する図The figure explaining block division in the imaging device concerning Embodiment 3 of the present invention. 本発明の実施の形態3に係る視差演算の動作を示すフローチャートThe flowchart which shows the operation | movement of the parallax calculation which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る撮像装置において、視差評価値の演算領域を説明する図The figure explaining the calculation area | region of a parallax evaluation value in the imaging device which concerns on Embodiment 3 of this invention. 特許文献1のカメラモジュールの構成を示す断面図Sectional drawing which shows the structure of the camera module of patent document 1 特許文献2のカメラモジュールの一例を示す図The figure which shows an example of the camera module of patent document 2

符号の説明Explanation of symbols

101、201、301 カメラモジュール
110、310 レンズモジュール
111 鏡筒
112 上部カバーガラス
113、313 レンズ
113a、313a 第1のレンズ部
113b、313b 第2のレンズ部
113c、313c 第3のレンズ部
113d、313d 第4のレンズ部
114 アクチュエータ固定部
115 アクチュエータ可動部
120、220、320 回路部
121 基板
122 パッケージ
123 撮像素子
123a 第1の撮像素子
123b 第2の撮像素子
123c 第3の撮像素子
123d 第4の撮像素子
124、324 パッケージカバーガラス
124a、324a 第1のカラーフィルタ
124b、324b 第2のカラーフィルタ
124c、324c 第3のカラーフィルタ
124d、324d 第4のカラーフィルタ
124e 遮光部
125、225、325 SLSI
126 アンプ
131、231、331 システム制御部
132 撮像素子駆動部
133 撮像信号入力部
133a 第1の撮像信号入力部
133b 第2の撮像信号入力部
133c 第3の撮像信号入力部
133d 第4の撮像信号入力部
134 アクチュエータ操作量出力部
135、235、335 画像処理部
136 入出力部
141 自動焦点制御部
142 画像伸張部
143、343 ブロック分割部
144、244、344 視差演算部
145、345 視差補正部
146 距離演算部
101, 201, 301 Camera module 110, 310 Lens module 111 Lens barrel 112 Upper cover glass 113, 313 Lens 113a, 313a First lens part 113b, 313b Second lens part 113c, 313c Third lens part 113d, 313d Fourth lens unit 114 Actuator fixing unit 115 Actuator movable unit 120, 220, 320 Circuit unit 121 Substrate 122 Package 123 Image sensor 123a First image sensor 123b Second image sensor 123c Third image sensor 123d Fourth image sensor Element 124, 324 Package cover glass 124a, 324a First color filter 124b, 324b Second color filter 124c, 324c Third color filter 124d, 324d Fourth color Filter 124e shielding portion 125, 225, 325 SLSI
126 Amplifier 131 231 331 System control unit 132 Image sensor drive unit 133 Imaging signal input unit 133a First imaging signal input unit 133b Second imaging signal input unit 133c Third imaging signal input unit 133d Fourth imaging signal Input unit 134 Actuator operation amount output unit 135, 235, 335 Image processing unit 136 Input / output unit 141 Automatic focus control unit 142 Image expansion unit 143, 343 Block division unit 144, 244, 344 Parallax calculation unit 145, 345 Parallax correction unit 146 Distance calculator

Claims (10)

それぞれが少なくとも1枚のレンズを含む複数のレンズ部と、
前記複数のレンズ部に一対一に対応し、対応する前記レンズ部の光軸方向に対して略垂直な受光面をそれぞれ備える複数の撮像領域と、
前記複数の撮像領域からそれぞれ出力される複数の撮像信号が入力される撮像信号入力部と、
前記複数の撮像信号のうちの少なくとも1つの撮像信号を複数のブロックに分割するブロック分割部と、
前記撮像信号を用いて、前記ブロックごとに、前記複数のレンズ部がそれぞれ形成する像間の視差を、画素の分解能よりも細かな分解能で演算する視差演算部と、
前記視差に基づいて前記複数の撮像信号を補正し画像を合成する視差補正部と、を有する撮像装置。
A plurality of lens portions each including at least one lens;
A plurality of imaging regions each corresponding to the plurality of lens units, each having a light receiving surface substantially perpendicular to the optical axis direction of the corresponding lens unit;
An imaging signal input unit to which a plurality of imaging signals respectively output from the plurality of imaging regions are input;
A block dividing unit that divides at least one of the plurality of imaging signals into a plurality of blocks;
A parallax calculation unit that calculates the parallax between images formed by the plurality of lens units for each of the blocks with a resolution finer than the resolution of a pixel, using the imaging signal;
An imaging apparatus comprising: a parallax correction unit that corrects the plurality of imaging signals based on the parallax and combines the images.
前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号とを、前記ブロックのずらし量を変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値の極値を与える前記ずらし量である極値ずらし量を得て、前記極値ずらし量の前記視差評価値と前記極値ずらし量の前後のずらし量の前記視差評価値とに基づき、前記視差を画素の分解能よりも細かな分解能で演算する、請求項1に記載の撮像装置。   The parallax calculation unit includes an imaging signal indicating an image formed by one lens unit among the plurality of lens units and an imaging signal indicating an image formed by a lens unit different from the one lens unit. A plurality of parallax evaluation values are created by changing the shift amount for multiple times, and an extreme value shift amount that is the shift amount that gives the extreme value of the parallax evaluation value is obtained. The imaging apparatus according to claim 1, wherein the parallax is calculated with a resolution finer than a resolution of a pixel based on the parallax evaluation value and the parallax evaluation value of the shift amount before and after the extreme value shift amount. 前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号とを、前記ブロックのずらし量を画素の分解能よりも細かな分解能で変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値の極値を与える前記ずらし量である極値ずらし量を得て、前記極値ずらし量の前記視差評価値と前記極値ずらし量に基づき、前記視差を画素の分解能よりも細かな分解能で演算する、請求項1に記載の撮像装置。   The parallax calculation unit includes an imaging signal indicating an image formed by one lens unit among the plurality of lens units and an imaging signal indicating an image formed by a lens unit different from the one lens unit. A plurality of parallax evaluation values are created by changing the shift amount at a resolution finer than the resolution of the pixel and comparing a plurality of times, and an extreme value shift amount that is the shift amount that gives the extreme value of the parallax evaluation value is determined. The imaging apparatus according to claim 1, wherein the parallax is calculated with a resolution finer than a pixel resolution based on the parallax evaluation value of the extreme value shift amount and the extreme value shift amount. 前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号とを、前記ブロックのずらし量を変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値の極値を与える前記ずらし量である極値ずらし量を得て、前記極値ずらし量の前後で前記ブロックを前記ずらし量よりも小さくずらして前記撮像信号を比較することにより微少ずらし時視差評価値を作成し、前記視差評価値と前記微少ずらし時評価値とに基づき前記視差を演算する、請求項1に記載の撮像装置。   The parallax calculation unit includes an imaging signal indicating an image formed by one lens unit among the plurality of lens units and an imaging signal indicating an image formed by a lens unit different from the one lens unit. A plurality of parallax evaluation values are created by changing the shift amount for multiple times, and an extreme value shift amount that is the shift amount that gives the extreme value of the parallax evaluation value is obtained. Creating a slightly shifted parallax evaluation value by comparing the imaging signal by shifting the block smaller than the shift amount before and after, and calculating the parallax based on the parallax evaluation value and the slightly shifted evaluation value; The imaging device according to claim 1. 前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号を間引いた信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号を間引いた信号とを、前記ブロックのずらし量を変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値に基づき前記視差を演算する、請求項1に記載の撮像装置。   The parallax calculation unit includes a signal obtained by thinning out an imaging signal indicating an image formed by one lens unit among the plurality of lens units, and an imaging signal indicating an image formed by a lens unit different from the one lens unit. The imaging device according to claim 1, wherein a plurality of parallax evaluation values are created by comparing the thinned signal with a plurality of times by changing a shift amount of the block, and the parallax is calculated based on the parallax evaluation values. . 前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号を千鳥状に間引いた信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号を千鳥状に間引いた信号とを、前記ブロックのずらし量を変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値に基づき前記視差を演算する、請求項5に記載の撮像装置。   The parallax calculation unit indicates a signal obtained by thinning out an imaging signal indicating an image formed by one lens unit among the plurality of lens units in a zigzag manner, and an image formed by a lens unit different from the one lens unit. The parallax is calculated based on the parallax evaluation value by creating a plurality of parallax evaluation values by comparing a signal obtained by thinning out the imaging signals in a zigzag manner multiple times by changing a shift amount of the block. 5. The imaging device according to 5. 前記視差演算部は、前記複数のレンズ部のうち一のレンズ部が形成する像を示す撮像信号を一行おきに間引いた信号と、前記一のレンズ部とは異なるレンズ部が形成する像を示す撮像信号を一行おきに間引いた信号とを、前記ブロックのずらし量を変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値に基づき前記視差を演算する、請求項5に記載の撮像装置。   The parallax calculation unit indicates a signal obtained by thinning out an imaging signal indicating an image formed by one lens unit among the plurality of lens units, and an image formed by a lens unit different from the one lens unit. The parallax is calculated based on the parallax evaluation value by creating a plurality of parallax evaluation values by comparing a signal obtained by thinning the imaging signal every other line with a plurality of times by changing a shift amount of the block. 5. The imaging device according to 5. 前記視差演算部は、前記複数のレンズ部のうち前記撮像素子の対角方向に並べられた2つのレンズ部の撮像信号を比較し前記視差を演算し、
前記2つのレンズ部は、互いの光軸間の水平方向の距離と垂直方向の距離とが異なるものであって、
前記視差演算部は、前記垂直方向の距離に対する前記水平方向の距離の比に応じて、前記撮像信号の垂直方向の画素数と水平方向の画素数とがほぼ等しくなるように、前記撮像信号を垂直方向または水平方向に伸張し、前記2つのレンズ部のうち一方のレンズ部が形成する像を示す撮像信号を伸張した信号と、前記2つのレンズ部のうち他方のレンズ部が形成する像を示す撮像信号を伸張した信号とを、前記ブロックのずらし量を45°方向に変化させて複数回比較することにより複数の視差評価値を作成し、前記視差評価値に基づき前記視差を演算する、請求項1に記載の撮像装置。
The parallax calculating unit compares the imaging signals of two lens units arranged in a diagonal direction of the imaging element among the plurality of lens units, calculates the parallax,
The two lens portions have different horizontal distances and vertical distances between optical axes,
The parallax calculation unit converts the imaging signal so that the number of pixels in the vertical direction and the number of pixels in the horizontal direction of the imaging signal are substantially equal according to a ratio of the distance in the horizontal direction to the distance in the vertical direction. A signal obtained by expanding an imaging signal indicating an image formed by one of the two lens units that extends in the vertical direction or the horizontal direction, and an image formed by the other lens unit of the two lens units. A plurality of parallax evaluation values are created by comparing a signal obtained by expanding an imaging signal shown with the block shift amount in a 45 ° direction and a plurality of comparisons, and the parallax is calculated based on the parallax evaluation values. The imaging device according to claim 1.
前記視差演算部は、前記複数のレンズ部のうち前記撮像素子の対角方向に並べられた2つのレンズ部の撮像信号を比較し前記視差を演算する、請求項1〜7のいずれか一項に記載の撮像装置。   The parallax calculation unit calculates the parallax by comparing imaging signals of two lens units arranged in a diagonal direction of the imaging element among the plurality of lens units. The imaging device described in 1. 前記視差演算部は、前記複数のレンズ部のうち前記撮像素子の横方向に並べられた2つのレンズ部の撮像信号を比較し前記視差を演算する、請求項1〜7のいずれか一項に記載の撮像装置。   The parallax calculation unit calculates the parallax by comparing image signals of two lens units arranged in a horizontal direction of the imaging element among the plurality of lens units. The imaging device described.
JP2006058082A 2006-03-03 2006-03-03 Image-taking device Withdrawn JP2007235862A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006058082A JP2007235862A (en) 2006-03-03 2006-03-03 Image-taking device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006058082A JP2007235862A (en) 2006-03-03 2006-03-03 Image-taking device

Publications (1)

Publication Number Publication Date
JP2007235862A true JP2007235862A (en) 2007-09-13

Family

ID=38555943

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006058082A Withdrawn JP2007235862A (en) 2006-03-03 2006-03-03 Image-taking device

Country Status (1)

Country Link
JP (1) JP2007235862A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011099779A (en) * 2009-11-06 2011-05-19 Ricoh Co Ltd Distance image acquisition device, and distance image acquisition processing method
WO2011086636A1 (en) * 2010-01-13 2011-07-21 パナソニック株式会社 Stereo image capturing device, stereo image capturing method, stereo image display device, and program
JP2013026672A (en) * 2011-07-15 2013-02-04 Toshiba Corp Solid-state imaging device and camera module
JP2013092552A (en) * 2011-10-24 2013-05-16 Toshiba Corp Solid state image pickup device and camera module
KR101436323B1 (en) 2008-03-10 2014-09-01 삼성전자주식회사 Apparatus for processing digital image and method for controlling thereof
US10805526B2 (en) 2017-12-15 2020-10-13 Samsung Electronics Co., Ltd. Imaging apparatus, imaging method, and computer program product

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101436323B1 (en) 2008-03-10 2014-09-01 삼성전자주식회사 Apparatus for processing digital image and method for controlling thereof
JP2011099779A (en) * 2009-11-06 2011-05-19 Ricoh Co Ltd Distance image acquisition device, and distance image acquisition processing method
WO2011086636A1 (en) * 2010-01-13 2011-07-21 パナソニック株式会社 Stereo image capturing device, stereo image capturing method, stereo image display device, and program
JPWO2011086636A1 (en) * 2010-01-13 2013-05-16 パナソニック株式会社 Stereo image pickup device, stereo image pickup method, stereo image display device, and program
JP2013026672A (en) * 2011-07-15 2013-02-04 Toshiba Corp Solid-state imaging device and camera module
US9055181B2 (en) 2011-07-15 2015-06-09 Kabushiki Kaisha Toshiba Solid-state imaging device, image processing apparatus, and a camera module having an image synthesizer configured to synthesize color information
JP2013092552A (en) * 2011-10-24 2013-05-16 Toshiba Corp Solid state image pickup device and camera module
US8988591B2 (en) 2011-10-24 2015-03-24 Kabushiki Kaisha Toshiba Solid-state imaging device, camera module, and focus adjustment method of camera module
US10805526B2 (en) 2017-12-15 2020-10-13 Samsung Electronics Co., Ltd. Imaging apparatus, imaging method, and computer program product

Similar Documents

Publication Publication Date Title
US11856291B2 (en) Thin multi-aperture imaging system with auto-focus and methods for using same
JP4322921B2 (en) Camera module and electronic device including the same
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
JPWO2006068129A1 (en) Imaging device and manufacturing method thereof
WO2017169479A1 (en) Image capturing element and image capturing device
JP2007235862A (en) Image-taking device
JP5525109B2 (en) Imaging device
JP5507761B2 (en) Imaging device
JP2011211329A (en) Imaging apparatus and control method thereof, image processing apparatus and control method thereof, and image processing program
KR20060053147A (en) Imaging apparatus and imaging method
JP6145079B2 (en) Imaging apparatus and imaging method
JP2013061560A (en) Distance measuring device, and imaging device
JP6700728B2 (en) Imaging device and imaging device
KR20100099556A (en) Photographing apparatus and method of processing image in photographing apparatus

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090512