JP7373297B2 - Image processing device, image processing method and program - Google Patents
Image processing device, image processing method and program Download PDFInfo
- Publication number
- JP7373297B2 JP7373297B2 JP2019084430A JP2019084430A JP7373297B2 JP 7373297 B2 JP7373297 B2 JP 7373297B2 JP 2019084430 A JP2019084430 A JP 2019084430A JP 2019084430 A JP2019084430 A JP 2019084430A JP 7373297 B2 JP7373297 B2 JP 7373297B2
- Authority
- JP
- Japan
- Prior art keywords
- subject
- image
- area
- image processing
- captured image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims description 83
- 238000003672 processing method Methods 0.000 title claims description 4
- 238000003384 imaging method Methods 0.000 claims description 63
- 238000004458 analytical method Methods 0.000 claims description 38
- 238000000605 extraction Methods 0.000 claims description 13
- 239000000284 extract Substances 0.000 claims description 7
- 238000000034 method Methods 0.000 description 27
- 238000001514 detection method Methods 0.000 description 18
- 238000010586 diagram Methods 0.000 description 18
- 210000001747 pupil Anatomy 0.000 description 18
- 230000014509 gene expression Effects 0.000 description 12
- 230000003287 optical effect Effects 0.000 description 10
- 230000008569 process Effects 0.000 description 10
- 238000006243 chemical reaction Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 7
- 230000004048 modification Effects 0.000 description 7
- 238000012986 modification Methods 0.000 description 7
- 238000009795 derivation Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000004907 flux Effects 0.000 description 4
- 230000005484 gravity Effects 0.000 description 4
- 238000005259 measurement Methods 0.000 description 3
- 239000011295 pitch Substances 0.000 description 3
- 238000012937 correction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000000691 measurement method Methods 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 241000196324 Embryophyta Species 0.000 description 1
- 240000004050 Pentaglottis sempervirens Species 0.000 description 1
- 235000004522 Pentaglottis sempervirens Nutrition 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000001454 recorded image Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Images
Description
本発明は、画像処理装置、画像処理方法及びプログラムに関し、特に画像中の所望の被写体の領域を好適に抽出する技術に関する。 The present invention relates to an image processing device, an image processing method, and a program, and particularly relates to a technique for suitably extracting a desired subject area from an image.
撮像した画像に含まれる画素群を、該画素の像のデフォーカス量で分類し、特定のデフォーカス範囲に属する画素に対して画像処理を適用することで、異なる被写界深度の表現を示す画像を生成する技術がある(特許文献1)。 By classifying a group of pixels included in a captured image by the amount of defocus of the image of the pixel and applying image processing to pixels belonging to a specific defocus range, different depths of field can be expressed. There is a technique for generating images (Patent Document 1).
ところで、印象的な画像表現の1つとして、注目したい被写体の距離範囲にのみ合焦し、その他の領域がボケた状態となっている、所謂、被写界深度の浅い表現がある。特許文献1の技術でも、所望の被写体の含まれる領域のデフォーカス範囲以外の画素に対してボケ付加処理を行うことで、同様の表現の画像を生成することができる。
By the way, one of the impressive image expressions is a so-called shallow depth of field expression in which only the distance range of the object of interest is focused, and other areas are blurred. The technique disclosed in
しかしながら、特許文献1のようにデフォーカス量で画素を特定して処理を行う方式では、被写体の分布によっては、所望の表現の画像が生成されない可能性がある。例えば、所望の被写体とは異なる被写体が、所望の被写体の被写体距離を含む、奥行き方向に拡がった距離範囲に配置されているような分布では、上述の画像処理を行った場合に、特許文献1の方式ではこれらの被写体を分離して特定することができない。即ち、例えば被写界深度の浅い表現の画像を生成しようとした場合に、所望の被写体だけでなく、該異なる被写体も含んだ距離範囲も合焦した状態で画像に現れることになり、好適な表現が実現されない可能性がある。
However, in the method disclosed in
本発明は、上述の問題点に鑑みてなされたものであり、注目の被写体の領域を被写体の距離分布に基づいて好適に抽出する画像処理装置、画像処理方法及びプログラムを提供することを目的とする。 The present invention has been made in view of the above-mentioned problems, and an object of the present invention is to provide an image processing device, an image processing method, and a program that suitably extract a region of a subject of interest based on the distance distribution of the subject. do.
前述の目的を達成するために、本発明の画像処理装置は、撮像範囲の被写体を撮像した撮像画像と、該撮像画像と対応する領域についての、撮像範囲における被写体の奥行き方向の距離分布を示す値を格納した距離情報と、を取得する取得手段と、撮像画像について注目被写体を決定する決定手段と、撮像画像における注目被写体の位置に基づいて、距離分布を解析する解析領域を設定する設定手段と、距離情報のうちの解析領域に含まれる値の頻度分布に基づいて、該解析領域に含まれる被写体が分布する値範囲を特定する特定手段と、値範囲に含まれる情報を示す距離情報の領域を抽出することで、少なくとも注目被写体を含む被写体領域を抽出する抽出手段と、を有することを特徴とする。 In order to achieve the above-mentioned object, the image processing device of the present invention shows a distance distribution in the depth direction of the subject in the imaging range for a captured image of a subject in the imaging range and a region corresponding to the captured image. an acquisition means for acquiring distance information storing a value; a determining means for determining a subject of interest in the captured image; and a setting means for setting an analysis region for analyzing distance distribution based on the position of the subject of interest in the captured image. and identifying means for specifying a value range in which objects included in the analysis area are distributed based on the frequency distribution of values included in the analysis area of the distance information, and distance information indicating information included in the value range. The present invention is characterized by comprising an extraction means for extracting a subject area including at least a subject of interest by extracting a region.
このような構成により本発明によれば、注目の被写体の領域を被写体の距離分布に基づいて好適に抽出することが可能となる。 With such a configuration, according to the present invention, it is possible to suitably extract the region of the subject of interest based on the distance distribution of the subject.
[実施形態]
以下、添付図面を参照して実施形態を詳しく説明する。尚、以下の実施形態は特許請求の範囲に係る発明を限定するものでない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。
[Embodiment]
Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the claimed invention. Although a plurality of features are described in the embodiments, not all of these features are essential to the invention, and the plurality of features may be arbitrarily combined. Furthermore, in the accompanying drawings, the same or similar components are designated by the same reference numerals, and redundant description will be omitted.
以下に説明する一実施形態は、画像処理装置の一例としての、撮像範囲の被写体の奥行き方向(深度方向)の距離分布と対応する情報(距離情報)を取得可能なデジタルカメラに、本発明を適用した例を説明する。しかし、本発明は、撮像画像と、該撮像画像の撮像範囲に係る距離情報を取得することが可能な任意の機器に適用可能である。 An embodiment described below applies the present invention to a digital camera, which is an example of an image processing device, and is capable of acquiring information (distance information) corresponding to a distance distribution in the depth direction (depth direction) of a subject in an imaging range. An example of application will be explained. However, the present invention is applicable to any device capable of acquiring a captured image and distance information related to the imaging range of the captured image.
また、本明細書において、「距離情報」とは、撮像画像の各画素の像のデフォーカス量分布を示す2次元情報であるものとし、以下では「デフォーカスマップ」として言及する。しかしながら、距離情報は、上述したように撮像範囲の被写体の奥行き方向の距離分布と対応する情報であればよく、例えば各画素の被写体距離を示す深度マップであってもよいし、デフォーカス量の導出に用いられた像ずれ量を示す2次元情報であってもよい。即ち、距離情報は、奥行き方向の距離分布に応じた変化を示す情報であれば、これらに限られず該当する。 Furthermore, in this specification, "distance information" is two-dimensional information indicating the defocus amount distribution of each pixel of the captured image, and hereinafter referred to as a "defocus map." However, as described above, the distance information only needs to be information that corresponds to the distance distribution in the depth direction of the subject in the imaging range, for example, it may be a depth map that indicates the subject distance of each pixel, or it may be a depth map that indicates the subject distance of each pixel, or it may be a depth map that indicates the subject distance of each pixel. It may be two-dimensional information indicating the amount of image shift used for derivation. That is, the distance information is not limited to the above information as long as it indicates a change according to the distance distribution in the depth direction.
《デジタルカメラの構成》
図1は、本発明の実施形態に係るデジタルカメラ100の機能構成を示したブロック図である。
《Digital camera configuration》
FIG. 1 is a block diagram showing the functional configuration of a
システム制御部101は、例えばCPU等の、デジタルカメラ100が備える各ブロックを制御する制御装置である。システム制御部101は、デジタルカメラ100が備える各ブロックの動作プログラムをROM102から読み出して、RAM103に展開して実行することによりデジタルカメラ100が備える各ブロックの動作を制御する。
The
ROM102は、例えばフラッシュROM等の書き換え可能な不揮発性メモリである。ROM102は、デジタルカメラ100が備える各ブロックの動作プログラムに加え、各ブロックの動作に必要なパラメータ等を記憶する。一方、RAM103は、書き換え可能な揮発性メモリである。RAM103は、デジタルカメラ100が備える各ブロックの動作プログラムの展開領域としてだけでなく、各ブロックの動作により出力された中間データの一時的な記憶領域としても用いられる。本実施形態では、システム制御部101と後述の画像処理部107が、RAM103をワークメモリとして使用するものとする。
The
光学系104は、被写体像を撮像部105に結像する。光学系104には、例えば、固定レンズ、焦点距離を変更する変倍レンズ、焦点調節を行うフォーカスレンズ等が含まれている。光学系104には絞りも含まれており、絞りにより光学系の開口径を調節することで撮影時の光量調節を行う。
The
撮像部105は、例えばCCDイメージセンサやCMOSイメージセンサ等の撮像素子である。撮像部105は、光学系104により撮像素子の撮像面に結像された光学像を光電変換してアナログ画像信号を得る。撮像部105は、得られたアナログ画像信号をA/D変換部106に出力する。
The
A/D変換部106は、入力されたアナログ画像信号にA/D変換処理を適用することで、デジタル画像データ(以下では簡単に画像データとして言及)を得る。A/D変換部106は、得られた画像データをRAM103に出力して記憶させる。
The A/
画像処理部107は、RAM103に記憶されている画像データに対して、各種の画像処理を行う。具体的には、画像処理部107は、例えば、ホワイトバランス調整、色補間、縮小/拡大に係る処理等の画像処理を行う。画像処理部107は、画像処理後の画像データを記録媒体108に記録する。
The
また、画像処理部107は、本発明に係る機能を実現すべく、図3に示されるような処理を行うブロックを含む。詳細については後述するが、画像処理部107は、撮像を行った撮像範囲について、デフォーカス量の分布を示すデフォーカスマップ(距離情報)を生成する生成部300と、撮像範囲中の特定の被写体を検出する検出部301を含む。また画像処理部107は、検出部301による検出結果に基づいて設定された注目被写体について、解析用の領域を設定する領域設定部302と、該設定された領域についてのデフォーカス量の頻度マップ(ヒストグラム)を構成する構成部303を含む。さらに、画像処理部107は、最終的に決定した注目被写体の領域を抽出する領域抽出部304と、撮像画像を所望の画像表現を示す態様にするための画像処理を行う効果処理部305を含む。
Further, the
記録媒体108は、例えば、メモリカード等の、デジタルカメラ100に着脱可能に構成されていてよい記録装置である。記録媒体108には、画像処理部107により画像処理が適用された画像データ(撮像画像)やA/D変換部106によりA/D変換された画像信号(RAW画像)等が、記録画像として記録される。
The
表示部110は、例えばLCD等の表示装置であり、デジタルカメラ100における各種の情報提示を行う。表示部110は、撮像部105により撮像が行われている際、A/D変換された画像データを表示(スルー表示)することで、デジタルビューファインダとして機能する。
The
操作入力部109は、例えばレリーズスイッチ、設定ボタン、モード設定ダイアル等のユーザ入力インタフェースを含み、ユーザによりなされた操作入力を検出すると、該操作入力に対応する制御信号をシステム制御部101に出力する。また表示部110がタッチパネルセンサを備えている態様においては、操作入力部109は、表示部110に対してなされたタッチ操作を検出するインタフェースとしても機能する。
The
デジタルカメラ100が備えるこれらの機能ブロックは、基本的にはバス111によって接続され、バス111を介してブロック間の信号のやり取りが可能に構成される。
These functional blocks included in the
本実施形態ではハードウェアとしてデジタルカメラ100が備える各ブロックに対応した回路やプロセッサにより処理が実現されるものとして説明する。しかしながら、本発明の実施はこれに限られるものではなく、各ブロックの処理が該各ブロックと同様の処理を行うプログラムにより実現されるものであってもよい。
In this embodiment, processing will be described as hardware implemented by circuits and processors corresponding to each block included in the
《撮像部の構成》
次に、本実施形態の撮像部105が備える撮像素子の詳細構成について、図2を参照して説明する。
《Configuration of imaging section》
Next, the detailed configuration of the image sensor included in the
撮像素子は、図2(a)に示されるように、複数の画素200が2次元に規則的に配列されている。具体的には、複数の画素200は、例えば二次元格子状に配列されている。なお、画素200の配列構成は、格子状の配列構成に限定されるものではなく、他の配列構成が採用されるものであってもよい。
As shown in FIG. 2(a), the image sensor has a plurality of
撮像面位相差測距方式の測距機能を実現すべく、各画素200は、図2(b)に示されるようにマイクロレンズ201と、一対の光電変換部202a及びb(以下、それぞれ瞳分割画素202a及びbとして言及)を有している。瞳分割画素202a及びbは、撮像面がy軸方向を長手方向とする長方形状を有する、同形同大に構成された光電変換部である。各画素200において、瞳分割画素202a及びbは、マイクロレンズ201のy軸方向に沿った垂直二等分線を対称軸として、線対称に配置されている。なお、瞳分割画素202a及びbの撮像面形状は、これに限定されるものではなく、形状であってもよい。また、瞳分割画素202a及びbの配置態様も、x方向に並列に配置されるものに限られれるものではなく、他の配置態様が採用されるものであってよい。
In order to realize the distance measurement function of the imaging plane phase difference distance measurement method, each
このような構成により、本実施形態の撮像部105は、撮像素子の全ての画素が有する瞳分割画素202aから出力された画像信号に係るA像と、同様に瞳分割画素202bから出力された画像信号に係るB像とを出力する。A像とB像とは、合焦している位置との距離に応じた視差を有する関係にある。
With such a configuration, the
より詳しくは、各画素200において、瞳分割画素202aとbは、マイクロレンズ201を介して入光した光束のうちの異なる光束を受光するよう構成されているため、光学系104の射出瞳の異なる領域を通過した光束に係る光学像を光電変換する。即ち、この射出瞳の異なる領域(瞳分割領域)を通過した光束について、A像とB像は生成されるものであるため、被写体を瞳分割領域の重心位置の差の分ずれた撮影位置で撮像された関係になっており、視差が生じることになる。換言すれば、A像とB像とは、異なる視点について撮像範囲を撮像して得られた画像群に相当する。
More specifically, in each
なお、本実施形態では、撮像部105の撮像素子を図2のように構成することで、撮像範囲の被写体の距離分布の導出に用いられるA像とB像とを取得するものとして説明するが、A像とB像の取得方法はこれに限られるものではない。例えば、基線長離間させて設置した複数台の撮像装置により撮像された画像群をA像、B像とするものでもよいし、複数の光学系と撮像部を有する1台の撮像装置(所謂、両眼カメラ等)により取得された画像群をそれぞれA像、B像とするものでもよい。
In this embodiment, the image sensor of the
《デフォーカス量の導出》
生成部300は、撮像範囲の奥行き方向における被写体の距離分布を示す情報として、撮像画像に含まれる各被写体の像のデフォーカス量を含む、撮像画像と対応する画素構造を有したデフォーカスマップを生成する。デフォーカス量は、本実施形態のように取得した視差を有する画像群(A像及びB像)に基づいて導出する場合、例えば以下のように行えばよい。
《Derivation of defocus amount》
The
デフォーカス量の導出は、例えば図7に示されるように画像(A像とB像)700を、破線で示される微小ブロック701に分割する処理を含む。微小ブロック701は、例えば対象であるA像の各画素を着目画素とした場合に、該画素を中心とする予め定められたサイズの領域に対して設定されるものであってよい。なお、以下の説明では微小ブロック701は、着目画素を中心とするm×m画素の正方領域として設定されるものとして説明するが、微小ブロック701の形状やサイズはいずれであってもよい。また微小ブロック701は着目画素ごとに設定されるものであり、異なる着目画素間で微小ブロック701の重複が生じてもよい。また、生成部300は、位相差を検出するA像とB像に対して、予めバンドパスフィルタをかける処理を適用した後に、デフォーカス量の導出を行うものとしてもよい。
Derivation of the defocus amount includes, for example, a process of dividing an image (image A and image B) 700 into minute blocks 701 shown by broken lines, as shown in FIG. For example, when each pixel of the target image A is a pixel of interest, the
例えばA像及びB像の各画素について微小ブロック701が設定されると、両画像間で画素(着目画素)ごとに相関演算処理を行い、該画素に対応する微小ブロック701に含まれる像のずれ量(像ずれ量)を導出する。A像及びB像とで同一位置の着目画素について定められた(一対の)微小ブロック701のデータ数(画素数)がmである場合、該一対の微小ブロック701の画素データをそれぞれE(1)~E(m)、F(1)~F(m)として表現する。この場合、相関演算は、(データの)ずらし量をk(整数)[pixel]とすると、相関量C(k)は
C(k)=Σ|E(n)-F(n+k)|
で導出できる。ここで、Σ演算はnについて行われ、n及びn+kは1~mの範囲に限定されるものとする。また、ずらし量kは、一対の画像データの検出ピッチを単位とした相対的シフト量である。このように、1つの着目画素に係る一対の瞳分割画像(一対の微小ブロック701)について相関量を導出すると、ずらし量kと相関量C(k)は、例えば図6のグラフに離散的に示されるような関係となる。このとき、相関が最も高い像ずれ量において相関量C(k)が最小になるため、下記の3点内挿の手法を用いて、連続的な相関量に対する最小値C(x)を与えるずらし量xを導出する。
x=kj+D/SLOP
C(x)=C(kj)-|D|
D={C(kj-1)-C(kj+1)}/2
SLOP=MAX{C(kj+1)-C(kj),C(kj-1)-C(kj)}
ここで、kjは離散的な相関量C(k)が最小となるずらし量kである。このようにして求めたずらし量xが、1つの着目画素における像ずれ量として、距離情報に含められる。なお、像ずれ量xの単位も[pixel]であるものとする。
For example, when a
It can be derived as Here, it is assumed that the Σ operation is performed on n, and n and n+k are limited to the range of 1 to m. Further, the shift amount k is a relative shift amount in units of detection pitches of a pair of image data. In this way, when the correlation amount is derived for a pair of pupil division images (a pair of microblocks 701) related to one pixel of interest, the shift amount k and the correlation amount C(k) are discretely shown in the graph of FIG. 6, for example. The relationship is as shown. At this time, since the correlation amount C(k) is the minimum at the image shift amount where the correlation is highest, the following three-point interpolation method is used to shift the amount to give the minimum value C(x) for the continuous correlation amount. Derive the quantity x.
x=kj+D/SLOP
C(x)=C(kj)−|D|
D={C(kj-1)-C(kj+1)}/2
SLOP=MAX{C(kj+1)-C(kj), C(kj-1)-C(kj)}
Here, kj is the shift amount k that minimizes the discrete correlation amount C(k). The shift amount x obtained in this way is included in the distance information as the image shift amount for one pixel of interest. Note that the unit of the image shift amount x is also [pixel].
従って、各着目画素におけるデフォーカス量DEFは、像ずれ量xを用いて、
DEF=KX・PY・x
で導出することができる。ここで、PYは、撮像素子の画素ピッチ(撮像素子を構成する画素間距離。単位[mm/pixel])であり、KXは、一対の測距瞳を通過する光束の重心の開き角の大きさによって決まる変換係数である。なお、一対の測距瞳を通過する光束の重心の開き角の大きさは、レンズの絞り開口の大きさ(F値)に応じて変化するため、撮像時の設定の情報に応じて決定されるものとする。
Therefore, the defocus amount DEF for each pixel of interest is calculated using the image shift amount x.
DEF=KX・PY・x
It can be derived as Here, PY is the pixel pitch of the image sensor (distance between pixels constituting the image sensor, unit [mm/pixel]), and KX is the size of the aperture angle of the center of gravity of the light flux passing through a pair of ranging pupils. It is a conversion coefficient determined by the Note that the size of the aperture angle of the center of gravity of the light flux passing through a pair of distance measuring pupils changes depending on the size of the aperture aperture (F number) of the lens, so it is determined according to the information set at the time of imaging. shall be
このように、生成部300は、着目画素位置を1画素ずつずらしながら繰り返し計算することで、撮像画像の各画素における被写体のデフォーカス量を導出することができる。生成部300は、各画素のデフォーカス量を導出すると、これを画素値とする、撮像画像と同一の構造の2次元情報であるデフォーカスマップを、距離情報として生成する。即ち、デフォーカス量は、撮像画像において合焦している被写体距離からの奥行き方向の位置のずれ量に応じて変化する値であるため、デフォーカスマップは、撮像時の被写体の奥行き方向の距離分布と等価な情報である。
In this way, the
《画像加工処理》
以下、本実施形態のデジタルカメラ100において、撮像画像とデフォーカスマップとに基づいて、注目被写体の距離範囲のみに合焦した、撮像時よりも被写界深度を狭めた表現の画像を生成する画像加工処理について、図4のフローチャートを用いて説明する。該フローチャートに対応する処理は、システム制御部101が、例えばROM102に記憶されている対応する処理プログラムを読み出し、RAM103に展開して実行することにより実現することができる。本画像加工処理は、例えばデジタルカメラ100が撮像後に表現を変更した画像を生成する撮影モードに設定され、撮像指示に係る操作入力が検出された際に開始されるものとして説明する。
《Image processing》
Hereinafter, in the
S401で、撮像部105はシステム制御部101の制御の下、被写体の撮像を行う。撮像によりアナログ画像信号が得られると、A/D変換部106はこれをA/D変換し、RAM103に格納する。本画像加工処理においてRAM103に格納される画像データは、瞳分割画素202aに係り撮像されたA像及び瞳分割画素202bに係り撮像されたB像と、該A像とB像とを加算することで構成された撮像画像(瞳分割していない状態に対応する画像)である。
In S401, the
以下の説明では、撮像範囲において被写体は図5に示されるように分布しているものとする。図示されるように、撮像範囲には手を挙げた状態の人物被写体500、人物被写体500よりもデジタルカメラ100に近い位置から人物被写体500よりも遠い位置にかけて延びた生垣501、生垣501よりも更に遠方に存在する木502が含まれる。また、撮像画像は、人物被写体500に合焦する撮像設定で撮像されているものとする。本実施形態の画像加工処理では、後述のステップにおいて該人物被写体500が注目被写体として選択され、該注目被写体に距離範囲にのみ合焦し、他の距離範囲の被写体についてはぼかしを付与することで、被写界深度の浅い画像を生成するものとして説明する。また簡単のため、奥行き方向の距離分布は、撮像範囲に分布する地面については除外し、人物被写体500、生垣501及び木502についてのみ導出されるものとして説明する。
In the following description, it is assumed that objects are distributed as shown in FIG. 5 in the imaging range. As shown in the figure, the imaging range includes a human subject 500 with his hand raised, a hedge 501 extending from a position closer to the
S402で、生成部300はシステム制御部101の制御の下、S401においてRAM103に格納されたA像及びB像に基づき、撮像画像と対応するデフォーカスマップを生成する。図8に、デフォーカスマップを、画素値であるデフォーカス量をグレースケール値に変換して可視化して例示する。説明をわかりやすくするため、図8の例では、被写体距離が近い画素ほど白に近い値(画素値が高い)を有し、遠離するほど黒に近い値(画素値が低い)となるように変換されているものとする。
In S402, under the control of the
ところで、上述したような分布で人物被写体500、生垣501及び木502が配置されている場合、特許文献1の技術のように該デフォーカスマップについてデフォーカス量に基づくヒストグラム(頻度分布)を構成した場合、図9のような分布となる。図9において、901で示されるヒストグラムの山は、遠方に配置された木502に係る画素群におけるデフォーカス量の分布を示している。一方、900で示されるヒストグラムの山は、人物被写体500及び生垣501に係る画素群におけるデフォーカス量の分布を示している。
By the way, when the human subject 500, the hedge 501, and the tree 502 are arranged in the distribution as described above, a histogram (frequency distribution) based on the defocus amount is constructed for the defocus map as in the technique of
ここで、引用文献1に記載のように所定の閾値902を上回るの頻度を示す、d1~d2で示されるデフォーカス範囲の画素を抽出したとしても、図10に示されるように、人物被写体500と生垣501に係る領域(図中の白領域)が抽出されるだけである。従って、このような抽出結果に基づいて処理をしたとしても、本実施形態のように注目被写体としたい人物被写体500の距離範囲にのみ合焦させる、被写界深度の浅い表現の画像を得ることはできない。換言すれば、生垣501が奥行き方向に広く延びた形状をしており、人物被写体500の被写体距離の範囲を含んで配置されている態様では、人物被写体500の距離範囲のみを、引用文献1に記載の技術では分離抽出することができない。故に、抽出された領域外についてぼかし処理を適用したとしても、生垣501の奥行き方向の距離範囲について合焦してしまうため、被写界深度を好適に狭めることができず、所望の表現の画像とならない。
Here, even if pixels in the defocus range indicated by d1 to d2, which indicate the frequency of exceeding a
このため、本発明に係る画像加工処理では、デフォーカス量のヒストグラムに基づいて抽出するデフォーカス量の値範囲を特定する際に、撮像画像の全域についてのヒストグラムではなく、注目被写体とする被写体の領域についてのヒストグラムを用いる。以下、処理の詳細についてさらに説明する。 Therefore, in the image processing according to the present invention, when specifying the value range of the defocus amount to be extracted based on the histogram of the defocus amount, instead of using the histogram for the entire area of the captured image, Use a histogram for regions. The details of the process will be further explained below.
S403で、検出部301はシステム制御部101の制御の下、撮像画像中に含まれる所定の被写体を検出する処理を行う。上述したように、本実施形態では人物被写体500の領域を特定する必要があるため、検出部301は、撮像画像に含まれる人物の顔領域を検出し、該顔領域の位置及びサイズ(FACE_SIZE_X, FACE_SIZE_Y)の情報を取得する。なお、本実施形態では検出部301は人物の顔領域を検出するものとして説明するが、本発明の実施はこれに限られるものではなく、例えば人物の胴体、乗用車、ペット、植物等が検出対象として設定されるものであってもよい。
In S403, the
なお、本実施形態では、検出部301が、予め定められた種類の被写体が撮像画像に含まれるか否かを検出し、該検出結果に基づいて注目被写体を設定するものとして説明するが、本発明の実施はこれに限られるものではないことは容易に理解されよう。即ち、撮像画像中から注目被写体を設定する方法は、画像解析に基づくものである必要はなく、例えばユーザによる注目被写体の選択操作に基づいて設定されるものであってもよいし、撮像画像中の特定の領域について設定されるものとして定められていてもよい。
In this embodiment, the
S404で、領域設定部302はシステム制御部101の制御の下、S403における検出部301の検出結果に基づいて、撮像画像に対応するデフォーカスマップ中のヒストグラムを構成する解析領域を設定する。本実施形態では、人物の顔領域が検出部301により検出されるため、領域設定部302は、例えば図11に示されるように顔領域1100のサイズに対して相対的に定められた解析領域1102を、ヒストグラムを構成する解析領域として設定する。図11の例では、解析領域1102は、人物被写体500の顔領域1100のサイズ(FACE_SIZE_X, FACE_SIZE_Y)に対して、予め設定した拡大率(MAG_X, MAG_Y)を乗じたサイズとなっている。解析領域1102の配置位置は、顔領域1100の上端から、顔領域1100のサイズに応じたFACE_MARGIN分(1101)だけY軸方向に移動した位置を上端とするように決定される。
In S404, under the control of the
ここで、解析領域1102のサイズを決定するための拡大率は、撮像画像における被写界深度に応じて変更することが好ましい。例えば、被写界深度が浅くなる撮像条件で、人物被写体500の顔に合焦させてポートレート撮影を行うと、該被写体の胴体の像の境界部分が光学的なボケによって、被写界深度が深い撮像条件の場合よりも外側に膨張する傾向がある。故に、拡大率は、撮像画像における被写界深度が浅くなっているほど、デフォーカス量の範囲抽出に用いる領域が大きくなるよう設定されるものであってよい。
Here, the magnification rate for determining the size of the
なお、本実施形態では人物の顔領域を検出するため、顔領域1100と解析領域1102を図11のような態様で設定するものとして説明するが、ヒストグラムを構成する解析領域の設定は、これに限られるものではない。例えば、人物の胴体も検出する態様においては、人体の検出結果に基づいて、人物被写体500により合致した領域を設定することができる。また、ヒストグラムを構成する解析領域は、検出する被写体の種類、あるいは注目被写体として選択された被写体の種類に応じて、動的にサイズが変更され、設定されるものであってもよい。ここで、図示されるように解析領域1102は、厳密に被写体の輪郭に合致するよう設定される必要はない。
Note that in this embodiment, in order to detect a person's face area, the
S405で、構成部303はシステム制御部101の制御の下、S404において設定されたヒストグラムを構成する解析領域について、デフォーカスマップに基づくヒストグラムを構成する。本ステップで生成されるヒストグラムは、図11で示したように、人物被写体500について設定された解析領域1102に含まれる画素のみで構成されるため、例えば図12のように現れる。換言すれば、本ステップでは単純にデフォーカスマップの全域についてヒストグラムを生成する場合よりも、より人物被写体500に合わせた領域でヒストグラムを構成できる。このため、人物被写体500と共通する被写体距離に存在する他の被写体が存在していても、該他の被写体の距離範囲に依らず、人物被写体500に係る画素が分布するデフォーカス量の範囲を取得することができる。
In S405, under the control of the
S406で、システム制御部101は、構成された解析領域1102についてのデフォーカス量のヒストグラムに基づいて、閾値1201を上回る数の頻度を示すデフォーカス量の範囲(最小デフォーカス量d1及び最大デフォーカス量d2)を特定する。システム制御部101は、特定したデフォーカス量の範囲の情報を、RAM103に格納する。
In S406, the
S407で、領域抽出部304はシステム制御部101の制御の下、デフォーカスマップの全域から、S406において特定した範囲に含まれるデフォーカス量を示す画素(領域)を抽出する。このようにして、人物被写体500の顔領域1100に合わせて設定された解析領域1102に基づいて特定したデフォーカス量の範囲に含まれる画素を抽出すると、図13に示されるようになる。図示されるように、解析領域1102に基づいて特定したデフォーカス量の範囲に含まれる画素のみを抽出すると、人物被写体500と、生垣501のうちの該範囲に含まれる位置の像のみが抽出される。
In S407, under the control of the
本実施形態のデジタルカメラ100では、輝度情報や色情報のヒストグラムとは異なり、デフォーカス量に係るヒストグラムに基づいて被写体領域の抽出を行うため、1つの被写体は一定の距離範囲に分布するとの特徴を生かした抽出を行うことができる。故に、解析領域1102に基づいてデフォーカス量の範囲を設定したとしても、図13に示されるように、人物被写体500が挙げている手や胴体のその他の部位も抽出され得る。
In the
なお、デフォーカスマップのヒストグラムの山は、被写界深度が浅い撮像条件で撮像画像が取得されている場合ほど、山の裾野が広がり、かつ、デフォーカス量の頻度の変動も大きくなる傾向にある。このため、被写界深度が浅い撮像条件の場合には、システム制御部101は、デフォーカス量の範囲抽出に用いる閾値を低減させるようにし、より広範囲の領域を抽出できるように範囲の設定をすることが好適である。このように構成することで、例えばポートレート撮影のような、人物被写体500の顔部分に合焦した、被写界深度が浅い撮像条件で撮像が行われた場合に、顔領域に比べてデフォーカスしているような胴体部についても、抽出が可能になる。
Note that the peaks in the histogram of the defocus map tend to have wider bases and larger fluctuations in the frequency of the defocus amount when images are acquired under imaging conditions with a shallower depth of field. be. Therefore, in the case of imaging conditions with a shallow depth of field, the
S408で、領域抽出部304はシステム制御部101の制御の下、撮像画像のうちのS407において抽出された領域の画像を分離する。即ち、領域抽出部304は、デフォーカスマップと対応する撮像画像中から、図13において白色で示した領域の部分画像を分離する。
In S408, the
なお、本実施形態では人物被写体500の距離範囲に合焦する表現の画像を生成するものとしたため、該範囲に存在する生垣501の領域についても分離するものとして説明するが、人物被写体500にのみ合焦する表現では、生垣501の領域も除外してよい。この場合、領域抽出部304は、例えば人物被写体500の距離範囲に該当する領域のうち、解析領域1102の基準となった顔領域1100と連続性のない領域を除外するよう処理すれば、図14のように人物被写体500の領域のみを分離することができる。
Note that in this embodiment, since an image is generated that focuses on the distance range of the human subject 500, the area of the hedge 501 existing in this range will also be separated. In the in-focus expression, the area of the hedge 501 may also be excluded. In this case, the
S409で、効果処理部305はシステム制御部101の制御の下、撮像画像のうちのS408において分離されなかった領域に対して、例えばローパスフィルタを適用することでぼかし処理を行う。また画像処理部107は、ぼかし処理が適用された画像とS408において分離された画像とを合成することで、撮像時よりも被写界深度の浅い表現の加工画像を生成して記録媒体108に記録させ、本画像加工処理を完了する。
In S409, under the control of the
以上説明したように、本実施形態の画像処理装置によれば、注目の被写体の領域を被写体の距離分布に基づいて好適に抽出することができる。より詳しくは、画像処理装置は、撮像画像と、該撮像画像とに対応して得られた被写体の距離分布を示す距離情報に基づき、所望の被写体の領域に限定して、該被写体の距離範囲を特定する。そして、特定した距離範囲に基づき、所望の被写体の距離範囲に含まれる被写体の領域を、撮像画像中から抽出することができるため、画像処理装置は、これを用いた種々の表現の画像生成を行うことができる。 As described above, according to the image processing apparatus of this embodiment, the region of the subject of interest can be suitably extracted based on the distance distribution of the subject. More specifically, the image processing device determines the distance range of a desired object based on a captured image and distance information indicating a distance distribution of the object obtained corresponding to the captured image. Identify. Then, based on the specified distance range, the area of the subject included in the distance range of the desired subject can be extracted from the captured image, so the image processing device can generate images of various expressions using this. It can be carried out.
なお、本実施形態では、注目被写体の距離範囲にのみ合焦し、その他の距離範囲の被写体はぼけた状態の、被写界深度の浅い表現の画像を生成するものとして説明したが、本発明の実施はこれに限られるものではない。即ち、分離した領域または分離しなかった領域に対して、効果処理部305が適用する画像処理は、ぼかし処理に限らず、例えば明るさ補正やコントラスト補正等、種々の画像処理を含むものであってよい。換言すれば、本発明は、注目被写体の距離範囲か範囲外であるかに応じて、画像処理の適用を分けることで実現される表現であれば、適用可能である。
In this embodiment, an image with a shallow depth of field is generated in which only the distance range of the subject of interest is in focus and objects in other distance ranges are blurred. However, the present invention The implementation is not limited to this. That is, the image processing applied by the
また、本実施形態ではデジタルカメラ100が撮像面位相差測距方式の測距機能を有する撮像素子を有し、撮像画像とともに視差を有する関係の画像群を取得し、デフォーカスマップを生成するものとして説明したが、本発明の実施はこれに限られない。撮像範囲に係るデフォーカスマップは、撮像画像と同時に取得されるものでなく、予め記録媒体108等に記録されているものであってもよい。
Furthermore, in the present embodiment, the
また本実施形態では、デフォーカスマップは視差を有する関係にある画像群に基づいて生成されるものとして説明したが、撮像画像に対応し、撮像範囲における被写体の距離分布を取得可能であれば、この方式に限られるものではない。デフォーカスマップの生成方式は、例えばピントや絞り値が異なる2枚の画像の相関からデフォーカス量を導出するDFD(Depth From Defocus)方式であってもよい。あるいは、被写体の距離分布は、TOF(Time of Flight)方式等の測距センサモジュールから得た距離分布に関連する情報を用いて導出されるものであってもよい。いずれの方式で得た距離分布であっても、距離分布に係るヒストグラムを取得する領域を、注目被写体に係る領域に限定する態様とすることで、同様に本発明を実現することができる。 Furthermore, in this embodiment, the defocus map has been described as being generated based on a group of images having a parallax relationship, but if it corresponds to the captured image and it is possible to obtain the distance distribution of the subject in the imaging range, The method is not limited to this method. The defocus map generation method may be, for example, a DFD (Depth From Defocus) method in which the amount of defocus is derived from the correlation between two images with different focuses or aperture values. Alternatively, the distance distribution of the subject may be derived using information related to the distance distribution obtained from a distance measurement sensor module such as a TOF (Time of Flight) method. Regardless of the distance distribution obtained by any method, the present invention can be similarly implemented by limiting the area from which the histogram related to the distance distribution is obtained to the area related to the subject of interest.
本実施形態では、撮像範囲における被写体の距離分布を示す距離情報として、デフォーカス量を参照するデフォーカスマップを用いるものとして説明したが、本発明の実施はこれに限られるものではない。即ち、被写体の距離分布を示す情報は、デフォーカス量ではなく、例えばデフォーカス量の導出において導出されたずらし量(像ずれ量)や、デフォーカス量にもとづいて導出される被写体距離を値として格納するものであってもよい。前者の場合、撮像素子の画素ピッチPYや一対の測距瞳を通過する光束の重心の開き角で定まる変換係数KXを保持しておく必要がなく、情報量を減らすことができる。また後者の場合は、ユーザが把握しやすい数値となっているため、例えば表示部110を介して処理の過程で提示することで、どのような表現の画像が生成されるかをユーザに好適に伝えることができる。
Although the present embodiment has been described as using a defocus map that refers to the amount of defocus as the distance information indicating the distance distribution of the subject in the imaging range, the implementation of the present invention is not limited to this. In other words, the information indicating the distance distribution of the object is not determined by the amount of defocus, but by using, for example, the amount of shift (image shift amount) derived in deriving the amount of defocus, or the object distance derived based on the amount of defocus as a value. It may also be something that is stored. In the former case, there is no need to hold the conversion coefficient KX determined by the pixel pitch PY of the image sensor or the aperture angle of the center of gravity of the light beam passing through the pair of distance measuring pupils, and the amount of information can be reduced. In the latter case, since the numerical value is easy for the user to understand, for example, by presenting it during the processing process via the
また本実施形態の画像加工処理では、注目被写体とする人物被写体500に合焦している条件で撮像が行われた態様について説明したが、本発明の実施はこれに限られるものではない。即ち、本発明によれば、合焦していない状態の被写体を注目被写体とした場合であっても、該被写体の領域のデフォーカス量を参照して被写体の距離範囲に存在する画素を特定することができるため、撮像時における合焦の有無は本発明の実施に無関係である。 Furthermore, in the image processing processing of the present embodiment, a mode has been described in which imaging is performed under the condition that the human subject 500 as the subject of interest is in focus, but the implementation of the present invention is not limited to this. That is, according to the present invention, even when an out-of-focus subject is set as the subject of interest, pixels existing within the distance range of the subject are identified by referring to the amount of defocus in the area of the subject. Therefore, the presence or absence of focus during imaging is irrelevant to the implementation of the present invention.
なお、処理負荷やヒストグラム自体のデータ量の低減の観点からは、ヒストグラムの横軸で表される階級数を低減させることで、ヒストグラム構成に係る演算量を低減することができる。 Note that from the viewpoint of reducing the processing load and the amount of data of the histogram itself, the amount of calculations related to the histogram configuration can be reduced by reducing the number of classes represented by the horizontal axis of the histogram.
例えば、図16に示されるように、撮像範囲に複数の被写体が分布している態様について検討する。図16は、撮像範囲における被写体の配置を示した鳥瞰図である。図において、撮像地点1600はデジタルカメラ100が設置される位置(撮像面の位置)を示し、光学系104として焦点距離が200mmのレンズが採用されて撮像が行われるものとする。ここで、被写体A1601は、撮像地点1600よりも2m奥に存在し、デジタルカメラ100は被写体A1601に合焦させた状態で撮像を行うものとする。また被写体B1602は撮像地点1600よりも2.1m奥、被写体C1603は撮像地点1600よりも1m奥、被写体D1604は撮像地点1600よりも100m奥に存在するよう分布しており、奥行方向に広範囲に被写体が存在するシーンとなっている。このような配置態様において、合焦させた被写体A1601の距離範囲のみをデフォーカスマップから抽出するとする。なお、ヒストグラムの階級数は32階級(0~31)に設定されるものとし、ヒストグラムの構成時には、デフォーカス量の値は、最小値が0~最大値が31までのいずれかの分類となるように正規化される。
For example, as shown in FIG. 16, consider a mode in which a plurality of subjects are distributed in the imaging range. FIG. 16 is a bird's-eye view showing the arrangement of subjects in the imaging range. In the figure, an
レンズを境界とする被写体側(物体側)と撮像素子の(像面側)の結像関係を、図18のように表される。該レンズの焦点距離をfとすると、
1/Zo+1/So=1/f
1/Zdef+1/(So+def)=1/f
となる。ここで、Zoは合焦被写体の物体側距離、Zdefはデフォーカス被写体の物体側距離、Soは合焦被写体の像面側距離、Sdefはデフォーカス被写体の像面側距離である。これらの式から
So=(Zo・f)/(Zo-f)
Sdef=(Zdef・f)/(Zdef-f)
を導くことができるため、デフォーカス被写体に係るデフォーカス量defは、
def=Sdef-So
として導出できる。
The imaging relationship between the subject side (object side) with the lens as the boundary and the image sensor (image plane side) is expressed as shown in FIG. If the focal length of the lens is f, then
1/Zo+1/So=1/f
1/
becomes. Here, Zo is the object side distance of the focused subject, Zdef is the object side distance of the defocused subject, So is the image side distance of the focused subject, and Sdef is the image side distance of the defocused subject. From these formulas, So=(Zo・f)/(Zo−f)
Sdef=(Zdef・f)/(Zdef−f)
can be derived, so the defocus amount def for the defocused subject is:
def=Sdef-So
It can be derived as
図17に示されるように、各被写体の被写体距離とデフォース量との関係が導かれた場合、撮像画像に対応するデフォーカスマップの全域についてヒストグラムを構成しようとすると、少なくとも被写体Dから被写体Cまでのデフォーカス量を含める必要がある。より詳しくは、少なくとも被写体D1604のデフォーカス量-21.82mmをヒストグラムの0とし、被写体Cのデフォーカス量27.78mmをヒストグラムの31に分類するように会長の正規化が必要となる。そのため、ひとつの階級におけるデフォーカス量の階級幅は(|-21.82|+|27.78|)/31=1.6mmとなる。故に、ヒストグラムにおけるデフォーカス量の分解能よりも、被写体B1602のデフォーカス量の方が小さくなり、被写体A1601と被写体B1602とをヒストグラムに基づいて分離することができない。ここで、例えば得られたデフォーカス分布に応じて、ヒストグラムの階級幅を狭めて階級数を上げれば、被写体A1601と被写体B1602を分離することは可能であるが、先に述べたようにヒストグラムの階級数は低い方が、演算量の観点で有利である。 As shown in FIG. 17, when the relationship between the subject distance and the amount of deforce for each subject is derived, if you try to construct a histogram for the entire area of the defocus map corresponding to the captured image, at least from subject D to subject C. It is necessary to include the amount of defocus. More specifically, Chairman's normalization is required so that at least the defocus amount of -21.82 mm of the subject D1604 is classified as 0 in the histogram, and the defocus amount of 27.78 mm of the subject C is classified as 31 in the histogram. Therefore, the class width of the defocus amount in one class is (|−21.82|+|27.78|)/31=1.6 mm. Therefore, the defocus amount of the subject B1602 is smaller than the resolution of the defocus amount in the histogram, and the subject A1601 and the subject B1602 cannot be separated based on the histogram. Here, it is possible to separate subject A1601 and subject B1602 by narrowing the class width of the histogram and increasing the number of classes according to the obtained defocus distribution. A lower number of classes is advantageous in terms of the amount of calculation.
一方で、本発明によればヒストグラムの構成を、注目被写体に係る領域に限定してヒストグラムを構成するため、そもそもサンプル数が少なくて済むだけでなく、領域に含まれない被写体の距離を除外できる。即ち、ヒストグラムの取得領域を被写体A1601の近傍に限定するため、例えば被写体C1603や被写体D1604のデフォーカス量を正規化に含める必要がなくなるため、ヒストグラムの階級をデフォーカス量0mm近傍で割り当てることができる。つまり、ヒストグラムの取得領域に含まれるデフォーカス量の分布に対して予め定められた階級数を割り振ることができるため、階級幅を狭めるように設定してより精査に解析を行うことができる。故に、ヒストグラムの階級数を上げなくても被写体A1601と被写体B1602とを、デフォーカスマップのヒストグラムを参考にして分離することができる。その結果、被写体A1601のみの距離範囲をデフォーカスマップから好適に抽出することが実現できる。
On the other hand, according to the present invention, since the histogram is configured by limiting it to the area related to the subject of interest, not only does the number of samples need to be small in the first place, but also the distances of subjects that are not included in the area can be excluded. . That is, since the histogram acquisition area is limited to the vicinity of the subject A1601, it is not necessary to include the defocus amount of the subject C1603 or the subject D1604 in the normalization, for example, so that the histogram class can be assigned near the defocus amount of 0 mm. . In other words, since a predetermined number of classes can be assigned to the distribution of defocus amounts included in the histogram acquisition area, it is possible to perform a more detailed analysis by narrowing the range of classes. Therefore, the
[変形例]
上述した実施形態では、撮像画像から人物被写体の顔領域を検出して注目被写体を特定する態様について説明したが、このような態様において、例えば、検出部301が顔領域を複数検出するケースも存在し得る。このとき、1人の人物被写体についてのみ合焦するよう、該被写体の距離範囲を特定するためには、以下のように処理すればよい。
[Modified example]
In the above-described embodiment, a mode has been described in which a face area of a human subject is detected from a captured image to identify a subject of interest. However, in such a mode, for example, there are cases in which the
例えば、図15に示されるように、撮像範囲中に、人物被写体1500aと、その後方に位置する人物被写体1500bとが存在し、検出部301によって検出された各被写体の顔領域の中心が顔中心1501aと顔中心1501bが配置されているとする。このとき、人物被写体1500aの距離範囲の被写体の領域のみを抽出すべく、人物被写体1500aの顔領域に対して予め設定した拡大率(MAG_X, MAG_Y)を乗じた、破線で示される解析領域1502を設定したとする。しかしながら、図示されるように、人物被写体1500aと人物被写体1500bとが近接している態様では、解析領域1502に人物被写体1500bの像が含まれ得る。結果、解析領域1502についてデフォーカス量のヒストグラムを構成したとしても、人物被写体1500aと人物被写体1500bの距離範囲を好適に分離することができない可能性がある。
For example, as shown in FIG. 15, there are a
従って、このように検出部301が複数の顔領域を演出し、いずれかの顔領域に係る被写体の距離範囲のみを抽出したい場合、拡大率は、ヒストグラムを構成する解析領域が人物被写体1500bの領域を除外した調整領域1503となるよう、調整されてよい。具体的には領域設定部302は、顔中心1501aの座標(FACE1_POS_X, FACE1_POS_Y)と顔中心1501bの座標(FACE2_POS_X, FACE2_POS_Y)とがなす距離応じて拡大率を補正することで、調整領域1503を設定すればよい。
Therefore, when the
発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the embodiments described above, and various changes and modifications can be made without departing from the spirit and scope of the invention. Therefore, the following claims are hereby appended to disclose the scope of the invention.
[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other embodiments]
The present invention provides a system or device with a program that implements one or more functions of the embodiments described above via a network or a storage medium, and one or more processors in a computer of the system or device reads and executes the program. This can also be achieved by processing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
100:デジタルカメラ、101:システム制御部、102:ROM、103:RAM、104:光学系、105:撮像部、106:A/D変換部、107:画像処理部、108:記録媒体、109:操作入力部、110:表示部、300:生成部、301:検出部、302:領域設定部、303:構成部、304:領域抽出部、305:効果処理部 100: Digital camera, 101: System control unit, 102: ROM, 103: RAM, 104: Optical system, 105: Imaging unit, 106: A/D conversion unit, 107: Image processing unit, 108: Recording medium, 109: Operation input unit, 110: Display unit, 300: Generation unit, 301: Detection unit, 302: Area setting unit, 303: Configuration unit, 304: Area extraction unit, 305: Effect processing unit
Claims (14)
前記撮像画像について注目被写体を決定する決定手段と、
前記撮像画像における前記注目被写体の位置に基づいて、距離分布を解析する解析領域を設定する設定手段と、
前記距離情報のうちの前記解析領域に含まれる値の頻度分布に基づいて、該解析領域に含まれる被写体が分布する値範囲を特定する特定手段と、
前記値範囲に含まれる情報を示す前記距離情報の領域を抽出することで、少なくとも前記注目被写体を含む被写体領域を抽出する抽出手段と、
を有することを特徴とする画像処理装置。 acquisition means for acquiring a captured image of a subject in an imaging range, and distance information storing a value indicating a distance distribution in a depth direction of the subject in the imaging range for an area corresponding to the captured image;
determining means for determining a subject of interest for the captured image;
Setting means for setting an analysis region for analyzing distance distribution based on the position of the subject of interest in the captured image;
Identification means for identifying a value range in which objects included in the analysis area are distributed based on a frequency distribution of values included in the analysis area of the distance information;
Extracting means for extracting a subject region including at least the subject of interest by extracting a region of the distance information indicating information included in the value range;
An image processing device comprising:
前記設定手段は、前記注目被写体に対応する前記所定の被写体の像が現れる領域を含む所定の大きさの領域を、前記解析領域として設定する
ことを特徴とする請求項1乃至6のいずれか1項に記載の画像処理装置。 The determining means determines the object of interest from among the detected predetermined objects by detecting a predetermined object included in the captured image,
7. The setting means sets an area of a predetermined size including an area where an image of the predetermined subject corresponding to the subject of interest appears as the analysis area. The image processing device described in .
前記距離情報の各画素に格納される値は、前記撮像画像において該画素に存在する被写体の像のデフォーカス量である
ことを特徴とする請求項1乃至9のいずれか1項に記載の画像処理装置。 The distance information is two-dimensional information having the same pixel structure as the captured image,
The image according to any one of claims 1 to 9 , wherein the value stored in each pixel of the distance information is a defocus amount of an image of a subject existing at the pixel in the captured image. Processing equipment.
前記距離情報の各画素に格納される値は、前記撮像画像において該画素に存在する被写体の、前記画像群における相対的な像ずれ量である
ことを特徴とする請求項1乃至9のいずれか1項に記載の画像処理装置。 The distance information is two-dimensional information having the same pixel structure as the captured image, and is information in which a value is stored based on a group of images captured in the imaging range from a plurality of different viewpoints,
Any one of claims 1 to 9 , wherein the value stored in each pixel of the distance information is a relative image shift amount in the group of images of a subject existing at the pixel in the captured image. The image processing device according to item 1.
前記距離情報の各画素に格納される値は、前記撮像画像において該画素に存在する被写体の奥行き方向の距離である
ことを特徴とする請求項1乃至9のいずれか1項に記載の画像処理装置。 The distance information is two-dimensional information having the same pixel structure as the captured image,
The image processing according to any one of claims 1 to 9 , wherein the value stored in each pixel of the distance information is a distance in the depth direction of a subject existing at the pixel in the captured image. Device.
前記撮像画像について注目被写体を決定する決定工程と、
前記撮像画像における前記注目被写体の位置に基づいて、距離分布を解析する解析領域を設定する設定工程と、
前記距離情報のうちの前記解析領域に含まれる値の頻度分布に基づいて、該解析領域に含まれる被写体が分布する値範囲を特定する特定工程と、
前記値範囲に含まれる情報を示す前記距離情報の領域を抽出することで、少なくとも前記注目被写体を含む被写体領域を抽出する抽出工程と、
を有することを特徴とする画像処理方法。 an acquisition step of acquiring a captured image of a subject in an imaging range, and distance information storing a value indicating a distance distribution in a depth direction of the subject in the imaging range for an area corresponding to the captured image;
a determining step of determining a subject of interest for the captured image;
a setting step of setting an analysis region for analyzing distance distribution based on the position of the subject of interest in the captured image;
a specifying step of specifying a value range in which objects included in the analysis area are distributed based on a frequency distribution of values included in the analysis area of the distance information;
an extraction step of extracting a subject region including at least the subject of interest by extracting a region of the distance information indicating information included in the value range;
An image processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019084430A JP7373297B2 (en) | 2019-04-25 | 2019-04-25 | Image processing device, image processing method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019084430A JP7373297B2 (en) | 2019-04-25 | 2019-04-25 | Image processing device, image processing method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020181401A JP2020181401A (en) | 2020-11-05 |
JP7373297B2 true JP7373297B2 (en) | 2023-11-02 |
Family
ID=73024708
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019084430A Active JP7373297B2 (en) | 2019-04-25 | 2019-04-25 | Image processing device, image processing method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7373297B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024034449A1 (en) * | 2022-08-06 | 2024-02-15 | モルゲンロット株式会社 | Information processing device, and information processing method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014197824A (en) | 2013-03-05 | 2014-10-16 | キヤノン株式会社 | Image processing apparatus, image capturing apparatus, image processing method, and program |
JP2017126979A (en) | 2016-01-13 | 2017-07-20 | キヤノン株式会社 | Image processing apparatus, method of controlling image processing apparatus, imaging apparatus, and program |
-
2019
- 2019-04-25 JP JP2019084430A patent/JP7373297B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014197824A (en) | 2013-03-05 | 2014-10-16 | キヤノン株式会社 | Image processing apparatus, image capturing apparatus, image processing method, and program |
JP2017126979A (en) | 2016-01-13 | 2017-07-20 | キヤノン株式会社 | Image processing apparatus, method of controlling image processing apparatus, imaging apparatus, and program |
Also Published As
Publication number | Publication date |
---|---|
JP2020181401A (en) | 2020-11-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9607240B2 (en) | Image processing apparatus, image capturing apparatus, image processing method, image capturing method, and non-transitory computer-readable medium for focus bracketing | |
US9208396B2 (en) | Image processing method and device, and program | |
CN105391932B (en) | Image processing apparatus and its control method and photographic device and its control method | |
US9503633B2 (en) | Image processing apparatus, image capturing apparatus, image processing method, and storage medium | |
US9076214B2 (en) | Image acquisition apparatus and image processing apparatus using selected in-focus image data | |
US10855903B2 (en) | Image processing apparatus, image capturing apparatus, control method and recording medium | |
JP2016024489A (en) | Image processing apparatus, imaging device, image processing method, and program | |
EP2635019B1 (en) | Image processing device, image processing method, and program | |
JP6611531B2 (en) | Image processing apparatus, image processing apparatus control method, and program | |
JP6234401B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
US11812137B2 (en) | Measurement apparatus, image capturing apparatus, control method, and recording medium | |
JP6529360B2 (en) | Image processing apparatus, imaging apparatus, image processing method and program | |
JP2020009180A (en) | Information processing apparatus, imaging apparatus, image processing method, and program | |
JP7373297B2 (en) | Image processing device, image processing method and program | |
JP2018018425A (en) | Image processing device and image processing method | |
JP6728020B2 (en) | Image processing apparatus, image processing method and program | |
JP7437915B2 (en) | Image processing device, imaging device, image processing method, and program | |
JP2016099322A (en) | Imaging device, control method of imaging device, and program | |
KR101599434B1 (en) | Space detecting apparatus for image pickup apparatus using auto focusing and the method thereof | |
JP6448324B2 (en) | Image processing apparatus, imaging apparatus, image processing system, image processing method, and image processing program | |
JP7346021B2 (en) | Image processing device, image processing method, imaging device, program and recording medium | |
JP2021164066A (en) | Image processing device, imaging apparatus, image processing method and program | |
JP6245974B2 (en) | Image processing apparatus, control method, and program | |
JP2023069386A (en) | Image measurement device, method and program | |
JP2021135725A (en) | Image processing apparatus, control method of the same and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20210103 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210113 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220425 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230407 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230605 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20230922 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20231023 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7373297 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |