JP2018098738A - Image processing device, imaging device, image processing method and image processing program - Google Patents

Image processing device, imaging device, image processing method and image processing program Download PDF

Info

Publication number
JP2018098738A
JP2018098738A JP2016244598A JP2016244598A JP2018098738A JP 2018098738 A JP2018098738 A JP 2018098738A JP 2016244598 A JP2016244598 A JP 2016244598A JP 2016244598 A JP2016244598 A JP 2016244598A JP 2018098738 A JP2018098738 A JP 2018098738A
Authority
JP
Japan
Prior art keywords
image
images
subject
imaging
correction
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.)
Pending
Application number
JP2016244598A
Other languages
Japanese (ja)
Inventor
昂 市原
Takashi Ichihara
昂 市原
智暁 井上
Tomoaki Inoue
智暁 井上
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2016244598A priority Critical patent/JP2018098738A/en
Publication of JP2018098738A publication Critical patent/JP2018098738A/en
Pending legal-status Critical Current

Links

Landscapes

  • Cameras In General (AREA)
  • Stereoscopic And Panoramic Photography (AREA)
  • Structure And Mechanism Of Cameras (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To create an excellent composite image having a high symmetry of a composited subject image even though centroid positions of respective PSFs of a plurality of imaging systems are deviated from each other during compositing a plurality of images acquired by using the plurality of imaging systems.SOLUTION: An image processing device 20 performs correction processing for reducing positional deviation of a subject image between a plurality of first images to the plurality of first images acquired by using a plurality of imaging systems 100 for imaging the same subject, and composites a plurality of second images in which the positional deviation of the subject images is reduced by performing the correction processing to create a composite image. The correction processing includes: first correction processing for reducing positional deviation of the subject images corresponding to parallax included in the plurality of first images; and second correction processing for reducing positional deviation of the subject images corresponding to difference of centroid positions of the plurality of imaging systems by using information on centroid positions of respective point image distribution functions of the plurality of imaging systems.SELECTED DRAWING: Figure 8

Description

本発明は、複数の撮像系により撮像を行うことで取得された複数の画像を合成する技術に関する。   The present invention relates to a technique for combining a plurality of images acquired by performing imaging with a plurality of imaging systems.

複数の撮像系により被写体を撮像することで複数の画像を生成することが可能な撮像装置がある。例えば、特許文献1には、焦点距離が互いに異なる単焦点撮像系を複数有する撮像装置が開示されている。この撮像装置では、互いに画角が異なる合焦画像を同時に生成し、広角画像の一部をトリミングして拡大した画像と縮小した望遠画像とを合成することにより複数の撮像系の画角を補間する中間画角画像を生成する。   There is an imaging apparatus capable of generating a plurality of images by imaging a subject with a plurality of imaging systems. For example, Patent Document 1 discloses an imaging apparatus having a plurality of single-focus imaging systems having different focal lengths. In this imaging device, in-focus images with different angles of view are generated at the same time, and the angle of view of multiple imaging systems is interpolated by synthesizing an enlarged image and a reduced telephoto image by trimming a part of a wide-angle image An intermediate angle of view image is generated.

特開2014−010401号公報JP, 2014-010401, A

ただし、このような複数の撮像系には、非合焦物点に対する点像分布関数(Point Spread Function:PSF)の重心位置と該非合焦物点から発して絞りの中心を通る光線(以下、絞り中心光線という)の位置とが像面上で一致しない撮像系が含まれることが多い。複数の撮像系の入射瞳面が同一平面上に位置する場合には、撮像により取得された複数の画像のそれぞれに対して視差や被写体倍率の補正を行うことで、同じ非合焦物点からの絞り中心光線の像面上での位置が互いに同じである複数の画像を生成することができる。しかしながら、前述した理由により、補正を行った複数の画像における被写体像の重心位置が一致しないことが多い。   However, in such a plurality of imaging systems, the position of the center of gravity of a point spread function (PSF) with respect to an out-of-focus object point and a light beam (hereinafter referred to as the following) that passes through the center of the stop emitted from the out-of-focus object point. In many cases, an imaging system whose position on the image plane does not coincide with the position of the aperture central ray) is included. When the entrance pupil planes of a plurality of imaging systems are located on the same plane, by correcting the parallax and the subject magnification for each of the plurality of images acquired by imaging, the same out-of-focus object point can be used. It is possible to generate a plurality of images having the same position on the image plane of the central beam of the stop. However, for the reasons described above, the position of the center of gravity of the subject image in the plurality of corrected images often does not match.

このため、特許文献1にて開示されている撮像装置において、拡大画像と縮小画像とを合成する際に、被写体像がそれらの重心位置の差の分だけずれて合成され、合成画像において対称性が低い又は互いに分離した被写体像が形成される。   For this reason, when the enlarged image and the reduced image are synthesized in the imaging apparatus disclosed in Patent Document 1, the subject images are synthesized with a shift by the difference between their center of gravity positions, and symmetry is obtained in the synthesized image. Subject images that are low or separated from each other are formed.

本発明は、複数の撮像系を用いて取得された複数の画像を合成する際に該複数の撮像系のそれぞれのPSFの重心位置が互いにずれていても、合成された被写体像の対称性が高い良好な合成画像を生成できるようにした画像処理装置等を提供する。   In the present invention, when combining a plurality of images acquired using a plurality of imaging systems, the symmetry of the combined subject image is maintained even when the barycentric positions of the PSFs of the plurality of imaging systems are shifted from each other. Provided is an image processing apparatus and the like that can generate a high-quality composite image.

本発明の一側面としての画像処理装置は、同一の被写体を撮像する複数の撮像系を用いて取得された複数の第1の画像のうち少なくとも1つの第1の画像に対して、複数の第1の画像間での被写体像の位置ずれを低減する補正処理を行う画像補正手段と、補正処理が行われることで被写体像の位置ずれが低減された複数の第2の画像を合成して合成画像を生成する画像合成手段とを有する。そして、補正処理は、複数の第1の画像に含まれる視差に応じた被写体像の位置ずれを低減する第1の補正処理と、複数の撮像系のそれぞれの点像分布関数の重心位置に関する情報を用いて、複数の撮像系の重心位置の相違に応じた被写体像の位置ずれを低減する第2の補正処理とを含むことを特徴とする。   An image processing apparatus according to an aspect of the present invention provides a plurality of first images with respect to at least one first image among a plurality of first images acquired using a plurality of imaging systems that capture the same subject. An image correction unit that performs a correction process for reducing the positional deviation of the subject image between one image and a plurality of second images in which the positional deviation of the subject image is reduced by performing the correction process are synthesized and combined. Image synthesizing means for generating an image. Then, the correction processing includes the first correction processing for reducing the positional deviation of the subject image according to the parallax included in the plurality of first images, and the information on the barycentric positions of the respective point image distribution functions of the plurality of imaging systems. And a second correction process for reducing the displacement of the subject image in accordance with the difference in the center of gravity of the plurality of imaging systems.

なお、上記画像処理装置を含む撮像装置も、本発明の他の一側面を構成する。   Note that an imaging apparatus including the image processing apparatus also constitutes another aspect of the present invention.

また、本発明の他の一側面としての画像処理方法は、同一の被写体を撮像する複数の撮像系を用いて取得された複数の第1の画像のうち少なくとも1つの第1の画像に対して、複数の第1の画像間での被写体像の位置ずれを低減する補正処理を行うステップと、補正処理が行われることで被写体像の位置ずれが低減された複数の第2の画像を合成して合成画像を生成するステップとを有する。そして、補正処理は、複数の第1の画像に含まれる視差に応じた被写体像の位置ずれを低減する第1の補正処理と、複数の撮像系のそれぞれの点像分布関数の重心位置に関する情報を用いて、複数の撮像系の重心位置の相違に応じた被写体像の位置ずれを低減する第2の補正処理とを含むことを特徴とする。   According to another aspect of the present invention, there is provided an image processing method for at least one first image among a plurality of first images acquired using a plurality of imaging systems that capture the same subject. A step of performing a correction process for reducing the positional deviation of the subject image between the plurality of first images, and a plurality of second images in which the positional deviation of the subject image is reduced by performing the correction process. Generating a composite image. Then, the correction processing includes the first correction processing for reducing the positional deviation of the subject image according to the parallax included in the plurality of first images, and the information on the barycentric positions of the respective point image distribution functions of the plurality of imaging systems. And a second correction process for reducing the displacement of the subject image in accordance with the difference in the center of gravity of the plurality of imaging systems.

なお、コンピュータに上記画像処理方法に従う画像処理を実行させるコンピュータプログラムとしての画像処理プログラムも、本発明の他の一側面を構成する。   An image processing program as a computer program that causes a computer to execute image processing according to the image processing method also constitutes another aspect of the present invention.

本発明によれば、複数の撮像系を用いて取得された複数の画像を合成する際に該複数の撮像系のそれぞれのPSFの重心位置が互いにずれていても、合成された被写体像の対称性が高い良好な合成画像を生成することができる。   According to the present invention, when a plurality of images acquired using a plurality of imaging systems are combined, even if the center of gravity positions of the respective PSFs of the plurality of imaging systems are shifted from each other, the combined subject image is symmetrical. It is possible to generate a good composite image with high performance.

本発明の実施例1であるステレオ撮像装置が行う画像処理を示すフローチャート。3 is a flowchart illustrating image processing performed by the stereo imaging apparatus that is Embodiment 1 of the present invention. 視差を説明する図。The figure explaining parallax. 被写体倍率の相違を説明する図。The figure explaining the difference in object magnification. 口径食の影響によるスポット重心の変化を説明する図。The figure explaining the change of the spot gravity center by the influence of vignetting. 口径食によるスポット重心の相違とその補正処理を説明する図。The figure explaining the difference of the spot gravity center by vignetting, and its correction process. 視差によるスポット重心の相違とその補正処理を説明する図。The figure explaining the difference of the spot gravity center by parallax, and its correction process. 被写界深度の相違およびその調整処理を説明する図。The figure explaining the difference in depth of field and its adjustment process. 実施例1のステレオ撮像装置の構成を示すブロック図。1 is a block diagram illustrating a configuration of a stereo imaging device according to Embodiment 1. FIG. 本発明の実施例2である複眼撮像装置の構成を示すブロック図。FIG. 3 is a block diagram illustrating a configuration of a compound eye imaging apparatus that is Embodiment 2 of the present invention. 実施例2における撮像ユニットの斜視図および正面図。FIG. 6 is a perspective view and a front view of an image pickup unit in Embodiment 2. 実施例2の複眼撮像装置が行う画像処理を示すフローチャート。9 is a flowchart illustrating image processing performed by the compound eye imaging apparatus according to the second embodiment. 本発明の実施例3である画像処理システムの構成を示すブロック図。FIG. 6 is a block diagram illustrating a configuration of an image processing system that is Embodiment 3 of the present invention.

以下、本発明の実施例について図面を参照しながら説明する。   Embodiments of the present invention will be described below with reference to the drawings.

後述する各実施例では、複数の撮像系により同一の被写体を撮像することにより取得された複数の画像に対して被写体像の位置ずれを補正し、該位置ずれが補正された複数の画像を合成する。ここでは、まず複数の撮像系を用いて取得した複数の画像における被写体像の位置ずれの原因である視差、被写体倍率の相違およびスポット重心の相違について順に説明する。   In each embodiment to be described later, the positional deviation of the subject image is corrected with respect to a plurality of images acquired by imaging the same subject with a plurality of imaging systems, and the plurality of images with the corrected positional deviation are synthesized. To do. Here, first, the parallax, the difference in subject magnification, and the difference in spot centroid, which are causes of the positional deviation of the subject image in a plurality of images acquired using a plurality of imaging systems, will be described in order.

図2を用いて視差について説明する。ここでは被写体倍率の相違およびスポット重心の相違はないものとする。図2は撮像系CLおよび撮像系CRを用いて撮影シーンのうちの1点に存在する同一の被写体Aを撮像する様子を示す。撮像系CLおよび撮像系CRの焦点距離等の光学特性は全て同一である。図2において、それぞれの撮像系における撮像光学系の主点、絞りおよび瞳が同一平面上にあり、入射瞳面が(−D/2,0)、(D/2,0)に位置し、被写体Aは(z,x)に位置する。また、2つの撮像系(撮像光学系)CL,CRの焦点距離をfとする。撮像系CL,CR中のISは撮像素子(以下、単にセンサともいう)を示す。また、物点から発して絞りの中心を通る光線を、絞り中心光線という。   The parallax will be described with reference to FIG. Here, it is assumed that there is no difference in subject magnification and spot centroid. FIG. 2 shows a state in which the same subject A existing at one point in the shooting scene is imaged using the imaging system CL and the imaging system CR. The optical characteristics such as the focal length of the imaging system CL and the imaging system CR are all the same. In FIG. 2, the principal point, stop, and pupil of the imaging optical system in each imaging system are on the same plane, and the entrance pupil plane is located at (−D / 2, 0), (D / 2, 0), Subject A is located at (z, x). Further, the focal length of the two imaging systems (imaging optical systems) CL and CR is assumed to be f. IS in the imaging systems CL and CR indicates an imaging element (hereinafter also simply referred to as a sensor). A light beam emitted from an object point and passing through the center of the stop is called a stop center light ray.

2つの撮像系で被写体(物点)Aを撮像したとき、撮像系CLおよび撮像系CRにおける被写体Aからの絞り中心光線のセンサISの中心からのずれzl,zrはそれぞれ、式(1)および式(2)により与えられる。   When the subject (object point) A is imaged by the two imaging systems, the shifts zl and zr from the center of the sensor IS of the center beam of the diaphragm from the subject A in the imaging system CL and the imaging system CR are respectively expressed by the equations (1) and Is given by equation (2).

以下の説明において、zr−zlを視差という。視差zr−zlは、撮像系CR、CLのそれぞれを用いて取得される2つの入力画像(第1の画像)IMGR,IMGLにおける同一被写体からの絞り中心光線の位置(座標)の差に相当する。この視差が存在するため、入力画像IMGR、IMGLを単純に重ね合わせて(加算して)合成画像を生成すると、該視差の分だけずれた被写体像が2重に存在する画像となる。   In the following description, zr-zl is referred to as parallax. The parallax zr-zl corresponds to the difference in the position (coordinates) of the central ray of the aperture from the same subject in the two input images (first images) IMGR and IMGL acquired using the imaging systems CR and CL, respectively. . Since this parallax exists, when a composite image is generated by simply superimposing (adding) the input images IMGR and IMGL, an object image that is shifted by the amount of the parallax is doubled.

式(1),(2)から分かるように、視差の量は被写体距離xに反比例する。2つの入力画像IMGR,IMGLのうち少なくとも一方に対して、その画像領域ごとに被写体距離xに応じた視差を補正するシフト補正を行うことで、同一被写体からの絞り中心光線が同一の座標に存在する2つの補正画像(第2の画像)を生成することができる。ここで、シフト補正とは、画像中の一部の画像領域内の画素値で他の画像領域内の画素値を置き換える処理であり、このとき画像領域内の画素値の構造(配置)は変化させない。つまり、シフト補正は、画像上で被写体像(画像領域)をそのまま移動させる処理に相当する。   As can be seen from the equations (1) and (2), the amount of parallax is inversely proportional to the subject distance x. For at least one of the two input images IMGR and IMGL, by performing shift correction that corrects the parallax according to the subject distance x for each image region, the aperture center ray from the same subject exists at the same coordinates Two corrected images (second images) can be generated. Here, shift correction is a process of replacing pixel values in other image areas with pixel values in a part of the image area in the image. At this time, the structure (arrangement) of the pixel values in the image area is changed. I won't let you. That is, the shift correction corresponds to a process of moving the subject image (image area) as it is on the image.

また、公知のブロックマッチング法により入力画像IMGR,IMGL上の同一被写体像を探索することで視差を算出し、該視差を補正するシフト補正を行うことで、同一被写体からの絞り中心光線が同一の座標に存在する2つの補正画像を生成することができる。また、このとき被写体像(画像領域)ごとに算出された視差から、式(3)を用いて被写体の距離を算出することができる。   In addition, the parallax is calculated by searching for the same subject image on the input images IMGR and IMGL by a known block matching method, and by performing shift correction for correcting the parallax, the central beam of the aperture from the same subject is the same. Two corrected images present at the coordinates can be generated. At this time, the distance of the subject can be calculated from the parallax calculated for each subject image (image region) using Equation (3).

このように、視差を補正するシフト補正を行うことで、同一被写体からの絞り中心光線が同一の座標に存在する複数の補正画像を用意することができ、これら補正画像を加算することで、視差の影響が低減された合成画像を生成することができる。このシフト補正を行う処理を、以下の説明では視差補正処理(第1の補正処理)という。また、複数の補正画像は同一の視点からの撮像により取得された画像と見なせる。   In this way, by performing shift correction for correcting parallax, it is possible to prepare a plurality of corrected images in which the aperture center ray from the same subject exists at the same coordinates, and by adding these corrected images, parallax is obtained. It is possible to generate a composite image in which the influence of the above is reduced. In the following description, this shift correction processing is referred to as parallax correction processing (first correction processing). Further, the plurality of corrected images can be regarded as images acquired by imaging from the same viewpoint.

次に、被写体倍率の相違について図3を用いて説明する。ここでは視差およびスポット重心の相違はないものとする。図3におけるIMGwとIMGtはそれぞれ、同一の被写体を撮像する第1の撮像系と第2の撮像系を用いて取得された入力画像である。第1の撮像系の焦点距離をf1とし、第2の撮像系の焦点距離をf2とすると、f2はf1よりも大きい。つまり、第1および第2の撮像系のそれぞれから被写体までの距離が同じである場合には、入力画像IMGw,IMGtは互いに被写体倍率が異なる画像である。これらの入力画像IMGw,IMGtを単純に加算して合成画像を生成すると、これらの被写体倍率の相違の分だけ大きさが異なる被写体像が2重に存在する画像となる。IMGtRは入力画像IMGtを縮小した画像である。縮小画像IMGtR内の黒領域は、第2の撮像系の画角外であるため、情報が取得できていない領域であり、この黒領域の画素値を0とする。また、画像の縮小処理の際には公知の画素補間技術を用いる。これは例えばバイリニア補間である。   Next, the difference in subject magnification will be described with reference to FIG. Here, it is assumed that there is no difference between the parallax and the spot centroid. IMGw and IMGt in FIG. 3 are input images acquired using a first imaging system and a second imaging system, respectively, that image the same subject. If the focal length of the first imaging system is f1, and the focal length of the second imaging system is f2, f2 is larger than f1. That is, when the distances from the first and second imaging systems to the subject are the same, the input images IMGw and IMGt are images with different subject magnifications. When these input images IMGw and IMGt are simply added to generate a composite image, an image in which subject images having different sizes corresponding to the difference in the subject magnification are doubled exists. IMGtR is an image obtained by reducing the input image IMGt. Since the black area in the reduced image IMGtR is outside the angle of view of the second imaging system, information is not acquired, and the pixel value of this black area is set to zero. A known pixel interpolation technique is used for image reduction processing. This is, for example, bilinear interpolation.

縮小画像IMGtRは、入力画像IMGtを被写体像がf1/f2倍の大きさになるように縮小した画像であり、該縮小画像IMGtR内の被写体像の大きさは入力画像IMGw内の被写体像の大きさと同じである。また、入力画像IMGwにおける領域REGtは、第2の撮像系の画角領域に相当する画像領域であり、該画像領域REGt内においては、入力画像IMGwと縮小画像IMGtRのそれぞれにおいて同一の被写体が同一の大きさで同一の座標に存在する。   The reduced image IMGtR is an image obtained by reducing the input image IMGt so that the subject image is f1 / f2 times in size, and the size of the subject image in the reduced image IMGtR is the size of the subject image in the input image IMGw. Is the same. The area REGt in the input image IMGw is an image area corresponding to the field angle area of the second imaging system, and the same subject is the same in each of the input image IMGw and the reduced image IMGtR in the image area REGt. Exists at the same coordinates.

このように被写体倍率の相違を補正することで、同一の被写体がそれぞれ同一の大きさで同一の座標に位置する複数の補正画像を用意することができる。そして、これら補正画像を加算することで、被写体倍率の相違の影響が低減された合成画像を生成することができる。被写体倍率の相違を補正する処理を、以下の説明では被写体倍率補正処理という。また、複数の補正画像はいずれも同一の焦点距離の撮像系で取得した画像と見なせる。   By correcting the difference in subject magnification in this way, it is possible to prepare a plurality of corrected images in which the same subject is the same size and located at the same coordinate. Then, by adding these corrected images, it is possible to generate a composite image in which the influence of the difference in subject magnification is reduced. Processing for correcting the difference in subject magnification is referred to as subject magnification correction processing in the following description. Further, any of the plurality of corrected images can be regarded as an image acquired by an imaging system having the same focal length.

このように複数の撮像系を用いて取得された複数の入力画像に対して視差補正処理および被写体倍率補正処理を行うことで、同一被写体からの絞り中心光線が同一座標に位置する複数の補正画像を生成することができる。しかし、これら複数の撮像系には、次に説明するスポット重心の相違が存在する。このため、上記複数の補正画像においては、該スポット重心の相違に起因する被写体像の重心位置の相違が存在する。   By performing parallax correction processing and subject magnification correction processing on a plurality of input images acquired using a plurality of imaging systems in this way, a plurality of corrected images in which the aperture center ray from the same subject is located at the same coordinates Can be generated. However, the plurality of imaging systems have a difference in the center of gravity of the spot described below. For this reason, in the plurality of corrected images, there is a difference in the position of the center of gravity of the subject image due to the difference in the center of gravity of the spot.

スポット重心の相違について図4(a)〜(c)を用いて説明する。ここでは、視差および被写体倍率の相違の影響はないものとする。   Differences in the spot centroid will be described with reference to FIGS. Here, it is assumed that there is no influence of differences in parallax and subject magnification.

図4(a)は口径食を考えない場合に、合焦物体OBJ1および非合焦物体OBJ2から放射された光が像面IPに入射する様子を示す。   FIG. 4A shows a state where light emitted from the focused object OBJ1 and the non-focused object OBJ2 is incident on the image plane IP when vignetting is not considered.

なお、図4(a)における撮像光学系Lは、収差および回折が発生せず、合焦面上の1点が像面において1点に結像する理想的な結像光学系である。また、図4(a)では撮像光学系Lを簡略化し単一のレンズとして表しているが、実際には撮像光学系Lは複数のレンズ等の光学素子の組み合わせで構成されている。これらのことは後に説明する図4(c)でも同じである。   Note that the imaging optical system L in FIG. 4A is an ideal imaging optical system in which aberration and diffraction do not occur, and one point on the focusing surface forms an image on one point on the image plane. In FIG. 4A, the imaging optical system L is simplified and represented as a single lens. However, the imaging optical system L is actually configured by a combination of optical elements such as a plurality of lenses. These also apply to FIG. 4C described later.

合焦物体OBJ1は、撮像光学系Lの合焦面に位置する被写体であり、合焦物体OBJ1から放射される光は像面IPにおいて1点に結像する。一方、非合焦物体OBJ2は撮像光学系Lの合焦面とは異なる平面上に位置する被写体である。非合焦物体OBJ2から放射される光は像面IPにおいて1点に結像しない。
図4(b)は、非合焦物体OBJ2から放射される光の像面IPにおける広がり(以下、スポットという)SPを示す。ここで非合焦物体OBJ2は大きさを持たない点物体であり、スポットSPは非合焦物体OBJ2に相当する像高および被写体距離における撮像光学系Lの点像分布関数(PSF)に相当する。口径食を考えない場合には、非合焦物体OBJ2から放射される絞り中心光線PRの像面IP上での座標(像高H)とスポットSPの重心GCの座標(重心位置)とは互いに一致する。以下の説明においては、スポットSPの重心GCを、スポット重心GCという。
The focused object OBJ1 is a subject located on the focusing surface of the imaging optical system L, and light emitted from the focused object OBJ1 forms an image at one point on the image plane IP. On the other hand, the out-of-focus object OBJ2 is a subject located on a plane different from the focusing surface of the imaging optical system L. Light emitted from the out-of-focus object OBJ2 does not form an image at one point on the image plane IP.
FIG. 4B shows a spread (hereinafter referred to as a spot) SP on the image plane IP of the light emitted from the out-of-focus object OBJ2. Here, the non-focused object OBJ2 is a point object having no size, and the spot SP corresponds to the image height corresponding to the non-focused object OBJ2 and the point spread function (PSF) of the imaging optical system L at the subject distance. . When vignetting is not considered, the coordinate (image height H) on the image plane IP of the aperture center ray PR radiated from the out-of-focus object OBJ2 and the coordinate (center of gravity position) of the center of gravity GC of the spot SP are mutually. Match. In the following description, the center of gravity GC of the spot SP is referred to as a spot center of gravity GC.

図4(c)は撮像光学系Lにおいて口径食が発生する場合に合焦物体OBJ1および非合焦物体OBJ2から放射された光が像面IPに入射する様子を示す。撮像光学系Lでは、いずれかの光学素子に含まれる遮蔽物Bにより光束の一部が遮蔽されて口径食が発生している。図4(d)は非合焦物体OBJ2から放射される光の像面IPにおけるスポットSPとスポット重心GCとを示す。口径食があると、非合焦物体OBJ2から放射された絞り中心光線PRの像面IP上での座標(像高H)とスポット重心GCの座標とは互いに一致しない。   FIG. 4C shows how light emitted from the focused object OBJ1 and the out-of-focus object OBJ2 enters the image plane IP when vignetting occurs in the imaging optical system L. In the imaging optical system L, a part of the light beam is shielded by the shielding object B included in one of the optical elements, and vignetting occurs. FIG. 4D shows a spot SP and a spot centroid GC on the image plane IP of light emitted from the out-of-focus object OBJ2. If there is vignetting, the coordinates (image height H) on the image plane IP of the diaphragm central ray PR emitted from the out-of-focus object OBJ2 and the coordinates of the spot centroid GC do not match each other.

図5(a)および図5(b)は、光学特性が互いに異なる2つの撮像系の撮像光学系が同一の非合焦物体からの光に形成させるスポットSP1,SP2の例を示している。これら2つの撮像光学系では互いに異なる口径食が発生している。該2つの撮像光学系の焦点距離は同一であり、かつ該2つの撮像光学系が同一位置にある配置されているものとする。つまり、視差および被写体倍率の相違はないものとする。   FIG. 5A and FIG. 5B show examples of spots SP1 and SP2 formed by the imaging optical systems of two imaging systems having different optical characteristics on light from the same non-focused object. In these two imaging optical systems, different vignetting occurs. Assume that the focal lengths of the two imaging optical systems are the same, and the two imaging optical systems are arranged at the same position. That is, there is no difference in parallax and subject magnification.

これら2つの撮像光学系を用いて取得した画像をそのまま合成(加算)する際には、それぞれの画像における絞り中心光線PRの座標が一致するように合成される。この場合、合成画像における被写体像は、図5(c)に示すように非対称性の高い形状になる。図5(c)における黒領域は、それぞれの撮像光学系が形成するスポットSP1,SP2が重なる領域SP1+SP2であり、白領域はスポットSP1,SP2が重ならない領域である。このため、黒領域は、白領域よりも大きな画素値を有する。このように、複数の撮像系を用いて取得された画像を単純に合成すると、非対称性の高い被写体像が含まれる合成画像が生成される。   When images acquired using these two imaging optical systems are combined (added) as they are, they are combined so that the coordinates of the aperture center ray PR in each image coincide. In this case, the subject image in the composite image has a highly asymmetric shape as shown in FIG. The black region in FIG. 5C is a region SP1 + SP2 where the spots SP1 and SP2 formed by the respective imaging optical systems overlap, and the white region is a region where the spots SP1 and SP2 do not overlap. For this reason, the black area has a larger pixel value than the white area. In this way, when images acquired using a plurality of imaging systems are simply combined, a combined image including a subject image with high asymmetry is generated.

図5(d)は、互いに光学特性が異なる2つの撮像系で取得された2つの画像のうち少なくとも一方に対して図5(a),(b)のスポット重心GCの座標を互いに一致させるシフト補正を行って得られた補正画像を合成したときの合成画像での被写体像を示す。図5(d)でも、黒領域はスポットSP1,SP2が重なる領域SP1+SP2であり、白領域はスポットSP1,SP2が重ならない領域である。このように、複数の撮像系を用いて取得された複数の画像間でのスポット重心GCの(座標の)相違分のシフト補正を予め行うことで、合成画像において対称性の高い良好(自然)な被写体像を形成することができる。このシフト補正を行う処理を、以下の説明ではスポット重心補正処理(第2の補正処理)という。   FIG. 5D shows a shift in which the coordinates of the spot centroids GC in FIGS. 5A and 5B coincide with each other with respect to at least one of two images acquired by two imaging systems having different optical characteristics. The subject image in the synthesized image when the corrected image obtained by performing the correction is synthesized is shown. Also in FIG. 5D, the black region is a region SP1 + SP2 where the spots SP1 and SP2 overlap, and the white region is a region where the spots SP1 and SP2 do not overlap. In this way, by performing shift correction corresponding to the difference (coordinates) of the spot centroids GC between a plurality of images acquired using a plurality of imaging systems in advance, the composite image has high symmetry (good). A simple subject image can be formed. In the following description, this shift correction processing is referred to as spot centroid correction processing (second correction processing).

図5(a)〜(d)では光学特性が互いに異なる撮像系を用いて取得された複数の画像におけるスポット重心の相違について説明した。これに対して、互いに光学特性が同一である複数の撮像系を用いて取得された複数の画像においても、視差の影響によってスポット重心の相違が発生する。   In FIGS. 5A to 5D, the difference in the center of gravity of the spot in a plurality of images acquired using imaging systems having different optical characteristics has been described. On the other hand, even in a plurality of images acquired using a plurality of imaging systems having the same optical characteristics, a difference in spot centroid occurs due to the influence of parallax.

図6(a)および図6(b)はそれぞれ、光学特性が同一である2つの撮像光学系が同一の非合焦物体からの光に形成させるスポットSP3,SP4を示している。2つの撮像光学系の光学特性は同一であるため、それぞれの画像の同一座標では同一の口径食の影響を受ける。しかし、これら2つの撮像光学系は互いに異なる位置に配置されている。つまり、視点が異なるため、視差の影響によって、同一被写体からの光がそれぞれの画像のうち互いに異なる座標に導かれる。このため、図6(a)および図6(b)に示すようにそれぞれの絞り中心光線PRの座標とスポット重心GCの座標との相対位置関係が異なる。   FIGS. 6A and 6B respectively show spots SP3 and SP4 that two imaging optical systems having the same optical characteristics form on light from the same non-focused object. Since the optical characteristics of the two imaging optical systems are the same, the same coordinates of each image are affected by the same vignetting. However, these two imaging optical systems are arranged at different positions. That is, since the viewpoints are different, light from the same subject is guided to different coordinates in each image due to the influence of parallax. For this reason, as shown in FIGS. 6A and 6B, the relative positional relationship between the coordinates of the respective aperture center rays PR and the coordinates of the spot centroid GC is different.

これらの画像のうち少なくとも一方に対して上述した視差補正を行うことで絞り中心光線PRの座標を両画像にて同一とすることができるが、スポット重心GCは同一座標にはならない。視差補正を行った複数の画像をそのまま合成すると、合成画像における被写体像は図6(c)に示すように非対称性の高い形状になる。   By performing the above-described parallax correction on at least one of these images, the coordinates of the aperture center ray PR can be made the same in both images, but the spot centroid GC is not the same. When a plurality of images subjected to parallax correction are synthesized as they are, the subject image in the synthesized image becomes a highly asymmetric shape as shown in FIG.

これに対して、図6(d)は、視差補正後の複数の画像のうち少なくとも一方に対して、図6(a),(b)に示したスポット重心GCが互いに一致するようにスポット重心補正を行って得られた補正画像を合成したときの合成画像での被写体像を示す。図6(d)の黒領域はスポットSP3,SP4が重なる領域SP3+SP4であり、白領域はスポットSP3,SP4が重ならない領域である。このように、互いに光学特性が同一である複数の撮像系を用いて取得された複数の画像に対してもスポット重心補正を行うことで、合成画像において対称性の高い良好な被写体像を形成することができる。   On the other hand, FIG. 6D shows the spot centroid so that the spot centroids GC shown in FIGS. 6A and 6B coincide with each other for at least one of the plurality of images after the parallax correction. The subject image in the synthesized image when the corrected image obtained by performing the correction is synthesized is shown. The black region in FIG. 6D is a region SP3 + SP4 where the spots SP3 and SP4 overlap, and the white region is a region where the spots SP3 and SP4 do not overlap. In this way, by performing spot centroid correction on a plurality of images acquired using a plurality of imaging systems having the same optical characteristics, a good subject image with high symmetry is formed in the composite image. be able to.

次に、被写界深度が互いに異なる2つ撮像系を用いて取得された2つの画像を合成する場合について図7(a)〜(d)を用いて説明する。図7(a)は、第1の撮像系を用いて取得された画像(以下、第1の撮像系画像という)におけるスポットSP1と、第2の撮像系を用いて取得された画像(以下、第2の撮像系画像という)におけるスポットSP2とを示している。スポットSP1,SP2はいずれも同一の非合焦点物体を被写体とするときの被写体像であり、それぞれを生成した撮像系の被写界深度が異なるため、スポットの広がりも異なっている。   Next, a case where two images acquired using two imaging systems having different depths of field are combined will be described with reference to FIGS. FIG. 7A illustrates a spot SP1 in an image acquired using the first imaging system (hereinafter referred to as a first imaging system image) and an image acquired using the second imaging system (hereinafter referred to as a first imaging system image). The spot SP2 in the second imaging system image). The spots SP1 and SP2 are both subject images when the same non-focused object is the subject, and the spread of the spots is different because the depths of field of the imaging systems that generate them are different.

図7(b)は、スポットSP1,SP2の画素値分布と、第1の撮像系画像と第2の撮像系画像とを合成(加算)して得られた合成画像における合成スポット(SP1+SP2)SP3の画素値分布とを示している。この図では、絞り中心光線PRを含む断面での画素値分布を示している。縦軸は画素値を、横軸は画像内での一次元方向での座標を示す。点線はスポットSP1の画素値分布を、破線はスポットSP2の画素値分布を、一点鎖線は合成スポットSP3の画素値分布をそれぞれ示している。   FIG. 7B shows a synthesized spot (SP1 + SP2) SP3 in a synthesized image obtained by synthesizing (adding) the pixel value distribution of the spots SP1 and SP2, and the first imaging system image and the second imaging system image. The pixel value distribution is shown. In this figure, the pixel value distribution in a cross section including the stop center ray PR is shown. The vertical axis represents pixel values, and the horizontal axis represents coordinates in a one-dimensional direction in the image. The dotted line indicates the pixel value distribution of the spot SP1, the broken line indicates the pixel value distribution of the spot SP2, and the alternate long and short dash line indicates the pixel value distribution of the composite spot SP3.

合成スポットSP3を参照すると分かるように、被写界深度が互いに異なる2つの撮像系により生成した2つの画像を合成すると、1点の被写体に対する合成画像上の被写体像内で画素値が急激に変動する。しかし、一般的なカメラレンズを用いて非合焦物体を撮像した場合にはこのようなスポットが形成されることは稀であるため、合成画像として好ましくない。   As can be seen by referring to the composite spot SP3, when two images generated by two imaging systems having different depths of field are combined, the pixel value rapidly changes in the subject image on the composite image for one subject. To do. However, when a non-focused object is imaged using a general camera lens, such a spot is rarely formed, which is not preferable as a composite image.

実施例では、被写界深度が互いに異なる2つの撮像系を用いて取得された2つの画像を合成する際に、被写界深度がより深い(つまりはスポットの広がりがより小さい)画像に対してぼかし処理を行って、該2つの画像間の被写界深度の差を低減する。具体的には、被写界深度がより深い画像に対してぼかし処理を行うことで、両画像間でのスポットの広がり方の差を低減する。   In the embodiment, when two images acquired using two imaging systems having different depths of field are combined, an image with a deeper depth of field (that is, a smaller spot spread) is used. The blur processing is performed to reduce the difference in depth of field between the two images. Specifically, the blurring process is performed on an image having a deeper depth of field, thereby reducing the difference in spot spread between the two images.

図7(c)は、第1の撮像系画像に対してぼかし処理を行うことで得られたぼかし画像におけるスポットSP1bと、第2の撮像系画像におけるスポットSP2とを示している。図7(d)は、スポットSP1b,SP2の画素値分布と、ぼかし処理を行った第1の撮像系画像と第2の撮像系画像とを合成して得られた合成画像における合成スポット(SP1b+SP2)SP3bの画素値分布を示している。この図でも、絞り中心光線PRを含む断面での画素値分布を示している。縦軸は画素値を、横軸は画像内での一次元方向での座標を示す。点線はスポットSP1bの画素値分布を、破線はスポットSP2の画素値分布を、一点鎖線は合成スポットSP3bの画素値分布をそれぞれ示す。   FIG. 7C illustrates a spot SP1b in the blurred image obtained by performing the blurring process on the first imaging system image, and a spot SP2 in the second imaging system image. FIG. 7D shows a synthesized spot (SP1b + SP2) in a synthesized image obtained by synthesizing the pixel value distribution of the spots SP1b and SP2 and the first imaging system image and the second imaging system image subjected to the blurring process. ) The pixel value distribution of SP3b is shown. This figure also shows the pixel value distribution in a cross section including the stop center ray PR. The vertical axis represents pixel values, and the horizontal axis represents coordinates in a one-dimensional direction in the image. The dotted line indicates the pixel value distribution of the spot SP1b, the broken line indicates the pixel value distribution of the spot SP2, and the alternate long and short dash line indicates the pixel value distribution of the composite spot SP3b.

合成スポットSP3bを参照すると分かるように、予め被写界深度のより深い第1の撮像系画像に対してぼかし処理を行って第2の撮像系画像と合成することで、1点の被写体に対する合成画像上の被写体像内での画素値の急激な変動を低減することができる。
ぼかし処理は、ぼかしフィルタを被写界深度のより深い画像に対してコンボリューションすることで行う。ぼかしフィルタは、第1の撮像系画像におけるスポットSP1の広がりと第2の撮像系画像におけるスポットSP2の広がりとの相違が低減されるようなフィルタである。ぼかしフィルタは、例えば、式(4)により算出される。
As can be seen by referring to the synthesis spot SP3b, the first imaging system image having a deeper depth of field is preliminarily blurred and synthesized with the second imaging system image, thereby synthesizing a single subject. It is possible to reduce rapid fluctuations in pixel values in the subject image on the image.
The blur processing is performed by convolving a blur filter with respect to an image having a deeper depth of field. The blur filter is a filter that reduces the difference between the spread of the spot SP1 in the first imaging system image and the spread of the spot SP2 in the second imaging system image. The blur filter is calculated by, for example, Expression (4).

ここで、YおよびZはぼかしフィルタ上の座標であり、(cy,cz)はフィルタ中心の座標である。また、σは被写界深度を調整するための係数であり、スポットSP1,SP2の広がりの相違に応じて決定される。   Here, Y and Z are coordinates on the blur filter, and (cy, cz) is the coordinates of the filter center. Further, σ is a coefficient for adjusting the depth of field, and is determined according to the difference in the spread of the spots SP1 and SP2.

このように、被写界深度がより深い画像に対してぼかし処理(フィルタリング処理)を行うことで、被写界深度が互いに異なる複数の画像におけるスポットの広がりの相違を低減することができる。ただし、被写界深度がより浅い画像に対して鮮鋭化処理を行うことでスポットの広がりの相違を低減してもよい。これら、被写界深度の相違に起因するスポットの広がりの相違を低減する処理を、被写界深度調整処理という。   In this way, by performing blurring processing (filtering processing) on an image having a deeper depth of field, it is possible to reduce differences in spot spread in a plurality of images having different depths of field. However, the difference in the spread of spots may be reduced by performing a sharpening process on an image having a shallower depth of field. The process for reducing the difference in the spread of the spots due to the difference in the depth of field is referred to as the depth of field adjustment process.

以上説明したように、視差、被写体倍率の相違、スポット重心の相違に加えて被写界深度の相違を補正(低減)することで、より好ましい合成画像を生成することができる。   As described above, a more preferable composite image can be generated by correcting (reducing) the difference in depth of field in addition to the difference in parallax, subject magnification, and spot centroid.

以下、具体的な実施例について説明する。   Specific examples will be described below.

実施例1では、2つの撮像系による同一の被写体の撮像を同時に行って2つの画像を生成するステレオ撮像装置において該2つの画像のスポット重心(PSFの重心位置)の相違を補正する画像処理について説明する。   In the first embodiment, image processing for correcting a difference between the spot centroids (PSF centroid positions) of two images in a stereo imaging device that simultaneously captures the same subject using two imaging systems and generates two images. explain.

まず、本実施例のステレオ撮像装置(以下、単に撮像装置という)1の構成について、図8を用いて説明する。撮像装置1は、撮像ユニット100、A/D変換器10、画像処理部20、システムコントローラ30、撮像制御部40、情報入力部50、画像記録媒体60、表示部70、記憶部80および距離取得部90を有する。   First, the configuration of the stereo image pickup apparatus (hereinafter simply referred to as an image pickup apparatus) 1 of the present embodiment will be described with reference to FIG. The imaging apparatus 1 includes an imaging unit 100, an A / D converter 10, an image processing unit 20, a system controller 30, an imaging control unit 40, an information input unit 50, an image recording medium 60, a display unit 70, a storage unit 80, and distance acquisition. Part 90.

撮像ユニット100は、被写体の光学像(被写体像)をそれぞれ形成する2つの撮像光学系1100a,1100bを有する。各撮像光学系は、フォーカスレンズを含む。2つの撮像光学系1100a,1100bの光学特性は互いに同一である。また、2つの撮像光学系1100a,1100bは、それらの光軸が互いに平行となるように配置されている。また、撮像ユニット100は、2つの撮像光学系1100a,1100bによりそれぞれ形成された被写体像を光電変換(撮像)する2つの撮像素子1200a,1200bを有する。各撮像光学系とこれに対応する撮像素子とにより1つの撮像系が構成される。すなわち、撮像装置1は2つの撮像系を有する。2つの撮像素子1200a,1200bは光軸方向において互いに同一位置にて保持されている。   The imaging unit 100 includes two imaging optical systems 1100a and 1100b that respectively form an optical image (subject image) of a subject. Each imaging optical system includes a focus lens. The optical characteristics of the two imaging optical systems 1100a and 1100b are the same. The two imaging optical systems 1100a and 1100b are arranged so that their optical axes are parallel to each other. The imaging unit 100 includes two imaging elements 1200a and 1200b that photoelectrically convert (capture) subject images formed by the two imaging optical systems 1100a and 1100b, respectively. Each imaging optical system and an imaging element corresponding to the imaging optical system constitute one imaging system. That is, the imaging device 1 has two imaging systems. The two image sensors 1200a and 1200b are held at the same position in the optical axis direction.

なお、撮像光学系1100a,1100bは、撮像素子1200a,1200bを含む撮像装置本体に対して一体に備えられていてもよいし、撮像装置本体に対して取り外し可能(交換可能)であってもよい。   The imaging optical systems 1100a and 1100b may be provided integrally with the imaging apparatus main body including the imaging elements 1200a and 1200b, or may be removable (replaceable) with respect to the imaging apparatus main body. .

撮像素子1200a,1200bは、上述したように被写体像を光電変換することで電気信号(アナログ信号)を生成する。A/D変換器10は、撮像素子1200a,1200bから出力されたアナログ信号をデジタル信号に変換して画像データとして画像処理部20に出力する。   The imaging elements 1200a and 1200b generate an electrical signal (analog signal) by photoelectrically converting the subject image as described above. The A / D converter 10 converts the analog signal output from the imaging elements 1200a and 1200b into a digital signal and outputs the digital signal to the image processing unit 20 as image data.

画像処理部20は、A/D変換器10からの画像データに対して所定の画素補間処理や色変換処理等の画像処理を行う。画像処理部20で処理が行われた画像データは、システムコントローラ30に送信される。画像処理部20は撮像装置1に搭載された画像処理装置に相当する。   The image processing unit 20 performs image processing such as predetermined pixel interpolation processing and color conversion processing on the image data from the A / D converter 10. The image data processed by the image processing unit 20 is transmitted to the system controller 30. The image processing unit 20 corresponds to an image processing device mounted on the imaging device 1.

情報入力部50は、ユーザが所望の撮像条件を選択して入力した情報を取得してシステムコントローラ30にそのデータを供給する。システムコントローラ30は、供給されたデータに基づいて撮像制御部40を制御する。撮像制御部40は、各撮像光学系のフォーカスレンズの位置や絞り値および各撮像素子の露光時間等の撮像に関する制御を行う。また、距離取得部90は、撮像制御部40により制御され、撮像ユニット100における画像生成と同期して被写体の奥行き(距離)の情報を取得する。そして、該被写体の奥行き情報をシステムコントローラ30または画像処理部20に出力する。距離取得部90は、例えばTOF(TIME OF FLIGHT)センサである。   The information input unit 50 acquires information input by the user selecting a desired imaging condition and supplies the data to the system controller 30. The system controller 30 controls the imaging control unit 40 based on the supplied data. The imaging control unit 40 performs control related to imaging such as the position and aperture value of the focus lens of each imaging optical system and the exposure time of each imaging element. The distance acquisition unit 90 is controlled by the imaging control unit 40 and acquires information on the depth (distance) of the subject in synchronization with image generation in the imaging unit 100. Then, the depth information of the subject is output to the system controller 30 or the image processing unit 20. The distance acquisition unit 90 is, for example, a TOF (TIME OF FLIGHT) sensor.

システムコントローラ30は、画像処理部20を制御し、記憶部80から読み出される補正データに基づいて上述した補正画像および合成画像を生成する。   The system controller 30 controls the image processing unit 20 and generates the above-described corrected image and composite image based on the correction data read from the storage unit 80.

画像記録媒体60は、静止画や動画を格納したり、画像ファイルを構成する場合のファイルヘッダを格納したりする。この画像記録媒体60に、上述した被写体の奥行き情報を格納してもよい。   The image recording medium 60 stores a still image and a moving image, and stores a file header when configuring an image file. The image recording medium 60 may store the above-described depth information of the subject.

表示部70は、液晶表示素子等により構成され、撮像前のライブビュー画像、撮像により取得された撮像画像、撮像装置1の状態および各種警告等を表示する。また、表示部70は、画像処理部20により生成された補正画像や合成画像も表示する。   The display unit 70 is configured by a liquid crystal display element or the like, and displays a live view image before imaging, a captured image acquired by imaging, the state of the imaging device 1, various warnings, and the like. The display unit 70 also displays a corrected image and a composite image generated by the image processing unit 20.

