JP2017163412A - Image processing system, its control method, imaging apparatus, and program - Google Patents
Image processing system, its control method, imaging apparatus, and program Download PDFInfo
- Publication number
- JP2017163412A JP2017163412A JP2016047321A JP2016047321A JP2017163412A JP 2017163412 A JP2017163412 A JP 2017163412A JP 2016047321 A JP2016047321 A JP 2016047321A JP 2016047321 A JP2016047321 A JP 2016047321A JP 2017163412 A JP2017163412 A JP 2017163412A
- Authority
- JP
- Japan
- Prior art keywords
- image
- display
- images
- subject
- image processing
- 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.)
- Granted
Links
Images
Landscapes
- Exposure Control For Cameras (AREA)
- Studio Devices (AREA)
Abstract
Description
本発明は、異なる合焦位置または絞り値で撮影された複数の画像から被写体全体に合焦した画像を生成する画像処理技術に関する。 The present invention relates to an image processing technique for generating an image focused on an entire subject from a plurality of images taken at different focus positions or aperture values.
デジタルカメラで近距離にある被写体を撮影する場合、被写界深度が浅くなると、被写体全体に合焦している画像を取得することが難しいという課題がある。そこで、被写体の合焦位置を変えて撮影した複数の画像を合成し、被写体全体に合焦している画像を生成する技術が特許文献1および特許文献2に開示されている。 When photographing a subject at a short distance with a digital camera, there is a problem that when the depth of field becomes shallow, it is difficult to acquire an image focused on the entire subject. Therefore, Patent Literature 1 and Patent Literature 2 disclose a technique in which a plurality of images captured by changing the focus position of a subject are combined to generate an image focused on the entire subject.
ところで、ユーザが上記技術を用いて生成された画像を視聴する環境は様々である。特定の表示装置の画面上で被写体全体に焦点が合っているように見える画像でも、別の表示装置の画面上では被写体の一部に焦点が合っていないという状況が起こりうる。一例として、デジタルカメラのEVF(電子ビューファインダ)やスマートフォン等の小型モニタでユーザが画像を視聴した場合、被写体全体に合焦しているように見える。しかし、ユーザがPC(パーソナルコンピュータ)のモニタや大画面テレビ等の大型モニタで画像を視聴した場合、被写体の一部が合焦していないことがある。 By the way, there are various environments in which a user views an image generated using the above technique. Even an image that appears to be in focus on the entire subject on the screen of a particular display device may cause a situation where some of the subject is not in focus on the screen of another display device. As an example, when a user views an image on a small monitor such as an EVF (electronic viewfinder) of a digital camera or a smartphone, it appears that the entire subject is in focus. However, when a user views an image on a large monitor such as a PC (personal computer) monitor or a large screen television, a part of the subject may not be in focus.
本発明の目的は、異なる合焦位置または絞り値で撮影された被写体の画像を、表示装置の表示能力に応じて処理して、被写体に焦点を合わせた画像を生成する画像処理装置およびその制御方法を提供することである。 An object of the present invention is to process an image of a subject photographed at different in-focus positions or aperture values according to the display capability of the display device, and generate an image focused on the subject, and control thereof Is to provide a method.
本発明の一実施形態に係る装置は、異なる合焦位置または絞り値で撮影された被写体に係る複数の画像を処理して前記被写体に焦点を合わせた合焦画像を生成する画像処理装置であって、前記複数の画像を取得する取得手段と、前記複数の画像から表示用の画像を生成する制御を行う制御手段と、前記制御手段の指示にしたがって前記表示用の画像を生成する生成手段と、前記生成手段により生成された前記表示用の画像を表示手段に出力する出力手段と、を有する。前記制御手段は、表示解像度または表示画面サイズが異なる前記表示手段ごとに前記複数の画像を合成した画像または前記複数の画像から選択した画像にしたがって前記生成手段により前記合焦画像を生成する制御を行う。 An apparatus according to an embodiment of the present invention is an image processing apparatus that processes a plurality of images related to a subject photographed at different focus positions or aperture values and generates a focused image focused on the subject. Acquisition means for acquiring the plurality of images, control means for performing control for generating a display image from the plurality of images, and generation means for generating the display image in accordance with instructions from the control means; Output means for outputting the display image generated by the generating means to the display means. The control means controls the generation means to generate the focused image according to an image obtained by combining the plurality of images or an image selected from the plurality of images for each of the display means having different display resolutions or display screen sizes. Do.
本発明によれば、異なる合焦位置または絞り値で撮影された被写体の画像を、表示装置の表示能力に応じて処理して、被写体に焦点を合わせた画像を生成する画像処理装置およびその制御方法を提供することができる。 According to the present invention, an image processing apparatus that processes images of a subject photographed at different in-focus positions or aperture values according to the display capability of the display device to generate an image focused on the subject, and control thereof A method can be provided.
以下、本発明の好適な実施形態について、図面を参照して説明する。なお、以下に説明する各実施形態では、画像処理装置をデジタルカメラに適用した例において、異なる合焦位置または絞り値で撮影した画像を用いて被写体全体に合焦した画像を生成する。生成された画像は、表示能力の異なる複数の表示装置に出力可能である。 Preferred embodiments of the present invention will be described below with reference to the drawings. In each embodiment described below, in an example in which the image processing apparatus is applied to a digital camera, an image focused on the entire subject is generated using images captured at different focus positions or aperture values. The generated image can be output to a plurality of display devices having different display capabilities.
[第1実施形態]
図1は、本発明の第1実施形態に係るデジタルカメラ100の機能構成を例示するブロック図である。各部は内部バス110を介して相互に通信する。
撮影光学系101は、被写体の光学像(被写体像)を撮像部102に結像する。撮像部102は、CCD(電荷結合素子)イメージセンサやCMOS(相補型金属酸化膜半導体)イメージセンサ等の撮像素子を備える。撮像素子は、撮影光学系101により結像された光学像を光電変換し、電気信号を出力する。撮像部102のA/D変換部は、得られたアナログ画像信号をデジタル画像データに変換処理し、RAM(ランダム・アクセス・メモリ)104に出力して記憶させる。RAM104は書き換え可能な揮発性メモリであり、デジタルカメラ100が備える各ブロックの動作において出力されたデータの一時的な記憶領域として用いられる。
[First Embodiment]
FIG. 1 is a block diagram illustrating a functional configuration of a
The photographing
制御部106は、例えばCPU(中央演算処理装置)を備える。制御部106は、デジタルカメラ100が備える各ブロックの動作プログラムをROM(リード・オンリ・メモリ)105から読み出し、RAM104に展開して実行する。これによりデジタルカメラ100が備える各ブロックの動作制御が行われる。ROM105は書き換え可能な不揮発性メモリであり、デジタルカメラ100が備える各ブロックの動作プログラムに加え、各ブロックの動作に必要なパラメータ等を記憶している。また、制御部106は撮影光学系101のフォーカスレンズの駆動制御を行い、フォーカスレンズ駆動量を指示することで、異なる合焦位置で被写体を撮影することが可能である。
The
画像処理部103は、RAM104に記憶されている画像データに対して、ホワイトバランス調整、色補間、縮小/拡大、フィルタリング等の様々な画像処理を行う。また画像処理部103は、後述する画像の合成処理を行う。記録部107は、RAM104に記憶されている画像データ(画像処理部103で処理された画像データ)を、記録画像や合成画像として記録媒体に記録する処理を行う。
The
表示部109は、例えばPCモニタ、テレビジョン装置、スマートフォン等の表示媒体である。通信部108は、HDMI(登録商標), High-Definition Multimedia Interface等のケーブルや無線通信装置を備え、RAM104に記憶されている表示用の画像データを表示部109に送信する。表示部109は受信した画像データにしたがって画像表示を行う。また通信部108は、表示部109から表示画面の解像度やサイズ(インチ数等)の情報を取得して、制御部106へ出力するインターフェース部を備える。
The
次に、図2から図5、図11を用いて本実施形態の動作について説明する。図2は本実施形態の処理を説明するフローチャートである。図3は、デジタルカメラ100によって撮影する被写体の構図を例示した模式図である。
Next, the operation of this embodiment will be described with reference to FIGS. 2 to 5 and FIG. FIG. 2 is a flowchart for explaining the processing of this embodiment. FIG. 3 is a schematic view illustrating the composition of a subject photographed by the
図3(A)は、撮影対象の被写体300として、主被写体301と、背景被写体302、303を示す。図3(B)は、各被写体を奥行き方向に表示した例310を示す。被写体311と301、被写体312と302、被写体313と303がそれぞれ同じ被写体である。図3(B)には奥行き方向にてデジタルカメラ314から各被写体までの距離(被写体距離)を示している。
FIG. 3A shows a
図3(B)では、デジタルカメラ314の位置を基準とする被写体距離として、被写体311が最も近く、その次に被写体312が位置し、被写体313が最も遠くに位置している。複数の合焦位置315、316を小三角形の記号でそれぞれ示す。主被写体311は位置317と位置318との間に存在する。つまり、位置317におけるDmsがデジタルカメラ314から主被写体311の前部までの距離を表し、位置318におけるDmeがデジタルカメラ314から主被写体311の後部までの距離を表している。主被写体311に関する距離情報319(主被写体距離範囲)をDmと表記すると、「Dm=Dme−Dms」である。
In FIG. 3B, the
図4は、表示装置に応じた合成比率を例示した図である。図4(A)は、高解像度モニタに画像を表示する際の合成比率400を示す。図4(B)は、低解像度モニタに画像を表示する際の合成比率410を示す。横軸はカメラから被写体までの距離(被写体距離)を表し、縦軸は合成比率を表す。
FIG. 4 is a diagram illustrating an example of the combination ratio according to the display device. FIG. 4A shows a
図4(A)において、各画像に対する合成比率401を台形状のグラフでそれぞれ示している。例えば、グラフの上辺部の合成比率の値は1.0であり、その左右の斜辺部では合成比率の値が1.0未満である。各画像の合焦位置を小三角形の記号で示す。黒塗された小三角形で示す合焦位置(例えば402、405)は、主被写体に焦点が合った画像の合焦位置を表す。また白塗された小三角形で示す合焦位置(例えば403)は、主被写体以外の対象に焦点を合わせたときの画像の合焦位置を表す。各合焦位置における被写界深度404を矩形領域でそれぞれ示す。図4(A)は、主被写体距離範囲に亘る7つの合成比率を例示する。
In FIG. 4A, the
図4(B)において、各画像に対する合成比率411を台形状のグラフでそれぞれ示している。小三角形の記号の意味は図4(A)の場合と同じである。黒塗の小三角形で示す合焦位置(412、416、417)は主被写体に焦点を合わせた画像の合焦位置を表す。白塗の小三角形で示す合焦位置(413)は主被写体以外の対象に焦点を合わせた画像の合焦位置を表す。各合焦位置における被写界深度414を矩形領域でそれぞれ示す。図4(B)は、主被写体距離範囲に亘る3つの合成比率を例示する。
In FIG. 4B, the
図5は、各合成比率の算出方法を示す図である。図5にて、横軸は被写体距離を表し、縦軸は合成比率を表す。合成比率のグラフ501において、Dpで示す合焦位置502を小三角形の記号で示している。合焦位置502に対する、前方被写界深度503をDfsと表記し、後方被写界深度504をDfeと表記し、被写界深度505をDfと表記する。台形状のグラフ501の区間506、507、508はそれぞれ、左側斜辺部、上辺部、右側斜辺部の区間に相当する。合成比率の値が最も大きい区間507の距離をDaと表記する。
FIG. 5 is a diagram illustrating a method for calculating each composition ratio. In FIG. 5, the horizontal axis represents the subject distance, and the vertical axis represents the composition ratio. In the
図11は主被写体距離の算出方法を説明する図である。図11は図3と同一の構図である。図11(A)は、後述する距離情報生成部が生成した距離情報1100を、グレースケールで示す。白から黒になるに連れて、カメラ位置を基準する距離が大きくなり、被写体が遠いことを示す。図11(B)は、距離情報1110において、後述する主被写体検出部が生成した主被写体検出領域1111を示す。図11(C)は、図11(A)の距離情報1100と図11(B)の距離情報1110との論理積を計算した結果を例示し、主被写体領域のみの距離情報1120を示している。図11(D)は、主被写体領域の距離情報をヒストグラム化したグラフ1130を示す。横軸は被写体距離を表し、縦軸は距離情報の頻度を表す。ヒストグラムの極小点近傍に囲まれたDmsからDmeまでの距離区間が主被写体距離範囲Dmである。
FIG. 11 is a diagram for explaining a method of calculating the main subject distance. FIG. 11 is the same composition as FIG. FIG. 11A shows
次に、図2のフローチャートに則って本実施形態の動作を説明する。以下の処理は制御部106のCPUがメモリから読み出して実行するプログラムにしたがって実現される。
S201で制御部106は、撮影光学系101の駆動制御を行い、可動レンズを移動させる。撮像部102は合焦位置の異なる複数の画像を取得し、記録部107は画像の記録処理を行う。なお、画像の取得方法としては、例えば単眼カメラにおいてフォーカスレンズの駆動制御を行い、合焦位置または絞り値を変更して複数の画像を取得する方法のみに限定されない。この他には、多眼カメラで同時に被写体を撮影する方法がある。合焦位置または絞り値の異なる複数の撮影光学系により結像される被写体の光学像から複数の画像を取得できる。またはライトフィールドカメラで撮影する方法がある。ライトフィールドカメラは、撮影光学系と撮像素子との間にマイクロレンズアレイが配置されている。撮像素子の複数の光電変換部に対して1つのマイクロレンズを対応させ、マイクロレンズを通過した光を複数の光電変換部に入射させることにより、光線の強度分布と入射方向の情報を取得できる。各光電変換部の出力信号は入射方向ごとに取得された情報を含み、当該情報を用いて距離情報が取得される。ライトフィールドデータの処理にて、マイクロレンズアレイのレンズ頂点面からの距離が異なる焦点面での像は、各マイクロレンズの光軸からの偏心量に対応した位置にある光電変換部の各出力を合成することで得られる。ライトフィールドデータに含まれる光線情報と方向情報を取得し、光線の並べ替えと計算処理を行うこと(再構成)により、任意の合焦位置での画像データを生成することができる。
Next, the operation of this embodiment will be described according to the flowchart of FIG. The following processing is realized according to a program that the CPU of the
In step S201, the
S202で通信部108は、表示部109の画面の解像度やサイズ等の情報を取得して、RAM104に記憶する。S203で制御部106は、主被写体の距離情報であるDmsとDmeを取得する処理を行う。主被写体の距離情報は、図11で説明した方法により算出することが可能である。距離情報生成部と主被写体検出部については、公知技術を適用すればよい。例えば、距離情報生成処理については特許文献3にて、瞳分割タイプの撮像素子を用いる方法が開示されている。具体的には、撮像部102内の撮像素子は、複数のマイクロレンズと各マイクロレンズが対応する複数の光電変換部を備えている。各光電変換部は、撮影光学系101の異なる瞳領域から到来する光束が生ずる複数の被写体像にそれぞれ対応する画素信号を出力する。複数の被写体像に対して像信号の相関演算処理が実行される。取得される画像は視点の異なる画像であり、複数の画像間の視差量を算出する処理が行われる。撮像素子の画素ピッチ(撮像素子を構成する画素部の画素間距離)と、一対の測距瞳を通過する光束の重心の開き角の大きさによって決まる変換係数を用いて、結像面に対するデフォーカス量、すなわち距離情報を算出することができる。被写体の距離情報は、画角内の距離分布の情報であって、画角内の被写体の深さに対応し、少なくとも深さの相対関係を表す情報である。瞳分割画像の視差から距離を算出する例に限定されることなく、例えばコントラストAF(オートフォーカス)評価値等を用いて距離情報を取得してもよい。また、次元として距離に換算されていなくても、例えば瞳分割画像の視差量の分布情報(視差マップ、像ずれマップ)やデフォーカス量の分布情報(デフォーカスマップ)の形態であっても被写体の深さ方向の相対関係はわかるため、本発明が適用可能である。本実施形態ではかかる分布情報を総括して被写体の距離情報と呼ぶことにする。
In step S <b> 202, the
一方、主被写体検出処理については特許文献4に開示された方法がある。この方法は撮影画像から色情報を取得し、それらのヒストグラムを所定の分布範囲に区分けし、その区域を一つの被写体として分類して被写体を検出する方法である。なお、本実施形態において主被写体の検出方法は特定の方法に限定されない。 On the other hand, there is a method disclosed in Patent Document 4 for the main subject detection process. In this method, color information is acquired from a photographed image, the histograms thereof are divided into predetermined distribution ranges, the areas are classified as one subject, and the subject is detected. In the present embodiment, the main subject detection method is not limited to a specific method.
S204で制御部106は、各合焦画像の合焦距離であるDpを算出する。具体的には、撮影時の測距枠と同一座標にある距離情報が合焦距離Dpとして算出される。なお、測距枠は複数の画素のブロックで形成される。このため、距離情報についても測距枠内に含まれる距離情報の平均値または最頻値を代表値として合焦距離Dpが決定される。
S205で主被写体全体に合焦しているか否かの判定処理である。これは、主被写体全体に合焦させる際、主被写体以外に合焦している画像を合成に使用しないようにするために行う判定処理である。制御部106は、各撮影画像の主被写体に合焦しているか否かを判定する。具体的には、S204で算出された各撮影画像の合焦距離Dpが、S203で算出された主被写体距離情報DmsとDmeとの間である場合、現在の画像において主被写体に合焦していると判定される。S205で、主被写体に合焦していると判定された場合、S206に処理を進める。また主被写体に合焦していないと判定された場合には、後述する合成比率の値を0に設定して、S204に戻る。
In S205, whether or not the entire main subject is in focus is determined. This is a determination process that is performed so that an image focused on other than the main subject is not used for synthesis when the entire main subject is focused. The
S206で制御部106は、各撮影画像(合焦画像)の被写界深度である前方被写界深度Dfsと後方被写界深度Dfeを算出する。被写界深度は下記式(1)および(2)を用いて算出される。
S207で制御部106は、合焦距離Dp、前方被写界深度Dfs、後方被写界深度Dfeを用いて、各画像に対する合成比率を算出する。図5に例示するように、合焦距離Dpを中心とした所定距離の区間507に対する合成比率の値は1.0である。区間507から被写体距離が離れる区間506、508では合成比率の値が減少する。具体例として、下記式(3)を用いて合成比率の値が算出される。画像内の各画素位置に対応する距離をdと表記し、n番目の合焦画像に対する合成比率をW(n,d)と表記する。図5で合成比率の値が1.0となる距離区間をDaとする。
if( d < Dfs) W(n,d) = 0
else if(d <(Dp-Da/2)) W(n,d)=k1 * d + B
else if(d < (Dp+Df/2) W(n,d)=1.0
else if(d<Dfe) W(n,d) =-k2 * d + C
else W(n,d)=0.0 ・・・(3)
if()内の不等式は条件式を示す。k1,k2は各区間506、508の傾き(係数)であり、B,Cはy切片である(合成比率の軸をy軸と定義する)。
In step S207, the
if (d <D fs ) W (n, d) = 0
else if (d <(D p -D a / 2)) W (n, d) = k1 * d + B
else if (d <(D p + D f / 2) W (n, d) = 1.0
else if (d <D fe ) W (n, d) = -k2 * d + C
else W (n, d) = 0.0 (3)
Inequalities in if () indicate conditional expressions. k1 and k2 are slopes (coefficients) of the
S208で制御部106は、S202で取得した情報を用いて表示部109の表示解像度(または表示画面サイズ)について判断する。合成処理後の画像を表示する表示部109にて高解像度の表示が可能である(または表示画面サイズが大きい)と判断された場合、S209へ進み、そうでない場合(低解像度の表示または表示画面サイズが小さい場合)にはS210に移行する。表示部109の解像度の判断処理にて制御部106は、撮影画像の画素数、表示部109の解像度であるPPI(Pixel Per Inch)、出力画素数と表示画素数との比を用いる。なお、PPIは対角画素数を対角のインチ数で除算した比である。一般的に、PPIが高い場合に高解像度の表示部と言えるが、出力画素数が表示部の画素数と異なると、表示部の画素数に合うように拡縮処理を行うか、画像の一部を表示する処理が行われることになる。このため、その表示のさせ方も考慮する必要がある。例えば、出力画素数に対して表示画素数が小さい場合、「表示画素数/出力画素数」分の縮小処理が行われて画像が表示されるので、縮小処理に伴う表示解像力の低下が発生する。そこで、本実施形態では、表示部のPPIに出力画素数と表示画素数との比を乗算した値を解像度と定義する。その値が所定の閾値以上である場合に制御部106は高解像度と判断し、所定の閾値より小さい場合には低解像度と判断する。図10を参照して具体例を説明する。
In step S208, the
図10は、様々な表示部の画面サイズと画素数の画像を、具体的な数字で示している。出力画像は図3に示す被写体300の画像と同一の構図の画像である。出力画像の画素数を水平方向にて4000画素であって垂直方向にて2000画素の、合計800万画素とする。各画像1000から1005の詳細は、下記表1のとおりである。
FIG. 10 shows images of screen sizes and pixel numbers of various display portions with specific numbers. The output image is an image having the same composition as the image of the subject 300 shown in FIG. The number of pixels in the output image is 4000 pixels in the horizontal direction and 2000 pixels in the vertical direction, for a total of 8 million pixels. Details of the
画像1000、1001は、出力画像(撮影画像)の解像度と表示部の解像度が同じであり、ピクセル等倍表示の画像である。画像1002、1003は、出力画像の解像度より表示部の解像度が低い全体縮小表示の画像である。さらに、画像1004、1005では、出力画像の解像度より表示部の解像度が低くても、ピクセル等倍表示が可能である。ただし、その際には画像の一部のみが表示されることになる。
The
表示部が画像1000を表示する場合の表示解像度は186であり、出力画素数と表示画素数が同一である。表示解像度に対して、出力画素数と表示画素数との比を乗算した値として定義される解像度は、186PPIのままである。同様の考え方により、画像1001を表示する際の解像度は、745PPIである。一方、画像1002を表示する場合、出力解像度は93であり、表示部の画素数(表示解像度46.5)に合わせて1/2の縮小処理が行われる。よって、定義された解像度は、93×(1/2)=46.5PPIとなる。画像1003を表示する場合、定義された解像度は、373×(1/2)=186.5PPIとなる。一方で、画像1004、1005のように、出力画素数が表示部の画素数より大きいが、ピクセル等倍で表示部が表示している場合、縮小処理は伴わず、定義された解像度はそれぞれ、93PPI、373PPIとなる。
When the display unit displays the
図2のS209で制御部106は、高解像度の表示部に画像を表示する場合の合成比率の制御を行う。高解像度の表示部では合焦の外れが目立ちやすいため、制御部106は被写体の合焦距離に極力近い領域のみを合成するように合成比率を変更する。具体的には、式(3)において、合成比率の値が1.0となる距離区間Da(図5)を狭くし、各区間の傾きk1およびk2が急峻になるように合成比率が制御される(図4(A)参照)。
In step S209 of FIG. 2, the
またS210で制御部106は、低解像度の表示部に画像を表示する場合の合成比率の制御を行う。低解像度の表示部では合焦の外れが目立ちにくいため、制御部106は被写体の合焦距離に近い領域だけでなく合焦距離から離れた領域を合成するように合成比率を変更する。具体的には、式(3)において、合成比率の値が1.0となる距離区間Daを広くし、各区間の傾きk1およびk2が緩やかになるように合成比率が制御される(図4(B)参照)。
In step S210, the
このような制御を行うと、図4(A)の合成比率400に示すように各画像の合成比率401の値が1.0となる区間は狭くなり、図4(B)の合成比率410に示すように各画像の合成比率411の値が1.0となる区間は広くなる。また、低解像度の表示部により画像を表示する際には、白塗の小三角形で示す位置415において、黒塗の小三角形で示す合焦位置416、417にそれぞれ対応するグラフの合成比率の値が共に0以上となるように設定される。つまり、合焦位置416に対応するグラフの右側斜辺部と合焦位置417に対応するグラフの左側斜辺部との交点の位置が、ほぼ位置415に一致し、当該位置で読み取れる合成比率の値は0より大きい(αと記す)。位置415に対応する撮像画像は、合成に使用しないように除外することができる。これが位置415を白塗の小三角形で示している理由である。なお、低解像度の表示部に出力する場合、主被写体領域を引き立たせるために背景領域を検出して、背景領域にぼけを付与する処理が行われる。背景をぼかす処理は制御部106の指示を受けて画像処理部103が行う。
When such control is performed, the interval where the value of the
図2のS209またはS210の処理後にS211へ進む。S211で制御部106は、撮影された全ての合焦画像に対する合成比率の算出が終了したか否かを判断する。全ての画像に対する合成比率の算出が終了した場合、S212に処理を進め、算出処理が終了していない場合にはS204に処理を戻して、次の画像の合成比率算出処理を継続する。
After the process of S209 or S210 in FIG. In step S <b> 211, the
S212において画像処理部103および制御部106は、決定した各合焦画像に対する合成比率を用いて画像の合成処理を行う。その際、合成比率の合計値を1以下に抑えるために、最終的な合成比率は、下記式(4)に基づいて正規化される。
S213で通信部108は、S212で合成処理によって生成された表示用画像のデータを表示部109に出力する処理を行い、一連の処理を終了する。
本実施形態では、被写体全体に合焦した画像を生成する際、表示装置の表示能力に応じて合成処理方法を変更して表示用画像を生成する。これにより、ユーザがどの視聴環境で画像を視聴しても被写体全体に焦点の合った合焦画像を生成することができる。
In S213, the
In this embodiment, when an image focused on the entire subject is generated, a display processing image is generated by changing the composition processing method according to the display capability of the display device. Thereby, it is possible to generate a focused image that is focused on the entire subject regardless of the viewing environment in which the user views the image.
[第2実施形態]
次に本発明の第2実施形態を説明する。本実施形態では、絞り値(F値)を変化させた複数の画像を用いて、主被写体全体に合焦した画像を選択して、表示能力の異なる複数の表示装置に出力する形態を説明する。なお、本実施形態にて第1実施形態の場合と同様の構成については既に使用した符号を用いることでそれらの詳細な説明を省略し、主に相違点を説明する。このような説明の省略については後述の実施形態でも同じである。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. In the present embodiment, an embodiment will be described in which an image focused on the entire main subject is selected using a plurality of images with different aperture values (F values) and output to a plurality of display devices having different display capabilities. . In addition, about the structure similar to the case of 1st Embodiment in this embodiment, those detailed description is abbreviate | omitted by using the code | symbol already used, and a difference is mainly demonstrated. Omitting such description is the same in the embodiments described later.
図6のフローチャートに則って、本実施形態の動作を説明する。
S601で制御部106は、撮影光学系101の絞りを駆動制御し、F値の異なる複数の画像を取得して、画像信号を記録部107に記録する制御を行う。この場合、取得されるすべての画像は主被写体の任意の領域に合焦している画像であるものとする。S602で制御部106は、表示部109の表示解像度や表示画面サイズ等の情報を、通信部108から取得してRAM104に記憶する。
The operation of this embodiment will be described with reference to the flowchart of FIG.
In step S <b> 601, the
S603で制御部106は、S602で取得した情報を用いて表示解像度(または表示画面サイズ)について判断する。表示部109の表示解像度が高解像度である(または表示画面サイズが大きい)と判断された場合、S604へ進み、そうでない場合にはS607に移行する。S604で制御部106は、主被写体距離情報であるDmsとDmeを取得する。
In step S603, the
S605で制御部106は式(1)、(2)により、各画像の被写界深度である前方被写界深度Dfsと後方被写界深度Dfeを算出する。S606で制御部106は、主被写体距離情報Dms、Dmeと、前方被写界深度Dfs、後方被写界深度Dfeを比較し、F値の異なる複数の画像(F値画像)から、画像を選択する。具体的には、複数のF値画像のうち、n番目の画像に対する主被写体距離をDms(F)、Dme(F)と表記する。前方被写界深度Dfsが前方被写体距離Dms(F)より短く、後方被写界深度Dfeが後方被写体距離Dme(F)より長くなるF値画像を選択する処理が行われるようにする。つまり、主被写体が被写界深度内におさまるF値画像が選択される。
In step S <b> 605, the
S607で制御部106は、撮影した複数のF値画像の中から最もF値の大きい画像を選択する。F値が大きくなると、回折ぼけの影響や、露光時間が長くなることで蓄積ブレの影響を受ける可能性がある。そのため、S601での撮影時にF値を変化させる際、F値の上限を決めることで、これらの影響を回避することが可能である。
In step S <b> 607, the
S606またはS607の後、S608に処理を進める。S608で制御部106は、S606またはS607で選択した画像を表示部109に表示させる制御を行う。その後に処理を終了する。
本実施形態では、被写体全体に合焦した画像を生成する際、表示装置の表示能力に応じて、F値の異なる複数の画像から選択した画像を表示装置へ出力する処理が行われる。
After S606 or S607, the process proceeds to S608. In step S608, the
In the present embodiment, when an image focused on the entire subject is generated, a process of outputting an image selected from a plurality of images having different F values to the display device according to the display capability of the display device is performed.
[第3実施形態]
次に本発明の第3実施形態を説明する。第1および第2実施形態では、デジタルカメラ内で処理した画像を、表示装置に出力して表示させる形態を説明した。本実施形態では、表示装置(外部装置)が画像の合成および表示処理を行う形態について、図7から図9を用いて説明する。
[Third Embodiment]
Next, a third embodiment of the present invention will be described. In the first and second embodiments, a mode has been described in which an image processed in a digital camera is output and displayed on a display device. In the present embodiment, a mode in which a display device (external device) performs image composition and display processing will be described with reference to FIGS.
図7は、本実施形態に係る機能構成を示すブロック図である。デジタルカメラ700と、外部装置であるスマートフォン710を例示し、第1実施形態で説明した合焦位置の異なる複数の画像の合成をスマートフォン710が行う。なお、デジタルカメラ700の各構成部701から708はそれぞれ、図1の各構成部101から108と同様であるため説明を省略する。
FIG. 7 is a block diagram showing a functional configuration according to the present embodiment. The
スマートフォン710内の画像処理部713は、第1実施形態で説明した画像の合成処理を行い、合成後の画像信号をRAM714に記憶させる。制御部716は、例えばCPUを有し、スマートフォン710が備える各ブロックの動作プログラムをROM715から読み出し、RAM714に展開して実行する。記録部717は画像処理部713により処理された画像データ等を記録媒体に記録する処理を行う。
The
通信部718は、デジタルカメラ700と通信する。通信部708と通信部718は、HDMI(登録商標)等のケーブルや無線LAN(Local Area Network)等のデータインターフェース部である。例えば、通信部708は、RAM704に記憶されている画像信号を読み出して、スマートフォン710へ送信する。また通信部718は、スマートフォン710が備える表示部719の表示解像度や表示画面サイズ等の情報をデジタルカメラ700へ送信する。
A
表示部719は、RAM714から読み出された画像信号にしたがって画像を表示するモニタ部である。タッチパネルを用いたUI(ユーザインターフェース)部720は、ユーザの操作指示を受け付け、操作指示信号を制御部716に出力する。
The
図8は本実施形態のフローチャートである。図9は、スマートフォン710の表示部719の画面例を示す。図9(A)に示す撮影被写体の画像900は図3と同一の構図であり、主被写体901、背景被写体902、903を示す。図9(B)の画像910は、図9(A)の画像900の一部(点線の矩形枠904内)を拡大した画像である。
FIG. 8 is a flowchart of this embodiment. FIG. 9 shows a screen example of the
図8のフローチャートに則って動作を説明する。
S801からS804の処理はそれぞれ、図2のS201、S203からS205の処理と同様である。S801で合焦位置の異なる複数の画像が取得されて記録部107が画像信号を記録する。S802では、主被写体距離情報DmsおよびDmeが取得される。S803で制御部706は、各合焦画像の合焦距離Dpを算出し、S804では、各撮影画像にて主被写体に合焦しているか否かを判定する。
The operation will be described with reference to the flowchart of FIG.
The processing of S801 to S804 is the same as the processing of S201 and S203 to S205 of FIG. In S801, a plurality of images having different in-focus positions are acquired, and the
S804で主被写体に合焦していると判断された場合、S805に処理を進め、主被写体に合焦していないと判断された場合にはS803に処理を戻す。S805で通信部708は、S804で主被写体に合焦していると判断された画像のデータのみ、スマートフォン710へ送信する。この送信は、合成に使用する可能性がある画像のみを転送することを目的としている。
If it is determined in S804 that the main subject is in focus, the process proceeds to S805, and if it is determined that the main subject is not in focus, the process returns to S803. In step S <b> 805, the
S806、S807の各処理は、図2のS206、S207の各処理と同様である。S806で制御部716は前方被写界深度Dfsと後方被写界深度Dfeを算出し、S807では、合焦距離Dp、前方被写界深度Dfs、後方被写界深度Dfeを用いて、各画像に対する合成比率を算出する。S808で制御部716は合成比率の制御を行う。ユーザがスマートフォン等の小型モニタで画像を視聴する場合には合焦の外れが目立ちにくい。このため、被写体の合焦距離に近い領域だけでなく、合焦距離から離れた領域を合成する処理が行われる。制御部716は合成比率が最大となる範囲が広くなるように合成比率を変更する。例えば、図4(B)に示した合成比率410となるように合成比率の制御が行われる。
Each process of S806 and S807 is the same as each process of S206 and S207 of FIG.
S809で画像処理部713および制御部716は、決定した各合焦画像に対する合成比率を用いて画像の合成を行う。S810で表示部719は、合成された画像を表示する。S811で制御部716は、ユーザがUI部720の操作により拡大指示の操作を行ったか否かを判断する。拡大指示の操作が行われた場合、S812へ進み、拡大指示の操作が行われない場合にはS814に移行する。ユーザの操作指示方法の1つとして、タッチパネルのピンチアウト操作(拇指と人差し指との間隔を拡げる操作)がある。図9は画像の一部を拡大して表示する処理の説明図である。ピンチアウト操作によって、図9(A)の矩形枠904内の画像領域が拡大され、図9(B)の画像910の画角で表示される。
In step S809, the
S812で制御部716は合成比率が最大となる範囲が狭くなるように合成比率を変更し、被写体の合焦距離に近い領域だけを合成する制御を行う。画像を拡大した場合、大型モニタでの視聴と同様に、合焦の外れが目立ちやすくなる。このため、例えば、図4(A)に示した合成比率400となるように合成比率の制御が行われる。
In step S812, the
S813で画像処理部713および制御部716は、出力画角のみでの合成処理を行う。撮影された画像全体に対して合成処理を行うのではなく、最終的な出力画角に相当する領域(図9(A)の矩形枠904の画像領域)のみ、画像が合成されるので、処理負荷を低減することができる。S814で制御部716は、画像処理部713によりS813で処理された画像のデータを表示部719に出力する制御を行う。表示部719は画像を表示し、処理を終了する。
本実施形態では、撮像装置と通信する表示装置において、表示装置の表示能力および出力画角に応じて合成比率が変更されて表示用画像が生成される。
In step S813, the
In the present embodiment, in the display device that communicates with the imaging device, the combination ratio is changed according to the display capability and the output angle of view of the display device, and a display image is generated.
[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Embodiments]
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
100・・・デジタルカメラ、101・・・撮影光学系、102・・・撮像部、103・・・画像処理部、106・・・制御部、108・・・通信部、109・・・表示部
DESCRIPTION OF
Claims (15)
前記複数の画像を取得する取得手段と、
前記複数の画像から表示用の画像を生成する制御を行う制御手段と、
前記制御手段の指示にしたがって前記表示用の画像を生成する生成手段と、
前記生成手段により生成された前記表示用の画像を表示手段に出力する出力手段と、を有し、
前記制御手段は、表示解像度または表示画面サイズが異なる前記表示手段ごとに前記複数の画像を合成した画像または前記複数の画像から選択した画像にしたがって前記生成手段により前記合焦画像を生成する制御を行うことを特徴とする画像処理装置。 An image processing apparatus that processes a plurality of images related to a subject photographed at different in-focus positions or aperture values to generate a focused image focused on the subject,
Obtaining means for obtaining the plurality of images;
Control means for performing control to generate an image for display from the plurality of images;
Generating means for generating the display image in accordance with an instruction of the control means;
Output means for outputting the display image generated by the generation means to the display means,
The control means controls the generation means to generate the focused image according to an image obtained by combining the plurality of images or an image selected from the plurality of images for each of the display means having different display resolutions or display screen sizes. An image processing apparatus that performs the processing.
前記複数の画像から表示用の画像を生成する制御を行う制御手段と、
前記制御手段の指示にしたがって前記表示用の画像を生成する生成手段と、
前記生成手段により生成された前記表示用の画像を表示手段に出力する出力手段と、を有し、前記被写体に焦点を合わせた合焦画像を生成する画像処理装置にて実行される制御方法であって、
前記表示手段の表示解像度または表示画面サイズの情報を前記制御手段が取得するステップと、
前記表示手段ごとに前記複数の画像を合成した画像または前記複数の画像から選択した画像にしたがって前記生成手段により前記合焦画像を生成する制御を前記制御手段が行うステップと、を有することを特徴とする画像処理装置の制御方法。 Acquisition means for acquiring a plurality of images relating to a subject photographed at different in-focus positions or aperture values;
Control means for performing control to generate an image for display from the plurality of images;
Generating means for generating the display image in accordance with an instruction of the control means;
Output means for outputting the display image generated by the generating means to the display means, and a control method executed by an image processing apparatus that generates a focused image focused on the subject. There,
The control means obtaining information of the display resolution or display screen size of the display means;
The control means performing control to generate the focused image by the generation means according to an image obtained by combining the plurality of images for each display means or an image selected from the plurality of images. A control method of the image processing apparatus.
A program for causing a computer of an image processing apparatus to execute each step according to claim 14.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016047321A JP6639276B2 (en) | 2016-03-10 | 2016-03-10 | Image processing apparatus and control method thereof, imaging apparatus, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016047321A JP6639276B2 (en) | 2016-03-10 | 2016-03-10 | Image processing apparatus and control method thereof, imaging apparatus, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017163412A true JP2017163412A (en) | 2017-09-14 |
JP6639276B2 JP6639276B2 (en) | 2020-02-05 |
Family
ID=59857218
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016047321A Expired - Fee Related JP6639276B2 (en) | 2016-03-10 | 2016-03-10 | Image processing apparatus and control method thereof, imaging apparatus, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6639276B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018179695A1 (en) * | 2017-03-31 | 2018-10-04 | ソニー株式会社 | Control device, imaging device, control method and program |
JP2021097350A (en) * | 2019-12-18 | 2021-06-24 | キヤノン株式会社 | Image processing device, imaging device, image processing method, program, and recording medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015231058A (en) * | 2014-06-03 | 2015-12-21 | オリンパス株式会社 | Imaging device, control method for imaging device and program |
JP2016024489A (en) * | 2014-07-16 | 2016-02-08 | キヤノン株式会社 | Image processing apparatus, imaging device, image processing method, and program |
-
2016
- 2016-03-10 JP JP2016047321A patent/JP6639276B2/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015231058A (en) * | 2014-06-03 | 2015-12-21 | オリンパス株式会社 | Imaging device, control method for imaging device and program |
JP2016024489A (en) * | 2014-07-16 | 2016-02-08 | キヤノン株式会社 | Image processing apparatus, imaging device, image processing method, and program |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018179695A1 (en) * | 2017-03-31 | 2018-10-04 | ソニー株式会社 | Control device, imaging device, control method and program |
US10999488B2 (en) | 2017-03-31 | 2021-05-04 | Sony Corporation | Control device, imaging device, and control method |
JP2021097350A (en) * | 2019-12-18 | 2021-06-24 | キヤノン株式会社 | Image processing device, imaging device, image processing method, program, and recording medium |
JP7409604B2 (en) | 2019-12-18 | 2024-01-09 | キヤノン株式会社 | Image processing device, imaging device, image processing method, program and recording medium |
Also Published As
Publication number | Publication date |
---|---|
JP6639276B2 (en) | 2020-02-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9674408B2 (en) | Image pickup apparatus that utilizes a refocusable range, image processing method, and recording medium | |
JP5180407B2 (en) | Stereo imaging device and parallax image restoration method | |
JP6838994B2 (en) | Imaging device, control method and program of imaging device | |
CN109255810B (en) | Image processing apparatus and image processing method | |
US11095806B2 (en) | Display control apparatus, display control method, and image capturing apparatus | |
JP6800797B2 (en) | Image pickup device, image processing device, control method and program of image pickup device | |
US9535193B2 (en) | Image processing apparatus, image processing method, and storage medium | |
JP5469258B2 (en) | Imaging apparatus and imaging method | |
JP2013093754A (en) | Imaging apparatus | |
JP2012049773A (en) | Imaging apparatus and method, and program | |
JP6808333B2 (en) | Display control device and method, and imaging device | |
JP6608194B2 (en) | Image processing apparatus, control method therefor, and program | |
US20160275657A1 (en) | Imaging apparatus, image processing apparatus and method of processing image | |
JP2018074361A (en) | Imaging apparatus, imaging method, and program | |
JP6639276B2 (en) | Image processing apparatus and control method thereof, imaging apparatus, and program | |
JP7198055B2 (en) | Image processing device, its control method, and program | |
JP2012124650A (en) | Imaging apparatus, and imaging method | |
JP2020136697A (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
JP7421008B2 (en) | Imaging device, imaging method, and program | |
JP7080688B2 (en) | Image processing device, image pickup device, image processing method, program | |
US20240089597A1 (en) | Image capturing apparatus for capturing and compositing images different in in-focus position, control method, and storage medium | |
US20220358667A1 (en) | Image processing apparatus and method, and image capturing apparatus and control method thereof, and storage medium | |
JP2018054815A (en) | Region discrimination device, control method therefor, and control program, and imaging apparatus | |
JP6900228B2 (en) | Imaging device, imaging system, imaging device control method, and program | |
JP2017134154A (en) | Focus control device, imaging device, and focus control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190218 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20191029 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20191126 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20191224 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6639276 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |