JP2013175821A - Image processing device, image processing method, and program - Google Patents

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

Info

Publication number
JP2013175821A
JP2013175821A JP2012037714A JP2012037714A JP2013175821A JP 2013175821 A JP2013175821 A JP 2013175821A JP 2012037714 A JP2012037714 A JP 2012037714A JP 2012037714 A JP2012037714 A JP 2012037714A JP 2013175821 A JP2013175821 A JP 2013175821A
Authority
JP
Japan
Prior art keywords
image
intermediate viewpoint
generated
viewpoint
viewpoint image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012037714A
Other languages
Japanese (ja)
Inventor
Yosuke Takada
洋佑 高田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2012037714A priority Critical patent/JP2013175821A/en
Publication of JP2013175821A publication Critical patent/JP2013175821A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Stereoscopic And Panoramic Photography (AREA)

Abstract

PROBLEM TO BE SOLVED: To allow for refocus processing capable of reproducing a smooth blurring while suppressing a calculation cost.SOLUTION: In step S401, a user operates a shutter button 111 to photograph an image. In step S402, the photographed image is input to an image input unit 301, and development processing is performed by a development processing unit 302 to generate a multi-viewpoint image. In step S403, a depth map is generated from the generated multi-viewpoint image. In step S404, the number of intermediate viewpoint images to be generated is calculated using the generated depth map. In step S405, intermediate viewpoint images are generated on the basis of the calculated number of intermediate viewpoint images using the generated multi-viewpoint image and the generated depth map. In step S408, the images are synthesized by an image synthesizing unit 308 using the multi-viewpoint images generated in step S402, the intermediate viewpoint images generated in step S405, and refocus parameters set in step S407.

Description

本発明は、画像処理装置、画像処理方法およびプログラムに関し、より具体的には視点位置の異なる複数の画像を用いて画像を生成する画像処理方法、画像処理装置およびプログラムに関するものである。   The present invention relates to an image processing apparatus, an image processing method, and a program, and more specifically to an image processing method, an image processing apparatus, and a program that generate an image using a plurality of images having different viewpoint positions.

従来から、二つ以上の視点から撮影した画像(以下、多視点画像)を合成することによって、新たな画像を生成する技術がある。例えば、多視点画像に対して、仮想的なピント面やボケ量を設定し、画像処理によって合成することで新たな画像を生成するリフォーカス技術が提案されている(例えば、特許文献1や非特許文献1参照)。リフォーカス技術では、設定したピント面において被写体位置が一致するように各画像を合成することで、設定したピント面においてピントの合った画像を生成する。一方、非ピント面では位置をずらして合成することによって、非ピント面においてボケ像が再現できる。また、合成する枚数や重みを調整することによって、ボケの大きさを制御することが可能となる。特許文献1では、多視点画像撮影時の光線情報に基づいて、重み付けして合成することでボケの大きさ調整や特徴的なボケの再現を行う。また、非特許文献1では、多視点画像の中間視点画像を推定することで、滑らかなボケを再現することが可能となる。   Conventionally, there is a technique for generating a new image by combining images taken from two or more viewpoints (hereinafter, multi-viewpoint images). For example, a refocus technique has been proposed in which a virtual focus plane and a blur amount are set for a multi-viewpoint image and are synthesized by image processing to generate a new image (for example, Patent Document 1 and Non-Patent Document 1). Patent Document 1). In the refocus technique, each image is synthesized so that the subject position matches on the set focus plane, thereby generating an image focused on the set focus plane. On the other hand, a blurred image can be reproduced on the non-focus surface by shifting the position on the non-focus surface and compositing. Further, the size of blur can be controlled by adjusting the number of sheets to be combined and the weight. In Japanese Patent Laid-Open No. 2004-228688, the size of blur is adjusted and characteristic blur is reproduced by weighting and synthesizing based on light ray information at the time of multi-viewpoint image shooting. In Non-Patent Document 1, it is possible to reproduce smooth blur by estimating an intermediate viewpoint image of a multi-viewpoint image.

特開2009−159357号公報JP 2009-159357 A

楠本夏未他、"未較正合成開口撮影法によるデフォーカスコントロール"、MIRU2008画像の認識・理解シンポジウム論文集、日本、2008年、1057-1062頁Natsumoto Enomoto et al., “Defocus Control by Uncalibrated Synthetic Aperture Imaging”, MIRU 2008 Image Recognition and Understanding Symposium, Japan, 2008, pp. 1057-1062

しかしながら、特許文献1の方法の場合、計算コストを抑えることができるが、多視点撮影時の光線情報のみに基づいてボケの再現を行っているため、被写体に奥行がある場合に滑らかなボケを再現できないという問題がある。一方、非特許文献1の方法は、被写体に奥行があったとしても、滑らかなボケを再現することができるが、すべての多視点画像間において中間視点画像を生成するため、生成される画像が多数となり計算コストが増大するという問題がある。   However, in the case of the method disclosed in Patent Document 1, although the calculation cost can be reduced, since the blur is reproduced based only on the light ray information at the time of multi-viewpoint shooting, smooth blur is obtained when the subject has a depth. There is a problem that it cannot be reproduced. On the other hand, the method of Non-Patent Document 1 can reproduce smooth blur even if the subject has a depth, but generates an intermediate viewpoint image between all the multi-viewpoint images. There is a problem that the calculation cost increases due to a large number.

本発明は、画像処理装置であって、複数の撮像部を有する撮像装置により取得された多視点画像データを入力する多視点画像入力手段と、多視点画像の特徴量に応じて、予め定められた特性を満たす合成画像を得るために生成が必要な中間視点画像の生成数を算出する中間視点画像生成数算出手段と、中間視点画像生成数算出手段にて算出された生成数の、多視点画像データの中間視点画像データを生成する中間視点画像生成手段と、中間視点画像生成手段により生成された中間視点画像データを用いて合成画像データを生成する画像合成手段とを有することを特徴とする。   The present invention is an image processing apparatus, which is determined in advance according to multi-view image input means for inputting multi-view image data acquired by an image capturing apparatus having a plurality of image capturing units, and feature quantities of the multi-view image. Intermediate viewpoint image generation number calculating means for calculating the number of intermediate viewpoint images that need to be generated in order to obtain a composite image satisfying the above characteristics, and the multi-viewpoints of the generation numbers calculated by the intermediate viewpoint image generation number calculating means An intermediate viewpoint image generation unit that generates intermediate viewpoint image data of image data, and an image synthesis unit that generates composite image data using the intermediate viewpoint image data generated by the intermediate viewpoint image generation unit .

本発明は、多視点画像間の特徴量に基づいて中間視点画像の生成数を算出し、その値に応じて中間視点画像の疎密を切り替えることで計算コストを抑えながら滑らかなボケの再現が可能なリフォーカス処理が可能となる。   The present invention calculates the number of intermediate viewpoint images generated based on the feature values between multi-viewpoint images, and can switch between the density of intermediate viewpoint images according to the value to reproduce smooth blur while reducing the calculation cost. Refocus processing is possible.

実施例1における撮像装置の一例を示す図である。1 is a diagram illustrating an example of an imaging device in Embodiment 1. FIG. 実施例1における撮像装置の内部構成を示すブロック図である。1 is a block diagram illustrating an internal configuration of an imaging apparatus according to Embodiment 1. FIG. 実施例1における画像処理の構成を示すブロック図である。3 is a block diagram illustrating a configuration of image processing in Embodiment 1. FIG. 実施例1における処理の流れを示すフローチャートである。3 is a flowchart illustrating a flow of processing in the first embodiment. 実施例1におけるリフォーカスパラメータ設定のユーザインタフェース例である。3 is an example of a user interface for setting a refocus parameter in the first embodiment. 実施例1の奥行マップ生成における処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process in the depth map production | generation of Example 1. FIG. 実施例1における撮像位置間隔と被写体までの距離との関係を示す図である。6 is a diagram illustrating a relationship between an imaging position interval and a distance to a subject in Embodiment 1. FIG. 実施例1の中間視点画像の生成数算出における処理の流れを示すフローチャートである。7 is a flowchart illustrating a processing flow in calculating the number of intermediate viewpoint images generated according to the first exemplary embodiment. 実施例1における多視点画像間のシフト量算出の例を示す図であるFIG. 10 is a diagram illustrating an example of calculating a shift amount between multi-viewpoint images in the first embodiment. 実施例1における中間視点画像の生成数の例を示す図である。6 is a diagram illustrating an example of the number of intermediate viewpoint images generated in Embodiment 1. FIG. 実施例1の画像合成部の処理の流れを示すフローチャートである。3 is a flowchart illustrating a processing flow of an image composition unit according to the first exemplary embodiment. 実施例1におけるピント位置及びシフト量の概要を示す図である。FIG. 6 is a diagram illustrating an overview of a focus position and a shift amount in the first embodiment. 実施例1における重み係数を説明するための図である。It is a figure for demonstrating the weighting coefficient in Example 1. FIG. 実施例2における処理の流れを示すフローチャートである。10 is a flowchart illustrating a processing flow in the second embodiment. 実施例2の画像間の類似度算出における処理の流れを示すフローチャートである。10 is a flowchart illustrating a flow of processing in calculating similarity between images according to the second exemplary embodiment. 実施例2における中間視点画像の生成数の例を示す図である。FIG. 10 is a diagram illustrating an example of the number of intermediate viewpoint images generated in the second embodiment. 実施例3における処理の流れを示すフローチャートである。10 is a flowchart showing a flow of processing in Embodiment 3. 実施例3における画像の周波数解析を示すフローチャートである。10 is a flowchart illustrating frequency analysis of an image in Example 3. 実施例3における多視点画像の周波数特性を示す模式図である。10 is a schematic diagram illustrating frequency characteristics of a multi-viewpoint image in Embodiment 3. FIG. 実施例3における中間視点画像の生成数の例を示す図である。It is a figure which shows the example of the production | generation number of the intermediate viewpoint image in Example 3. FIG. 実施例1における撮像装置の裏面の一例を示す図である。2 is a diagram illustrating an example of a back surface of the imaging apparatus according to Embodiment 1. FIG.

[実施例1]
図1および21は、本実施例における撮像装置の一例を示す図である。図1に示すように、撮像装置の筺体101は、多眼撮像部102〜110を備える。また、図21に示すように、撮像装置101の上部には動作を開始するための撮影ボタン111が備えられている。また、撮像装置101の裏面には撮像装置101を操作するための操作ボタン112および画像やグラフィックユーザーインタフェースを表示するための表示部113が備えられている。
[Example 1]
1 and 21 are diagrams illustrating an example of an imaging apparatus according to the present embodiment. As illustrated in FIG. 1, the housing 101 of the imaging apparatus includes multi-eye imaging units 102 to 110. Further, as shown in FIG. 21, an imaging button 111 for starting an operation is provided on the upper part of the imaging apparatus 101. Further, an operation button 112 for operating the image pickup apparatus 101 and a display unit 113 for displaying an image and a graphic user interface are provided on the back surface of the image pickup apparatus 101.

図2は、本実施例における撮像装置101の内部構成を示すブロック図である。多眼撮像部102〜110は、ズームレンズ、フォーカスレンズ、ブレ補正レンズ、絞り、シャッター、光学ローパスフィルタ、iRカットフィルタ、カラーフィルタ、及びCMOSまたはCCDの撮像センサなどから構成される。このような構成により、レンズを通りフォーカスされた被写体の光量を検知することができる。A/D変換部201は、多眼撮像部102〜110にて検知した被写体の光量をデジタル信号値に変換する。画像処理部202は、変換されたデジタル信号値に対して、画像処理を行うが、詳細については後述する。D/A変換部203は、上記デジタル信号値をアナログ信号に変換する。エンコーダ部204は、上記デジタル信号値をJpegなどの本技術分野で知られた種々のファイルフォーマットに変換処理を行う。メディアI/F205は、PC/メディア206(例えば、ハードディスク、メモリカード、CFカード、SDカード、USBメモリなど)につなぐためのインタフェースである。   FIG. 2 is a block diagram illustrating an internal configuration of the imaging apparatus 101 in the present embodiment. The multi-view imaging units 102 to 110 include a zoom lens, a focus lens, a shake correction lens, an aperture, a shutter, an optical low-pass filter, an iR cut filter, a color filter, a CMOS or CCD image sensor, and the like. With such a configuration, it is possible to detect the amount of light of the subject focused through the lens. The A / D conversion unit 201 converts the amount of light of the subject detected by the multiview imaging units 102 to 110 into a digital signal value. The image processing unit 202 performs image processing on the converted digital signal value, details of which will be described later. The D / A converter 203 converts the digital signal value into an analog signal. The encoder unit 204 converts the digital signal value into various file formats known in this technical field such as Jpeg. The media I / F 205 is an interface for connecting to a PC / media 206 (for example, a hard disk, a memory card, a CF card, an SD card, a USB memory, etc.).

CPU207は、各構成の処理全てに関わり、ROM208やRAM209に格納された命令を順に読み込み、解釈し、その結果に従って処理を実行する。また、撮像系制御部210は、多眼撮像部102〜110に対して、フォーカスを合わせ、シャッターを開き、絞りを調整するなど、CPU207から指示された制御を行う。制御部211は、シャッターボタン111や操作ボタン112などからのユーザ指示によって、全体処理の開始及び終了などの種々の制御を行う。キャラクタージェネレーション部212は、文字やグラフィックなどを生成し、表示部113に表示する。表示部113は、通常は液晶ディスプレイなどが用いられ、キャラクタージェネレーション部212やD/A変換部203から受け取った画像データ、文字、グラフィックインタフェースなどを表示する。また、表示部113にはタッチスクリーン機能をもたせるようにすることもでき、その場合は、タッチスクリーンを介したユーザ指示を制御部211の入力とすることも可能である。尚、本実施例では、図1に示すように多眼撮像装部として9個を例として挙げたが、2つ以上の撮像部をもつものであればこれに限定されない。   The CPU 207 is involved in all the processes of each configuration, reads the instructions stored in the ROM 208 and the RAM 209 in order, interprets them, and executes the processes according to the results. In addition, the imaging system control unit 210 performs control instructed by the CPU 207 such as adjusting the focus, opening the shutter, and adjusting the aperture for the multi-eye imaging units 102 to 110. The control unit 211 performs various controls such as start and end of the entire process according to a user instruction from the shutter button 111 or the operation button 112. The character generation unit 212 generates characters and graphics and displays them on the display unit 113. The display unit 113 typically uses a liquid crystal display or the like, and displays image data, characters, graphic interfaces, and the like received from the character generation unit 212 and the D / A conversion unit 203. In addition, the display unit 113 can be provided with a touch screen function. In this case, a user instruction via the touch screen can be input to the control unit 211. In the present embodiment, as shown in FIG. 1, nine multi-view imaging units are exemplified, but the present invention is not limited to this as long as it has two or more imaging units.

図3は、本実施例の画像処理を実行するための機能を示すブロック図である。多視点画像入力手段である画像入力部301は、多視点撮像部102〜110にて撮像し、A/D変換部201にてデジタル信号値として生成された画像データを受け取る。現像処理部302は、画像入力部301にて入力した画像データに対して、デモザイク、ホワイトバランス、ノイズリダクション、ガンマ、シャープネスなどの処理を行う。   FIG. 3 is a block diagram illustrating functions for executing image processing according to the present embodiment. An image input unit 301 serving as a multi-viewpoint image input unit receives image data captured by the multi-viewpoint imaging units 102 to 110 and generated as a digital signal value by the A / D conversion unit 201. The development processing unit 302 performs processing such as demosaic, white balance, noise reduction, gamma, and sharpness on the image data input by the image input unit 301.

中間視点画像生成数算出部303は、最適な中間視点画像の生成数、つまり各多視点画像に応じて、滑らかなボケを再現するために必要な最低限の生成数を算出する。すなわち、中間視点画像の数が少ない場合、多視点画像データと中間視点画像データを合成した際に格子状のノイズが発生してしまう。また、一般に多視点画像によって必要な中間視点画像の数が異なるにもかかわらず、従来のように一律に多くの中間視点画像データを算出すると、滑らかなボケは再現できるが無駄な計算コストがかかってしまう。そこで、このような問題を解決するために、最適な中間視点画像の生成数を算出する指標として多視点画像もしくは多視点画像間の特徴量を算出し、算出した特徴量を基に多視点画像間を内挿する中間視点画像の最適な生成数を算出する。   The intermediate viewpoint image generation number calculation unit 303 calculates the optimum number of intermediate viewpoint images generated, that is, the minimum number of generations necessary to reproduce smooth blur according to each multi-viewpoint image. That is, when the number of intermediate viewpoint images is small, grid-like noise is generated when multi-viewpoint image data and intermediate viewpoint image data are combined. In general, even if the number of required intermediate viewpoint images differs depending on the multi-viewpoint image, if a large amount of intermediate viewpoint image data is calculated as in the past, smooth blur can be reproduced, but a wasteful calculation cost is required. End up. Therefore, in order to solve such a problem, a feature value between multi-view images or multi-view images is calculated as an index for calculating the optimum number of intermediate viewpoint images, and a multi-view image is calculated based on the calculated feature value. The optimal number of intermediate viewpoint images to be interpolated is calculated.

中間視点画像生成部304は、中間視点画像生成数算出部303にて算出された生成数に基づいて現像処理された多視点画像データから中間視点画像を生成する。リフォーカスパラメータ入力部305は、ユーザによって操作ボタン112を用いて指示されたピント位置306やボケの大きさ307を受けとる。画像合成部308は、多視点画像、中間視点画像、ピント位置306及びボケの大きさ307を用いて画像合成を行う。画像出力部309は、合成画像データをD/A変換部203にてアナログ信号に変換し表示部113に表示し、もしくはエンコーダ部204にてエンコードし、PC/メディア206に出力する。   The intermediate viewpoint image generation unit 304 generates an intermediate viewpoint image from the multi-viewpoint image data that has been developed based on the number of generations calculated by the intermediate viewpoint image generation number calculation unit 303. The refocus parameter input unit 305 receives a focus position 306 and a blur size 307 designated by the user using the operation buttons 112. The image composition unit 308 performs image composition using the multi-viewpoint image, the intermediate viewpoint image, the focus position 306, and the blur size 307. The image output unit 309 converts the composite image data into an analog signal by the D / A conversion unit 203 and displays it on the display unit 113 or encodes it by the encoder unit 204 and outputs it to the PC / media 206.

図4は、本実施例の撮像装置の処理の流れを示すフローチャートである。本実施例では、特徴量として奥行マップを用いて中間視点画像の生成数を算出する。ここで、奥行マップとは、奥行情報、つまり画像に記録された被写体の撮像装置からの距離に関する情報を画像上にマッピングしたものであり、本実施例では中間視点画像の生成数を定めるためにこれを用いるが、これに限られない。すなわち、本実施例では被写体間の距離に応じてボケの処理の制度を最適化できるよう中間視点画像の生成数を決定するため、被写体間の距離を示す、奥行マップのような何らかの指標を用いるが、本技術分野で知られたその他の指標も用いることができる。   FIG. 4 is a flowchart illustrating a processing flow of the imaging apparatus according to the present exemplary embodiment. In this embodiment, the number of intermediate viewpoint images generated is calculated using a depth map as a feature amount. Here, the depth map is obtained by mapping the depth information, that is, information on the distance of the subject recorded in the image from the imaging device on the image, and in this embodiment, in order to determine the number of intermediate viewpoint images generated. This is used, but is not limited to this. That is, in this embodiment, in order to determine the number of intermediate viewpoint images generated so that the blur processing system can be optimized according to the distance between subjects, some index such as a depth map indicating the distance between subjects is used. However, other indicators known in the art can also be used.

ステップS401では、ユーザがシャッターボタン111を操作して撮影を行う。ステップS402では、ステップS401にて撮影した画像データを画像入力部301に入力し、現像処理部302にて現像処理を行うことで多視点画像データを生成する。   In step S401, the user operates the shutter button 111 to perform shooting. In step S402, the image data captured in step S401 is input to the image input unit 301, and development processing is performed in the development processing unit 302, thereby generating multi-viewpoint image data.

ステップS403では、ステップS402にて生成した多視点画像から奥行マップを生成する。ステップS404では、ステップS403にて生成した奥行マップを用いて、中間視点画像の生成数を算出する(尚、ステップS403、ステップS404の詳細については後述する)。   In step S403, a depth map is generated from the multi-viewpoint image generated in step S402. In step S404, the number of intermediate viewpoint images generated is calculated using the depth map generated in step S403 (details of steps S403 and S404 will be described later).

ステップS405では、ステップS404にて算出された中間視点画像の生成数を基に、ステップS402にて生成した多視点画像データ、ステップS403にて生成した奥行マップとを用いて、中間視点画像データを生成する。具体的には、まず多視点画像を任意のサイズのブロック領域に分け、ブロック単位で対応領域を探索するパターンマッチングを行い、対象画像中から注目画素に対応する画素(対応画素)を求める。対応画素の探索方法としては、これらに限定されるものではなく、多視点画像について対応画素を探索する方法であれば何でもよい。次に、探索した対応画素を用いて、仮想カメラ位置における中間視点画像データを生成する。   In step S405, based on the number of intermediate viewpoint images generated in step S404, intermediate viewpoint image data is generated using the multi-viewpoint image data generated in step S402 and the depth map generated in step S403. Generate. Specifically, first, the multi-viewpoint image is divided into block areas of an arbitrary size, and pattern matching for searching the corresponding area in block units is performed to obtain a pixel (corresponding pixel) corresponding to the target pixel from the target image. The search method for the corresponding pixel is not limited to these, and any method may be used as long as the corresponding pixel is searched for the multi-viewpoint image. Next, intermediate viewpoint image data at the virtual camera position is generated using the searched corresponding pixel.

仮想カメラ位置における中間視点画像データの生成方法は、対応画素から仮想カメラ位置における視点画像データを生成する方法であれば何でもよい。例えば、対応するカメラ位置が既知であることから、三角測量法により対応画素までの奥行を算出し、仮想カメラ位置における任意の画像位置については、算出した周囲の対応画素の奥行情報を用いて算出する。ステップS406では、ユーザがリフォーカスパラメータを設定する際に使用するための画像を表示部113に表示する。ここで、表示する画像は対象被写体全体を撮影した画像であることが望ましく、例えば、多眼撮像装置106によって撮影した画像を表示する。ステップS407では、リフォーカスに必要なパラメータであるピント位置とボケの大きさの設定を行う。   The intermediate viewpoint image data generation method at the virtual camera position may be any method as long as the viewpoint image data at the virtual camera position is generated from the corresponding pixel. For example, since the corresponding camera position is known, the depth to the corresponding pixel is calculated by triangulation, and the arbitrary image position at the virtual camera position is calculated using the calculated depth information of the corresponding corresponding pixel. To do. In step S406, an image for use when the user sets the refocus parameter is displayed on the display unit 113. Here, the image to be displayed is preferably an image obtained by photographing the entire target subject. For example, an image photographed by the multi-eye imaging device 106 is displayed. In step S407, the focus position and the blur size, which are parameters necessary for refocusing, are set.

図5は、リフォーカスに必要なパラメータを設定するためのユーザインタフェースの一例である。図5に示すようにステップS406にて、表示したパラメータ設定用の画像に加え、表示部にボケの大きさを指定するためのバー501や、ピント位置502を設定するためのポインタを同時に表示する。ユ−ザは、これらに対して、操作ボタン112や、表示部113に表示されているバー501やポインタ502を操作することで、リフォーカスに必要なパラメータであるピント位置306やボケの大きさ307を設定する。   FIG. 5 is an example of a user interface for setting parameters necessary for refocusing. As shown in FIG. 5, in step S406, in addition to the displayed parameter setting image, a bar 501 for specifying the size of the blur and a pointer for setting the focus position 502 are simultaneously displayed on the display unit. . The user operates the operation button 112 or the bar 501 or the pointer 502 displayed on the display unit 113 to thereby adjust the focus position 306 and the size of the blur that are parameters necessary for refocusing. 307 is set.

ステップS408では画像合成部308にて、ステップS402において生成した多視点画像データ、ステップS405において作成した中間視点画像データ、ステップS407において設定したリフォーカスパラメータを用いて画像合成を行う。尚、ステップS408の詳細については後述する。最後に、ステップS409では、ステップS408において合成した画像データを画像出力部309にて表示部113に表示し、あるいはPC/メディア206に送信するが、これに限られず、本技術分野で知られた出力形態で出力する。   In step S408, the image composition unit 308 performs image composition using the multi-viewpoint image data generated in step S402, the intermediate viewpoint image data created in step S405, and the refocus parameter set in step S407. Details of step S408 will be described later. Finally, in step S409, the image data synthesized in step S408 is displayed on the display unit 113 by the image output unit 309 or transmitted to the PC / media 206. However, the present invention is not limited to this, and is known in this technical field. Output in output form.

<奥行マップの生成>
ここでは、ステップS403で行う奥行マップの生成について説明する。奥行マップは、多視点画像をもとに、撮像したシーンの奥行を推定することで生成される。奥行推定方法には既存の方法を利用する。例えば、ステレオ法、マルチベースラインステレオ法などが適用可能である。本実施形態では、ステレオ法によって奥行推定を行い、奥行マップを生成する。
<Generation of depth map>
Here, the generation of the depth map performed in step S403 will be described. The depth map is generated by estimating the depth of the captured scene based on the multi-viewpoint image. The existing method is used for the depth estimation method. For example, a stereo method or a multi-baseline stereo method can be applied. In this embodiment, depth estimation is performed by a stereo method, and a depth map is generated.

図6は、奥行マップ生成処理の流れを示すフローチャートである。ステップS601において、多視点画像から処理に使用する2画像を選択する。この際、全ての多視点画像のペアについて選択し、後述する処理を全ペアに対して行ってもよいし、2画像内に同一被写体が写っており、基線長が最も離れている1組のペアに対してのみ行ってもよい。一般的にステレオ法において、奥行の変化に対して視差の変化が大きいほど計測精度は高くなる。したがって、基線長が離れているほど視差が大きくなるため、後述する奥行マップの生成精度が向上する。本実施形態では撮像装置101の左中央のカメラユニット105で撮像された画像と、右中央のカメラユニット107で撮像された画像とから奥行マップを算出する場合を例に説明する。以下、前者を基準画像、後者を対象画像とする。   FIG. 6 is a flowchart showing the flow of depth map generation processing. In step S601, two images to be used for processing are selected from the multi-viewpoint images. At this time, all pairs of multi-viewpoint images may be selected, and the processing described later may be performed on all pairs. The same subject is reflected in two images, and the set of the most distant baseline lengths. It may be done only for pairs. In general, in the stereo method, the greater the change in parallax with respect to the change in depth, the higher the measurement accuracy. Therefore, since the parallax increases as the baseline length increases, the depth map generation accuracy described later is improved. In the present embodiment, a case where a depth map is calculated from an image captured by the left center camera unit 105 of the image capturing apparatus 101 and an image captured by the right center camera unit 107 will be described as an example. Hereinafter, the former is a reference image and the latter is a target image.

ステップS602において、以降の処理を行う注目画像の奥行値を初期化する。ステップS603において、S605で算出される奥行値が全画素で求められたかを判定する。全画素で奥行値が求められている場合はステップS607へ進んで出力処理を実行し、奥行値の求められていない画素がある場合はステップS604へ進み注目が祖について奥行値を求める。ステップS604では、多視点画像を任意のサイズのブロック領域に分け、ブロック単位で対応領域を探索するパターンマッチングを行い、対象画像中から注目画素に対応する画素(対応画素)を求める。   In step S602, the depth value of the image of interest to be processed thereafter is initialized. In step S603, it is determined whether the depth value calculated in S605 has been obtained for all pixels. If the depth value is obtained for all the pixels, the process proceeds to step S607 to execute the output process, and if there is a pixel for which the depth value is not obtained, the process proceeds to step S604 to obtain the depth value for the ancestor. In step S604, the multi-viewpoint image is divided into block regions of an arbitrary size, and pattern matching for searching for the corresponding region in block units is performed to obtain a pixel (corresponding pixel) corresponding to the target pixel from the target image.

次にステップS605において、注目画素とS604で求めた対応画素を基に注目画素に対応する奥行値dを求める。図7を参照すると理解できるように、奥行値dは、α、β、bを基に以下の式で表される。ここで、αはカメラユニット105の水平画角、基準画像の撮像位置および注目画素の座標から算出される。βはカメラユニット107の水平画角、対象画像の撮像位置および対象画素の座標から算出される。bはカメラユニット105および107間の距離であり、基準画像および対象画像の撮像位置より算出される。またx、zはそれぞれ、水平方向、奥行方向を示す軸である。   Next, in step S605, a depth value d corresponding to the target pixel is obtained based on the target pixel and the corresponding pixel obtained in S604. As can be understood with reference to FIG. 7, the depth value d is expressed by the following expression based on α, β, and b. Here, α is calculated from the horizontal angle of view of the camera unit 105, the imaging position of the reference image, and the coordinates of the target pixel. β is calculated from the horizontal angle of view of the camera unit 107, the imaging position of the target image, and the coordinates of the target pixel. b is the distance between the camera units 105 and 107, and is calculated from the imaging position of the reference image and the target image. X and z are axes indicating the horizontal direction and the depth direction, respectively.

Figure 2013175821
Figure 2013175821

ステップS606において、注目画素を更新しS603へ戻り、同様の処理を実行する。ステップS603で全ての画素につき奥行値が求められたと判断されると、ステップS607において、各画素値を基準画像の奥行値とする奥行マップを出力する。   In step S606, the target pixel is updated, and the process returns to S603 to execute the same processing. If it is determined in step S603 that the depth value has been obtained for all the pixels, a depth map having each pixel value as the depth value of the reference image is output in step S607.

<中間視点画像の生成数算出>
図4のステップS404の中間視点画像の生成数算出について説明する。本実施例における中間視点画像の生成数算出は、ステップS403で生成した奥行マップから奥行範囲を求め、算出した奥行範囲に基づいて行う。奥行範囲が大きい画像は視差が大きいため、その分中間視点画像を密に生成しなければ精度の高いボケの再現ができない。逆に奥行範囲が小さい画像は視差が小さいため、中間視点画像は少なくてよい。以下、図8に示すフローチャートを参照して、被写体の奥行の程度を示す奥行範囲を算出し、中間視点画像の生成数算出を説明する。
<Calculation of the number of intermediate viewpoint images generated>
The calculation of the number of intermediate viewpoint images generated in step S404 in FIG. 4 will be described. The number of intermediate viewpoint images generated in the present embodiment is calculated based on the depth range obtained from the depth map generated in step S403. Since an image with a large depth range has a large parallax, it is impossible to reproduce blur with high accuracy unless the intermediate viewpoint images are generated densely. Conversely, an image with a small depth range has a small parallax, so that there are fewer intermediate viewpoint images. Hereinafter, with reference to the flowchart shown in FIG. 8, the depth range indicating the depth of the subject is calculated, and calculation of the number of intermediate viewpoint images generated will be described.

本実施形態では、撮像装置101の中央のカメラユニット106で撮像された画像と、右中央のカメラユニット107で撮像された画像を例に、図9を参照して説明する。本実施形態では、奥行範囲として撮像装置から被写体までの最大の距離と最小の拒理戸に基づき以下のように算出される奥行範囲Dを使用するが、これに限られない。図9において、bは多視点画像間の距離、wは水平画素数、θwは水平画角、dは奥行値を表している。まず、ステップS801で、奥行マップを入力する。次に、ステップS802で、ステップS801にて入力した奥行マップに対して、奥行マップの各画素(i,j)の画素値を距離値d(i,j)とし、最小距離値dmin及び最大距離値dmaxを算出する。そして、ステップS803では、ステップS802において、算出した最小距離値dminと最大距離値dmaxを基に多視点画像間に何画素の視差があるかをシフト量として算出する。dminとなる被写体、すなわちシーン内において最も手前にある被写体のシフト量S minは次式にて求めることができる。 In the present embodiment, an example of an image captured by the center camera unit 106 of the image capturing apparatus 101 and an image captured by the right center camera unit 107 will be described with reference to FIG. In the present embodiment, the depth range D calculated as follows based on the maximum distance from the imaging device to the subject and the minimum rejection door is used as the depth range, but the present invention is not limited to this. In FIG. 9, b represents a distance between multi-viewpoint images, w represents the number of horizontal pixels, θ w represents a horizontal angle of view, and d represents a depth value. First, in step S801, a depth map is input. Next, in step S802, with respect to the depth map input in step S801, the pixel value of each pixel (i, j) of the depth map is set as the distance value d (i, j), and the minimum distance value dmin and the maximum A distance value d max is calculated. In step S803, in step S802, the calculating the how many pixels disparity between multi-viewpoint images the calculated minimum distance value d min and the maximum distance value d max based on the shift amount. The shift amount S min of the subject that is d min , that is, the subject that is closest to the scene can be obtained by the following equation.

Figure 2013175821
Figure 2013175821

同様にdmaxとなる被写体、すなわちシーン内において最も奥にある被写体のシフト量S maxは次式にて求めることができる。 Similarly, the shift amount S max of the subject that is d max , that is, the subject that is the deepest in the scene can be obtained by the following equation.

Figure 2013175821
Figure 2013175821

したがって、次式によりS minとS maxから奥行範囲D[pix]を算出する。 Therefore, the depth range D [pix] is calculated from S min and S max by the following equation.

Figure 2013175821
Figure 2013175821

本実施例では、この奥行範囲D[pix]を切り上げた整数値を中間視点画像の生成数とする。本実施例では、水平方向に並んだカメラユニット106および107で撮像された多視点画像を例に中間視点画像の生成数の算出を行った。しかし、垂直方向に並んだ場合は、式(2)および(3)において、水平画素数wを垂直画素数h、水平画角θwを垂直画角θhに置き換えることにより同様に奥行範囲D[pix]を計算して中間視点画像の生成数を得ることができる。 In the present embodiment, an integer value obtained by rounding up the depth range D [pix] is set as the number of intermediate viewpoint images to be generated. In the present embodiment, the number of intermediate viewpoint images generated is calculated using multi-viewpoint images captured by the camera units 106 and 107 arranged in the horizontal direction as an example. However, if arranged in the vertical direction, in the formula (2) and (3), likewise depth range D by replacing the number of vertical pixels the number of horizontal pixels w h, the horizontal angle theta w in the vertical angle theta h The number of intermediate viewpoint images generated can be obtained by calculating [pix].

図10に、奥行範囲と中間視点画像の生成数との関係をグラフを用いて示す。図10において、実線で描かれた四角形は多視点画像を表し、点線で描かれた円は中間視点画像を表している。すなわち、元の多視点画像でカバーできない部分を、点線で描いた中間視点画像で補完していくというイメージとなり、(b)よりも(C)の方が中間視点画像を多く使用するので、より緻密に補完が可能となり滑らかなボケを再現することができる。またグラフの横軸は奥行範囲を表し、縦軸は中間視点画像の生成数を表しており、奥行範囲が広いほど中間支店画像の生成数を増加させることが理解できる。   FIG. 10 is a graph showing the relationship between the depth range and the number of intermediate viewpoint images generated. In FIG. 10, a rectangle drawn with a solid line represents a multi-viewpoint image, and a circle drawn with a dotted line represents an intermediate viewpoint image. In other words, the portion that cannot be covered by the original multi-viewpoint image is complemented by the intermediate viewpoint image drawn with a dotted line, and (C) uses more intermediate viewpoint images than (b). Complementation is possible precisely and smooth blur can be reproduced. Further, the horizontal axis of the graph represents the depth range, and the vertical axis represents the number of intermediate viewpoint images generated. It can be understood that the number of intermediate branch images generated increases as the depth range increases.

したがって、本実施例では、図10に示すグラフの(b)、(c)に示すように奥行範囲Dが広い程中間視点画像の生成数を多くするので、画像(B)、(C)に示すように奥行範囲Dが広い程より蜜に中間視点画像データが生成される。ここでは図10(b)、(c)を例に、それぞれ3および5としたが、中間視点画像の生成数はこれらに限定されない。   Therefore, in this embodiment, as the depth range D is wider as shown in (b) and (c) of the graph shown in FIG. As shown in the drawing, the intermediate viewpoint image data is generated more deeply as the depth range D is wider. Here, taking FIG. 10B and FIG. 10C as examples, the number of intermediate viewpoint images is not limited to these.

一方、図10(a)に示すように、奥行範囲Dが限りなく狭い場合には中間視点画像は必要ない。以上より、奥行範囲Dに応じて中間視点画像の生成数を算出することで必要な分だけ中間視点画像データを生成すればいいので、計算コストを最小限に抑えることができる。本実施例では、奥行範囲Dと中間視点画像の生成数の関係が線形且つ単調増加となる場合、すなわち図10のグラフが右肩上がりの直線となる場合を説明したが、単調増加であればよいため、必ずしも線形である必要はなく非線形でもよい。   On the other hand, as shown in FIG. 10A, when the depth range D is as narrow as possible, an intermediate viewpoint image is not necessary. As described above, since the intermediate viewpoint image data has only to be generated by calculating the number of intermediate viewpoint images generated according to the depth range D, the calculation cost can be minimized. In the present embodiment, the case where the relationship between the depth range D and the number of intermediate viewpoint images generated is linear and monotonically increasing, that is, the case where the graph of FIG. Therefore, it is not always necessary to be linear, and may be nonlinear.

<画像合成>
図4のステップS408の画像合成について詳細に説明する。図11は、合成処理の流れを示すフローチャートである。また、図12は、ピント位置及びシフト量の概要を示す図である。まず、ステップS1101では、ステップS402において作成した多視点画像データと、ステップS405において成した中間視点画像データを入力する。ステップS1102では、ステップS407において設定したピント位置306に基づいて、図12(a)に示すようにユーザによって指示されたピント位置502を取得する。図5で指定されたピント位置502は、図12では、ピント位置1211および1212に対応する。ステップS1103では、ステップS1102にて取得したピント位置に基づいて、図12(b)に示すような各多視点画像及び中間視点画像間のピント位置1211および1212間のシフト量Δxi、Δyiを次式にて算出する。
<Image composition>
The image composition in step S408 in FIG. 4 will be described in detail. FIG. 11 is a flowchart showing the flow of the composition process. FIG. 12 is a diagram showing an outline of the focus position and the shift amount. First, in step S1101, the multi-viewpoint image data created in step S402 and the intermediate viewpoint image data formed in step S405 are input. In step S1102, based on the focus position 306 set in step S407, the focus position 502 instructed by the user is acquired as shown in FIG. The focus position 502 specified in FIG. 5 corresponds to the focus positions 1211 and 1212 in FIG. In step S1103, based on the focus position acquired in step S1102, shift amounts Δx i and Δy i between the focus positions 1211 and 1212 between the multi-viewpoint images and intermediate viewpoint images as shown in FIG. Calculate with the following formula.

Figure 2013175821
Figure 2013175821

Figure 2013175821
Figure 2013175821

ここで、bmおよびcmは、それぞれ多視点画像および中間視点画像間の水平距離、垂直距離、dは奥行値、θwは水平画角、θhは垂直画角、wは水平画素数、hは垂直画素数を表している。ステップS1104では、ステップS407にて設定したボケの大きさの制御値に基づいて、重み係数を算出する。 Here, b m and c m is the horizontal distance between the multi-view image and the intermediate-viewpoint images respectively, the vertical distance, d is the depth value, theta w horizontal field angle, theta h is the vertical field angle, w is the number of horizontal pixels , H represents the number of vertical pixels. In step S1104, a weighting factor is calculated based on the blur size control value set in step S407.

一般的に、多視点カメラにおいて撮影した画像は、カメラ間の距離が大きいほど視差が大きくなる。あるピント位置において画像を正確に合わせるとき、多視点画像と中間視点画像間のシフト量Δxi、Δyiを基に画像をシフトさせる。このとき、ピント位置以外では、ずれて重なる。その結果、ずれた画像を重ね合わせた場合、「ボケ」となる。そこで、合成の基準とするカメラ(以下、合成基準カメラ)と、どの程度はなれたカメラで取得した画像を、どの程度合成するかによってボケを制御することができる。すなわち、ボケの制御値として、合成基準カメラから離れたカメラの合成基準カメラとの距離に応じた重み係数を考慮して合成することで、ボケの大きさの制御が可能となる。 In general, the parallax of an image captured by a multi-view camera increases as the distance between the cameras increases. When the images are accurately aligned at a certain focus position, the images are shifted based on the shift amounts Δx i and Δy i between the multi-viewpoint image and the intermediate viewpoint image. At this time, they overlap and deviate except at the focus position. As a result, when the shifted images are superimposed, the result is “blurred”. Therefore, it is possible to control the blur depending on how much an image acquired by a camera used as a reference for synthesis (hereinafter referred to as a “composite reference camera”) and an image obtained by a camera that is far apart are synthesized. That is, the blur size can be controlled by combining the blur control values in consideration of the weighting factor corresponding to the distance between the camera that is far from the synthesis reference camera and the synthesis reference camera.

図13は、ボケの大きさの制御値に対応する重み係数wkの一例である。本実施例の重み係数wkは、合成基準カメラを中心としたガウス関数に従った値を持っている。合成基準カメラに近いほど、図13に示すように重み係数wkは大きくなり、合成基準カメラから離れるほど重み係数wkは小さくなる。ここで、多視点画像データと中間視点画像データとを合成して合成画像データを生成する際、重み係数wkの和が1に正規化されるように、各画像の重み係数wkを全画像の重み係数wkの総和で割る。最後に、ステップS1105では、ステップS1103にて、算出した各多視点画像及び中間画像間のピント位置のシフト量Δxi、Δyiと撮影モードとボケの大きさの制御値に応じた重み係数wkを用いて、合成画像I(x,y)は次式によって算出される。 FIG. 13 is an example of the weighting factor w k corresponding to the control value of the blur size. The weighting factor w k of the present embodiment has a value according to a Gaussian function centered on the synthesis reference camera. As shown in FIG. 13, the weight coefficient w k increases as the distance from the synthesis reference camera increases, and the weight coefficient w k decreases as the distance from the synthesis reference camera increases. Here, when the multi-view image data and the intermediate-viewpoint image data are synthesized to generate synthesized image data, so that the sum of the weighting factor w k is normalized to 1, the weighting factor w k of each image all Divide by the sum of the image weighting factors w k . Finally, in step S1105, the weighting coefficient w according to the control values of the focus position shift amounts Δx i , Δy i between the multi-viewpoint images and the intermediate images calculated in step S1103 and the shooting mode and the blur size. Using k , the composite image I (x, y) is calculated by the following equation.

