JP2021180407A - Electronic apparatus - Google Patents
Electronic apparatus Download PDFInfo
- Publication number
- JP2021180407A JP2021180407A JP2020084883A JP2020084883A JP2021180407A JP 2021180407 A JP2021180407 A JP 2021180407A JP 2020084883 A JP2020084883 A JP 2020084883A JP 2020084883 A JP2020084883 A JP 2020084883A JP 2021180407 A JP2021180407 A JP 2021180407A
- Authority
- JP
- Japan
- Prior art keywords
- image
- region
- evaluation value
- electronic device
- distribution
- 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
Landscapes
- Image Processing (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、電子機器に関し、特に画像に対応する距離分布などの評価値分布(評価値マップ)を補正(修正)する技術に関する。 The present invention relates to an electronic device, and more particularly to a technique for correcting (correcting) an evaluation value distribution (evaluation value map) such as a distance distribution corresponding to an image.
評価値分布(評価値マップ)として画像と共に記録された距離分布に基づいて、当該画像を編集(加工)する画像処理が知られている。例えば、スマートフォンなどで用いられている背景ぼかし機能では、背景(主被写体以外の領域)にぼかしフィルターを適用することにより、背景をぼかすことができる。しかし、距離(距離情報)の取得に失敗している領域がある場合に、不自然な画像が生成されてしまう。ブラシツールで距離情報を補正(修正)するアプリケーションは存在するものの、スマートフォンの画面ような小さい画面上でブラシツールを用いる細かい操作は、ユーザの負担となる。 Image processing is known in which an image is edited (processed) based on a distance distribution recorded together with an image as an evaluation value distribution (evaluation value map). For example, in the background blur function used in smartphones and the like, the background can be blurred by applying a blur filter to the background (area other than the main subject). However, if there is an area where the acquisition of the distance (distance information) has failed, an unnatural image will be generated. Although there are applications that correct (correct) distance information with the brush tool, detailed operations using the brush tool on a small screen such as a smartphone screen are a burden on the user.
特許文献1では、画像情報と距離情報を用いて画像の領域を分割し、特定の領域の距離情報を他の領域の距離情報に基づいて補正する装置を提案している。 Patent Document 1 proposes a device that divides an image region using image information and distance information, and corrects the distance information of a specific region based on the distance information of another region.
しかしながら、特許文献1で提案されている装置では、主被写体が複数の領域にまたがって存在するか否かを判定して領域が自動で選択されるため、距離情報がユーザの意図通りに補正されないことがある。 However, in the apparatus proposed in Patent Document 1, since the region is automatically selected by determining whether or not the main subject exists over a plurality of regions, the distance information is not corrected as intended by the user. Sometimes.
そこで本発明は、ユーザが容易かつ意図通りに評価値を補正することができる電子機器を提供することである。 Therefore, the present invention provides an electronic device that allows a user to easily and intentionally correct an evaluation value.
本発明の電子機器は、画像の評価値分布を取得する取得手段と、第1のユーザ操作に応じて前記画像の一部に対応する第1の領域を選択し、第2のユーザ操作に応じて前記画像の一部に対応する第2の領域を選択する選択手段と、前記選択手段により選択された第1の領域の評価値として、前記選択手段により選択された第2の領域の評価値に基づく値を用いて所定の処理を行う処理手段とを有することを特徴とする。 The electronic device of the present invention selects an acquisition means for acquiring an evaluation value distribution of an image and a first region corresponding to a part of the image according to a first user operation, and responds to a second user operation. As an evaluation value of the selection means for selecting the second region corresponding to a part of the image and the first region selected by the selection means, the evaluation value of the second region selected by the selection means. It is characterized by having a processing means for performing a predetermined process using a value based on.
本発明によれば、ユーザは容易かつ意図通りに評価値を補正することができる。 According to the present invention, the user can easily and intentionally correct the evaluation value.
<実施例1>
以下、本発明の実施例1について、図面を参照して詳細に説明する。なお、以下では、本発明を適用した電子機器の一例であるカメラ(デジタルカメラ)について説明する。実施例1では、ユーザが選択した領域の評価値(例えば距離(距離情報))を、任意の領域の評価値に基づいて容易に補正(修正)する例について説明する。
<Example 1>
Hereinafter, Example 1 of the present invention will be described in detail with reference to the drawings. In the following, a camera (digital camera) which is an example of an electronic device to which the present invention is applied will be described. In the first embodiment, an example in which the evaluation value (for example, distance (distance information)) of a region selected by the user is easily corrected (corrected) based on the evaluation value of an arbitrary region will be described.
図1は、実施例1に係るカメラ100の機能構成の一例を示すブロック図である。カメラ100は、システム制御部101、ROM102、及び、RAM103を有する。さらに、カメラ100は、光学系104、撮像部105、A/D変換部106、画像処理部107、記録媒体108、領域抽出部109、画像加工部110、表示部111、操作部112、及び、バス113を有する。システム制御部101、ROM102、RAM103、撮像部105、A/D変換部106、画像処理部107、記録媒体108、領域抽出部109、画像加工部110、表示部111、及び、操作部112のそれぞれは、バス113に接続されている。
FIG. 1 is a block diagram showing an example of the functional configuration of the
システム制御部101は、カメラ100全体を制御する制御部であり、例えばCPUである。システム制御部101は、カメラ100が備える各ブロックの動作プログラムをROM102より読み出し、RAM103に展開して実行することにより、カメラ100が備える各ブロックの動作を制御する。
The
ROM102は、格納されているデータ(情報)を書き替え可能な不揮発性メモリであり、例えばフラッシュROMなどである。ROM102は、カメラ100が備える各ブロックの動作プログラムや、各ブロックの動作に必要なパラメータなどを記憶する。
The
RAM103は、格納されているデータ(情報)を書き替え可能な揮発性メモリであり、カメラ100が備える各ブロックの動作において出力されたデータの一時的な記憶領域として用いられる。システム制御部101と画像処理部107は、RAM103をワークメモリとして使用する。
The
光学系104は、被写体像(被写体の光学像)を撮像部105に結像する。光学系104には、例えば、固定レンズや、焦点距離を変更するための変倍レンズ、焦点調節を行うためのフォーカスレンズなどが含まれている。光学系104には絞りも含まれており、絞りを用いて光学系104の開口径を調節することにより、撮影時の光量が調節される。
The
撮像部105は、例えばCCDイメージセンサやCMOSイメージセンサなどの撮像素子である。撮像部105は、光学系104により撮像部105に結像された光学像を光電変換してアナログ画像信号を得る。撮像部105は、得られたアナログ画像信号をA/D変換部106に出力する。
The
A/D変換部106は、入力されたアナログ画像信号にA/D変換処理を適用してデジタル画像データを得る。A/D変換部106は、得られたデジタル画像データをRAM103に出力して記録する。
The A /
画像処理部107は、RAM103に格納されている画像データに対して画像処理を行う。例えば、画像処理部107は、ホワイトバランス調整や、色補間、縮小/拡大などの様々な画像処理を行う。画像処理部107は、対象の画像(画像データ)から当該画像の評価値分布(評価値マップ)を取得(生成)することもできる。画像処理部107は、画像処理後の画像をRAM103や記録媒体108に記録する。
The
記録媒体108は、例えば、カメラ100に対して着脱可能なメモリカードなどの記憶部である。記録媒体108には、画像処理部107で処理された画像や、画像加工部110で加工された画像、A/D変換部106でA/D変換された画像などが、記録画像として記録される。
The
領域抽出部109は、ユーザ操作に応じて、画像処理部107で処理された画像の一部に対応する領域を選択(抽出)する。例えば、領域抽出部109は、ユーザ操作があると、画像の画素値分布(色や輝度の分布)と、評価値マップとの少なくとも一方に基づいて、領域を抽出する。ここで、画素値分布は、画像処理部107で処理された画像の画素値分布や、A/D変換部106でA/D変換された画像の画素値分布などである。
The
画像加工部110は、画像処理部107で処理された画像や、A/D変換部106でA/D変換された画像を、評価値マップを用いて加工する。画像の加工は、例えば、背景ぼかし、リライティングなどである。画像加工部110は、加工後の画像をRAM103や記録媒体108に記録する。
The
表示部111は、例えば液晶モニタであり、ユーザ操作に応じて画像を表示する。例えば、表示部111は、RAM103や記録媒体108などに格納されている画像(画像処理部107で処理された画像や、画像加工部110で加工された画像、A/D変換部106でA/D変換された画像や記録媒体108に記録された画像などを表示する。
The
操作部112は、カメラ100に対するユーザ操作(ユーザからの指示)を受け付ける。例えば、操作部112は、表示部111の表示面上に設けられたタッチパネルを含む。ユーザは、操作部112を操作することにより、カメラ100の各種設定や各種情報などをカメラ100に入力することができる。
The
バス113は、カメラ100の複数のブロックを互いに接続する。カメラ100の複数のブロックは、バス113を介して信号のやり取りを行うことができる。
The
実施例1では、画像処理部107は、評価値分布として、画像一面のピント情報の分布を表すデフォーカス量分布を生成するものとする。以後、フォーカス量分布を距離マップと呼ぶこととする。デフォーカス量(ピント情報;距離情報)の算出方法は特に限定されないが、例えば、特開2008−15754号公報に記載の方法(画像の位相差から画像一面のピント情報を取得する方法)を用いてデフォーカス量を算出することができる。特開2008−15754号公報に記載の方法では、微小ブロックにおける一対の画素データを相対的にずらしながら、2つの画素データ間のずらし量に基づいてデフォーカス量を算出している。
In the first embodiment, the
図2(A)は、画像処理部107が処理を行った後の画像201を示す。画像201では、生垣の前に二人の人物が同じ距離で立っている。図2(B)は、画像201に対応する距離マップ202を示す。距離マップ202の各位置(各座標)は画像201の各位置に対応しており、画像処理部107で算出した画像201の各位置の距離情報が、距離マップ201の各位置で表されている。図2(B)では、距離情報(距離;デフォーカス量
)が濃淡で表されている。ここで、領域203の距離は、本来は領域204のように生垣に対応する距離であるが、二人の人物と同じ距離として誤算出されたとする。実施例1では、領域203の距離を領域204と同じ距離に容易に補正(修正)する例を説明する。
FIG. 2A shows an
図3は、実施例1に係る距離情報の補正処理の一例を示すフローチャートである。図3を用いて距離情報の補正処理について説明する。図3の補正処理は、例えば、距離情報を補正するアプリケーションの実行や、距離マップの補正(例えば、アプリケーションの一部の機能)の開始を指示するユーザ操作に応じて開始する。 FIG. 3 is a flowchart showing an example of the distance information correction process according to the first embodiment. The distance information correction process will be described with reference to FIG. The correction process of FIG. 3 is started in response to, for example, an execution of an application for correcting distance information or a user operation instructing the start of correction of a distance map (for example, a part of a function of the application).
ステップS301では、システム制御部101が、画像処理部107により生成された距離マップを表示部111に表示する(表示制御)。ここでは、図4(A)の距離マップが表示されるとする。図4(A)の距離マップは、図2の距離マップ202と同じである。
In step S301, the
ステップS302では、領域抽出部109が、表示された距離マップの一部(第1の領域)をユーザ操作に応じて抽出(選択)する。ここでは、図4(A)の操作401(距離マップ内の位置を指定する操作;距離マップ内の1か所にタッチする操作)に応じて、図4(B)の領域402(指定された位置を含む領域)が抽出されるとする。領域402は図2(B)の領域203と同じである。抽出された領域402は、図2(A)の画像201の、同じ位置及びサイズを有する領域に対応する。上述したように、領域抽出部109は、ユーザ操作があると、画像の画素値分布(色や輝度の分布)と、評価値マップとの少なくとも一方に基づいて、領域を抽出する。この処理の詳細は後述する。
In step S302, the
ステップS303では、システム制御部101が、ステップS302で抽出された第1の領域を表示部111で強調表示(識別可能に表示)する。ここでは、図4(B)に示すように、領域402が破線で強調表示されるとする。なお、強調表示の方法はこれに限られず、例えば、ストライプパターンなどで第1の領域が強調表示されてもよい。
In step S303, the
ステップS304では、システム制御部101が、所定の操作の有無に応じて、ステップS303で強調表示された第1の領域がユーザの所望の領域であるか否かを判定する。所望の領域でない場合は、ステップS302に処理が戻され、前回の処理よりも領域(画像や距離マップの全領域)が細かく分割されて第1の領域が再度抽出される。
In step S304, the
ステップS304の処理とステップS302の処理(再抽出)とについて、図5を用いて具体的に説明する。例えば、画像201のようなシーンで右の人物の服の色(色相など)と生垣の色とが似ていたとする。画像201の色情報を用いて第1の領域を抽出すると、領域分割のパラメータが適当でない場合に、図4(B)の領域402とは異なる図5の領域501が抽出されてしまうことがある。このように、ユーザの所望の領域とは異なる第1の領域が抽出されることがある。この場合に、ユーザは所望の位置を再度指定する(タップする)。この操作が行われると、システム制御部101は、抽出された第1の領域がユーザの所望の領域でないと判定する。そして、ステップS302に処理が戻される。ステップS302では、システム制御部101が領域分割のパラメータを再設定し、領域抽出部109が、再設定されたパラメータを用いて領域分割を行い、領域分割により得られた複数の領域のうち、ユーザが指定した位置を含む第1の領域を抽出する。これにより、ユーザは簡単な操作で所望の領域を選択できる。再設定されるパラメータの詳細は後述する。
The process of step S304 and the process (re-extraction) of step S302 will be specifically described with reference to FIG. For example, in a scene like
ステップS305では、領域抽出部109が、表示された距離マップの他の一部(領域402とは異なる第2の領域)をユーザ操作に応じて抽出(選択)する。ここでは、図4(B)の領域403が抽出されるとする。領域403は図2(B)の領域204と同じで
ある。ステップS305では、ステップS302と同様の方法で第2の領域が抽出されるとするが、そうでなくてもよい。例えば、ユーザが指定した位置とその周辺とを含む所定サイズの第2の領域が抽出されてもよい。
In step S305, the
ステップS306では、システム制御部101が、ユーザからの修正指示を受け付ける。修正指示は、図4(C)の操作404のように、ステップS305でユーザがタッチ(指定)した位置から、ステップS302で抽出された第1の領域内の位置までのドラッグ&ドロップ操作であるとする。ドラッグ&ドロップ操作は、タッチしたままタッチ位置を移動させる操作との言える。なお、ステップS305,S306におけるユーザ操作はこれに限られない。例えば、ステップS305では、タップに応じて第2の領域を抽出してもよいし、修正指示のためのボタン(表示アイテム)を表示部111に表示し、当該ボタンに対するタップを修正指示としてもよい。
In step S306, the
ステップS307では、システム制御部101が、ステップS302で抽出された第1の領域の距離情報がステップS305で抽出された第2の領域の距離情報に基づく値となるように、画像処理部107により生成された距離マップを補正する。具体的には、第1の領域における各位置の距離情報を、第2の領域の平均の距離情報に補正する。これにより、図4(A)の距離マップが図4(D)の距離マップに補正される。なお、補正に用いる値は、第2の領域の複数の距離情報の平均値に限られず、第2の領域を代表する他の距離情報(他の代表値)であってもよい。例えば、補正に用いる値は、第2の領域の複数の距離情報の中央値、最頻値、最大値、最小値などであってもよいし、第2の領域の重心位置に対応する距離情報などであってもよい。
In step S307, the
ステップS308では、システム制御部101が、ステップS307の補正後の距離マップを保存するユーザ操作(保存操作)があったか否かを判定する。保存操作があると、システム制御部101は、補正後の距離マップをRAM103や記録媒体108などに保存(記録)する。そして、図3の補正処理が終了する。保存操作が無ければ、ステップS302に処理が戻され、必要に応じて他の領域の距離情報が補正される。
In step S308, the
ステップS302,S305の領域抽出について詳細に説明する。領域抽出の方法は特に限定されないが、例えば、特開2014−68279号公報に記載の方法を用いることができる。特開2014−68279号公報に記載の方法では、画像の色情報を用いて領域分割が行われ、入力位置に対応する領域が選択される。図6は、実施例1に係る領域抽出(ステップS302,S305)の一例を示すフローチャートである。図6を用いて領域抽出について説明する。ここでは、画像の一部を抽出する例を説明するが、画像全体が距離マップ全体に対応するため、画像の一部を抽出する処理は、距離マップの一部を抽出する処理とも言える。 The area extraction in steps S302 and S305 will be described in detail. The method of region extraction is not particularly limited, but for example, the method described in JP-A-2014-68279 can be used. In the method described in JP-A-2014-68279, region division is performed using the color information of the image, and the region corresponding to the input position is selected. FIG. 6 is a flowchart showing an example of region extraction (steps S302 and S305) according to the first embodiment. Region extraction will be described with reference to FIG. Here, an example of extracting a part of the image will be described, but since the entire image corresponds to the entire distance map, the process of extracting a part of the image can be said to be the process of extracting a part of the distance map.
ステップS601では、領域抽出部109が、画像を複数の領域に分割する(領域分割)。
In step S601, the
まず、領域抽出部109は、画像を複数のブロックに分割する。次に、領域抽出部109は、複数のブロックのそれぞれについて、そのブロック内の複数の画素の色相の平均値を、当該ブロックを代表する色相(代表値)として算出する。なお、代表値は平均値に限られず、例えば、中央値、最頻値、最大値、最小値などであってもよい。代表値はブロックの重心位置に対応する色相などであってもよい。次に、領域抽出部109は、各ブロックの代表値を要素とした色相のヒストグラムを作成する。このとき、彩度が閾値以上のブロックのみを用いてヒストグラムを作成することが好ましい。これは、彩度の低いブロックは色相の値の信頼性が低いためである。次に、領域抽出部109は、作成したヒストグラムを用いて、複数のブロックを同一色領域にグルーピングすることによって、画像を複
数の領域に分割する(領域分割)。
First, the
グルーピングによる領域分割について、図7(A)〜7(C)を用いて説明する。 Region division by grouping will be described with reference to FIGS. 7 (A) to 7 (C).
まず、図7(A)に示すように、ヒストグラムの全区間を走査し、最も高い山HighestPeak1(頻度の最大値)を検出する。次に、検出した山から左右両側の谷方向に向かって走査し、ヒストグラムの頻度が閾値TH_Freq以下となる位置、または、検出した山からの区間の距離が閾値TH_HueRangeに達する位置までの区間を、同一色領域の区間(範囲)として検出する。そして、検出した区間に代表値が含まれるブロックからなる領域を、検出した区間に対応する同一色領域としてグルーピングする。さらに、図7(B)に示すように、検出した区間をグルーピング処理済みの区間として記録する。 First, as shown in FIG. 7A, the entire section of the histogram is scanned to detect the highest peak HighestPeek1 (maximum frequency). Next, scanning from the detected mountain toward the valleys on both the left and right sides, the section from the position where the frequency of the histogram is equal to or less than the threshold TH_Freq or the position where the distance of the section from the detected mountain reaches the threshold TH_HueRanger is determined. Detected as a section (range) of the same color area. Then, the area consisting of blocks containing the representative value in the detected section is grouped as the same color area corresponding to the detected section. Further, as shown in FIG. 7B, the detected section is recorded as a grouping-processed section.
次に、ヒストグラムの全区間からグルーピング処理済みの区間を除いた区間を再び走査し、上記処理と同様の処理を行う。このとき、検出した山HighestPeak2から谷方向への走査において、閾値TH_Freq,TH_HueRangeに基づく上記2つの位置の一方に到達する前に、グルーピング処理済みの区間に到達することがある。その場合は、グルーピング処理済みの区間までの区間を、同一色領域の区間とする。これら一連の処理を、ヒストグラムの全区間がグルーピング処理済みとされるまで繰り返す。 Next, the section excluding the section that has been grouped from the entire section of the histogram is scanned again, and the same processing as the above processing is performed. At this time, in scanning from the detected mountain HighestPeek2 in the valley direction, the grouping-processed section may be reached before reaching one of the above two positions based on the threshold values TH_Freq and TH_HueRanger. In that case, the section up to the section that has been grouped is set as the section of the same color area. This series of processing is repeated until all the sections of the histogram are grouped.
最後に、図7(C)に示すように、全ブロックを走査し、ヒストグラムの同じ区間に対応する複数の同一色領域(互いに隣接しない複数の同一色領域)のそれぞれに異なるラベルを付与するラベリング処理を行う。これにより、同じ区間に対応する複数の同一色領域を異なるグループとして扱うことができる。つまり、同じ区間に対応する複数の同一色領域を区別することができる。 Finally, as shown in FIG. 7C, labeling is performed by scanning the entire block and assigning different labels to each of the plurality of identical color regions (multiple identical color regions that are not adjacent to each other) corresponding to the same section of the histogram. Perform processing. As a result, a plurality of same color regions corresponding to the same section can be treated as different groups. That is, it is possible to distinguish a plurality of identical color regions corresponding to the same section.
なお、ステップS304からステップS302に処理が戻された場合など、領域抽出を再度行う場合には、閾値TH_Freqと閾値TH_HueRangeの少なくとも一方が再設定される。例えば、前回の処理よりも領域が細かく分割されるように、閾値TH_Freqが高められたり、閾値TH_HueRangeが低減されたりする。 When the area extraction is performed again, such as when the process is returned from step S304 to step S302, at least one of the threshold value TH_Freq and the threshold value TH_HueRanger is reset. For example, the threshold value TH_Freq may be increased or the threshold value TH_HueRanger may be decreased so that the region is finely divided as compared with the previous processing.
図6の説明に戻る。ステップS602では、領域抽出部109が、領域分割により得た複数の領域のうち、ユーザが指定した位置に対応する領域を抽出する。
Returning to the description of FIG. In step S602, the
以上述べたように、実施例1によれば、第1の領域と第2の領域を選択するなどの簡単な操作で、第1の領域の評価値(距離情報)が第2の領域の評価値に基づく値となるように、取得された評価値分布が補正される。これにより、ユーザが容易かつ意図通りに評価値を補正することができる。 As described above, according to the first embodiment, the evaluation value (distance information) of the first region is the evaluation of the second region by a simple operation such as selecting the first region and the second region. The acquired evaluation value distribution is corrected so that the value is based on the value. As a result, the user can easily and intentionally correct the evaluation value.
なお、画像の色情報を用いて領域分割を行う例を説明したが、領域分割や領域抽出の方法はこれに限られない。例えば、距離情報を用いて領域分割を行ってもよい。具体的には、色相のヒストグラムの代わりに距離情報のヒストグラムを用いて図6と同様の領域分割を行ってもよい。色情報を用いた領域分割の結果と、距離情報を用いた領域分割の結果とをマージすることで、領域をより細かく分割してもよい。色情報の代わりに輝度情報を用いてもよい。グラフカット法を用いて、入力位置(ユーザによって指定された位置)からエネルギーが最小となる領域を抽出してもよい。 Although an example of performing region division using image color information has been described, the method of region division and region extraction is not limited to this. For example, the area may be divided using the distance information. Specifically, the same region division as in FIG. 6 may be performed by using the histogram of the distance information instead of the histogram of the hue. By merging the result of the area division using the color information and the result of the area division using the distance information, the area may be further divided. Luminance information may be used instead of color information. The graph cut method may be used to extract the region with the minimum energy from the input position (position specified by the user).
また、評価値分布としてデフォーカス量分布を用いた例を説明したが、評価値分布はデフォーカス量分布に限られない(評価値はデフォーカス量に限られない)。評価値は、何らかの評価を行った結果を示す値であればよい。例えば、評価値分布は、画像一面のブレ
度合い分布、画像一面の視差分布、各画素の被写体距離を示す深度分布(距離分布)、画像一面の法線方向分布、意味的領域分割の確立分布などであってもよい。確率分布は、例えば、画像一面の人物や植物、行動検知等の認識スコアの分布である。
In addition, although an example using a defocus amount distribution as the evaluation value distribution has been described, the evaluation value distribution is not limited to the defocus amount distribution (the evaluation value is not limited to the defocus amount). The evaluation value may be a value indicating the result of some evaluation. For example, the evaluation value distribution includes a blur degree distribution on one side of the image, a parallax distribution on one side of the image, a depth distribution (distance distribution) indicating the subject distance of each pixel, a normal direction distribution on one side of the image, and an established distribution of semantic region division. May be. The probability distribution is, for example, the distribution of recognition scores for people, plants, behavior detection, etc. on the entire image.
また、2つの画素データ間のずらし量に基づいて算出されたデフォーカス量を、距離情報として用いる例を説明したが、デフォーカス量や距離情報はこれに限られない。例えば、DFD(Depth From Defocus)方式の取得方法で、ピントや絞り値が異なる2枚の画像の相関からデフォーカス量を取得してもよい。TOF(Time of Flight)方式などの測距センサモジュールから得た距離分布に関連する情報を、距離情報として用いてもよい。 Further, an example of using the defocus amount calculated based on the shift amount between the two pixel data as the distance information has been described, but the defocus amount and the distance information are not limited to this. For example, in the DFD (Depth From Defocus) method acquisition method, the defocus amount may be acquired from the correlation between two images having different focus and aperture values. Information related to the distance distribution obtained from the distance measuring sensor module such as the TOF (Time of Flight) method may be used as the distance information.
また、表示部に距離マップを表示しながら距離情報の補正処理を行う例を説明したが、が、補正処理中の表示はこれ限られない。例えば、画像と補正対象の距離マップとの対応関係をユーザが認識しやすい他の表示が行われてもよい。具体的には、画像の複数の画素値に前記評価値分布を反映して、当該画像を表示部に表示するように、画像に距離マップを重畳表示してもよい。ユーザ操作に応じて距離マップの表示と画像の表示とが切り替え可能であってもよい。距離マップを表示し、選択された領域でだけ、距離マップでなく、画像を表示してもよい。 Further, although an example of performing the distance information correction process while displaying the distance map on the display unit has been described, the display during the correction process is not limited to this. For example, another display may be performed in which the user can easily recognize the correspondence between the image and the distance map to be corrected. Specifically, the distance map may be superimposed and displayed on the image so that the evaluation value distribution is reflected on a plurality of pixel values of the image and the image is displayed on the display unit. The display of the distance map and the display of the image may be switchable according to the user operation. You may want to display the distance map and display the image instead of the distance map only in the selected area.
<実施例2>
以下、本発明の実施例2について、図面を参照して詳細に説明する。なお、実施例1と同様の点(構成や処理など)については説明を省略または簡潔にする。実施例2では、距離マップに基づく加工済みの画像のうち、ユーザが選択した領域を、任意の領域の距離情報に基づいて再加工する例について説明する。実施例2に係るカメラの機能構成は、実施例1(図1)と同じである。
<Example 2>
Hereinafter, Example 2 of the present invention will be described in detail with reference to the drawings. The points (configuration, processing, etc.) similar to those in the first embodiment will be omitted or simplified. In the second embodiment, an example of reworking a region selected by the user among the processed images based on the distance map based on the distance information of an arbitrary region will be described. The functional configuration of the camera according to the second embodiment is the same as that of the first embodiment (FIG. 1).
実施例2に係る加工について、図8(A)〜8(B)を用いて説明する。図8(A)は、画像処理部107が処理を行った後の画像801を示す。画像801は図2(A)の画像201と同じである。図8(B)は、画像801に対応する距離マップ802を示す。距離マップ802は図2(B)の距離マップ202と同じであり、領域803は図2(B)の領域203と同じであり、領域804は図2(B)の領域204と同じである。
The processing according to the second embodiment will be described with reference to FIGS. 8 (A) to 8 (B). FIG. 8A shows an
図8(C)は、画像加工部110が距離マップ802に基づいて画像801にぼかし処理を施した画像805(加工後画像)である。ここでは、後ろの生垣を領域807(領域804に対応する領域)のようにぼかすことが所望の処理であるが、領域803の距離が二人の人物と同じ距離として誤算出されているため、図8(C)では領域806(領域803に対応する領域)はぼかされていない。実施例1のように距離マップ自体を補正し、補正後の距離マップを用いて再加工を行ってもよいが、実施例2では、ユーザが距離マップを意識しなくてもよいように、ユーザ操作に応じて領域806を領域807と同様に加工する例を説明する。なお、加工はぼかし処理に限られず、距離情報などの評価値に基づく他の処理であってもよい。
FIG. 8C is an image 805 (processed image) in which the
図9は、実施例2に係る加工結果の補正処理の一例を示すフローチャートである。図9を用いて加工結果の補正処理について説明する。図9の補正処理は、例えば、加工結果を補正するアプリケーションの実行や、加工結果の補正(例えば、アプリケーションの一部の機能)の開始を指示するユーザ操作に応じて開始する。 FIG. 9 is a flowchart showing an example of the correction process of the machining result according to the second embodiment. The correction processing of the processing result will be described with reference to FIG. 9. The correction process of FIG. 9 is started, for example, in response to an execution of an application for correcting the machining result or a user operation instructing the start of the correction of the machining result (for example, a part of the function of the application).
ステップS901では、システム制御部101が、画像加工部110による加工後の画像を表示部111に表示する。ここでは、図10(A)の画像が表示されるとする。図10(A)の画像は、図8の画像805と同じである。
In step S901, the
ステップS902〜S906の処理は、距離マップと加工後画像の違いを除いて、図3のステップS302〜S306の処理と同様である。図10(A)〜10(C)は、距離マップと加工後画像の違いを除いて、図4(A)〜4(C)と同様である。つまり、操作1001,1004は操作401,404に対応し、領域1002,1003は領域402,403に対応する。
The processing of steps S902 to S906 is the same as the processing of steps S302 to S306 of FIG. 3, except for the difference between the distance map and the processed image. 10 (A) to 10 (C) are the same as FIGS. 4 (A) to 4 (C) except for the difference between the distance map and the processed image. That is,
ステップS907では、システム制御部101が、第1の領域の加工に用いるパラメータを、第2の領域の加工に用いるパラメータに基づいて補正し、画像加工部110が、補正後のパラメータを用いて再加工を行う。具体的には、第1の領域における各位置のパラメータを、第2の領域の平均のパラメータに補正する。つまり、第2の領域の距離情報に基づくパラメータを用いて、第1の領域の再加工が行われる。これにより、図10(A)の画像が図10(D)の画像に補正される。なお、加工に用いるパラメータは特に限定されず、例えば、ぼかしフィルターの係数、ぼかしフィルターのサイズ、距離情報などである。また、補正に用いる値は、第2の領域の複数のパラメータの平均値に限られず、第2の領域を代表する他のパラメータ(他の代表値)であってもよい。例えば、補正に用いる値は、第2の領域の複数のパラメータの中央値、最頻値、最大値、最小値などであってもよいし、第2の領域の重心位置に対応するパラメータなどであってもよい。
In step S907, the
ステップS908では、システム制御部101が、ステップS907の再加工後の画像を保存するユーザ操作(保存操作)があったか否かを判定する。保存操作があると、システム制御部101は、再加工後の画像をRAM103や記録媒体108などに保存(記録)する。そして、図9の補正処理が終了する。保存操作が無ければ、ステップS902に処理が戻され、必要に応じて他の領域の再加工が行われる。
In step S908, the
<実施例3>
以下、本発明の実施例3について、図面を参照して詳細に説明する。なお、実施例1と同様の点(構成や処理など)については説明を省略または簡潔にする。実施例3では、ユーザ操作に応じて、第1の領域とは異なる複数の領域の間で、第2の領域を切り替える例について説明する。実施例3に係るカメラの機能構成は、実施例1(図1)と同じである。実施例3でも、実施例1と同様に、図2(B)の領域203の距離を領域204と同じ距離に容易に補正(修正)する例を説明する。
<Example 3>
Hereinafter, Example 3 of the present invention will be described in detail with reference to the drawings. The points (configuration, processing, etc.) similar to those in the first embodiment will be omitted or simplified. In the third embodiment, an example of switching the second area between a plurality of areas different from the first area according to the user operation will be described. The functional configuration of the camera according to the third embodiment is the same as that of the first embodiment (FIG. 1). In the third embodiment, similarly to the first embodiment, an example in which the distance of the
図11は、実施例3に係る距離情報の補正処理の一例を示すフローチャートである。図11を用いて距離情報の補正処理について説明する。図11の補正処理は、例えば、距離情報を補正するアプリケーションの実行や、距離マップの補正(例えば、アプリケーションの一部の機能)の開始を指示するユーザ操作に応じて開始する。 FIG. 11 is a flowchart showing an example of the distance information correction process according to the third embodiment. The distance information correction process will be described with reference to FIG. The correction process of FIG. 11 is started in response to, for example, an execution of an application for correcting distance information or a user operation instructing the start of correction of a distance map (for example, a part of a function of the application).
ステップS1101〜S1104の処理は、図3のステップS301〜S304の処理と同様である。図12(A),12(B)は、修正ボタン1203の表示を除いて、図4(A),4(B)と同様である。つまり、操作1201は操作401に対応し、領域1202は領域402に対応する。
The processing of steps S1101 to S1104 is the same as the processing of steps S301 to S304 of FIG. 12 (A) and 12 (B) are the same as those of FIGS. 4 (A) and 4 (B) except for the display of the
S1105では、システム制御部101が、ユーザからの修正指示があったか否かを判定する。実施例3の修正指示は実施例1と異なり、図12(B)の修正ボタン1203を選択(タップ)する操作1204であるとする。修正指示があった場合はステップS1106に処理が進められ、修正指示が無かった場合はステップS1108に処理が進められる。ステップS1108の処理は、図3のステップS308の処理と同様である。
In S1105, the
ステップS1106では、システム制御部101が、領域分割により得られた、第1の
領域とは異なる複数の領域のいずれかを、第2の領域として選択する。具体的には、システム制御部101は、実施例1で述べた領域分割と同様の方法で距離ヒストグラム(距離情報のヒストグラム)を複数の距離グループに分割し、第1の領域に対応しない距離グループを選択する。例えば、図13の距離ヒストグラムが、3つの距離グループ1301〜1303に分割される。そして、領域1202の距離情報が距離グループ1301に属しているとすると、距離グループ1302または距離グループ1303が選択される。距離グループの選択方法は特に限定されないが、領域1202の距離情報からの距離が長い順に距離グループを選択するとすると、最初に距離グループ1303が選択される。
In step S1106, the
ステップS1107では、システム制御部101が、ステップS1102で抽出された第1の領域の距離情報がステップS1106で選択した距離グループの距離情報に基づく値となるように、画像処理部107により生成された距離マップを補正する。具体的には、第1の領域における各位置の距離情報を、選択した距離グループの平均の距離情報に補正する。距離グループ1303が選択され場合には、図12(A)の距離マップが図12(C)の距離マップに補正される。なお、補正に用いる値は、選択された距離グループの平均の距離情報に限られず、選択された距離グループを代表する他の距離情報(他の代表値)であってもよい。例えば、補正に用いる値は、選択された距離グループの、中央値、最頻値、最大値、最小値などに対応する距離情報であってもよい。補正に用いる値は、選択された距離グループに対応する領域(第2の領域)の重心位置に対応する距離情報などであってもよい。
In step S1107, the
ここで、ステップS1107の補正がユーザの所望の補正でない、つまり選択された距離グループがユーザの所望の距離グループでないことがある。その場合は、図12(C)に示すように、ユーザは、操作1204と同様の操作1205(修正ボタン1203のタップ)を再度行う。これにより、ステップS1106の処理が再度行われる。ステップS1106では、第1の領域に対応しない複数の距離グループのうち、未選択の距離グループが選択される。例えば、距離グループ1303の次に距離グループ1301(領域1202の距離情報)から遠い距離グループ1302が選択される。そして、ステップS1107で、新たに選択した距離グループの距離情報に基づいて、第1の領域の距離情報が補正される。距離グループ1302が新たに選択され場合には、図12(C)の距離マップが図12(D)の距離マップに補正される。
Here, the correction in step S1107 may not be the correction desired by the user, that is, the selected distance group may not be the desired distance group by the user. In that case, as shown in FIG. 12C, the user performs the same operation 1205 (tap of the correction button 1203) as in the operation 1204 again. As a result, the process of step S1106 is performed again. In step S1106, an unselected distance group is selected from the plurality of distance groups that do not correspond to the first region. For example, the
以上述べたように、実施例3によれば、ユーザが第2の領域を指定することなく、ボタン押下などのより簡単な操作で、複数の領域の間で第2の領域を切り替えて設定することができる。なお、実施例3の処理と同様の処理を、画像の再加工を行う実施例2に組み合わせてもよい。 As described above, according to the third embodiment, the user does not specify the second area, and the second area is switched and set among the plurality of areas by a simpler operation such as pressing a button. be able to. The same processing as that of Example 3 may be combined with Example 2 for reprocessing the image.
以上、本発明をその好適な実施形態に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。さらに、上述した各実施形態は本発明の一実施形態を示すものにすぎず、各実施形態を適宜組み合わせることも可能である。 Although the present invention has been described in detail based on the preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various embodiments within the range not deviating from the gist of the present invention are also included in the present invention. included. Further, each of the above-described embodiments is merely an embodiment of the present invention, and each embodiment can be appropriately combined.
また、デジタルカメラに本発明を適用した例について説明したが、本発明を適用可能な電子機器はこれに限られない。評価値に基づく所定の処理(例えば、評価値分布の補正や、ぼかし処理などの画像処理)を実行可能な電子機器であれば、本発明は適用可能である。例えば、本発明を適用した電子機器は、図1の画像処理部107、領域抽出部109、及び、画像加工部110を有するコンピュータであってもよい。つまり、撮像部105や表示部111などは、本発明を適用した電子機器の外部機器に設けられてもよい。
Further, although an example in which the present invention is applied to a digital camera has been described, the electronic devices to which the present invention can be applied are not limited to this. The present invention is applicable as long as it is an electronic device capable of performing a predetermined process based on the evaluation value (for example, image processing such as correction of evaluation value distribution and blurring process). For example, the electronic device to which the present invention is applied may be a computer having an
なお、システム制御部101が行うものとして説明した上述の各種制御は1つのハード
ウェアが行ってもよいし、複数のハードウェア(例えば、複数のプロセッサーや回路)が処理を分担することで、装置全体の制御を行ってもよい。
It should be noted that the above-mentioned various controls described as those performed by the
(その他の実施例)
本発明は、上述の実施例の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
100:カメラ 101:システム制御部 107:画像処理部
109:領域抽出部 110:画像加工部
100: Camera 101: System control unit 107: Image processing unit 109: Area extraction unit 110: Image processing unit
Claims (19)
第1のユーザ操作に応じて前記画像の一部に対応する第1の領域を選択し、第2のユーザ操作に応じて前記画像の一部に対応する第2の領域を選択する選択手段と、
前記第2の領域の評価値に基づく値を前記第1の領域の評価値として用いて、所定の処理を行う処理手段と
を有することを特徴とする電子機器。 An acquisition method for acquiring the evaluation value distribution of an image,
A selection means for selecting a first area corresponding to a part of the image according to a first user operation and selecting a second area corresponding to a part of the image according to a second user operation. ,
An electronic device comprising a processing means for performing a predetermined process by using a value based on the evaluation value of the second region as an evaluation value of the first region.
ことを特徴とする請求項1に記載の電子機器。 The electronic device according to claim 1, wherein the selection means selects a region corresponding to a part of the image based on at least one of a pixel value distribution and an evaluation value distribution of the image.
ことを特徴とする請求項2に記載の電子機器。 The electronic device according to claim 2, wherein the selection means selects a region corresponding to a part of the image based on a histogram of at least one of a pixel value and an evaluation value of the image.
ことを特徴とする請求項1〜3のいずれか1項に記載の電子機器。 The selection means divides the area corresponding to the image into smaller parts than the first process according to a predetermined user operation after the first process of selecting the area corresponding to a part of the image. The electronic device according to any one of claims 1 to 3, wherein a second process of selecting an area corresponding to a part of an image is performed.
ことを特徴とする請求項1〜4のいずれか1項に記載の電子機器。 The electron according to any one of claims 1 to 4, wherein the selection means selects the second region including the position in response to the second user operation for designating the position. device.
ことを特徴とする請求項1〜4のいずれか1項に記載の電子機器。 The selection means according to claim 1 to 4, wherein the second area is switched between a plurality of areas different from the first area each time the second user operation is performed. The electronic device according to any one.
ことを特徴とする請求項1〜6のいずれか1項に記載の電子機器。 The predetermined process is a process of correcting the evaluation value distribution acquired by the acquisition means so that the evaluation value of the first region becomes a value based on the evaluation value of the second region. The electronic device according to any one of claims 1 to 6, wherein the electronic device is characterized.
ことを特徴とする請求項7に記載の電子機器。 The electronic device according to claim 7, further comprising a recording means for recording the evaluation value distribution after the predetermined processing in the storage unit.
前記所定の処理は、前記第1の領域の加工である
ことを特徴とする請求項1〜6のいずれか1項に記載の電子機器。 The processing means processes the image based on the evaluation value distribution acquired by the acquisition means.
The electronic device according to any one of claims 1 to 6, wherein the predetermined processing is processing of the first region.
ことを特徴とする請求項9に記載の電子機器。 The electronic device according to claim 9, further comprising a recording means for recording the image after the predetermined processing in the storage unit.
ことを特徴とする請求項9または10に記載の電子機器。 The electronic device according to claim 9 or 10, further comprising a display control means for displaying an image processed by the processing means on a display unit.
ことを特徴とする請求項1〜10のいずれか1項に記載の電子機器。 The electronic device according to any one of claims 1 to 10, further comprising a display control means for displaying the evaluation value distribution on the display unit.
ことを特徴とする請求項12に記載の電子機器。 The electronic device according to claim 12, wherein the display control means displays the image on the display unit instead of the evaluation value distribution for the region selected by the selection means.
ことを特徴とする請求項1〜10のいずれか1項に記載の電子機器。 The electron according to any one of claims 1 to 10, further comprising a display control means for displaying the image on a display unit by reflecting the evaluation value distribution on a plurality of pixel values of the image. device.
ことを特徴とする請求項1〜15いずれか1項に記載の電子機器。 Any one of claims 1 to 15, wherein the evaluation value distribution is a defocus amount distribution, a blur degree distribution, a parallax distribution, a distance distribution, a normal direction distribution, or a probability distribution of semantic region division. The electronic equipment described in the section.
第1のユーザ操作に応じて前記画像の一部に対応する第1の領域を選択し、第2のユーザ操作に応じて前記画像の一部に対応する第2の領域を選択するステップと、
前記第2の領域の評価値に基づく値を前記第1の領域の評価値として用いて、所定の処理を行うステップと
を有することを特徴とする電子機器の制御方法。 Steps to get the evaluation value distribution of the image and
A step of selecting a first area corresponding to a part of the image according to a first user operation and selecting a second area corresponding to a part of the image according to a second user operation.
A method for controlling an electronic device, which comprises a step of performing a predetermined process by using a value based on an evaluation value of the second region as an evaluation value of the first region.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020084883A JP2021180407A (en) | 2020-05-14 | 2020-05-14 | Electronic apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020084883A JP2021180407A (en) | 2020-05-14 | 2020-05-14 | Electronic apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2021180407A true JP2021180407A (en) | 2021-11-18 |
Family
ID=78510540
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020084883A Pending JP2021180407A (en) | 2020-05-14 | 2020-05-14 | Electronic apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2021180407A (en) |
-
2020
- 2020-05-14 JP JP2020084883A patent/JP2021180407A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6427711B1 (en) | Electronic device, method and program | |
JP6271990B2 (en) | Image processing apparatus and image processing method | |
JP4760742B2 (en) | Digital camera, information display method, and information display control program | |
JP2022179514A (en) | Control apparatus, imaging apparatus, control method, and program | |
WO2017130522A1 (en) | Image processing device, image capturing device, image processing method and program | |
JP6320053B2 (en) | Image processing apparatus, image processing method, and computer program | |
JP2017060010A (en) | Imaging device, method of controlling imaging device, and program | |
US20180352171A1 (en) | Image capture apparatus, image processing system, and control method thereof | |
JP6116436B2 (en) | Image processing apparatus and image processing method | |
JP7337562B2 (en) | IMAGE PROCESSING DEVICE, IMAGING DEVICE, CONTROL METHOD FOR IMAGE PROCESSING DEVICE, AND PROGRAM | |
JP4632417B2 (en) | Imaging apparatus and control method thereof | |
JP2021180407A (en) | Electronic apparatus | |
JP2019191661A (en) | Image processing apparatus, imaging device, image processing method, and program | |
JP5430077B2 (en) | Imaging apparatus, control method therefor, and program | |
JP6961423B2 (en) | Image processing equipment, imaging equipment, control methods for image processing equipment, programs and recording media | |
JP6486453B2 (en) | Image processing apparatus, image processing method, and program | |
JP6679430B2 (en) | IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM | |
JP2010016693A (en) | Electronic camera | |
JP6424523B2 (en) | Imaging device | |
US11375123B2 (en) | Image processing apparatus, image capturing apparatus, control method for image processing apparatus, and program storage medium with coordinated display of image and display of distribution information of evaluation value | |
WO2017216933A1 (en) | Image processing device, image processing method and image processing program | |
JP6003974B2 (en) | Image processing apparatus, image processing method, and program | |
JP6516410B2 (en) | Image processing apparatus, image processing method and program | |
JP5448799B2 (en) | Display control apparatus and display control method | |
JP7458723B2 (en) | Image processing device, imaging device, control method, and program |