JP2013026844A - Image generation method and device, program, recording medium, and electronic camera - Google Patents

Image generation method and device, program, recording medium, and electronic camera Download PDF

Info

Publication number
JP2013026844A
JP2013026844A JP2011160089A JP2011160089A JP2013026844A JP 2013026844 A JP2013026844 A JP 2013026844A JP 2011160089 A JP2011160089 A JP 2011160089A JP 2011160089 A JP2011160089 A JP 2011160089A JP 2013026844 A JP2013026844 A JP 2013026844A
Authority
JP
Japan
Prior art keywords
image
focus
blur
parallax
camera
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
JP2011160089A
Other languages
Japanese (ja)
Inventor
Tsuneyuki Hagiwara
恒幸 萩原
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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2011160089A priority Critical patent/JP2013026844A/en
Publication of JP2013026844A publication Critical patent/JP2013026844A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To generate a blurred image in such a way that a region which is out of focus will be prettily blurred.SOLUTION: An image processing unit 25 comprises a blurring processing part 36, a focus stack image calculation part 37, a PSF kernel calculation part 38, and an image sharpening part 39. The blurring processing part 36 executes convolution processing on a plurality of multifocus images by using a circular opening of blurring radius proportional from a desired focus position or a Gaussian or any other blurring kernel. The focus stack image calculation part 37 calculates from the plurality of images processed by the blurring processing part 36 an intensity averaged image or a focus stack image as the sum of intensity averages. The image sharpening part 39 applies deconvolution processing to the focus stack image on the basis of a predetermined focus stack PSF kernel to generate a blurred image.

Description

本発明は、視点の異なる複数の画像群をもとに意図したボケを含む画像を生成するための画像生成方法及び装置、プログラム、記録媒体、並びに電子カメラに関するものである。   The present invention relates to an image generation method and apparatus, a program, a recording medium, and an electronic camera for generating an image including an intended blur based on a plurality of image groups having different viewpoints.

従来、物体を撮像した画像を、焦点深度が異なる複数の画像(多焦点画像)を重ね合わせモデルに基づく恒等式に代入することで、奥行き毎に鮮鋭度の調整(焦点の調整)を行った任意焦点画像等を生成する技術が提案されている(特許文献1)。特許文献1に記載の発明では、ボケ状態を変換するために、多焦点画像ごとにボケ状態を変換してから、これらの複数のボケ状態を変換したボケ画像の強度和を得ている。   Conventionally, an image obtained by imaging an object is arbitrarily adjusted by adjusting sharpness for each depth (focus adjustment) by substituting multiple images with different depths of focus (multi-focus images) into an identity equation based on a superposition model. A technique for generating a focus image or the like has been proposed (Patent Document 1). In the invention described in Patent Document 1, in order to convert the blur state, the blur state is converted for each multifocal image, and then the intensity sum of the blur image obtained by converting the plurality of blur states is obtained.

米国特許第6571023号明細書US Pat. No. 6,571,023

しかしながら、このやり方では、多焦点画像群の画像ごとにボケ状態を変更する時に、大きな変換ノイズを発生するため、ピントの合っていない領域が汚いボケになり、良好な画像が得られなかった。それを改善するため、反復計算をすることも提案されているが、不十分であった。   However, in this method, when the blur state is changed for each image in the multifocal image group, a large conversion noise is generated. Therefore, an out-of-focus area becomes dirty and a good image cannot be obtained. In order to improve it, it has also been proposed to perform iterative calculation, but it was insufficient.

本発明は上記事情に鑑みてなされたものであり、ピントの合っていない領域が美しいボケになるよう任意のボケ画像を生成することができる画像生成方法及び装置、プログラム、記録媒体、並びに電子カメラを提供することを目的とする。
ことを目的とする。
The present invention has been made in view of the above circumstances, and an image generation method and apparatus, a program, a recording medium, and an electronic camera that can generate an arbitrary blurred image so that an out-of-focus area is beautifully blurred. The purpose is to provide.
For the purpose.

本発明を例示する画像生成装置の一態様は、入力される複数の合焦状態の画像に対して、予め任意のピント位置に設定したボケ処理をそれぞれ行い、これらボケ処理を行った複数の画像の強度和画像であるフォーカススタック像を算出し、算出したフォーカススタック像に画像先鋭化処理(デコンボリューション)を行って任意のボケ画像を生成するようにしたものである。   According to one aspect of the image generation apparatus illustrating the present invention, a plurality of in-focus images that have been input are each subjected to blur processing set in advance at an arbitrary focus position, and the plurality of images subjected to the blur processing are performed. A focus stack image which is an intensity sum image is calculated, and an image sharpening process (deconvolution) is performed on the calculated focus stack image to generate an arbitrary blurred image.

本発明によれば、複数の合焦状態の画像に対して、予め任意のピント位置に設定したボケ処理をそれぞれ行い、これらボケ処理を行った複数の画像の強度和画像であるフォーカススタック像を算出し、算出したフォーカススタック像に画像先鋭化処理を行って任意のボケ画像を生成するため、ノイズの発生を抑えてピント領域外が美しいボケとなる良好なボケ画像を得ることができる。   According to the present invention, each of a plurality of in-focus images is subjected to blur processing set in advance at an arbitrary focus position, and a focus stack image that is an intensity sum image of the plurality of images subjected to the blur processing is obtained. Since the calculated focus stack image is calculated and an image sharpening process is performed to generate an arbitrary blurred image, it is possible to obtain a good blurred image in which the out-of-focus area is beautiful while suppressing the generation of noise.

本発明を採用した多眼カメラを示す正面側斜視図である。It is a front side perspective view which shows the multi-lens camera which employ | adopted this invention. M系列の疑似ランダム系列の数列を示す説明図である。It is explanatory drawing which shows the numerical sequence of a pseudorandom series of M series. M系列疑似ランダム数列「110100」に基づいた撮影開口の二次元配列をx,y方向点列で示す説明図であり、撮影開口の位置を「○」で示している。It is explanatory drawing which shows the two-dimensional arrangement | sequence of the imaging opening based on M series pseudo-random number sequence "110100" by a x, y direction point sequence, and has shown the position of the imaging opening by "(circle)". 多眼カメラの背面側斜視図である。It is a back side perspective view of a multi-view camera. 多眼カメラの電気的構成を説明するブロック図である。It is a block diagram explaining the electrical structure of a multi-view camera. 像点p1,p2をそれぞれPSFでコンボリューションした状態を説明する説明図である。It is explanatory drawing explaining the state which convolved image point p1, p2 with PSF, respectively. 焦点距離5.34mm、F1.4、像高×2=3.17mmの場合、近距離の530mmから無限遠までを結像した時の像空間x,y,zの光軸方向zの結像位置を説明する説明図である。When the focal length is 5.34 mm, F1.4, and the image height × 2 = 3.17 mm, the image is formed in the optical axis direction z of the image space x, y, z when the image is formed from a short distance of 530 mm to infinity. It is explanatory drawing explaining a position. 複数のカメラ(cam)を用いた合成開口法でのフォーカシングの概略を説明する説明図である。It is explanatory drawing explaining the outline of focusing by the synthetic aperture method using a some camera (cam). 図8で説明したx又はy方向に並んだcam2,cam4の配置によって発生する視差量を二つの直線で説明した説明図である。It is explanatory drawing explaining the amount of parallax which generate | occur | produces by arrangement | positioning of cam2 and cam4 located in a line in the x or y direction demonstrated in FIG. 8 with two straight lines. 5×5眼のカメラ配置に対して、視差z=4でフォーカスが合っている物体にボケカーネルがコンボリューションされている状態を説明する説明図である。It is explanatory drawing explaining the state by which the bokeh kernel is convolved with the object which has a focus with parallax z = 4 with respect to 5x5 eye camera arrangement | positioning. 任意のボケ量のボケカーネルz=4でフォーカスが合っている物体にボケカーネルがコンボリューションされている状態を説明する説明図である。It is explanatory drawing explaining the state in which the blur kernel is convolved with the object which is in focus by the blur kernel z = 4 of arbitrary blur amounts. 図10で説明したボケカーネルをx,y面内で表した説明図である。It is explanatory drawing which represented the blur kernel demonstrated in FIG. 10 in x, y plane. M系列のカメラ配置の場合、図10で説明したボケカーネル(視差z=0〜z=4)をx,y面内で表した説明図である。FIG. 11 is an explanatory diagram illustrating the blur kernel (parallax z = 0 to z = 4) described in FIG. 10 in the x and y planes in the case of an M-series camera arrangement. M系列のカメラ配置の場合、図10で説明したボケカーネル(視差z=4〜z=8)をx,y面内で表した説明図である。FIG. 11 is an explanatory diagram illustrating the blur kernel (parallax z = 4 to z = 8) described in FIG. 10 in the x and y planes in the case of an M-series camera arrangement. 焦点位置でボケンカーネルを視差方向(z方向)で積分したフォーカススタックカーネルを示す説明図である。It is explanatory drawing which shows the focus stack kernel which integrated the blur kernel in the parallax direction (z direction) in the focus position. 多眼カメラの画像取り込みから画像処理の流れを説明する説明図である。It is explanatory drawing explaining the flow of an image process from the image capture of a multi-lens camera. 画像処理が実行する任意ボケアルゴリズムを説明する説明図である。It is explanatory drawing explaining the arbitrary blur algorithm which an image process performs. ピントを変えて取り込んだ複数の画像を示す説明図である。It is explanatory drawing which shows the several image taken in changing focus. ピントを変えて取り込んだ複数の画像を示すものであり、物体と光学系とのコンボリュージョン結果が得られることを説明([数15]に記載の式を説明)する説明図である。It is an explanatory view showing a plurality of images captured by changing the focus and explaining that a convolution result between an object and an optical system can be obtained (explaining the equation described in [Equation 15]). [数16]に記載の式を説明する説明図である。It is explanatory drawing explaining the formula as described in [Formula 16]. ピントを変えて取り込んだ複数の画像(複数フォーカスによって得られた画像)に任意のデフォーカスカーネルを各x,y面内でコンボリューションした説明図である。FIG. 10 is an explanatory diagram in which an arbitrary defocus kernel is convolved in each x, y plane with a plurality of images (images obtained by a plurality of focuses) captured by changing the focus. 任意ボケアルゴリズムを実行する画像処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the image process part which performs an arbitrary blurring algorithm. 疑似ランダム系列であるM系列に従った所定の周期パターンで撮影レンズを配列した多眼カメラの場合のフォーカススタックカーネルを示す説明図である。It is explanatory drawing which shows the focus stack kernel in the case of the multi-lens camera which arranged the imaging lens with the predetermined | prescribed periodic pattern according to the M series which is a pseudorandom series. 多眼カメラの動作手順を説明するフローチャートである。It is a flowchart explaining the operation | movement procedure of a multiview camera. 任意ボケアルゴリズムの一部を説明しており、[数16]に記載の式に対して[数12]及び[数19]に記載の式の積分範囲を説明する説明図である。FIG. 10 is a diagram illustrating a part of the arbitrary blur algorithm, and is an explanatory diagram illustrating the integration range of the expressions described in [Expression 12] and [Expression 19] with respect to the expression described in [Expression 16]. [数19]に記載の式の積分範囲を説明する説明図である。It is explanatory drawing explaining the integration range of the formula as described in [Equation 19]. 点像強度分布の3次分布(PSF)の光のコーンの概略を示す説明図である。It is explanatory drawing which shows the outline of the cone of the light of the third order distribution (PSF) of point image intensity distribution. ガウス分布のボケカーネルの半径と標準偏差との関係を示すグラフである。It is a graph which shows the relationship between the radius of the blur kernel of a Gaussian distribution, and a standard deviation. 合成ボケ半径と標準偏差との関係を示すグラフである。It is a graph which shows the relationship between a synthetic | combination blur radius and a standard deviation. 一般的なカメラで撮影した画像を示す。An image taken with a general camera is shown. 従来の素の合成開口法を用いて生成したボケ画像を示す。The blur image produced | generated using the conventional synthetic | combination synthetic aperture method is shown. 焦点位置50mm、絞りF1に相当するボケの大きさを指定して得られるボケ画像を示す。A blur image obtained by designating a blur position corresponding to a focal position of 50 mm and a diaphragm F1 is shown. 焦点位置50mm、絞りF1.4に相当するボケの大きさを指定した時に得られるボケ画像を示す。A blurred image obtained when a blur position corresponding to a focal position of 50 mm and a diaphragm F1.4 is designated. 焦点位置50mm、絞りF2に相当するボケの大きさを指定した時に得られるボケ画像を示す。A blur image obtained when the blur position corresponding to the focal position of 50 mm and the stop F2 is designated is shown. 焦点位置50mm、絞りF4に相当するボケの大きさを指定した時に得られるボケ画像を示す。A blurred image obtained when a blur position corresponding to a focal position of 50 mm and a diaphragm F4 is designated is shown. 焦点位置50mm、絞りF42に相当するボケの大きさを指定した時に得られるボケ画像を示す。A blur image obtained when a blur position corresponding to a focal position of 50 mm and a diaphragm F42 is designated is shown. [数3]で説明したカメラ配置を使用して生成したボケ画像を示し、焦点位置50mm、絞りF1に相当するボケの大きさを指定して得られた画像である。The blur image generated using the camera arrangement described in [Formula 3] is shown, and is an image obtained by designating the blur position corresponding to the focal position 50 mm and the aperture F1. 図37で説明したと同じ条件で焦点位置50mm、絞りF1.4に相当するボケの大きさを指定して得られた画像である。37 is an image obtained by designating a blur size corresponding to a focal position of 50 mm and a diaphragm F1.4 under the same conditions as described in FIG. 図37で説明したと同じ条件で焦点位置50mm、絞りF2に相当するボケの大きさを指定して得られた画像である。37 is an image obtained by designating a blur position corresponding to a focal position of 50 mm and a diaphragm F2 under the same conditions as described in FIG. 図37で説明したと同じ条件で焦点位置50mm、絞りF4に相当するボケの大きさを指定して得られた画像である。37 is an image obtained by designating a blur position corresponding to a focal position of 50 mm and a diaphragm F4 under the same conditions as described in FIG. 図37で説明したと同じ条件で焦点位置50mm、絞りF42に相当するボケの大きさを指定して得られた画像である。37 is an image obtained by designating a blur size corresponding to a focal position of 50 mm and a diaphragm F42 under the same conditions as described in FIG. リフォーカス距離を0.71mに指定した時に得られる任意ボケ画像を示す。An arbitrary blurred image obtained when the refocus distance is designated as 0.71 m is shown. リフォーカス距離を0.82mに指定した時に得られる任意ボケ画像を示す。An arbitrary blurred image obtained when the refocus distance is designated as 0.82 m is shown. リフォーカス距離を0.97mに指定した時に得られる任意ボケ画像を示す。An arbitrary blurred image obtained when the refocus distance is specified as 0.97 m is shown. リフォーカス距離を1.2mに指定した時に得られる屋内の任意ボケ画像を示す。An indoor arbitrary blurred image obtained when the refocus distance is specified as 1.2 m is shown. リフォーカス距離を1.5mに指定した時に得られる屋内の任意ボケ画像を示す。An indoor arbitrary blurred image obtained when the refocus distance is designated as 1.5 m is shown. リフォーカス距離を2.1mに指定した時に得られる屋内の任意ボケ画像を示す。An indoor arbitrary blurred image obtained when the refocus distance is specified as 2.1 m is shown. リフォーカス距離を3.6mに指定した時に得られる屋内の任意ボケ画像を示す。An indoor blur image obtained when the refocus distance is designated as 3.6 m is shown. リフォーカス距離を10.7mに指定した時に得られる屋内の任意ボケ画像を示す。An indoor arbitrary blurred image obtained when the refocus distance is designated as 10.7 m is shown. リフォーカス距離を0.97mに指定した時に得られる野外の任意ボケ画像を示す。An outdoor blurred image obtained when the refocus distance is specified as 0.97 m is shown. リフォーカス距離を1.2mに指定した時に得られる野外の任意ボケ画像を示す。An arbitrary outdoor blur image obtained when the refocus distance is specified as 1.2 m is shown. リフォーカス距離を1.5mに指定した時に得られる野外の任意ボケ画像を示す。An outdoor blur image obtained when the refocus distance is designated as 1.5 m is shown. リフォーカス距離を2.1mに指定した時に得られる野外の任意ボケ画像を示す。An arbitrary outdoor blur image obtained when the refocus distance is specified as 2.1 m is shown. リフォーカス距離を3.6mに指定した時に得られる野外の任意ボケ画像を示す。An arbitrary outdoor blurred image obtained when the refocus distance is designated as 3.6 m is shown. リフォーカス距離を10.7mに指定した時に得られる野外の任意ボケ画像を示す。An outdoor blur image obtained when the refocus distance is designated as 10.7 m is shown. 合成開口撮影法により取得した複数の多焦点画像群に対して強度平均を算出して得られる強度平均像(フォーカススタック)画像を示す。An intensity average image (focus stack) image obtained by calculating an intensity average for a plurality of multifocal image groups acquired by the synthetic aperture imaging method is shown. 図56に示すフォーカススタック画像を、所定のフォーカススタックPSFカーネルでデコンボリューションして得られるオールフォーカス画像を示す。56 shows an all-focus image obtained by deconvolution of the focus stack image shown in FIG. 56 with a predetermined focus stack PSF kernel. 多焦点画像群に対して、視点が中央から斜め左下に偏ったフォーカススPSFタックカーネルでデコンボリューションして得られる任意視点ボケ画像を示す。An arbitrary viewpoint blurred image obtained by deconvolution with a focus PSF tack kernel with the viewpoint biased obliquely from the center to the lower left with respect to the multifocal image group is shown. 多焦点画像群に対して、視点が中央から左に偏ったフォーカススタックPSFカーネルでデコンボリューションして得られる任意視点ボケ画像を示す。An arbitrary viewpoint blurred image obtained by deconvolution with a focus stack PSF kernel with the viewpoint biased from the center to the left with respect to the multifocal image group is shown. 撮影距離5.3m、カメラ間視差0ピクセルにして視差付きの任意視点ボケ画像を生成した画像を示す。An image in which an arbitrary viewpoint blurred image with parallax is generated with a shooting distance of 5.3 m and an inter-camera parallax of 0 pixel is shown. 撮影距離3.6m、カメラ間視差2ピクセルに指定して視差付きの任意視点ボケ画像を生成した画像を示す。An image in which an arbitrary viewpoint blurred image with parallax is generated by specifying a shooting distance of 3.6 m and an inter-camera parallax of 2 pixels is shown. 撮影距離2.1m、カメラ間視差3ピクセルに指定して視差付きの任意視点ボケ画像を生成した画像を示す。An image is shown in which an arbitrary viewpoint blurred image with parallax is generated by specifying a shooting distance of 2.1 m and an inter-camera parallax of 3 pixels. 撮影距離1.5m、カメラ間視差5ピクセルにして視差付きの任意視点ボケ画像を生成した画像を示す。An image obtained by generating an arbitrary viewpoint blurred image with parallax with a shooting distance of 1.5 m and an inter-camera parallax of 5 pixels is shown. 撮影距離1.2m、カメラ間視差7ピクセルにして視差付きの任意視点ボケ画像を生成した画像を示す。An image obtained by generating an arbitrary viewpoint blurred image with parallax with a shooting distance of 1.2 m and an inter-camera parallax of 7 pixels is shown. 撮影距離0.97m、カメラ間視差9ピクセルにして視差付きの任意視点ボケ画像を生成した画像を示す。An image obtained by generating an arbitrary viewpoint blurred image with parallax with a shooting distance of 0.97 m and an inter-camera parallax of 9 pixels is shown. 撮影距離0.89m、カメラ間視差10ピクセルにして視差付きの任意視点ボケ画像を生成した画像を示す。An image in which an arbitrary viewpoint blurred image with parallax is generated with a shooting distance of 0.89 m and an inter-camera parallax of 10 pixels is shown. 撮影距離0.82m、カメラ間視差11ピクセルにして視差付きの任意視点ボケ画像を生成した画像を示す。An image obtained by generating an arbitrary viewpoint blurred image with parallax with a shooting distance of 0.82 m and an inter-camera parallax of 11 pixels is shown. 撮影距離0.71m、カメラ間視差13ピクセルにして視差付きの任意視点ボケ画像を生成した画像を示す。An image in which an arbitrary viewpoint blurred image with parallax is generated with a shooting distance of 0.71 m and an inter-camera parallax of 13 pixels is shown. 撮影距離0.63m、カメラ間視差15ピクセルにして視差付きの任意視点ボケ画像を生成した画像を示す。An image obtained by generating an arbitrary viewpoint blurred image with parallax with a shooting distance of 0.63 m and an inter-camera parallax of 15 pixels is shown. 合成開口法に画像の合成を説明する説明図である。It is explanatory drawing explaining the synthesis | combination of an image by a synthetic aperture method. 合成開口法で建物にピントを合わせて取得した画像を示す説明図である。It is explanatory drawing which shows the image acquired by focusing on a building by the synthetic aperture method. 図71で説明した画像のうちの遠景の領域を分解した説明図である。FIG. 72 is an explanatory diagram in which a distant view region of the image described in FIG. 71 is disassembled. 図71で説明した画像のうちの中距離被写体の領域を分解した説明図である。FIG. 72 is an explanatory diagram in which a region of a middle-distance subject in the image described in FIG. 71 is disassembled. 図71で説明した画像のうちの近距離被写体の領域を分解した説明図である。FIG. 72 is an explanatory diagram in which a region of a short-distance subject in the image described in FIG. 71 is disassembled. フォーカス画像を生成する他の実施形態を示すブロック図である。It is a block diagram which shows other embodiment which produces | generates a focus image. ボケ画像を生成する他の実施形態を示すブロック図である。It is a block diagram which shows other embodiment which produces | generates a blurred image. デプスマップ情報に基づいて画像を領域分割してボケ処理を行う他の実施形態を示すブロック図である。FIG. 10 is a block diagram illustrating another embodiment in which an image is divided into regions based on depth map information and blur processing is performed. 図77で説明した装置の動作手順を示すフローチャート図である。FIG. 78 is a flowchart showing an operation procedure of the apparatus described in FIG. 77.

多眼カメラ10は、図1に示すように、16個の撮影開口11がカメラボディ12の前面に設けられている。各撮影開口11の奥には、撮影レンズ、及び撮像素子が配されており、これら撮影開口11、撮影レンズ、及び撮像素子等がカメラ部となる個眼撮像部を構成する。   As shown in FIG. 1, the multi-lens camera 10 has 16 shooting openings 11 provided on the front surface of the camera body 12. A photographing lens and an imaging element are arranged in the back of each photographing opening 11, and the photographing opening 11, the photographing lens, the imaging element, and the like constitute a single-eye imaging unit serving as a camera unit.

各撮像素子は、例えば低画素で、かつ消費電力の少ない撮像素子が用いられている。また、各撮影レンズの光軸は、略平行になっている。各撮像素子は、撮影レンズの光軸に対して撮像面が垂直になるように配されている。   As each image sensor, for example, an image sensor having low pixels and low power consumption is used. Further, the optical axes of the photographing lenses are substantially parallel. Each imaging element is arranged so that the imaging surface is perpendicular to the optical axis of the imaging lens.

多眼カメラは、カメラボディ12の上面にシャッタボタン13、及び電源スイッチ14が配されており、1回のシャッタレリーズにより、視点の異なる16個の画像データを同時に取得し、これら画像データをパラメータに応じて画像処理をすることで、奥行き毎に鮮鋭度の調整(焦点の調整)、すなわち画面内の特定の被写体を意図的にぼかす処理を行って生成する任意焦点画像、ボケの強さや配置(ボケの大きさや形状、重み付け)を調節処理して生成するボケ生成画像、及びこれらボケ生成画像と任意焦点画像との処理を組み合わせて生成する視点を付与した立体視用任意視点の任意焦点、任意ボケ生成画像を生成することも可能である。すなわち(1)「光軸方向の焦点位置」、(2)「ボケの大きさ」、(3)「視点」の3つのパラメータを自由に選択可能なカメラを構成可能である。また、複数のカメラを用いることにより多画素化が可能で、高解像度画像データ、すなわち多画素化の画像データを生成することもできる。   The multi-lens camera is provided with a shutter button 13 and a power switch 14 on the upper surface of the camera body 12, and simultaneously acquires 16 pieces of image data with different viewpoints by one shutter release, and these image data are parameterized. Depending on the image processing, sharpness adjustment (focus adjustment) for each depth, that is, an arbitrary focus image generated by intentionally blurring a specific subject in the screen, the intensity and arrangement of the blur (Bokeh generation image generated by adjusting (size, shape, weighting of blur), and an arbitrary focal point of an arbitrary viewpoint for stereoscopic viewing with a viewpoint generated by combining the processing of the blurred generation image and the arbitrary focal point image, It is also possible to generate an arbitrary blur generation image. That is, it is possible to configure a camera that can freely select three parameters: (1) “focal position in the optical axis direction”, (2) “blur size”, and (3) “viewpoint”. Further, by using a plurality of cameras, it is possible to increase the number of pixels, and it is also possible to generate high-resolution image data, that is, image data with multiple pixels.

撮影開口11は、二次元状に配列されている。撮影開口11のx方向、及びy方向の間隔は、疑似ランダム系列であるM系列に従った所定の周期パターンに設定される。この場合、M系列の自己相関関数は、デルタ(δ)関数に近く、ピーク以外では相関関数値が一定となる特徴を備えている。自己相関関数がデルタ関数的であるので、パワースペクトルがフラット(周波数に依存せずに一定)になる。このことはボケを生成する際に特定の周波数成分を強調することがなくなるので望ましい性質である。実験によれば、ブラーカーネル(ぼかし関数)に円形開口を用いた場合、中抜けの矩形配置、方眼配置はボケが汚くなった。しかし、ブラーカーネルにガウス関数を用いた場合、カメラ配置にそれほど依存せずにきれいなボケが得られることが分かった。ブラーカーネルにガウス関数を用いる場合、カメラ配置にそれほど依存せずにきれいなボケが得られるので、隣接カメラ間の間隔が小さいほど離散的に見えるボケの間隔が小さくなり、きれいなボケとなるので、例えば円周上に等間隔またはランダムな間隔でカメラを配置すると総合的に最適なボケとなる可能性がある。方眼配置のカメラは、例えば[数1]に記載の式で表したように、5×5配列の配列として、16眼を90度ずつ回転させて4パターンで計算し([数1]に記載の式の左項)、これらの強度平均像をとる。これは重み付けで考えると、[数1]に記載の式の右項に示すように、「0.018〜1」までの重み付けとなる。[数1]に記載の式で表されるカメラ配置では、カメラごとの重み付けをすることと等価であるが、重み付けをガウシアンとしてもきれいなボケとなることが分かった。多画素化する場合の処理にはカメラの重み付けが均等であることが望ましいので、例えば[数1]に示すような4パターンのカメラ配置で多画素化をそれぞれ行い、最後にもう一回多画素化を行い、都合5回の多画素化を行うことで、カメラの重み付けとしては中心が高い、ガウシアン的な重みとすることができる。なお、ここでいう「カメラ」は、多眼カメラに内蔵する、撮影レンズや撮像素子からなる個々の撮像部を含む。   The imaging openings 11 are arranged in a two-dimensional manner. The intervals in the x direction and the y direction of the imaging aperture 11 are set to a predetermined periodic pattern according to the M sequence that is a pseudo-random sequence. In this case, the autocorrelation function of the M sequence is close to the delta (δ) function, and has a feature that the correlation function value is constant except for the peak. Since the autocorrelation function is a delta function, the power spectrum is flat (constant without depending on frequency). This is a desirable property because a specific frequency component is not emphasized when generating blur. According to the experiment, when a circular aperture was used for the blur kernel (blurring function), the blurry rectangular arrangement and the grid arrangement became blurred. However, it was found that when a Gaussian function is used for the blur kernel, a beautiful blur can be obtained without depending much on the camera arrangement. When a Gaussian function is used for the blur kernel, beautiful blur is obtained without much depending on the camera arrangement, so the smaller the distance between adjacent cameras, the smaller the distance between the blurs that appears discretely, and the more beautiful the blur is. If the cameras are arranged on the circumference at equal intervals or at random intervals, there is a possibility that the optimum blur will be obtained. A grid-arranged camera, for example, expressed as a formula described in [Equation 1], calculates 16 patterns by rotating 90 eyes by 90 degrees as an array of 5 × 5 arrays (described in [Equation 1]). The left term of the equation of), take these intensity average images. In terms of weighting, this is a weighting of “0.018 to 1” as shown in the right term of the equation described in [Formula 1]. The camera arrangement represented by the equation described in [Equation 1] is equivalent to weighting for each camera, but it has been found that even if the weight is set to Gaussian, the blur is beautiful. Since it is desirable that the weighting of the cameras be equal in the processing when the number of pixels is increased, for example, the number of pixels is increased by a four-pattern camera arrangement as shown in [Equation 1], and finally the number of pixels is increased once again. By making the number of pixels five times for convenience, the weight of the camera can be a Gaussian weight with a high center. Here, the “camera” includes individual imaging units that are built into a multi-lens camera and that include a photographing lens and an imaging element.

多画素化を考えなければ直接ガウシアンの重み付けとすることも容易でカメラ間隔=1σ(標準偏差)のガウシアンの場合、[数2]に示す式で表される。 If the number of pixels is not considered, it is easy to set the weight directly to Gaussian. In the case of Gaussian with camera interval = 1σ (standard deviation), it is expressed by the equation shown in [Expression 2].

数列Xi(i=1〜m、(mは周期))のM系列疑似ランダム数列は、一般的に、「1」以上の整数nに対して「2n−1」の周期mを持つ「0」と「1」の2値の数列であって、1つの周期mの中の数列の数は奇数で、「0」の数と「1」の数の差が「1」となる。よって、整数nと周期mとの組み合わせ(n,m)としては、(3,7)、(4,15)、(5,31)、(6,63)等がある。 The M-sequence pseudorandom number sequence of the sequence Xi (i = 1 to m, where m is a cycle) is generally “0” having a cycle m of “2n−1” for an integer n of “1” or more. And “1” in a binary number sequence, the number of the number sequences in one period m is an odd number, and the difference between the number of “0” and the number of “1” is “1”. Therefore, combinations (n, m) of the integer n and the period m include (3, 7), (4, 15), (5, 31), (6, 63), and the like.

図2に示すように、例えば整数nが「2」で周期mが「3」の数列では、「1,0,1」となり、また、例えば整数nが「3」で周期mが「7」の数列では、「1,1,1,0,1,0,0」となり、さらに、例えば整数nが「4」で周期mが「15」の数列では、「1,1,1,1,0,1,0,1,1,0,0,1,0,0,0」となる。本実施形態では、例えば整数nが「3」で周期mが「7」の数列「1,1,1,0,1,0,0」を採用している。この場合には、図3に示すような二次元の配列パターンになる。このパターンは、「○」で示す位置が撮影開口11を配する位置になる。   As shown in FIG. 2, for example, in a sequence where the integer n is “2” and the period m is “3”, it is “1, 0, 1”, and for example, the integer n is “3” and the period m is “7”. In the numerical sequence of “1, 1, 1, 0, 1, 0, 0”, for example, in the numerical sequence in which the integer n is “4” and the period m is “15”, “1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0 ". In the present embodiment, for example, a numerical sequence “1, 1, 1, 0, 1, 0, 0” having an integer n of “3” and a period of “7” is employed. In this case, a two-dimensional array pattern as shown in FIG. 3 is obtained. In this pattern, the position indicated by “◯” is the position where the photographing aperture 11 is arranged.

なお、この数列の作り方は、例えば著者が磯部隆で東京大学出版会から1968年2月初版発行、1971年1月第2刷が発行された「相関関数とスペクトル−その測定と応用−」の170頁〜175頁に記載されている。   In addition, the method of making this number sequence is, for example, “Correlation Function and Spectrum-Its Measurement and Application” published by Takashi Isobe, published by the University of Tokyo in February 1968 and the second edition in January 1971. 170-175.

ところで、撮影開口11の二次元配列の間隔は、M系列以外に、Q系列(平方剰余系列)、Gold系列、Walsh符号等、2値の疑似ランダム系列である所定の周期パターンに設定することもできる。また、撮影開口11の2次元方向の間隔を等間隔にしてもよい。しかし、詳しくは後述するフォーカススタック前の瞳サンプリング点にゼロ点が無い方が望ましいため、二次元方向の間隔がM系列の所定の周期パターンに設定するのが望ましい。撮影開口11の個数としては、16個(16眼)に限ることはない。   By the way, the interval of the two-dimensional array of the photographing apertures 11 may be set to a predetermined periodic pattern which is a binary pseudo-random sequence such as a Q sequence (square residue sequence), a Gold sequence, a Walsh code, etc. in addition to the M sequence. it can. Further, the intervals in the two-dimensional direction of the imaging openings 11 may be equal. However, since it is desirable that there is no zero point in the pupil sampling points before the focus stack, which will be described in detail later, it is desirable to set the interval in the two-dimensional direction to a predetermined periodic pattern of M series. The number of imaging apertures 11 is not limited to 16 (16 eyes).

図3で説明したM系列の応用例として、[数3]に記載の式で表されるカメラ配置では、例えば、5×5配列の配列として、16眼を90度ずつ回転させて4パターンで計算し([数3]に記載の式の左項)、これらの強度平均像をとると、ボケがいっそう素直になることが分かった。これは重み付けで考えると、[数3]に記載の式の右項に示すように、「0.25〜1」までの重み付けとなる。この場合の多画素化は、90度ずつで多画素化処理を別々に行い、最終的に強度平均を求めることが望ましい。   As an application example of the M series described with reference to FIG. 3, in the camera arrangement represented by the equation described in [Equation 3], for example, as an array of 5 × 5 arrays, 16 eyes are rotated by 90 degrees in four patterns. When calculated (the left term of the equation described in [Equation 3]) and taking these intensity average images, it was found that the blur becomes more straightforward. When this is considered in terms of weighting, as shown in the right term of the equation described in [Equation 3], the weighting is from “0.25 to 1”. In this case, it is desirable to increase the number of pixels by separately performing the multi-pixel processing at 90 degrees and finally obtaining the average intensity.

カメラボディ12の背後には、図4に示すように、LCD15が配されている。LCD15は、透明なタブレット34とともにタッチパネルを構成する。タッチパネルには、スルー画像に重ねてメニューの文字や操作ボタン等の絵柄が表示され、タッチ操作により変倍操作、焦点面の指定、ボケパラメータ(仮想口径の大きさ、形状、重み付け)の選択等のパラメータ入力をする。 An LCD 15 is arranged behind the camera body 12 as shown in FIG. The LCD 15 forms a touch panel together with the transparent tablet 34. The touch panel displays images such as menu characters and operation buttons overlaid on the live view image. By touch operation, zooming operation, focal plane designation, blur parameter (virtual aperture size, shape, weighting) selection, etc. Enter the parameters.

各撮像素子20には、図5に示すように、AFE21、及びフレームメモリ22がそれぞれ接続されており、撮影レンズ23により結像する被写体像を撮像して画像信号をAFE21に出力する。ここで、符号40は個眼撮像部40を示す。   As shown in FIG. 5, an AFE 21 and a frame memory 22 are connected to each image sensor 20, and a subject image formed by the photographing lens 23 is captured and an image signal is output to the AFE 21. Here, reference numeral 40 indicates the single-eye imaging unit 40.

AFE21は、周知のCDS(相関二重サンプリング)/AGC(ゲイン・コントロール・アンプ回路)、A/D、及び信号処理回路で構成されており、CPU24とともにTGから供給されるパルスに同期して動作する(図示なし)。信号処理回路は、デジタルの画像データを取り込み、画素欠陥補正やホワイトバランス補正、ガンマ補正などの補正を行う。   The AFE 21 includes a well-known CDS (correlated double sampling) / AGC (gain control amplifier circuit), A / D, and a signal processing circuit, and operates in synchronization with a pulse supplied from the TG together with the CPU 24. (Not shown). The signal processing circuit captures digital image data and performs corrections such as pixel defect correction, white balance correction, and gamma correction.

CPU24は、撮像素子20の電荷蓄積時間(電子シャッタ)を各々制御し、また、特定の撮像素子20から得られる画像データに基づいて被写体の輝度を測定し、この測定結果に基づいて全撮像素子20の電子シャッタの値を一定になるように変えて露出を制御する。   The CPU 24 controls the charge accumulation time (electronic shutter) of the image sensor 20 and measures the luminance of the subject based on the image data obtained from the specific image sensor 20, and all the image sensors based on the measurement result. The exposure is controlled by changing the value of 20 electronic shutters to be constant.

AF部26は、シャッタボタンの半押し操作に応答して複数の画像データのうち少なくとも2つの画像データを取り込み、これら2つの画像データに基づいて両画像の相対的なずれ量を求め、求めたずれ量から複数の被写体に対する被写体距離を各々算出し、一つの合焦ドライバ27を制御して、被写体距離に応じた合焦位置に撮影レンズ23を移動させるとともに、残りの合焦ドライバ27を制御して、前記被写体距離に応じた合焦位置を基準として、残りの撮像レンズ23の合焦位置を、均一なボケ量でずれるように順々にずらしていく。なお、撮像素子20を移動させるか、もしくは、撮影レンズ23と撮像素子20との両方を移動させてピントをずらしても良い。   The AF unit 26 fetches at least two of the plurality of image data in response to the half-pressing operation of the shutter button, and obtains the relative shift amount between the two images based on the two image data. Subject distances for a plurality of subjects are calculated from the shift amounts, and one focusing driver 27 is controlled to move the photographing lens 23 to a focusing position corresponding to the subject distance, and the remaining focusing drivers 27 are controlled. Then, with the in-focus position corresponding to the subject distance as a reference, the in-focus positions of the remaining imaging lenses 23 are sequentially shifted so as to be shifted with a uniform blur amount. Note that the image pickup device 20 may be moved, or both the photographing lens 23 and the image pickup device 20 may be moved to shift the focus.

AFの必要性について見積もったところ、厚さ3mmの薄型カメラを実現するには1/8インチ以下の光学サイズのセンサー(撮像素子)を用いることが望ましい。これは、センサー対角長を「Dg」、光路全長を「Lp」とし、十分な収差特性のレンズ設計をすると、Lp>0.9Dgとなるからである。   As a result of estimating the necessity of AF, it is desirable to use a sensor (imaging device) having an optical size of 1/8 inch or less in order to realize a thin camera having a thickness of 3 mm. This is because if the lens diagonal length is “Dg”, the total optical path length is “Lp”, and a lens with sufficient aberration characteristics is designed, then Lp> 0.9 Dg.

多眼カメラの場合、最大でカメラ数倍の多画素化が行えるので、一つ一つのカメラモジュールは、最終的なカメラとしての出力画素よりも少なくてよい。多画素化のアルゴリズムにもよるが、最寄のセンサーの画素のデータを用いるなどのアルゴリズムを用いた場合、カメラ数の0.56倍以下の多画素化にとどめると生成画像に破綻がない。例えば6M(メガ、100万)画素出力のカメラの場合、16眼を使った場合9倍程度の多画素化は容易である。その場合6Mの1/(16×0.6)=1/9より6M×1/9=0.67M画素以上の画素数のカメラモジュールであれば良い。   In the case of a multi-lens camera, the number of pixels can be increased up to several times as many as the camera, so each camera module may have fewer output pixels than the final camera. Although depending on the algorithm for increasing the number of pixels, when an algorithm such as using the pixel data of the nearest sensor is used, the generated image will not fail if the number of pixels is reduced to 0.56 times or less the number of cameras. For example, in the case of a camera with 6M (mega, 1 million) pixel output, it is easy to increase the number of pixels by about 9 times when 16 eyes are used. In this case, the camera module may have any number of pixels that is 6M × 1/9 = 0.67M pixels from 1 / (16 × 0.6) = 1/9 of 6M.

1/8インチの像高のセンサーサイズで6Mを解像する光学系が必要である。具体的にはナイキスト波長でのMTFは最低10%以上必要である。ナイキスト波長は、この場合1.169μmとなる。このためレンズのFナンバーは、1.4以下が必要である。6M出力のカメラの厚さを5mmにおさえる場合、センサーの呼び寸法は1/4インチで可能でレンズのFナンバーは2.8以下でよい。   An optical system for resolving 6M with a sensor size of 1/8 inch image height is required. Specifically, the MTF at the Nyquist wavelength must be at least 10%. In this case, the Nyquist wavelength is 1.169 μm. For this reason, the F number of a lens needs to be 1.4 or less. When the thickness of the 6M output camera is 5 mm, the nominal size of the sensor can be 1/4 inch and the F number of the lens can be 2.8 or less.

AFの有無を上記の3mm厚さ、5mm厚さのカードカメラについてレンズの収差を含めて検討したところ、カメラのピント位置を被写体までの距離2m程度に設定しておけば、被写体までの距離1mから無限遠までMTFの変化はナイキスト周波数で50%以下の変化であり、パンフォーカスとみなせることが分かった。また、フォーカス位置に応じてMTFの変化分(同時にPSFも変化する。)を補うようにデコンボリューションすることも可能である。リフォーカス(撮影後に任意の被写体距離にフォーカスすること)する際に、距離に応じてMTFの劣化を補うことが可能である。すなわち、図75に示すように、フォーカス位置ごとのPSF又はMTFを予め記憶する記憶部40と、合成開口法によりフォーカス画像を生成する時にフォーカス位置によるPSF又はMTFの変化を相殺するように画像処理を行う画像処理部41と、を備えればよい。これら記憶部40及び画像処置部41はCPU42とともにバス43で接続されており、CPU42により統括的に制御される。なお、符号44は、多眼カメラ、スキャナ、及び外部入力部等、複数の画像を取り込むための画像取得部である。このように構成しても本発明によりピントはずれの像はぼけているので、ピントはずれの像が過補正になり、像が不自然になることはない。   The presence or absence of AF was examined for the above-mentioned 3 mm and 5 mm thick card cameras including lens aberrations. If the camera focus position was set to about 2 m to the subject, the distance to the subject was 1 m. It was found that the change in MTF from infinity to infinity is a change of 50% or less at the Nyquist frequency and can be regarded as pan focus. It is also possible to perform deconvolution so as to compensate for the change in MTF (PSF also changes at the same time) according to the focus position. When refocusing (focusing on an arbitrary subject distance after shooting), it is possible to compensate for the degradation of MTF according to the distance. That is, as shown in FIG. 75, the storage unit 40 that stores PSF or MTF for each focus position in advance, and image processing so as to cancel the change in PSF or MTF due to the focus position when generating a focus image by the synthetic aperture method. And an image processing unit 41 that performs the above. The storage unit 40 and the image processing unit 41 are connected together with the CPU 42 by a bus 43 and are controlled by the CPU 42 in an integrated manner. Reference numeral 44 denotes an image acquisition unit for capturing a plurality of images, such as a multi-lens camera, a scanner, and an external input unit. Even with this configuration, the out-of-focus image is blurred according to the present invention, so that the out-of-focus image is overcorrected and the image does not become unnatural.

カメラモジュールのAF用アクチュエータは、被写体までの距離2mにフォーカスを設定する際に用いてもよい。これは1/8インチのセンサーサイズの像側の焦点調整がシビアでコンマ数ミクロンレベルの調整と安定性を求めるためである。   The AF actuator of the camera module may be used when setting the focus at a distance of 2 m to the subject. This is because the focus adjustment on the image side of the 1/8 inch sensor size is severe, and adjustment and stability on the order of several microns are required.

ところで、一つの撮影レンズ23のピントを測距した基準の被写体距離に合わせるとともに、残りの撮影レンズ23に対しては前記合焦位置を基準にして均一なボケ量になるようピントを順にずらしていくピントずらし制御は難しい。そこで、AF部26としては、最短撮影距離から無限遠までの撮影距離域を個眼撮像部40の数で分割し、各分割位置に応じた撮影距離にピントが各々合うように各合焦ドライバ27を制御して、各撮影レンズ23を個別に移動させるのが好適である。なお、フォーカスを撮影事後に行わない場合には、絞りと撮影レンズ23とでパンフォーカスを構成してもよい。この場合には、AF部26等を省略することができる。   By the way, the focus of one photographing lens 23 is adjusted to the reference subject distance measured, and the remaining photographing lenses 23 are sequentially shifted in focus so that the amount of blur is uniform with respect to the in-focus position. Going out of focus is difficult to control. Therefore, the AF unit 26 divides the shooting distance range from the shortest shooting distance to infinity by the number of the single-eye imaging units 40, and each focusing driver so that the shooting distance corresponding to each division position is in focus. It is preferable to move each photographic lens 23 individually by controlling 27. In addition, when the focus is not performed after the photographing, the pan focus may be configured by the diaphragm and the photographing lens 23. In this case, the AF unit 26 and the like can be omitted.

ROM28は、各種プログラムやプログラムの実行に必要な設定値を予め記憶している。RAM29は、CPU24のワークメモリとして、また、各部の一時的なメモリとして使用される。これらCPU24、ROM28、RAM29、LCDドライバ33、I/F30、及び画像処理部25はバス32により接続されている。   The ROM 28 stores various programs and setting values necessary for executing the programs in advance. The RAM 29 is used as a work memory for the CPU 24 and as a temporary memory for each unit. The CPU 24, ROM 28, RAM 29, LCD driver 33, I / F 30, and image processing unit 25 are connected by a bus 32.

なお、撮影レンズ23をズームレンズ、又は焦点距離切り替えタイプのレンズとしてもよい。この場合には、変倍操作に同期して全ての撮影レンズ23を同じに変倍するように構成すればよい。   The photographing lens 23 may be a zoom lens or a focal length switching type lens. In this case, all the photographing lenses 23 may be configured to be zoomed in the same manner in synchronization with the zooming operation.

CPU24には、タブレット34から各種の操作信号が入力される(図示なし)。CPU24は、1回のレリーズ操作に応答して焦点の異なる複数の画像データ(多焦点画像データ)を各フレームメモリ22に同時に取り込む。多焦点画像データは、各フレームメモリ22に個別に取り込まれた後、画像処理部25に出力される。
<3次元シフト・インバリアントな結像>
光学系による結像の点像PSFを光軸方向のデフォーカスによるボケも考慮すると、3次元のPSFを考える必要がある。物体も3次元で、アイソプラナティックな範囲ではシフト・インバリアントな結像と見なせ、物体面のどこでも同じPSFで結像を表すことができる。例えば像空間x,y,zに像点p1,p2が存在する場合、これらの点に対して、PSFがコンボリューションされた状態が結像状態となる。一般に物体は凹凸があり、結像ではカメラから見える表面上の物点に対応する像点がそれぞれPSFでコンボリューションされた状態となる(図6参照)。図6に示す3次元のPSFは、3次元のボケカーネルと呼んでも良い。このような3次元結像状態を得る場合、通常のレンズの結像の場合、例えば図7に示すように、焦点距離5.34mm、F1.4、対角撮像範囲=像高×2=3.17mmの場合、近距離の530mmから無限遠までを結像したとしても像空間x,y,zの光軸方向zの結像位置は5.34mmと5.39mmで高々50μmの変化しか起こらず、この範囲をz方向にアイソプラナティックな範囲と見なすことができる。x,yについても通常PSFは大きく変化することはないので、通常のレンズの結像状態で、2次元の撮像素子を像面Iに平行に移動、位置させて撮像することにより、3次元結像状態のデータを取得すること可能である。2次元撮像素子の光軸z方向のデータ取得の間隔は、等間隔とすることが信号処理の上で望ましい。なお、z minは、無限遠位置に相当する。z maxは、被写体のレンズから最近の位置を十分に含むことが望ましいが、実用的にはリフォーカスを行う可能性のある範囲で問題ない。またz minも近景のみフォーカスさせる場合は必ずしも無限遠までの2次元撮像素子のデータが必要というわけではなく、リフォーカスする範囲の奥行き方向で最も遠い点をz minとすればよい。特にマクロ撮影では、z方向のデータが増加しがちなので、適当な範囲をz min, z maxに設定することが必要となる。結像倍率は、レンズから被写体までの距離を「Z」、レンズから像点までの距離を「b」とすると、レンズの結像公式「1/f=1/Z+1/b」の式から求まる。
Various operation signals are input to the CPU 24 from the tablet 34 (not shown). The CPU 24 simultaneously loads a plurality of image data (multifocal image data) having different focal points into each frame memory 22 in response to one release operation. The multifocal image data is individually taken into each frame memory 22 and then output to the image processing unit 25.
<Three-dimensional shift invariant imaging>
Considering the blur due to defocusing in the optical axis direction of the point image PSF formed by the optical system, it is necessary to consider a three-dimensional PSF. An object is also three-dimensional, and can be regarded as shift-invariant imaging within an isoplanatic range, and imaging can be expressed with the same PSF anywhere on the object surface. For example, when the image points p1 and p2 exist in the image space x, y, and z, the state in which the PSF is convolved with respect to these points is the image formation state. In general, an object is uneven, and in image formation, image points corresponding to object points on the surface visible from the camera are convoluted with PSF (see FIG. 6). The three-dimensional PSF shown in FIG. 6 may be called a three-dimensional blur kernel. When obtaining such a three-dimensional imaging state, in the case of normal lens imaging, for example, as shown in FIG. 7, the focal length is 5.34 mm, F1.4, the diagonal imaging range = image height × 2 = 3. In the case of .17 mm, even if an image is formed from a short distance of 530 mm to infinity, the imaging position in the optical axis direction z of the image space x, y, z is 5.34 mm and 5.39 mm, and only a change of 50 μm occurs at most. However, this range can be regarded as an isoplanatic range in the z direction. Since the PSF does not change significantly with respect to x and y as well, a three-dimensional image is obtained by moving and positioning a two-dimensional image sensor in parallel with the image plane I in the normal lens imaging state. It is possible to acquire image state data. It is desirable in terms of signal processing that the data acquisition intervals in the optical axis z direction of the two-dimensional imaging device are equal intervals. Note that z min corresponds to the infinity position. Although it is desirable that z max sufficiently include the latest position from the lens of the subject, there is no problem in a range where refocusing may be practically performed. When z min is focused only in the near view, the data of the two-dimensional image sensor up to infinity is not necessarily required, and the point farthest in the depth direction of the refocus range may be set as z min. Particularly in macro photography, since data in the z direction tends to increase, it is necessary to set appropriate ranges to z min and z max. The imaging magnification is obtained from the formula of the lens imaging formula “1 / f = 1 / Z + 1 / b” where “Z” is the distance from the lens to the subject and “b” is the distance from the lens to the image point. .

<合成開口法によるフォーカシングについて>
合成開口法でのフォーカス合わせは、図8に示すように、距離Zにフォーカスする場合、中央のカメラからの距離を「s」とすれば、視差量=カメラ間隔×結像倍率=s×b/Zだけ像をシフトさせて、中央のカメラの像とフォーカス位置にある像点が重なるように行う。
<Focusing by the synthetic aperture method>
As shown in FIG. 8, in the focusing by the synthetic aperture method, when focusing on the distance Z, if the distance from the center camera is “s”, the amount of parallax = camera interval × imaging magnification = s × b The image is shifted by / Z so that the center camera image and the image point at the focus position overlap.

レンズの代わりにピンホールを使う場合、結像倍率は「f/Z」の式から求まる。パンフォーカスのレンズを使用する場合、レンズのピント位置はMTFの変化を計算し、最短撮影距離と無限遠のMTFの劣化が同程度になるような固定ピント設定距離を決める。例えば最短撮影距離が1mの場合、2mにピント位置を設定する。bの値はレンズの結像公式から求める。([数7])
以下の説明では視差の単位をピクセルで表現する場合が多いが、これは本発明では視差量が撮像素子のピクセルピッチの整数倍となる被写体距離で合成開口法でフォーカス画像を合成し、画像処理をおこなうことが効率的で、かつ、処理した結果も画質が良好であるためである。ピクセルピッチは撮像素子の本来の値を用いても良いし、多画素化された後の撮像素子のピッチを用いても良い。また、マクロ撮影時などフォーカス点があまりに多くなる場合は、視差量を1ピクセルずつに対応させて合成開口画像を生成する必要は無く、適宜間引きすることが可能である。間引きの割合は画像を見ながら判断する必要がある。
When a pinhole is used instead of a lens, the imaging magnification is obtained from the formula “f / Z”. When a pan focus lens is used, the focus position of the lens calculates the change in MTF, and the fixed focus setting distance is determined so that the degradation of the shortest shooting distance and the MTF at infinity is comparable. For example, when the shortest shooting distance is 1 m, the focus position is set to 2 m. The value of b is obtained from the lens imaging formula. ([Formula 7])
In the following description, the unit of parallax is often expressed in pixels. However, in the present invention, the focus image is synthesized by the synthetic aperture method at a subject distance in which the parallax amount is an integral multiple of the pixel pitch of the image sensor, and image processing is performed. This is because it is efficient to perform the image processing, and the image quality is also good as a result of processing. As the pixel pitch, the original value of the image sensor may be used, or the pitch of the image sensor after the number of pixels is increased may be used. In addition, when there are too many focus points, such as during macro shooting, it is not necessary to generate a synthetic aperture image with the parallax amount corresponding to each pixel, and thinning can be performed as appropriate. It is necessary to judge the thinning ratio while viewing the image.

合成開口法でシフト・インバリアントな3次元結像状態のデータを取得することを考える。そのためには、像空間の光軸方向zを視差量で表現することが望ましい。理由は以下の説明による。   Consider acquiring shift-invariant three-dimensional imaging state data using the synthetic aperture method. For that purpose, it is desirable to express the optical axis direction z of the image space by the amount of parallax. The reason is as follows.

物体の座標系をX,Y,Zのリニア(等間隔)スケールで考える。光軸をZ軸方向にとる。多眼カメラの合成開口法によるフォーカス合わせの像空間の座標系(x,y,z)とする。多眼カメラの各カメラはピンホールカメラと同様に焦点深度が深いカメラを用い、リフォーカシング可能にするのが普通である。ます、図8に示すようにピンホールカメラを考える。   Consider the coordinate system of an object on an X, Y, Z linear (equally spaced) scale. The optical axis is taken in the Z-axis direction. A coordinate system (x, y, z) of an image space for focusing by a synthetic aperture method of a multi-lens camera is used. As in the case of a pinhole camera, each camera of a multi-lens camera usually uses a camera with a deep focal depth and can be refocused. Consider a pinhole camera as shown in FIG.

ピンホールカメラは一つ一つはZ方向の情報を持たず、いずれの距離の物体もピンホールから焦点距離fのところに位置する結像面に結像する。ところが合成開口法によって焦点合わせを行うと、カメラ配置に起因する視差=ボケを発生する。多眼カメラによるピント合わせを、図8を参照しながら説明する。   Each pinhole camera does not have information in the Z direction, and an object at any distance is imaged on an imaging plane located at a focal length f from the pinhole. However, when focusing is performed by the synthetic aperture method, parallax = blurring due to camera arrangement occurs. Focusing with a multi-lens camera will be described with reference to FIG.

カメラは、X,Y方向に5×5の配置である。ピンホールカメラによる25眼の画像を撮影し、そこから合成開口法でフォーカシングを行うので、被写体の結像倍率は撮影時に決定し、フォーカシングに依存しない。結像倍率は被写体までの距離をZとすればピンホールカメラの倍率:f/Zである。   The camera has a 5 × 5 arrangement in the X and Y directions. Since a 25-eye image is taken with a pinhole camera and focusing is performed by the synthetic aperture method, the imaging magnification of the subject is determined at the time of shooting and does not depend on the focusing. The imaging magnification is the magnification of the pinhole camera: f / Z, where Z is the distance to the subject.

図8は多眼カメラを複数のピンホールカメラとして表現しており、各カメラの視点つまりピンホールの位置は、カメラ面(瞳共役面)(s−t平面)に位置しており、カメラ25台の瞳位置(視点位置、ピンホール位置と等価)をD(s,t)で示す。X軸とs軸とx軸は平行。Y軸とt軸とy軸は平行とする。物体面とカメラ面は平行で、合成開口法によりカメラ面から任意の距離Zにある、物体面に合焦させる状態を表している。同図ではピンホールカメラのピンホールは3角形の頂点で表されている。   FIG. 8 represents a multi-view camera as a plurality of pinhole cameras. The viewpoint of each camera, that is, the position of the pinhole, is located on the camera plane (pupil conjugate plane) (s-t plane). The stage pupil position (equivalent to the viewpoint position and pinhole position) is indicated by D (s, t). The X, s, and x axes are parallel. The Y axis, t axis, and y axis are parallel. The object plane and the camera plane are parallel and represent a state in which the object plane is in focus at an arbitrary distance Z from the camera plane by the synthetic aperture method. In the figure, the pinhole of the pinhole camera is represented by a triangular apex.

各カメラのセンサー面の座標をxD(s,t),yD(s,t)とする。この座標xD(s,t),yD(s,t)はキャリブレーション済みの誤差なしの値とする。物体面(X,Y)上の点Pはカメラ面からZの距離にあり、各カメラD(s,t)のx’D(s,t),y’D(s,t)に結像する。これは[数4]及び[数5]に記載の式で示される。またZ軸上にcam3があるとすれば、x=X×f/Z,y=Y×f/Zとなる。 The coordinates of the sensor surface of each camera are assumed to be x D (s, t) , y D (s, t) . The coordinates x D (s, t) and y D (s, t) are values without error after calibration. A point P on the object plane (X, Y) is at a distance Z from the camera plane and forms an image on x ' D (s, t) and y' D (s, t) of each camera D (s, t). To do. This is shown by the equations described in [Equation 4] and [Equation 5]. If cam3 is on the Z axis, x = X × f / Z and y = Y × f / Z.

ここで、[数4][数5]に記載のfD(s,t)は実測焦点距離、cxD(s,t),cyD(s,t)はキャリブレーション誤差追い込み用の定数である。 Here, [Expression 4] according to Equation 5] f D (s, t ) is the measured focal length, cx D (s, t) , cy D (s, t) is a constant for calibration error thrust is there.

センサー面の画像ピクセルの出力をC(x’D(s,t),y’D(s,t))とする。距離Zにフォーカスが合った合成開口出力I(x,y,Z)は[数6]に示す式から算出することができる。 Let C (x ′ D (s, t) , y ′ D (s, t) ) be the output of the image pixel on the sensor surface. The synthetic aperture output I (x, y, Z) focused on the distance Z can be calculated from the equation shown in [Equation 6].

ただし、合成開口出力は、任意の選択したカメラの合成出力とする。例えば25台中の16台。模式的には合成開口法による画像の合成の状況は、図70に示すようにピント位置に応じて画像を相対的に移動させてピント合わせ(フォーカス合わせ)を行う。 However, the synthetic aperture output is the synthetic output of any selected camera. For example, 16 of 25 units. Schematically, the state of image synthesis by the synthetic aperture method is as shown in FIG. 70, in which the image is relatively moved in accordance with the focus position to perform focusing (focus adjustment).

[数4]、[数5]、及び[数6]は、ピンホールカメラの例で説明した式である。しかしながら、実際にはカメラレンズ付きの多眼カメラを用いる。その場合の視差量は、[数7]、または[数8]に記載の式で示される。   [Expression 4], [Expression 5], and [Expression 6] are the expressions described in the example of the pinhole camera. However, a multi-lens camera with a camera lens is actually used. In this case, the parallax amount is expressed by the equation described in [Equation 7] or [Equation 8].

視差量zが等間隔となる物体距離Zで画像を取得することが効率的であり、視差量zが決まれば被写体までの距離Zは、[数7]、または[数8]に記載の式により一義的に決まる。ピンホールカメラの場合の視差量zは、カメラ間隔(瞳面上の任意の2視点間の距離):s0と撮像倍率:b/Zの積に比例し、[数7]で示される。従って、カメラ間隔が大きいほど視差の被写体距離に対する変化量は大きくなる。多眼配置のカメラではカメラ間の距離が最も離れた2視点の間隔:s maxで、視差の被写体距離に対する変化量は最大になる。従って、視差量のサンプリングピッチはもっとも細かく取得する場合においては、[数7]でs0=s maxとした視差量が撮像素子のピクセルピッチの整数倍に相当する視差量zにて、複数のフォーカス画像をサンプリングまたは合成してゆけばよい。   It is efficient to acquire an image at an object distance Z at which the parallax amount z is equally spaced, and if the parallax amount z is determined, the distance Z to the subject is expressed by the equation described in [Equation 7] or [Equation 8]. Is uniquely determined by The parallax amount z in the case of a pinhole camera is proportional to the product of camera interval (distance between any two viewpoints on the pupil plane): s0 and imaging magnification: b / Z, and is expressed by [Equation 7]. Therefore, the larger the camera interval, the greater the amount of change in parallax with respect to the subject distance. In a multi-lens arrangement camera, the amount of change in parallax with respect to the subject distance is maximized at the interval of two viewpoints: s max where the distance between the cameras is the longest. Therefore, in the case where the sampling pitch of the parallax amount is acquired most finely, the parallax amount z in which s0 = smax in [Equation 7] is equal to an integer multiple of the pixel pitch of the image sensor, and a plurality of focus points are obtained. You can sample or combine images.

[数7]
視差量(z)=最小カメラ間隔(s0)×結像倍率=s0×b/Z
<視差量について>
以上見たように、視差量は、ピンホールカメラまたは、パンフォーカスレンズの場合、[数7]に記載の式で示される。一方、図7に示すように単眼レンズでピント合わせをする場合を考える。この場合、レンズの入射瞳はある程度面積を持ち、レンズの瞳面(sp)内の任意の2点間の距離:s0とする。任意の2点間の距離:s0の最大は瞳径Apである。視差量z2は、物点までの距離をZ、焦点距離をfとすると[数8]に記載の式になる。また、多眼カメラの構成で各対物レンズのピント合わせを行う場合も、[数8]に記載の式で示される。
[Equation 7]
Parallax amount (z) = minimum camera interval (s0) × imaging magnification = s0 × b / Z
<About the amount of parallax>
As seen above, the amount of parallax is expressed by the equation described in [Formula 7] in the case of a pinhole camera or a pan focus lens. On the other hand, consider the case of focusing with a monocular lens as shown in FIG. In this case, the entrance pupil of the lens has a certain area, and the distance between any two points in the pupil plane (sp) of the lens is s0. The maximum distance between any two points: s0 is the pupil diameter Ap. The parallax amount z2 is given by the equation shown in [Equation 8] where Z is the distance to the object point and f is the focal length. Also, when focusing on each objective lens in the configuration of the multi-lens camera, it is expressed by the equation described in [Equation 8].

[数8]
視差量(z2)=結像倍率(m)×瞳面上の任意の2視点間の距離(s0)=f×s0/(Z−f)
なお、図7の瞳面と図8のカメラ面は、双方とも入射する光束を規定する入射瞳であって、等価な役割を果している。また、合成開口法の多眼カメラのレンズを被写体のピント位置ごとにレンズを繰り出してピント合わせを行う場合は、結像面とレンズの距離:bはZの関数となるので、視差は、[数8]式に記載の式になる。一般的に多眼カメラを用いた合成開口法は、固定フォーカス、パンフォーカスのレンズを用いるので、視差量zは[数7]に記載の式から導く。
[Equation 8]
Parallax amount (z2) = imaging magnification (m) × distance between any two viewpoints on the pupil plane (s0) = f × s0 / (Z−f)
Note that the pupil plane in FIG. 7 and the camera plane in FIG. 8 are both entrance pupils that define the incident light flux, and play an equivalent role. In addition, when a lens of a multi-lens camera with a synthetic aperture method is extended for each focus position of a subject to perform focusing, the distance between the image plane and the lens: b is a function of Z, so that the parallax is [ It becomes a formula as described in Formula 8]. In general, a synthetic aperture method using a multi-lens camera uses fixed focus and pan focus lenses, and thus the parallax amount z is derived from the equation described in [Equation 7].

2つのカメラの間の視差量zはレンズを相対的に平行シフトさせたときの像の移動量であるので、ピントの合った状態からの視差量の増大はボケ量と等しい。たとえば、無限遠にピントを合わせた状態では、視差1ピクセルに相当する被写体距離にある被写体は1ピクセルのボケ半径でぼけて撮影されるということになり、視差1ピクセルの距離の被写体にピントを合わせれば無限遠の被写体は1ピクセルのボケ半径でぼけるということになる。合成開口法によるピント合わせをおこなわず、単レンズで撮像面の位置を変化させてピント合わせを行う場合の視差量zの計算は、[数8]に記載の式を用いた方が、特に近距離の視差量zの計算で誤差が少なくなるが、[数7]に記載の式で代用することができる場合もある。   Since the parallax amount z between the two cameras is the amount of image movement when the lens is relatively shifted in parallel, the increase in the parallax amount from the in-focus state is equal to the blur amount. For example, in a state where the focus is set to infinity, a subject at a subject distance corresponding to one pixel of parallax is photographed with a blur radius of one pixel, and a subject at a distance of one pixel of parallax is focused. In total, an object at infinity is blurred with a blur radius of 1 pixel. When calculating the parallax amount z when focusing is performed by changing the position of the imaging surface with a single lens without performing the focusing by the synthetic aperture method, it is particularly closer to use the formula described in [Equation 8]. Although the error is reduced in the calculation of the distance parallax amount z, the equation described in [Expression 7] may be substituted.

任意の距離での視差量zをゼロにするという行為がピント合わせ(フォーカス合わせ)といえる。ピント合わせの行為は通常のレンズでは像面をピント位置に一致させることになる。合成開口法では複数のカメラの画像間の視差量がゼロになるように複数の画像を視差量だけシフトさせてたし合わせるという行為になる。   The act of setting the parallax amount z at an arbitrary distance to zero can be called focusing. The action of focusing is to make the image plane coincide with the focus position in a normal lens. In the synthetic aperture method, a plurality of images are shifted by the amount of parallax so that the amount of parallax between the images of a plurality of cameras becomes zero.

本発明では、光軸の奥行き方向を視差で置き換えているので、ボケを表す関数は、ボケの大きさが視差量に比例する。例えば円形開口では円錐状(コーン状)となる。
<データの取得間隔について>
x、y方向を等間隔に配したカメラから画像を取得する。これは2次元状に等間隔に配置したセンサーによってサンプリングすることにより達成される。一方、視差量zは、2つのカメラ間に生じる視差のピクセルカウント(視差量/ピクセルピッチ(P))がリニア(等間隔)になるように分割して取得する。いいかえれば、視差量zがピクセルピッチの整数倍になるようにフォーカス位置を設定して複数の焦点状態の画像を合成開口法により合成する。これにより、計算誤差を低減することができる。ピクセルピッチは、センサーのピクセルピッチでも良いし、各カメラ(撮像部)から出力される出力画像の画素ピッチでも良い。後者の場合、多画素化処理に本来のセンサーの画素ピッチの整数分の「1」になっている。
In the present invention, since the depth direction of the optical axis is replaced with parallax, in the function representing blur, the magnitude of blur is proportional to the amount of parallax. For example, a circular opening has a conical shape (cone shape).
<About the data acquisition interval>
An image is acquired from a camera in which x and y directions are arranged at equal intervals. This is achieved by sampling with sensors arranged in two dimensions at equal intervals. On the other hand, the parallax amount z is obtained by being divided so that the pixel count (parallax amount / pixel pitch (P)) of parallax generated between the two cameras is linear (equal intervals). In other words, the focus position is set so that the parallax amount z is an integer multiple of the pixel pitch, and images in a plurality of focus states are synthesized by the synthetic aperture method. Thereby, a calculation error can be reduced. The pixel pitch may be a pixel pitch of a sensor or a pixel pitch of an output image output from each camera (imaging unit). In the latter case, it is “1” corresponding to an integer of the pixel pitch of the original sensor in the multi-pixel processing.

<瞳面上の2点間の距離s0について>
ここで、合成開口法によるフォーカス合わせを行う回数、つまりフォーカス方向の分解能を決定する。瞳面上の2点間の距離s0を如何に決定するかを説明する。
<About the distance s0 between two points on the pupil plane>
Here, the number of times of focusing by the synthetic aperture method, that is, the resolution in the focus direction is determined. How to determine the distance s0 between two points on the pupil plane will be described.

フォーカス方向のデータ数(合成開口法により合成するフォーカス画像の枚数)を増やすには、[数7]、[数8]でs0=s maxまたはs0=APとした視差量を計算し、視差量が撮像素子のピクセルピッチの整数倍となる被写体までの距離:Zにおいて得られたフォーカス画像を合成開口法によって合成してゆけばよい。この方法がもっとも多くの異なる被写体距離Zにおいてフォーカス画像を生成する方法である。しかしながら、実用的には数分の1程度に間引きを行っても支障が無いことが分かった。とくに、多眼カメラが等間隔に並んでいる場合(M系列配置を含む。)、視差量zは[数7]でs0=隣接カメラ間の間隔とすることで、合成開口法によるフォーカス合わせの際にサブピクセルの画像の横ずらし(一画素以下のずらし量の横ずらし)をする必要が無くなり、画素ピッチに起因する量子化誤差を発生しないので、画素ピッチに起因するボケの発生を防止することができる。これによりデータ数が間引きされるが、例えばs×t=5×5程度のカメラ数であれば、最大データ数の1/4程度に間引きされるものの、実用上十分であることが分かった。マクロ撮影ではさらにデータ数を半分程度に間引きしてもまったく問題ないことが分かった。   In order to increase the number of data in the focus direction (the number of focus images to be synthesized by the synthetic aperture method), the parallax amount is calculated by using [Equation 7] and [Equation 8] with s0 = smax or s0 = AP. It is only necessary to synthesize a focus image obtained at a distance Z to an object that is an integer multiple of the pixel pitch of the image sensor by a synthetic aperture method. This method is a method of generating a focus image at the most different subject distances Z. However, practically, it has been found that there is no problem even if thinning is performed to about a fraction. In particular, when multi-lens cameras are arranged at equal intervals (including M-sequence arrangement), the parallax amount z is set to [Equation 7] and s0 = interval between adjacent cameras. In this case, it is not necessary to horizontally shift the image of the sub-pixel (a shift amount of one pixel or less), and a quantization error due to the pixel pitch does not occur, thereby preventing blurring due to the pixel pitch. be able to. As a result, the number of data is thinned out. For example, if the number of cameras is about s × t = 5 × 5, the number of data is thinned out to about 1/4 of the maximum number of data, but it has been found that the number is practically sufficient. In macro photography, it was found that there is no problem even if the number of data is reduced to about half.

<単眼レンズにおける視差量について>
単眼レンズで[数8]に記載の式で視差を決め、複数のフォーカスでの画像データを取得する際も任意の瞳上の2点間の距離:s0をAp/4程度にしてデータの間引きを行っても実用上問題ない。
<About the amount of parallax in a monocular lens>
When using a monocular lens to determine the parallax according to the equation described in [Equation 8] and acquiring image data with multiple focus, the distance between two points on any pupil: s0 is set to about Ap / 4, and the data is thinned out. There is no practical problem even if it is performed.

視差量zの値は、距離:Z=無限遠で視差:z=0であるので視差の座標は、図9に示すようにとることが望ましい。x,yは撮像面内の2次元座標、zは視差量である。図9では2次元の方眼状に等間隔に並んだ多眼カメラを想定し、視差量zは[数7]でs0=隣接カメラ間の間隔とした。図9に示す二つの斜めの直線は、図8で説明したs-t面内に5×5の方眼配置で等間隔並んだ内の一列、cam1〜cam5のカメラの中心にあるcam3の上下のcam2,cam4の配置によってx、y面内で発生する視差またはボケの大きさ(3次元ボケカーネルのx、y断面の大きさ)を示している。視差量z=8においてピクセル(P)の±8倍の視差をx又はyに発生することを示している。このように奥行き方向(光軸方向)の分割を視差量zが等間隔になるように分割することで、カメラ配置によるボケカーネル(図10参照)や任意のボケカーネル(図11参照)の大きさの変化が視差量にリニアに変化することになり、3次元ボケカーネルの形状が光軸に沿った視差z軸の位置に依存して変化するというような不都合が無くなる。これにより、シフト・インバリアント、つまり、3次元のコンボリューションで表せるような3次元結像状態のデータを取得できることになる([数17]に記載の式)。   Since the value of the parallax amount z is distance: Z = infinity and parallax: z = 0, it is desirable to take the parallax coordinates as shown in FIG. x and y are two-dimensional coordinates in the imaging surface, and z is a parallax amount. In FIG. 9, a multi-view camera arranged in a two-dimensional grid at equal intervals is assumed, and the parallax amount z is set as [Equation 7], where s0 = interval between adjacent cameras. The two diagonal straight lines shown in FIG. 9 are one row in the st plane described in FIG. 8 arranged at equal intervals in a 5 × 5 grid arrangement, and cam2 above and below cam3 at the center of the cameras cam1 to cam5. The parallax generated in the x, y plane or the size of blur (the size of the x, y cross section of the three-dimensional blur kernel) is shown by the arrangement of cam4. It shows that a parallax of ± 8 times the pixel (P) is generated in x or y when the parallax amount z = 8. In this way, by dividing the depth direction (optical axis direction) so that the parallax amount z is equally spaced, the size of the blur kernel (see FIG. 10) or an arbitrary blur kernel (see FIG. 11) depending on the camera arrangement. The change in the length linearly changes in the amount of parallax, and there is no inconvenience that the shape of the three-dimensional blur kernel changes depending on the position of the parallax z-axis along the optical axis. Thereby, shift invariant, that is, data of a three-dimensional imaging state that can be expressed by a three-dimensional convolution can be acquired (formula described in [Equation 17]).