Figure 2013175821
Figure 2013175821

ここで、Jiは、多視点画像及び中間視点画像、Dは多視点画像及び中間視点画像の中央画像からの距離、mは多視点画像及び中間視点画像の総数である。尚、本実施例ではシーン全体の奥行マップから中間視点画像の生成数を算出したが、シーン内の領域ごとに中間視点画像の生成数を算出してもよい。 Here, J i is a multi-view image and intermediate viewpoint image, D is the distance from the central image of the multi-view image and intermediate viewpoint image, and m is the total number of multi-view images and intermediate viewpoint images. In this embodiment, the number of intermediate viewpoint images generated is calculated from the depth map of the entire scene. However, the number of intermediate viewpoint images generated may be calculated for each region in the scene.

以上により、本発明は奥行マップの奥行範囲に応じて、中間視点画像の生成数を算出し、その値に応じた中間視点画像データの生成を行う。これにより、余計な中間視点画像データを生成せずに演算コストを抑えることができる撮像装置を提供する。   As described above, the present invention calculates the number of intermediate viewpoint images generated according to the depth range of the depth map, and generates intermediate viewpoint image data according to the value. This provides an imaging apparatus that can reduce the calculation cost without generating extra intermediate viewpoint image data.

[実施例2]
実施例1では、画像解析部303において多視点画像をもとに生成した奥行マップから奥行範囲を算出し、算出された値に応じて中間視点画像の生成数を算出する方法について説明した。本実施例においては、画像解析部303において多視点画像間の類似度をもとに中間視点画像の生成数を算出する。
[Example 2]
In the first embodiment, the method of calculating the depth range from the depth map generated based on the multi-viewpoint image in the image analysis unit 303 and calculating the number of intermediate viewpoint images generated according to the calculated value has been described. In this embodiment, the image analysis unit 303 calculates the number of intermediate viewpoint images generated based on the similarity between multi-viewpoint images.

本実施例における画像処理部の内部構成は実施例1と同じである。本実施例の撮像装置の処理の流れを図14に示す。ステップS1401、S1402、S1405〜S1409はそれぞれ実施例1で説明した図4のステップS401、ステップS402、ステップS405〜ステップS409と同様の処理である。すなわち、ステップS1403および1404が実施例1と異なる。ステップS1403では、ステップS1402で生成された多視点画像から画像間の類似度を算出する。ステップS1404では、ステップS1403で算出した類似度をもとに中間視点画像の生成数を算出する。   The internal configuration of the image processing unit in the present embodiment is the same as that in the first embodiment. FIG. 14 shows the flow of processing of the image pickup apparatus of the present embodiment. Steps S1401, S1402, and S1405 to S1409 are the same processes as steps S401, S402, and S405 to S409 of FIG. 4 described in the first embodiment. That is, steps S1403 and 1404 are different from the first embodiment. In step S1403, the similarity between images is calculated from the multi-viewpoint image generated in step S1402. In step S1404, the number of intermediate viewpoint images generated is calculated based on the similarity calculated in step S1403.

<画像間の類似度算出>
本実施例における画像間の類似度の算出方法について以下に説明する。本実施例における画像間の類似度の算出は、多視点画像を用いて行う。以下、図15に示すフローチャートを参照して、画像間の類似度の算出方法を説明する。
<Calculation of similarity between images>
A method for calculating the similarity between images in this embodiment will be described below. In this embodiment, the similarity between images is calculated using multi-viewpoint images. Hereinafter, a method for calculating the similarity between images will be described with reference to the flowchart shown in FIG.

まずステップS1501において、多視点画像から、処理に使用する2画像を選択する。ただし、これら2画像内に同一被写体が写っているものとする。本実施例では撮像装置101の中央のカメラユニット106で撮像された画像と、それと横方向に隣接するカメラユニット107で撮像された画像とを例に説明する。以下、前者を基準画像、後者を対象画像とする。   First, in step S1501, two images used for processing are selected from the multi-viewpoint images. However, it is assumed that the same subject appears in these two images. In the present exemplary embodiment, an image captured by the camera unit 106 at the center of the image capturing apparatus 101 and an image captured by the camera unit 107 that is adjacent thereto in the horizontal direction will be described as an example. Hereinafter, the former is a reference image and the latter is a target image.

ステップS1502において、基準画像I(x,y)と対象画像J(x,y)の全画素について、同一画素の画素値の差分値Kを次式にて算出する。   In step S1502, a difference value K of pixel values of the same pixel is calculated by the following equation for all pixels of the reference image I (x, y) and the target image J (x, y).

Figure 2013175821
Figure 2013175821

ステップS1503において、基準画像I(x,y)と対象画像J(x,y)との類似度を算出する。類似度の算出方法には本技術分野で知られたいずれの方法も利用することができる。例えば、PSNR、相関係数、平均二乗誤差などが適用可能である。本実施例では、PSNRを類似度とする。PSNRは、次式によって算出される。   In step S1503, the similarity between the reference image I (x, y) and the target image J (x, y) is calculated. Any method known in this technical field can be used as a method for calculating the similarity. For example, PSNR, correlation coefficient, mean square error, etc. can be applied. In this embodiment, PSNR is set as the similarity. PSNR is calculated by the following equation.

Figure 2013175821
Figure 2013175821

Figure 2013175821
Figure 2013175821

ここで、MAXは基準画像がとりうる最大画素値であり、MSEは平均二乗誤差である。またm、nが基準画像の縦、横のサイズである。   Here, MAX is the maximum pixel value that the reference image can take, and MSE is the mean square error. M and n are the vertical and horizontal sizes of the reference image.

<中間視点画像の生成数算出>
本実施例における中間視点画像の生成数算出について説明する。本実施例では、画像間の類似度に基づいて中間視点画像の生成数を算出する。
<Calculation of the number of intermediate viewpoint images generated>
Calculation of the number of intermediate viewpoint images generated in the present embodiment will be described. In this embodiment, the number of intermediate viewpoint images generated is calculated based on the similarity between images.

図16は、中間視点画像の生成数算出を説明するための画像である。図16において、実線で描かれた四角形は多視点画像を表し、点線で描かれた円は中間視点画像を表している。また、グラフの横軸は類似度(PSNR)を表し、縦軸は中間視点画像の生成数を表している。類似度が小さい場合、多視点画像間において差異が大きいため、類似度が大きい場合に比べて中間視点画像を密に生成する必要がある。例えば、PSNRが20、30の場合、図16(a)(b)に示すように類似度が低いほど中間視点画像が多く必要となり、図16(A)、(B)に示すようにより多くの中間視点画像でより密に処理される。   FIG. 16 is an image for explaining calculation of the number of intermediate viewpoint images generated. In FIG. 16, a square drawn with a solid line represents a multi-viewpoint image, and a circle drawn with a dotted line represents an intermediate viewpoint image. The horizontal axis of the graph represents similarity (PSNR), and the vertical axis represents the number of intermediate viewpoint images generated. When the degree of similarity is small, there is a large difference between the multi-viewpoint images, so it is necessary to generate intermediate viewpoint images more densely than when the degree of similarity is large. For example, when the PSNR is 20 or 30, as the similarity is lower as shown in FIGS. 16 (a) and 16 (b), more intermediate viewpoint images are required, and as shown in FIGS. 16 (A) and 16 (B), more intermediate viewpoint images are required. The intermediate viewpoint image is processed more densely.

これに対し、類似度が大きい場合、多視点画像間における差異が小さいため、作成する中間視点位置としては均一であって、それほど密である必要はない。例えば、PSNRが50の場合、類似度は非常に高いため、図16(c)に示すように中間視点画像はなく、図16(C)に示すように元の多視点画像のみとなる。本実施例では、多視点画像間の類似度と中間視点画像の生成数の関係が線形且つ単調増加となる場合、すなわち図16のグラフが右肩下がりの直線となる場合を説明したが、単調増加であればよいため、必ずしも線形である必要はなく非線形でもよい。   On the other hand, when the degree of similarity is large, the difference between the multi-viewpoint images is small, so that the intermediate viewpoint position to be created is uniform and does not need to be so dense. For example, when the PSNR is 50, the similarity is very high, so there is no intermediate viewpoint image as shown in FIG. 16C, and only the original multi-view image as shown in FIG. 16C. In the present embodiment, the case where the relationship between the similarity between the multi-viewpoint images and the number of intermediate viewpoint images generated is linear and monotonically increasing, that is, the case where the graph of FIG. Since it only needs to increase, it does not necessarily need to be linear and may be non-linear.