次に、本実施例の撮像装置1(システムコントローラ30および画像処理部20)が行う処理について、図1のフローチャートを用いて説明する。撮像装置1が行う処理は、メインコンピュータであるシステムコントローラ30が行う撮像処理と画像処理コンピュータである画像処理部20が行う画像処理(画像処理方法)とを含む。システムコントローラ30および画像処理部20はそれぞれ、コンピュータプログラムとしての撮像処理プログラムおよび画像処理プログラムに従って撮像処理および画像処理を実行する。画像処理部20は、画像補正手段および画像合成手段として機能する。   Next, processing performed by the imaging apparatus 1 (system controller 30 and image processing unit 20) of the present embodiment will be described with reference to the flowchart of FIG. The processing performed by the imaging apparatus 1 includes imaging processing performed by the system controller 30 that is a main computer and image processing (image processing method) performed by the image processing unit 20 that is an image processing computer. The system controller 30 and the image processing unit 20 respectively execute an imaging process and an image process according to an imaging process program and an image processing program as a computer program. The image processing unit 20 functions as an image correction unit and an image synthesis unit.

ステップS101では、システムコントローラ30は、撮像ユニット100(撮像光学系1100a,1100bおよび撮像素子1200a,1200b)を制御して被写体の撮像を行う。画像処理部20は、撮像素子1200a,1200bおよびA/D変換器10から出力された画像データに対して所定の画素補間処理や色変換処理等を行い、2つの入力画像(第1の画像)を取得する。また、システムコントローラ30は、画像処理部20に、撮像時の撮像ユニット100の状態を撮影条件データとして送信する。該撮像条件データはそれぞれの撮像光学系の焦点距離、合焦被写体距離、Fナンバーおよびそれぞれの撮像光学系間の距離のデータである。   In step S101, the system controller 30 controls the image pickup unit 100 (the image pickup optical systems 1100a and 1100b and the image pickup devices 1200a and 1200b) to pick up a subject. The image processing unit 20 performs predetermined pixel interpolation processing, color conversion processing, and the like on the image data output from the imaging devices 1200a and 1200b and the A / D converter 10, and two input images (first images). To get. In addition, the system controller 30 transmits the state of the imaging unit 100 at the time of imaging to the image processing unit 20 as imaging condition data. The imaging condition data is data on the focal length of each imaging optical system, the focused subject distance, the F number, and the distance between the imaging optical systems.

ステップS102では、システムコントローラ30は、距離取得部90を制御して被写体の奥行き情報を取得し、画像処理部20に出力する。ここで、ステップS101における撮像ユニット100による被写体の撮像と、本ステップにおける被写体の奥行き情報の取得は同期して行われるのが好ましい。   In step S <b> 102, the system controller 30 controls the distance acquisition unit 90 to acquire the depth information of the subject and outputs it to the image processing unit 20. Here, it is preferable that the imaging of the subject by the imaging unit 100 in step S101 and the acquisition of the depth information of the subject in this step are performed in synchronization.

ステップS103では、画像処理部20は、スポット重心補正に必要な補正データ(補正情報)を記憶部80から読み出す。この補正データは、2つの撮像系(撮像光学系1100a,1100b)のそれぞれのPSFの重心位置、すなわちスポット重心に関するデータである。具体的には、入力画像における画像領域ごと、被写体距離ごとおよび撮像条件ごとの撮像光学系1100a,1100bのそれぞれの絞り中心光線とスポット重心との像面上での座標のずれ量(以下、絞り中心−スポット重心ずれ量という)を示すデータである。また、補正データは、画像領域ごと、被写体距離ごとおよび撮像条件ごとの撮像光学系1100a,1100bのスポット重心間(重心位置間)の像面上での座標の差(以下、スポット重心間差という)を示すデータであってもよい。   In step S <b> 103, the image processing unit 20 reads correction data (correction information) necessary for spot centroid correction from the storage unit 80. This correction data is data relating to the barycentric positions of the PSFs of the two imaging systems (imaging optical systems 1100a and 1100b), that is, the spot barycenters. Specifically, the amount of coordinate shift (hereinafter referred to as the aperture) on the image plane between the aperture center ray of each imaging optical system 1100a, 1100b and the spot centroid for each image area, subject distance, and imaging condition in the input image. Center-spot centroid displacement amount). Further, the correction data includes a difference in coordinates on the image plane between the spot centroids (between centroid positions) of the imaging optical systems 1100a and 1100b for each image region, each subject distance, and each imaging condition (hereinafter referred to as a spot centroid difference). ) May be used.

ステップS104では、画像処理部20は、2つの入力画像に対する補正処理を行う。以下の説明において撮像光学系1100aおよび撮像素子1200aによる撮像により生成された入力画像をIMGaとし、撮像光学系1100bおよび撮像素子1200bによる撮像により生成された入力画像をIMGbという。   In step S104, the image processing unit 20 performs correction processing on the two input images. In the following description, an input image generated by imaging with the imaging optical system 1100a and the imaging element 1200a is referred to as IMGa, and an input image generated by imaging with the imaging optical system 1100b and the imaging element 1200b is referred to as IMGb.

まず、画像処理部20は、被写体の奥行き情報と撮像条件データとに基づいて、入力画像IMGa,IMGbのうち少なくとも1つの画像に対して前述した視差補正処理を行うことで、2つの中間補正画像IMGa2,IMGb2を用意する。これら2つの中間補正画像IMGa2,IMGb2と後述する2つの最終補正画像IMGa3,IMGb3が第2の画像に相当する。   First, the image processing unit 20 performs the above-described parallax correction processing on at least one of the input images IMGa and IMGb based on the depth information of the subject and the imaging condition data, thereby obtaining two intermediate correction images. IMGa2 and IMGb2 are prepared. These two intermediate correction images IMGa2 and IMGb2 and two final correction images IMGa3 and IMGb3 described later correspond to the second image.

視差補正処理は、中間補正画像IMGb2が入力画像IMGaと同一視点の画像となるように入力画像IMGbに対して行ってもよいし、中間補正画像IMGa2が入力画像IMGbに対して同一視点の画像になるように入力画像IMGaに対して行ってもよい。さらに、入力画像IMGa,IMGb以外の仮想視点の画像と同一視点の画像となるように入力画像IMGa,IMGbに対して視差補正処理を行ってもよい。要するに、複数の入力画像間での視差に応じた被写体像の位置ずれを低減した複数の中間補正画像が得られればよい。   The parallax correction processing may be performed on the input image IMGb so that the intermediate correction image IMGb2 is an image with the same viewpoint as the input image IMGa, or the intermediate correction image IMGa2 is converted into an image with the same viewpoint with respect to the input image IMGb. You may perform with respect to input image IMGa so that it may become. Further, the parallax correction processing may be performed on the input images IMGa and IMGb so that the image has the same viewpoint as the virtual viewpoint image other than the input images IMGa and IMGb. In short, it is only necessary to obtain a plurality of intermediate correction images in which the displacement of the subject image according to the parallax between the plurality of input images is reduced.

以下の説明では、入力画像に対して視差補正処理が行われることで生成された中間補正画像と視差補正処理が行われなかった入力画像のいずれも、中間補正画像IMGa2,IMGb2という。   In the following description, both of the intermediate correction image generated by performing the parallax correction process on the input image and the input image not subjected to the parallax correction process are referred to as intermediate correction images IMGa2 and IMGb2.

次に、画像処理部20は、中間補正画像IMGa2,IMGb2に対して、それぞれの中間補正画像上の画像領域ごとに前述したスポット重心補正処理を行って2つの最終補正画像IMGa3,IMGb3を生成する。このとき、記憶部80からステップS103でスポット重心間差のデータを読み出した場合には、画像処理部20は、中間補正画像IMGa2,IMGb2のうちいずれか一方に対して、それぞれのスポット重心の座標が一致するようにシフト補正を行う。また、ステップS103で記憶部80から絞り中心−スポット重心間差のデータを読み出した場合には、画像処理部20は、中間補正画像IMGa2,IMGb2の双方に対してスポット重心と絞り中心光線の座標が一致するようにシフト補正を行う。いずれの場合も、中間補正画像IMGa2,IMGb2間における被写体像(スポット)の位置ずれが低減される。   Next, the image processing unit 20 performs the above-described spot centroid correction processing on the intermediate correction images IMGa2 and IMGb2 for each image region on the intermediate correction images to generate two final correction images IMGa3 and IMGb3. . At this time, when the data of the difference between the spot centroids is read from the storage unit 80 in step S103, the image processing unit 20 performs the coordinate of each spot centroid with respect to one of the intermediate correction images IMGa2 and IMGb2. Shift correction is performed so that. Further, when the data of the difference between the aperture center and the spot centroid is read from the storage unit 80 in step S103, the image processing unit 20 coordinates the spot centroid and the aperture center ray with respect to both the intermediate correction images IMGa2 and IMGb2. Shift correction is performed so that. In either case, the displacement of the subject image (spot) between the intermediate correction images IMGa2 and IMGb2 is reduced.

すなわち、本実施例では、複数の第2の画像のうち少なくとも1つに対して、複数の撮像系のPSFの重心位置の相違に応じた複数の第2の画像間での被写体像の位置ずれを低減する第2の補正処理を行う。   That is, in the present embodiment, the positional deviation of the subject image between the plurality of second images according to the difference in the barycentric positions of the PSFs of the plurality of imaging systems with respect to at least one of the plurality of second images. A second correction process for reducing the above is performed.

以下の説明では、中間補正画像に対してスポット重心補正処理が行われることで生成された最終補正画像とスポット重心補正処理が行われなかった中間処理画像のいずれも、最終補正画像IMGa3,IMGb3という。   In the following description, both the final correction image generated by performing the spot centroid correction process on the intermediate correction image and the intermediate process image not subjected to the spot centroid correction process are referred to as final correction images IMGa3 and IMGb3. .

次にステップS105では、画像処理部20は、2つの最終補正画像IMGa3,IMGb3を用いて合成画像を生成して出力する。具体的には、2つの最終補正画像IMGa3,IMGb3における対応座標(同一座標)の画素値の平均値を合成画像における対応画素の画素値とすることにより合成画像を生成する。   In step S105, the image processing unit 20 generates and outputs a composite image using the two final corrected images IMGa3 and IMGb3. Specifically, a composite image is generated by setting an average value of pixel values of corresponding coordinates (same coordinates) in the two final corrected images IMGa3 and IMGb3 as pixel values of corresponding pixels in the composite image.

以上説明したように、本実施例では、2つの撮像系により得られた2つの画像(視差補正処理が行われた画像)を合成する際に、予めこれらの画像に対してスポット重心補正処理を含む被写体像の位置を補正する処理を行う。これにより、非合焦被写体像の対称性が高い良好な合成画像を生成することができる。   As described above, in this embodiment, when combining two images (images subjected to parallax correction processing) obtained by two imaging systems, spot centroid correction processing is performed on these images in advance. A process of correcting the position of the subject image including it is performed. Thereby, it is possible to generate a good composite image with high symmetry of the out-of-focus subject image.

次に、実施例2について説明する。本実施例では、複数の撮像系による同一の被写体の撮像を同時に行って複数の画像を生成する複眼撮像装置において該複数の画像のスポット重心(PSFの重心位置)の相違を補正する画像処理について説明する。   Next, Example 2 will be described. In this embodiment, image processing for correcting a difference in spot centroids (PSF centroid positions) of a plurality of images in a compound-eye imaging apparatus that simultaneously captures the same subject by a plurality of imaging systems and generates a plurality of images. explain.

図9は、本実施例の複眼撮像装置(以下、単に撮像装置という)2の構成を示す。また、図10(a),(b)は撮像装置2が備える撮像ユニット200の構成を示している。   FIG. 9 shows a configuration of a compound eye imaging apparatus (hereinafter simply referred to as an imaging apparatus) 2 of the present embodiment. FIGS. 10A and 10B show the configuration of the imaging unit 200 provided in the imaging apparatus 2.

撮像装置2は、実施例1の撮像装置1に対して、撮像ユニット200の構成が撮像ユニット100とは異なり、また距離取得部90を有さない。その他の構成については実施例1の撮像装置1と同様である。   The imaging device 2 differs from the imaging unit 100 in the configuration of the imaging unit 200 with respect to the imaging device 1 of the first embodiment, and does not have the distance acquisition unit 90. Other configurations are the same as those of the imaging apparatus 1 of the first embodiment.

撮像ユニット200は、それぞれが被写体像を形成する6つの撮像光学系(個眼)2110a,2110b,2120a,2120b,2130a,2130bを有する。各撮像光学系は、フォーカスレンズを含む。また、6つの撮像光学系2110a〜2130bは互いの光軸が平行になるように配置されている。図9は、撮像ユニット200における撮像光学系2110a,2120bの光軸を含む断面を示している。   The imaging unit 200 includes six imaging optical systems (single eyes) 2110a, 2110b, 2120a, 2120b, 2130a, and 2130b, each of which forms a subject image. Each imaging optical system includes a focus lens. The six imaging optical systems 2110a to 2130b are arranged so that their optical axes are parallel to each other. FIG. 9 shows a cross section including the optical axes of the imaging optical systems 2110a and 2120b in the imaging unit 200.

同一の参照番号を付された2つの撮像光学系(例えば、2110a,2110b)は、互いに同一の焦点距離を有する1組の撮像光学系である。本実施例では、焦点距離が互いに異なる3組の撮像光学系が設けられている。撮像光学系(ワイド個眼)2110a,2110bは3組のうち最も短い焦点距離を有する広角撮像光学系の組である。撮像光学系(ミドル個眼)2120a,2120bは撮像光学系2110a,2110bに比べて焦点距離が長い中間画角撮像光学系の組である。撮像光学系(テレ個眼)2130a,2130bは3組のうち最も長い焦点距離を有する望遠撮像光学系の組である。   Two imaging optical systems (for example, 2110a and 2110b) with the same reference numbers are a set of imaging optical systems having the same focal length. In this embodiment, three sets of imaging optical systems having different focal lengths are provided. The imaging optical systems (wide single eyes) 2110a and 2110b are a set of wide-angle imaging optical systems having the shortest focal length among the three sets. The imaging optical systems (middle single eyes) 2120a and 2120b are a set of intermediate angle-of-view imaging optical systems having a longer focal length than the imaging optical systems 2110a and 2110b. The imaging optical systems (tele eye) 2130a and 2130b are a set of telephoto imaging optical systems having the longest focal length among the three sets.

また、撮像ユニット200は、6つの撮像光学系2110a,2110b,2120a,2120b,2130a,2130bのそれぞれに対応する6つの撮像素子2210a,2210b,2220a,2220b,2230a,2230bを有する。6つの撮像素子2210a〜2230bは一体で保持されて撮像素子ユニット2200を構成している。ただし、6つの撮像素子2210a〜2230bは同一平面上に位置しなくてもよい。   The imaging unit 200 includes six imaging elements 2210a, 2210b, 2220a, 2220b, 2230a, and 2230b corresponding to the six imaging optical systems 2110a, 2110b, 2120a, 2120b, 2130a, and 2130b, respectively. The six image sensors 2210a to 2230b are integrally held to constitute an image sensor unit 2200. However, the six image sensors 2210a to 2230b do not have to be located on the same plane.

次に、本実施例の撮像装置2(システムコントローラ30および画像処理部20)が行う処理について、図11のフローチャートを用いて説明する。撮像装置2が行う処理は、システムコントローラ30が行う撮像処理と画像処理部20が行う画像処理(画像処理方法)とを含む。システムコントローラ30および画像処理部20はそれぞれ、コンピュータプログラムとしての撮像処理プログラムおよび画像処理プログラムに従って撮像処理および画像処理を実行する。   Next, processing performed by the imaging apparatus 2 (system controller 30 and image processing unit 20) of the present embodiment will be described with reference to the flowchart of FIG. The processing performed by the imaging device 2 includes imaging processing performed by the system controller 30 and image processing (image processing method) performed by the image processing unit 20. The system controller 30 and the image processing unit 20 respectively execute an imaging process and an image process according to an imaging process program and an image processing program as a computer program.

ステップS201では、システムコントローラ30は、撮像ユニット200(撮像光学系2110a〜2130および撮像素子2210a〜2230b)を制御して被写体の撮像を行う。この際、2つのワイド個眼については、Fナンバーを十分に大きくして(つまりは絞り径を小さくして)撮像を行うのが好ましい。また、画像処理部20は、撮像素子2210a〜2230bおよびA/D変換器10から出力された画像データに対して所定の画素補間処理や色変換処理等を行い、6つの入力画像(第1の画像)を取得する。また、システムコントローラ30は、画像処理部20に、撮像時の撮像ユニット200の状態を撮影条件データとして送信する。該撮像条件データはそれぞれの撮像光学系の焦点距離、合焦被写体距離、Fナンバーおよびそれぞれの撮像光学系間の距離のデータである。   In step S201, the system controller 30 controls the image pickup unit 200 (the image pickup optical systems 2110a to 2130 and the image pickup elements 2210a to 2230b) to pick up a subject. At this time, for the two wide single eyes, it is preferable to perform imaging with a sufficiently large F number (that is, with a small aperture diameter). In addition, the image processing unit 20 performs predetermined pixel interpolation processing, color conversion processing, and the like on the image data output from the imaging elements 2210a to 2230b and the A / D converter 10, and outputs six input images (first images). Image). In addition, the system controller 30 transmits the state of the imaging unit 200 at the time of imaging to the image processing unit 20 as imaging condition data. The imaging condition data is data on the focal length of each imaging optical system, the focused subject distance, the F number, and the distance between the imaging optical systems.

ステップS202では、画像処理部20は、撮像により生成された6つの入力画像を用いて被写体距離を算出する。具体的には、画像処理部20は、6つの入力画像において同一被写体を探索して同一被写体間の視差量を算出し、該視差量から被写体距離を算出する。ステップS201においてワイド個眼を十分に絞って撮像を行った場合には、被写体距離の算出には2つのワイド個眼を用いた撮像により生成された2つの入力画像を用いるのが好ましい。これは、十分に被写界深度が深いワイド個眼を用いた撮像により生成された入力画像を用いることで、非合焦領域においても高精度に広い画角領域の奥行き情報を得ることが可能であるためである。   In step S202, the image processing unit 20 calculates a subject distance using six input images generated by imaging. Specifically, the image processing unit 20 calculates the parallax amount between the same subjects by searching for the same subject in the six input images, and calculates the subject distance from the parallax amount. When imaging is performed by sufficiently narrowing the wide single eye in step S201, it is preferable to use two input images generated by imaging using two wide single eyes for the calculation of the subject distance. By using an input image generated by imaging using a wide single eye with a sufficiently large depth of field, it is possible to obtain depth information of a wide field angle area with high accuracy even in a non-focused area. This is because.

ステップS203では、画像処理部20は、スポット重心補正に必要な補正データおよび被写界深度調整処理に必要な調整データを記憶部80から読み出す。補正データは、6つの撮像系(撮像光学系2110a〜2130b)のそれぞれのPSFの重心位置、すなわちスポット重心に関するデータである。具体的には、入力画像における画像領域ごと、被写体距離ごとおよび撮像条件ごとのワイド個眼、ミドル個眼およびテレ個眼のそれぞれの絞り中心光線とスポット重心との像面上での座標のずれ量(絞り中心−スポット重心ずれ量)を示すデータである。また、調整データは、入力画像における画像領域ごと、被写体距離ごとおよび撮像条件ごとのワイド個眼、ミドル個眼およびテレ個眼の被写界深度調整係数σのデータである。   In step S <b> 203, the image processing unit 20 reads from the storage unit 80 correction data necessary for spot centroid correction and adjustment data necessary for depth-of-field adjustment processing. The correction data is data relating to the barycentric positions of the PSFs of the six imaging systems (imaging optical systems 2110a to 2130b), that is, spot centroids. Specifically, the shift of the coordinates on the image plane between the center light beam and the spot centroid of each of the wide single eye, the middle single eye, and the tele single eye for each image area, each subject distance, and each imaging condition in the input image. This is data indicating the amount (aperture center-spot centroid deviation amount). The adjustment data is data of the depth-of-field adjustment coefficient σ of the wide single eye, the middle single eye, and the tele single eye for each image region, each subject distance, and each imaging condition in the input image.

ステップS204では、画像処理部20は、6つの入力画像に対する補正処理を行う。具体的には、まず6つの個眼のうち基準となる個眼(基準個眼)を設定する。これは、ユーザの入力に従って設定してもよいし、予め設定された基準個眼を選択してもよい。ここでは、ワイド個眼2110aを基準個眼とし、該ワイド個眼2110aを用いて取得された入力画像を基準画像とする。   In step S204, the image processing unit 20 performs correction processing on the six input images. Specifically, first, a reference single eye (reference single eye) is set among the six single eyes. This may be set according to user input, or a preset reference eye may be selected. Here, the wide single eye 2110a is a reference single eye, and an input image acquired using the wide single eye 2110a is a reference image.

次に、画像処理部20は、撮像条件のデータに基づいて、ミドル個眼およびテレ個眼を用いて取得した4つの入力画像に対して前述した被写体倍率補正処理を行い、4つの第1の中間補正画像を生成する。このとき、図3に示した画像IMGtR中の黒領域で示したような撮像に用いた撮像系の画角外であるために情報が得られていない画像領域では画素値を0とする。   Next, the image processing unit 20 performs the above-described subject magnification correction processing on the four input images acquired using the middle eye and the tele eye based on the imaging condition data, and the four first images. An intermediate correction image is generated. At this time, the pixel value is set to 0 in an image area in which information is not obtained because it is outside the angle of view of the imaging system used for imaging as indicated by the black area in the image IMGtR shown in FIG.

ミドル個眼2120aまたは2120bを基準個眼とした場合には、ワイド個眼およびテレ個眼を用いて取得した4つの入力画像に対して被写体倍率補正を行い、4つの第1の中間補正画像を生成する。テレ個眼2130aまたは2130bを基準個眼とした場合についても同様である。ワイド個眼を用いて取得した2つの入力画像のうち、基準画像でない画像に対しては被写体倍率補正を行わないが、この画像も以下では第1の中間補正画像という。   When the middle single eye 2120a or 2120b is a reference single eye, subject magnification correction is performed on four input images acquired using the wide single eye and the tele single eye, and four first intermediate correction images are obtained. Generate. The same applies to the case where the telescopic eye 2130a or 2130b is used as the reference eye. Of the two input images acquired using the wide single eye, the subject magnification correction is not performed on the image that is not the reference image, and this image is also referred to as a first intermediate correction image below.

次に、画像処理部20は、補正データを用いて、5つの第1の中間補正画像と基準画像に対して、それぞれの画像における画像領域ごとにスポット重心補正を行い、6つの第2の中間補正画像を生成する。具体的には、5つの第1の中間補正画像と基準画像のすべてに対して、それぞれのスポット重心が絞り中心光線の座標が一致するようにシフト補正を行う。第1および第2の中間補正画像が第2の画像に相当する。6つの第2の中間補正画像のうち1つはスポット重心補正処理により得られた基準画像であり、基準となる第2の中間補正画像である。   Next, the image processing unit 20 uses the correction data to perform spot centroid correction for each of the five first intermediate correction images and the reference image for each image area in each image, and to obtain six second intermediate correction images. A corrected image is generated. Specifically, shift correction is performed on all of the five first intermediate correction images and the reference image so that the respective spot centroids coincide with the coordinates of the aperture central ray. The first and second intermediate corrected images correspond to the second image. One of the six second intermediate correction images is a reference image obtained by the spot centroid correction process, and is a reference second intermediate correction image.

次に、画像処理部20は、撮像条件データを用いて、6つの第2の中間補正画像のうち基準画像ではない5つの第2の中間補正画像に対して、基準画像と同一視点の画像になるように視差補正処理を行って6つの第3の中間補正画像を生成する。このとき、基準となる第2の中間補正画像に対しては視差補正を行わないが、以下では該基準画像も第3の中間補正画像という。   Next, the image processing unit 20 uses the imaging condition data to convert the five second intermediate correction images that are not the reference image out of the six second intermediate correction images into images having the same viewpoint as the reference image. Thus, the parallax correction process is performed to generate six third intermediate correction images. At this time, no parallax correction is performed on the second intermediate correction image that is the reference, but the reference image is also referred to as a third intermediate correction image below.

本実施例では、実施例1とは異なり、視差補正処理(第1の補正処理)を行う前にスポット重心補正処理(第2の補正処理)を行う。これにより、視差補正処理に前述したブロックマッチング法を用いる場合にスポット重心のずれの影響を低減することができ、高精度に視差を算出して視差補正処理を行うことができる。   In the present embodiment, unlike the first embodiment, spot centroid correction processing (second correction processing) is performed before performing parallax correction processing (first correction processing). Thereby, when the block matching method described above is used for the parallax correction process, the influence of the deviation of the spot centroid can be reduced, and the parallax correction process can be performed by calculating the parallax with high accuracy.

ステップS205では、画像処理部20は、調整データを用いて少なくとも1つの第3の中間補正画像に対して前述した被写界深度調整処理を行う。具体的には、まず画像処理部20は、調整データを用いて、式(4)に従って、ワイド個眼、ミドル個眼およびテレ個眼のそれぞれで取得した画像の画像領域ごとのぼかしフィルタを生成する。   In step S205, the image processing unit 20 performs the above-described depth-of-field adjustment process on at least one third intermediate correction image using the adjustment data. Specifically, first, the image processing unit 20 uses the adjustment data to generate a blur filter for each image area of an image acquired with each of the wide single eye, the middle single eye, and the tele single eye according to Expression (4). To do.

次に、画像処理部20は、少なくとも1つの第3の中間補正画像に対してぼかしフィルタを畳み込むコンボリューション処理(フィルタリング処理)を行うことで、第4の中間補正画像を生成する。このとき、最も被写界深度が浅い個眼によって取得された2つの第3の中間補正画像に対してコンボリューション処理を行ってもよいし、最も被写界深度が深い個眼で取得された2つ以外の4つの第3の中間補正画像に対してコンボリューション処理を行ってもよい。以下の説明では、コンボリューション処理により生成された第4の中間補正画像とコンボリューション処理が行われていない第3の中間補正画像をまとめて第4の中間補正画像という。つまり、本ステップでは、6つの第4の中間補正画像を生成する。   Next, the image processing unit 20 performs a convolution process (filtering process) that convolves a blurring filter with respect to at least one third intermediate correction image, thereby generating a fourth intermediate correction image. At this time, the convolution process may be performed on the two third intermediate correction images acquired by the single eye with the shallowest depth of field, or the single eye with the deepest depth of field is acquired. Convolution processing may be performed on four third intermediate correction images other than the two. In the following description, the fourth intermediate correction image generated by the convolution process and the third intermediate correction image not subjected to the convolution process are collectively referred to as a fourth intermediate correction image. That is, in this step, six fourth intermediate correction images are generated.

ステップS206では、画像処理部20は、6つの第4の中間補正画像を用いて合成画像を生成する。具体的には、6つの第4の中間補正画像のそれぞれにおける対応座標(同一座標)の画素値の平均値を合成画像における対応画素の画素値とすることにより合成画像を生成する。このとき、被写体倍率補正処理において画素値を0とした領域については、画素値が0である第3の中間補正画像を除いて処理を行う。   In step S206, the image processing unit 20 generates a composite image using the six fourth intermediate correction images. Specifically, the composite image is generated by using the average value of the pixel values of the corresponding coordinates (same coordinates) in each of the six fourth intermediate correction images as the pixel value of the corresponding pixel in the composite image. At this time, the region where the pixel value is 0 in the subject magnification correction process is processed except for the third intermediate correction image having a pixel value of 0.

以上説明したように、本実施例では、複数(6つ)の撮像系を介して取得した複数の画像を合成する際に、予めこれらの画像に対してスポット重心補正を含む被写体像の位置ずれを低減する処理を行う。これにより、非合焦被写体像の対称性が高い良好な合成画像を生成することができる。   As described above, in the present embodiment, when a plurality of images acquired via a plurality of (six) imaging systems are combined, the positional deviation of the subject image including spot centroid correction in advance with respect to these images. The process which reduces is performed. Thereby, it is possible to generate a good composite image with high symmetry of the out-of-focus subject image.

図12には、本発明の実施例3である画像処理システムの基本構成を示している。パーソナルコンピュータにより構成される画像処理装置303は、画像処理ソフトウェア304(画像処理プログラム)および記憶部305を備えている。画像処理装置303には、複眼撮像装置301および記憶媒体302のうち少なくとも一方が接続されている。   FIG. 12 shows a basic configuration of an image processing system that is Embodiment 3 of the present invention. An image processing apparatus 303 configured by a personal computer includes image processing software 304 (image processing program) and a storage unit 305. At least one of the compound eye imaging device 301 and the storage medium 302 is connected to the image processing device 303.

本実施例の複眼撮像装置301は、実施例2の複眼撮像装置2と同様に、ワイド個眼、ミドル個眼およびテレ個眼をそれぞれ2つずつ備えている。画像処理ソフトウェア304は、実施例2で行われる画像処理と後述する差異を除いて同じであるプログラムを含む。   Similar to the compound eye image pickup apparatus 2 of the second embodiment, the compound eye image pickup apparatus 301 of this embodiment includes two wide eyes, two middle eyes, and two tele eyes. The image processing software 304 includes a program that is the same as the image processing performed in the second embodiment except for differences described later.

画像処理装置303は撮像装置301または記憶媒体302から複数の画像を取得し、画像処理ソフトウェア304に従って実施例2の画像処理部20と同様に第4の中間補正画像および合成画像を生成する。以下、実施例2で説明した画像処理プログラムと本実施例の画像処理プログラムとの差異について説明する。   The image processing device 303 acquires a plurality of images from the imaging device 301 or the storage medium 302, and generates a fourth intermediate correction image and a composite image in the same manner as the image processing unit 20 of the second embodiment according to the image processing software 304. Hereinafter, differences between the image processing program described in the second embodiment and the image processing program of the present embodiment will be described.

本実施例の画像処理プログラムは、画像処理装置303に、ステップS203を行わせた後、ステップS204の前に非合焦領域判定処理を行わせる。この非合焦領域判定処理において、画像処理装置303は、異なる撮像光学系の画角領域ごとのPSFを用いて非合焦領域の検出を行う。撮像光学系の画角領域は、該撮像光学系を用いて取得した画像における画像領域に対応する。   The image processing program according to the present embodiment causes the image processing apparatus 303 to perform step S203 and then perform a non-focused area determination process before step S204. In this out-of-focus area determination process, the image processing apparatus 303 detects the out-of-focus area using the PSF for each field angle area of a different imaging optical system. The field angle area of the imaging optical system corresponds to an image area in an image acquired using the imaging optical system.

非合焦領域判定処理では、PSFの全光量のうち半分の光量を含む円の半径をHPRとし、複数の撮像系それぞれの画角領域ごとのPSFが式(5)を満足する画角領域(画像領域)を非合焦領域とする。   In the out-of-focus area determination process, the radius of a circle that includes half of the light intensity of the PSF is HPR, and the PSF for each angle of view area of each of the plurality of imaging systems satisfies the expression (5) ( Image area) is defined as the out-of-focus area.

ここで、pは複眼撮像装置301が備える複数の撮像素子のそれぞれの画素ピッチのうち最も小さい値である。また、半径HPRは、以下の式(6)を満足する最大の値である。   Here, p is the smallest value among the pixel pitches of the plurality of imaging elements included in the compound eye imaging device 301. The radius HPR is the maximum value that satisfies the following expression (6).

PSF(x,y)は座標(x,y)における点像分布関数である。式(6)の左辺の分母はPSFの全光量の総和を表し、左辺の分子はPSFの中心から半径HPRの円の内側の光量の総和を表す。 PSF (x, y) is a point spread function at coordinates (x, y). The denominator on the left side of Equation (6) represents the sum of all the light amounts of the PSF, and the numerator on the left side represents the sum of the light amounts inside the circle of radius HPR from the center of the PSF.

ここで、複数の撮像光学系は重畳する画角領域を持つが、その重畳領域においてはいずれかの撮像光学系の画角領域が非合焦領域と判定されれば、その画角領域に重畳する他の撮像光学系の画角領域も非合焦領域とする。   Here, a plurality of imaging optical systems have a field angle region to be superimposed. If the field angle region of any one of the imaging optical systems is determined to be an out-of-focus region in the superimposed region, the field angle region is superimposed. The field angle area of the other imaging optical system is also set as the out-of-focus area.

非合焦領域判定処理を行った画像処理装置303は、ステップS204において、6つの第2の中間補正画像に対して非合焦領域と判定された画角領域に対応する画像領域のみに対してスポット重心補正処理を行い、6つの第3の中間補正画像を生成する。視差補正処理、被写体倍率補正処理および被写界深度調整処理については全ての画像領域に対して行う。   In step S204, the image processing apparatus 303 that has performed the out-of-focus area determination process applies only to the image area corresponding to the view angle area determined as the out-of-focus area for the six second intermediate correction images. Spot centroid correction processing is performed to generate six third intermediate correction images. The parallax correction process, the subject magnification correction process, and the depth of field adjustment process are performed for all image regions.

前述した口径食の影響による絞り中心光線の像面上での座標とスポット重心の座標との相違は、合焦面から離れた被写体であるほど顕著である。言い換えれば、PSFの広がりが大きいほど顕著である。本実施例では、絞り中心光線とスポット重心との座標の相違が顕著である非合焦領域のみにおいてスポット重心補正を行うことにより、計算負荷を低減しながら高い補正効果を実現する。   The difference between the coordinates of the aperture center ray on the image plane and the coordinates of the center of gravity of the spot due to the influence of vignetting described above becomes more conspicuous as the subject is farther from the focal plane. In other words, the larger the PSF spread, the more remarkable. In this embodiment, a high correction effect is realized while reducing the calculation load by performing the spot centroid correction only in the out-of-focus region where the difference in coordinates between the aperture central ray and the spot centroid is significant.

画像処理装置303には、出力機器306および表示機器307のうち少なくとも一方が接続されていてもよい。画像処理装置303は、合成画像、複数の入力画像、複数の中間補正画像および被写体の奥行き情報のうち少なくとも1つを出力機器306、表示機器307および記憶媒体302のうち少なくとも1つに出力する。記憶媒体302は、半導体メモリ、ハードディスク、ネットワーク上のサーバー等である。表示機器307は、液晶ディスプレイやプロジェクタ等である。出力機器306は、プリンタ等である。   At least one of the output device 306 and the display device 307 may be connected to the image processing apparatus 303. The image processing apparatus 303 outputs at least one of the composite image, the plurality of input images, the plurality of intermediate correction images, and the depth information of the subject to at least one of the output device 306, the display device 307, and the storage medium 302. The storage medium 302 is a semiconductor memory, hard disk, network server, or the like. The display device 307 is a liquid crystal display, a projector, or the like. The output device 306 is a printer or the like.