瞳面(カメラ面)上のs,t方向の任意の2点間の最大距離は、図8に示すように、cam1,cam5の距離になっており、図10、及び図11に示す視差量zは、隣接カメラ間の距離の4倍ある。つまり、3次元結像状態のデータは、s0を隣接カメラ間に設定しているので、最大のデータ数から1/4に間引きされた数になる。この数は、実用上十分なデータ数であるので問題はない。   The maximum distance between any two points in the s and t directions on the pupil plane (camera plane) is the distance of cam1 and cam5 as shown in FIG. 8, and the amount of parallax shown in FIG. 10 and FIG. z is four times the distance between adjacent cameras. That is, since the data in the three-dimensional imaging state has s0 set between adjacent cameras, the number of data is reduced to 1/4 from the maximum number of data. Since this number is sufficient for practical use, there is no problem.

図10は、カメラ配置(カメラ面、s−t面内の瞳中心の配置)により決定する、ボケカーネルの3次元的形状とx,y断面でのボケカーネルの大きさを示している。x,yは撮像面内の2次元座標、zは視差量である。図10では2次元の方眼状に等間隔に並んだ多眼カメラを想定し、視差量zは[数7]でs0=隣接カメラ間の間隔とした。ボケカーネルの大きさは視差量に応じて線形に変化する。同図は、視差z=4(ピクセル)でフォーカスが合っている物体にボケカーネルBcがコンボリューションされている状態を示している。ボケカーネルのx,y断面はx,y面内(撮像面)でボケを表す2次元の分布関数のことで、本発明では視差zの関数でもある。これを例えば[数9]に記載したようにf(x,y,z)と置けば、[数10]に記載のように面積が1で規格化された関数になる。ピント位置でボケないような関数にするには、デルタ関数、つまり大きさゼロで面積1の関数とする。任意のボケカーネルを撮像面(x−y面)の画像にコンボリューションして2次元画像をぼかすことができる。   FIG. 10 shows the three-dimensional shape of the blur kernel and the size of the blur kernel in the x and y cross sections, which are determined by the camera layout (camera plane, pupil center layout in the s-t plane). x and y are two-dimensional coordinates in the imaging surface, and z is a parallax amount. In FIG. 10, a multi-lens camera arranged in a two-dimensional grid at equal intervals is assumed, and the parallax amount z is [Equation 7] and s0 = interval between adjacent cameras. The size of the blur kernel changes linearly according to the amount of parallax. This figure shows a state in which the blur kernel Bc is convoluted with an object in focus with parallax z = 4 (pixels). The x, y cross section of the blur kernel is a two-dimensional distribution function representing blur in the x, y plane (imaging plane), and is also a function of parallax z in the present invention. If this is set as f (x, y, z) as described in [Equation 9], for example, the function is normalized by 1 as shown in [Equation 10]. To obtain a function that does not blur at the focus position, a delta function, that is, a function of area 1 with a size of zero is used. A two-dimensional image can be blurred by convolving an arbitrary blur kernel with an image on the imaging plane (xy plane).

このように視差zに応じて(多くの場合比例)広がりが変化する分布関数を以下では3次元ボケカーネルのx、y断面または単にボケカーネル、ボケ関数などと呼ぶ。 A distribution function whose spread changes in accordance with the parallax z in this case (proportionally in many cases) is hereinafter referred to as an x, y cross section of a three-dimensional blur kernel or simply a blur kernel, a blur function, or the like.

図11は、任意のボケ量のボケカーネルz=4(ピクセル)でフォーカスが合っている物体にボケカーネルBがコンボリューションされている状態を示す。x,yは撮像面内の2次元座標、zは視差量である。ボケカーネルの半径をゼロにすると全焦点画像が生成される。なお、ボケ生成アルゴリズムの詳しい説明は後述する。   FIG. 11 shows a state in which the blur kernel B is convoluted with an object in focus with an arbitrary blur amount of blur kernel z = 4 (pixels). x and y are two-dimensional coordinates in the imaging surface, and z is a parallax amount. When the radius of the blur kernel is set to zero, an omnifocal image is generated. A detailed description of the blur generation algorithm will be described later.

カメラ面内に2次元の方眼状に等間隔に並んだ多眼カメラを想定し、視差量zは[数7]でs0=隣接カメラ間の間隔とし、隣接カメラ間隔12mm、焦点距離5.34mm、ピクセルピッチP=6μmのときの視差量zと被写体までの距離Zと像面とレンズの距離bを表1に示す。レンズと像面の距離bは、レンズの結像公式1/f=1/Z+1/bにより求めた。このようにカメラが等間隔の場合、隣接カメラ間隔から視差を求め、視差がピクセルの整数倍となるような間隔で画像処理に用いる視差の値を決定すると、合成開口法によるフォーカス合わせの際の画像シフト量がいずれのカメラにおいても、ピクセルピッチの整数倍とすることができ、量子化誤差の発生が防止できる。bはレンズの結像作用による結像位置を示し、レンズから像までの距離である。dbはbの変化量を示す。dbは、厳密には等間隔になっていない。そこで、本発明のボケ処理を単眼カメラの画像に対して行う時も、像空間で光軸方向に等間隔にセンサーを移動させてデータを取得する従来の方法よりも、視差量が等間隔になる被写体距離を[数7]または[数8]の式から求めて撮影することが望ましい。   Assuming multi-lens cameras arranged in a two-dimensional grid at equal intervals in the camera plane, the parallax amount z is [Equation 7], s0 = interval between adjacent cameras, adjacent camera interval 12 mm, focal length 5.34 mm. Table 1 shows the parallax amount z, the distance Z to the subject, and the distance b between the image plane and the lens when the pixel pitch P = 6 μm. The distance b between the lens and the image plane was determined by the lens imaging formula 1 / f = 1 / Z + 1 / b. In this way, when the cameras are equally spaced, the parallax is obtained from the adjacent camera interval, and when the parallax value used for image processing is determined at an interval such that the parallax is an integer multiple of the pixels, In any camera, the image shift amount can be an integral multiple of the pixel pitch, and the occurrence of quantization errors can be prevented. “b” indicates an image forming position by the image forming action of the lens, and is a distance from the lens to the image. db represents the amount of change of b. Strictly speaking, db is not equally spaced. Therefore, when the blur processing of the present invention is performed on an image of a monocular camera, the amount of parallax is evenly spaced compared to the conventional method of acquiring data by moving the sensor at regular intervals in the optical axis direction in the image space. It is desirable to obtain the subject distance from the equation [Equation 7] or [Equation 8].

一方、合成開口によるレンズの結像は、一般に、パンフォーカスレンズを用いた撮影であり、先に述べたように、結像公式と関係なくなる。ピンホールの代わりにレンズを用いると、厳密には像面の位置も被写体の位置に応じて変化する。焦点距離5.34mm、F2.8のカメラのレンズのピントを、被写体までの距離を2m程度に設定してその被写体距離に合焦するように調整し、その状態で無限遠から近距離まであまりMTFの変化は大きくない(10〜20%程度の変化)。この状態をパンフォーカスとみなして問題ない。またMTFの変化は既知であるので、予め撮影距離ごとのMTFのデータをカメラに記憶し、撮影距離ごとにMTFデータからの像ボケを補正することも可能である。   On the other hand, imaging of a lens by a synthetic aperture is generally photography using a pan focus lens, and is irrelevant to an imaging formula as described above. Strictly speaking, when a lens is used instead of a pinhole, the position of the image plane also changes according to the position of the subject. The focal length of the camera lens with a focal length of 5.34 mm and F2.8 is adjusted so that the distance to the subject is about 2 m and focused on the subject distance. The change of is not large (change of about 10 to 20%). There is no problem considering this state as pan focus. Since the change in MTF is known, it is possible to store MTF data for each shooting distance in the camera in advance and correct image blur from the MTF data for each shooting distance.

視差(z)に応じた距離Zでのフォーカス画像を合成開口法によってフォーカスする。例えば[表1]に示す20箇所(視差z=1〜20(ピクセル))での合成開口像を生成する。図9では、視差量zは[数7]でs0=隣接カメラ間の間隔とし、視差z=0〜8ピクセルの9つの視差に相当する被写体距離にフォーカスをあわせた画像を合成開口法によって合成することを表している。ピクセル以下の分解能で視差を分割することはボケ像生成の観点からは意味はない。また、間引きする場合は視差の間隔が等間隔になるように間引くことが重要である。多画素化する場合はそのピクセルピッチを用いる。   The focus image at the distance Z corresponding to the parallax (z) is focused by the synthetic aperture method. For example, synthetic aperture images at 20 locations (parallax z = 1 to 20 (pixels)) shown in [Table 1] are generated. In FIG. 9, the parallax amount z is [Equation 7], s0 = interval between adjacent cameras, and an image in which the subject distance corresponding to nine parallaxes of parallax z = 0 to 8 pixels is focused is synthesized by the synthetic aperture method. Represents what to do. Dividing the parallax with a resolution of less than a pixel is meaningless from the viewpoint of generating a blurred image. Further, when thinning out, it is important to thin out so that the parallax intervals are equal. When the number of pixels is increased, the pixel pitch is used.

合成開口でフォーカスする場合、中央(s−t面の中心)のカメラの画像に対して周囲のカメラの画像を視差量分だけ平行にxy面内でシフトさせる。その量と[表1]の視差の量は一致する。視差がゼロの場合は無限遠であって1ピクセルのときは10.68m前方にフォーカスが合っていることになる。カメラが25個ある場合、25枚の画像を一度取り込めば、任意の視差を[表1]から選んで任意のフォーカス画像が得られる。そのようにして得られた画像を図9に示す複数の縦線は模式的に現している。   When focusing with the synthetic aperture, the image of the surrounding camera is shifted in the xy plane by the amount corresponding to the amount of parallax with respect to the image of the camera at the center (center of the st plane). The amount and the amount of parallax in [Table 1] match. When the parallax is zero, it is at infinity, and when it is 1 pixel, the focus is in front of 10.68 m. When there are 25 cameras, once 25 images are captured, an arbitrary focus image can be obtained by selecting an arbitrary parallax from [Table 1]. A plurality of vertical lines shown in FIG. 9 of the image thus obtained are schematically shown.

図11は、通常レンズの円形瞳によるボケの説明図である。まず、カメラ面内に2次元の方眼状に等間隔に並んだ多眼カメラを想定する。視差量zは[数7]でs0=隣接カメラ間の間隔とした。隣接レンズ間隔12mmで配置された3つのカメラcam2〜cam4によって発生するボケは、例えばz=4(ピクセル)で合成開口によりフォーカスする場合、z=4(ピクセル)で交わる光軸方向の視差量1の増減に対して、それに直交する方向に横ずれ±1ピクセルを発生する二つの直線で表される。これが3つのカメラ配置に起因する視差=ボケ量である。カメラがcam2〜cam4を直径とする円内に無数に分布していると仮定すれば、円形の通常のレンズのボケも同様に扱えることになる。すなわち、z=4(ピクセル)で交わる直線を母線とする円錐(コーン)がレンズ瞳直径24mmのレンズのボケに相当する。カメラ間隔をレンズ瞳半径に置き換えれば円形瞳のレンズのボケを考えることができる。それより大きなレンズ直径のボケ、小さなレンズ直径のボケも同様にピント位置を頂点とするコーンで与えることができる。ボケのブラーカーネルは、このコーンの各視差での直径の円で与えられる。なお、詳しくは後述するように、円形開口内の重みを均一分布、ガウス分布など任意に変更することができる。
<カメラ配置のボケ形状>
図10は、2次元の方眼状に等間隔に並んだ多眼カメラを想定し、視差量zは[数7]でs0=隣接カメラ間の間隔としたときの、カメラの配置によるボケカーネルの形状を表している。図8で表されるような等間隔の5×5の配置の場合の視差に対するボケ形状を表している。フォーカス方向は、視差が等間隔になるようにデータがあればよいので、図の黒丸がぼけ形状、又はボケカーネルを表すことになる。これをxy面内で表すと、図12に示すようになる。M系列では、図13、図14に示すようになる。矢印は、デルタ関数的な重みを表す。焦点位置では矢印の強度は本数倍に大きくなる。これらのボケカーネルを視差方向(方向は物体の奥行き方向のZ(ラージゼット)方向と同じ。)で積分すると図15に示すようになる。
FIG. 11 is an explanatory diagram of the blur due to the circular pupil of the normal lens. First, assume a multi-lens camera arranged in a two-dimensional grid at equal intervals in the camera plane. The parallax amount z is [Equation 7] and s0 = interval between adjacent cameras. The blur generated by the three cameras cam2 to cam4 arranged with the adjacent lens interval of 12 mm is, for example, when the focus is made by the synthetic aperture at z = 4 (pixel), and the parallax amount 1 in the optical axis direction intersecting at z = 4 (pixel) Is represented by two straight lines that generate a lateral shift of ± 1 pixel in a direction perpendicular to the increase / decrease. This is the parallax due to the three camera arrangements = the amount of blur. If it is assumed that the cameras are distributed innumerably in a circle having a diameter of cam2 to cam4, it is possible to handle a circular ordinary lens blur similarly. That is, a cone having a straight line intersecting at z = 4 (pixels) as a generating line corresponds to a blur of a lens having a lens pupil diameter of 24 mm. If the camera interval is replaced with the lens pupil radius, the lens blur of the circular pupil can be considered. Larger lens diameter blur and smaller lens diameter blur can also be given by a cone with the focus position at the apex. The blur blur kernel is given by a circle of diameter at each parallax of this cone. As will be described in detail later, the weight in the circular aperture can be arbitrarily changed, such as a uniform distribution or a Gaussian distribution.
<Bokeh shape of camera placement>
FIG. 10 assumes a multi-lens camera arranged in a two-dimensional grid at equal intervals, and the amount of parallax z is [Expression 7] and s0 = interval between adjacent cameras. Represents the shape. FIG. 9 illustrates a blurred shape with respect to parallax in the case of a 5 × 5 arrangement at equal intervals as illustrated in FIG. 8. Since the focus direction needs only to have data so that the parallax is equally spaced, the black circle in the figure represents a blurred shape or a blur kernel. When this is expressed in the xy plane, it is as shown in FIG. The M series is as shown in FIG. 13 and FIG. Arrows represent delta function weights. At the focal position, the strength of the arrow increases by a factor of several. When these blur kernels are integrated in the parallax direction (the direction is the same as the Z (large jet) direction in the depth direction of the object), the result is as shown in FIG.

図16は、画像の取り込みから処理の流れを示す。合成開口法によりえら得られた複数枚のフォーカス像を任意ボケアルゴリズムに渡す。任意ボケアルゴリズムの中身は、図17に記載されており、複数の画像に対し、視差に比例した半径のボケカーネルをコンボリューションする。これらを加算し、光学系のPSF(カメラ配置のボケ形状)の視差に関する積分。ボケカーネルの視差に関する積分した結果でデコンボリューションを行う。 FIG. 16 shows the flow of processing from image capture. A plurality of focus images obtained by the synthetic aperture method are passed to an arbitrary blur algorithm. The contents of the arbitrary blur algorithm are described in FIG. 17, and a blur kernel having a radius proportional to the parallax is convolved with respect to a plurality of images. These are added together to integrate the parallax of the optical system PSF (camera placement blur shape). Deconvolution is performed based on the result of integrating the parallax of the bokeh kernel.

図17と式の関係を図21に示した。図18と図19は、ピント(視差)を変えて得られる画像を表している。図20、図21は、[数18]に記載の式を導くための説明図である。図20は、[数18]の式のように近似することで計算時間を短縮することが可能であることを説明している。本発明では[数18]の近似式に基づいた説明を「ボケ生成アルゴリズム」と称す。   The relationship between FIG. 17 and the equation is shown in FIG. 18 and 19 show images obtained by changing the focus (parallax). 20 and 21 are explanatory diagrams for deriving the equation described in [Equation 18]. FIG. 20 illustrates that the calculation time can be shortened by approximating the equation [Equation 18]. In the present invention, the description based on the approximate expression of [Equation 18] is referred to as a “blur generation algorithm”.

任意のボケ生成アルゴリズムを構成するボケ処理部36は、図22を示すように、複数の多焦点画像データに対して、所望のピント位置から視差に比例したボケ半径の円形開口、又はガウシアン等の任意のボケカーネルの2次元断面(ボケを表す2次元分布関数)を用いてコンボリューション処理を行う。ここで、ピント位置から視差に比例するとは、例えば所望のピント位置からの視差に比例してボケカーネルの2次元断面の半径を大きくしてコンボリューション処理を行うということである。これは、図11を参照すれば明らかである。   As shown in FIG. 22, the blur processing unit 36 constituting an arbitrary blur generation algorithm, for a plurality of multifocal image data, a circular aperture with a blur radius proportional to the parallax from a desired focus position, or Gaussian or the like Convolution processing is performed using a two-dimensional section (two-dimensional distribution function representing blur) of an arbitrary blur kernel. Here, “proportional to the parallax from the focus position” means, for example, that the convolution process is performed by increasing the radius of the two-dimensional section of the blur kernel in proportion to the parallax from the desired focus position. This is apparent with reference to FIG.

フォーカススタック像算出部37は、ボケ処理部36で処理を行った複数の画像データの強度和画像であるフォーカススタック像を求める。なお、強度平均を求めてもよい。PSFカーネル算出部38は、合成開口の瞳サンプリング点のフォーカススタックに相当するフォーカススタックPSFカーネルを算出する(図12〜図15を参照)。   The focus stack image calculation unit 37 obtains a focus stack image that is an intensity sum image of a plurality of image data processed by the blur processing unit 36. In addition, you may obtain | require an intensity | strength average. The PSF kernel calculation unit 38 calculates a focus stack PSF kernel corresponding to the focus stack of the pupil sampling point of the synthetic aperture (see FIGS. 12 to 15).

瞳サンプリング点は、多眼カメラ10の撮影レンズ23の配置を表す。ここでは、撮影レンズ23の配置は、予め決まっているので、フォーカススタックPSFカーネルを算出する必要はない。フォーカススタックPSFカーネルは、RAM29に予め記憶されており、読み出して用いる。16個の撮影レンズ23の擬似ランダム配置がM系列に従った所定の周期パターンの場合のフォーカススタックPSFカーネルを図15及び図23に示す。   The pupil sampling point represents the arrangement of the photographing lens 23 of the multiview camera 10. Here, since the arrangement of the photographing lens 23 is determined in advance, it is not necessary to calculate the focus stack PSF kernel. The focus stack PSF kernel is stored in advance in the RAM 29 and is read and used. FIGS. 15 and 23 show the focus stack PSF kernel when the pseudo-random arrangement of the 16 photographing lenses 23 is a predetermined periodic pattern according to the M series.

画像先鋭化処理部39は、フォーカススタック像に対して予め決めたカーネルを用いたデコンボリューション処理を行う。予め決めたカーネルを用いたデコンボリューション処理としては、フォーカススタック像算出部37で算出したフォーカススタック像に対して、RAM29から読み出したフォーカススタックPSFカーネルを用いたデコンボリューション処理を行って任意のボケ画像データを生成する。   The image sharpening processing unit 39 performs deconvolution processing using a predetermined kernel on the focus stack image. As a deconvolution process using a predetermined kernel, a deconvolution process using the focus stack PSF kernel read from the RAM 29 is performed on the focus stack image calculated by the focus stack image calculation unit 37 to obtain an arbitrary blurred image. Generate data.

前記フォーカススタックPSFカーネルを用いたデコンボリューション処理は、個眼撮像部の3次元のボケ関数である3次元PSFの個眼撮像部の光軸方向の積分結果を表す、2次元分布関数であるフォーカススタックPSFカーネルと、ボケ処理部36でコンボリューション処理を行う時に用いる任意のボケカーネルのフォーカススタックに相当する、フォーカススタックボケカーネルとの2つのカーネルを用いたデコンボリューション処理となっている。   The deconvolution process using the focus stack PSF kernel is a focus that is a two-dimensional distribution function that represents an integration result in the optical axis direction of the three-dimensional PSF that is a three-dimensional blur function of the single-eye imaging unit. This is a deconvolution process using two kernels: a stack PSF kernel and a focus stack blur kernel corresponding to a focus stack of an arbitrary blur kernel used when the blur processing unit 36 performs the convolution process.

CPU24は、任意のボケ画像データを、I/F30を介して記録部31に記録する。なお、圧縮部を設け、任意のボケ画像データを、例えばJPEG方式等の圧縮形式で記録してもよい。また、各フレームメモリ22から得られる複数の多焦点画像データを記録部31に記憶してもよい。この場合、複数の多焦点画像データをボケ画像データに関連付けして記憶するのが好適である。   The CPU 24 records arbitrary blurred image data in the recording unit 31 via the I / F 30. Note that a compression unit may be provided and arbitrary blurred image data may be recorded in a compression format such as the JPEG method. A plurality of multifocal image data obtained from each frame memory 22 may be stored in the recording unit 31. In this case, it is preferable to store a plurality of multifocal image data in association with the blurred image data.

次に上記構成の作用を、図24を参照しながら簡単に説明する。電源スイッチ14をオンすると、いずれか一つの個眼撮像部40から得られる画像データに基づいてスルー画像を生成してLCD15に表示する。スルー画像を見ながら構図を決めてシャッタボタン13を半押し操作する。この半押し操作に応答してCPU24は、AE・AFを制御する。AE制御は、各個眼撮像部40で同じ露出になるように制御する。AF制御は、ピントずらし制御である。この制御は、CPU24がAF部26を制御して、各撮影レンズ23のピントが全てでずれるよう撮影レンズ23を合焦位置に各々移動させる。   Next, the operation of the above configuration will be briefly described with reference to FIG. When the power switch 14 is turned on, a through image is generated based on the image data obtained from any one single-eye imaging unit 40 and displayed on the LCD 15. The composition is determined while viewing the through image, and the shutter button 13 is pressed halfway. In response to this half-press operation, the CPU 24 controls AE / AF. The AE control is performed so that each single-eye imaging unit 40 has the same exposure. AF control is focus shift control. In this control, the CPU 24 controls the AF unit 26 to move the photographic lens 23 to the in-focus position so that each photographic lens 23 is completely out of focus.

そのままシャッタボタン13の全押し操作がなされると、CPU24は、各個眼撮像部40を制御して、多焦点画像データ群を各フレームメモリ22に取り込み、取り込んだ複数の多焦点画像データを画像処理部25に送る。   If the shutter button 13 is fully pressed as it is, the CPU 24 controls each single-eye imaging unit 40 to capture a multifocal image data group into each frame memory 22 and perform image processing on the captured multiple multifocal image data. Send to part 25.

画像処理部25のボケ処理部36は、複数の多焦点画像データに対して、所望のピント位置から比例したボケ半径の円形開口、又はガウシアン等の任意のボケカーネルを用いてコンボリューション処理を行う。フォーカススタック像算出部37は、ボケ処理部36でボケ処理を行った複数の画像データ毎に画素の強度和画像であるフォーカススタック像を算出する。   The blur processing unit 36 of the image processing unit 25 performs convolution processing on a plurality of multi-focus image data using a circular aperture having a blur radius proportional to a desired focus position or an arbitrary blur kernel such as Gaussian. . The focus stack image calculation unit 37 calculates a focus stack image, which is a pixel intensity sum image, for each of a plurality of image data subjected to the blur processing by the blur processing unit 36.

PSFカーネル算出部38は、RAM29から予め決められているフォーカススタックPSFカーネルを読み出す。画像先鋭化処理部39は、RAM29から読み出したフォーカススタックPSFカーネルに基づき、PSFカーネル算出部38で算出したフォーカススタック像をデコンボリューション処理して任意のボケ画像データを生成する。生成したボケ画像データは、記録部31で記録さえる。   The PSF kernel calculation unit 38 reads a predetermined focus stack PSF kernel from the RAM 29. Based on the focus stack PSF kernel read out from the RAM 29, the image sharpening processing unit 39 performs deconvolution processing on the focus stack image calculated by the PSF kernel calculation unit 38 to generate arbitrary blurred image data. The generated blurred image data is recorded by the recording unit 31.

ここで、本発明の画像処理の特徴を簡単に説明する。まず、複数のフォーカス状態の画像に任意のボケ処理を行ってからこれらの画像の強度和(平均)を求め強度和(平均)像とする。この段階では何のノイズの発生も無い。次に、求めた強度和(平均)像に画像先鋭化処理を行い、任意のボケ画像を生成するが、画像先鋭化は合成開口の瞳サンプリング点のフォーカススタックに相当する、「フォーカススタックPSFカーネル」のデコンボリューションにより行う。このデコンボリューションカーネルには、そのフーリエ変換にゼロ点がないものを用い、復元ノイズが発生することを抑制する。これにより、写真画質の良好なボケ像を形成可能となる。フォーカススタックは、合成開口法、又は撮像素子の光軸方向の移動によりフォーカス状態を変化させながら行ってもよい。
<ボケアルゴリズム>
具体的なボケ生成の方法を多眼カメラによる合成開口法を用いる例で説明する。具体的には、撮影対象物体の3次元の強度分布をIo(X,Y,Z)とする。Z軸を撮影レンズ23の光軸方向、x,y方向を撮像素子20の横、縦方向とする。z軸は視差量(視差=カメラ間隔×焦点距離/Z、Zはレンズ瞳位置から被写体までの距離。)である。センサーの面内方向xyは、前述のように「x=X×f/Z,y=Y×f/Z」の式から分かるように倍率がかかって撮影される。レンズのボケ具合を表す点像強度分布の3次分布がPSFc(x,y,z)で表されるカメラで、ピント位置をカメラの光軸にそった視差zrにピントを合わせて撮影した像Ic(x,y,zr)は[数11]に記載の式に示すIc(x,y,z,zr)のx,y平面への投影で、式としては[数12]に記載の式で示される。[数11]の式にあるPSFc(x,y,z)は、例えば円形開口の場合光軸にそって円錐状の関数で円錐の頂点のピント位置が視差zr相当に来るような関数で表すことができる。ピント位置を撮影対象シーンの奥行き方向で積分した像は[数6]の式で示される。積分範囲(zmin〜zmax)は、物体の存在する領域と概ね一致させる。Io(x,y)は、シーンをボケのない理想ピンホールカメラで像面に投影された絵(全焦点画像)と等価である。
Here, the features of the image processing of the present invention will be briefly described. First, an arbitrary blur process is performed on a plurality of focused images, and then the intensity sum (average) of these images is obtained to obtain an intensity sum (average) image. There is no noise at this stage. Next, an image sharpening process is performed on the obtained intensity sum (average) image to generate an arbitrary blurred image. The image sharpening corresponds to the focus stack of the pupil sampling point of the synthetic aperture. ”Deconvolution. As this deconvolution kernel, a Fourier transform having no zero point is used to suppress the occurrence of restoration noise. This makes it possible to form a blurred image with good photographic quality. The focus stack may be performed while changing the focus state by the synthetic aperture method or the movement of the image sensor in the optical axis direction.
<Bokeh algorithm>
A specific blur generation method will be described using an example of a synthetic aperture method using a multi-lens camera. Specifically, the three-dimensional intensity distribution of the object to be imaged is Io (X, Y, Z). The Z axis is the optical axis direction of the photographing lens 23, and the x and y directions are the horizontal and vertical directions of the image sensor 20. The z-axis is the amount of parallax (parallax = camera interval × focal length / Z, Z is the distance from the lens pupil position to the subject). The in-plane direction xy of the sensor is photographed with a magnification, as can be seen from the equation “x = X × f / Z, y = Y × f / Z” as described above. A camera tertiary distribution of a point image intensity distribution representing the blurriness of the lens is represented by PSFc (x, y, z) , it was taken to focus the parallax z r along the focus position on the optical axis of the camera The image Ic (x, y, z r ) is a projection of Ic (x, y, z, z r ) shown in the equation described in [Equation 11] onto the x, y plane. It is shown by the described formula. PSFc (x, y, z) in the equation of [Equation 11] is represented by a function that has a conical function along the optical axis in the case of a circular aperture, for example, so that the focal position of the apex of the cone is equivalent to the parallax zr. be able to. An image obtained by integrating the focus position in the depth direction of the scene to be photographed is expressed by the equation [Equation 6]. The integration range (zmin to zmax) is approximately matched with the region where the object exists. Io (x, y) is equivalent to a picture (omnifocal image) in which the scene is projected onto the image plane by an ideal pinhole camera without blur.

[数11]に記載の式にあるPSFc(x,y,z)は、例えば円形開口の場合、光軸にそって円錐状の関数で円錐の頂点がピント位置zrに来るような関数で表すことができる。ピント位置を撮影対象シーンの奥行き方向で積分した像は[数13]に記載の式で示される。積分範囲(z min~z max)は物体の存在する領域と概ね一致させる。Io(x,y)はシーンをボケのない理想ピンホールカメラで像面に投影された絵(全焦点画像)と等価である。 For example, in the case of a circular aperture, PSFc (x, y, z) in the equation described in [Equation 11] is represented by a function that has a conical function along the optical axis so that the apex of the cone is at the focus position zr. be able to. An image obtained by integrating the focus position in the depth direction of the scene to be photographed is expressed by the equation described in [Equation 13]. The integration range (z min to z max) is generally matched with the region where the object exists. Io (x, y) is equivalent to a picture (omnifocal image) projected on the image plane by an ideal pinhole camera without blur.

[数13]に記載の式よりIc_pn(x,y)はPSFc_pnとIo(x,y)のコンボリューションであるので、[数15]に記載の式によりIo(x,y)が求まる(Io(x,y)は本発明のボケ生成には使わないが参考のため算出している)。ここでPSFc_pnは、[数14]に記載の式で示され、PSFc(x,y,z)の視差z方向の積分されたものである。これをフォーカススタックカーネルと呼ぶ。なお、添え字cはカメラの状態を示す。pnはパンフォーカスを示す。 Since Ic_pn (x, y) is a convolution of PSFc_pn and Io (x, y) from the equation described in [Equation 13], Io (x, y) is obtained from the equation described in [Equation 15] (Io (x, y) is not used for blur generation according to the present invention but is calculated for reference). Here, PSFc_pn is expressed by the equation described in [Equation 14], and is an integral of PSFc (x, y, z) in the parallax z direction. This is called the focus stack kernel. Note that the subscript c indicates the state of the camera. pn indicates pan focus.

[数14]の式に記載の積分範囲を考える。PSFcは、ピントを結ぶ位置をz軸の原点とする(例えば図25参照)。物体の範囲は、無限遠=zmin〜至近距離=z maxであるので、コンボリューションされたPSFcは、図25に示すPSFc(x,y,z)〜PSFc(x,y,z−z max)の範囲で存在しうる。フォーカススタックの積分範囲は図から無限遠の物体に対し「−z max〜0」、至近距離の物体に対して「0〜z max」となる。これらの積分の結果は、前ピンと後ピンでPSFの形が非対称な場合、例えば図13、及び図14の場合は、これらの平均とすることが望ましく、したがって、一般のPSFに対しても[数14]の式に記載の積分範囲としておけば十分であることが実写映像によって確認された。この積分範囲は、至近距離と無限遠の中間の部分に関しては「−z max/2〜+z max/2程度が最適となるので、被写体までの距離に応じて積分範囲を可変としてもよい。また前述のように近距離撮影ではz max は被写体のうちリフォーカスの可能性のある範囲内でカメラからもっとも遠い位置としても差し支えない。   Consider the integration range described in the equation [14]. In PSFc, the position where the focus is connected is the origin of the z axis (see, for example, FIG. 25). Since the range of the object is infinity = zmin to close distance = z max, the convolved PSFc is PSFc (x, y, z) to PSFc (x, y, z−z max) shown in FIG. Can exist in the range of The integration range of the focus stack is “−z max˜0” for an object at infinity from the figure, and “0−z max” for an object at a close distance. The result of these integrations is preferably the average of PSF shapes when the front and rear pins are asymmetric, for example in the case of FIG. 13 and FIG. It was confirmed by a live-action video that the integration range described in the formula [14] is sufficient. This integration range is optimally about “−z max / 2 to + z max / 2” for the intermediate portion between the close distance and infinity, so the integration range may be variable according to the distance to the subject. As described above, in short-distance shooting, z max may be the farthest position from the camera within the range where refocusing is possible in the subject.

[数11]に記載の式と同様にボケ関数PSFc(x,y,z)をPSFa(x,y,z)に変更して任意のフォーカス位置に相当する視差z1にピントを合わせて撮影した像は、[数16]に記載の式で示される。[数17]に記載の式は、PSFを3次元にコンボリューションして得られる3次元の像であり、PSFcの光学条件でピント位置をシフトしながら取得できる輝度分布を示す。これは3次元のデータとなる。 In the same way as the equation described in [Equation 11], the blur function PSFc (x, y, z) is changed to PSFa (x, y, z) and the parallax z1 corresponding to an arbitrary focus position is focused and photographed. The image is shown by the equation described in [Equation 16]. The equation described in [Equation 17] is a three-dimensional image obtained by convolving PSF three-dimensionally, and indicates a luminance distribution that can be acquired while shifting the focus position under the optical condition of PSFc. This is three-dimensional data.

[数17]の式から[数18]の式を得る。[数18]の式のうちPSFc_pn(x,y)によりデコンボリューションされる部分、つまり[数19]の式の「A」は、視差zrにピントを合わせて得られた画像にPSFa(x,y,z-zr)をコンボリューションし、さらに視差zに関して積分することを示している。これは、前述した実施例のボケ処理部36、フォーカススタック像算出部37の処理に相当する。 The equation of [Equation 18] is obtained from the equation of [Equation 17]. The part deconvoluted by PSFc_pn (x, y) in the equation [18], that is, “A” in the equation [19] is obtained by applying PSFa (x, It shows that y, zz r ) is convolved and further integrated with respect to the parallax z. This corresponds to the processing of the blur processing unit 36 and the focus stack image calculation unit 37 of the above-described embodiment.

なお、[数18]に記載の式から[数20]に記載の式を得ることができる。このため、複数のフォーカス位置の画像Ic_p(x,y,z)を合成開口法などで撮像し、これをPSFc(x,y,z)により3次元デコンボリューションを行うことでIo(x,y,z)物体の強度分布を求め、これに任意のピント位置に相当する視差zrに設定したPSFa(x,y,z-zr)(任意のボケカーネル)を2次元コンボリューションし、その結果を視差zで積分し、x,y平面に投影することで任意のボケ像、及び任意のフォーカス位置にリフォーカスされた像を得てもよい。 It should be noted that the equation described in [Equation 20] can be obtained from the equation described in [Equation 18]. For this reason, images Ic_p (x, y, z) at a plurality of focus positions are picked up by a synthetic aperture method or the like, and this is subjected to three-dimensional deconvolution by PSFc (x, y, z) to obtain Io (x, y , z) Obtain the intensity distribution of the object, and perform two-dimensional convolution of PSFa (x, y, z-zr) (arbitrary blur kernel) set to the parallax zr corresponding to the arbitrary focus position. An arbitrary blurred image and an image refocused at an arbitrary focus position may be obtained by integrating with the parallax z and projecting on the x, y plane.

この場合、ボケ画像生成手段としては、図76に示すように、3次元デコンボリューション処理部45、2次元コンボリューション処理部46、及び画像生成部47とで構成すればよい。3次元デコンボリューション処理部45は、画像取得部48から取得した、視差が等間隔になっている複数の多焦点画像(焦点を複数の位置に合わせて撮影した画像)を3次元データとみなし、3次元デコンボリューション処理を行って物体の強度分布を求める。2次元コンボリューション処理部46は、3次元デコンボリューション処理済みの画像に対して任意のボケカーネルによる2次元コンボリューション処理を行う。画像生成部47は、2次元コンボリューション処理済みの画像に対して平面に投影して任意のボケ画像を生成する。   In this case, the blurred image generation unit may be configured by a three-dimensional deconvolution processing unit 45, a two-dimensional convolution processing unit 46, and an image generation unit 47 as shown in FIG. The three-dimensional deconvolution processing unit 45 regards a plurality of multifocal images (images obtained by focusing at a plurality of positions) acquired from the image acquisition unit 48 and having parallaxes at equal intervals as three-dimensional data, A three-dimensional deconvolution process is performed to determine the intensity distribution of the object. The two-dimensional convolution processing unit 46 performs two-dimensional convolution processing using an arbitrary blur kernel on the image that has been subjected to three-dimensional deconvolution processing. The image generation unit 47 projects an image that has been subjected to the two-dimensional convolution process onto a plane to generate an arbitrary blurred image.

なお、[数18]に記載の式の右辺は、計測値Ic_p(x,y,z)と装置固有のフォーカス設定値に相当する視差zrにピントが合ったときの所望のボケカーネル:PSFa(x,y,z-zr)、フォーカススタックPSFのボケカーネル:PSFc_pn(x,y)となる。添え字のaは、カメラの状態を示す。また以下では、定数は省略している。   Note that the right side of the equation described in [Equation 18] indicates the desired blur kernel when the measured value Ic_p (x, y, z) and the parallax zr corresponding to the device-specific focus setting value are in focus: PSFa ( x, y, z-zr), the blur kernel of the focus stack PSF: PSFc_pn (x, y). The subscript a indicates the state of the camera. In the following, constants are omitted.

[数18]の式のPSFa_stk(x,y)は、[数21]の式で示される(図25参照)。[数21]記載の式の積分範囲もPSFcと同様に、図26に示す関係となり、フォーカススタックの積分範囲は、同図から「−z max〜z max」とする。これも至近距離と無限遠の中間的な距離の物体にフォーカスをあわせる際に「−z max/2〜z max/2」など、最適な範囲に変更させても良いが、一般的には「−zmax〜zmax」で問題ない。   PSFa_stk (x, y) in the equation [Equation 18] is expressed by the equation [Equation 21] (see FIG. 25). Similarly to PSFc, the integration range of the equation described in [Equation 21] has the relationship shown in FIG. 26, and the integration range of the focus stack is “−z max to z max” from FIG. This may also be changed to an optimum range such as “−z max / 2 to z max / 2” when focusing on an object at an intermediate distance between the close distance and infinity. There is no problem with “−zmax to zmax”.

[数18]の式は、実験的には以下のように確かめられる。PSFをガウス分布で表す場合、カメラのPSFc(x,y,z)に対して新たにボケを生成するためのPSFa(x,y,z-zr)は、それぞれ[数22][数23]の式で示される。C1(z),c2(z)は、ガウス分布の標準偏差で、[数24][数25]の式で示される。ガウス分布のボケカーネルの半径は、標準偏差に比例する。zrは任意のボケ像を生成する際の設定フォーカス位置を示し、任意のボケカーネルの光のコーンが収束する場所を示す。つまり、ボケカーネルは、図27に示すように、ピントを合わせたい距離zrで光のコーン(円錐ボケ形状又はぼけカーネル)が最も絞られた(収束した)点になる。 The equation of [Equation 18] can be confirmed experimentally as follows. When PSF is expressed by a Gaussian distribution, PSFa (x, y, zz r ) for newly generating a blur with respect to PSFc (x, y, z) of the camera is represented by [Equation 22] and [Equation 23], respectively. It is shown by the formula. C 1 (z) and c 2 (z) are standard deviations of the Gaussian distribution and are expressed by the equations [Equation 24] and [Equation 25]. The radius of a Gaussian blur kernel is proportional to the standard deviation. z r indicates a set focus position when an arbitrary blurred image is generated, and indicates a position where a light cone of an arbitrary blurred kernel converges. That is, as shown in FIG. 27, the blur kernel is a point where the cone of light (conical blur shape or blur kernel) is most narrowed (converged) at a distance z r to be focused.

図28に示すトレース2がPSFc(x,y,z)の標準偏差c1(z)、トレース3がPSFa(x,y,z-zr)の標準偏差c2(z-zr)を示している。ここではデフォーカスに相当する視差は5ピクセルとする(例えばzr=5(ピクセル)とする)。図28に示す横軸は、光軸の方向にとった視差量zを示す。縦軸は標準偏差を示す。トレース1は、[数26]の式にあるPSFca(x,y,z,zr)の標準偏差cca(z,zr)を示す。標準偏差cca(z,zr)は、[数27]の式で与えられる。この場合、物体はz=0にある。物体は凹凸に応じてzの任意の値をとるが、[数17]の式のコンボリューションの結果として観察されるIc_p(x,y,z)では、PSFc(x,y,z)の光のコーンの中心は常に物体表面に位置することになる(図27参照)。つまり、物体表面に作用するボケ分布は、[数19]の式のコンボリューションにより、PSFca(x,y,z,zr)となる。 The trace 2 shown in FIG. 28 shows the standard deviation c 1 (z) of PSFc (x, y, z), and the trace 3 shows the standard deviation c 2 (zz r ) of PSFa (x, y, zz r ). Here, the parallax corresponding to the defocus is 5 pixels (for example, z r = 5 (pixels)). The horizontal axis shown in FIG. 28 indicates the parallax amount z taken in the direction of the optical axis. The vertical axis shows the standard deviation. Trace 1 shows the standard deviation c ca (z, z r ) of PSFca (x, y, z, z r ) in the equation [Equation 26]. The standard deviation c ca (z, z r ) is given by the equation [Equation 27]. In this case, the object is at z = 0. Although the object takes an arbitrary value of z according to the unevenness, the light of PSFc (x, y, z) is observed in Ic_p (x, y, z) observed as a result of the convolution of the equation [17] The center of the cone is always located on the object surface (see FIG. 27). That is, the blur distribution acting on the object surface is PSFca (x, y, z, z r ) by the convolution of the equation [Equation 19].

一方、所望のデフォーカス位置でのボケ半径を[数29]の式のボケ関数PSF3(x,y,z)とし、c3(z)=k3=一定とすると、合成ボケ半径PSFca3(x,y,z)の標準偏差は、図29のトレース4で示される。同図にPSFc(x,y,z)の標準偏差c1(z)、PSFa(x,y,z)の標準偏差c2(z)を記載した。合成ボケ半径PSFca3(x,y,z)は、[数28]に記載の式で示され、標準偏差は、[数30]に示す式となる。また、ボケ半径c3(z)=k3をトレース6として示した。 On the other hand, assuming that the blur radius at the desired defocus position is the blur function PSF 3 (x, y, z) in the formula [29] and c 3 (z) = k 3 = constant, the synthesized blur radius PSFca3 ( The standard deviation of x, y, z) is shown by trace 4 in FIG. The same figure shows the standard deviation c 1 (z) of PSFc (x, y, z) and the standard deviation c 2 (z) of PSFa (x, y, z). The synthetic blur radius PSFca3 (x, y, z) is expressed by the equation described in [Equation 28], and the standard deviation is expressed by the equation shown in [Equation 30]. Further, the blur radius c 3 (z) = k 3 is shown as a trace 6.

例えば、係数k1=2,k2=1,k3=5とする。図29に示すように、z=0でトレース1の値は5となる。図28のトレース3はk2=1でフォーカス5としたので、z=0での標準偏差は5である。この条件でのトレース1の最小値は約4.5で、5に対して約10%小さくなっているが、トレース1はトレース2のz方向の平行移動とみなせる。[数19]の式のz方向の積分を行った後はz方向の情報はなくなるので、トレース1とトレース2のz方向の積分結果は同じものとみなせる。これが、[数18]の式の近似を意味するものである。 For example, the coefficients k1 = 2, k2 = 1, and k3 = 5. As shown in FIG. 29, the value of trace 1 is 5 when z = 0. Trace 3 in FIG. 28 has k2 = 1 and focus 5, so the standard deviation is 5 at z = 0. Under this condition, the minimum value of the trace 1 is about 4.5, which is about 10% smaller than 5, but the trace 1 can be regarded as a translation of the trace 2 in the z direction. Since the information in the z direction is lost after the integration in the z direction of the formula [19] is performed, the integration results in the z direction of the trace 1 and the trace 2 can be regarded as the same. This means an approximation of the equation of [Equation 18].

以上は、PSFを表す関数をガウス関数としたが、これを、円形開口を表す関数、合成開口法の瞳サンプリングポイントを表す関数としてシミュレーションした結果、ほぼ同等の効果が得られることが分かった。つまり、本手法はさまざまなボケ関数を持つハードウェアに対して、さまざまなボケの形状の像を与えることが可能である。   As described above, the function representing the PSF is a Gaussian function. As a result of simulating the function representing the circular aperture and the function representing the pupil sampling point of the synthetic aperture method, it was found that substantially the same effect can be obtained. In other words, this method can give images of various blur shapes to hardware with various blur functions.

このように本発明では、所望の画像を取得画像から直接得ることができる。本発明では、[数17]に記載の式で示されるように、物体の3次元輝度分布と3次元ボケ関数に基づく3次元コンボリューションモデルで3次元結像状態を表している。そのため、結局[数18]の式の2次元画像のデコンボリューション計算で所望の2次元画像を求めることができる。   Thus, in the present invention, a desired image can be obtained directly from an acquired image. In the present invention, the three-dimensional imaging state is represented by a three-dimensional convolution model based on the three-dimensional luminance distribution of the object and the three-dimensional blur function, as shown by the equation described in [Equation 17]. Therefore, a desired two-dimensional image can be obtained by deconvolution calculation of the two-dimensional image of the formula [18].

多眼カメラ10は、6点法等でカメラキャリブレーションを行う。そして、レンズ中心の結像面内での位置(s,t)、及び各撮影レンズ23の焦点距離等の定数は、計測値を用いる。なお、カメラの光軸の倒れ等の誤差量は、カメラキャリブレーションにより除去する。光軸の倒れはディストーション成分として補正される。   The multi-lens camera 10 performs camera calibration by a six-point method or the like. Measurement values are used for constants such as the position (s, t) of the lens center in the imaging plane and the focal length of each photographing lens 23. Note that an error amount such as a tilt of the optical axis of the camera is removed by camera calibration. The tilt of the optical axis is corrected as a distortion component.

図8において、撮影レンズの中心は結像面(s,t)に位置しており、25個(5行×5列)の個眼撮像部をD(s,t)で示す。物体面と結像面は平行で、合成開口法により結像面から任意の視差zに相当する距離Zにある、物体面に合焦させる。   In FIG. 8, the center of the photographic lens is located on the image plane (s, t), and 25 (5 rows × 5 columns) single-eye imaging units are denoted by D (s, t). The object plane and the imaging plane are parallel, and the object plane is focused at a distance Z corresponding to an arbitrary parallax z from the imaging plane by the synthetic aperture method.

本実施例の多眼カメラ10の撮影レンズ23の焦点深度は、深く、撮影レンズ23は、近距離から無限遠までパンフォーカスと考えてよい。撮影レンズ23が明るく焦点深度が浅く、撮影レンズ23毎のAF(通常のレンズの前後によるピント合わせ)が必要な場合は、予めピントを合わせたい被写体に撮影レンズ23毎にAFをかけてもよい。その場合にリフォーカスする際は既知のMTF、PSFデータから、MTFの劣化を補うことが望ましい。   The depth of focus of the photographing lens 23 of the multi-lens camera 10 of the present embodiment is deep, and the photographing lens 23 may be considered as pan focus from a short distance to infinity. When the photographing lens 23 is bright and the focal depth is shallow, and AF for each photographing lens 23 (ordinary focusing before and after a normal lens) is required, AF may be applied to the subject to be focused in advance for each photographing lens 23. . In this case, when refocusing, it is desirable to compensate for the degradation of MTF from known MTF and PSF data.

合成開口法によらず、通常の単眼の撮影レンズ23のフォーカス調整(像空間で空間像と撮像素子20の光軸方向の相対位置を変換させる等での調整)で複数のピント位置の画像を得る場合、多眼カメラの場合に視差量を求める際に用いるレンズ間隔の代わりに瞳半径から、[数7]または[数8]に記載の式からから視差量を求め、視差量が等間隔となるようにフォーカス距離を決める。例えば35mmフルサイズカメラの場合、f=50mmでは例えばFナンバーを2として、瞳半径は、50/(2)=25mmであるが、先に述べたように、この値「25」の1/4程度とすればよい。各フォーカス位置での画像を取得し、視差量が等間隔の画像群を得れば、そのあとのボケアルゴリズムの処理は多眼カメラの合成開口法を用いた場合と同様である。(フォーカス調整は、フォーカスごとにレンズを繰り出す以外に、センサーの光軸方向での位置を変える、レンズの収差を換えて像面を変化させて各フォーカス位置での画像を取得する等の方法がある。)
<任意ボケ生成>
合成開口法のフォーカシングにより、複数のピント位置に合わせた多焦点画像群を用いて処理を行う点について以下に説明する。
Regardless of the synthetic aperture method, the image of a plurality of focus positions can be obtained by adjusting the focus of the normal monocular photographing lens 23 (adjustment by converting the aerial image and the relative position of the image sensor 20 in the optical axis direction in the image space). In the case of obtaining the parallax amount, the parallax amount is obtained from the equation described in [Equation 7] or [Equation 8] from the pupil radius instead of the lens interval used when obtaining the parallax amount in the case of a multi-lens camera. Determine the focus distance so that For example, in the case of a 35 mm full-size camera, when f = 50 mm, for example, the F number is 2, and the pupil radius is 50 / (2) = 25 mm, but as described above, this value “25” is ¼. It should be about. If an image at each focus position is acquired and an image group with an equal interval of parallax is obtained, the subsequent blur algorithm processing is the same as when the multi-eye camera synthetic aperture method is used. (Focus adjustment includes methods such as changing the position of the sensor in the optical axis direction, changing the aberration of the lens, and changing the image plane to acquire an image at each focus position. is there.)
<Arbitrary blur generation>
The point that processing is performed using a multifocal image group adjusted to a plurality of focus positions by the focusing of the synthetic aperture method will be described below.

[ボケ生成カーネル:円形開口]
ボケ生成カーネルとして円形開口のデフォーカスボケを生じさせる場合、ボケカーネルPSFa(x,y,z)は、[数31]に記載の式で示される。任意に設定されるボケカーネルの半径ra(z)は、[数32]に記載の式で与えられる。定数Apaを任意に設定することで所望のボケの大きさが得られる。また、z方向にオフセット、例えばzrを与える(「z」を「z-zr」に置き換える)ことにより、任意のピント位置zrにピントを合わせることができる。
[Bokeh generation kernel: circular aperture]
When defocus blur of a circular aperture is generated as the blur generation kernel, the blur kernel PSFa (x, y, z) is expressed by the equation described in [Equation 31]. The radius r a (z) of the blur kernel that is arbitrarily set is given by the equation described in [Equation 32]. A desired blur size can be obtained by arbitrarily setting the constant Apa. Further, by giving an offset, for example, zr in the z direction (replace “z” with “z-zr”), it is possible to focus on an arbitrary focus position zr.

[ボケ生成カーネル:ガウス開口]
ガウスボケの場合は、[数33]に記載の式のボケカーネルPSFgss(x,y,z)を用いる。Cは定数。ガウスボケの大きさは、[数34]に記載の式によりσaを任意に設定することにより調整することができる。
[Bokeh generation kernel: Gaussian aperture]
In the case of Gaussian blur, the blur kernel PSFgss (x, y, z) represented by [Expression 33] is used. C is a constant. The magnitude of the Gaussian blur can be adjusted by arbitrarily setting σ a according to the equation described in [Equation 34].

[任意視点]
任意視点のボケカーネルPSFshift(x,y,z)を用いれば、図28に示すように、任意視点のオールフォーカス像が得られる。ここで、定数axs,aysを任意に設定して視点を任意に設定する。
[Arbitrary viewpoint]
If an arbitrary viewpoint blur kernel PSFshift (x, y, z) is used, an all-focus image at an arbitrary viewpoint can be obtained as shown in FIG. Here, the viewpoints are arbitrarily set by arbitrarily setting the constants a xs and a ys .

また、フォーカススキャンして計測される像Ic_shift_p(x,y,z)は、[数17]の式に代わって[数34]に記載の式で示される。 Further, an image Ic_shift_p (x, y, z) measured by focus scanning is expressed by an equation described in [Equation 34] instead of the equation [Equation 17].

任意のボケを示すPSF、PSFa(x,y,z)のぼかしを含めた[数35]の式の視点の視差z1にリフォーカスさせた像は、[数37]に記載の式で示される。視点をずらしたPSFのフォーカススタックは、[数38]に記載の式で示される。 An image refocused to the parallax z1 of the viewpoint of the formula [Expression 35] including the blur of PSF and PSFa (x, y, z) indicating an arbitrary blur is expressed by the expression described in [Expression 37]. . The focus stack of the PSF with the viewpoint shifted is expressed by the equation described in [Equation 38].

多眼カメラ10のレンズ配置は、瞳サンプリング点を表す。瞳サンプリング点は、フォーカススタックした際に、フォーカススタックボケカーネルとして作用する。フォーカススタックボケカーネルは、[数14]に記載の式のPSFc_pn(x,y)で表される。フォーカススタック前の瞳サンプリング点は、PSFc(x,y,z)である。所望の像を[数18]に記載の式で得るので、フォーカススタックカーネルPSFc_pn(x.y)のデコンボリューションを正確に行うため、PSFc_pn(x,y)のフーリエ変換の振幅にゼロ点が無いことが望ましい。これはPSFc_pn(x,y)のフーリエ変換の逆数をかけてから逆フーリエ変換することでデコンボリューションを行えるようにするためである。[数18]に記載の式のデコンボリューションは、[数39]に記載の式で示される。 The lens arrangement of the multi-eye camera 10 represents a pupil sampling point. The pupil sampling point acts as a focus stack blur kernel when focus stacking is performed. The focus stack blur kernel is represented by PSFc_pn (x, y) in the equation described in [Equation 14]. The pupil sampling point before the focus stack is PSFc (x, y, z). Since the desired image is obtained by the equation described in [Equation 18], there is no zero point in the amplitude of the Fourier transform of PSFc_pn (x, y) in order to accurately perform the deconvolution of the focus stack kernel PSFc_pn (xy). desirable. This is because deconvolution can be performed by applying the inverse of the Fourier transform of PSFc_pn (x, y) and then performing the inverse Fourier transform. The deconvolution of the equation described in [Equation 18] is represented by the equation described in [Equation 39].

ところで、PSFa_stk(x,y),PSFc_pn(x,y)のフーリエ変換の振幅にゼロ点が無いことが望ましい。PSFa(x,y)は、円形開口やガウス関数が望ましい。PSFa(x,y)に円形開口を用いた場合、PSFa_stk(x,y)は[数41]、そのフーリエ変換は[数42]で示される。そして、u,vは、[数43][数44]で示される。 By the way, it is desirable that the amplitude of the Fourier transform of PSFa_stk (x, y) and PSFc_pn (x, y) has no zero point. PSFa (x, y) is preferably a circular aperture or a Gaussian function. When a circular aperture is used for PSFa (x, y), PSFa_stk (x, y) is expressed by [Equation 41] and its Fourier transform is expressed by [Equation 42]. U and v are expressed by [Equation 43] and [Equation 44].

PSFc_pn(x,y)のフーリエ変換の振幅にゼロ点が無いことが必要で、撮影レンズ23の配置は、縦横M系列擬似ランダム数列を用いた所定パターンを含む多くの配置がある円周配置、矩形配置、方眼配置もこの条件を満たす。M系列ランダム配置のフォーカススタックカーネルは、前述したように例えば図23に示したものとなる。このカーネルのフーリエ変換の振幅にゼロ点は無く、[数39]の式でゼロ割による発散などの不都合は生じない。また振幅の変化も20倍程度なので特定の周波数のノイズを拾うことも無い。   The amplitude of the Fourier transform of PSFc_pn (x, y) needs to have no zero point, and the arrangement of the taking lens 23 is a circumferential arrangement with many arrangements including a predetermined pattern using vertical and horizontal M-sequence pseudo-random number sequences, The rectangular layout and grid layout also satisfy this condition. The focus stack kernel of M-sequence random arrangement is, for example, as shown in FIG. There is no zero point in the amplitude of the Fourier transform of this kernel, and there is no inconvenience such as divergence due to zero division in the equation [39]. Also, since the change in amplitude is about 20 times, noise of a specific frequency is not picked up.

[数19]に示す式の計算は、実際にはフーリエ変換を用いて[数40]に記載の式を用いる。ガウス関数のフーリエ変換は、ガウス関数、円形開口のフーリエ変換は、ベッセル関数で表せられる。   For the calculation of the equation shown in [Equation 19], the equation shown in [Equation 40] is actually used using Fourier transform. The Fourier transform of a Gaussian function is represented by a Gaussian function, and the Fourier transform of a circular aperture is represented by a Bessel function.