尚、本実施例ではシーン全体の類似度から中間視点画像の生成数を算出したが、シーン内の領域ごとに中間視点画像の生成数を算出してもよい。   In this embodiment, the number of intermediate viewpoint images generated is calculated from the similarity of the entire scene. However, the number of intermediate viewpoint images generated may be calculated for each region in the scene.

以上により、本発明は画像間の類似度に応じて、中間視点画像の生成数を算出し、その値に応じた中間視点画像の生成を行う。これにより、余計な中間視点画像を生成せずに演算コストを抑えることができる撮像装置を提供する。   As described above, the present invention calculates the number of intermediate viewpoint images generated according to the similarity between the images, and generates an intermediate viewpoint image according to the value. This provides an imaging apparatus that can reduce the calculation cost without generating an extra intermediate viewpoint image.

[実施例3]
本実施例では、画像解析部303において多視点画像データを周波数解析して得られる周波数成分をもとに中間視点画像の生成数を算出する。本実施例における画像処理部の内部構成は実施例1、2と同じである。本実施例の撮像装置の処理の流れを図17に示す。
[Example 3]
In this embodiment, the number of intermediate viewpoint images generated is calculated based on frequency components obtained by frequency analysis of multi-viewpoint image data in the image analysis unit 303. The internal configuration of the image processing unit in the present embodiment is the same as in the first and second embodiments. FIG. 17 shows a processing flow of the imaging apparatus of the present embodiment.

ステップS1701、S1702、S1705〜S1709はそれぞれ実施例1で説明した図4のステップS401、ステップS402、ステップS405〜ステップS409と同様の処理である。すなわち、ステップS1703および1704が実施例1と異なる。ステップS1703では、ステップS1702で生成された多視点画像データを周波数解析し、空間周波数領域に変換する。ステップS1704では、ステップS1703で変換した空間周波数領域の空間周波数成分に応じて中間視点画像の生成数を算出する。   Steps S1701, S1702, and S1705 to S1709 are the same as steps S401, S402, and S405 to S409 of FIG. 4 described in the first embodiment. That is, steps S1703 and 1704 are different from the first embodiment. In step S1703, the multi-viewpoint image data generated in step S1702 is frequency-analyzed and converted into a spatial frequency domain. In step S1704, the number of intermediate viewpoint images generated is calculated according to the spatial frequency component of the spatial frequency domain converted in step S1703.

<画像の周波数解析>
ここでは、本実施例における画像の周波数解析について説明する。以下、図18に示すフローチャートを参照して、画像データの周波数解析を説明する。
<Frequency analysis of images>
Here, the frequency analysis of the image in a present Example is demonstrated. Hereinafter, frequency analysis of image data will be described with reference to the flowchart shown in FIG.

まずステップS1801において、多視点画像データを順に空間周波数領域へ変換する。ここで空間周波数領域とは、画像データを正弦波に分解して周波数ごとに並び変えたものである。   First, in step S1801, multi-viewpoint image data is sequentially converted to the spatial frequency domain. Here, the spatial frequency region is obtained by decomposing image data into sine waves and rearranging them for each frequency.

次にステップS1802において、画像データの周波数特性を算出する。画像データを空間周波数領域へ変換すると、その画像の性質に応じて周波数成分が得られる。全体的に濃淡変化の少ない画像の場合、低周波成分が多く含まれ(図19の曲線(a))、変化の大きい領域を含む画像の場合、高周波成分が多く含まれる(図19の曲線(b))。本来、画像データの場合は水平方向および垂直方向の成分が存在するが、ここでは単純に両方の周波数成分の和を1つの周波数成分としており、横軸を周波数成分、縦軸を各周波数成分が持つエネルギー値としている。   In step S1802, the frequency characteristics of the image data are calculated. When image data is converted to the spatial frequency domain, frequency components are obtained according to the properties of the image. In the case of an image having a small overall change in shading, many low-frequency components are included (curve (a) in FIG. 19), and in the case of an image including a region with a large change, many high-frequency components are included (curve in FIG. b)). Originally, in the case of image data, there are horizontal and vertical components, but here the sum of both frequency components is simply one frequency component, with the horizontal axis representing the frequency component and the vertical axis representing each frequency component. It has energy value.

<中間視点画像の生成数算出>
本実施例における中間視点画像の生成数算出について説明する。図20は、中間視点画像の生成数算出を説明するための画像である。本実施例における中間視点画像の生成数算出は、画像を周波数解析し、その結果得られた周波数成分に基づいて行う。高周波成分を多く含む画像は複雑なシーンであるため、中間視点画像データは密に生成する必要がある。逆に高周波成分をあまり含まない場合は単調なシーンであるため、中間視点画像は少なくてよい。つまり、周波数成分の内、高周波成分をどれだけ含むかによって中間視点画像の生成数を決定することができる。
<Calculation of the number of intermediate viewpoint images generated>
Calculation of the number of intermediate viewpoint images generated in the present embodiment will be described. FIG. 20 is an image for explaining the calculation of the number of intermediate viewpoint images generated. The calculation of the number of intermediate viewpoint images generated in the present embodiment is performed based on the frequency component obtained by frequency analysis of the image. Since an image containing many high-frequency components is a complex scene, intermediate viewpoint image data must be generated densely. On the contrary, when the high frequency component is not included so much, it is a monotonous scene, so that the intermediate viewpoint image may be small. That is, the number of intermediate viewpoint images to be generated can be determined depending on how many high frequency components are included in the frequency components.

図20に、本実施例の高周波成分と中間視点画像の生成数の関係をグラフで表した例を示す。図20において実線で描かれた四角形は多視点画像を表し、点線で描かれた円は中間視点画像を表している。また、グラフの横軸は周波数成分を表し、縦軸は中間視点画像の生成数を表している。図20(a)のように各多視点画像データの高周波成分がほとんどない場合は、図20(A)に示すように中間視点画像データを生成しなくてもよい。一方、図20(b)、(c)のように各多視点画像データが高周波成分を多く含むほど、図20(B)、(C)に示すように中間視点画像データを多く生成する必要がある。   FIG. 20 shows an example of a graph representing the relationship between the high-frequency component and the number of intermediate viewpoint images generated in this embodiment. In FIG. 20, a square drawn with a solid line represents a multi-viewpoint image, and a circle drawn with a dotted line represents an intermediate viewpoint image. The horizontal axis of the graph represents frequency components, and the vertical axis represents the number of intermediate viewpoint images generated. When there is almost no high-frequency component of each multi-viewpoint image data as shown in FIG. 20A, intermediate viewpoint image data need not be generated as shown in FIG. On the other hand, as the multi-viewpoint image data includes more high-frequency components as shown in FIGS. 20B and 20C, it is necessary to generate more intermediate viewpoint image data as shown in FIGS. 20B and 20C. is there.

本実施例では、周波数成分と中間視点画像の生成数の関係が線形且つ単調増加の場合、すなわち図20のグラフが右肩上がりの直線となる場合を説明したが、単調増加であればよいため、必ずしも線形である必要はなく非線形でもよい。尚、本実施例ではシーン全体の周波数成分の内、高周波成分に基づいて中間視点画像の生成数を算出したが、シーン内の領域ごとに中間視点画像の生成数を算出してもよい。   In the present embodiment, the case where the relationship between the frequency component and the number of intermediate viewpoint images generated is linear and monotonically increasing, that is, the case where the graph of FIG. However, it is not necessarily linear and may be non-linear. In this embodiment, the number of intermediate viewpoint images generated is calculated based on the high-frequency component of the frequency components of the entire scene. However, the number of intermediate viewpoint images generated may be calculated for each region in the scene.

以上により、本発明は画像データの周波数成分に応じて、中間視点画像の生成数を算出し、その値に応じた中間視点画像の生成を行う。これにより、余計な中間視点画像データを生成せずに演算コストを抑えることができる撮像装置を提供する。   As described above, the present invention calculates the number of intermediate viewpoint images generated according to the frequency component of the image data, and generates an intermediate viewpoint image according to the value. This provides an imaging apparatus that can reduce the calculation cost without generating extra intermediate viewpoint image data.

