JP2019186911A - Image processing apparatus, image processing method, and imaging apparatus - Google Patents
Image processing apparatus, image processing method, and imaging apparatus Download PDFInfo
- Publication number
- JP2019186911A JP2019186911A JP2019023778A JP2019023778A JP2019186911A JP 2019186911 A JP2019186911 A JP 2019186911A JP 2019023778 A JP2019023778 A JP 2019023778A JP 2019023778 A JP2019023778 A JP 2019023778A JP 2019186911 A JP2019186911 A JP 2019186911A
- Authority
- JP
- Japan
- Prior art keywords
- subject
- detection
- parameter
- image processing
- processing apparatus
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Focusing (AREA)
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、画像処理装置および画像処理方法、ならびに撮像装置に関し、特に被写体検出技術に関する。 The present invention relates to an image processing apparatus, an image processing method, and an imaging apparatus, and more particularly to a subject detection technique.
画像から特定の被写体パターンを自動的に検出する被写体検出技術は非常に有用である。特許文献1には、撮影した画像から人物の顔のような特定の被写体パターンに該当する領域を検出し、検出した領域に焦点や露出を最適化させる撮像装置が開示されている。
A subject detection technique for automatically detecting a specific subject pattern from an image is very useful.
また、深層学習と呼ばれる手法を用いて、画像中の被写体を学習、認識することが知られている(非特許文献1)。コンボリューショナル・ニューラル・ネットワーク(CNN)は、深層学習の代表的な手法である。一般的にCNNは、画像の局所の特徴を空間的に統合する畳み込み層、特徴量を空間方向へ圧縮するプーリング層またはサブサンプリング層、さらに、全結合層、出力層などが組み合わされた多層構造を有する。CNNは多層構造による段階的な特徴変換を通じて、複雑な特徴表現を獲得することができるため、特徴表現に基づいて画像中の被写体のカテゴリ認識や被写体検出を高精度に行うことができる。 It is also known to learn and recognize a subject in an image using a technique called deep learning (Non-Patent Document 1). The convolutional neural network (CNN) is a typical technique for deep learning. In general, CNN is a multi-layer structure in which a convolution layer that spatially integrates local features of an image, a pooling layer or sub-sampling layer that compresses features in the spatial direction, and a fully connected layer, an output layer, etc. Have Since the CNN can acquire a complicated feature expression through stepwise feature conversion with a multi-layer structure, the category recognition of the subject in the image and the subject detection can be performed with high accuracy based on the feature representation.
特許文献1のように、撮影画像から検出された被写体領域に焦点を合わせる撮像装置においては、被写体検出に対する要求が、主被写体(焦点を合わせる被写体)の決定前後で異なる。主被写体の決定前では、ボケの大きさにかかわらず、検出対象の被写体を漏れなく検出できた方がよい。一方、主被写体の決定後は、ボケの大きな被写体は検出しなくてよい。
In an imaging apparatus that focuses on a subject area detected from a captured image as in
しかしながら、従来、機械学習を利用した被写体検出において、主被写体の決定前に適した被写体検出と、主被写体の決定後に適した被写体検出とを実現させるための手法は提案されていなかった。換言すれば、主被写体のボケ量(もしくは鮮明度)に適した被写体検出を行うための手法は提案されていなかった。主被写体のボケ量や鮮明度は、合焦度合いに限らず、被写体ブレや手ぶれの程度や、画像ノイズの大きさなどによっても変化する。 However, conventionally, in subject detection using machine learning, a method for realizing subject detection suitable before determination of the main subject and subject detection suitable after determination of the main subject has not been proposed. In other words, a method for subject detection suitable for the amount of blur (or definition) of the main subject has not been proposed. The blur amount and sharpness of the main subject are not limited to the degree of focus, but also vary depending on the degree of subject blurring and camera shake, the magnitude of image noise, and the like.
本発明はこのような従来技術の課題に鑑みてなされたものである。本発明の目的は、機械学習を利用した被写体検出において、主被写体のボケ量や鮮明度に適した被写体検出を実現可能な画像処理装置および画像処理方法、ならびに撮像装置を提供することにある。 The present invention has been made in view of the problems of the prior art. An object of the present invention is to provide an image processing device, an image processing method, and an imaging device capable of realizing subject detection suitable for a blur amount and a sharpness of a main subject in subject detection using machine learning.
上述の目的は、機械学習に基づいて生成されたパラメータを用いて、画像に対して被写体検出処理を適用する被写体検出手段と、被写体検出処理に用いるパラメータを複数記憶する記憶手段と、記憶手段が記憶するパラメータから、被写体検出手段で用いるパラメータを選択する選択手段と、を有し、選択手段は、主被写体が決定されている場合と、決定されていない場合とで、異なるパラメータを選択することを特徴とする画像処理装置によって達成される。また、同様の構成において、選択手段は、ブレが大きいと類推されるか否か、位置姿勢変化が大きいか否か、画像に施されたゲインが大きいか否かで異なるパラメータを選択することを特徴とする画像処理装置によって達成される。 The above-described object is provided by subject detection means for applying subject detection processing to an image using parameters generated based on machine learning, storage means for storing a plurality of parameters used for subject detection processing, and storage means. Selection means for selecting a parameter to be used by the subject detection means from the stored parameters, and the selection means selects different parameters depending on whether the main subject is determined or not. This is achieved by an image processing apparatus characterized by the following. Further, in the same configuration, the selecting means selects different parameters depending on whether or not it is estimated that the shake is large, whether or not the position and orientation change is large, and whether or not the gain applied to the image is large. This is achieved by the featured image processing apparatus.
本発明によれば、機械学習を利用した被写体検出において、主被写体の決定前に適した被写体検出と、主被写体の決定後に適した被写体検出とを実現可能な画像処理装置および画像処理方法、ならびに撮像装置を提供することができる。また、主被写体の動き状況、撮像装置の動き状況、撮影条件に応じて適した被写体検出を実現可能な画像処理装置および画像処理方法ならびに撮像装置を提供することができる。 According to the present invention, in subject detection using machine learning, an image processing apparatus and an image processing method capable of realizing subject detection suitable before the main subject is determined and subject detection suitable after the main subject is determined, and An imaging device can be provided. In addition, it is possible to provide an image processing device, an image processing method, and an imaging device capable of realizing subject detection suitable for the movement status of the main subject, the movement status of the imaging device, and the imaging conditions.
以下、添付図面を参照して、本発明の例示的な実施形態について詳細に説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定しない。また、実施形態には複数の特徴が記載されているが、その全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. The following embodiments do not limit the invention according to the claims. Further, although a plurality of features are described in the embodiment, all of them are not necessarily essential to the invention, and a plurality of features may be arbitrarily combined. Furthermore, in the accompanying drawings, the same reference numerals are assigned to the same or similar components, and duplicate descriptions are omitted.
以下の実施形態では、本発明をデジタル一眼レフカメラ(DSLR)で実施する場合に関して説明する。しかし、本発明は画像データを取り扱うことの可能な任意の電子機器で実施可能であり、デジタル一眼レフカメラは本発明に係る画像処理装置の一例に過ぎない。本発明を実施可能な電子機器には例えばパーソナルコンピュータ、スマートフォン、タブレット端末、ゲーム機、ロボットなどが含まれるが、これらに限定されない。 In the following embodiments, a case where the present invention is implemented by a digital single lens reflex camera (DSLR) will be described. However, the present invention can be implemented with any electronic device capable of handling image data, and a digital single-lens reflex camera is only an example of an image processing apparatus according to the present invention. Electronic devices that can implement the present invention include, but are not limited to, personal computers, smartphones, tablet terminals, game machines, robots, and the like.
《第1実施形態》
●(撮像装置の構成)
図1は本実施形態に係るデジタル一眼レフカメラ(DSLR)100の垂直断面図である。また、図2はDSLR100の機能構成例を示すブロック図である。全図を通じて同じ参照番号は同じ構成要素を指す。
<< First Embodiment >>
● (Configuration of imaging device)
FIG. 1 is a vertical sectional view of a digital single-lens reflex camera (DSLR) 100 according to this embodiment. FIG. 2 is a block diagram showing a functional configuration example of the
DSLR100は、本体101と、本体101に着脱可能な撮影レンズ102(交換レンズ)とを有する。本体101と撮影レンズ102の着脱部(マウント)にはそれぞれマウント接点群115が設けられている。撮影レンズ102を本体101に装着すると、マウント接点群115が接触し、撮影レンズ102と本体101との電気的な接続が確立する。
The DSLR 100 includes a
システム制御部201は、1つ以上のプログラマブルプロセッサと、ROM2011、RAM2012を有し、ROM2011に記憶されているプログラムをRAM2012に読み込んで実行することにより、本体101および撮影レンズ102の動作を制御する。ROM2011には、システム制御部201が実行するプログラムのほか、各種の設定値、GUIデータなどが記憶されている。
The
撮影レンズ102には合焦距離を調節するフォーカスレンズ113と、本体101に入射する光量を調整する絞り114(およびこれらを駆動するモータやアクチュエータなど)が設けられる。フォーカスレンズ113や絞り114の駆動は、マウント接点群115を通じてカメラ本体101が制御する。
The photographing
メインミラー103およびサブミラー104は、クイックリターンミラーを構成する。メインミラー103の一部は、撮影レンズ102から入射する光束をファインダー光学系(図の上方)に向かう光束と、サブミラー104に向かう光束に分離するために反射率(透過率)が制御されている。
The
図1は光学ファインダー使用時(非撮影時)の状態を示しており、メインミラー103が撮影レンズ102から入射する光束の光路中に位置している。この状態では、メインミラー103の反射光がファインダー光学系に入射し、ペンタプリズム107によって屈曲された光束はアイピース109から出射する。したがって、ユーザはアイピース109を覗くことにより、光学被写体像を見ることができる。
FIG. 1 shows a state when the optical viewfinder is used (when not photographing), and the
また、メインミラー103の透過光はサブミラー104で反射されてAFセンサ105に入射する。AFセンサ105は、撮影レンズ102の二次結像面をラインセンサー上に形成し、位相差検出方式による焦点検出に利用可能な1対の像信号(焦点検出用信号)を生成する。生成された焦点検出用信号はシステム制御部201へ送信される。システム制御部201は、焦点検出用信号を用いてフォーカスレンズ113のデフォーカス量を求め、デフォーカス量に基づいてフォーカスレンズ113の駆動方向および駆動量を制御する。
Further, the transmitted light of the
ピント板106は、ファインダー光学系内の撮影レンズ102の予定結像面に配置される。アイピース109を覗いたユーザは、ピント板106に形成された光学像を観察する。なお、光学像のほか、シャッタースピード、絞り値などの撮影情報も併せて提供することができる。
The
測光センサー108は、入射する光束から像信号(露出制御用信号)を生成し、システム制御部201へ送信する。システム制御部201は、受信した露出制御用信号を用いて自動露出制御を行ったり、後述する被写体検出部204による被写体検出を制御したりする。測光センサー108は、光電変換部を備える画素が2次元状に配置された撮像素子である。被写体検出部204は、測光センサー108が出力する像信号に対して被写体検出処理を適用するものとするが、撮像素子111が出力する像信号に対して被写体検出処理を適用してもよい。
The
撮像素子111の露光時、メインミラー103およびサブミラー104は、撮影レンズ102から入射する光束の光路の外に移動する。また、フォーカルプレーンシャッター110(以下、単にシャッターという)が開く。
When the
撮像素子111には、光電変換部を備える画素が2次元状に配置されており、撮影レンズ102が形成する被写体光学像を各画素で光電変換し、画像信号をシステム制御部201に送信する。システム制御部201は、受信した画像信号から画像データを生成して画像記憶部202へ保存するとともに、LCD等の表示部112に表示する。また、撮像素子111で生成された画像データは、被写体検出のために被写体検出部204にも供給されてもよい。なお、システム制御部201は、画像データを用い、コントラスト方式による焦点検出を行ってもよい。なお、システム制御部201は、画像データを用い、コントラスト方式による焦点検出を行ってもよい。
Pixels including a photoelectric conversion unit are two-dimensionally arranged in the
操作部203は、本体101および撮影レンズ102が備え、ユーザが操作可能な入力デバイス群の総称である。レリーズボタン、電源スイッチ、方向キー、決定ボタン、メニューボタン、動作モードの選択ダイヤルなどが操作部203に含まれる入力デバイスの具体例であるが、これらに限定されない。操作部203の操作は、システム制御部201が検知する。レリーズボタンは半押し操作でオンするスイッチSW1と、全押し操作でオンするスイッチSW2とを有する。
The
例えば、レリーズボタンの半押し操作(SW1のオン)が検出されると、システム制御部201は、静止画撮影準備動作を開始する。撮影準備動作は例えば自動焦点検出(AF)や自動露出制御(AE)に関する動作である。また、レリーズボタンの全押し操作(SW2のオン)を検出すると、システム制御部201は、静止画の撮影および記録動作を実行する。システム制御部201は、撮影によって得られた画像を、表示部112に一定時間表示する。
For example, when a half-press operation of the release button (SW1 is turned on) is detected, the
また、動画撮影時(撮影スタンバイ状態や動画記録中)、システム制御部201は、撮影によって得られた動画を、表示部112にリアルタイムに表示することにより、表示部112を電子ビューファインダー(EVF)として機能させる。表示部112をEVFとして機能させる際に表示する動画像およびそのフレーム画像を、ライブビュー画像もしくはスルー画像と呼ぶ。静止画と動画の何れを撮影するかは操作部203を通じて選択可能であり、システム制御部201は、静止画撮影時と動画撮影時とで、カメラ本体101および撮影レンズ102の制御方法を切り替える。
In addition, during moving image shooting (in shooting standby state or during moving image recording), the
被写体検出部204は、GPU(Graphic Processing Unit)で構成される。GPUは、元々は画像処理用のプロセッサであるが、複数の積和演算器を有し、行列計算を得意としているため、学習用の処理を行うプロセッサとしても用いられることが多い。そして、深層学習を行う処理においても、GPUが用いられることが一般的である。例えば、被写体検出部204として、NVIDIA社のJetson TX2 moduleを用いることができる。なお、被写体検出部204として、FPGA(Field-Programmable Gate Array)やASIC(Application Specific Integrated Circuit)などを用いてもよい。
The
被写体検出部204は、学習モデル記憶部205が複数記憶する学習モデルのうち、システム制御部201が選択した1つの学習モデルを用いて、供給される画像データに対して被写体検出処理を適用する。被写体検出処理の詳細については後述する。学習モデル記憶部205は例えば書き換え可能な不揮発性メモリであってよく、ROM2011の一部であってもよい。本実施形態において学習モデル記憶部は、被写体検出に求められる特性に応じた検出学習モデル206,207を記憶する。システム制御部201は、被写体検出部204が検出した被写体の領域から主被写体の領域を決定し、主被写体の領域に焦点や露出を最適化させる。具体的には、主被写体の領域が適正露出となるように露出条件を決定したり、主被写体の領域が合焦するように焦点調節したりすることができるが、これらに限定されない。
The
(被写体検出における辞書切り替え)
本実施形態のDSLR100(システム制御部201)は、被写体検出部204が検出した被写体の領域を露出条件の決定や焦点検出に用いる。より具体的には、システム制御部201は、被写体検出部204が検出した被写体の中から主被写体を決定し、主被写体の領域を露出条件の決定や焦点検出に用いる。したがって、主被写体の決定の前後で、被写体検出に要求される特性は異なる。なお、主被写体は、システム制御部201が予め定められた条件(例えば被写体領域の位置や大きさ)に従って決定してもよいし、ユーザの選択に従って決定してもよい。
(Dictionary switching for subject detection)
The DSLR 100 (system control unit 201) of the present embodiment uses the subject area detected by the
主被写体の決定前に撮影される画像は、例えば画面中央が合焦するように焦点調節された画像であり、ユーザが主被写体としたい被写体には合焦していない場合がある。そのため、主被写体の決定前に実施する被写体検出では、ボケ量が大きくても検出対象の被写体が検出できることが要求される。換言すれば、誤検出の抑制よりも検出漏れの抑制を優先した被写体検出が要求される。 The image shot before the main subject is determined is an image that is focused so that the center of the screen is in focus, for example, and the user may not be focused on the subject that the user wants to be the main subject. Therefore, the subject detection performed before the main subject is determined requires that the subject to be detected can be detected even if the amount of blur is large. In other words, subject detection that gives priority to suppression of detection omission over suppression of erroneous detection is required.
一方、主被写体が決定されると、その後は主被写体の領域が合焦するように焦点検出が行われるため、その後得られる画像における主被写体のボケ量は小さくなる。そのため、主被写体の決定後は、検出対象の被写体であっても、ボケ量の大きい被写体を検出する価値が低下する。換言すれば、検出漏れの抑制よりも誤検出の抑制を優先した被写体検出が要求される。 On the other hand, when the main subject is determined, focus detection is performed so that the area of the main subject is in focus thereafter, so that the amount of blur of the main subject in the image obtained thereafter becomes small. For this reason, after the main subject is determined, even if the subject is a detection target, the value of detecting a subject with a large blur amount decreases. In other words, subject detection that gives priority to suppression of false detection over suppression of detection omission is required.
ボケ量の大きい被写体を検出しようとするほど、対象の被写体が写っていない領域を誤検出する確率が増加する傾向にある。これは、被写体のボケ量が大きくなるほど、被写体に類似した画像のバリエーションが増加するとともに、被写体の特徴が失われるからである。このように、主被写体の決定前は、ボケ量の小さい被写体から大きい被写体までを検出することが重要であって、主被写体の決定後は、誤検出を抑制し、ボケ量の小さい被写体を正確に検出することが重要である。 There is a tendency that the probability of erroneous detection of an area in which the subject subject is not captured increases as the subject with a larger amount of blur is detected. This is because, as the blur amount of the subject increases, image variations similar to the subject increase and the characteristics of the subject are lost. As described above, it is important to detect from a subject with a small amount of blur to a subject with a large amount of blur before the main subject is determined.After the main subject is determined, erroneous detection is suppressed and a subject with a small amount of blur is accurately detected. It is important to detect.
本実施形態の被写体検出部204は、予め機械学習を通じて生成された学習モデルに基づく処理パラメータを用いた被写体検出を画像に適用する。本実施形態では学習モデル記憶部205が、主被写体決定前の被写体検出用の検出学習モデル206と、主被写体決定後の被写体検出用の検出学習モデル207とを記憶している。主被写体決定前の被写体検出用の検出学習モデル206は、ボケ量の小さい被写体から大きい被写体の画像を用いた機械学習によって生成されている。また、主被写体決定後の被写体検出用の検出学習モデル207は、ボケ量の小さい被写体画像を重視した機械学習によって生成されている。
The
そして、システム制御部201は、主被写体の決定前後で、被写体検出部204が用いる学習モデルを切り替えることにより、被写体検出部204における被写体検出の特性を切り替える。システム制御部201は、主被写体の決定前には主被写体決定前の被写体検出用の検出学習モデル206を、主被写体の決定後には主被写体決定後の被写体検出用の検出学習モデル207を用いるように切り替える。
The
(撮像動作)
次に、図3および図4を参照して、本実施形態のDSLR100の撮影動作について説明する。
図3は撮影動作の概要に関するフローチャートであり、各ステップの処理はシステム制御部201のプログラマブルプロセッサがROM2011からRAM2012に読み込まれたプログラムを実行することによって実現される。ここでは、本体101の電源がONであり、撮影スタンバイ状態であるものとする。撮影スタンバイ状態でシステム制御部201は、例えば動画撮影を行い、得られた動画を表示部112に表示させることでEVFとして機能させるなど、予め定められた動作を実行している。
(Imaging operation)
Next, with reference to FIG. 3 and FIG. 4, the photographing operation of the
FIG. 3 is a flowchart relating to the outline of the photographing operation, and the processing of each step is realized by the execution of a program read from the
S301でシステム制御部201は、レリーズボタンが有するスイッチSW1およびSW2の状態を検出し、スイッチSW1とSW2のいずれかがオンであれば処理をS302に進める。一方、スイッチSW1とSW2のいずれもオフであれば、システム制御部201はS301を繰り返し実行する。
In step S301, the
S302でシステム制御部201は、測光センサー108の露光処理(電荷蓄積)を行う。測光センサー108の露光処理は所謂電子シャッターによって所定時間電荷蓄積を行うことによって実現される。システム制御部201は、測光センサー108の動作を制御して、所定時間電荷蓄積を行い、測光センサー108から画像信号(露出制御用信号)を読み出す。また、システム制御部201は、AFセンサー105についても露光処理(電荷蓄積)を行い、画像信号(焦点検出用信号)を読み出す。
In step S <b> 302, the
S303でシステム制御部201は、露出制御用信号を被写体検出部204に供給し、被写体検出結果を被写体検出部204から取得する。また、システム制御部201は、被写体検出結果に基づいて主被写体を決定する。主被写体は任意の方法で決定することができ、システム制御部201が自動的に決定してもよいし、検出された被写体の領域をユーザに示し、ユーザが選択した領域の被写体を主被写体と決定してもよい。システム制御部201が自動的に主被写体を決定する場合、例えば被写体の領域の位置や大きさに基づいて決定することができる。例えば、画像の中心に一番近い被写体や、領域が一番大きい被写体を主被写体に決定することができる。なお、被写体検出の信頼度や過去の検出結果など、他の条件を考慮したり、複数の条件を組み合わせて考慮したりして主被写体を決定することもできる。被写体検出処理の詳細については図4を用いて後述する。
In step S <b> 303, the
S304でシステム制御部201は、選択可能な焦点検出領域のうち、S303で決定した主被写体の位置に最も近い焦点検出領域を選択する。そして、S302で読み出した焦点検出用信号のうち、選択した焦点検出領域に関する焦点検出用信号から、選択した焦点検出領域の焦点状態(デフォーカス量および方向)を検出する。
In step S304, the
なお、S303で被写体が検出されなかった場合、システム制御部201は、選択可能な全ての焦点検出領域についての焦点状態(デフォーカス量および方向)を、焦点検出用信号に基づいて求める。そして、最も近い距離に被写体が存在する焦点検出領域を選択する。
If no subject is detected in S303, the
S305でシステム制御部201は、S304で選択した焦点検出領域の焦点状態に基づいてフォーカスレンズ113の位置を制御することにより、撮影レンズ102の合焦距離を調節する。
In step S305, the
S306でシステム制御部201は、S302で読み出した露出制御用信号を用いて撮影条件(絞り値(AV値)、シャッタスピード(TV値)、ISO感度(ISO値))を決定する。撮影条件の決定方法に特に制限は無いが、ここでは、露出制御用信号に基づいて得られる輝度(Bv値)に対応する撮影条件を、予め記憶されたプログラム線図を参照して決定するものとする。なお、被写体検出処理によって検出された被写体領域の輝度を用いて撮影条件を決定するようにしてもよい。
In step S306, the
S307でシステム制御部201は、スイッチSW2の状態を検出し、スイッチSW2がオンであれば処理をS308へ進め、スイッチSW2がオフであれば処理をS301に戻す。
In step S307, the
S308でシステム制御部201は、静止画の撮影処理を実行する。システム制御部201は、撮影レンズ102からの光束と交差しない位置にメインミラー103およびサブミラー104を移動させるとともに、S306で決定したシャッタースピードに従ってシャッター110を駆動する。これにより、撮影レンズ102が形成する光学像によって撮像素子111が露光される。撮像素子111は各画素が露光期間に蓄積した電荷を電圧に変換した画像信号を生成する。システム制御部201は撮像素子から画像信号を読み出し、A/D変換、ノイズ低減、ホワイトバランス調整、色補間など、予め定められた画像処理を適用することにより画像データを生成する。システム制御部201は、生成した画像データを画像データファイルとして画像記憶部202に保存したり、画像データに基づく表示用画像信号を生成して表示部112に表示したりする。その後、システム制御部201は処理をS301に戻す。
In step S308, the
(被写体検出の処理の流れ)
次に、図4に示すフローチャートを用いて、図3のS303の被写体検出処理の詳細について説明する。
S401でシステム制御部201は、主被写体が決定済みであるか否か判定し、決定済みと判定されなければS402へ、決定済みと判定されればS403へ、処理を進める。
(Subject detection process flow)
Next, details of the subject detection processing in S303 of FIG. 3 will be described using the flowchart shown in FIG.
In step S401, the
S402でシステム制御部201(選択手段)は、学習モデル記憶部205に複数記憶されている学習モデルのうち、主被写体決定前の被写体検出用の検出学習モデル206を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。主被写体決定前の被写体検出用の検出学習モデル206は、幅広いボケ量に対応して被写体を検出するための学習モデルであり、検出対象の被写体について小さいボケ量から大きいボケ量まで幅広いボケ量の画像を用いた機械学習によって得られた学習モデルである。検出学習モデル206を用いることにより、ボケ量が大きくても検出対象の被写体を検出可能な被写体検出が実現できる。
In step S <b> 402, the system control unit 201 (selection unit) selects a detection learning model 206 for subject detection before the main subject determination from among a plurality of learning models stored in the learning
S403でシステム制御部201(選択手段)は、学習モデル記憶部205に複数記憶されている学習モデルのうち、主被写体決定後の被写体検出用の検出学習モデル207を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。主被写体決定後の被写体検出用の検出学習モデル207は、ボケ量の小さい被写体を検出するための学習モデルであり、検出対象の被写体について、小さいボケ量の画像を重視して用いた機械学習によって得られた学習モデルである。検出学習モデル207を用いることにより、ボケ量が小さな検出対象の被写体を精度良く検出可能な被写体検出が実現できる。
In step S <b> 403, the system control unit 201 (selection unit) selects a detection learning model 207 for subject detection after main subject determination from among a plurality of learning models stored in the learning
また、S402およびS403でシステム制御部201は、S302で読み出した露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS404に進める。
In steps S <b> 402 and S <b> 403, the
S404で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS402またはS403において設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報には、被写体が検出されたか否か(検出数)や、検出した被写体領域に関する情報(例えば位置や大きさ)が含まれてよい。被写体検出部204は、被写体検出にCNNを用いる。CNNの詳細については後述する。
In step S404, the
S405でシステム制御部201は、被写体検出の結果、被写体が1つ以上検出されていれば、検出された被写体から主被写体を決定する。主被写体の決定方法については先に述べたとおりである。
In step S405, if one or more subjects are detected as a result of subject detection, the
ここでは、主被写体の決定後は、ボケ量の小さい被写体の画像を重視した機械学習で得られた検出学習モデル207を用いて被写体検出を行うものとして説明した。しかし、主被写体の決定後であっても、主被写体が所定期間継続して検出されない場合には、幅広いボケ量に対応して被写体を検出するための学習モデルである検出学習モデル206を用いるように構成してもよい。主被写体が所定期間継続して検出されない(見失った)場合、主被写体のボケ量が大きくなっている可能性があるためである。 Here, it has been described that, after the main subject is determined, subject detection is performed using the detection learning model 207 obtained by machine learning that places importance on an image of a subject with a small amount of blur. However, if the main subject is not detected for a predetermined period even after the main subject is determined, the detection learning model 206, which is a learning model for detecting the subject corresponding to a wide range of blurring, is used. You may comprise. This is because when the main subject is not detected (lost) for a predetermined period of time, the amount of blur of the main subject may be large.
また、主被写体の決定後であっても、主被写体に合焦していないと判断される期間についても、検出学習モデル206を用いる構成としてもよい。主被写体に合焦する前は、主被写体のボケ量が大きい状態である可能性があるためである。あるいは、主被写体のボケ量が閾値以上である場合には検出学習モデル206を用いる構成としてもよい。あるいは、スイッチSW1がオンになる前においても、検出学習モデル206を用いて被写体検出を行う構成としてもよい。 Further, even after the main subject is determined, the detection learning model 206 may be used for a period in which it is determined that the main subject is not in focus. This is because there is a possibility that the amount of blur of the main subject is large before focusing on the main subject. Alternatively, the detection learning model 206 may be used when the amount of blur of the main subject is greater than or equal to the threshold value. Alternatively, the subject detection may be performed using the detection learning model 206 even before the switch SW1 is turned on.
なお、検出学習モデル206を用いた場合、誤検出よりも検出漏れを抑制することを優先した被写体検出が行われる。そのため、被写体検出に検出学習モデル206を用いている場合は、被写体検出に検出学習モデル207を用いている場合よりも、S405において、主被写体を決定する際に必要な検出信頼度の閾値を厳しく設定することができる。つまり、主被写体の領域に必要な被写体検出の確からしさ(検出信頼度)を、検出学習モデル206を用いて検出された被写体領域については、検出学習モデル207を用いて検出された被写体領域よりも高く設定することができる。これにより、誤検出された被写体を主被写体として決定し、適切でない領域に焦点調節や露出制御を最適化してしまうことを抑制できる。 When the detection learning model 206 is used, subject detection is performed with priority given to suppressing detection omission over erroneous detection. Therefore, in the case where the detection learning model 206 is used for subject detection, the detection reliability threshold necessary for determining the main subject is made stricter in S405 than in the case where the detection learning model 207 is used for subject detection. Can be set. In other words, the subject detection accuracy (detection reliability) required for the main subject region is greater than the subject region detected using the detection learning model 207 for the subject region detected using the detection learning model 207. Can be set high. Accordingly, it is possible to prevent the erroneously detected subject from being determined as the main subject and optimizing the focus adjustment and the exposure control in an inappropriate area.
(被写体検出部の詳細)
次に、被写体検出部204について説明する。本実施形態では、被写体検出部204をCNN(コンボリューショナル・ニューラル・ネットワーク)の1種であるネオコグニトロンで構成する。被写体検出部204の基本的な構成について、図5および図6を用いて説明する。図5に入力された2次元画像データから被写体を検出するCNNの基本的な構成を示す。処理の流れは、左端を入力とし、右方向に処理が進んでいく。CNNは、特徴検出層(S層)と特徴統合層(C層)と呼ばれる2つの層をひとつのセットとし、それが階層的に構成されている。なお、S層は従来技術で説明した畳み込み層に、C層は同プーリング層またはサブサンプリング層に対応する。
(Details of subject detection unit)
Next, the
CNNでは、まずS層において1つ前の階層で検出された特徴をもとに次の特徴を検出する。またS層において検出した特徴をC層で統合し、その階層における検出結果として次の階層に伝える構成を有する。
S層は特徴検出細胞面からなり、特徴検出細胞面ごとに異なる特徴を検出する。また、C層は特徴統合細胞面からなり、1つ前の階層の特徴検出細胞面での検出結果をプーリングもしくはサブサンプリングする。以下では、特に区別する必要がない場合、特徴検出細胞面および特徴統合細胞面を総称して特徴面と呼ぶ。本実施形態では、最終階層である出力層(n階層目)ではC層は用いずS層のみで構成している。
In the CNN, first, the next feature is detected based on the feature detected in the previous layer in the S layer. Further, it has a configuration in which the features detected in the S layer are integrated in the C layer and transmitted to the next layer as a detection result in that layer.
The S layer is composed of a feature detection cell surface, and detects different features for each feature detection cell surface. Further, the C layer is composed of a feature integrated cell surface, and the detection result on the feature detection cell surface of the previous layer is pooled or subsampled. Hereinafter, the feature detection cell surface and the feature integrated cell surface are collectively referred to as a feature surface unless it is particularly necessary to distinguish between them. In the present embodiment, the output layer (the nth layer), which is the last layer, is configured by only the S layer without using the C layer.
特徴検出細胞面での特徴検出処理、および特徴統合細胞面での特徴統合処理の詳細について、図6を用いて説明する。1つの特徴検出細胞面は複数の特徴検出ニューロンにより構成され、個々の特徴検出ニューロンは1つ前の階層のC層に所定の構造で結合している。また1つの特徴統合細胞面は、複数の特徴統合ニューロンにより構成され、個々の特徴統合ニューロンは同じ階層のS層に所定の構造で結合している。 Details of the feature detection process on the feature detection cell plane and the feature integration process on the feature integration cell plane will be described with reference to FIG. One feature detection cell surface is composed of a plurality of feature detection neurons, and each feature detection neuron is connected to the C layer of the previous layer with a predetermined structure. One feature-integrated cell surface is composed of a plurality of feature-integrated neurons, and each feature-integrated neuron is connected to the S layer of the same hierarchy with a predetermined structure.
図6に示した、L階層目のS層のM番目の細胞面内において、位置(ξ, ζ)の特徴検出ニューロンの出力値を
[数式1]
数式2のように活性化関数を用いない場合、ニューロンの内部状態
ここで、数式1及び数式2におけるξ,ζ,u,v,nについて説明する。位置(ξ, ζ)は入力画像における位置座標に対応しており、例えば出力値
また数式1において、L=1つまり最初の階層のS層では、数式1中の
数式1中の
次に、数式2中の
[数式3]
[Formula 3]
(被写体検出の学習方法)
結合係数
Coupling factor
検出すべきパターンと、検出すべきでないパターンとを、学習用のテストパターンとして多数用意する。各テストパターンは、画像データと、対応する教師信号とを有する。検出すべきパターンに該当する画像データについては、最終階層の特徴検出細胞面において、検出対象のパターンが存在する領域に対応するニューロンの出力が1となるような教師信号とする。一方、検出すべきでないパターンに該当する画像データについては、検出すべきでないパターンが存在する領域に対応するニューロンの出力が−1となるような教師信号を与える。 A large number of patterns to be detected and patterns that should not be detected are prepared as test patterns for learning. Each test pattern has image data and a corresponding teacher signal. The image data corresponding to the pattern to be detected is a teacher signal such that the output of the neuron corresponding to the area where the pattern to be detected exists is 1 on the feature detection cell surface in the final hierarchy. On the other hand, for image data corresponding to a pattern that should not be detected, a teacher signal is given so that the output of the neuron corresponding to the region where the pattern that should not be detected exists is -1.
本実施形態では、被写体検出を実施する時期により、望ましい被写体検出の特性が異なることに着目し、被写体検出に用いるパラメータ(機械学習によって生成した学習モデル)を、被写体検出を実施する時期に応じて切り替える構成とした。そのため、1つの学習モデルを用いる構成と比較して、より適切な被写体検出結果を得ることができる。具体的には、検出対象の被写体(例えば人物の顔)について、さまざまなボケ量(小さいボケ量から大きいボケ量まで)の画像データを用いたテストパターンによる機械学習により、主被写体決定前の被写体検出用の検出学習モデル206を用意する。また、検出対象の被写体について、小さいボケ量の画像データを重点的に用いたテストパターンによる機械学習により、主被写体決定後の被写体検出用の検出学習モデル207を用意する。 In this embodiment, focusing on the fact that the characteristics of desirable subject detection differ depending on the timing of subject detection, the parameters used for subject detection (learning models generated by machine learning) are set according to the timing of subject detection. It was set as the structure switched. Therefore, a more appropriate subject detection result can be obtained as compared with a configuration using one learning model. Specifically, for a subject to be detected (for example, a human face), a subject before the main subject is determined by machine learning using a test pattern using image data of various blur amounts (from a small blur amount to a large blur amount). A detection learning model 206 for detection is prepared. In addition, a detection learning model 207 for subject detection after main subject determination is prepared for a subject to be detected by machine learning using a test pattern that preferentially uses image data with a small amount of blur.
そして、主被写体の決定前には検出学習モデル206を、決定後には検出学習モデル207を用いることにより、主被写体の決定前に適した被写体検出と、主被写体の決定後に適した被写体検出とを実現できる。そのため、検出された被写体のうち、特定の被写体の領域を用いる処理を適切に実行することができる。 Then, the detection learning model 206 is used before the main subject is determined, and the detection learning model 207 is used after the determination, so that a suitable subject detection before the main subject is determined and a suitable subject detection after the main subject is determined. realizable. Therefore, it is possible to appropriately execute processing using a specific subject area among the detected subjects.
《第2実施形態》
次に、本発明の第2実施形態について説明する。図7は、本実施形態に係るDSLR100の機能構成例を示すブロック図であり、第1実施形態と同様の構成については図2と同じ参照数字を付してある。ただし、測光センサー108は、像信号を生成する際に、像信号の輝度値が所定の範囲に含まれるように像信号にゲインを適用する点で第1実施形態と異なる。測光センサー108が像信号に適用したゲインの大きさは、測光センサー108からシステム制御部201に通知される。また、学習モデル記憶部205は、記憶している検出学習モデルの種類が第1実施形態と異なる。
<< Second Embodiment >>
Next, a second embodiment of the present invention will be described. FIG. 7 is a block diagram illustrating a functional configuration example of the
位置姿勢変化取得部701は、例えばジャイロ、加速度センサ、電子コンパス等の位置姿勢センサを有し、DSLR100の位置姿勢変化を表す信号を出力する。システム制御部201は、位置姿勢変化取得部701が出力した信号をRAM2012に格納する。
The position / orientation
動きベクトル検出部702は、2フレーム分の画像データを用いて動きベクトルを検出する。検出した動きベクトルの情報はシステム制御部201に出力する。システム制御部201は、動きベクトルの情報をRAM2012に格納する。ベクトル検出処理の詳細については後述する。その他の各部については第1実施形態と同様のため、説明を省略する。
The motion
(動きベクトル算出処理の詳細)
動きベクトル検出部702における、動きベクトル算出処理の詳細について説明する。図8は、動きベクトル検出部702に供給される2フレーム分の画像を模式的に示した図である。ここで、2フレーム分の画像は、同じ視点から異なるタイミングで撮影された画像であり、現フレームをフレームt、1つ前のフレームをフレームt-1とするフレームt-1内の複数の位置に対して、フレームtとのマッチング処理を行う。そして、フレームt-1上の点
Details of the motion vector calculation processing in the motion
(被写体検出における辞書切り替え)
フレーム間の動きベクトルに基づいて現フレーム内の被写体領域を検出しようとした場合、動きベクトルが大きいほど誤検出の確率が増加する。これは、動きベクトルが大きい被写体は画像のブレが大きく、ボケ量の大きい場合と同様、被写体に類似した画像のバリエーションが増加するとともに、被写体の特徴が失われるからである。
(Dictionary switching for subject detection)
When attempting to detect a subject area in the current frame based on a motion vector between frames, the probability of false detection increases as the motion vector increases. This is because a subject with a large motion vector has a large image blur, and as in the case where the amount of blur is large, variations in the image similar to the subject increase and characteristics of the subject are lost.
被写体検出部204は、予め機械学習を通じて生成された学習モデルに基づく処理パラメータを用いた被写体検出処理を画像に適用する。具体的には、被写体検出部204は、学習モデル記憶部205に記憶された学習モデルのうち、主被写体動きベクトル小用の検出学習モデル703と主被写体動きベクトル大用の検出学習モデル704とを参照する。主被写体動きベクトル小用の検出学習モデル703は、被写体ブレ量の小さい被写体画像を重視した機械学習によって生成されている。また、主被写体動きベクトル大用の検出学習モデル704は、被写体ブレ量の大きい被写体画像を重視した機械学習によって生成されている。
The
そして、システム制御部201は、主被写体の動きベクトルの大きさに応じて、主被写体動きベクトル小用の検出学習モデル703と主被写体動きベクトル大用の検出学習モデル704のどちらを被写体検出部204で用いるかを切り替える。主被写体の動きベクトルの大きさに応じて被写体検出処理に用いる学習モデルを切り替えることにより、システム制御部201は主被写体検出部204における被写体検出処理の特性を切り替える。より具体的には、システム制御部201は、主被写体の動きベクトルが大きい判定されなければ検出学習モデル703を、主被写体の動きベクトルが大きいと判定されれば検出学習モデル704を用いるように切り替える。動きベクトルの大きさを判定するための閾値は、例えば予め実験的に定めることができる。
Then, the
(被写体検出の処理の流れ)
次に、図9に示すフローチャートを用いて、本実施形態のDSLR100が撮影動作で行う被写体検出処理の詳細について説明する。本実施形態のDSLR100の撮影動作は第1実施形態と同様であるため、以下で説明する被写体検出処理は、図3のS303で実施される。なお、ここでは既に主被写体が決定されており、動きベクトル検出部702は例えば撮影スタンバイ状態で撮影される動画のフレーム画像を用いて、前フレームにおける主被写体領域内の点を始点とする動きベクトルを1つ以上検出しているものとする。
(Subject detection process flow)
Next, details of subject detection processing performed by the
S901でシステム制御部201は、RAM2012を参照して主被写体の動きベクトルの大きさを算出する。そして、システム制御部201は、算出した大きさを予め定めた閾値と比較し、閾値より大きければ動きベクトルが大きいと判定する。システム制御部201は、主被写体の動きベクトルが大きいと判定されればS903へ、判定されなければS902へ、それぞれ処理を進める。
In step S <b> 901, the
S902でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、動きベクトル小用の検出学習モデル703を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。検出学習モデル703を用いることにより、被写体ブレが小さな検出対象の被写体を精度よく検出可能な被写体検出が実現できる。
In step S <b> 902, the
S903でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、動きベクトル大用の検出学習モデル704を選択し、被写体検出処理用パラメータとして被写体検出部204に設定する。検出学習モデル704を用いることにより、被写体ブレが大きくても検出対象の被写体を検出可能な被写体検出が実現できる。
In step S <b> 903, the
また、S902およびS903でシステム制御部201は、S302で読みだした露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS904に進める。
In steps S902 and S903, the
S904で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS902またはS903で設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報や、CNNを用いた被写体検出の具体的な処理は第1実施形態と同様であってよい。
In step S904, the
S905でシステム制御部201は、被写体検出の結果、被写体が1つ以上検出されていれば、検出された被写体から主被写体を決定する。主被写体の決定方法についても第1実施形態と同様であってよい。
In step S905, if one or more subjects are detected as a result of subject detection, the
S906で動きベクトル検出部702は、前述の方法によりS905で決定した主被写体の動きベクトルを算出する。
In S906, the motion
本実施形態では、主被写体の動きベクトルの大きさ応じて望ましい被写体検出の特性が異なることに着目し、被写体検出に用いるパラメータ(機械学習によって生成した学習モデル)を、主被写体の動きベクトルの大きさに応じて切り替える構成とした。そのため、1つの学習モデルを用いる構成と比較して、より適切な被写体検出結果を得ることができる。具体的には、検出対象の被写体(例えば人物の顔)について、小さい被写体ブレ量の画像データを重点的に用いたテストパターンによる機械学習により、動きベクトル小用の検出学習モデル703を用意する。また、検出対象の被写体について、大きい被写体ブレ量の画像データを重点的に用いたテストパターンによる機械学習により、動きベクトル大用の検出学習モデル704を用意する。
In the present embodiment, focusing on the fact that the desired subject detection characteristics differ depending on the magnitude of the motion vector of the main subject, the parameters used for subject detection (the learning model generated by machine learning) are set to the magnitude of the motion vector of the main subject. It was set as the structure switched according to it. Therefore, a more appropriate subject detection result can be obtained as compared with a configuration using one learning model. Specifically, a
そして、主被写体の動きベクトルが大きいと判定される場合には検出学習モデル704を、大きいと判定されない場合には検出学習モデル703を用いて被写体検出処理を実行するよう、検出学習モデルを切り替える。これにより、主被写体の動きベクトルの大きさ(すなわち、被写体像のブレ量の大きさ)に適した被写体検出を実現できる。そのため、検出された被写体のうち、特定の被写体の領域を用いる処理を適切に実行することができる。
Then, when it is determined that the motion vector of the main subject is large, the
《第3実施形態》
次に、本発明の第3実施形態について説明する。本実施形態は、被写体検出に用いる学習モデルの切り替え方法以外は第2実施形態と同様に実施することができる。そのため、以下では学習モデルの切り替え方法に関して重点的に説明する。
<< Third Embodiment >>
Next, a third embodiment of the present invention will be described. This embodiment can be carried out in the same manner as the second embodiment except for a learning model switching method used for subject detection. For this reason, the learning model switching method will be mainly described below.
(被写体検出における辞書切り替え)
本実施形態では、被写体検出処理に用いる学習モデルを、撮像装置(DSLR100)の位置姿勢変化の大きさに応じて切り替える。撮像装置の位置姿勢変化が大きい場合には、手ぶれが大きくなるため、被写体領域の誤検出が起こりやすくなる。これは、撮像装置の位置姿勢変化が大きい場合はボケ量の大きい場合と同様に、被写体に類似した画像のバリエーションが増加するとともに、被写体の特徴が失われるからである。
(Dictionary switching for subject detection)
In the present embodiment, the learning model used for the subject detection process is switched according to the magnitude of the position / orientation change of the imaging device (DSLR 100). When the position and orientation change of the image pickup apparatus is large, camera shake becomes large, and erroneous detection of the subject area is likely to occur. This is because, when the change in the position and orientation of the imaging apparatus is large, variations in images similar to the subject increase and the characteristics of the subject are lost, as in the case where the amount of blur is large.
本実施形態の被写体検出部204は、予め機械学習を通じて生成された学習モデルに基づく処理パラメータを用いた被写体検出を画像に適用する。本実施形態では学習モデル記憶部205から、位置姿勢変化小用の検出学習モデル705と、位置姿勢変化大用の検出学習モデル706を参照する。位置姿勢変化小用の検出学習モデル705は、手ブレ量が小さい場合の被写体画像を重視した機械学習によって生成されている。また、位置姿勢変化大用の検出学習モデル706は、手ブレ量が大きい場合の被写体画像を重視した機械学習によって生成されている。
The
そして、システム制御部201は、位置姿勢変化の大きさに応じて、被写体検出部204が用いる学習モデルを切り替えることにより、被写体検出部204における被写体検出の特性を切り替える。より具体的には、位置姿勢変化が大きいと判定されない場合には、位置姿勢変化小用の検出学習モデル705を、位置姿勢変化が大きいと判定される場合には、位置姿勢変化大用の検出学習モデル706を用いるように切り替える。位置姿勢変化の大きさを判定するための閾値は、例えば予め実験的に定めることができる。
The
(被写体検出の処理の流れ)
次に、図10に示すフローチャートを用いて、本実施形態のDSLR100が撮影動作で行う被写体検出処理の詳細について説明する。本実施形態のDSLR100の撮影動作は第1実施形態と同様であるため、以下で説明する被写体検出処理は、図3のS303で実施される。
(Subject detection process flow)
Next, the details of subject detection processing performed by the
S1001でシステム制御部201は、RAM2012を参照して、位置姿勢変化取得部701から得られた位置姿勢変化を予め定めた閾値と比較し、閾値より大きければ位置姿勢変化が大きいと判定する。システム制御部201は、DSLR100の位置姿勢変化が大きいと判定されればS1003へ、判定されなければS1002へ、それぞれ処理を進める。
In step S <b> 1001, the
S1002でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、位置姿勢変化小用の検出学習モデル705を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。検出学習モデル705を用いることにより、手ブレが小さな検出対象の被写体を精度よく検出可能な被写体検出が実現できる。
S1003でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、位置姿勢変化大用の検出学習モデル706を選択し、被写体検出処理用パラメータとして被写体検出部204に設定する。検出学習モデル706を用いることにより、手ブレが大きくても検出対象の被写体を検出可能な被写体検出が実現できる。
In step S <b> 1002, the
In step S <b> 1003, the
また、S1002およびS1003でシステム制御部201は、S302で読みだした露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS1004に進める。
In steps S1002 and S1003, the
S1004で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS1002またはS1003で設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報や、CNNを用いた被写体検出の具体的な処理は第1実施形態と同様であってよい。
In step S1004, the
本実施形態では、撮像装置の位置姿勢変化の大きさに応じて望ましい被写体検出の特性が異なることに着目し、被写体検出に用いるパラメータ(機械学習によって生成した学習モデル)を、位置姿勢変化の大きさに応じて切り替える構成とした。そのため、1つの学習モデルを用いる構成と比較して、より適切な被写体検出結果を得ることができる。具体的には、検出対象の被写体(例えば人物の顔)について、手ブレ量が小さい場合の画像データを重点的に用いたテストパターンによる機械学習により、位置姿勢変化小用の検出学習モデル705を用意する。また、検出対象の被写体について、手ブレ量が大きい場合の画像データを重点的に用いたテストパターンによる機械学習により、位置姿勢変化大用の検出学習モデル706を用意する。
In the present embodiment, focusing on the fact that desirable object detection characteristics differ according to the magnitude of the position and orientation change of the imaging apparatus, the parameters (learning model generated by machine learning) used for subject detection are set to the magnitude of the position and orientation change. It was set as the structure switched according to it. Therefore, a more appropriate subject detection result can be obtained as compared with a configuration using one learning model. Specifically, for a subject to be detected (for example, a human face), a
そして、位置姿勢変化が大きいと判定される場合には検出学習モデル706を、大きいと判定されない場合には検出学習モデル705を用いて被写体検出処理を実行するよう、検出学習モデルを切り替える。これにより、位置姿勢変化の大きさ(すなわち、被写体像のブレ量の大きさ)に適した被写体検出を実現できる。そのため、検出された被写体のうち、特定の被写体の領域を用いる処理を適切に実行することができる。
Then, the
《第4実施形態》
次に、本発明の第4実施形態について説明する。本実施形態は、被写体検出に用いる学習モデルの切り替え方法以外は第2実施形態と同様に実施することができる。そのため、以下では学習モデルの切り替え方法に関して重点的に説明する。
<< 4th Embodiment >>
Next, a fourth embodiment of the present invention will be described. This embodiment can be carried out in the same manner as the second embodiment except for a learning model switching method used for subject detection. For this reason, the learning model switching method will be mainly described below.
(被写体検出における辞書切り替え)
本実施形態では、被写体検出処理に用いる学習モデルを、被写体検出に用いる画像データのノイズ量の大きさに応じて切り替える。より具体的には、被写体検出処理に用いる学習モデルを、被写体検出部204に供給される画像データ(測光センサー108が生成する像信号)に適用されるゲイン(信号増幅率)の大きさに応じて切り替える。
(Dictionary switching for subject detection)
In this embodiment, the learning model used for the subject detection process is switched according to the amount of noise in the image data used for subject detection. More specifically, the learning model used for the subject detection process is set according to the magnitude of the gain (signal amplification factor) applied to the image data (image signal generated by the photometric sensor 108) supplied to the
大きなゲインが適用された画像データに対して被写体検出処理を適用した場合、被写体領域の誤検出が起こりやすくなる。これは、画像データにゲインを適用することで、ノイズも増幅され、画像のS/N比が低下し、被写体に類似した画像のバリエーションが増加するとともに、被写体の特徴が失われるからである。 When subject detection processing is applied to image data to which a large gain is applied, erroneous detection of the subject region is likely to occur. This is because by applying gain to the image data, noise is also amplified, the S / N ratio of the image is lowered, the variation of the image similar to the subject is increased, and the characteristics of the subject are lost.
本実施形態の被写体検出部204は、予め機械学習を通じて生成された学習モデルに基づく処理パラメータを用いた被写体検出を画像に適用する。本実施形態では学習モデル記憶部205から、ゲイン小用の検出学習モデル707と、ゲイン大用の検出学習モデル708を参照する。ゲイン小用の検出学習モデル707は、ノイズが小さい場合の被写体画像を重視した機械学習によって生成されている。また、ゲイン大用の検出学習モデル708は、ノイズが大きい場合の被写体画像を重視した機械学習によって生成されている。
The
そして、システム制御部201は、被写体検出部204に供給される画像データに適用されたゲインの大きさに応じて、被写体検出部204が用いる学習モデルを切り替えることにより、主被写体検出部204における被写体検出の特性を切り替える。より具体的には、画像データに施されたゲインが大きいと判定される場合には、ゲイン大用の検出学習モデル708を、画像に施されたゲインが大きいと判定されない場合には、ゲイン小用の検出学習モデル707を用いるように切り替える。ゲインの大きさを判定するための閾値は、例えば予め実験的に定めることができる。なお、被写体検出を撮像素子111で得られた画像データに対して実施する場合、システム制御部201は例えば撮影感度に対応するゲインの大きさを判定することができる。
The
(被写体検出の処理の流れ)
次に、図11に示すフローチャートを用いて、本実施形態のDSLR100が撮影動作で行う被写体検出処理の詳細について説明する。本実施形態のDSLR100の撮影動作は第1実施形態と同様であるため、以下で説明する被写体検出処理は、図3のS303で実施される。
(Subject detection process flow)
Next, details of subject detection processing performed by the
S1101でシステム制御部201は、測光センサー108が像信号に適用したゲインの大きさを予め定めた閾値と比較し、閾値より大きければゲインが大きいと判定する。システム制御部201は、ゲインが大きいと判定されればS1103へ、判定されなければS1102へ、それぞれ処理を進める。
In step S1101, the
S1102でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、ゲイン小用の検出学習モデル707を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。検出学習モデル707を用いることにより、ノイズが小さい場合に検出対象の被写体を精度よく検出可能な被写体検出が実現できる。
In step S1102, the
S1103でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、ゲイン大用の検出学習モデル708を選択し、被写体検出処理用パラメータとして被写体検出部204に設定する。検出学習モデル708を用いることにより、ノイズが大きい場合でも検出対象の被写体を検出可能な被写体検出が実現できる。
In step S <b> 1103, the
また、S1102およびS1103でシステム制御部201は、S302で読みだした露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS1104に進める。
In steps S1102 and S1103, the
S1104で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS1102またはS1103で設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報や、CNNを用いた被写体検出の具体的な処理は第1実施形態と同様であってよい。
In step S1104, the
本実施形態では、画像データのノイズの量に応じて望ましい被写体検出の特性が異なることに着目し、被写体検出に用いるパラメータ(機械学習によって生成した学習モデル)を、画像データに適用されたゲインの大きさに応じて切り替える構成とした。そのため、1つの学習モデルを用いる構成と比較して、より適切な被写体検出結果を得ることができる。具体的には、検出対象の被写体(例えば人物の顔)について、ノイズが少ない画像データを重点的に用いたテストパターンによる機械学習により、ゲイン小用の検出学習モデル707を用意する。また、検出対象の被写体について、ノイズが多い画像データを重点的に用いたテストパターンによる機械学習により、ゲイン大用の検出学習モデル708を用意する。
In this embodiment, focusing on the fact that desirable object detection characteristics differ depending on the amount of noise in the image data, the parameters used for object detection (the learning model generated by machine learning) are set to the gain applied to the image data. It was set as the structure switched according to a magnitude | size. Therefore, a more appropriate subject detection result can be obtained as compared with a configuration using one learning model. Specifically, for a subject to be detected (for example, a human face), a small gain
そして、被写体検出を行う画像データに適用されたゲインが大きいと判定される場合には検出学習モデル708を、大きいと判定されない場合には検出学習モデル707を用いて被写体検出処理を実行するよう、検出学習モデルを切り替える。これにより、ノイズが少ない場合に適した被写体検出と、ノイズが多い場合に適した被写体検出とを実現できる。そのため、検出された被写体のうち、特定の被写体の領域を用いる処理を適切に実行することができる。
Then, when it is determined that the gain applied to the image data for subject detection is large, the
(その他の実施形態)
上述の実施形態では、主被写体の領域に露出や焦点調節を最適化する撮像装置に本発明を適用した例について説明した。しかし、主被写体領域の利用目的は撮影に限定されない。例えば、主被写体領域(もしくは主被写体領域以外の領域)に画像処理を適用する場合など、他の任意の目的に用いることができる。したがって、本発明において撮影に関する構成は必須ではない。また、上述の実施形態では、2種類の学習モデルを切り替えて用いる構成について説明したが、3種類以上の学習モデルを切り替えて用いてもよい。
(Other embodiments)
In the above-described embodiment, an example in which the present invention is applied to an imaging apparatus that optimizes exposure and focus adjustment in the region of the main subject has been described. However, the purpose of use of the main subject area is not limited to shooting. For example, it can be used for any other purpose such as when image processing is applied to the main subject area (or an area other than the main subject area). Therefore, in the present invention, a configuration relating to photographing is not essential. Moreover, although the above-mentioned embodiment demonstrated the structure which switches and uses two types of learning models, you may switch and use three or more types of learning models.
以上、被写体検出処理の対象となる被写体のボケ量や鮮明度が異なり得る状況の例として、合焦度合い、被写体の動きの大きさ、撮像装置の位置姿勢変化の大きさ、画像データのノイズの多さに着目した実施形態を説明した。しかし、他の条件に応じて検出学習モデルを切り替えるように構成してもよい。 As described above, examples of situations in which the amount of blur and sharpness of the subject to be subject to the subject detection process may vary include the degree of focus, the magnitude of the subject's movement, the magnitude of the position / orientation change of the imaging device, The embodiment focusing on the number has been described. However, the detection learning model may be switched according to other conditions.
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又はコンピュータ読み取り可能な記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータの1以上のプロセッサがプログラムを実行することでも実現できる。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a computer-readable storage medium, and one or more processors of the computer of the system or apparatus execute the program. It can also be realized by executing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
上述の実施形態は本発明の理解を助けることを目的とした具体例に過ぎず、いかなる意味においても本発明を上述の実施形態に限定する意図はない。特許請求の範囲に規定される範囲に含まれる全ての実施形態は本発明に包含される。 The above-described embodiments are merely specific examples for the purpose of assisting understanding of the present invention, and are not intended to limit the present invention to the above-described embodiments in any way. All embodiments that fall within the scope of the claims are encompassed by the present invention.
100…デジタル一眼レフカメラ、101…本体、102…レンズ、108…測光センサー、111…撮像素子、204…被写体検出部、206…主被写体決定前の被写体検出処理用の検出学習モデル、207…主被写体決定後の被写体検出処理用の検出学習モデル
DESCRIPTION OF
Claims (22)
前記被写体検出処理に用いるパラメータを複数記憶する記憶手段と、
前記記憶手段が記憶するパラメータから、前記被写体検出手段で用いるパラメータを選択する選択手段と、
を有し、
前記選択手段は、被写体のボケ量または鮮明度に応じて、異なるパラメータを選択することを特徴とする画像処理装置。 Subject detection means for applying subject detection processing to image data using parameters generated based on machine learning;
Storage means for storing a plurality of parameters used for the subject detection processing;
A selection means for selecting a parameter to be used in the subject detection means from the parameters stored in the storage means;
Have
The image processing apparatus according to claim 1, wherein the selection unit selects different parameters according to a blur amount or a sharpness of a subject.
前記第1のパラメータは、被写体の検出漏れの抑制よりも被写体の誤検出の抑制を優先した被写体検出処理を行うためのパラメータであり、
前記第2のパラメータは、被写体の誤検出の抑制よりも被写体の検出漏れの抑制を優先した被写体検出処理を行うためのパラメータであることを特徴とする請求項2に記載の画像処理装置。 The selection means selects a first parameter when the main subject is determined, and selects a second parameter when the main subject is not determined,
The first parameter is a parameter for performing subject detection processing that prioritizes suppression of subject false detection over suppression of subject detection omission,
The image processing apparatus according to claim 2, wherein the second parameter is a parameter for performing subject detection processing that prioritizes suppression of subject detection omission over suppression of subject erroneous detection.
請求項1から16のいずれか1項に記載の画像処理装置と、を有する撮像装置であって、
前記画像処理装置の被写体検出手段は、前記撮像素子によって得られる画像に対して被写体検出処理を適用する、
ことを特徴とする撮像装置。 An image sensor;
An image processing apparatus comprising: the image processing apparatus according to claim 1,
Subject detection means of the image processing device applies subject detection processing to an image obtained by the image sensor;
An imaging apparatus characterized by that.
前記主被写体の領域が適正露出となるように露出条件を決定する決定手段と、
の少なくとも1つをさらに有することを特徴とする請求項17に記載の撮像装置。 Focus adjusting means for adjusting the focus so that the determined area of the main subject is in focus;
Determining means for determining an exposure condition such that the area of the main subject has an appropriate exposure;
The image pickup apparatus according to claim 17, further comprising at least one of the following.
機械学習に基づいて生成されたパラメータを用いて、画像に対して被写体検出処理を適用する被写体検出工程と、
前記被写体検出処理に用いるパラメータを複数記憶する記憶手段から、前記被写体検出工程で用いるパラメータを選択する選択工程と、
を有し、
前記選択工程では、被写体のボケ量または鮮明度に応じて、異なるパラメータを選択することを特徴とする画像処理方法。 An image processing method executed by an image processing apparatus,
A subject detection step of applying subject detection processing to an image using parameters generated based on machine learning;
A selection step of selecting parameters used in the subject detection step from a storage unit that stores a plurality of parameters used in the subject detection processing;
Have
In the selection step, an image processing method is characterized in that different parameters are selected according to the amount of blur or definition of a subject.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018075617 | 2018-04-10 | ||
JP2018075617 | 2018-04-10 |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019186911A true JP2019186911A (en) | 2019-10-24 |
JP6931369B2 JP6931369B2 (en) | 2021-09-01 |
Family
ID=68337755
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019023778A Active JP6931369B2 (en) | 2018-04-10 | 2019-02-13 | Image processing device and image processing method, and imaging device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6931369B2 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112433339A (en) * | 2020-12-10 | 2021-03-02 | 济南国科医工科技发展有限公司 | Microscope fine focusing method based on random forest |
WO2021070594A1 (en) | 2019-10-10 | 2021-04-15 | ソニーセミコンダクタソリューションズ株式会社 | Electromagnetic wave detection device, electromagnetic detection system, and electromagnetic detection method |
WO2022004413A1 (en) * | 2020-07-01 | 2022-01-06 | ソニーセミコンダクタソリューションズ株式会社 | Information processing device, information processing method, and program |
US20220215643A1 (en) * | 2021-01-07 | 2022-07-07 | Canon Kabushiki Kaisha | Image processing device, imaging device, image processing method, and recording medium |
WO2023127124A1 (en) * | 2021-12-28 | 2023-07-06 | 日本電気株式会社 | Imaging system, imaging device, imaging method, and recording medium |
JP2023098545A (en) * | 2021-12-28 | 2023-07-10 | 日本電気株式会社 | Imaging system, imaging method, and computer program |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005160122A (en) * | 2005-03-04 | 2005-06-16 | Canon Inc | Image pickup apparatus and computer-readable storage medium |
JP2008204384A (en) * | 2007-02-22 | 2008-09-04 | Canon Inc | Image pickup device, object detection method and posture parameter calculation method |
JP2012068965A (en) * | 2010-09-24 | 2012-04-05 | Denso Corp | Image recognition device |
JP2014041427A (en) * | 2012-08-21 | 2014-03-06 | Toyota Central R&D Labs Inc | Object detection device and program |
JP2015035704A (en) * | 2013-08-08 | 2015-02-19 | 株式会社東芝 | Detector, detection method and detection program |
JP2015165377A (en) * | 2014-02-07 | 2015-09-17 | 株式会社フジクラ | input device |
-
2019
- 2019-02-13 JP JP2019023778A patent/JP6931369B2/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005160122A (en) * | 2005-03-04 | 2005-06-16 | Canon Inc | Image pickup apparatus and computer-readable storage medium |
JP2008204384A (en) * | 2007-02-22 | 2008-09-04 | Canon Inc | Image pickup device, object detection method and posture parameter calculation method |
JP2012068965A (en) * | 2010-09-24 | 2012-04-05 | Denso Corp | Image recognition device |
JP2014041427A (en) * | 2012-08-21 | 2014-03-06 | Toyota Central R&D Labs Inc | Object detection device and program |
JP2015035704A (en) * | 2013-08-08 | 2015-02-19 | 株式会社東芝 | Detector, detection method and detection program |
JP2015165377A (en) * | 2014-02-07 | 2015-09-17 | 株式会社フジクラ | input device |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021070594A1 (en) | 2019-10-10 | 2021-04-15 | ソニーセミコンダクタソリューションズ株式会社 | Electromagnetic wave detection device, electromagnetic detection system, and electromagnetic detection method |
WO2022004413A1 (en) * | 2020-07-01 | 2022-01-06 | ソニーセミコンダクタソリューションズ株式会社 | Information processing device, information processing method, and program |
CN112433339A (en) * | 2020-12-10 | 2021-03-02 | 济南国科医工科技发展有限公司 | Microscope fine focusing method based on random forest |
CN112433339B (en) * | 2020-12-10 | 2022-04-15 | 济南国科医工科技发展有限公司 | Microscope fine focusing method based on random forest |
US20220215643A1 (en) * | 2021-01-07 | 2022-07-07 | Canon Kabushiki Kaisha | Image processing device, imaging device, image processing method, and recording medium |
US11854239B2 (en) | 2021-01-07 | 2023-12-26 | Canon Kabushiki Kaisha | Image processing device, imaging device, image processing method, and recording medium |
WO2023127124A1 (en) * | 2021-12-28 | 2023-07-06 | 日本電気株式会社 | Imaging system, imaging device, imaging method, and recording medium |
JP2023098545A (en) * | 2021-12-28 | 2023-07-10 | 日本電気株式会社 | Imaging system, imaging method, and computer program |
JP7371712B2 (en) | 2021-12-28 | 2023-10-31 | 日本電気株式会社 | Imaging system, imaging method, and computer program |
Also Published As
Publication number | Publication date |
---|---|
JP6931369B2 (en) | 2021-09-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6931369B2 (en) | Image processing device and image processing method, and imaging device | |
JP5564987B2 (en) | Subject tracking device and imaging device | |
JP5676988B2 (en) | Focus adjustment device | |
JP2019215489A (en) | Imaging device and focus adjustment method | |
US20140071303A1 (en) | Processing apparatus, processing method, and program | |
JP6415196B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
US9451149B2 (en) | Processing apparatus, processing method, and program | |
JP2020095069A (en) | Imaging device | |
JP2018004918A (en) | Focus adjustment device and method, and imaging apparatus | |
JP2019117395A (en) | Imaging device | |
JP6812387B2 (en) | Image processing equipment and image processing methods, programs, storage media | |
JP6431429B2 (en) | IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM | |
US10896350B2 (en) | Image processing apparatus, image processing method, and image capture apparatus | |
JP6463402B2 (en) | Focus adjustment apparatus and method, and imaging apparatus | |
JP2017139646A (en) | Imaging apparatus | |
JP2010147661A (en) | Electronic camera | |
US20190281225A1 (en) | Focus detection device and focus detection method | |
JP6346484B2 (en) | Image processing apparatus and control method thereof | |
JP5070856B2 (en) | Imaging device | |
JP5062095B2 (en) | Imaging device | |
JP6818798B2 (en) | Image processing device and image processing method, and imaging device | |
JP2012108281A (en) | Focus detector and imaging apparatus | |
JP2020036091A (en) | Imaging device and control method therefor, program, and storage medium | |
US11627245B2 (en) | Focus adjustment device and focus adjustment method | |
US20240089597A1 (en) | Image capturing apparatus for capturing and compositing images different in in-focus position, control method, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190415 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200226 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200403 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200601 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20201127 |
|
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 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210120 |
|
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: 20210716 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210813 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6931369 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |