JP2018029270A - Image processing apparatus, control method thereof, imaging apparatus, and program - Google Patents
Image processing apparatus, control method thereof, imaging apparatus, and program Download PDFInfo
- Publication number
- JP2018029270A JP2018029270A JP2016160405A JP2016160405A JP2018029270A JP 2018029270 A JP2018029270 A JP 2018029270A JP 2016160405 A JP2016160405 A JP 2016160405A JP 2016160405 A JP2016160405 A JP 2016160405A JP 2018029270 A JP2018029270 A JP 2018029270A
- Authority
- JP
- Japan
- Prior art keywords
- image
- subject
- unit
- image data
- depth
- 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
Links
Images
Abstract
Description
本発明は、撮像画像に関連する被写体の距離情報を活用した画像処理技術に関する。 The present invention relates to an image processing technique using subject distance information related to a captured image.
撮像シーンの画像内に存在する個々の被写体領域を検出し、被写体の距離情報を取得可能な撮像装置がある。特許文献1に開示の撮像装置は、個々の被写体の距離情報を用いて、撮像シーン内の被写体の奥行き方向における位置関係と現在の合焦距離とを表す俯瞰マップを撮影者に提示する。撮像時に撮影者は、どの被写体に合焦しているかを容易に把握することが可能である。また、デジタルカメラの本体部に設けられた液晶ディスプレイだけでなく、外部の表示デバイスに対して接続が可能な装置がある。デジタルカメラにて接続可能な表示デバイスに応じて画像データの解像度を変換する技術が提案されている(特許文献2)。
There is an imaging device that can detect individual subject areas existing in an image of an imaging scene and obtain subject distance information. The imaging apparatus disclosed in
従来の装置において被写体の距離情報(深度情報)は、撮像時に行われる画像処理に専ら用いられており、撮影後にユーザが利用することを想定していなかった。例えば、撮像画像に対する画像処理時に、被写体の距離情報を利用した画像処理をユーザが容易に行うための方法は提案されていなかった。
本発明の目的は、撮像画像内の被写体の深度情報を、撮像画像に対する画像処理に利用できるようにすることである。
In the conventional apparatus, the subject distance information (depth information) is exclusively used for image processing performed at the time of imaging, and is not assumed to be used by the user after imaging. For example, a method for allowing a user to easily perform image processing using distance information of a subject during image processing on a captured image has not been proposed.
An object of the present invention is to make it possible to use depth information of a subject in a captured image for image processing on the captured image.
本発明の一実施形態の装置は、撮像画像と、撮像画像内の各被写体の奥行き方向の深さを示す深度情報を取得する取得手段と、前記深度情報を用いて、前記撮像画像のデータから、それぞれが異なる深さ方向の範囲に対応する複数の画像の画像データを生成する生成手段と、前記複数の画像のいずれかを選択する選択手段と、前記生成手段により生成された画像データを表示デバイスへ出力して前記複数の画像のうちの1つの画像を、前記選択手段により最初の表示で選択可能な初期選択状態とする制御手段と、前記選択手段により選択された画像に対して画像処理を行う画像処理手段と、を備える。 An apparatus according to an embodiment of the present invention uses a captured image, acquisition means for acquiring depth information indicating the depth of each subject in the captured image, and data of the captured image using the depth information. Generating means for generating image data of a plurality of images each corresponding to a range in a different depth direction, selecting means for selecting one of the plurality of images, and displaying the image data generated by the generating means A control unit that outputs to the device and sets one of the plurality of images to an initial selection state that can be selected in the initial display by the selection unit, and image processing for the image selected by the selection unit Image processing means for performing
本発明によれば、撮像画像内の被写体の深度情報を、撮像画像に対する画像処理に利用することができる。 According to the present invention, depth information of a subject in a captured image can be used for image processing on the captured image.
以下、図面を参照して、本発明の実施形態を詳細に説明する。以下の実施形態では、撮像画像内の被写体の距離情報を画像処理に利用可能な画像処理装置において、画像編集の際にユーザが処理対象を短時間で選択し、または正確に選択することが可能である。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the following embodiments, in an image processing apparatus that can use distance information of a subject in a captured image for image processing, a user can select a processing target in a short time or accurately select an image when editing the image. It is.
[実施例1]
図1は本発明の実施例1に係る画像処理装置を適用した撮像装置の構成例を示すブロック図である。撮像装置100の撮像部101は、レンズ、シャッター、絞り、撮像素子を有する。撮像部101はシステム制御部103の指示により撮影動作を行い、撮像画像データを取得してメモリ105へ格納する。撮像装置100内の各部はバス102に接続されており、データや制御信号の送受を行う。
[Example 1]
FIG. 1 is a block diagram illustrating a configuration example of an imaging apparatus to which the image processing apparatus according to the first embodiment of the present invention is applied. The
システム制御部103は撮像装置100全体を制御する。システム制御部103はCPU(中央演算処理装置)を備え、不揮発性メモリ106に記憶されたプログラムを読み出して実行することで、後述する各種処理を実現する。またシステム制御部103は、撮像装置100に接続される表示デバイスに対して表示制御を行う。例えば、システム制御部103は後述の表示部110や通信部111に対する表示切り替え処理や、画像処理部107に対する表示デバイスの解像度に合わせた表示画像データ生成処理の指示を行う。
A
距離情報取得部104は、撮像部101が取得した撮像画像データに対応した距離情報を取得する。撮像画像データに対応した距離情報はメモリ105へ記憶される。距離情報に関して、撮像画像内の各被写体の奥行き方向(深さ方向)の深度に対応する情報としてさまざまな実施形態がある。つまり、被写体の深さに対応するデータが示す情報(深度情報)は、画像内における撮像装置100から被写体までの被写体距離を直接的に表すか、または画像内の被写体の距離(被写体距離)や深さの相対関係を表す情報であればよい。例えば、撮像部101に対して合焦位置を変更する制御が行われ、撮影された複数の撮像画像データが取得される。それぞれの撮像画像データの合焦領域と、撮像画像データの合焦位置情報から距離情報を取得することができる。この他にも、撮像部101の撮像素子が瞳分割型の画素構成を有する場合、一対の像信号の位相差から各画素に対する距離情報を取得可能である。具体的には、撮像素子は、撮像光学系の異なる瞳部分領域を通過する一対の光束が光学像としてそれぞれ結像したものを電気信号に変換し、対をなす画像データを複数の光電変換部から出力する。対をなす画像データ間の相関演算によって各領域の像ずれ量が算出され、像ずれ量の分布を表す像ずれマップが算出される。あるいはさらに像ずれ量がデフォーカス量に換算され、デフォーカス量の分布(撮像画像の2次元平面上の分布)を表すデフォーカスマップが生成される。このデフォーカス量を撮像光学系や撮像素子の条件に基づいて被写体距離に換算すると、被写体距離の分布を表す距離マップデータが得られる。像ずれマップデータ、デフォーカスマップデータ、あるいはデフォーカス量から変換される被写体距離の距離マップデータを取得可能である。
The distance
本実施例おいては、撮像部101に対して、合焦位置を変更して撮像された複数の撮像画像データが取得される。それぞれの撮像画像データの合焦領域と、撮像画像データの合焦位置情報から距離情報が取得される。撮像画像データに対応した距離情報はメモリ105へ格納される。また距離情報は各画素の値が距離を表す距離画像の形式を有するものとするが、データ形式はこれに限定されない。例えば距離情報は、撮影シーンの画像内に存在する特定被写体(例えば人物)の領域の位置および距離を表す情報であってもよい。距離情報取得部104による距離情報の生成方法について特に制限は無く、各種の方法を適用可能である。
In the present embodiment, a plurality of captured image data captured by changing the in-focus position is acquired for the
メモリ105は、撮像部101により取得された撮像画像データや、距離情報取得部104で取得した、撮像画像データに関連する距離情報等の各種データを記憶する。メモリ105は、所定枚数の撮像画像データの格納に十分な記憶容量を有する。不揮発性メモリ106は、電気的に消去および記録可能なメモリであり、例えばEEPROM(Electrically Erasable Programmable Read-Only Memory)等が用いられる。不揮発性メモリ106には、システム制御部103の動作用の定数、設定値、プログラム等が記憶される。ここでのプログラムとは、実施例にて後述する各種フローチャートの処理を実行するためのプログラムである。
The
画像処理部107は、システム制御部103からの指示により、撮像部101や、メモリ105から読み出された撮像画像データに対して所定の画像処理を行う。所定の画像処理とは、画素補間、リサイズ処理、色変換処理、距離情報を用いて算出される個々の距離範囲に対する暈かし処理や、シャープネス処理、色変換処理等である。
The
分割画像生成部108は、メモリ105からの撮像画像データと、距離情報取得部104からの距離情報と、後述の表示デバイス情報を取得し、撮像画像データ内の所定の距離範囲に含まれる被写体画像を抽出する処理を行う。撮像画像データ内の所定の距離範囲(深さ方向の範囲)含まれる被写体画像を、奥行き分割画像または単に分割画像と呼ぶ。分割画像生成部108は奥行き分割画像の画像データを生成してメモリ105へ格納する。例えば、奥行き方向(撮影方向に沿う方向)において距離範囲を3つの距離範囲に分割する場合を想定する。第1の距離範囲を撮像装置に最も近い距離範囲とし、第3の距離範囲を撮像装置から最も遠い距離範囲とする。第1の分割画像は、第1の距離範囲内の被写体像を含む画像(近景被写体の画像)である。第2の分割画像は、第2の距離範囲内の被写体像を含む画像(中間距離の被写体の画像)である。第3の分割画像は、第3の距離範囲内の被写体像を含む画像(遠景被写体の画像)である。分割画像生成部108の詳細については後述する。
The divided
操作部109は、ユーザの操作指示を受け付けて撮像装置100の制御情報に変換し、システム制御部103へ通知するユーザインターフェース部である。表示部110はLCD(液晶表示装置)等の表示デバイスを備え、メモリ105から読み出された画像データ等を画面に表示する。通信部111は、表示デバイスを備える外部装置との間で制御コマンドや、データの送受信を行うための通信インターフェース部である。例えば撮像装置100はUSB(Universal Serial Bus)やHDMI(登録商標)のような規格に基づく有線接続で外部装置と通信を行う。あるいは撮像装置100は無線LAN(Local Area Network)やBlueTooth(登録商標)等の規格に基づく無線接続により外部装置と通信を行う。なお、撮像装置と外部装置とは直接接続されてもよいし、サーバーや、インターネット等のネットワークを介して接続されてもよい。本実施形態においては、少なくとも通信部111が接続される外部装置の表示デバイスに対して、表示デバイス情報の受信や、撮像画像に関する表示画像データの送信ができるものとする。
The
記録媒体I/F部112は、メモリカードやハードディスク等の記録媒体113とのインターフェース部である。記録媒体113は半導体メモリや磁気ディスク等から構成され、撮像画像データや、撮像画像データに関連する距離情報を記録する。
The recording medium I /
被写体検出部114は、メモリ105から取得した撮像画像内の被写体領域およびその属性を検出し、検出した属性情報と被写体領域とを関連付けて、被写体の検出結果としてメモリ105へ格納する。属性情報とは、被写体領域を識別するための情報であり、個々の被写体画像を区別できればよい。例えば、属性情報は被写体が人物、動物、植物、建物、人物の顔等であることを示す情報である。被写体検出部114は、公知技術を用いて(特許文献3)、入力画像から特徴ベクトル等の特徴量を検出し、検出した特徴量を認識用辞書に保持された特徴量と比較する。認識用辞書は人や顔、動物、山、建物等の検出対象の特徴量を保持したデータベースである。被写体検出部114は類似度や評価値と称される尤度を算出し、尤度が所定の閾値以上である場合に検出対象物が検出されたと判定する。
The
オブジェクト画像生成部115は、メモリ105から取得した、被写体検出部114による被写体の検出結果から、検出された被写体の属性情報に対応するオブジェクト画像データを生成し、メモリ105へ格納する。個人認証部116は、被写体検出部114が顔と判定した被写体に対して、不揮発性メモリ106に予め登録されている個人認証用データと比較し、検出された人の顔画像が登録されている人の顔画像と一致するか否かを判定する。個人認証部116は個人認証の判定結果をメモリ105へ格納する。合焦度算出部117は、被写体検出部114が検出した各被写体に対して焦点が合っている度合いを示す合焦度を算出し、合焦度の算出結果をメモリ105へ格納する。
The object
分割画像初期選択決定部(以下、初期選択決定部という)118は、個人認証部116の判定結果、および合焦度算出部117の算出結果をメモリ105から取得する。初期選択決定部118は、奥行き分割画像が表示デバイスの画面に表示された際、最初に選択状態とする奥行き分割画像を決定し、選択結果をメモリ105へ格納する。本実施例では個人認証部116および合焦度算出部117による結果に基づいて、奥行き分割画像の初期選択画像を決定する例を説明するが、これに限ったものではない。例えば、初期選択決定部118は個人認証部116の結果、または合焦度算出部117の結果から、初期選択画像を決定してもよいし、別の方法で決定してもよい。
A divided image initial selection determination unit (hereinafter referred to as an initial selection determination unit) 118 acquires the determination result of the
図2を参照して、分割画像生成部108の内部構成を説明する。図2は分割画像生成部108の構成例を示すブロック図である。分割画像生成部108は、距離範囲分割処理部201と、分割画像生成用マスクデータ生成処理部202と、分割画像データ生成処理部203とで構成される。
With reference to FIG. 2, an internal configuration of the divided
距離範囲分割処理部(以下、分割処理部という)201は、メモリ105から取得した距離情報と、表示デバイス情報を用いて、被写体の距離範囲(深さ方向の範囲)を複数に分割する。被写体の距離範囲の分割により、被写体の距離範囲分割情報が生成される。分割画像生成用マスクデータ生成処理部(以下、マスク生成処理部という)202は、分割処理部201から、被写体の距離範囲分割情報を取得し、奥行き分割画像の生成用のマスク画像データを生成する。分割画像データ生成処理部(以下、データ生成処理部という)203は、メモリ105から取得した撮像画像データと、奥行き分割画像の生成用のマスク画像データとを用いて、複数の分割画像データを生成する。生成された分割画像データは、メモリ105へ撮像画像データと対応付けて格納される。
なお、図1、図2に示す構成例に限らず、以下に説明する処理の実行が可能であれば、撮像装置100の構成は図1、図2に示す構成に限定されない。
A distance range division processing unit (hereinafter, referred to as a division processing unit) 201 divides a subject distance range (a range in the depth direction) into a plurality of pieces using the distance information acquired from the
Note that the configuration of the
図3から図11を用いて本実施例の処理を説明する。図3、図4は全体的な処理の流れを説明するためのフローチャートである。図5は分割画像生成処理を説明するためのフローチャートである。図6は撮像画像データや表示画像データ等の説明図である。本実施例では、撮像画像データに対して、距離情報を利用した画像処理が実行される。画像処理とは、例えば、特定の距離の被写体に対するリフォーカス処理や、色空間変換等である。ユーザが撮像装置100を用いて、撮像画像に対する画像編集を行う例を以下に説明する。撮像装置100は表示解像度の異なる表示デバイスとの接続が可能である。例えば下記のとおりである。
・高解像度の表示が可能な表示デバイスA
PC(パーソナルコンピュータ)のディスプレイのような、細部の画像編集を行う上で十分な表示解像度が確保できる表示でバイス。
・表示デバイスAよりも表示解像度の低い表示デバイスB
撮像装置の本体部に付設された表示パネルのような、細部の画像編集を行う上で十分な表示解像度が確保できない表示デバイス。
The processing of this embodiment will be described with reference to FIGS. 3 and 4 are flowcharts for explaining the overall processing flow. FIG. 5 is a flowchart for explaining the divided image generation processing. FIG. 6 is an explanatory diagram of captured image data, display image data, and the like. In this embodiment, image processing using distance information is performed on captured image data. Image processing includes, for example, refocus processing for a subject at a specific distance, color space conversion, and the like. An example in which the user performs image editing on a captured image using the
-Display device A capable of high-resolution display
Vise with a display that can secure a sufficient display resolution for detailed image editing, such as a PC (personal computer) display.
-Display device B with lower display resolution than display device A
A display device, such as a display panel attached to the main body of an imaging device, that cannot ensure a sufficient display resolution for performing detailed image editing.
図3および図4のフローチャートを参照して、画像編集時の全体的な処理に関して説明する。以下の処理は、システム制御部103のCPUがメモリからプログラムを読み出して実行することにより実現される。
With reference to the flowcharts of FIGS. 3 and 4, the overall processing at the time of image editing will be described. The following processing is realized by the CPU of the
S301にてシステム制御部103は、記録媒体113から撮像画像データおよび撮像画像データに対応する距離情報を取得し、不揮発性メモリ106から最大分割画像数Nを取得し、これらの情報をメモリ105へ格納する。なお、最大分割画像数Nについては固定値、または可変値であり、後者の場合には、例えばユーザからの指定により決定される。
In S <b> 301, the
S302でシステム制御部103は、表示先の表示デバイス情報を取得する。表示デバイス情報は、表示先となる表示デバイスに関する情報であり、表示デバイスAや表示デバイスB等に固有の情報である。本実施例における表示デバイス情報は、表示デバイスの表示解像度情報であるものとする。この他にも、表示デバイスの大きさ(画面サイズ情報)、あるいは、表示解像度と表示デバイスの大きさの両方を表示デバイス情報として含んでいてもよい。表示デバイス情報の取得形態は、以下のとおりである。
In step S302, the
・撮像装置100が表示デバイス情報を記憶している形態
例えば、不揮発性メモリ106内には、撮像装置100と接続可能な表示デバイスに係る表示デバイス情報が記憶されている。この場合、システム制御部103は、表示デバイス情報を不揮発性メモリ106から取得する。
・撮像装置100が表示先の表示デバイスから表示デバイス情報を取得する形態
システム制御部103は、撮像装置100との接続が検出された表示デバイスに対して、通信部111を介して表示デバイス情報を要求し、表示デバイス情報を取得する。
A form in which the
Form in which the
S303において分割画像生成部108は、システム制御部103の指示により、メモリ105に記憶されている撮像画像データと、距離情報と、表示デバイス情報と、最大分割画像数Nを用いて、N枚の奥行き分割画像データを生成する。分割画像生成部108は、生成したN枚の奥行き分割画像データをメモリ105へ格納する。本実施例においては、最大分割画像数NをN=5とする。図6に具体例を示す。図6(A)は撮像画像データを例示し、撮像画像データから、図6(B)に示す奥行き分割画像1から5の各データが生成される。なお、S303の分割画像生成処理の詳細に関しては、図5のフローチャートを用いて後述する。
In S303, the divided
図3のS304において被写体検出部114は、システム制御部103の指示により、撮像画像データから被写体を検出し、検出された被写体の検出結果をメモリ105へ格納する。被写体の検出結果は、被写体の属性情報と、撮像画像中の領域情報で構成される。本処理で検出対象とする被写体の属性の種類については、例えば、被写体検出部114が検出可能な被写体の属性をすべて対象としてもよいし、一部の属性のみとしてもよい。さらには、ユーザに選択の指示を仰ぎ、所定の入力画面を提示してユーザが選別する実施形態でもよい。本実施例では、画像編集時であることを鑑み、例えば、顔に適した色補正や暈かし処理といった、被写体の属性に対応する画像処理を施すことが可能な属性のみを検出対象とする。図8に具体例を示す。図8(A)は、図6(A)の撮像画像データに対して、被写体として、人、人物の顔、動物、木が検出された例を示す。この場合、検出対象は、人、人物の顔、動物の属性をもつ被写体である。
In S <b> 304 of FIG. 3, the
図3のS305にて個人認証部116は、S304で検出された顔属性に被写体に対し、システム制御部103の指示により、不揮発性メモリ106に格納されている顔登録データと照合する。個人認証部116は、照合による認証処理の結果をメモリ105に格納する。S306にて合焦度算出部117は、システム制御部103の指示により、S304で検出された各被写体に対して合焦度をそれぞれ算出し、算出結果をメモリ105に格納する。
In S305 of FIG. 3, the
S307にて初期選択決定部118は、システム制御部103の指示により、奥行き分割画像を表示する際に、初期状態で選択可能な奥行き分割画像を決定し、結果をメモリ105に格納する。初期状態で選択可能とする分割画像は、S305およびS306で行った処理結果に基づいて決定される。例えば初期選択決定部118は、S305の処理結果に基づき、複数の奥行き分割画像のうちで、装置に予め登録されている人が多く存在している奥行き分割画像を初期選択状態として決定する。また、各奥行き分割画像に同数の登録されている人が存在している場合には、初期選択決定部118はS306の処理結果から、複数の奥行き分割画像のうちで合焦度の高い奥行き分割画像を初期選択状態として決定する。顔認証結果と合焦度に基づく初期選択は一例であり、これに限ったことではない。顔認証結果のみから奥行き分割画像を決定してもよいし、合焦度のみから奥行き分割画像を決定してもよい。あるいは、それ以外の方法で奥行き分割画像から決定してもよい。
In step S <b> 307, the initial
図4のS308にてシステム制御部103は表示デバイス情報に基づき、表示デバイスの表示解像度を所定の閾値と比較する。所定の閾値は、予め不揮発性メモリ106に記憶されている。表示デバイスの表示解像度が所定の閾値以上である場合、S309の処理に進む。また表示デバイスの表示解像度が所定の閾値未満の場合、S316の処理に進む。本実施例において、表示デバイスAは閾値以上の表示解像度を有し、表示デバイスBの表示解像度は閾値未満であるものとする。なお、表示デバイス情報が表示デバイスの大きさを示す画面サイズ情報である場合には、画面サイズ情報と、それに対する閾値とが比較される。この場合、S308の判定条件は、表示デバイスの画面サイズ情報が所定の閾値以上であることとする。
In S308 of FIG. 4, the
S309にて画像処理部107は、システム制御部103の指示により、メモリ105に記憶されているN枚の奥行き分割画像データから、表示画像データを生成する。以降、S309で生成された表示画像データを第1の表示画像データと呼ぶ。画像処理部107は、生成された第1の表示画像データをメモリ105に格納する。
In step S <b> 309, the
本実施例にてシステム制御部103は、図6(B)に示す奥行き分割画像データから、各分割画像の距離関係や、撮影画角を表現した第1の表示画像データを生成する処理を制御する。具体的には、画像処理部107はそれぞれの奥行き分割画像データに対して、撮像装置からの距離が近いものほど、画像サイズが小さくなるようにリサイズ処理を施してから、第1の表示画像データとして配置することで撮影画角を表現する。
In the present embodiment, the
図7(A)は、5つのレイヤーで表現した第1の表示画像データを例示した図である。近距離に対応する奥行き分割画像1は最も手前側のレイヤーに配置され、遠距離に対応する奥行き分割画像5は最も奥側のレイヤーに配置される。奥行き分割画像2から4は距離情報に応じて設定されるレイヤーにそれぞれ配置される。すべての奥行き分割画像データについて、少なくとも一部が見えるように配置することで表示される画像データを、第1の表示画像データとする。また、図7(A)では、図6(B)の分割画像2に配置された人の顔画像が撮像装置100に登録されている人物の顔画像である場合を例示する。初期選択決定部118は、個人認証部116の処理結果に基づき、登録されている人物に対して画像処理を行う可能性が高いと判定する。その結果、図7(A)に示すように、分割画像2が初期状態として選択され、ユーザに視認し易い強調表示で提示される。
FIG. 7A is a diagram illustrating first display image data expressed by five layers. The
本実施例で示す第1の表示画像データの例に限らず、すべての奥行き分割画像データをユーザが分別して選択することも可能である。奥行き分割画像データについては、被写体距離(撮像装置から被写体までの距離)が増加または減少する方向で各分割画像が配置表示されていればよい。例えば、手前から奥へという並べ方ではなく、右から左に向かって被写体距離が大きくなるように奥行き分割画像データを配置してもよい。 In addition to the example of the first display image data shown in the present embodiment, the user can also select and select all the depth-division image data. For the depth-divided image data, it is only necessary that the divided images are arranged and displayed in a direction in which the subject distance (the distance from the imaging device to the subject) increases or decreases. For example, the depth-division image data may be arranged so that the subject distance increases from the right to the left instead of from the front to the back.
図7(B)は、第1の表示画像データと奥行き分割画像データとの対応付けを説明する模式図である。原点(0,0)を設定して縦軸方向および横軸方向に座標軸が設定されているものとする。ユーザ操作により指定された、第1の表示画像データの画像上での座標と、奥行き分割画像の選択先とを対応付けた選択情報はメモリ105へ格納される。図7(B)の例では、第1の表示画像データに対してユーザ操作により指定された位置座標は分割画像2内であり、奥行き分割画像の選択先は分割画像2である。
FIG. 7B is a schematic diagram for explaining the association between the first display image data and the depth-division image data. It is assumed that the origin (0, 0) is set and the coordinate axes are set in the vertical axis direction and the horizontal axis direction. Selection information in which the coordinates on the image of the first display image data designated by the user operation are associated with the selection destination of the depth-division image is stored in the
S310において表示部110は、システム制御部103の指示により、メモリ105から取得した表示画像データの、表示デバイスへの表示を行う。具体的な表示例に関しては後述する。本実施例においては、撮像装置100にて同時に複数の表示デバイスとの接続が検出されている場合、最も解像度が高い表示デバイスのみ表示を行うものとする。なお、同時に複数の表示デバイスへの表示を行う実施形態の場合には、表示先となる表示デバイスの数だけ、S308からS310の処理が繰り返されて、各表示デバイスに応じた表示画像データが生成される。
In S <b> 310, the
S311にてシステム制御部103は操作部109がユーザ操作を検出したか否かを判定する。ユーザ操作が検出された場合、S312へ処理を進める。またユーザ操作が検出されない場合には、S310の処理に戻る。S312は、S311で検出されたユーザ操作が奥行き分割画像に対する画像処理操作であるか否かについての判定処理である。奥行き分割画像に対する画像処理操作に関しては、ユーザ操作により、少なくとも奥行き分割画像が選択されていればよいものとする。奥行き分割画像の選択操作の際にユーザは、例えば操作部109のキー入力により、所望の奥行き分割画像を選択することができる。キー入力に対応した奥行き分割画像は強調表示される。このとき、初期状態で強調表示される奥行き分割画像は、S307で決定された奥行き分割画像である。この他にも、表示デバイスがタッチパネル形式である場合、ユーザは表示画像の面内の座標を指定することにより、所望の奥行き分割画像データを選択することができる。
In step S311, the
S311で検出されたユーザ操作が奥行き分割画像に対する画像処理操作である場合、S313の処理に進み、奥行き分割画像に対する画像処理操作でない場合にはS314の処理に進む。S313において画像処理部107は、システム制御部103の指示により、選択された奥行き分割画像や被写体画像に対する所定の画像処理を実行する。画像処理部107は所定の画像処理が施された画像編集後のデータをメモリ105へ格納する。所定の画像処理とは、ユーザ操作によって選択された奥行き分割画像に対応する距離範囲に対して行われる、暈かし処理や、シャープネス処理、色変換処理等である。また、ユーザが選択した奥行き分割画像内の被写体の領域に対する暈かし処理や、シャープネス処理、色変換処理といった画像処理が行われてもよい。S313での画像処理は、ユーザが分割画像を選択することで実施可能となる分割画像に対する画像処理であればよい。その後、S303の処理へ移行する。
If the user operation detected in S311 is an image processing operation for a depth-division image, the process proceeds to S313. If the user operation is not an image processing operation for a depth-division image, the process proceeds to S314. In step S <b> 313, the
S314は、ユーザ操作が画像編集モードの終了操作であるか否かについて判定処理である。ユーザ操作が画像編集モードの終了操作である場合、S315の処理に進み、画像編集モードの終了操作でない場合にはS310の処理へ移行する。S315でシステム制御部103は、所望の画像処理が施された画像編集済みのデータを、記録媒体I/F部112を介して記録媒体113に保存する処理を行い、一連の処理を終了する。
S314 is a determination process regarding whether or not the user operation is an image editing mode end operation. If the user operation is an operation for ending the image editing mode, the process proceeds to S315. If the user operation is not an operation for ending the image editing mode, the process proceeds to S310. In step S <b> 315, the
次に、S316からS318の処理を説明する。S308で表示デバイスの表示解像度が所定の閾値未満であると判定された場合、第2の表示画像データが生成される。第2の表示画像データ生成処理に関して、図8を用いて説明する。図8は、第2の表示画像データ生成処理を説明するための図である。 Next, the processing from S316 to S318 will be described. If it is determined in S308 that the display resolution of the display device is less than the predetermined threshold, second display image data is generated. The second display image data generation process will be described with reference to FIG. FIG. 8 is a diagram for explaining the second display image data generation process.
S316においてオブジェクト画像生成部115は、システム制御部103の指示により、メモリ105から被写体の検出結果と撮像画像データを取得し、被写体の属性に対応したオブジェクト画像データを生成する。生成されたオブジェクト画像データはメモリ105へ格納される。図8(A)から(C)に具体例を示す。被写体の属性に対応したオブジェクト画像データ群は、予め不揮発性メモリ106に格納される。人や動物等の属性に関して、対応するオブジェクト画像データが不揮発性メモリ106から取得される。図8(C)は、顔の属性に対するオブジェクト画像データを示す。顔の属性に対しては、撮像画像データと、被写体の領域情報を用いて、撮像画像から被写体の顔領域を切り出した画像データ、すなわち抽出された画像データをオブジェクト画像データとする。この他には、例えば、撮像画像中の被写体領域の色情報を取得し、オブジェクト画像データの色情報に利用してもよい。
In step S <b> 316, the object
図4のS317にてシステム制御部103は、メモリ105から取得した被写体の領域情報と、撮像画像に対応する距離情報を用いて、検出された被写体の距離情報を算出する。具体的には、距離情報が距離画像の形式の情報である場合、システム制御部103は、被写体の撮像画像中の領域情報を、距離画像中の被写体の領域として扱い、当該領域内の画素値を平均した値を、被写体の距離情報として算出する。
In S317 of FIG. 4, the
S318にて画像処理部107は、システム制御部103の指示により、オブジェクト画像データと、被写体の領域情報と、撮像画像に対応する距離情報を用いて、第2の表示画像データを生成する。生成された第2の表示画像データは、メモリ105に格納される。図9(A)に具体例を示す。図9(A)は、顔、人、動物の属性に対するオブジェクト画像データから構成される第2の表示画像データを示す。
In step S <b> 318, the
図9(B)は第2の表示画像データと奥行き分割画像データとの対応付けを説明する模式図である。被写体の距離情報を用いて、各被写体に対応するオブジェクト画像データのうち、近距離に対応するオブジェクト画像データが手前側に配置され、遠距離に対応するオブジェクト画像データが奥側に配置される。すべてのオブジェクト画像データについて、少なくとも一部が見えるように配置表示された画像データを、第2の表示画像データとする。このとき、図9(A)にて人物の顔を表示するオブジェクト画像データが初期選択状態として設定され、ユーザに強調表示で提示される。ただし、本実施例で示す第2の表示画像データの例に限らず、すべてのオブジェクト画像データをユーザが分別して選択することが可能である。オブジェクト画像データについては、オブジェクトに対応する被写体距離が増加または減少する方向で各画像が配置表示されていればよい。例えば、手前から奥へという並べ方ではなく、右から左に向かって被写体距離が大きくなるようにオブジェクト画像データを配置してもよい。 FIG. 9B is a schematic diagram for explaining the association between the second display image data and the depth-division image data. Using object distance information, object image data corresponding to a short distance among object image data corresponding to each object is arranged on the near side, and object image data corresponding to a long distance is arranged on the back side. The image data arranged and displayed so that at least a part of all the object image data can be seen is defined as second display image data. At this time, the object image data for displaying a person's face in FIG. 9A is set as an initial selection state and presented in a highlighted manner to the user. However, the present invention is not limited to the example of the second display image data shown in the present embodiment, and all object image data can be sorted and selected by the user. As for the object image data, it is only necessary that each image is arranged and displayed in a direction in which the subject distance corresponding to the object increases or decreases. For example, the object image data may be arranged so that the subject distance increases from the right to the left instead of from the front to the back.
システム制御部103は、図9(B)に示すように、第2の表示画像データの画像上で指定される座標と、分割画像データの選択先とを対応付けた選択情報をメモリ105へ格納する。原点(0,0)を設定して縦軸方向および横軸方向に座標軸が設定されているものとする。ユーザ操作により指定された、第2の表示画像データの座標と、奥行き分割画像の選択先とを対応付けた選択情報はメモリ105へ格納される。図9(B)の例では、第2の表示画像データに対してユーザ操作により指定された位置座標は分割画像2内であり、奥行き分割画像の選択先は分割画像2である。
As shown in FIG. 9B, the
なお、図3のS304の処理で、検出対象とした被写体が1つも検出されない場合、システム制御部103は撮像画像データを第2の表示画像データとして、メモリ105へ格納する。この場合、システム制御部103は、表示画像データの座標と、奥行き分割画像データの選択先とを対応付けた選択情報を生成しない。
If no subject to be detected is detected in the process of S304 in FIG. 3, the
次に、図5のフローチャートと、図6および図10を用いて、分割画像生成処理に関して説明する。図10は分割画像生成処理の説明図である。最大分割画像数N=5とする。
図5のS401において、奥行き分割画像データの参照変数(iと記す)の値がゼロに初期化される(i=0)。S402において、分割処理部201は、距離情報に基づいて、奥行き方向にて被写体が存在する距離の分布(被写体の距離別ヒストグラム)を求める。距離情報は、画素値が撮像画像内に出現する被写体の距離(被写体距離)を表す距離画像の形式である。したがって、被写体の距離別ヒストグラムは、距離画像の画素値の度数、つまり被写体距離の分布頻度を示す。S402の処理により、撮像画像データ(図6(A)参照)に対応する被写体距離の分布頻度が得られる。図10(A)は、被写体の距離別ヒストグラムを示す。図10(A)の横軸は奥行き方向の距離を表し、縦軸は分布頻度を表す。
Next, the divided image generation process will be described with reference to the flowchart of FIG. 5 and FIGS. 6 and 10. FIG. 10 is an explanatory diagram of the divided image generation process. It is assumed that the maximum number of divided images N = 5.
In S401 of FIG. 5, the value of the reference variable (denoted i) of the depth-division image data is initialized to zero (i = 0). In step S <b> 402, the
図5のS403において、分割処理部201は、被写体の距離別ヒストグラムから、i番目の分割区間に対する距離範囲情報を算出する。最大分割画像数Nで区切る距離範囲については、予め不揮発性メモリ106に定数としてデータが保持される。分割処理部201が、図10(A)の距離別ヒストグラムを用いて、被写体の出現頻度が低い距離の順にN個の分割範囲(距離範囲)を決定してもよい。その結果、図10(B)に示す距離範囲情報が得られる。N=5の場合、分割処理部201は、図10(A)に示す被写体の距離別ヒストグラムを、横軸方向に5分割することにより、図10(B)に示す分割1から分割5という5つに分割された距離範囲を決定する。
In S403 of FIG. 5, the
図5のS404において、マスク生成処理部202はi番目の距離範囲情報から、分割画像生成用マスクデータを生成する。具体的には、S403で算出されたi番目の分割画像に対する距離範囲情報を用いて、距離情報である距離画像に対して、画素値を2値化する処理が実行される。つまり、距離範囲内の画素値を1とし、距離範囲外の画素値を0とする処理が行われ、分割画像生成用マスクデータが生成される。
In S404 of FIG. 5, the mask
S405において、データ生成処理部203は、撮像画像データとi番目の分割画像生成用マスクデータを用いて、i番目の分割画像データを生成する。具体的には、撮像画像データの各画素に対して、分割画像生成用マスクデータの画素値を乗算する処理が実行される。それにより、分割画像生成用マスクデータの画素値が1である領域のみが、撮像画像データからそれぞれ抽出され、図10(B)の奥行き分割画像1〜5のデータが生成される。
In step S405, the data
次にS406において、参照変数iのインクリメントが行われて、i値が1だけ増加する。S407では、参照変数iの値が最大分割画像数Nと比較され、「i>N」であるか否かが判定される。参照変数iの値が最大分割画像数Nより大きい場合、分割画像生成処理を終了する。参照変数iの値が最大分割画像数N以下である場合、S403に戻って処理を続行する。分割画像生成部108は以上の処理を行うことで、撮像画像データに対し、最大分割画像数N個の距離範囲で分割した奥行き分割画像のデータを、表示先の表示デバイスに応じて生成する。
Next, in S406, the reference variable i is incremented and the i value is increased by one. In S407, the value of the reference variable i is compared with the maximum number of divided images N, and it is determined whether or not “i> N”. If the value of the reference variable i is larger than the maximum number N of divided images, the divided image generation process ends. If the value of the reference variable i is equal to or less than the maximum number of divided images N, the process returns to S403 and continues. By performing the above processing, the divided
図11を参照して、表示例を説明する。図11は、異なる表示デバイスへの表示例を示す図である。図11(A)に示すように表示デバイスAの画面1101には、奥行き分割画像データから生成された第1の表示画像像データ(図7(A)参照)が表示される。ユーザは、撮像画像データ内のすべての距離範囲に含まれる被写体を視認し、所望の被写体画像を選択することが可能となる。図11(A)の例では表示デバイスAによって、被写体の深度情報に対応する異なるレイヤーごとに複数の奥行き分割画像がそれぞれ表示され、太線枠で示すように分割画像のうちの1つの画像(近距離の分割画像)が初期選択状態に設定される。
A display example will be described with reference to FIG. FIG. 11 is a diagram illustrating a display example on different display devices. As shown in FIG. 11A, on the
また図11(B)に示すように表示デバイスBの画面1102には、撮像画像中の検出された被写体に対応するオブジェクト画像から生成された第2の表示画像データ(図9(A)参照)が表示される。ユーザは撮像画像内の主たる被写体や、画像処理部107が処理可能な被写体を簡易的に視認し、所望の被写体画像を選択することが可能となる。図11(B)の例では表示デバイスBによって、被写体の深度情報に対応する異なるレイヤーごとに複数のオブジェクト画像がそれぞれ表示され、太線枠で示すようにそのうちの1つの画像(顔属性の被写体画像)が初期選択状態に設定される。なお、表示デバイスBのように、第2の表示画像データを表示する表示デバイスに対しては、画像編集中の表示目的に応じて、多様な表示切り替えが可能である。第2の表示画像データの表示と、通常の画像再生時の表示を切り替えたり、または、これらの2つの表示を任意の割合で合成したりすることで両立させてもよい。例えば、選択された被写体画像に対して画像処理が施された場合、任意の期間に画像編集データの表示へ切り替えが行われる。ユーザは、表示デバイスAまたはBの最初の表示画面上で初期選択状態の画像を選択する操作が可能であり、また所定の操作(スライドバー操作等)を行うことにより当該画像以外の分割画像を選択することも可能である。
As shown in FIG. 11B, the
本実施例では、撮像画像データに関連する距離情報を利用して、撮像画像データを被写体の距離範囲に応じて複数の画像に分割し、各分割画像をユーザが選択可能に提示する。また、表示先の表示デバイス情報により、表示画像の生成処理を切り換えることで、表示デバイスに対応した表示を行うことが可能となる。すなわち、表示デバイスの解像度や画面サイズに応じて、特定の距離に存在する被写体を対象とした画像データを、ユーザに提供できる。ユーザが画像編集を行う際に画像処理対象の選択が容易となり、利便性が向上する。 In the present embodiment, the distance information related to the captured image data is used to divide the captured image data into a plurality of images according to the distance range of the subject, and each divided image is presented to be selectable by the user. Also, by switching the display image generation process according to the display device information of the display destination, it becomes possible to perform display corresponding to the display device. That is, it is possible to provide the user with image data for a subject existing at a specific distance in accordance with the resolution and screen size of the display device. When the user edits an image, it is easy to select an image processing target, and convenience is improved.
[実施例2]
次に本発明の実施例2を説明する。本実施例では、撮像画像に関連する距離情報を用いて撮像画像内の被写体を類別し、検出された複数の被写体領域から所定数以下の被写体領域を抽出する処理を説明する。本実施例にて実施例1と同様の構成要素については既に使用した符号を用いることで、それらの詳細な説明を省略し、主に相違点を説明する。
[Example 2]
Next, a second embodiment of the present invention will be described. In this embodiment, a process of classifying subjects in a captured image using distance information related to the captured image and extracting a predetermined number of subject regions from a plurality of detected subject regions will be described. In the present embodiment, the same reference numerals as those used in
図12は撮像装置100の構成例を示すブロック図である。個人認証部1216は、被写体検出部114によって属性が人物の顔であると判定された被写体に対して個人認証処理を行う。その際、個人認証部1216は、不揮発性メモリ106に記録されている個人認証用の辞書データを参照する。不揮発性メモリ106には、個人認証の対象である被写体の顔をユーザが予め撮影した画像に基づき、当該被写体の顔の特徴量を抽出した辞書データが登録されている。個人認証部1216は、検出された人物の顔画像が登録されている辞書データと同一人物の顔画像であるか否かを判定し、判定結果をメモリ105へ格納する。
FIG. 12 is a block diagram illustrating a configuration example of the
合焦度算出部1217は、被写体検出部114によって検出された各被写体に対して、合焦度を算出し、算出結果をメモリ105へ格納する。本実施例の合焦度は、撮像画像データから検出した画像のコントラスト情報から算出され、画像のコントラストが高いほど、合焦度が高いと判定される。
The focus
被写体抽出部1218は、システム制御部103からの指示により、各々の奥行き分割画像に表示する被写体領域を抽出し、抽出結果をメモリ105へ格納する。被写体抽出部1218は、ユーザが画像処理対象を選択するために表示デバイスの画面上を手指でタッチして被写体を選択したときに、意図する被写体を正確に選択するために被写体領域を抽出する。例えば撮像画像内に多数の被写体画像が密集している場合を想定する。この場合、ユーザの意図していない周囲の被写体が選択されてしまうことを避ける必要がある。そのために被写体抽出部1218は属性に基づいて複数の被写体を類別し、画像処理時に選択される可能性の高い被写体領域を奥行き分割画像ごとに推定して抽出することで、被写体を選択しやすくする。抽出される被写体領域は、個人認証部1216および合焦度算出部1217の処理結果から決定され、被写体領域情報としてメモリ105へ格納される。なお、本実施例に限らず、個人認証部1216の処理結果から撮像画像内の被写体領域を優先的に抽出する方法や、合焦度算出部1217の処理結果から撮像画像内の被写体領域を優先的に抽出する方法がある。あるいは個人認証結果や合焦度以外に基づく別の方法で処理を行ってもよい。また、抽出する被写体の数が所定数よりも多い場合には、奥行き分割画像ごとに、抽出する被写体数に上限を設けてもよい。
The
図13および図4を参照して、本実施例における処理例を説明する。実施例1と相違する処理はS1305からS1307、S312の処理である。
図13のS1305において個人認証部1216は、S304で検出された顔属性の被写体に対し、不揮発性メモリ106に格納されている個人認証用の辞書データと照合し、処理結果をメモリ105に格納する。S1306において合焦度算出部1217は、システム制御部103の指示により、S304で検出された各被写体に対して画像のコントラスト情報から合焦度を算出し、算出結果をメモリ105に格納する。S1307において被写体抽出部1218は、システム制御部103の指示により、S304で検出された被写体の中から一部の被写体を抽出し、抽出結果をメモリ105に格納する。抽出する被写体は、S1305およびS1306で行った処理結果に基づき決定される。被写体の抽出方法の詳細については後述する。
A processing example in the present embodiment will be described with reference to FIGS. 13 and 4. The processing different from the first embodiment is the processing from S1305 to S1307 and S312.
In S1305 of FIG. 13, the
図4のS312において、ユーザ操作が奥行き分割画像に対する画像処理操作であるか否かについて判定処理が行われる。本実施例にて奥行き分割画像の選択は、表示デバイスがタッチパネル形式の場合、表示画像の画面内での座標指定により行われる。ユーザによるタッチ操作が検出された際、システム制御部103は表示画像上でタッチされた座標から、S309またはS318で生成された選択情報を用いて、奥行き分割画像データが選択される。この他にも、奥行き分割画像データの選択操作時に、操作部109によるキー入力に対応した分割画像を強調表示してユーザに提示してもよい。ユーザ操作が奥行き分割画像に対する画像処理操作である場合、S313に進み、ユーザ操作が奥行き分割画像に対する画像処理操作でない場合、S314に進む。
In S <b> 312 of FIG. 4, a determination process is performed as to whether or not the user operation is an image processing operation for a depth-division image. In the present embodiment, when the display device is in the touch panel format, the depth division image is selected by specifying the coordinates of the display image on the screen. When a touch operation by the user is detected, the
次に図14から図16を参照して、図13のS1307に示す被写体の抽出方法について説明する。S901において被写体抽出部1218は、処理対象の奥行き分割画像を1枚決定する。最初の実行時には、一番手前の奥行き分割画像が選択される。後述するS902からS909の処理を実行した後に、再びS901を実行する場合には、まだ処理を行っていない奥行き分割画像のうちで、一番手前の奥行き分割画像が処理対象に決定される。本実施例では、手前から順番に処理を行うものとして説明するが、処理の順番はこれに限らずに任意に決定可能である。
Next, the subject extraction method shown in S1307 in FIG. 13 will be described with reference to FIGS. In step S901, the
S902において被写体抽出部1218は、決定した1枚の奥行き分割画像に対して、検出された被写体の数を上限(以下、上限被写体数といい、Mと記す)と比較する。本実施例では、上限被写体数Mは、奥行き分割画像ごとにそれぞれ決定される。例えば上限被写体数Mについては、距離や画角等を加味して撮像装置が自動で決定してもよいし、ユーザ操作によって指定できるように構成してもよい。以下では、分割画像J(J=1〜5)に対する上限値を、「上限値J」と表記し、各上限値が事前に決定された例で説明する。なお、上限値Jを奥行き分割画像ごとに決定するのではなく、各奥行き分割画像の上限被写体数を同じ数に設定する形態、あるいは被写体の選択しやすさを考慮して、表示解像度に応じて上限被写体数を設定または変更する形態でもよい。
In step S <b> 902, the
S902にて、検出された被写体の数が上限被写体数Mより大きい場合、S903に進み、上限被写体数Mを超えていない場合にはS908へ移行する。例えば、S902の処理において、図6(A)の撮像画像データに対して、図6(B)の奥行き分割画像が生成され、図8(A)に示す被写体の検出結果が得られた場合を想定する。この場合、図6(B)の各奥行き分割画像1〜5では検出された被写体の数が上限被写体数M、つまり各上限値1〜5を超えないので、それぞれの奥行き分割画像に対してS908の処理が実行される。S908において被写体抽出部1218は、奥行き分割画像の中の被写体すべてを抽出対象として決定し、抽出した結果をメモリ105に格納する。
If the number of detected subjects is larger than the upper limit subject number M in S902, the process proceeds to S903, and if the upper limit subject number M is not exceeded, the process proceeds to S908. For example, in the processing of S902, the case where the depth division image of FIG. 6B is generated for the captured image data of FIG. 6A and the detection result of the subject shown in FIG. 8A is obtained. Suppose. In this case, since the number of detected subjects does not exceed the upper limit subject number M, that is, the
図15は、ある奥行き分割画像にて検出された被写体の数が上限被写体数Mを超える場合を例示する。図15(A)に示す撮像画像データに対して、図15(B)の奥行き分割画像1から5が生成される。図15(C)は撮像画像に対する被写体検出結果を示す。この場合、図15(B)の奥行き分割画像2では、検出された被写体の数が上限被写体数Mを超えており、その他の奥行き分割画像1,3〜5では検出された被写体の数が上限被写体数Mを超えていない。よって、奥行き分割画像2に対してS903以降の処理が実行され、それ以外の奥行き分割画像に対してS908の処理が実行される。
FIG. 15 illustrates a case where the number of subjects detected in a certain depth-divided image exceeds the upper limit subject number M. For the captured image data shown in FIG. 15A, depth-
S903で被写体抽出部1218は、処理対象である奥行き分割画像内の被写体画像のうち、S1305による個人認証処理で認証された被写体画像を抽出し、抽出した結果をメモリ105に格納する。S904で被写体抽出部1218は、処理対象である奥行き分割画像内の各被写体に対して、合焦度算出部1217により算出された合焦度の高い被写体から順に順位づけを行い、順位づけの結果をメモリ105に格納する。S905で被写体抽出部1218は、S903で抽出された被写体の数が上限被写体数Mを超えているか否かを判定する。抽出された被写体の数が上限被写体数Mより大きい場合、S906の処理に進み、抽出された被写体の数が上限被写体数Mを超えていない場合にはS907の処理へ移行する。
In step S <b> 903, the
S906にて被写体抽出部1218は、S903で抽出した被写体画像から所定数の被写体画像を抽出する。所定数とは、例えば上限被写体数Mであり、S904の処理結果に基づき、合焦度の高い順にM個の被写体画像が抽出されて、抽出結果がメモリ105に格納される。
In step S906, the
一方、S907にて被写体抽出部1218は、個人認証された被写体以外から、合焦度の高い被写体画像を、S903で抽出した被写体画像の数と合わせて上限被写体数Mまで抽出する。具体的には、上限被写体数Mを3とし、S903で抽出されなかった被写体画像の数を3とする。S903で抽出された被写体画像の数が1である場合、S904の処理結果から合焦度の高い順に、2つの被写体画像が抽出される。つまり、S903で抽出された被写体画像の数と合わせて、M=3になるように被写体画像が抽出され、抽出結果がメモリ105に格納される。
On the other hand, in step S907, the
S906、S907、S908の処理後、S909において被写体抽出部1218は、すべての奥行き分割画像に対して抽出処理が完了したか否かを判定する。すべての奥行き分割画像に対して被写体抽出処理が完了した場合、一連の処理を終える。また、未処理である奥行き分割画像が存在する場合には、S901に戻って処理を続行する。
本実施形態では、S903での個人認証結果およびS904での合焦度に基づく被写体画像の抽出処理を例示したが、個人認証結果または合焦度から該当する被写体画像を決定してもよい。
After the processing of S906, S907, and S908, the
In the present embodiment, the subject image extraction process based on the personal authentication result in S903 and the in-focus degree in S904 is exemplified, but the corresponding subject image may be determined from the individual authentication result or the in-focus degree.
図16は、表示デバイスの画面表示例を示す。図15(A)の撮像画像データに対して、分割画像2の4人の被写体のうち、顔が検出された2人の被写体画像が抽出された場合を説明する。図16(A)は表示デバイスAの表示例を示し、図16(B)は表示デバイスBの表示例を示す。いずれの表示例でも、抽出された被写体がユーザに分かりやすく表示される。 FIG. 16 shows a screen display example of the display device. A case will be described in which, from the captured image data in FIG. 15A, two subject images in which a face is detected among the four subjects in the divided image 2 are extracted. 16A shows a display example of the display device A, and FIG. 16B shows a display example of the display device B. In any display example, the extracted subject is displayed in an easy-to-understand manner for the user.
図16(A)に示すように、表示デバイスの表示解像度が閾値以上である場合、複数のレイヤーにそれぞれ割り当てられた奥行き分割画像が表示される。図13のS303での被写体検出結果の際に取得された被写体の領域情報を参照して、マスク生成処理部202は、抽出された被写体と、抽出されなかった被写体とを分離するためのマスクデータを生成する。データ生成処理部203は、生成されたマスクデータを用いて奥行き分割画像のデータを生成する。分割画像生成用マスクデータの例は、以下の通りである。
・抽出された被写体に対応する被写体領域内の値が1に設定される。
・抽出されなかった被写体領域内の値が0.5に設定される。
・それ以外の領域の値は0に設定される。
As shown in FIG. 16A, when the display resolution of the display device is equal to or higher than the threshold value, the depth-divided images respectively assigned to the plurality of layers are displayed. Referring to the subject area information acquired at the time of the subject detection result in S303 in FIG. 13, the mask
The value in the subject area corresponding to the extracted subject is set to 1.
The value in the subject area that has not been extracted is set to 0.5.
-The values of other areas are set to 0.
撮像画像データの各画素値に対して、分割画像生成用マスクデータの画素値を乗算する処理が実行される。それにより、抽出されなかった被写体の画像は暗く表示され、抽出された被写体の画像は所定の明るさで表示される。したがって、ユーザは個人認証された被写体の画像を容易に視認できる。 A process of multiplying each pixel value of the captured image data by the pixel value of the divided image generation mask data is executed. Thereby, the image of the subject that has not been extracted is displayed darkly, and the extracted image of the subject is displayed with a predetermined brightness. Therefore, the user can easily visually recognize the image of the subject that has been personally authenticated.
また、図16(B)に示すように、表示デバイスの表示解像度が閾値未満である場合、各被写体の属性情報に応じて被写体の画像がそれぞれ表示される。この場合、オブジェクト画像データを表示する際に、抽出されなかった被写体の画像は暗く表示され、その大きさは、抽出された被写体の画像に比べて小さく表示される。ユーザは、抽出された被写体の画像と、抽出されなかった被写体の画像とを、明確に区別して視認できる。 Further, as shown in FIG. 16B, when the display resolution of the display device is less than the threshold value, the subject image is displayed according to the attribute information of each subject. In this case, when the object image data is displayed, the image of the subject that has not been extracted is displayed darkly, and the size thereof is displayed smaller than that of the extracted image of the subject. The user can clearly distinguish between the extracted subject image and the unextracted subject image.
本実施例では、画像編集の際に、選択可能な被写体画像を抽出することにより、処理対象の選択を正確に行える画像処理装置を提供できる。図16(A)および(B)は表示の一例を示したものであり、表示の仕方はこれに限ったものではなく、抽出されなかった被写体の画像を半透明状態で表示する等、他の方法で行ってもよい。また、抽出された被写体の中にユーザの指定したい被写体がいる場合、対象の被写体をユーザ操作で選択した上で画像処理が行われる。一方で、抽出された被写体の中にユーザの指定したい被写体が含まれていない場合には、ユーザが所望の表示形態を切り替えることができるように、ユーザインターフェースが構成される。例えばユーザは、表示デバイスの種別にかかわらず、図16(A)または(B)の表示画面を任意に切り替えることが可能である。ユーザが表示の切り替え操作を行った場合、例えば、最初に抽出された被写体以外の被写体の画像について再び図13のS1307を実行することにより、他の被写体画像を抽出することができる。 In this embodiment, it is possible to provide an image processing apparatus capable of accurately selecting a processing target by extracting a selectable subject image at the time of image editing. FIGS. 16A and 16B show an example of display. The display method is not limited to this, and other images such as a semi-transparent image of an object that has not been extracted are displayed. You may carry out by the method. If there is a subject that the user wants to specify among the extracted subjects, image processing is performed after the target subject is selected by a user operation. On the other hand, if the extracted subject does not include the subject that the user wants to specify, the user interface is configured so that the user can switch the desired display form. For example, the user can arbitrarily switch the display screen of FIG. 16A or FIG. 16B regardless of the type of display device. When the user performs a display switching operation, for example, another subject image can be extracted by executing S1307 in FIG. 13 again on the subject image other than the subject extracted first.
また被写体抽出処理において、撮像装置に接続された表示デバイスの表示解像度(または画面サイズ)に応じて上限被写体数Mを決定してもよい。例えば、表示解像度が低い表示デバイスほど、上限被写体数Mが小さい値に設定される。表示解像度が低い場合でもユーザは所望の被写体を正確に選択することができる。 In the subject extraction process, the upper limit subject number M may be determined according to the display resolution (or screen size) of the display device connected to the imaging apparatus. For example, the lower the display resolution, the smaller the upper limit subject number M is set for the display device. Even when the display resolution is low, the user can accurately select a desired subject.
[その他の実施例]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Examples]
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
101 撮像部
103 システム制御部
104 距離情報取得部
107 画像処理部
108 分割画像生成部
109 操作部
114 被写体検出部
115 オブジェクト画像生成部
116,1216 個人認証部
117,1217 合焦度算出部
118 分割画像初期選択決定部
1218 被写体抽出部
DESCRIPTION OF
Claims (17)
前記深度情報を用いて、前記撮像画像のデータから、それぞれが異なる深さ方向の範囲に対応する複数の画像の画像データを生成する生成手段と、
前記複数の画像のいずれかを選択する選択手段と、
前記生成手段により生成された画像データを表示デバイスへ出力して前記複数の画像のうちの1つの画像を、前記選択手段により最初の表示で選択可能な初期選択状態とする制御手段と、
前記選択手段により選択された画像に対して画像処理を行う画像処理手段と、を備える
ことを特徴とする画像処理装置。 An acquisition unit configured to acquire a captured image and depth information indicating a depth of each subject in the captured image;
Generating means for generating image data of a plurality of images each corresponding to a range in a different depth direction from the data of the captured image using the depth information;
Selecting means for selecting any of the plurality of images;
Control means for outputting the image data generated by the generation means to a display device and setting one of the plurality of images to an initial selection state selectable by the selection means in an initial display;
An image processing apparatus comprising: an image processing unit that performs image processing on the image selected by the selection unit.
前記検出手段により検出された被写体の顔画像から個人を認証する認証手段と、を備える
ことを特徴とする請求項1に記載の画像処理装置。 Detecting means for detecting the attribute and position of the subject in the captured image;
The image processing apparatus according to claim 1, further comprising: an authentication unit that authenticates an individual from the face image of the subject detected by the detection unit.
ことを特徴とする請求項2に記載の画像処理装置。 The control unit sets the image including the face image of the subject authenticated by the authentication unit to the initial selection state with respect to the subject region in the image generated by the generation unit. The image processing apparatus described.
前記検出手段により検出された被写体の画像の合焦度を算出する算出手段を備え、
前記制御手段は、前記生成手段により生成された画像内に存在する被写体に対して前記算出手段の算出した合焦度が第1の合焦度である第1の画像と、前記第1の合焦度よりも高い第2の合焦度である第2の画像のうち、前記第2の画像を前記初期選択状態とする
ことを特徴とする請求項1に記載の画像処理装置。 Detecting means for detecting the attribute and position of the subject in the captured image;
Calculating means for calculating the degree of focus of the image of the subject detected by the detecting means;
The control means includes a first image whose degree of focus calculated by the calculation means is a first focus degree on a subject existing in the image generated by the generation means, and the first focus. The image processing apparatus according to claim 1, wherein the second image is set to the initial selection state among the second images having a second in-focus degree higher than the in-focus degree.
ことを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。 The initial selection state is a state in which one of the plurality of images displayed for each different layer corresponding to the depth information by the display device can be selected by the selection unit. The image processing apparatus according to claim 1.
前記撮像画像内の被写体の属性および位置を検出する検出手段と、
前記検出手段により検出された被写体を類別して被写体領域を抽出する抽出手段と、
前記抽出手段により類別された前記被写体の情報、および前記深度情報を用いて、前記撮像画像のデータから、それぞれが異なる深さ方向の範囲に対応する複数の画像の画像データを生成する生成手段と、
前記複数の画像のいずれかを選択する選択手段と、
前記生成手段により生成された画像データを表示デバイスへ出力して前記複数の画像のいずれかを、前記選択手段により選択可能にする制御手段と、
前記選択手段により選択された画像に対して画像処理を行う画像処理手段と、を備える
ことを特徴とする画像処理装置。 An acquisition unit configured to acquire a captured image and depth information indicating a depth of each subject in the captured image;
Detecting means for detecting the attribute and position of the subject in the captured image;
Extracting means for classifying the objects detected by the detecting means to extract a subject area;
Generating means for generating image data of a plurality of images each corresponding to a range in a different depth direction from the data of the captured image using the information of the subject classified by the extracting means and the depth information; ,
Selecting means for selecting any of the plurality of images;
Control means for outputting the image data generated by the generating means to a display device and making any of the plurality of images selectable by the selecting means;
An image processing apparatus comprising: an image processing unit that performs image processing on the image selected by the selection unit.
前記抽出手段は、前記認証手段により認証された前記被写体の画像を優先的に抽出する
ことを特徴とする請求項6に記載の画像処理装置。 Comprising authentication means for authenticating an individual from the face image of the subject detected by the detection means;
The image processing apparatus according to claim 6, wherein the extraction unit preferentially extracts an image of the subject authenticated by the authentication unit.
前記抽出手段は、前記複数の被写体の画像から合焦度の高い被写体の画像を優先的に抽出する
ことを特徴とする請求項6に記載の画像処理装置。 Calculating means for calculating the degree of focus of the image of the subject detected by the detecting means;
The image processing apparatus according to claim 6, wherein the extraction unit preferentially extracts a subject image having a high degree of focus from the plurality of subject images.
ことを特徴とする請求項6に記載の画像処理装置。 The image processing apparatus according to claim 6, wherein the extraction unit extracts a subject area equal to or less than a predetermined number for each of the image data generated by the generation unit.
ことを特徴とする請求項1乃至9のいずれか1項に記載の画像処理装置。 The first generation unit that generates image data corresponding to the attribute of the subject and the second generation unit that generates image data of the plurality of images. 10. The image processing apparatus according to any one of items 9.
前記制御手段は、前記表示画像データを前記表示デバイスへ出力する制御を行う
ことを特徴とする請求項1乃至10のいずれか1項に記載の画像処理装置。 The generation unit generates display image data for displaying the plurality of images on different layers corresponding to the depth information,
The image processing apparatus according to claim 1, wherein the control unit performs control to output the display image data to the display device.
前記第1の表示画像データは、前記複数の画像が、近い深度情報の被写体を含む画像の順に手前に表示されるように奥行き方向に並べて配置されている画像データであり、
前記第2の表示画像データは、検出された被写体の画像が当該被写体の深度情報にしたがって配置されている画像データである
ことを特徴とする請求項11に記載の画像処理装置。 The control means outputs a first display image data generated by the generating means to a display device, and a second control outputs the second display image data generated by the generating means to the display device. 2 control,
The first display image data is image data arranged in the depth direction so that the plurality of images are displayed in the front in the order of images including a subject having near depth information.
The image processing apparatus according to claim 11, wherein the second display image data is image data in which an image of a detected subject is arranged according to depth information of the subject.
ことを特徴とする請求項12に記載の画像処理装置。 The control means acquires information about the display device, performs the first control when the display resolution or screen size of the display device is equal to or greater than a threshold, and displays the display resolution or screen size of the display device. The image processing apparatus according to claim 12, wherein the second control is performed when the value is less than a threshold value.
前記深度情報を用いて、前記撮像画像のデータから、それぞれが異なる深さ方向の範囲に対応する複数の画像の画像データを生成手段が生成する生成工程と、
制御手段が、前記生成手段により生成された画像データを表示デバイスへ出力して前記複数の画像のうちの1つの画像を、選択手段により最初の表示で選択可能な初期選択状態とする制御工程と、
画像処理手段が、前記選択手段により選択された画像に対して画像処理を行う画像処理工程と、を有する
ことを特徴とする画像処理装置の制御方法。 An acquisition step of acquiring a captured image and depth information indicating a depth in the depth direction of each subject in the captured image;
Using the depth information, a generation step in which a generation unit generates image data of a plurality of images corresponding to different ranges in the depth direction from the captured image data,
A control step, wherein the control means outputs the image data generated by the generation means to a display device, and sets one of the plurality of images to an initial selection state selectable by the selection means in an initial display; ,
An image processing unit comprising: an image processing step of performing image processing on an image selected by the selection unit.
検出手段により、前記撮像画像内の被写体の属性および位置を検出する検出工程と、
前記検出手段により検出された前記被写体を抽出手段が類別して被写体領域を抽出する抽出工程と、
前記抽出手段により類別された前記被写体の情報、および前記深度情報を用いて、前記撮像画像のデータから、それぞれが異なる深さ方向の範囲に対応する複数の画像の画像データを生成手段が生成する生成工程と、
制御手段が、前記生成手段により生成された画像データを表示デバイスへ出力して前記複数の画像のいずれかを、選択手段により選択可能にする制御工程と、
画像処理手段が、前記選択手段により選択された画像に対して画像処理を行う画像処理工程と、を有する
ことを特徴とする画像処理装置の制御方法。 An acquisition step of acquiring a captured image and depth information indicating a depth in the depth direction of each subject in the captured image;
A detection step of detecting the attribute and position of the subject in the captured image by a detection means;
An extraction step in which the extraction means classifies the subject detected by the detection means to extract a subject area;
Using the subject information classified by the extracting unit and the depth information, the generating unit generates image data of a plurality of images corresponding to different ranges in the depth direction from the captured image data. Generation process;
A control step, wherein the control means outputs the image data generated by the generation means to a display device, and allows the selection means to select any of the plurality of images; and
An image processing unit comprising: an image processing step of performing image processing on an image selected by the selection unit.
A program that causes a computer to function as each unit included in the image processing apparatus according to any one of claims 1 to 13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016160405A JP2018029270A (en) | 2016-08-18 | 2016-08-18 | Image processing apparatus, control method thereof, imaging apparatus, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016160405A JP2018029270A (en) | 2016-08-18 | 2016-08-18 | Image processing apparatus, control method thereof, imaging apparatus, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2018029270A true JP2018029270A (en) | 2018-02-22 |
Family
ID=61248578
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016160405A Pending JP2018029270A (en) | 2016-08-18 | 2016-08-18 | Image processing apparatus, control method thereof, imaging apparatus, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2018029270A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110956577A (en) * | 2018-09-27 | 2020-04-03 | Oppo广东移动通信有限公司 | Control method of electronic device, and computer-readable storage medium |
CN116091494A (en) * | 2023-04-07 | 2023-05-09 | 智洋创新科技股份有限公司 | Method for measuring distance of hidden danger of external damage of power transmission machinery |
EP4258638A1 (en) | 2022-01-04 | 2023-10-11 | Canon Kabushiki Kaisha | Image processing device, image processing method, and storage medium |
CN117880630A (en) * | 2024-03-13 | 2024-04-12 | 杭州星犀科技有限公司 | Focusing depth acquisition method, focusing depth acquisition system and terminal |
-
2016
- 2016-08-18 JP JP2016160405A patent/JP2018029270A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110956577A (en) * | 2018-09-27 | 2020-04-03 | Oppo广东移动通信有限公司 | Control method of electronic device, and computer-readable storage medium |
EP4258638A1 (en) | 2022-01-04 | 2023-10-11 | Canon Kabushiki Kaisha | Image processing device, image processing method, and storage medium |
CN116091494A (en) * | 2023-04-07 | 2023-05-09 | 智洋创新科技股份有限公司 | Method for measuring distance of hidden danger of external damage of power transmission machinery |
CN117880630A (en) * | 2024-03-13 | 2024-04-12 | 杭州星犀科技有限公司 | Focusing depth acquisition method, focusing depth acquisition system and terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102117050B1 (en) | Electronic device and method for human segmentation in image | |
JP6132490B2 (en) | Authentication apparatus, authentication method, and program | |
US9727585B2 (en) | Image processing apparatus and method for controlling the same | |
CN103916587A (en) | Photographing device for producing composite image and method using the same | |
CN104038690A (en) | IMAGE PROCESSING APPARATUS, IMAGE CAPTURING APPARATUS, and IMAGE PROCESSING METHOD | |
US8817122B2 (en) | Image pickup apparatus | |
JP2018029270A (en) | Image processing apparatus, control method thereof, imaging apparatus, and program | |
JP2016024489A (en) | Image processing apparatus, imaging device, image processing method, and program | |
JP5918996B2 (en) | Subject recognition apparatus and dictionary data registration method | |
US8368764B2 (en) | Digital photographing apparatus and method for controlling the same | |
CN108781252A (en) | A kind of image capturing method and device | |
US20160110909A1 (en) | Method and apparatus for creating texture map and method of creating database | |
JP2006309405A (en) | Meter recognition system, meter recognition method, and meter recognition program | |
JP2013254151A (en) | Image processing apparatus and image processing method | |
JP6410427B2 (en) | Information processing apparatus, information processing method, and program | |
JP2015035799A (en) | Information processing apparatus, imaging apparatus, information processing system, information processing method, and program | |
JP6175583B1 (en) | Image processing apparatus, actual dimension display method, and actual dimension display processing program | |
KR20190079503A (en) | Apparatus and method for registering face posture for face recognition | |
CN105323460B (en) | Image processing equipment and its control method | |
JP2017228874A (en) | Image processing apparatus and control method thereof, imaging device, program | |
JP2017228873A (en) | Image processing apparatus, imaging device, control method and program | |
US9049382B2 (en) | Image processing apparatus and image processing method | |
KR101305732B1 (en) | Method of block producing for video search and method of query processing based on block produced thereby | |
JP6478536B2 (en) | Image processing apparatus and imaging apparatus, and control method and program thereof | |
WO2022145294A1 (en) | Image processing apparatus, image capture apparatus, image processing method, and program |