[その他の実施例]
実施例1ないし3において多視点画像もしくは多視点画像間の特徴量に基づいて中間視点画像の生成数を算出したが、これらの実施例を任意に組み合わせて用いてもよい。また、PCなどで処理しても良い。
[Other Examples]
In the first to third embodiments, the number of intermediate viewpoint images generated is calculated based on the multi-view images or the feature values between the multi-view images. However, these embodiments may be used in any combination. Moreover, you may process by PC etc.

また、本発明は、以下の処理を実行することによっても実現される。すなわち、上述した実施例の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。また、本発明は、複数のプロセッサが連携して処理を行うことによっても実現できるものである。   The present invention can also be realized by executing the following processing. That is, software (program) for realizing the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed. The present invention can also be realized by a plurality of processors cooperating to perform processing.

Claims (10)

複数の撮像部を有する撮像装置により取得された多視点画像データを入力する多視点画像入力手段と、
前記多視点画像の特徴量に応じて、予め定められた特性を満たす合成画像を得るために生成が必要な中間視点画像の生成数を算出する中間視点画像生成数算出手段と、
前記中間視点画像生成数算出手段にて算出された生成数の、前記多視点画像データの中間視点画像データを生成する中間視点画像生成手段と、
前記中間視点画像生成手段により生成された中間視点画像データを用いて合成画像データを生成する画像合成手段と
を有することを特徴とする画像処理装置。
Multi-viewpoint image input means for inputting multi-viewpoint image data acquired by an imaging device having a plurality of imaging units;
Intermediate viewpoint image generation number calculating means for calculating the number of intermediate viewpoint images that need to be generated in order to obtain a composite image that satisfies a predetermined characteristic according to the feature amount of the multi-viewpoint image;
Intermediate viewpoint image generation means for generating intermediate viewpoint image data of the multi-viewpoint image data, the number of generations calculated by the intermediate viewpoint image generation number calculation means;
An image processing apparatus comprising: image synthesis means for generating synthesized image data using the intermediate viewpoint image data generated by the intermediate viewpoint image generation means.
前記特徴量は、前記多視点画像から得られる被写体の奥行を示す奥行範囲であることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the feature amount is a depth range indicating a depth of a subject obtained from the multi-viewpoint image. 前記中間視点画像の生成数は、前記奥行範囲がより狭い中間視点位置における中間視点画像の生成数よりも多いことを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the number of intermediate viewpoint images generated is greater than the number of intermediate viewpoint images generated at an intermediate viewpoint position where the depth range is narrower. 前記特徴量は、前記多視点画像間の類似度であることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the feature amount is a similarity between the multi-viewpoint images. 前記中間視点画像の生成数は、前記類似度がより高い中間視点位置における中間視点画像の生成数より多いことを特徴とする請求項4に記載の画像処理装置。   The image processing apparatus according to claim 4, wherein the number of intermediate viewpoint images generated is greater than the number of intermediate viewpoint images generated at an intermediate viewpoint position having a higher similarity. 前記特徴量は前記多視点画像データを周波数解析して得られる周波数成分であることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the feature amount is a frequency component obtained by frequency analysis of the multi-viewpoint image data. 前記中間視点画像の生成数は、前記周波数成分が高周波成分をより含まない中間視点位置における中間視点画像の生成数よりも多いことを特徴とする請求項6に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the number of intermediate viewpoint images generated is greater than the number of intermediate viewpoint images generated at an intermediate viewpoint position at which the frequency component does not include a high frequency component. 前記予め定められた特性は、リフォーカス処理をする際の非ピント面のボケの精度であることを特徴とする請求項1乃至7のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the predetermined characteristic is an accuracy of blurring of a non-focus surface when performing a refocusing process. 複数の撮像部を有する撮像装置により取得された多視点画像データを入力する多視点画像入力工程と、
前記多視点画像の特徴量に応じて、予め定められた特性を満たす合成画像を得るために生成が必要な中間視点画像の生成数を算出する中間視点画像生成数算出工程と、
前記中間視点画像生成数算出工程にて算出された生成数の、前記多視点画像データの中間視点画像データを生成する中間視点画像生成工程と、
前記中間視点画像生成工程により生成された中間視点画像データを用いて合成画像データを生成する画像合成工程と
を有することを特徴とする画像処理方法。
A multi-viewpoint image input step of inputting multi-viewpoint image data acquired by an imaging device having a plurality of imaging units;
An intermediate viewpoint image generation number calculating step for calculating the number of intermediate viewpoint images that need to be generated in order to obtain a composite image satisfying a predetermined characteristic according to the feature amount of the multi-viewpoint image;
An intermediate viewpoint image generation step of generating intermediate viewpoint image data of the multi-viewpoint image data, the number of generations calculated in the intermediate viewpoint image generation number calculation step;
An image composition step of generating composite image data using the intermediate viewpoint image data generated by the intermediate viewpoint image generation step.
コンピュータを請求項1乃至8のいずれか1項に記載の画像処理装置として機能させるためのプログラム。   A program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 8.
JP2012037714A 2012-02-23 2012-02-23 Image processing device, image processing method, and program Pending JP2013175821A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012037714A JP2013175821A (en) 2012-02-23 2012-02-23 Image processing device, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012037714A JP2013175821A (en) 2012-02-23 2012-02-23 Image processing device, image processing method, and program

Publications (1)

Publication Number Publication Date
JP2013175821A true JP2013175821A (en) 2013-09-05

Family

ID=49268387

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012037714A Pending JP2013175821A (en) 2012-02-23 2012-02-23 Image processing device, image processing method, and program

Country Status (1)

Country Link
JP (1) JP2013175821A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016003930A (en) * 2014-06-16 2016-01-12 日本電信電話株式会社 Image processing apparatus, image processing method, and image processing program
WO2018186287A1 (en) * 2017-04-05 2018-10-11 シャープ株式会社 Picture data generation device, picture playback device, picture data generation method, control program, and recording medium
US10957021B2 (en) 2016-11-30 2021-03-23 Interdigital Ce Patent Holdings Method for rendering a final image from initial images acquired by a camera array, corresponding device, computer program product and computer-readable carrier medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016003930A (en) * 2014-06-16 2016-01-12 日本電信電話株式会社 Image processing apparatus, image processing method, and image processing program
US10957021B2 (en) 2016-11-30 2021-03-23 Interdigital Ce Patent Holdings Method for rendering a final image from initial images acquired by a camera array, corresponding device, computer program product and computer-readable carrier medium
WO2018186287A1 (en) * 2017-04-05 2018-10-11 シャープ株式会社 Picture data generation device, picture playback device, picture data generation method, control program, and recording medium
CN110476415A (en) * 2017-04-05 2019-11-19 夏普株式会社 Image data generating means, picture reproducer, image data generation method, control program and recording medium

Similar Documents

Publication Publication Date Title
JP6112824B2 (en) Image processing method and apparatus, and program.
JP5968107B2 (en) Image processing method, image processing apparatus, and program
JP5818514B2 (en) Image processing apparatus, image processing method, and program
JP6548367B2 (en) Image processing apparatus, imaging apparatus, image processing method and program
US8810672B2 (en) Image processing method, image processing device, and recording medium for synthesizing image data with different focus positions
JP5725953B2 (en) Imaging apparatus, control method therefor, and information processing apparatus
CN104980651A (en) Image processing apparatus and control method
JP5984493B2 (en) Image processing apparatus, image processing method, imaging apparatus, and program
JP2013009274A (en) Image processing device, image processing method, and program
JP5942195B2 (en) 3D image processing apparatus, 3D imaging apparatus, and 3D image processing method
US9332195B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP2015119395A (en) Information processor, information processing method, and program
JP2013061850A (en) Image processing apparatus and image processing method for noise reduction
JP2015073185A (en) Image processing device, image processing method and program
JP2012247356A (en) Imaging module, imaging apparatus, image processing apparatus, and image processing method
JP6021489B2 (en) Imaging apparatus, image processing apparatus and method thereof
JP5832211B2 (en) Image processing apparatus, image processing method, and program
JP2017060010A (en) Imaging device, method of controlling imaging device, and program
JP2009258005A (en) Three-dimensional measuring device and three-dimensional measuring method
JP2013247543A (en) Imaging device, display device, image processing method and program
JP2013175821A (en) Image processing device, image processing method, and program
JP6732440B2 (en) Image processing apparatus, image processing method, and program thereof
JP2013044597A (en) Image processing device and method, and program
JP5744642B2 (en) Image processing apparatus, image processing method, and program.
JP6320165B2 (en) Image processing apparatus, control method therefor, and program