<ボケ処理を施した画像の評価>
図30は、一般的なカメラで撮影した画像を示す。図31は、図30の画像と同じ構図で、従来の素の合成開口法を用いて得たボケ画像を示す(フォーカス位置1.34m、(背景ボケ:隣接カメラ間視差8ピクセル相当:25眼)。
<Evaluation of blurred image>
FIG. 30 shows an image taken with a general camera. FIG. 31 shows a blurred image obtained by using the conventional raw synthetic aperture method with the same composition as the image in FIG. 30 (focus position 1.34 m, (background blur: equivalent to 8 pixels between adjacent cameras: 25 eyes). ).

これに対し、本実施形態のM系列16眼の多眼カメラ10(背景ボケ:隣接カメラ間視差8ピクセル相当)では、焦点位置50mm、絞りF1に相当するボケの大きさを指定することで、図32に示すようなボケ画像が得られる。また、焦点位置50mm、絞りF1.4に相当するボケの大きさを指定した時に得られるボケ画像を図33に示す。さらに、焦点位置50mm、絞りF2に相当するボケの大きさを指定した時に得られるボケ画像を図34に示す。なお、本実施形態のボケ処理ではボケカーネルに均一重みの円形開口を用いた。   On the other hand, in the M-series 16-eye multi-lens camera 10 of this embodiment (background blur: equivalent to 8 pixels of parallax between adjacent cameras), by specifying the size of the blur corresponding to the focal position 50 mm and the aperture F1, A blurred image as shown in FIG. 32 is obtained. Further, FIG. 33 shows a blurred image obtained when a blur position corresponding to a focal position of 50 mm and a diaphragm F1.4 is designated. Further, FIG. 34 shows a blurred image obtained when the blur position corresponding to the focal position 50 mm and the stop F2 is designated. In the blur process of the present embodiment, a circular opening having a uniform weight is used for the blur kernel.

同様に、ボケカーネルに均一重みの円形開口を用い、焦点位置50mm、絞りF4に相当するボケの大きさを指定した時に得られるボケ画像を図35に示す。そして、焦点位置50mm、絞りF42に相当するボケの大きさを指定した時に得られるボケ画像を図36に示す。このように、ボケ処理部36にボケの半径を指定してボケ量を調整することで、背景ボケを変えた従来技術で説明したボケよりも美しいボケ画像を生成することができる。さらに、パラメータを調整することで、例えば背景を意図的に円形開口やガウシアン等でボケさせることができる。   Similarly, FIG. 35 shows a blurred image obtained when a circular aperture having a uniform weight is used for the blur kernel and the focal position is 50 mm and the blur size corresponding to the stop F4 is designated. FIG. 36 shows a blurred image obtained when the blur position corresponding to the focal position 50 mm and the aperture F42 is designated. In this way, by specifying the blur radius to the blur processing unit 36 and adjusting the blur amount, it is possible to generate a blur image that is more beautiful than the blur described in the related art in which the background blur is changed. Furthermore, by adjusting the parameters, for example, the background can be intentionally blurred by a circular opening or Gaussian.

<M系列25眼で絞り値を変化させてボケ処理を施した画像の評価>
[数3]で説明したカメラの配置を採用した場合、フォーカス位置1.34m(背景ボケ:隣接カメラ間視差8ピクセル相当)のM系列25眼では、焦点位置50mm、絞りF1に相当するボケの大きさを指定することで、図37に示すようなボケ画像が得られる。また、焦点位置50mm、絞りF1.4に相当するボケの大きさを指定した時に得られるボケ画像を図38に示す。さらに、焦点位置50mm、絞りF2に相当するボケの大きさを指定した時に得られるボケ画像を図39に示す。焦点位置50mm、絞りF4に相当するボケの大きさを指定した時に得られるボケ画像を図40に示す。そして、焦点位置50mm、絞りF42に相当するボケの大きさを指定した時に得られるボケ画像を図41に示す。これによれば、図32〜図36の画像に比べて、ボケが素直になっていることが分かる。なお、これらのボケ処理でもボケカーネルに均一重みの円形開口を用いた。
<Evaluation of image subjected to blurring process by changing aperture value with 25 eyes in M series>
When the camera arrangement described in [Equation 3] is adopted, the blur position corresponding to the focal position of 50 mm and the aperture stop F1 is obtained in the M series 25 eyes with the focus position of 1.34 m (background blur: equivalent to 8 pixels between adjacent cameras). By specifying the size, a blurred image as shown in FIG. 37 is obtained. In addition, FIG. 38 shows a blurred image obtained when the blur position corresponding to the focal position 50 mm and the stop F1.4 is designated. Further, FIG. 39 shows a blurred image obtained when the blur position corresponding to the focal position 50 mm and the stop F2 is designated. FIG. 40 shows a blurred image obtained when the blur position corresponding to the focal position 50 mm and the stop F4 is designated. FIG. 41 shows a blurred image obtained when the blur position corresponding to the focal position 50 mm and the stop F42 is designated. According to this, it can be seen that the blur is more straightforward than the images of FIGS. In these blur processes, a circular aperture with uniform weight is used for the blur kernel.

[[数18]式の近似以前の3次元でコンボリューションを行う場合について]
本発明の等間隔の視差に基づいて構造化した画像データを用いる、別の応用例としては、[数18]に記載の式の3次元デコンボリューションを行い、物体の輝度分布(I0(x,y,z))を求め、これに任意の2次元ブラーカーネルを2次元でコンボリューションし、この結果得られた3次元強度分布をx,y面に投影(視差zに関して積分)する画像生成方法である。3次元のデコンボリューションには3次元のフーリエ変換が必要で、計算時間が長くなるため、将来的には有望である。
[When convolution is performed in three dimensions before approximation of [Formula 18]]
As another application example using the image data structured based on the equidistant parallax of the present invention, the three-dimensional deconvolution of the equation described in [Equation 18] is performed, and the luminance distribution of the object (I0 (x, y, z)), an arbitrary two-dimensional blur kernel is convoluted in two dimensions, and the resulting three-dimensional intensity distribution is projected onto the x, y plane (integrated with respect to parallax z) It is. Three-dimensional deconvolution requires a three-dimensional Fourier transform and requires a long calculation time, which is promising in the future.

なお、特許第4437228号公報に記載の発明(従来発明)は、画像をフーリエ変換して得られるフーリエ変換画像から任意の視点、絞り、焦点合わせに対応する3次元以上のボケフィルタを用いてフィルタ処理をおこない、これを逆フーリエ変換し、切り出し処理をしている。このため3次元以上のフィルタリング処理が必要となり、フィルタリング処理に光軸方向の周波数特性がからみ、複雑で直感的に分かりにくいものになっている。一方、本発明では2次元のブラーカーネルによるボケ生成をおこなうのでそのような不都合は生じない。   Note that the invention described in Japanese Patent No. 4437228 (conventional invention) uses a Fourier transform image obtained by Fourier transforming an image using a three-dimensional or more blur filter corresponding to an arbitrary viewpoint, aperture, and focusing. Processing is performed, this is subjected to inverse Fourier transform, and clipping processing is performed. For this reason, a three-dimensional or higher filtering process is required, and the frequency characteristic in the optical axis direction is involved in the filtering process, which is complicated and difficult to understand intuitively. On the other hand, in the present invention, such a problem does not occur because blur generation is performed by a two-dimensional blur kernel.

また、上記の従来発明でも撮像空間を表す直交座標系において、光軸方向に等間隔の焦点合わせの異なる複数の画像を用いていたが、光軸方向を物体までの距離Zに対し、像空間での光軸方向の座標zをz=1-f/Zと変換していたため、シフト・インバリアントな関係は構築できたものの、奥行き方向の尺度に「視差」を用いるという発想が無かったために、ボケ量と光軸方向の関係を考慮することができず、効率のよい処理が行えなかった。これに対し、本発明では物体の奥行き方向をx、y方向と同様に長さの単位を持つ、「視差」で表して撮影データを取得しているので、たとえば、画素ピッチ(出力画素ピッチまたはセンサーの画素ピッチ)に比例した視差量で、効率よく、最小限の画像枚数をもって奥行き方向(光軸方向)をサンプリングすることができる。また、対物レンズのピント調整をおこなって、複数のフォーカス状態の画像を取得する際も、視差を[数8]の式に基づいて計算するため、シフト・インバリアントな3次元結像状態が得られ、計算誤差が発生せず、任意ボケ生成画像に変換ノイズが発生しない。   Further, in the above-described conventional invention, in the orthogonal coordinate system representing the imaging space, a plurality of images having different focal points at equal intervals in the optical axis direction are used. Because the z coordinate in the optical axis direction in z was converted to z = 1-f / Z, the shift invariant relationship was established, but there was no idea of using "parallax" as the scale in the depth direction. The relationship between the amount of blur and the direction of the optical axis could not be considered, and efficient processing could not be performed. On the other hand, in the present invention, since the shooting data is obtained by representing the depth direction of the object as “parallax” having the unit of length as in the x and y directions, for example, the pixel pitch (output pixel pitch or The depth direction (optical axis direction) can be sampled efficiently and with the minimum number of images with a parallax amount proportional to the pixel pitch of the sensor. In addition, when the focus adjustment of the objective lens is performed and images in a plurality of focus states are acquired, the parallax is calculated based on the equation [8], so that a shift / invariant three-dimensional imaging state is obtained. Therefore, no calculation error occurs, and no conversion noise occurs in the arbitrarily blurred image.

<任意ボケ像生成の画像評価>
M系列25眼のカメラ配置で、フォーカス位置を20箇所、ボケカーネルには円形開口を使用して、指定した距離をボカしたボケ画像を生成した(図41〜48参照)。この場合、焦点距離は50mm、絞りはF1相当になっており、屋内で撮影している。
図42はリフォーカス距離を0.71m、
図43はリフォーカス距離を0.82m、
図44はリフォーカス距離を0.97m、
図45はリフォーカス距離を1.20m、
図46はリフォーカス距離を1.50m、
図47はリフォーカス距離を2.10m、
図46はリフォーカス距離を3.60m、
図49はリフォーカス距離を10.7mに、それぞれ指定して生成している。
<Image evaluation of arbitrary blur image generation>
Using an M-sequence 25-eye camera arrangement, 20 focus positions and a circular aperture for the blur kernel were used to generate a blur image with a specified distance blurred (see FIGS. 41 to 48). In this case, the focal length is 50 mm, the aperture is equivalent to F1, and the image is taken indoors.
FIG. 42 shows a refocus distance of 0.71 m.
FIG. 43 shows a refocus distance of 0.82 m.
FIG. 44 shows a refocus distance of 0.97 m.
FIG. 45 shows a refocus distance of 1.20 m.
FIG. 46 shows a refocus distance of 1.50 m.
FIG. 47 shows a refocus distance of 2.10 m.
FIG. 46 shows a refocus distance of 3.60 m.
In FIG. 49, the refocus distance is set to 10.7 m and generated.

また、同じ撮影条件で屋外で撮影した画像を図50〜図55に示す。
図50はリフォーカス距離を0.97m、
図51はリフォーカス距離を1.20m、
図52はリフォーカス距離を1.50m、
図53はリフォーカス距離を2.10m、
図54はリフォーカス距離を3.60m、
図55はリフォーカス距離を10.7mに、それぞれ指定して生成している。
Moreover, the image image | photographed outdoors on the same imaging conditions is shown in FIGS.
FIG. 50 shows a refocus distance of 0.97 m.
FIG. 51 shows a refocus distance of 1.20 m.
FIG. 52 shows a refocus distance of 1.50 m.
FIG. 53 shows a refocus distance of 2.10 m.
54 shows a refocus distance of 3.60 m.
In FIG. 55, the refocus distance is set to 10.7 m and generated.

[任意ボケ像生成の拡張機能]
本実施形態を用いれば、任意のボケ像を生成できるので、既存の複数種類の撮影レンズのPSFの複数のフォーカス位置のデータを、予めカメラに記憶させておけば、レンズを交換しなくても、所望のレンズを用いたと同じ結果の画像を得ることができる(レンズエミュレーション機能を有する)カメラを実現することができる。また、絞りに関係なくボケ量を撮影後、撮影中に変更できる。カメラからパラメータを入力することで、既存のフォーカスターゲット、撮影倍率、トリミングの任意変更に加えて、さらにボケ量、視点、撮影後フォーカスターゲット変更、及びリフォーカスを任意に変更することができる。
[Extended function for arbitrary blur image generation]
If this embodiment is used, an arbitrary blurred image can be generated. Therefore, if data of a plurality of focus positions of PSFs of a plurality of types of existing photographing lenses is stored in the camera in advance, the lens need not be replaced. Thus, it is possible to realize a camera (having a lens emulation function) that can obtain an image having the same result as that obtained by using a desired lens. In addition, the amount of blur can be changed during shooting after shooting regardless of the aperture. By inputting parameters from the camera, it is possible to arbitrarily change the blur amount, viewpoint, post-shooting focus target change, and refocus in addition to the existing change of the focus target, shooting magnification, and trimming.

[M系列瞳サンプリングによる任意視点画像生成]
任意視点画像生成は、公知であるが瞳サンプリングをM系列配置とすることでデコンボリューションがFFT計算により高速に行える。任意視点の画像、又は任意視点のステレオ画像を生成することができる内視鏡、実態顕微鏡、顕微鏡等では、採用し易くなる。その場合、プレノオプティックスタイプ(多眼、複数対物レンズタイプ)よりも、ライトフィールドタイプ(単一対物レンズ+マイクロフィールドレンズアレイによる瞳分割)の方が適している。瞳25分割(使用はM系列16眼)でVGA画素数を達成するためには総画素数768万画素で十分実現可能である。
[Arbitrary viewpoint image generation by M-sequence pupil sampling]
Arbitrary viewpoint image generation is well-known, but deconvolution can be performed at high speed by FFT calculation by arranging pupil sampling in an M-sequence arrangement. An endoscope, an actual microscope, a microscope, and the like that can generate an arbitrary viewpoint image or an arbitrary viewpoint stereo image are easily adopted. In that case, the light field type (single objective lens + microfield lens array pupil division) is more suitable than the plenoptic type (multi-lens, multiple objective lens type). In order to achieve the number of VGA pixels with 25 pupil divisions (use of 16 eyes in the M series), a total number of pixels of 768,000 is sufficient.

[オールフォーカス(多画素化)画像生成]
本実施形態を用いてオールフォーカス画像を生成することができる。この場合には、撮影レンズの2次元配列がM系列擬似ランダム系列である所定のパターンに設定された多眼カメラを用いて撮影をする合成開口撮影法により、複数の多焦点画像群を取得し、強度平均を算出して、図56に示すような強度平均像(フォーカススタック)画像を得る。なお、図56に示すフォーカススタック画像は、センター視点となっている。そして、図56に示すフォーカススタック画像を、所定のフォーカススタックPSFカーネルでデコンボリューションする処理を施すことで、図57に示すように、オールフォーカス画像を生成することができる。
[All-focus (multi-pixel) image generation]
An all-focus image can be generated using this embodiment. In this case, a plurality of multifocal image groups are acquired by a synthetic aperture photographing method in which photographing is performed using a multi-eye camera in which a two-dimensional array of photographing lenses is set to a predetermined pattern which is an M-sequence pseudo-random sequence. Then, the intensity average is calculated to obtain an intensity average image (focus stack) image as shown in FIG. Note that the focus stack image shown in FIG. 56 is the center viewpoint. Then, an all-focus image can be generated as shown in FIG. 57 by performing a process of deconvolving the focus stack image shown in FIG. 56 with a predetermined focus stack PSF kernel.

[ボケ生成+任意視点画像生成]
任意視点画像生成処理とボケ生成処理とを組み合わせれば、例えばステレオ画像のピント位置以外の像を故意にぼかすことができる。そうすればピント位置意外の大きな視差の像を見たときに発生する、目の焦点位置(ディスプレイ位置)と視差量があっていないことに起因する不快感を低減することができる。
[Bokeh generation + Arbitrary viewpoint image generation]
By combining arbitrary viewpoint image generation processing and blur generation processing, for example, an image other than the focus position of a stereo image can be intentionally blurred. In this way, it is possible to reduce discomfort caused by the absence of the focal position (display position) of the eye and the amount of parallax, which occurs when a large parallax image other than the focus position is viewed.

例えば、前記合成開口撮影法により複数の多焦点画像群を取得し、任意の視点の視差を加えて強度平均を算出し、算出した強度平均像に対して任意の視点の視差を加えたフォーカススタックPSFカーネル(視差付きフォーカススタックPSFカーネル)でデコンボリューションを施す。図58及び図59に示す画像は、多焦点画像群に対して任意視点の視差を加えたフォーカススタックPSFカーネル(同図に示す視点付きフォーカススタックカーネル)でデコンボリューションする処理を施した画像である。   For example, a focus stack obtained by acquiring a plurality of multifocal image groups by the synthetic aperture photographing method, calculating an average intensity by adding parallax of an arbitrary viewpoint, and adding an arbitrary viewpoint of parallax to the calculated intensity average image Deconvolution is performed using a PSF kernel (focus stack PSF kernel with parallax). The images shown in FIGS. 58 and 59 are images that have been subjected to deconvolution processing using a focus stack PSF kernel (focus stack kernel with viewpoint shown in the figure) obtained by adding a parallax of an arbitrary viewpoint to a multifocal image group. .

ここで、M系列25眼のカメラ配置、カメラ間隔が12mmピッチの撮像装置を使用して屋内で掛け時計を撮像して視差付きの任意視点のボケ画像を生成し、掛け時計のボケ味に着目し、どのくらいの視差まで許容することができるかを評価してみた。
図60は、撮影距離=5.3m、掛け時計位置での隣接変カメラ間視差0ピクセル相当の画像。
図61は、撮影距離=3.6m、掛け時計位置での隣接変カメラ間視差2ピクセル相当の画像。
図62は、撮影距離=2.1m、掛け時計位置での隣接変カメラ間視差3ピクセル相当の画像。
図63は、撮影距離=1.5m、掛け時計位置での隣接変カメラ間視差5ピクセル相当の画像。
図64は、撮影距離=1.2m、掛け時計位置での隣接変カメラ間視差7ピクセル相当の画像。
図65は、撮影距離=0.97m、掛け時計位置での隣接変カメラ間視差9ピクセル相当の画像。
図66は、撮影距離=0.89m、掛け時計位置での隣接変カメラ間視差10ピクセル相当の画像。
図67は、撮影距離=0.82m、掛け時計位置での隣接変カメラ間視差11ピクセル相当の画像。
図68は、撮影距離=0.71m、掛け時計位置での隣接変カメラ間視差13ピクセル相当の画像。
図69は、撮影距離=0.63m、掛け時計位置での隣接変カメラ間視差15ピクセル相当の画像。
Here, using an imaging device with an M-series 25-eye camera arrangement and a camera interval of 12 mm pitch, a wall clock is imaged indoors to generate a blurred image of an arbitrary viewpoint with parallax, and attention is paid to the bokeh of the wall clock. I tried to evaluate how much parallax can be tolerated.
FIG. 60 shows an image corresponding to 0 pixels of parallax between adjacent variable cameras at the shooting distance = 5.3 m and the wall clock position.
FIG. 61 is an image corresponding to 2 pixels of parallax between adjacent variable cameras at a shooting distance = 3.6 m and a wall clock position.
FIG. 62 is an image corresponding to 3 pixels of parallax between adjacent variable cameras at the shooting distance = 2.1 m and the wall clock position.
FIG. 63 is an image corresponding to 5 pixels of parallax between adjacent variable cameras at the shooting distance = 1.5 m and the wall clock position.
FIG. 64 is an image corresponding to 7 pixels of parallax between adjacent variable cameras at the shooting distance = 1.2 m and the wall clock position.
FIG. 65 is an image corresponding to a parallax of 9 pixels between adjacent variable cameras at the shooting distance = 0.97 m and the wall clock position.
FIG. 66 shows an image corresponding to 10 pixels of parallax between adjacent variable cameras at the shooting distance = 0.89 m and the wall clock position.
FIG. 67 is an image corresponding to 11 pixels of parallax between adjacent variable cameras at the shooting distance = 0.82 m and the wall clock position.
FIG. 68 shows an image corresponding to a parallax of 13 pixels between adjacent variable cameras at the shooting distance = 0.71 m and the wall clock position.
FIG. 69 shows an image corresponding to a parallax of 15 pixels between adjacent variable cameras at the shooting distance = 0.63 m and the wall clock position.

図60〜図69を参照すると、視差10ピクセルまでは、掛け時計のボケに大きな破綻が見られないことが分かった。これから、12mmピッチのカメラ配置の場合、視差が11ピクセル以上では掛け時計のボケが離散的に見えるので避けた方が無難である。したがって、あまりぼかすと汚いため、ボケの視差が最大10ピクセル(VGAの場合)程度がよい。これは、VGA(640×480ドット)の場合、横方向の640×10=17%程度である。これにより最短撮影距離は1m程度になる。   Referring to FIG. 60 to FIG. 69, it was found that there was no major failure in the blur of the wall clock up to 10 pixels of parallax. From this, in the case of a 12 mm pitch camera arrangement, it is safer to avoid the blur of the wall clock when the parallax is 11 pixels or more, because it appears discretely. Therefore, since it is too blurry and dirty, the parallax of blur is preferably about 10 pixels at maximum (in the case of VGA). This is about 640 × 10 = 17% in the horizontal direction in the case of VGA (640 × 480 dots). As a result, the shortest shooting distance is about 1 m.

この評価が許容される視差量としては、カメラ配置に依存する。そこで、例えば、5×5配列の配列として、9眼を90度ずつ回転させて4パターンで計算し([数45]に記載の式)、これらの強度平均像をとると、ボケがいっそう素直になることが分かった。これは重み付けが中高で、ガウス分布になっているためと考える。この場合の多画素化は、9眼で1回行い、その後、多画素化された4組の画像からさらに2回目の多画素化を行い、最終的に強度平均を求めることが望ましい。   The amount of parallax allowed for this evaluation depends on the camera arrangement. Therefore, for example, as an array of 5 × 5 arrays, nine eyes are rotated 90 degrees at a time and calculated in four patterns (formula described in [Equation 45]), and these intensity average images are taken, the blur is more straightforward. I found out that This is thought to be because the weighting is medium-high and has a Gaussian distribution. In this case, it is desirable to increase the number of pixels once with nine eyes, and then further increase the number of pixels for the second time from the four sets of multi-pixel images, and finally obtain the average intensity.

[カメラごとにフォーカス設定距離を変えておく法]
合成開口のカメラとしては、16眼以上のカメラを用いる。また、カメラを低背高にするには、撮像素子の予備寸法を小さくする必要がある。このため、画素が小さくなり、場合によっては画素数が不足する。例えばVGAの1/6インチカメラ(有効対角3.5mm)を16個使って400万画素の出力を得ようとする場合、レンズの解像力は各々400万画素の解像度(対角約3000画素)が必要となるので、約1〜2μmの解像度が必要となる。このときFナンバー2より明るいレンズが求められる。常に最高の解像度が必要な場合、フォーカス調整機構が必要となる。一般にはボイスコイルモータや静電容量式のMEMS(Micro Electro Mechanical Systems)が用いられる。フォーカスの計測は多眼カメラの視差を用いる。しかし、撮影後に任意の場所にピントを合わせる、いわゆるリフォーカスができなくなる。
[How to change the focus setting distance for each camera]
A camera with 16 or more eyes is used as the synthetic aperture camera. Further, in order to make the camera low in height, it is necessary to reduce the preliminary size of the image sensor. For this reason, a pixel becomes small and the number of pixels is insufficient in some cases. For example, when trying to obtain 4 million pixel output using 16 VGA 1/6 inch cameras (effective diagonal 3.5 mm), the resolution of each lens is 4 million pixel resolution (diagonal approximately 3000 pixels). Therefore, a resolution of about 1 to 2 μm is required. At this time, a lens brighter than F number 2 is required. If the highest resolution is always required, a focus adjustment mechanism is required. In general, a voice coil motor or a capacitance type micro electro mechanical system (MEMS) is used. Focus measurement uses the parallax of a multi-lens camera. However, so-called refocusing that focuses on an arbitrary place after shooting cannot be performed.

そこで、本実施例では、前述したように、被写体の最短撮影距離から、無限遠までを個眼撮像部40の数で分割して、各々異なる領域にフォーカスさせた状態に設定する。そして、合成開口でのフォーカシングをおこなった後、視差のない部分では複数(例えば16個)のピント状態の個眼撮像部40の画像が有効になるので、これらの強度和をフォーカススタックとみなし、16個の撮影レンズの合成PSF(多焦点画像群を合成したもの)を表すIPSF(インテグラルPSF)でデコンボリューションしてやることで、常に、最短撮影距離(実質50mm内外)から無限遠(実質8000mm内外)までを合成開口によるリフォーカスの可能な範囲とすることに成功した。複数(N台)カメラのフォーカスオフセット量(1〜N)は各々のカメラの受け持ち範囲でのボケ量が均一になるようにフォーカスオフセット量(n)は、視差が等間隔になるように設定する。   Therefore, in the present embodiment, as described above, the range from the shortest shooting distance of the subject to infinity is divided by the number of the single-eye imaging units 40 and each is set in a state of being focused. Then, after performing the focusing at the synthetic aperture, a plurality of (for example, 16) focused images of the single-eye imaging unit 40 are effective in a portion without parallax. By deconvolution with an IPSF (Integral PSF) that represents a composite PSF of 16 shooting lenses (integrated PSF), it is always infinity (substantially 8000 mm inside and outside) from the shortest shooting distance (substantially inside and outside 50 mm). ) Was successfully made the refocusable range by the synthetic aperture. The focus offset amounts (n) of the multiple (N) cameras are set so that the parallax is equally spaced so that the amount of blur in each camera's coverage is uniform. .

上記実施形態では、多眼カメラ10を用いて複数の多焦点画像を同時に取得しているが、一般的な一眼のカメラを用いて、ピントをずらしながら時系列的に複数回の撮影を行って複数の多焦点画像を取得してもよい。   In the above-described embodiment, a plurality of multi-focus images are simultaneously acquired using the multi-lens camera 10, but a general single-lens camera is used to perform a plurality of shootings in time series while shifting the focus. A plurality of multifocal images may be acquired.

また、上記各実施形態では、電子カメラとして説明しているが、本発明ではこれに限らず、撮影レンズ23、撮像素子20、AFE21、及びフレームメモリ22等を省略し、画像処理部を備えた画像処理装置又はその方法としてもよい。この場合には、予め撮像済みの複数の多焦点画像データを取り込むための記憶部を設ければよい。   In each of the above embodiments, the electronic camera is described. However, the present invention is not limited to this, and the imaging lens 23, the imaging device 20, the AFE 21, the frame memory 22, and the like are omitted, and an image processing unit is provided. An image processing apparatus or a method thereof may be used. In this case, a storage unit may be provided for capturing a plurality of multifocal image data that has been captured in advance.

画像処理部が実行するためのプログラムは、本発明によるプログラムを構成する。このプログラムを記録する記録媒体としては、半導体記憶部や光学的、磁気的な記憶部等を用いることができる。このようなプログラム及び記録媒体を、前述した各実施形態とは異なる構成のシステム等で用い、そこのCPUで上記プログラムを実行させることにより、本発明と実質的に同じ効果を得ることができる。そこで、本発明としては、コンピュータを、前述した画像処理装置として機能させるためのプログラムとしてもよい。また、そのプログラムを記録した記録媒体としてもよい。   The program to be executed by the image processing unit constitutes a program according to the present invention. As a recording medium for recording the program, a semiconductor storage unit, an optical or magnetic storage unit, or the like can be used. By using such a program and a recording medium in a system having a configuration different from that of each of the above-described embodiments and causing the CPU to execute the program, substantially the same effect as the present invention can be obtained. Therefore, the present invention may be a program for causing a computer to function as the above-described image processing apparatus. Moreover, it is good also as a recording medium which recorded the program.

[デプスマップによる方法]
衆知のステレオカメラを用いるステレオマッチングなどの手法によって、物体までの距離を求め、デプスマップを取得する方法が知られている。本発明では図70に示されるように合成開口法のリフォーカスの各フォーカス位置での画素の一致度を公知の分散や、max-minの値などの評価量から求め、画素ごとの距離データを取得する。これは2次元データなので一般にデプスマップと呼ばれる。デプスマップは視差(距離)に応じて例えば図71〜図73に示すように分解される。
[Depth map method]
There is known a method of obtaining a depth map by obtaining a distance to an object by a method such as stereo matching using a publicly known stereo camera. In the present invention, as shown in FIG. 70, the degree of coincidence of pixels at each focus position of the refocusing of the synthetic aperture method is obtained from an evaluation amount such as a known variance or a value of max-min, and distance data for each pixel is obtained. get. Since this is two-dimensional data, it is generally called a depth map. The depth map is decomposed according to the parallax (distance), for example, as shown in FIGS.

本発明において新たに見出された知見によれば、デプスマップと合成開口法を用いた画像から従来よりも優れたボケ像を生成可能であることが判明した。   According to the knowledge newly found in the present invention, it has been found that it is possible to generate a blurred image superior to the conventional one from an image using a depth map and a synthetic aperture method.

図77に示すように、視差又はピント位置をずらした複数の画像を取得する画像取得部49、デプスマップ情報取得・変換部50、領域分割部51、コンボリューション部52、及びボケ画像生成部53で構成されており、これらはバス54により接続され、CPU55により統括的に制御される。なお、取得した複数の画像は、メモリ56に格納される。   As shown in FIG. 77, an image acquisition unit 49, a depth map information acquisition / conversion unit 50, a region division unit 51, a convolution unit 52, and a blurred image generation unit 53 that acquire a plurality of images with shifted parallax or focus positions. These are connected by a bus 54 and are controlled centrally by a CPU 55. The acquired plurality of images are stored in the memory 56.

上記構成の作用を、図78を参照しながら簡単に説明する。画像取得部49は、視差又はピント位置をずらした複数の画像を取得する。CPU55は、画像取得部49から取得した複数の画像をメモリ56に格納する。CPU55は、デプスマップ情報取得・変換部50を制御し、デプスマップ情報取得・変換部50は、ステレオマッチング手法によりデプスマップ情報を取得する。このとき、デプスマップ情報の光軸方向の尺度を視差に置き換える。デプスマップ情報は、等間隔の視差となるようにデータ化しておく。   The operation of the above configuration will be briefly described with reference to FIG. The image acquisition unit 49 acquires a plurality of images in which the parallax or the focus position is shifted. The CPU 55 stores a plurality of images acquired from the image acquisition unit 49 in the memory 56. The CPU 55 controls the depth map information acquisition / conversion unit 50, and the depth map information acquisition / conversion unit 50 acquires depth map information by a stereo matching method. At this time, the scale in the optical axis direction of the depth map information is replaced with parallax. The depth map information is converted into data so as to be equidistant parallax.

CPU55は、領域分割部51を制御し、領域分割部51は、合成開口法により任意のピントに合わせた画像を一枚生成し、前記デプスマップ情報に応じて画像をピントが合っている領域毎に分割する。   The CPU 55 controls the area dividing unit 51, and the area dividing unit 51 generates one piece of an image focused on an arbitrary focus by the synthetic aperture method, and for each area in which the image is in focus according to the depth map information. Divide into

CPU55は、コンボリューション部52を制御し、コンボリューション部52は、分割した領域ごとに異なるブラーカーネル(ボケ関数)をコンボリューションし、各領域の画像をぼかす。ボケ関数の大きさは、ベストフォーカス点からの視差量に比例させる。   The CPU 55 controls the convolution unit 52. The convolution unit 52 convolves a different blur kernel (blur function) for each divided region, and blurs the image of each region. The magnitude of the blur function is proportional to the amount of parallax from the best focus point.

CPU55は、ボケ画像生成部53を制御し、ボケ画像生成部53は、コンボリューション後の領域の画像を統合する。   The CPU 55 controls the blurred image generation unit 53, and the blurred image generation unit 53 integrates the images of the regions after the convolution.

この様な構成をよれば、多眼カメラの合成開口リフォーカス後の多画素化された画像を用いてデプスごとに分割、ボケ処理を行うので、多画素化が容易に行えるという特徴がある。従来はデプスマップを用いていたが、一眼のカメラ出力に対してボケ処理を行っていたので多画素化ができていなかった。また本発明では視差が画素ピッチの整数倍になるごとにデプスマップをつくるので効率よく自然に見えるボケ処理が行える。また、このような処理により、合成開口法によるカメラ配置に起因するボケの癖を完全に除去可能で、より顕著なボケを作ることができる。   According to such a configuration, since the multi-pixel image after the synthetic aperture refocusing of the multi-lens camera is divided and blurred for each depth, the multi-pixel can be easily formed. Conventionally, a depth map has been used, but since a blur process is performed on the output of a single-lens camera, the number of pixels cannot be increased. In the present invention, a depth map is created every time the parallax is an integral multiple of the pixel pitch, so that blur processing that looks natural efficiently can be performed. In addition, with such a process, blurring caused by camera placement by the synthetic aperture method can be completely removed, and a more prominent blur can be created.

10 多眼カメラ
11 撮影開口
20 撮像素子
23 撮影レンズ
25 画像処理部
36 ボケ処置部
37 フォーカススタック像算出部
39 画像鮮鋭化処理部
40 個眼撮像部
DESCRIPTION OF SYMBOLS 10 Multi-lens camera 11 Imaging aperture 20 Imaging element 23 Shooting lens 25 Image processing part 36 Blur treatment part 37 Focus stack image calculation part 39 Image sharpening process part 40 Single eye imaging part

Claims (37)

複数の合焦状態の画像に対して、予め任意のピント位置に設定したボケ処理をそれぞれ行い、これらボケ処理を行った複数の画像の強度和画像であるフォーカススタック像を算出し、前記フォーカススタック像を画像先鋭化処理して任意のボケ画像を生成することを特徴とする画像生成方法。   A plurality of in-focus images are subjected to blur processing set in advance at an arbitrary focus position, a focus stack image that is an intensity sum image of the plurality of images subjected to the blur processing is calculated, and the focus stack An image generation method, wherein an image is sharpened to generate an arbitrary blurred image. 請求項1に記載の画像生成方法において、
前記ボケ処理は、任意のボケカーネルを用いたコンボリューションをする処理を含むことを特徴とする画像生成方法。
The image generation method according to claim 1,
The blur generation process includes a process of convolution using an arbitrary blur kernel.
請求項1又は2に記載の画像生成方法において、
前記画像先鋭化処理は、前記フォーカススタック像に対して予め決めたカーネルを用いたデコンボリューション処理を含むことを特徴とする画像生成方法。
The image generation method according to claim 1 or 2,
The image sharpening process includes a deconvolution process using a predetermined kernel for the focus stack image.
請求項2に記載の画像生成方法において、
前記任意のボケカーネルは、所望のピント位置から比例したボケ半径の円形開口、又はガウシアンを表す関数となっていることを特徴とする画像生成方法。
The image generation method according to claim 2,
The arbitrary blur kernel is a circular aperture having a blur radius proportional to a desired focus position, or a function representing a Gaussian.
請求項3に記載の画像生成方法において、
前記カーネルを用いたデコンボリューション処理は、撮影カメラの3次元のボケ関数である3次元PSFの前記撮影カメラの光軸方向の積分結果を表す、2次元分布関数であるフォーカススタックPSF(point spread function)カーネルと、前記ボケ処理部でコンボリューション処理を行う時に用いる前記任意のボケカーネルのフォーカススタックに相当する、フォーカススタックボケカーネルとの2つのカーネルを用いたデコンボリューション処理を含むことを特徴とする画像生成方法。
The image generation method according to claim 3.
The deconvolution processing using the kernel is a focus stack PSF (point spread function) that is a two-dimensional distribution function that represents an integration result of the three-dimensional PSF that is a three-dimensional blur function of the photographing camera in the optical axis direction of the photographing camera. ) Including deconvolution processing using two kernels, a kernel and a focus stack blur kernel corresponding to the focus stack of the arbitrary blur kernel used when the blur processing unit performs the convolution processing. Image generation method.
請求項1に記載の画像生成方法であって、
前記複数の合焦状態の画像は、複数のカメラ(撮像素子を有する複数の撮像部)から構成される多眼カメラで生成される画像であり、合成開口法によるピント合わせによってピント合わせが行われた結果得られる複数の合焦状態の画像であることを特徴とする画像生成方法。
The image generation method according to claim 1,
The plurality of in-focus images are images generated by a multi-lens camera composed of a plurality of cameras (a plurality of imaging units having an image sensor), and are focused by focusing using a synthetic aperture method. An image generation method characterized by being a plurality of in-focus images obtained as a result.
請求項5に記載の画像生成方法であって、
前記撮影カメラの3次元のボケ関数である3次元PSFは多眼カメラのカメラ配置を表すことを特徴とする画像生成方法。
The image generation method according to claim 5,
An image generation method, wherein a three-dimensional PSF that is a three-dimensional blur function of the photographing camera represents a camera arrangement of a multi-view camera.
請求項1に記載の画像生成方法において、
前記複数の合焦状態の画像は、複数のカメラ(撮像素子を有する複数の撮像部)から構成される多眼カメラで生成される画像であり、視差(視差=瞳面上の2点間(または複数カメラの光軸間)の距離×結像倍率)が等間隔となる被写体までの距離において得られた画像を用いることを特徴とする画像生成方法。
The image generation method according to claim 1,
The plurality of in-focus images are images generated by a multi-lens camera including a plurality of cameras (a plurality of imaging units having an image sensor), and parallax (parallax = between two points on the pupil plane ( Alternatively, an image generation method using an image obtained at a distance to a subject having a uniform distance (distance between optical axes of a plurality of cameras) × image forming magnification).
請求項1に記載の画像生成方法において、
前記複数の合焦状態の画像は、複数のカメラ(撮像素子を有する複数の撮像部)から構成される多眼カメラで生成される画像であり、視差(視差=瞳面上の2点間(または複数カメラの光軸間)の距離×結像倍率)が前記撮像素子の画素ピッチの整数倍となる被写体までの距離において得られた画像を用いることを特徴とする画像生成方法。
The image generation method according to claim 1,
The plurality of in-focus images are images generated by a multi-lens camera including a plurality of cameras (a plurality of imaging units having an image sensor), and parallax (parallax = between two points on the pupil plane ( Alternatively, an image generation method using an image obtained at a distance to a subject whose distance between the optical axes of a plurality of cameras) × image formation magnification) is an integral multiple of the pixel pitch of the image sensor.
請求項1に記載の画像生成方法において、
前記複数の合焦状態の画像は、複数のカメラ(撮像素子を有する複数の撮像部)から構成される多眼カメラで生成される画像であり、視差(視差=瞳面上の2点間(または複数カメラの光軸間)の距離×結像倍率)が、前記カメラ(撮像素子)から出力される出力画像の画素ピッチの整数倍となる被写体までの距離において得られた画像を用いることを特徴とする画像生成方法。
The image generation method according to claim 1,
The plurality of in-focus images are images generated by a multi-lens camera including a plurality of cameras (a plurality of imaging units having an image sensor), and parallax (parallax = between two points on the pupil plane ( Alternatively, an image obtained at a distance to a subject in which the distance between the optical axes of a plurality of cameras) × image forming magnification) is an integral multiple of the pixel pitch of the output image output from the camera (imaging device) is used. A featured image generation method.
請求項2に記載の画像生成方法において、
前記任意のボケカーネルは、ピントを合わせたい被写体までの距離で瞳形状が最も絞られた点になっていることを特徴とする画像生成方法。
The image generation method according to claim 2,
The arbitrary blur kernel is an image generation method characterized in that a pupil shape is the most narrowed at a distance to a subject to be focused.
入力される複数の合焦状態の画像に対して、予め任意のピント位置に設定したボケ処理を行うボケ処理部と、
前記ボケ処理部でボケ処理を行った複数の画像の強度和画像であるフォーカススタック像を算出するフォーカススタック像算出部と、
前記フォーカススタック像を画像先鋭化処理して任意のボケ画像を生成する画像先鋭化処理部と、
を備えたことを特徴とする画像生成装置。
A blur processing unit that performs blur processing that is set in advance at an arbitrary focus position on a plurality of in-focus images that are input;
A focus stack image calculation unit that calculates a focus stack image that is an intensity sum image of a plurality of images subjected to the blur processing in the blur processing unit;
An image sharpening processing unit that sharpens the focus stack image to generate an arbitrary blurred image; and
An image generation apparatus comprising:
請求項12に記載の画像生成装置において、
前記ボケ処理部は、任意のボケカーネルを用いたコンボリューション処理を行うことを特徴とする画像生成装置。
The image generation apparatus according to claim 12, wherein
The image generation apparatus, wherein the blur processing unit performs a convolution process using an arbitrary blur kernel.
請求項12又は13に記載の画像生成装置において、
前記画像先鋭化処理部は、前記フォーカススタック像に対して予め決めたカーネルを用いたデコンボリューション処理を行うことを特徴とする画像生成装置。
The image generation apparatus according to claim 12 or 13,
The image sharpening processing unit performs a deconvolution process using a predetermined kernel on the focus stack image.
請求項14に記載の画像生成装置において、
前記任意のボケカーネルは、所望のピント位置から比例したボケ半径の円形開口、又はガウシアンを表す関数であることを特徴とする画像生成装置。
The image generation apparatus according to claim 14.
The arbitrary blur kernel is a circular opening having a blur radius proportional to a desired focus position, or a function representing a Gaussian.
請求項14に記載の画像生成装置において、
前記カーネルを用いたデコンボリューション処理は、撮影カメラの3次元のボケ関数である3次元PSFの前記撮影カメラの光軸方向の積分結果を表す2次元分布関数である、フォーカススタックPSFカーネルと、前記ボケ処理部でコンボリューション処理を行う時に用いる前記任意のボケカーネルのフォーカススタックに相当するフォーカススタックボケカーネルとの2つのカーネルを用いたデコンボリューション処理であることを特徴とする画像生成装置。
The image generation apparatus according to claim 14.
The deconvolution process using the kernel includes a focus stack PSF kernel, which is a two-dimensional distribution function representing an integration result of the three-dimensional PSF, which is a three-dimensional blur function of the photographing camera, in the optical axis direction of the photographing camera; An image generation apparatus characterized by deconvolution processing using two kernels, a focus stack blur kernel corresponding to a focus stack of the arbitrary blur kernel used when performing a convolution process in a blur processing unit.
請求項14に記載の画像生成装置であって、
前記複数の合焦状態の画像は、複数のカメラ(撮像素子を有する複数の撮像部)から構成される多眼カメラで生成される画像であり、合成開口法によるピント合わせによってピント合わせが行われた結果得られる複数の合焦状態の画像であることを特徴とする画像生成装置。
The image generation device according to claim 14,
The plurality of in-focus images are images generated by a multi-lens camera composed of a plurality of cameras (a plurality of imaging units having an image sensor), and are focused by focusing using a synthetic aperture method. An image generating apparatus characterized by being a plurality of in-focus images obtained as a result.
請求項14に記載の画像生成装置であって、
前記撮影カメラの3次元のボケ関数である3次元PSFは多眼カメラの撮像部の配置を表すことを特徴とする画像生成装置。
The image generation device according to claim 14,
An image generating apparatus characterized in that a three-dimensional PSF, which is a three-dimensional blur function of the photographing camera, represents an arrangement of an imaging unit of a multi-view camera.
請求項12に記載の画像生成装置において、
前記複数の合焦状態の画像は、複数のカメラ(撮像素子を有する複数の撮像部)から構成される多眼カメラで生成される画像であり、視差(視差=瞳面上の2点間(または複数カメラの光軸間)の距離×結像倍率)が等間隔となる被写体までの距離において得られた画像を用いることを特徴とする画像生成装置。
The image generation apparatus according to claim 12, wherein
The plurality of in-focus images are images generated by a multi-lens camera including a plurality of cameras (a plurality of imaging units having an image sensor), and parallax (parallax = between two points on the pupil plane ( Alternatively, an image generation apparatus using an image obtained at a distance to a subject having an equal interval (distance between optical axes of a plurality of cameras) × image forming magnification).
請求項13に記載の画像生成装置において、
前記任意のボケカーネルは、ピントを合わせたい被写体までの距離で瞳形状が最も絞られた点になっていることを特徴とする画像生成装置。
The image generation device according to claim 13.
The arbitrary blur kernel is an image generating apparatus characterized in that a pupil shape is most narrowed by a distance to a subject to be focused.
コンピュータを、請求項12から20のうちのいずれか1項に記載の画像生成装置として機能させるためのプログラム。   A program for causing a computer to function as the image generation apparatus according to any one of claims 12 to 20. 請求項21記載のプログラムを記録した記録媒体。   A recording medium on which the program according to claim 21 is recorded. 複数の合焦状態の画像を取り込む撮像部と
前記複数の合焦状態に相当する視差量の画像に対して、所望のピント位置に相当する視差値から視差量に比例したボケ半径の円形開口、又はガウシアン等の任意のボケカーネルを用いたコンボリューション処理を行うボケ処理部と、
前記ボケ処理部でボケ処理を行った複数の画像の強度和画像であるフォーカススタック像を算出するフォーカススタック像算出部と、
予め決められている電子カメラの3次元のボケ関数である3次元PSFの前記電子カメラの光軸方向の積分結果を表す、2次元分布関数であるフォーカススタックPSFカーネルに基づき、前記フォーカススタック像をデコンボリューション処理して任意のボケ画像を生成する画像先鋭化処理部と、
を備えたことを特徴とする電子カメラ。
An imaging unit that captures a plurality of in-focus images, and a circular aperture with a blur radius proportional to the amount of parallax from a parallax value corresponding to a desired focus position with respect to an image with a parallax amount corresponding to the plurality of in-focus states, Or a blur processing unit that performs convolution processing using an arbitrary blur kernel such as Gaussian;
A focus stack image calculation unit that calculates a focus stack image that is an intensity sum image of a plurality of images subjected to the blur processing in the blur processing unit;
Based on a focus stack PSF kernel that is a two-dimensional distribution function that represents a result of integration of a three-dimensional PSF that is a predetermined three-dimensional blur function of the electronic camera in the optical axis direction of the electronic camera, the focus stack image is An image sharpening processing unit that generates an arbitrary blurred image by deconvolution processing;
An electronic camera characterized by comprising:
請求項23に記載の電子カメラであって、
前記複数の合焦状態の画像を取り込む撮像部は、複数のカメラから構成される多眼カメラであり、合成開口法によるピント合わせによってピント合わせが可能であり、合成開口法により任意のピント位置にフォーカスがあった複数の合焦状態の画像を出力可能であることを特徴とする電子カメラ。
The electronic camera according to claim 23, wherein
The imaging unit that captures the plurality of in-focus images is a multi-lens camera composed of a plurality of cameras, and can be focused by a synthetic aperture method, and can be placed at an arbitrary focus position by a synthetic aperture method. An electronic camera capable of outputting a plurality of in-focus images in focus.
請求項23に記載の電子カメラであって、
前記電子カメラの3次元のボケ関数である3次元PSFは、多眼カメラに設けた撮像部の配置を表すことを特徴とする電子カメラ。
The electronic camera according to claim 23, wherein
An electronic camera characterized in that a three-dimensional PSF, which is a three-dimensional blur function of the electronic camera, represents an arrangement of imaging units provided in a multi-view camera.
請求項23に記載の電子カメラにおいて、
前記撮像部は、二次元状に配列されている複数の撮影開口と、前記撮影開口の背後に配置されている複数の撮影レンズと、前記撮影レンズにより結像する被写体像を撮像する複数の撮像素子と、を備え、
前記各撮影開口のx,y方向の間隔は、2値の疑似ランダム系列がM系列をなす周期パターンにそれぞれ設定されていることを特徴とする電子カメラ。
24. The electronic camera according to claim 23.
The imaging unit includes a plurality of imaging apertures arranged in a two-dimensional manner, a plurality of imaging lenses arranged behind the imaging aperture, and a plurality of imagings for imaging a subject image formed by the imaging lens. An element,
The interval between the photographing apertures in the x and y directions is set to a periodic pattern in which binary pseudo-random sequences form M sequences, respectively.
請求項23に記載の電子カメラにおいて、
前記撮像部は、二次元状に配列されている複数の撮影開口と、前記撮影開口の背後に配置されている複数の撮影レンズと、前記撮影レンズにより結像する被写体像を撮像する複数の撮像素子と、を備え、
前記各撮影開口は円周上に配置されていることを特徴とする電子カメラ。
24. The electronic camera according to claim 23.
The imaging unit includes a plurality of imaging apertures arranged in a two-dimensional manner, a plurality of imaging lenses arranged behind the imaging aperture, and a plurality of imagings for imaging a subject image formed by the imaging lens. An element,
An electronic camera according to claim 1, wherein each of the photographing openings is arranged on a circumference.
請求項23又は24に記載の電子カメラにおいて、
前記複数の撮影レンズにより結像される被写体像のピントが、前記撮像素子毎で均一なボケ量でずれるように前記各撮影レンズ、又は前記各撮像素子とのいずれか一方又は両方を撮影光軸方向に移動させるピントずらし手段を備えていることを特徴とする電子カメラ。
The electronic camera according to claim 23 or 24,
Either one or both of the photographic lenses and the imaging elements is photographic optical axes so that the focus of the subject image formed by the plurality of photographic lenses is shifted with a uniform amount of blur for each of the imaging elements. An electronic camera comprising focus shifting means for moving in a direction.
請求項23から28のうちのいずれか1項に記載の電子カメラにおいて、
前記フォーカススタック像生成部は、前記ボケ処理部でボケ処理を行った複数の画像に対して任意の視点の視差を加えた複数画像の強度和画像であるフォーカススタック像を算出し、
前記画像先鋭化処理部は、算出したフォーカススタック像を任意の視点の視差を加えたフォーカススタックPSFカーネルに基づいてデコンボリューション処理を行って任意視点のボケ画像を生成することを特徴とする電子カメラ。
The electronic camera according to any one of claims 23 to 28,
The focus stack image generation unit calculates a focus stack image that is an intensity sum image of a plurality of images obtained by adding a parallax of an arbitrary viewpoint to a plurality of images subjected to the blur processing by the blur processing unit,
The image sharpening processing unit generates a blurred image of an arbitrary viewpoint by performing a deconvolution process on the calculated focus stack image based on a focus stack PSF kernel obtained by adding a parallax of an arbitrary viewpoint. .
複数の等間隔の視差量に対応する合焦状態の画像を取得し、これらの画像を3次元データとみなし、3次元デコンボリューション処理を行い、物体の強度分布を求め、求めた強度分布に任意のボケカーネルによる2次元コンボリューション処理を行い、前記2次元コンボリューション処理済みの画像を平面に投影して任意のボケ画像を生成することを特徴とする画像生成方法。   Acquire in-focus images corresponding to a plurality of equally spaced parallax amounts, consider these images as three-dimensional data, perform three-dimensional deconvolution processing, obtain the intensity distribution of the object, and arbitrarily set the obtained intensity distribution An image generation method characterized by performing a two-dimensional convolution process using a blur kernel and projecting the image subjected to the two-dimensional convolution process onto a plane to generate an arbitrary blurred image. 複数の等間隔の視差量に対応する合焦状態の画像を取得する取得手段と、前記取得手段が取得した複数の画像を3次元データとみなし、3次元デコンボリューション処理を行って物体の強度分布を求める3次元デコンボリューション処理手段と、前記3次元デコンボリューション処理済みの画像に対して任意のボケカーネルによる2次元コンボリューション処理を行う2次元コンボリューション処理手段と、前記2次元コンボリューション処理済みの画像を平面に投影して任意のボケ画像を生成する生成手段と、を備えたことを特徴とする画像生成装置。   An acquisition unit that acquires a plurality of images in focus corresponding to a plurality of equidistant parallax amounts, and a plurality of images acquired by the acquisition unit are regarded as three-dimensional data, and a three-dimensional deconvolution process is performed to perform an object intensity distribution A three-dimensional deconvolution processing means for obtaining a two-dimensional convolution processing means for performing a two-dimensional convolution process with an arbitrary blur kernel on the three-dimensional deconvolution processed image, and the two-dimensional convolution processed An image generating apparatus comprising: generating means for projecting an image onto a plane to generate an arbitrary blurred image. 合成開口法によってフォーカス画像を生成する画像生成方法であって、フォーカス位置ごとのPSF又はMTFを予め記憶しておき、前記合成開口法によりフォーカス画像を生成する時にフォーカス位置によるPSF又はMTFの変化を相殺するように画像処理を行うことを特徴とする画像生成方法。   An image generation method for generating a focus image by a synthetic aperture method, in which PSF or MTF for each focus position is stored in advance, and when a focus image is generated by the synthetic aperture method, a change in PSF or MTF according to the focus position is detected. An image generation method, wherein image processing is performed so as to cancel. 合成開口法によってフォーカス画像を生成する画像生成装置であって、フォーカス位置ごとのPSF又はMTFを予め記憶する記憶手段と、前記合成開口法によりフォーカス画像を生成する時にフォーカス位置によるPSF又はMTFの変化を相殺するように画像処理を行う画像処理手段と、を備えたことを特徴とする画像生成装置。   An image generation apparatus for generating a focus image by a synthetic aperture method, a storage unit that stores PSF or MTF for each focus position in advance, and a change in PSF or MTF according to the focus position when generating a focus image by the synthetic aperture method And an image processing means for performing image processing so as to cancel out the image. 視差又はピント位置をずらした複数の画像に基づいてデプスマップ情報(画像の領域分割情報)を取得し、前記デプスマップ情報の光軸方向の尺度を視差に置き換え、等間隔の視差量となるように前記デプスマップ情報をデータ化し、合成開口法により任意のピントに合わせた画像を領域分割するとともに、該分割された領域ごとの画像に対し、ピント位置からの視差量に応じたブラーカーネル(ボケ関数)をコンボリューションし、コンボリューション後の画像を統合してボケ画像を生成することを特徴とする画像生成方法。   Depth map information (image segmentation information) is acquired based on a plurality of images with the parallax or the focus position shifted, and the scale in the optical axis direction of the depth map information is replaced with parallax so that the parallax amounts are evenly spaced. The depth map information is converted into data, and an image focused to an arbitrary focus is divided into regions by the synthetic aperture method, and a blur kernel (blur) corresponding to the amount of parallax from the focus position is divided into the images of the divided regions. A convolution function), and the image after convolution is integrated to generate a blurred image. 視差又はピント位置をずらした複数の画像に基づいてデプスマップ情報を取得するとともに、前記デプスマップ情報の光軸方向の尺度を視差に置き換え、等間隔の視差量となるように前記デプスマップ情報をデータ化するデプスマップ情報取得変換手段と、合成開口法により任意のピントに合わせた画像を領域分割する領域分割手段と、前記分割された領域ごとの画像に対して、ピント位置からの視差量に応じたブラーカーネル(ボケ関数)をコンボリューションするコンボリューション手段と、前記コンボリューション後の画像を統合してボケ画像を生成するボケ画像生成手段と、を備えたことを特徴とする画像生成装置。   Depth map information is acquired based on a plurality of images whose parallax or focus positions are shifted, and the scale in the optical axis direction of the depth map information is replaced with parallax, and the depth map information is set so that the amount of parallax is evenly spaced. Depth map information acquisition conversion means for converting to data, area dividing means for dividing an image that has been arbitrarily focused by the synthetic aperture method, and the amount of parallax from the focus position with respect to the image for each of the divided areas An image generating apparatus comprising: convolution means for convolving a corresponding blur kernel (blurring function); and a blurred image generating means for generating a blurred image by integrating the images after the convolution. 請求項12に記載の画像生成装置において、
前記複数の合焦状態の画像は、複数のカメラ(撮像素子を有する複数の撮像部)から構成される多眼カメラで生成される画像であり、視差(視差=瞳面上の2点間(または複数カメラの光軸間)の距離×結像倍率)が前記撮像素子の画素ピッチの整数倍となる被写体までの距離において得られた画像を用いることを特徴とする画像生成装置。
The image generation apparatus according to claim 12, wherein
The plurality of in-focus images are images generated by a multi-lens camera including a plurality of cameras (a plurality of imaging units having an image sensor), and parallax (parallax = between two points on the pupil plane ( An image generation apparatus using an image obtained at a distance to a subject whose distance between the optical axes of a plurality of cameras x imaging magnification) is an integral multiple of the pixel pitch of the image sensor.
請求項12に記載の画像生成装置において、
前記複数の合焦状態の画像は、複数のカメラ(撮像素子を有する複数の撮像部)から構成される多眼カメラで生成される画像であり、視差(視差=瞳面上の2点間(または複数カメラの光軸間)の距離×結像倍率)が、前記カメラ(撮像素子)から出力される出力画像の画素ピッチの整数倍となる被写体までの距離において得られた画像を用いることを特徴とする画像生成装置。
The image generation apparatus according to claim 12, wherein
The plurality of in-focus images are images generated by a multi-lens camera including a plurality of cameras (a plurality of imaging units having an image sensor), and parallax (parallax = between two points on the pupil plane ( Alternatively, an image obtained at a distance to a subject in which the distance between the optical axes of a plurality of cameras) × image forming magnification) is an integral multiple of the pixel pitch of the output image output from the camera (imaging device) is used. A featured image generation apparatus.
JP2011160089A 2011-07-21 2011-07-21 Image generation method and device, program, recording medium, and electronic camera Withdrawn JP2013026844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011160089A JP2013026844A (en) 2011-07-21 2011-07-21 Image generation method and device, program, recording medium, and electronic camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011160089A JP2013026844A (en) 2011-07-21 2011-07-21 Image generation method and device, program, recording medium, and electronic camera

Publications (1)

Publication Number Publication Date
JP2013026844A true JP2013026844A (en) 2013-02-04

Family

ID=47784711

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011160089A Withdrawn JP2013026844A (en) 2011-07-21 2011-07-21 Image generation method and device, program, recording medium, and electronic camera

Country Status (1)

Country Link
JP (1) JP2013026844A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013117848A (en) * 2011-12-02 2013-06-13 Canon Inc Image processing apparatus and image processing method
WO2014193377A1 (en) * 2013-05-30 2014-12-04 Nokia Corporation Image refocusing
CN105301864A (en) * 2014-07-29 2016-02-03 深圳市墨克瑞光电子研究院 Liquid crystal lens imaging device and liquid crystal lens imaging method
JP2016197858A (en) * 2015-04-02 2016-11-24 艾創科技股▲ふん▼有限公司 Real time image stitch device and real time image stitch method
JP2019114250A (en) * 2017-12-21 2019-07-11 株式会社ニコン Image processing device, image processing program, image processing method, and imaging device
CN110012215A (en) * 2017-12-08 2019-07-12 索尼半导体解决方案公司 Image processing apparatus and image processing method
JPWO2020016922A1 (en) * 2018-07-17 2021-08-26 オリンパス株式会社 Imaging systems, processing equipment and endoscopes
WO2022014305A1 (en) * 2020-07-16 2022-01-20 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Multi-pinhole camera and image identification system
CN116777750A (en) * 2023-07-31 2023-09-19 山东黄河三角洲国家级自然保护区管理委员会 Focusing stack parallax dimension super-resolution method and device based on parallax dimension filtering
JP7371264B2 (en) 2020-01-22 2023-10-30 維沃移動通信有限公司 Image processing method, electronic equipment and computer readable storage medium

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013117848A (en) * 2011-12-02 2013-06-13 Canon Inc Image processing apparatus and image processing method
WO2014193377A1 (en) * 2013-05-30 2014-12-04 Nokia Corporation Image refocusing
US9792698B2 (en) 2013-05-30 2017-10-17 Nokia Technologies Oy Image refocusing
CN105301864A (en) * 2014-07-29 2016-02-03 深圳市墨克瑞光电子研究院 Liquid crystal lens imaging device and liquid crystal lens imaging method
JP2016197858A (en) * 2015-04-02 2016-11-24 艾創科技股▲ふん▼有限公司 Real time image stitch device and real time image stitch method
CN110012215A (en) * 2017-12-08 2019-07-12 索尼半导体解决方案公司 Image processing apparatus and image processing method
JP7238381B2 (en) 2017-12-21 2023-03-14 株式会社ニコン Image processing device, image processing program, image processing method, and microscope
WO2020129280A1 (en) 2017-12-21 2020-06-25 株式会社ニコン Image processing device, image processing program, image processing method, and imaging device
EP3902238A4 (en) * 2017-12-21 2022-09-07 Nikon Corporation Image processing device, image processing program, image processing method, and imaging device
JP2019114250A (en) * 2017-12-21 2019-07-11 株式会社ニコン Image processing device, image processing program, image processing method, and imaging device
JPWO2020016922A1 (en) * 2018-07-17 2021-08-26 オリンパス株式会社 Imaging systems, processing equipment and endoscopes
JP7036923B2 (en) 2018-07-17 2022-03-15 オリンパス株式会社 Imaging systems, processing equipment and endoscopes
JP7371264B2 (en) 2020-01-22 2023-10-30 維沃移動通信有限公司 Image processing method, electronic equipment and computer readable storage medium
WO2022014305A1 (en) * 2020-07-16 2022-01-20 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Multi-pinhole camera and image identification system
CN116777750A (en) * 2023-07-31 2023-09-19 山东黄河三角洲国家级自然保护区管理委员会 Focusing stack parallax dimension super-resolution method and device based on parallax dimension filtering
CN116777750B (en) * 2023-07-31 2023-12-26 山东黄河三角洲国家级自然保护区管理委员会 Focusing stack parallax dimension super-resolution method and device based on parallax dimension filtering

Similar Documents

Publication Publication Date Title
JP2013026844A (en) Image generation method and device, program, recording medium, and electronic camera
JP6112824B2 (en) Image processing method and apparatus, and program.
JP6230239B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP5968107B2 (en) Image processing method, image processing apparatus, and program
JP5988790B2 (en) Image processing apparatus, imaging apparatus, image processing method, and image processing program
JP6003578B2 (en) Image generation method and apparatus
US11928794B2 (en) Image processing device, image processing program, image processing method, and imaging device
TWI554106B (en) Method and image capturing device for generating image bokeh effect
US11282176B2 (en) Image refocusing
JP2017184217A (en) Image processing device, imaging apparatus, method for controlling them, and program
JPWO2019065260A1 (en) Information processing equipment, information processing methods, programs, and interchangeable lenses
JP6095266B2 (en) Image processing apparatus and control method thereof
JP6299788B2 (en) Parallax in plenoptic systems
JP6516510B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP5348258B2 (en) Imaging device
JP6168220B2 (en) Image generation apparatus, image processing apparatus, image generation method, and image processing program
JP6976754B2 (en) Image processing equipment and image processing methods, imaging equipment, programs
JP6330955B2 (en) Imaging apparatus and imaging method
JP7014175B2 (en) Image processing device, image processing method, and program
JP7107224B2 (en) Image processing device, image processing method, and program
JP6569769B2 (en) Arbitrary viewpoint image composition method and image processing apparatus
JP5553862B2 (en) Image pickup apparatus and image pickup apparatus control method
JP2017050662A (en) Image processing system, imaging apparatus, and image processing program
US9602701B2 (en) Image-pickup apparatus for forming a plurality of optical images of an object, control method thereof, and non-transitory computer-readable medium therefor
JP2018022984A (en) Image processing device, control method therefor, program and imaging device

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