本実施例によれば、複数の画像を合成する際に、予め該複数の画像の非合焦領域のみに対してスポット重心補正処理を含む被写体像の位置ずれを低減する処理を行う。これにより、負荷の低い処理で非合焦被写体像の対称性が高い良好な合成画像を生成することができる。
(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
According to the present embodiment, when combining a plurality of images, processing for reducing the positional deviation of the subject image including spot centroid correction processing is performed in advance only for the out-of-focus region of the plurality of images. As a result, it is possible to generate a good composite image in which the symmetry of the unfocused subject image is high with a low load process.
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

以上説明した各実施例は代表的な例にすぎず、本発明の実施に際しては、各実施例に対して種々の変形や変更が可能である。   Each embodiment described above is only a representative example, and various modifications and changes can be made to each embodiment in carrying out the present invention.

1 ステレオ撮像装置
20 画像処理部
100 撮像ユニット
DESCRIPTION OF SYMBOLS 1 Stereo imaging device 20 Image processing part 100 Imaging unit

Claims (14)

同一の被写体を撮像する複数の撮像系を用いて取得された複数の第1の画像のうち少なくとも1つの第1の画像に対して、前記複数の第1の画像間での被写体像の位置ずれを低減する補正処理を行う画像補正手段と、
前記補正処理が行われることで前記被写体像の位置ずれが低減された複数の第2の画像を合成して合成画像を生成する画像合成手段とを有し、
前記補正処理は、
前記複数の第1の画像に含まれる視差に応じた前記被写体像の位置ずれを低減する第1の補正処理と、
前記複数の撮像系のそれぞれの点像分布関数の重心位置に関する情報を用いて、前記複数の撮像系の前記重心位置の相違に応じた前記被写体像の位置ずれを低減する第2の補正処理とを含むことを特徴とする画像処理装置。
Position shift of the subject image between the plurality of first images with respect to at least one first image among a plurality of first images acquired using a plurality of imaging systems that capture the same subject. Image correction means for performing correction processing to reduce
Image combining means for generating a combined image by combining a plurality of second images in which positional deviation of the subject image has been reduced by performing the correction processing;
The correction process includes
A first correction process for reducing positional deviation of the subject image according to parallax included in the plurality of first images;
A second correction process for reducing a displacement of the subject image according to a difference in the centroid positions of the plurality of imaging systems, using information on the centroid positions of the point spread functions of the plurality of imaging systems; An image processing apparatus comprising:
前記画像補正手段は、
前記複数の第1の画像間における互いに対応する画像領域ごとの前記重心位置に関する情報を取得し、
前記対応する画像領域ごとに前記重心位置の相違に応じた前記第2の補正処理を行うことを特徴とする請求項1に記載の画像処理装置。
The image correcting means includes
Obtaining information about the position of the center of gravity for each image region corresponding to each other between the plurality of first images;
The image processing apparatus according to claim 1, wherein the second correction process corresponding to the difference in the center of gravity position is performed for each corresponding image region.
前記画像補正手段は、
前記被写体の距離に関する情報を取得するとともに、該距離に応じた前記重心位置の相違に応じた前記第2の補正処理を行うことを特徴とする請求項1または2に記載の画像処理装置。
The image correcting means includes
The image processing apparatus according to claim 1, wherein the second correction process is performed according to a difference in the center of gravity position according to the distance while acquiring information regarding the distance of the subject.
前記画像補正手段は、前記複数の第1の画像を用いて前記距離を算出することを特徴とする請求項3に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the image correction unit calculates the distance using the plurality of first images. 前記重心位置に関する情報は、前記複数の撮像系のそれぞれにおける絞り中心光線の位置に対する前記重心位置のずれ量を示す情報であることを特徴とする請求項1から4のいずれか一項に記載の画像処理装置。   5. The information on the center-of-gravity position is information indicating a deviation amount of the center-of-gravity position with respect to a position of a diaphragm center ray in each of the plurality of imaging systems. Image processing device. 前記重心位置に関する情報は、前記複数の撮像系のそれぞれの前記重心位置間の差を示す情報であることを特徴とする請求項1から4のいずれか一項に記載の画像処理装置。   5. The image processing apparatus according to claim 1, wherein the information on the position of the center of gravity is information indicating a difference between the positions of the center of gravity of each of the plurality of imaging systems. 前記画像補正手段は、前記複数の第1の画像に対して、該複数の第1の画像のそれぞれにおける被写体倍率を互いに同一にするための被写体倍率補正処理を行うことを特徴とする請求項1から6のいずれか一項に記載の画像処理装置。   2. The image correction means performs subject magnification correction processing on the plurality of first images so that subject magnifications of the plurality of first images are equal to each other. 7. The image processing device according to any one of items 1 to 6. 前記画像補正手段は、前記複数の第1の画像に対して、前記複数の撮像系の被写界深度の相違に応じたフィルタを用いて、前記複数の第1の画像間における前記被写界深度の相違による差を低減させるフィルタリング処理を行うことを特徴とする請求項1から7のいずれか一項に記載の画像処理装置。   The image correction means uses the filter according to the difference in depth of field of the plurality of imaging systems for the plurality of first images, and the field of view between the plurality of first images. The image processing apparatus according to claim 1, wherein a filtering process for reducing a difference due to a difference in depth is performed. 前記画像補正手段は、前記複数の第2の画像のそれぞれにおける非合焦領域を検出し、検出した前記非合焦領域において前記第2の補正処理を行うことを特徴する請求項1から8のいずれか一項に記載の画像処理装置。   The said image correction means detects the non-focusing area | region in each of these 2nd image, and performs the said 2nd correction process in the detected said non-focusing area | region. The image processing apparatus according to any one of claims. 前記画像補正手段は、
pを前記複数の撮像系のそれぞれにおける撮像素子の画素ピッチとし、PSF(x,y)を座標(x,y)における前記点像分布関数とし、HPRを前記点像分布関数の全光量の半分の光量を含む円の半径とし、以下の式における左辺の分母を前記点像分布関数の全光量の総和とし、分子を前記点像分布関数のうち半径HPRの前記円より内側の光量の総和とするとき、

前記半径HPRが、

なる条件を満足する画角領域に相当する画像領域を前記非合焦領域として検出することを特徴とする請求項9に記載の画像処理装置。
The image correcting means includes
p is the pixel pitch of the image sensor in each of the plurality of imaging systems, PSF (x, y) is the point spread function at coordinates (x, y), and HPR is half the total light quantity of the point spread function. And the denominator on the left side of the following equation is the sum of all the light amounts of the point spread function, and the numerator is the sum of the light amounts inside the circle of radius HPR in the point spread function. and when,

The radius HPR is

The image processing apparatus according to claim 9, wherein an image area corresponding to an angle-of-view area that satisfies the following condition is detected as the out-of-focus area.
前記複数の撮像系が、互いに異なる焦点距離を有することを特徴とする請求項1から10のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the plurality of imaging systems have different focal lengths. 被写体像を形成する光学系を一体または取り外し可能に有し、前記被写体像を撮像する撮像素子を含む撮像系と、
請求項1から11のいずれか一項に記載の画像処理装置を有することを特徴とする画像処理装置とを有することを特徴とする撮像装置。
An imaging system that includes an optical system that forms an object image so as to be integrated or removable, and includes an image sensor that captures the object image;
An image pickup apparatus comprising: an image processing apparatus comprising the image processing apparatus according to claim 1.
同一の被写体を撮像する複数の撮像系を用いて取得された複数の第1の画像のうち少なくとも1つの第1の画像に対して、前記複数の第1の画像間での被写体像の位置ずれを低減する補正処理を行うステップと、
前記補正処理が行われることで前記被写体像の位置ずれが低減された複数の第2の画像を合成して合成画像を生成するステップとを有し、
前記補正処理は、
前記複数の第1の画像に含まれる視差に応じた前記被写体像の位置ずれを低減する第1の補正処理と、
前記複数の撮像系のそれぞれの点像分布関数の重心位置に関する情報を用いて、前記複数の撮像系の前記重心位置の相違に応じた前記被写体像の位置ずれを低減する第2の補正処理とを含むことを特徴とする画像処理方法。
Position shift of the subject image between the plurality of first images with respect to at least one first image among a plurality of first images acquired using a plurality of imaging systems that capture the same subject. Performing a correction process for reducing
Synthesizing a plurality of second images in which the displacement of the subject image is reduced by performing the correction process, and generating a composite image,
The correction process includes
A first correction process for reducing positional deviation of the subject image according to parallax included in the plurality of first images;
A second correction process for reducing a displacement of the subject image according to a difference in the centroid positions of the plurality of imaging systems, using information on the centroid positions of the point spread functions of the plurality of imaging systems; An image processing method comprising:
コンピュータに、
同一の被写体を撮像する複数の撮像系を用いて取得された複数の第1の画像のうち少なくとも1つの第1の画像に対して、前記複数の第1の画像間での被写体像の位置ずれを低減する補正処理を行わせ、
前記補正処理が行われることで前記被写体像の位置ずれが低減された複数の第2の画像を合成して合成画像を生成させるコンピュータプログラムであって、
前記補正処理は、
前記複数の第1の画像に含まれる視差に応じた前記被写体像の位置ずれを低減する第1の補正処理と、
前記複数の撮像系のそれぞれの点像分布関数の重心位置に関する情報を用いて、前記複数の撮像系の前記重心位置の相違に応じた前記被写体像の位置ずれを低減する第2の補正処理とを含むことを特徴とする画像処理プログラム。
On the computer,
Position shift of the subject image between the plurality of first images with respect to at least one first image among a plurality of first images acquired using a plurality of imaging systems that capture the same subject. Correction processing to reduce
A computer program for generating a composite image by combining a plurality of second images in which the displacement of the subject image is reduced by performing the correction process,
The correction process includes
A first correction process for reducing positional deviation of the subject image according to parallax included in the plurality of first images;
A second correction process for reducing a displacement of the subject image according to a difference in the centroid positions of the plurality of imaging systems, using information on the centroid positions of the point spread functions of the plurality of imaging systems; An image processing program comprising:
JP2016244598A 2016-12-16 2016-12-16 Image processing device, imaging device, image processing method and image processing program Pending JP2018098738A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016244598A JP2018098738A (en) 2016-12-16 2016-12-16 Image processing device, imaging device, image processing method and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016244598A JP2018098738A (en) 2016-12-16 2016-12-16 Image processing device, imaging device, image processing method and image processing program

Publications (1)

Publication Number Publication Date
JP2018098738A true JP2018098738A (en) 2018-06-21

Family

ID=62634769

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016244598A Pending JP2018098738A (en) 2016-12-16 2016-12-16 Image processing device, imaging device, image processing method and image processing program

Country Status (1)

Country Link
JP (1) JP2018098738A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022010193A1 (en) * 2020-07-06 2022-01-13 삼성전자 주식회사 Electronic device for image improvement, and method for operating camera of electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022010193A1 (en) * 2020-07-06 2022-01-13 삼성전자 주식회사 Electronic device for image improvement, and method for operating camera of electronic device

Similar Documents

Publication Publication Date Title
JP6112824B2 (en) Image processing method and apparatus, and program.
JP5742179B2 (en) Imaging apparatus, image processing apparatus, image processing method, and program
JP5988790B2 (en) Image processing apparatus, imaging apparatus, image processing method, and image processing program
JP5618943B2 (en) Image processing method, imaging apparatus, image processing apparatus, and image processing program
JP6967673B2 (en) Continuous hybrid zoom system with constant resolution
JP5677366B2 (en) Imaging device
US20120249748A1 (en) Stereoscopic image pickup apparatus and stereoscopic image pickup method
JP6478511B2 (en) Image processing method, image processing apparatus, compound eye imaging apparatus, image processing program, and storage medium
JP6702796B2 (en) Image processing device, imaging device, image processing method, and image processing program
JP6053347B2 (en) Imaging apparatus, control method therefor, and program
WO2013038628A1 (en) Image processing method, image processing apparatus and image pickup apparatus
JP6003578B2 (en) Image generation method and apparatus
JP7234057B2 (en) Image processing method, image processing device, imaging device, lens device, program, storage medium, and image processing system
JP2013026844A (en) Image generation method and device, program, recording medium, and electronic camera
JP6376920B2 (en) Compound eye imaging device
JP6168220B2 (en) Image generation apparatus, image processing apparatus, image generation method, and image processing program
JP7292909B2 (en) Imaging device and focus detection method
JP2018098738A (en) Image processing device, imaging device, image processing method and image processing program
JP2009021708A (en) Element image group conversion device, stereoscopic image display device, and element image group conversion program
JP6330955B2 (en) Imaging apparatus and imaging method
JP5721891B2 (en) Imaging device
JP2016119542A (en) Image processing method, image processing program, image processing unit, and imaging apparatus
JP5553863B2 (en) Image processing method, imaging apparatus, image processing apparatus, and image processing program
JP5553862B2 (en) Image pickup apparatus and image pickup apparatus control method
JP6569769B2 (en) Arbitrary viewpoint image composition method and image processing apparatus