JP2021180407A - Electronic apparatus - Google Patents

Electronic apparatus Download PDF

Info

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
Application number
JP2020084883A
Other languages
Japanese (ja)
Inventor
朝日 鈴木
Asahi Suzuki
正明 松岡
Masaaki Matsuoka
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2020084883A priority Critical patent/JP2021180407A/en
Publication of JP2021180407A publication Critical patent/JP2021180407A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

To provide an electronic apparatus that allows a user to correct evaluation values easily as intended.SOLUTION: An electronic apparatus of the present invention has: acquisition means that acquires the distribution of evaluation values of an image; selection means that selects a first area corresponding to part of the image in accordance with a first user operation and selects a second area corresponding to part of the image in accordance with a second user operation; and processing means that performs predetermined processing by using a value based on an evaluation value of the second area selected by the selection means as an evaluation value of the first area selected by the selection means.SELECTED DRAWING: Figure 3

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.

特開2017−117030号公報JP-A-2017-117030

しかしながら、特許文献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に係るカメラの機能構成の一例を示すブロック図である。It is a block diagram which shows an example of the functional structure of the camera which concerns on Example 1. FIG. 実施例1に係る画像と距離マップの一例を示す図である。It is a figure which shows an example of the image and the distance map which concerns on Example 1. FIG. 実施例1に係る補正処理の一例を示すフローチャートである。It is a flowchart which shows an example of the correction process which concerns on Example 1. FIG. 実施例1に係る表示例を示す図である。It is a figure which shows the display example which concerns on Example 1. FIG. 実施例1に係る領域抽出結果の一例を示す図である。It is a figure which shows an example of the area extraction result which concerns on Example 1. FIG. 実施例1に係る領域抽出の一例を示すフローチャートである。It is a flowchart which shows an example of the area extraction which concerns on Example 1. FIG. 実施例1に係るグルーピングの一例を示す図である。It is a figure which shows an example of the grouping which concerns on Example 1. FIG. 実施例2に係る加工の一例を示す図である。It is a figure which shows an example of the processing which concerns on Example 2. FIG. 実施例2に係る補正処理の一例を示すフローチャートである。It is a flowchart which shows an example of the correction process which concerns on Example 2. 実施例2に係る表示例を示す図である。It is a figure which shows the display example which concerns on Example 2. FIG. 実施例3に係る補正処理の一例を示すフローチャートである。It is a flowchart which shows an example of the correction process which concerns on Example 3. FIG. 実施例3に係る表示例を示す図である。It is a figure which shows the display example which concerns on Example 3. FIG. 実施例3に係る距離グループの一例を示す図である。It is a figure which shows an example of the distance group which concerns on Example 3. FIG.

<実施例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 camera 100 according to the first embodiment. The camera 100 has a system control unit 101, a ROM 102, and a RAM 103. Further, the camera 100 includes an optical system 104, an image pickup unit 105, an A / D conversion unit 106, an image processing unit 107, a recording medium 108, an area extraction unit 109, an image processing unit 110, a display unit 111, an operation unit 112, and the like. It has a bus 113. System control unit 101, ROM 102, RAM 103, image pickup unit 105, A / D conversion unit 106, image processing unit 107, recording medium 108, area extraction unit 109, image processing unit 110, display unit 111, and operation unit 112, respectively. Is connected to bus 113.

システム制御部101は、カメラ100全体を制御する制御部であり、例えばCPUである。システム制御部101は、カメラ100が備える各ブロックの動作プログラムをROM102より読み出し、RAM103に展開して実行することにより、カメラ100が備える各ブロックの動作を制御する。 The system control unit 101 is a control unit that controls the entire camera 100, and is, for example, a CPU. The system control unit 101 controls the operation of each block included in the camera 100 by reading the operation program of each block included in the camera 100 from the ROM 102, expanding the program into the RAM 103, and executing the program.

ROM102は、格納されているデータ(情報)を書き替え可能な不揮発性メモリであり、例えばフラッシュROMなどである。ROM102は、カメラ100が備える各ブロックの動作プログラムや、各ブロックの動作に必要なパラメータなどを記憶する。 The ROM 102 is a non-volatile memory in which stored data (information) can be rewritten, and is, for example, a flash ROM. The ROM 102 stores an operation program of each block included in the camera 100, parameters necessary for the operation of each block, and the like.

RAM103は、格納されているデータ(情報)を書き替え可能な揮発性メモリであり、カメラ100が備える各ブロックの動作において出力されたデータの一時的な記憶領域として用いられる。システム制御部101と画像処理部107は、RAM103をワークメモリとして使用する。 The RAM 103 is a volatile memory in which stored data (information) can be rewritten, and is used as a temporary storage area for data output in the operation of each block included in the camera 100. The system control unit 101 and the image processing unit 107 use the RAM 103 as a work memory.

光学系104は、被写体像(被写体の光学像)を撮像部105に結像する。光学系104には、例えば、固定レンズや、焦点距離を変更するための変倍レンズ、焦点調節を行うためのフォーカスレンズなどが含まれている。光学系104には絞りも含まれており、絞りを用いて光学系104の開口径を調節することにより、撮影時の光量が調節される。 The optical system 104 forms a subject image (optical image of the subject) on the image pickup unit 105. The optical system 104 includes, for example, a fixed lens, a variable magnification lens for changing the focal length, a focus lens for adjusting the focus, and the like. The optical system 104 also includes a diaphragm, and the amount of light at the time of photographing is adjusted by adjusting the aperture diameter of the optical system 104 using the diaphragm.

撮像部105は、例えばCCDイメージセンサやCMOSイメージセンサなどの撮像素子である。撮像部105は、光学系104により撮像部105に結像された光学像を光電変換してアナログ画像信号を得る。撮像部105は、得られたアナログ画像信号をA/D変換部106に出力する。 The image pickup unit 105 is an image pickup element such as a CCD image sensor or a CMOS image sensor. The image pickup unit 105 photoelectrically converts an optical image formed on the image pickup unit 105 by the optical system 104 to obtain an analog image signal. The image pickup unit 105 outputs the obtained analog image signal to the A / D conversion unit 106.

A/D変換部106は、入力されたアナログ画像信号にA/D変換処理を適用してデジタル画像データを得る。A/D変換部106は、得られたデジタル画像データをRAM103に出力して記録する。 The A / D conversion unit 106 applies an A / D conversion process to the input analog image signal to obtain digital image data. The A / D conversion unit 106 outputs the obtained digital image data to the RAM 103 and records it.

画像処理部107は、RAM103に格納されている画像データに対して画像処理を行う。例えば、画像処理部107は、ホワイトバランス調整や、色補間、縮小/拡大などの様々な画像処理を行う。画像処理部107は、対象の画像(画像データ)から当該画像の評価値分布(評価値マップ)を取得(生成)することもできる。画像処理部107は、画像処理後の画像をRAM103や記録媒体108に記録する。 The image processing unit 107 performs image processing on the image data stored in the RAM 103. For example, the image processing unit 107 performs various image processing such as white balance adjustment, color interpolation, and reduction / enlargement. The image processing unit 107 can also acquire (generate) an evaluation value distribution (evaluation value map) of the image from the target image (image data). The image processing unit 107 records the image after image processing in the RAM 103 or the recording medium 108.

記録媒体108は、例えば、カメラ100に対して着脱可能なメモリカードなどの記憶部である。記録媒体108には、画像処理部107で処理された画像や、画像加工部110で加工された画像、A/D変換部106でA/D変換された画像などが、記録画像として記録される。 The recording medium 108 is, for example, a storage unit such as a memory card that can be attached to and detached from the camera 100. The recording medium 108 records an image processed by the image processing unit 107, an image processed by the image processing unit 110, an image A / D converted by the A / D conversion unit 106, and the like as recorded images. ..

領域抽出部109は、ユーザ操作に応じて、画像処理部107で処理された画像の一部に対応する領域を選択(抽出)する。例えば、領域抽出部109は、ユーザ操作があると、画像の画素値分布(色や輝度の分布)と、評価値マップとの少なくとも一方に基づいて、領域を抽出する。ここで、画素値分布は、画像処理部107で処理された画像の画素値分布や、A/D変換部106でA/D変換された画像の画素値分布などである。 The area extraction unit 109 selects (extracts) an area corresponding to a part of the image processed by the image processing unit 107 according to the user operation. For example, when there is a user operation, the area extraction unit 109 extracts an area based on at least one of the pixel value distribution (color and luminance distribution) of the image and the evaluation value map. Here, the pixel value distribution is a pixel value distribution of an image processed by the image processing unit 107, a pixel value distribution of an image A / D converted by the A / D conversion unit 106, and the like.

画像加工部110は、画像処理部107で処理された画像や、A/D変換部106でA/D変換された画像を、評価値マップを用いて加工する。画像の加工は、例えば、背景ぼかし、リライティングなどである。画像加工部110は、加工後の画像をRAM103や記録媒体108に記録する。 The image processing unit 110 processes the image processed by the image processing unit 107 and the image converted to A / D by the A / D conversion unit 106 using the evaluation value map. Image processing is, for example, background blurring, rewriting, and the like. The image processing unit 110 records the processed image in the RAM 103 or the recording medium 108.

表示部111は、例えば液晶モニタであり、ユーザ操作に応じて画像を表示する。例えば、表示部111は、RAM103や記録媒体108などに格納されている画像(画像処理部107で処理された画像や、画像加工部110で加工された画像、A/D変換部106でA/D変換された画像や記録媒体108に記録された画像などを表示する。 The display unit 111 is, for example, a liquid crystal monitor, and displays an image according to a user operation. For example, the display unit 111 may use an image stored in a RAM 103, a recording medium 108, or the like (an image processed by the image processing unit 107, an image processed by the image processing unit 110, or an A / D by the A / D conversion unit 106. The D-converted image, the image recorded on the recording medium 108, and the like are displayed.

操作部112は、カメラ100に対するユーザ操作(ユーザからの指示)を受け付ける。例えば、操作部112は、表示部111の表示面上に設けられたタッチパネルを含む。ユーザは、操作部112を操作することにより、カメラ100の各種設定や各種情報などをカメラ100に入力することができる。 The operation unit 112 receives a user operation (instruction from the user) for the camera 100. For example, the operation unit 112 includes a touch panel provided on the display surface of the display unit 111. By operating the operation unit 112, the user can input various settings and various information of the camera 100 to the camera 100.

バス113は、カメラ100の複数のブロックを互いに接続する。カメラ100の複数のブロックは、バス113を介して信号のやり取りを行うことができる。 The bus 113 connects a plurality of blocks of the camera 100 to each other. The plurality of blocks of the camera 100 can exchange signals via the bus 113.

実施例1では、画像処理部107は、評価値分布として、画像一面のピント情報の分布を表すデフォーカス量分布を生成するものとする。以後、フォーカス量分布を距離マップと呼ぶこととする。デフォーカス量(ピント情報;距離情報)の算出方法は特に限定されないが、例えば、特開2008−15754号公報に記載の方法(画像の位相差から画像一面のピント情報を取得する方法)を用いてデフォーカス量を算出することができる。特開2008−15754号公報に記載の方法では、微小ブロックにおける一対の画素データを相対的にずらしながら、2つの画素データ間のずらし量に基づいてデフォーカス量を算出している。 In the first embodiment, the image processing unit 107 generates a defocus amount distribution representing the distribution of focus information on one surface of the image as the evaluation value distribution. Hereinafter, the focus amount distribution will be referred to as a distance map. The method for calculating the defocus amount (focus information; distance information) is not particularly limited, but for example, the method described in Japanese Patent Application Laid-Open No. 2008-15754 (a method for acquiring focus information on one surface of an image from the phase difference of an image) is used. The amount of defocus can be calculated. In the method described in Japanese Patent Application Laid-Open No. 2008-15754, the defocus amount is calculated based on the amount of shift between the two pixel data while relatively shifting the pair of pixel data in the minute block.

図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 image 201 after processing by the image processing unit 107. In image 201, two people are standing at the same distance in front of the hedge. FIG. 2B shows a distance map 202 corresponding to image 201. Each position (each coordinate) of the distance map 202 corresponds to each position of the image 201, and the distance information of each position of the image 201 calculated by the image processing unit 107 is represented by each position of the distance map 201. .. In FIG. 2B, the distance information (distance; defocus amount) is represented by shading. Here, it is assumed that the distance of the area 203 is originally the distance corresponding to the hedge as in the area 204, but is erroneously calculated as the same distance as the two persons. In the first embodiment, an example in which the distance of the area 203 is easily corrected (corrected) to the same distance as the area 204 will be described.

図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 system control unit 101 displays the distance map generated by the image processing unit 107 on the display unit 111 (display control). Here, it is assumed that the distance map of FIG. 4A is displayed. The distance map of FIG. 4A is the same as the distance map 202 of FIG.

ステップS302では、領域抽出部109が、表示された距離マップの一部(第1の領域)をユーザ操作に応じて抽出(選択)する。ここでは、図4(A)の操作401(距離マップ内の位置を指定する操作;距離マップ内の1か所にタッチする操作)に応じて、図4(B)の領域402(指定された位置を含む領域)が抽出されるとする。領域402は図2(B)の領域203と同じである。抽出された領域402は、図2(A)の画像201の、同じ位置及びサイズを有する領域に対応する。上述したように、領域抽出部109は、ユーザ操作があると、画像の画素値分布(色や輝度の分布)と、評価値マップとの少なくとも一方に基づいて、領域を抽出する。この処理の詳細は後述する。 In step S302, the area extraction unit 109 extracts (selects) a part (first area) of the displayed distance map according to the user operation. Here, the area 402 (designated) of FIG. 4B corresponds to the operation 401 (operation of designating a position in the distance map; operation of touching one place in the distance map) of FIG. 4 (A). The area containing the position) is extracted. Region 402 is the same as region 203 in FIG. 2 (B). The extracted region 402 corresponds to a region having the same position and size in image 201 of FIG. 2 (A). As described above, when there is a user operation, the area extraction unit 109 extracts an area based on at least one of the pixel value distribution (color and luminance distribution) of the image and the evaluation value map. The details of this process will be described later.

ステップS303では、システム制御部101が、ステップS302で抽出された第1の領域を表示部111で強調表示(識別可能に表示)する。ここでは、図4(B)に示すように、領域402が破線で強調表示されるとする。なお、強調表示の方法はこれに限られず、例えば、ストライプパターンなどで第1の領域が強調表示されてもよい。 In step S303, the system control unit 101 highlights (identifiablely displays) the first area extracted in step S302 on the display unit 111. Here, it is assumed that the area 402 is highlighted by a broken line as shown in FIG. 4 (B). The highlighting method is not limited to this, and the first area may be highlighted by, for example, a stripe pattern.

ステップS304では、システム制御部101が、所定の操作の有無に応じて、ステップS303で強調表示された第1の領域がユーザの所望の領域であるか否かを判定する。所望の領域でない場合は、ステップS302に処理が戻され、前回の処理よりも領域(画像や距離マップの全領域)が細かく分割されて第1の領域が再度抽出される。 In step S304, the system control unit 101 determines whether or not the first area highlighted in step S303 is a desired area of the user, depending on the presence or absence of a predetermined operation. If it is not a desired region, the process is returned to step S302, the region (the entire region of the image or the distance map) is finely divided as compared with the previous process, and the first region is extracted again.

ステップ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 image 201, it is assumed that the color (hue, etc.) of the clothes of the person on the right and the color of the hedge are similar. When the first region is extracted using the color information of the image 201, the region 501 of FIG. 5, which is different from the region 402 of FIG. 4B, may be extracted when the parameter of the region division is not appropriate. .. In this way, a first region different from the region desired by the user may be extracted. In this case, the user respecifies (tap) the desired position. When this operation is performed, the system control unit 101 determines that the extracted first region is not the region desired by the user. Then, the process is returned to step S302. In step S302, the system control unit 101 resets the parameter of the area division, the area extraction unit 109 performs the area division using the reset parameter, and the user among the plurality of areas obtained by the area division. Extracts the first area containing the position specified by. As a result, the user can select a desired area with a simple operation. Details of the parameters to be reset will be described later.

ステップS305では、領域抽出部109が、表示された距離マップの他の一部(領域402とは異なる第2の領域)をユーザ操作に応じて抽出(選択)する。ここでは、図4(B)の領域403が抽出されるとする。領域403は図2(B)の領域204と同じで
ある。ステップS305では、ステップS302と同様の方法で第2の領域が抽出されるとするが、そうでなくてもよい。例えば、ユーザが指定した位置とその周辺とを含む所定サイズの第2の領域が抽出されてもよい。
In step S305, the area extraction unit 109 extracts (selects) another part of the displayed distance map (a second area different from the area 402) according to the user operation. Here, it is assumed that the region 403 of FIG. 4B is extracted. Region 403 is the same as region 204 in FIG. 2 (B). In step S305, it is assumed that the second region is extracted by the same method as in step S302, but it is not necessary. For example, a second area of a predetermined size including the position specified by the user and its periphery may be extracted.

ステップS306では、システム制御部101が、ユーザからの修正指示を受け付ける。修正指示は、図4(C)の操作404のように、ステップS305でユーザがタッチ(指定)した位置から、ステップS302で抽出された第1の領域内の位置までのドラッグ&ドロップ操作であるとする。ドラッグ&ドロップ操作は、タッチしたままタッチ位置を移動させる操作との言える。なお、ステップS305,S306におけるユーザ操作はこれに限られない。例えば、ステップS305では、タップに応じて第2の領域を抽出してもよいし、修正指示のためのボタン(表示アイテム)を表示部111に表示し、当該ボタンに対するタップを修正指示としてもよい。 In step S306, the system control unit 101 receives a correction instruction from the user. The correction instruction is a drag-and-drop operation from the position touched (designated) by the user in step S305 to the position in the first area extracted in step S302, as in the operation 404 of FIG. 4C. And. The drag and drop operation can be said to be an operation of moving the touch position while touching. The user operation in steps S305 and S306 is not limited to this. For example, in step S305, the second area may be extracted according to the tap, or the button (display item) for the correction instruction may be displayed on the display unit 111, and the tap for the button may be the correction instruction. ..

ステップS307では、システム制御部101が、ステップS302で抽出された第1の領域の距離情報がステップS305で抽出された第2の領域の距離情報に基づく値となるように、画像処理部107により生成された距離マップを補正する。具体的には、第1の領域における各位置の距離情報を、第2の領域の平均の距離情報に補正する。これにより、図4(A)の距離マップが図4(D)の距離マップに補正される。なお、補正に用いる値は、第2の領域の複数の距離情報の平均値に限られず、第2の領域を代表する他の距離情報(他の代表値)であってもよい。例えば、補正に用いる値は、第2の領域の複数の距離情報の中央値、最頻値、最大値、最小値などであってもよいし、第2の領域の重心位置に対応する距離情報などであってもよい。 In step S307, the system control unit 101 uses the image processing unit 107 so that the distance information of the first region extracted in step S302 becomes a value based on the distance information of the second region extracted in step S305. Correct the generated distance map. Specifically, the distance information of each position in the first region is corrected to the average distance information of the second region. As a result, the distance map of FIG. 4 (A) is corrected to the distance map of FIG. 4 (D). The value used for the correction is not limited to the average value of the plurality of distance information in the second region, and may be other distance information (other representative value) representing the second region. For example, the value used for the correction may be the median value, the mode value, the maximum value, the minimum value, etc. of the plurality of distance information in the second region, or the distance information corresponding to the position of the center of gravity of the second region. And so on.

ステップS308では、システム制御部101が、ステップS307の補正後の距離マップを保存するユーザ操作(保存操作)があったか否かを判定する。保存操作があると、システム制御部101は、補正後の距離マップをRAM103や記録媒体108などに保存(記録)する。そして、図3の補正処理が終了する。保存操作が無ければ、ステップS302に処理が戻され、必要に応じて他の領域の距離情報が補正される。 In step S308, the system control unit 101 determines whether or not there is a user operation (save operation) for saving the corrected distance map in step S307. When there is a save operation, the system control unit 101 saves (records) the corrected distance map in the RAM 103, the recording medium 108, or the like. Then, the correction process of FIG. 3 is completed. If there is no save operation, the process is returned to step S302, and the distance information of other areas is corrected as needed.

ステップ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 area extraction unit 109 divides the image into a plurality of areas (region division).

まず、領域抽出部109は、画像を複数のブロックに分割する。次に、領域抽出部109は、複数のブロックのそれぞれについて、そのブロック内の複数の画素の色相の平均値を、当該ブロックを代表する色相(代表値)として算出する。なお、代表値は平均値に限られず、例えば、中央値、最頻値、最大値、最小値などであってもよい。代表値はブロックの重心位置に対応する色相などであってもよい。次に、領域抽出部109は、各ブロックの代表値を要素とした色相のヒストグラムを作成する。このとき、彩度が閾値以上のブロックのみを用いてヒストグラムを作成することが好ましい。これは、彩度の低いブロックは色相の値の信頼性が低いためである。次に、領域抽出部109は、作成したヒストグラムを用いて、複数のブロックを同一色領域にグルーピングすることによって、画像を複
数の領域に分割する(領域分割)。
First, the area extraction unit 109 divides the image into a plurality of blocks. Next, the region extraction unit 109 calculates, for each of the plurality of blocks, the average value of the hues of the plurality of pixels in the block as the hue (representative value) representing the block. The representative value is not limited to the average value, and may be, for example, a median value, a mode value, a maximum value, a minimum value, or the like. The representative value may be a hue corresponding to the position of the center of gravity of the block. Next, the region extraction unit 109 creates a hue histogram with the representative value of each block as an element. At this time, it is preferable to create a histogram using only blocks whose saturation is equal to or higher than the threshold value. This is because blocks with low saturation have low reliability of hue values. Next, the region extraction unit 109 divides the image into a plurality of regions by grouping a plurality of blocks into the same color region using the created histogram (region division).

グルーピングによる領域分割について、図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 area extraction unit 109 extracts the area corresponding to the position designated by the user from the plurality of areas obtained by the area division.

以上述べたように、実施例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 image 801 after processing by the image processing unit 107. Image 801 is the same as image 201 in FIG. 2 (A). FIG. 8B shows a distance map 802 corresponding to image 801. The distance map 802 is the same as the distance map 202 of FIG. 2 (B), the area 803 is the same as the area 203 of FIG. 2 (B), and the area 804 is the same as the area 204 of FIG. 2 (B).

図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 image processing unit 110 blurs the image 801 based on the distance map 802. Here, it is a desired process to blur the hedge behind the hedge like the area 807 (the area corresponding to the area 804), but since the distance of the area 803 is erroneously calculated as the same distance as the two people. In FIG. 8C, the area 806 (the area corresponding to the area 803) is not blurred. The distance map itself may be corrected as in the first embodiment and rework may be performed using the corrected distance map, but in the second embodiment, the user does not have to be aware of the distance map. An example of processing the region 806 in the same manner as the region 807 according to the operation will be described. The processing is not limited to the blurring processing, and may be another processing based on an evaluation value such as distance information.

図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 system control unit 101 displays the image processed by the image processing unit 110 on the display unit 111. Here, it is assumed that the image of FIG. 10A is displayed. The image of FIG. 10 (A) is the same as the image 805 of FIG.

ステップ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, operations 1001 and 1004 correspond to operations 401 and 404, and areas 1002 and 1003 correspond to areas 402 and 403.

ステップS907では、システム制御部101が、第1の領域の加工に用いるパラメータを、第2の領域の加工に用いるパラメータに基づいて補正し、画像加工部110が、補正後のパラメータを用いて再加工を行う。具体的には、第1の領域における各位置のパラメータを、第2の領域の平均のパラメータに補正する。つまり、第2の領域の距離情報に基づくパラメータを用いて、第1の領域の再加工が行われる。これにより、図10(A)の画像が図10(D)の画像に補正される。なお、加工に用いるパラメータは特に限定されず、例えば、ぼかしフィルターの係数、ぼかしフィルターのサイズ、距離情報などである。また、補正に用いる値は、第2の領域の複数のパラメータの平均値に限られず、第2の領域を代表する他のパラメータ(他の代表値)であってもよい。例えば、補正に用いる値は、第2の領域の複数のパラメータの中央値、最頻値、最大値、最小値などであってもよいし、第2の領域の重心位置に対応するパラメータなどであってもよい。 In step S907, the system control unit 101 corrects the parameters used for processing the first region based on the parameters used for processing the second region, and the image processing unit 110 re-uses the corrected parameters. Perform processing. Specifically, the parameter of each position in the first region is corrected to the average parameter of the second region. That is, the reworking of the first region is performed using the parameters based on the distance information of the second region. As a result, the image of FIG. 10 (A) is corrected to the image of FIG. 10 (D). The parameters used for processing are not particularly limited, and are, for example, the coefficient of the blur filter, the size of the blur filter, the distance information, and the like. Further, the value used for the correction is not limited to the average value of the plurality of parameters in the second region, and may be another parameter (other representative value) representing the second region. For example, the value used for correction may be the median value, mode value, maximum value, minimum value, etc. of a plurality of parameters in the second region, or the parameter corresponding to the position of the center of gravity of the second region. There may be.

ステップS908では、システム制御部101が、ステップS907の再加工後の画像を保存するユーザ操作(保存操作)があったか否かを判定する。保存操作があると、システム制御部101は、再加工後の画像をRAM103や記録媒体108などに保存(記録)する。そして、図9の補正処理が終了する。保存操作が無ければ、ステップS902に処理が戻され、必要に応じて他の領域の再加工が行われる。 In step S908, the system control unit 101 determines whether or not there is a user operation (save operation) for saving the reprocessed image in step S907. When there is a save operation, the system control unit 101 saves (records) the reprocessed image in the RAM 103, the recording medium 108, or the like. Then, the correction process of FIG. 9 is completed. If there is no save operation, the process is returned to step S902, and other areas are reprocessed as needed.

<実施例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 region 203 in FIG. 2B is easily corrected (corrected) to the same distance as the region 204 will be described.

図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 correction button 1203. That is, the operation 1201 corresponds to the operation 401, and the area 1202 corresponds to the area 402.

S1105では、システム制御部101が、ユーザからの修正指示があったか否かを判定する。実施例3の修正指示は実施例1と異なり、図12(B)の修正ボタン1203を選択(タップ)する操作1204であるとする。修正指示があった場合はステップS1106に処理が進められ、修正指示が無かった場合はステップS1108に処理が進められる。ステップS1108の処理は、図3のステップS308の処理と同様である。 In S1105, the system control unit 101 determines whether or not there is a correction instruction from the user. It is assumed that the correction instruction of the third embodiment is an operation 1204 for selecting (tapping) the correction button 1203 of FIG. 12B, unlike the first embodiment. If there is a correction instruction, the process proceeds to step S1106, and if there is no correction instruction, the process proceeds to step S1108. The process of step S1108 is the same as the process of step S308 of FIG.

ステップS1106では、システム制御部101が、領域分割により得られた、第1の
領域とは異なる複数の領域のいずれかを、第2の領域として選択する。具体的には、システム制御部101は、実施例1で述べた領域分割と同様の方法で距離ヒストグラム(距離情報のヒストグラム)を複数の距離グループに分割し、第1の領域に対応しない距離グループを選択する。例えば、図13の距離ヒストグラムが、3つの距離グループ1301〜1303に分割される。そして、領域1202の距離情報が距離グループ1301に属しているとすると、距離グループ1302または距離グループ1303が選択される。距離グループの選択方法は特に限定されないが、領域1202の距離情報からの距離が長い順に距離グループを選択するとすると、最初に距離グループ1303が選択される。
In step S1106, the system control unit 101 selects any of a plurality of regions different from the first region obtained by the region division as the second region. Specifically, the system control unit 101 divides the distance histogram (distance information histogram) into a plurality of distance groups by the same method as the area division described in the first embodiment, and the distance group does not correspond to the first area. Select. For example, the distance histogram of FIG. 13 is divided into three distance groups 1301-1303. Then, assuming that the distance information of the area 1202 belongs to the distance group 1301, the distance group 1302 or the distance group 1303 is selected. The method of selecting the distance group is not particularly limited, but if the distance group is selected in descending order of the distance from the distance information of the area 1202, the distance group 1303 is selected first.

ステップS1107では、システム制御部101が、ステップS1102で抽出された第1の領域の距離情報がステップS1106で選択した距離グループの距離情報に基づく値となるように、画像処理部107により生成された距離マップを補正する。具体的には、第1の領域における各位置の距離情報を、選択した距離グループの平均の距離情報に補正する。距離グループ1303が選択され場合には、図12(A)の距離マップが図12(C)の距離マップに補正される。なお、補正に用いる値は、選択された距離グループの平均の距離情報に限られず、選択された距離グループを代表する他の距離情報(他の代表値)であってもよい。例えば、補正に用いる値は、選択された距離グループの、中央値、最頻値、最大値、最小値などに対応する距離情報であってもよい。補正に用いる値は、選択された距離グループに対応する領域(第2の領域)の重心位置に対応する距離情報などであってもよい。 In step S1107, the system control unit 101 is generated by the image processing unit 107 so that the distance information of the first region extracted in step S1102 becomes a value based on the distance information of the distance group selected in step S1106. Correct the distance map. Specifically, the distance information of each position in the first region is corrected to the average distance information of the selected distance group. When the distance group 1303 is selected, the distance map of FIG. 12 (A) is corrected to the distance map of FIG. 12 (C). The value used for the correction is not limited to the average distance information of the selected distance group, and may be other distance information (other representative value) representing the selected distance group. For example, the value used for the correction may be the distance information corresponding to the median value, the mode value, the maximum value, the minimum value, and the like of the selected distance group. The value used for the correction may be distance information corresponding to the position of the center of gravity of the region (second region) corresponding to the selected distance group.

ここで、ステップ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 distance group 1302 far from the distance group 1301 (distance information of the area 1202) is selected next to the distance group 1303. Then, in step S1107, the distance information in the first region is corrected based on the distance information of the newly selected distance group. When the distance group 1302 is newly selected, the distance map of FIG. 12 (C) is corrected to the distance map of FIG. 12 (D).

以上述べたように、実施例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 image processing unit 107, an area extraction unit 109, and an image processing unit 110 in FIG. 1. That is, the image pickup unit 105, the display unit 111, and the like may be provided in an external device of the electronic device to which the present invention is applied.

なお、システム制御部101が行うものとして説明した上述の各種制御は1つのハード
ウェアが行ってもよいし、複数のハードウェア(例えば、複数のプロセッサーや回路)が処理を分担することで、装置全体の制御を行ってもよい。
It should be noted that the above-mentioned various controls described as those performed by the system control unit 101 may be performed by one hardware, or a plurality of hardware (for example, a plurality of processors and circuits) share the processing to be a device. The whole control may be performed.

(その他の実施例)
本発明は、上述の実施例の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の処理後の所定のユーザ操作に応じて、前記画像に対応する領域を前記第1の処理よりも細かく分割して前記画像の一部に対応する領域を選択する第2の処理を行う
ことを特徴とする請求項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.
前記選択手段は、位置を指定する前記第2のユーザ操作に応じて、当該位置を含む前記第2の領域を選択する
ことを特徴とする請求項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.
前記選択手段は、前記第2のユーザ操作が行われる度に、前記第1の領域とは異なる複数の領域の間で、前記第2の領域を切り替える
ことを特徴とする請求項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の領域の評価値が前記第2の領域の評価値に基づく値となるように、前記取得手段により取得された前記評価値分布を補正する処理である
ことを特徴とする請求項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.
前記表示制御手段は、前記選択手段により選択された領域を前記表示部で強調表示することを特徴とする請求項11〜14のいずれか1項に記載の電子機器。 The electronic device according to any one of claims 11 to 14, wherein the display control means highlights an area selected by the selection means on the display unit. 前記評価値分布は、デフォーカス量分布、ブレ度合い分布、視差分布、距離分布、法線方向分布、または、意味的領域分割の確率分布である
ことを特徴とする請求項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.
コンピュータを、請求項1〜16のいずれか1項に記載の電子機器の各手段として機能させるためのプログラム。 A program for making a computer function as each means of the electronic device according to any one of claims 1 to 16. コンピュータを、請求項1〜16のいずれか1項に記載の電子機器の各手段として機能させるためのプログラムを格納したコンピュータが読み取り可能な記憶媒体。 A computer-readable storage medium containing a program for causing the computer to function as each means of the electronic device according to any one of claims 1 to 16.
JP2020084883A 2020-05-14 2020-05-14 Electronic apparatus Pending JP2021180407A (en)

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)

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