JP6931369B2 - Image processing device and image processing method, and imaging device - Google Patents
Image processing device and image processing method, and imaging device Download PDFInfo
- Publication number
- JP6931369B2 JP6931369B2 JP2019023778A JP2019023778A JP6931369B2 JP 6931369 B2 JP6931369 B2 JP 6931369B2 JP 2019023778 A JP2019023778 A JP 2019023778A JP 2019023778 A JP2019023778 A JP 2019023778A JP 6931369 B2 JP6931369 B2 JP 6931369B2
- Authority
- JP
- Japan
- Prior art keywords
- subject
- detection
- image
- parameter
- image processing
- 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
Images
Landscapes
- Focusing (AREA)
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Description
本発明は、画像処理装置および画像処理方法、ならびに撮像装置に関し、特に被写体検出技術に関する。 The present invention relates to an image processing apparatus and an image processing method, and an imaging apparatus, and particularly to a subject detection technique.
画像から特定の被写体パターンを自動的に検出する被写体検出技術は非常に有用である。特許文献1には、撮影した画像から人物の顔のような特定の被写体パターンに該当する領域を検出し、検出した領域に焦点や露出を最適化させる撮像装置が開示されている。
A subject detection technique that automatically detects a specific subject pattern from an image is very useful.
また、深層学習と呼ばれる手法を用いて、画像中の被写体を学習、認識することが知られている(非特許文献1)。コンボリューショナル・ニューラル・ネットワーク(CNN)は、深層学習の代表的な手法である。一般的にCNNは、画像の局所の特徴を空間的に統合する畳み込み層、特徴量を空間方向へ圧縮するプーリング層またはサブサンプリング層、さらに、全結合層、出力層などが組み合わされた多層構造を有する。CNNは多層構造による段階的な特徴変換を通じて、複雑な特徴表現を獲得することができるため、特徴表現に基づいて画像中の被写体のカテゴリ認識や被写体検出を高精度に行うことができる。 Further, it is known that a subject in an image is learned and recognized by using a technique called deep learning (Non-Patent Document 1). Convolutional neural networks (CNNs) are a typical method of deep learning. Generally, a CNN has a multi-layer structure in which a convolutional layer that spatially integrates local features of an image, a pooling layer or subsampling layer that compresses features in the spatial direction, a fully connected layer, an output layer, and the like are combined. Has. Since CNN can acquire a complicated feature expression through stepwise feature conversion by a multi-layer structure, it is possible to perform category recognition and subject detection of a subject in an image with high accuracy based on the feature expression.
特許文献1のように、撮影画像から検出された被写体領域に焦点を合わせる撮像装置においては、被写体検出に対する要求が、主被写体(焦点を合わせる被写体)の決定前後で異なる。主被写体の決定前では、ボケの大きさにかかわらず、検出対象の被写体を漏れなく検出できた方がよい。一方、主被写体の決定後は、ボケの大きな被写体は検出しなくてよい。
In an imaging device 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 determining the main subject and subject detection suitable after determining the main subject has not been proposed. In other words, no method has been proposed for detecting a subject suitable for the amount of blur (or sharpness) of the main subject. The amount of blur and sharpness of the main subject are not limited to the degree of focusing, but also change depending on the degree of subject blur and camera shake, the magnitude of image noise, and the like.
本発明はこのような従来技術の課題に鑑みてなされたものである。本発明の目的は、機械学習を利用した被写体検出において、主被写体のボケ量や鮮明度に適した被写体検出を実現可能な画像処理装置および画像処理方法、ならびに撮像装置を提供することにある。 The present invention has been made in view of such problems of the prior art. An object of the present invention is to provide an image processing device and an image processing method capable of realizing subject detection suitable for the amount of blurring and sharpness of a main subject in subject detection using machine learning, and an imaging device.
上述の目的は、機械学習に基づいて生成されたパラメータを用いて、画像データに対して被写体検出処理を適用する被写体検出手段と、被写体検出手段によって検出された被写体の中から主被写体を決定する決定手段と、被写体検出処理に用いるパラメータを複数記憶する記憶手段と、記憶手段が記憶するパラメータから、被写体検出手段で用いるパラメータを選択する選択手段と、を有し、選択手段は、主被写体が決定され、かつ、主被写体の領域が合焦するように焦点調節が行われている場合と、主被写体が決定されていない場合とで、それぞれの場合に適した異なるパラメータを選択することを特徴とする画像処理装置によって達成される。 The above-mentioned purpose is to determine a main subject from a subject detection means that applies subject detection processing to image data and a subject detected by the subject detection means using parameters generated based on machine learning. It has a determination means, a storage means for storing a plurality of parameters used for subject detection processing, and a selection means for selecting a parameter to be used in the subject detection means from the parameters stored in the storage means. It is characterized by selecting different parameters suitable for each case depending on whether the focus is adjusted so that the area of the main subject is determined and the area of the main subject is in focus and the case where the main subject is not determined. This is achieved by the image processing device.
本発明によれば、機械学習を利用した被写体検出において、主被写体の決定前に適した被写体検出と、主被写体の決定後に適した被写体検出とを実現可能な画像処理装置および画像処理方法、ならびに撮像装置を提供することができる。また、主被写体の動き状況、撮像装置の動き状況、撮影条件に応じて適した被写体検出を実現可能な画像処理装置および画像処理方法ならびに撮像装置を提供することができる。 According to the present invention, in subject detection using machine learning, an image processing device and an image processing method capable of realizing subject detection suitable before determining the main subject and subject detection suitable after determining the main subject, and an image processing method. An imaging device can be provided. Further, 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 state of the main subject, the movement state of the image pickup device, and the shooting 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, not all of them are essential to the invention, and the plurality of features may be arbitrarily combined. Further, in the attached drawings, the same or similar configurations are given the same reference numbers, and duplicate explanations are omitted.
以下の実施形態では、本発明をデジタル一眼レフカメラ(DSLR)で実施する場合に関して説明する。しかし、本発明は画像データを取り扱うことの可能な任意の電子機器で実施可能であり、デジタル一眼レフカメラは本発明に係る画像処理装置の一例に過ぎない。本発明を実施可能な電子機器には例えばパーソナルコンピュータ、スマートフォン、タブレット端末、ゲーム機、ロボットなどが含まれるが、これらに限定されない。 In the following embodiment, the 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 in any electronic device capable of handling image data, and the digital single-lens reflex camera is only an example of the image processing device according to the present invention. Electronic devices to which the present invention can be implemented include, but are not limited to, for example, 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 cross-sectional view of a digital single-lens reflex camera (DSLR) 100 according to the present embodiment. Further, FIG. 2 is a block diagram showing a functional configuration example of the DSLR100. The same reference number refers to the same component throughout the figure.
DSLR100は、本体101と、本体101に着脱可能な撮影レンズ102(交換レンズ)とを有する。本体101と撮影レンズ102の着脱部(マウント)にはそれぞれマウント接点群115が設けられている。撮影レンズ102を本体101に装着すると、マウント接点群115が接触し、撮影レンズ102と本体101との電気的な接続が確立する。
The DSLR 100 has 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 photographed), 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 arranged two-dimensionally in the
操作部203は、本体101および撮影レンズ102が備え、ユーザが操作可能な入力デバイス群の総称である。レリーズボタン、電源スイッチ、方向キー、決定ボタン、メニューボタン、動作モードの選択ダイヤルなどが操作部203に含まれる入力デバイスの具体例であるが、これらに限定されない。操作部203の操作は、システム制御部201が検知する。レリーズボタンは半押し操作でオンするスイッチSW1と、全押し操作でオンするスイッチSW2とを有する。
The
例えば、レリーズボタンの半押し操作(SW1のオン)が検出されると、システム制御部201は、静止画撮影準備動作を開始する。撮影準備動作は例えば自動焦点検出(AF)や自動露出制御(AE)に関する動作である。また、レリーズボタンの全押し操作(SW2のオン)を検出すると、システム制御部201は、静止画の撮影および記録動作を実行する。システム制御部201は、撮影によって得られた画像を、表示部112に一定時間表示する。
For example, when the half-press operation of the release button (SW1 is turned on) is detected, the
また、動画撮影時(撮影スタンバイ状態や動画記録中)、システム制御部201は、撮影によって得られた動画を、表示部112にリアルタイムに表示することにより、表示部112を電子ビューファインダー(EVF)として機能させる。表示部112をEVFとして機能させる際に表示する動画像およびそのフレーム画像を、ライブビュー画像もしくはスルー画像と呼ぶ。静止画と動画の何れを撮影するかは操作部203を通じて選択可能であり、システム制御部201は、静止画撮影時と動画撮影時とで、カメラ本体101および撮影レンズ102の制御方法を切り替える。
Further, at the time of moving image shooting (during shooting standby state or 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 in subject detection)
The DSLR 100 (system control unit 201) of the present embodiment uses the area of the subject detected by the
主被写体の決定前に撮影される画像は、例えば画面中央が合焦するように焦点調節された画像であり、ユーザが主被写体としたい被写体には合焦していない場合がある。そのため、主被写体の決定前に実施する被写体検出では、ボケ量が大きくても検出対象の被写体が検出できることが要求される。換言すれば、誤検出の抑制よりも検出漏れの抑制を優先した被写体検出が要求される。 The image taken before the determination of the main subject is, for example, an image whose focus is adjusted so that the center of the screen is in focus, and the subject that the user wants to be the main subject may not be in focus. Therefore, in the subject detection performed before the determination of the main subject, it is required that the subject to be detected can be detected even if the amount of blur is large. In other words, subject detection that prioritizes suppression of detection omissions rather than suppression of false positives is required.
一方、主被写体が決定されると、その後は主被写体の領域が合焦するように焦点検出が行われるため、その後得られる画像における主被写体のボケ量は小さくなる。そのため、主被写体の決定後は、検出対象の被写体であっても、ボケ量の大きい被写体を検出する価値が低下する。換言すれば、検出漏れの抑制よりも誤検出の抑制を優先した被写体検出が要求される。 On the other hand, once 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 blurring of the main subject in the image obtained thereafter becomes small. Therefore, after the main subject is determined, the value of detecting a subject having a large amount of blur is reduced even if the subject is a detection target. In other words, subject detection that prioritizes suppression of false positives rather than suppression of detection omissions is required.
ボケ量の大きい被写体を検出しようとするほど、対象の被写体が写っていない領域を誤検出する確率が増加する傾向にある。これは、被写体のボケ量が大きくなるほど、被写体に類似した画像のバリエーションが増加するとともに、被写体の特徴が失われるからである。このように、主被写体の決定前は、ボケ量の小さい被写体から大きい被写体までを検出することが重要であって、主被写体の決定後は、誤検出を抑制し、ボケ量の小さい被写体を正確に検出することが重要である。 As an attempt is made to detect a subject having a large amount of blur, the probability of erroneously detecting an area in which the target subject is not captured tends to increase. This is because as the amount of blurring of the subject increases, the variation of the image similar to the subject increases and the characteristics of the subject are lost. In this way, it is important to detect from a subject with a small amount of blur to a subject with a large amount of blur before determining the main subject, and after determining the main subject, false detection is suppressed and the subject with a small amount of blur is accurately detected. It is important to detect it.
本実施形態の被写体検出部204は、予め機械学習を通じて生成された学習モデルに基づく処理パラメータを用いた被写体検出を画像に適用する。本実施形態では学習モデル記憶部205が、主被写体決定前の被写体検出用の検出学習モデル206と、主被写体決定後の被写体検出用の検出学習モデル207とを記憶している。主被写体決定前の被写体検出用の検出学習モデル206は、ボケ量の小さい被写体から大きい被写体の画像を用いた機械学習によって生成されている。また、主被写体決定後の被写体検出用の検出学習モデル207は、ボケ量の小さい被写体画像を重視した機械学習によって生成されている。
The
そして、システム制御部201は、主被写体の決定前後で、被写体検出部204が用いる学習モデルを切り替えることにより、被写体検出部204における被写体検出の特性を切り替える。システム制御部201は、主被写体の決定前には主被写体決定前の被写体検出用の検出学習モデル206を、主被写体の決定後には主被写体決定後の被写体検出用の検出学習モデル207を用いるように切り替える。
Then, the
(撮像動作)
次に、図3および図4を参照して、本実施形態のDSLR100の撮影動作について説明する。
図3は撮影動作の概要に関するフローチャートであり、各ステップの処理はシステム制御部201のプログラマブルプロセッサがROM2011からRAM2012に読み込まれたプログラムを実行することによって実現される。ここでは、本体101の電源がONであり、撮影スタンバイ状態であるものとする。撮影スタンバイ状態でシステム制御部201は、例えば動画撮影を行い、得られた動画を表示部112に表示させることでEVFとして機能させるなど、予め定められた動作を実行している。
(Imaging operation)
Next, the photographing operation of the
FIG. 3 is a flowchart relating to the outline of the shooting operation, and the processing of each step is realized by executing the program read from the
S301でシステム制御部201は、レリーズボタンが有するスイッチSW1およびSW2の状態を検出し、スイッチSW1とSW2のいずれかがオンであれば処理をS302に進める。一方、スイッチSW1とSW2のいずれもオフであれば、システム制御部201はS301を繰り返し実行する。
In S301, the
S302でシステム制御部201は、測光センサー108の露光処理(電荷蓄積)を行う。測光センサー108の露光処理は所謂電子シャッターによって所定時間電荷蓄積を行うことによって実現される。システム制御部201は、測光センサー108の動作を制御して、所定時間電荷蓄積を行い、測光センサー108から画像信号(露出制御用信号)を読み出す。また、システム制御部201は、AFセンサー105についても露光処理(電荷蓄積)を行い、画像信号(焦点検出用信号)を読み出す。
In S302, the
S303でシステム制御部201は、露出制御用信号を被写体検出部204に供給し、被写体検出結果を被写体検出部204から取得する。また、システム制御部201は、被写体検出結果に基づいて主被写体を決定する。主被写体は任意の方法で決定することができ、システム制御部201が自動的に決定してもよいし、検出された被写体の領域をユーザに示し、ユーザが選択した領域の被写体を主被写体と決定してもよい。システム制御部201が自動的に主被写体を決定する場合、例えば被写体の領域の位置や大きさに基づいて決定することができる。例えば、画像の中心に一番近い被写体や、領域が一番大きい被写体を主被写体に決定することができる。なお、被写体検出の信頼度や過去の検出結果など、他の条件を考慮したり、複数の条件を組み合わせて考慮したりして主被写体を決定することもできる。被写体検出処理の詳細については図4を用いて後述する。
In S303, the
S304でシステム制御部201は、選択可能な焦点検出領域のうち、S303で決定した主被写体の位置に最も近い焦点検出領域を選択する。そして、S302で読み出した焦点検出用信号のうち、選択した焦点検出領域に関する焦点検出用信号から、選択した焦点検出領域の焦点状態(デフォーカス量および方向)を検出する。
In S304, the
なお、S303で被写体が検出されなかった場合、システム制御部201は、選択可能な全ての焦点検出領域についての焦点状態(デフォーカス量および方向)を、焦点検出用信号に基づいて求める。そして、最も近い距離に被写体が存在する焦点検出領域を選択する。
When the subject is not detected in S303, the
S305でシステム制御部201は、S304で選択した焦点検出領域の焦点状態に基づいてフォーカスレンズ113の位置を制御することにより、撮影レンズ102の合焦距離を調節する。
In S305, the
S306でシステム制御部201は、S302で読み出した露出制御用信号を用いて撮影条件(絞り値(AV値)、シャッタスピード(TV値)、ISO感度(ISO値))を決定する。撮影条件の決定方法に特に制限は無いが、ここでは、露出制御用信号に基づいて得られる輝度(Bv値)に対応する撮影条件を、予め記憶されたプログラム線図を参照して決定するものとする。なお、被写体検出処理によって検出された被写体領域の輝度を用いて撮影条件を決定するようにしてもよい。
In S306, the
S307でシステム制御部201は、スイッチSW2の状態を検出し、スイッチSW2がオンであれば処理をS308へ進め、スイッチSW2がオフであれば処理をS301に戻す。
In S307, the
S308でシステム制御部201は、静止画の撮影処理を実行する。システム制御部201は、撮影レンズ102からの光束と交差しない位置にメインミラー103およびサブミラー104を移動させるとともに、S306で決定したシャッタースピードに従ってシャッター110を駆動する。これにより、撮影レンズ102が形成する光学像によって撮像素子111が露光される。撮像素子111は各画素が露光期間に蓄積した電荷を電圧に変換した画像信号を生成する。システム制御部201は撮像素子から画像信号を読み出し、A/D変換、ノイズ低減、ホワイトバランス調整、色補間など、予め定められた画像処理を適用することにより画像データを生成する。システム制御部201は、生成した画像データを画像データファイルとして画像記憶部202に保存したり、画像データに基づく表示用画像信号を生成して表示部112に表示したりする。その後、システム制御部201は処理をS301に戻す。
In S308, the
(被写体検出の処理の流れ)
次に、図4に示すフローチャートを用いて、図3のS303の被写体検出処理の詳細について説明する。
S401でシステム制御部201は、主被写体が決定済みであるか否か判定し、決定済みと判定されなければS402へ、決定済みと判定されればS403へ、処理を進める。
(Flow of subject detection processing)
Next, the details of the subject detection process of S303 of FIG. 3 will be described with reference to the flowchart shown in FIG.
In S401, the
S402でシステム制御部201(選択手段)は、学習モデル記憶部205に複数記憶されている学習モデルのうち、主被写体決定前の被写体検出用の検出学習モデル206を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。主被写体決定前の被写体検出用の検出学習モデル206は、幅広いボケ量に対応して被写体を検出するための学習モデルであり、検出対象の被写体について小さいボケ量から大きいボケ量まで幅広いボケ量の画像を用いた機械学習によって得られた学習モデルである。検出学習モデル206を用いることにより、ボケ量が大きくても検出対象の被写体を検出可能な被写体検出が実現できる。
In S402, the system control unit 201 (selection means) selects the detection learning model 206 for subject detection before the main subject is determined from the learning models stored in the learning
S403でシステム制御部201(選択手段)は、学習モデル記憶部205に複数記憶されている学習モデルのうち、主被写体決定後の被写体検出用の検出学習モデル207を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。主被写体決定後の被写体検出用の検出学習モデル207は、ボケ量の小さい被写体を検出するための学習モデルであり、検出対象の被写体について、小さいボケ量の画像を重視して用いた機械学習によって得られた学習モデルである。検出学習モデル207を用いることにより、ボケ量が小さな検出対象の被写体を精度良く検出可能な被写体検出が実現できる。
In S403, the system control unit 201 (selection means) selects the detection learning model 207 for subject detection after the main subject is determined from the learning models stored in the learning
また、S402およびS403でシステム制御部201は、S302で読み出した露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS404に進める。
Further, the
S404で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS402またはS403において設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報には、被写体が検出されたか否か(検出数)や、検出した被写体領域に関する情報(例えば位置や大きさ)が含まれてよい。被写体検出部204は、被写体検出にCNNを用いる。CNNの詳細については後述する。
In S404, the
S405でシステム制御部201は、被写体検出の結果、被写体が1つ以上検出されていれば、検出された被写体から主被写体を決定する。主被写体の決定方法については先に述べたとおりである。
In S405, if one or more subjects are detected as a result of subject detection, the
ここでは、主被写体の決定後は、ボケ量の小さい被写体の画像を重視した機械学習で得られた検出学習モデル207を用いて被写体検出を行うものとして説明した。しかし、主被写体の決定後であっても、主被写体が所定期間継続して検出されない場合には、幅広いボケ量に対応して被写体を検出するための学習モデルである検出学習モデル206を用いるように構成してもよい。主被写体が所定期間継続して検出されない(見失った)場合、主被写体のボケ量が大きくなっている可能性があるためである。 Here, after the main subject is determined, the subject is detected using the detection learning model 207 obtained by machine learning that emphasizes the image of the subject with a small amount of blur. However, if the main subject is not continuously 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 amount of blur, should be used. It may be configured as. This is because if the main subject is not continuously detected (lost) for a predetermined period of time, the amount of blurring of the main subject may be large.
また、主被写体の決定後であっても、主被写体に合焦していないと判断される期間についても、検出学習モデル206を用いる構成としてもよい。主被写体に合焦する前は、主被写体のボケ量が大きい状態である可能性があるためである。あるいは、主被写体のボケ量が閾値以上である場合には検出学習モデル206を用いる構成としてもよい。あるいは、スイッチSW1がオンになる前においても、検出学習モデル206を用いて被写体検出を行う構成としてもよい。 Further, even after the determination of the main subject, the detection learning model 206 may be used for the period when it is determined that the main subject is not in focus. This is because there is a possibility that the amount of blurring of the main subject is large before focusing on the main subject. Alternatively, when the amount of blurring of the main subject is equal to or greater than the threshold value, the detection learning model 206 may be used. Alternatively, the subject may be detected by 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 rather than erroneous detection. Therefore, when the detection learning model 206 is used for subject detection, the threshold value of the detection reliability required when determining the main subject is stricter in S405 than when the detection learning model 207 is used for subject detection. Can be set. That is, the certainty of subject detection (detection reliability) required for the region of the main subject is higher than that of the subject region detected using the detection learning model 207 for the subject region detected using the detection learning model 206. Can be set high. As a result, it is possible to prevent the falsely detected subject from being determined as the main subject and optimizing the focus adjustment and exposure control in an inappropriate region.
(被写体検出部の詳細)
次に、被写体検出部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層のみで構成している。
The CNN first detects the next feature in the S layer based on the feature detected in the previous layer. Further, the feature detected in the S layer is integrated in the C layer, and the detection result in that layer is transmitted to the next layer.
The S layer is composed of feature detection cell surfaces, and different features are detected 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. In the following, when it is not necessary to distinguish between the feature-detecting cell surface and the feature-integrated cell surface, they are collectively referred to as a feature surface. In the present embodiment, the output layer (nth layer), which is the final layer, does not use the C layer but is composed of only the S layer.
特徴検出細胞面での特徴検出処理、および特徴統合細胞面での特徴統合処理の詳細について、図6を用いて説明する。1つの特徴検出細胞面は複数の特徴検出ニューロンにより構成され、個々の特徴検出ニューロンは1つ前の階層のC層に所定の構造で結合している。また1つの特徴統合細胞面は、複数の特徴統合ニューロンにより構成され、個々の特徴統合ニューロンは同じ階層のS層に所定の構造で結合している。 The details of the feature detection process on the feature detection cell surface and the feature integration process on the feature integration cell surface 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 hierarchy in a predetermined structure. Further, one feature-integrating cell surface is composed of a plurality of feature-integrating neurons, and each feature-integrating neuron is connected to the S layer of the same hierarchy in 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 coefficient
検出すべきパターンと、検出すべきでないパターンとを、学習用のテストパターンとして多数用意する。各テストパターンは、画像データと、対応する教師信号とを有する。検出すべきパターンに該当する画像データについては、最終階層の特徴検出細胞面において、検出対象のパターンが存在する領域に対応するニューロンの出力が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 region where the pattern to be detected exists is 1 on the feature detection cell surface of the final layer. On the other hand, for the image data corresponding to the 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, paying attention to the fact that the desired subject detection characteristics differ depending on the time when the subject detection is performed, the parameters used for the subject detection (learning model generated by machine learning) are set according to the time when the subject detection is performed. It was configured to switch. Therefore, a more appropriate subject detection result can be obtained as compared with the configuration using one learning model. Specifically, for the subject to be detected (for example, the face of a person), the subject before the main subject is determined by machine learning using a test pattern using image data of various amounts of blur (from a small amount of blur to a large amount of blur). A detection learning model 206 for detection is prepared. Further, for the subject to be detected, the detection learning model 207 for detecting the subject after the main subject is determined is prepared by machine learning using a test pattern that focuses on a small amount of image data.
そして、主被写体の決定前には検出学習モデル206を、決定後には検出学習モデル207を用いることにより、主被写体の決定前に適した被写体検出と、主被写体の決定後に適した被写体検出とを実現できる。そのため、検出された被写体のうち、特定の被写体の領域を用いる処理を適切に実行することができる。 Then, by using the detection learning model 206 before the determination of the main subject and the detection learning model 207 after the determination, the subject detection suitable before the determination of the main subject and the subject detection suitable after the determination of the main subject can be performed. realizable. Therefore, among the detected subjects, it is possible to appropriately execute the process using the area of a specific subject.
《第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 showing a functional configuration example of the
位置姿勢変化取得部701は、例えばジャイロ、加速度センサ、電子コンパス等の位置姿勢センサを有し、DSLR100の位置姿勢変化を表す信号を出力する。システム制御部201は、位置姿勢変化取得部701が出力した信号をRAM2012に格納する。
The position / attitude
動きベクトル検出部702は、2フレーム分の画像データを用いて動きベクトルを検出する。検出した動きベクトルの情報はシステム制御部201に出力する。システム制御部201は、動きベクトルの情報をRAM2012に格納する。ベクトル検出処理の詳細については後述する。その他の各部については第1実施形態と同様のため、説明を省略する。
The motion
(動きベクトル算出処理の詳細)
動きベクトル検出部702における、動きベクトル算出処理の詳細について説明する。図8は、動きベクトル検出部702に供給される2フレーム分の画像を模式的に示した図である。ここで、2フレーム分の画像は、同じ視点から異なるタイミングで撮影された画像であり、現フレームをフレームt、1つ前のフレームをフレームt-1とするフレームt-1内の複数の位置に対して、フレームtとのマッチング処理を行う。そして、フレームt-1上の点
The details of the motion vector calculation process in the motion
(被写体検出における辞書切り替え)
フレーム間の動きベクトルに基づいて現フレーム内の被写体領域を検出しようとした場合、動きベクトルが大きいほど誤検出の確率が増加する。これは、動きベクトルが大きい被写体は画像のブレが大きく、ボケ量の大きい場合と同様、被写体に類似した画像のバリエーションが増加するとともに、被写体の特徴が失われるからである。
(Dictionary switching in subject detection)
When trying to detect the subject area in the current frame based on the motion vector between frames, the larger the motion vector, the higher the probability of false detection. This is because a subject having a large motion vector has a large amount of blurring of the image, and as in the case of a large amount of blurring, the variation of the image similar to the subject increases and the 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つ以上検出しているものとする。
(Flow of subject detection processing)
Next, the details of the subject detection process performed by the
S901でシステム制御部201は、RAM2012を参照して主被写体の動きベクトルの大きさを算出する。そして、システム制御部201は、算出した大きさを予め定めた閾値と比較し、閾値より大きければ動きベクトルが大きいと判定する。システム制御部201は、主被写体の動きベクトルが大きいと判定されればS903へ、判定されなければS902へ、それぞれ処理を進める。
In S901, the
S902でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、動きベクトル小用の検出学習モデル703を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。検出学習モデル703を用いることにより、被写体ブレが小さな検出対象の被写体を精度よく検出可能な被写体検出が実現できる。
In S902, the
S903でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、動きベクトル大用の検出学習モデル704を選択し、被写体検出処理用パラメータとして被写体検出部204に設定する。検出学習モデル704を用いることにより、被写体ブレが大きくても検出対象の被写体を検出可能な被写体検出が実現できる。
In S903, the
また、S902およびS903でシステム制御部201は、S302で読みだした露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS904に進める。
Further, the
S904で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS902またはS903で設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報や、CNNを用いた被写体検出の具体的な処理は第1実施形態と同様であってよい。
In S904, the
S905でシステム制御部201は、被写体検出の結果、被写体が1つ以上検出されていれば、検出された被写体から主被写体を決定する。主被写体の決定方法についても第1実施形態と同様であってよい。
In 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 this embodiment, paying attention to the fact that the desired subject detection characteristics differ depending on the magnitude of the motion vector of the main subject, the parameter used for subject detection (learning model generated by machine learning) is set to the magnitude of the motion vector of the main subject. It was configured to switch according to the situation. Therefore, a more appropriate subject detection result can be obtained as compared with the configuration using one learning model. Specifically, for a subject to be detected (for example, the face of a person), a
そして、主被写体の動きベクトルが大きいと判定される場合には検出学習モデル704を、大きいと判定されない場合には検出学習モデル703を用いて被写体検出処理を実行するよう、検出学習モデルを切り替える。これにより、主被写体の動きベクトルの大きさ(すなわち、被写体像のブレ量の大きさ)に適した被写体検出を実現できる。そのため、検出された被写体のうち、特定の被写体の領域を用いる処理を適切に実行することができる。
Then, the detection learning model is switched so that the subject detection process is executed using the
《第3実施形態》
次に、本発明の第3実施形態について説明する。本実施形態は、被写体検出に用いる学習モデルの切り替え方法以外は第2実施形態と同様に実施することができる。そのため、以下では学習モデルの切り替え方法に関して重点的に説明する。
<< Third Embodiment >>
Next, a third embodiment of the present invention will be described. This embodiment can be implemented in the same manner as the second embodiment except for the method of switching the learning model used for subject detection. Therefore, the method of switching the learning model will be mainly described below.
(被写体検出における辞書切り替え)
本実施形態では、被写体検出処理に用いる学習モデルを、撮像装置(DSLR100)の位置姿勢変化の大きさに応じて切り替える。撮像装置の位置姿勢変化が大きい場合には、手ぶれが大きくなるため、被写体領域の誤検出が起こりやすくなる。これは、撮像装置の位置姿勢変化が大きい場合はボケ量の大きい場合と同様に、被写体に類似した画像のバリエーションが増加するとともに、被写体の特徴が失われるからである。
(Dictionary switching in 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 image pickup apparatus (DSLR100). When the position / orientation change of the image pickup apparatus is large, the camera shake becomes large, so that erroneous detection of the subject area is likely to occur. This is because when the position / orientation change of the image pickup apparatus is large, the variation of the image similar to the subject increases and the characteristics of the subject are lost, as in the case where the amount of blurring is large.
本実施形態の被写体検出部204は、予め機械学習を通じて生成された学習モデルに基づく処理パラメータを用いた被写体検出を画像に適用する。本実施形態では学習モデル記憶部205から、位置姿勢変化小用の検出学習モデル705と、位置姿勢変化大用の検出学習モデル706を参照する。位置姿勢変化小用の検出学習モデル705は、手ブレ量が小さい場合の被写体画像を重視した機械学習によって生成されている。また、位置姿勢変化大用の検出学習モデル706は、手ブレ量が大きい場合の被写体画像を重視した機械学習によって生成されている。
The
そして、システム制御部201は、位置姿勢変化の大きさに応じて、被写体検出部204が用いる学習モデルを切り替えることにより、被写体検出部204における被写体検出の特性を切り替える。より具体的には、位置姿勢変化が大きいと判定されない場合には、位置姿勢変化小用の検出学習モデル705を、位置姿勢変化が大きいと判定される場合には、位置姿勢変化大用の検出学習モデル706を用いるように切り替える。位置姿勢変化の大きさを判定するための閾値は、例えば予め実験的に定めることができる。
Then, the
(被写体検出の処理の流れ)
次に、図10に示すフローチャートを用いて、本実施形態のDSLR100が撮影動作で行う被写体検出処理の詳細について説明する。本実施形態のDSLR100の撮影動作は第1実施形態と同様であるため、以下で説明する被写体検出処理は、図3のS303で実施される。
(Flow of subject detection processing)
Next, the details of the subject detection process performed by the
S1001でシステム制御部201は、RAM2012を参照して、位置姿勢変化取得部701から得られた位置姿勢変化を予め定めた閾値と比較し、閾値より大きければ位置姿勢変化が大きいと判定する。システム制御部201は、DSLR100の位置姿勢変化が大きいと判定されればS1003へ、判定されなければS1002へ、それぞれ処理を進める。
In S1001, the
S1002でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、位置姿勢変化小用の検出学習モデル705を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。検出学習モデル705を用いることにより、手ブレが小さな検出対象の被写体を精度よく検出可能な被写体検出が実現できる。
S1003でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、位置姿勢変化大用の検出学習モデル706を選択し、被写体検出処理用パラメータとして被写体検出部204に設定する。検出学習モデル706を用いることにより、手ブレが大きくても検出対象の被写体を検出可能な被写体検出が実現できる。
In S1002, the
In S1003, the
また、S1002およびS1003でシステム制御部201は、S302で読みだした露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS1004に進める。
Further, the
S1004で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS1002またはS1003で設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報や、CNNを用いた被写体検出の具体的な処理は第1実施形態と同様であってよい。
In S1004, the
本実施形態では、撮像装置の位置姿勢変化の大きさに応じて望ましい被写体検出の特性が異なることに着目し、被写体検出に用いるパラメータ(機械学習によって生成した学習モデル)を、位置姿勢変化の大きさに応じて切り替える構成とした。そのため、1つの学習モデルを用いる構成と比較して、より適切な被写体検出結果を得ることができる。具体的には、検出対象の被写体(例えば人物の顔)について、手ブレ量が小さい場合の画像データを重点的に用いたテストパターンによる機械学習により、位置姿勢変化小用の検出学習モデル705を用意する。また、検出対象の被写体について、手ブレ量が大きい場合の画像データを重点的に用いたテストパターンによる機械学習により、位置姿勢変化大用の検出学習モデル706を用意する。
In this embodiment, paying attention to the fact that the desired subject detection characteristics differ depending on the magnitude of the position / orientation change of the imaging device, the parameter (learning model generated by machine learning) used for subject detection is set to the magnitude of the position / orientation change. It was configured to switch according to the situation. Therefore, a more appropriate subject detection result can be obtained as compared with the configuration using one learning model. Specifically, for the subject to be detected (for example, the face of a person), the
そして、位置姿勢変化が大きいと判定される場合には検出学習モデル706を、大きいと判定されない場合には検出学習モデル705を用いて被写体検出処理を実行するよう、検出学習モデルを切り替える。これにより、位置姿勢変化の大きさ(すなわち、被写体像のブレ量の大きさ)に適した被写体検出を実現できる。そのため、検出された被写体のうち、特定の被写体の領域を用いる処理を適切に実行することができる。
Then, the detection learning model is switched so that the subject detection process is executed using the
《第4実施形態》
次に、本発明の第4実施形態について説明する。本実施形態は、被写体検出に用いる学習モデルの切り替え方法以外は第2実施形態と同様に実施することができる。そのため、以下では学習モデルの切り替え方法に関して重点的に説明する。
<< Fourth Embodiment >>
Next, a fourth embodiment of the present invention will be described. This embodiment can be implemented in the same manner as the second embodiment except for the method of switching the learning model used for subject detection. Therefore, the method of switching the learning model will be mainly described below.
(被写体検出における辞書切り替え)
本実施形態では、被写体検出処理に用いる学習モデルを、被写体検出に用いる画像データのノイズ量の大きさに応じて切り替える。より具体的には、被写体検出処理に用いる学習モデルを、被写体検出部204に供給される画像データ(測光センサー108が生成する像信号)に適用されるゲイン(信号増幅率)の大きさに応じて切り替える。
(Dictionary switching in subject detection)
In the present embodiment, the learning model used for the subject detection process is switched according to the magnitude of the noise amount of the image data used for the subject detection. More specifically, the learning model used for the subject detection process depends on 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 the subject detection process is applied to the image data to which a large gain is applied, erroneous detection of the subject area is likely to occur. This is because by applying the gain to the image data, the 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は例えば撮影感度に対応するゲインの大きさを判定することができる。
Then, the
(被写体検出の処理の流れ)
次に、図11に示すフローチャートを用いて、本実施形態のDSLR100が撮影動作で行う被写体検出処理の詳細について説明する。本実施形態のDSLR100の撮影動作は第1実施形態と同様であるため、以下で説明する被写体検出処理は、図3のS303で実施される。
(Flow of subject detection processing)
Next, the details of the subject detection process performed by the
S1101でシステム制御部201は、測光センサー108が像信号に適用したゲインの大きさを予め定めた閾値と比較し、閾値より大きければゲインが大きいと判定する。システム制御部201は、ゲインが大きいと判定されればS1103へ、判定されなければS1102へ、それぞれ処理を進める。
In S1101, the
S1102でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、ゲイン小用の検出学習モデル707を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。検出学習モデル707を用いることにより、ノイズが小さい場合に検出対象の被写体を精度よく検出可能な被写体検出が実現できる。
In S1102, the
S1103でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、ゲイン大用の検出学習モデル708を選択し、被写体検出処理用パラメータとして被写体検出部204に設定する。検出学習モデル708を用いることにより、ノイズが大きい場合でも検出対象の被写体を検出可能な被写体検出が実現できる。
In S1103, the
また、S1102およびS1103でシステム制御部201は、S302で読みだした露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS1104に進める。
Further, the
S1104で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS1102またはS1103で設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報や、CNNを用いた被写体検出の具体的な処理は第1実施形態と同様であってよい。
In S1104, the
本実施形態では、画像データのノイズの量に応じて望ましい被写体検出の特性が異なることに着目し、被写体検出に用いるパラメータ(機械学習によって生成した学習モデル)を、画像データに適用されたゲインの大きさに応じて切り替える構成とした。そのため、1つの学習モデルを用いる構成と比較して、より適切な被写体検出結果を得ることができる。具体的には、検出対象の被写体(例えば人物の顔)について、ノイズが少ない画像データを重点的に用いたテストパターンによる機械学習により、ゲイン小用の検出学習モデル707を用意する。また、検出対象の被写体について、ノイズが多い画像データを重点的に用いたテストパターンによる機械学習により、ゲイン大用の検出学習モデル708を用意する。
In this embodiment, focusing on the fact that the desired subject detection characteristics differ depending on the amount of noise in the image data, the parameters used for subject detection (learning model generated by machine learning) are set to the gain applied to the image data. The configuration is such that it can be switched according to the size. Therefore, a more appropriate subject detection result can be obtained as compared with the configuration using one learning model. Specifically, for the subject to be detected (for example, the face of a person), a
そして、被写体検出を行う画像データに適用されたゲインが大きいと判定される場合には検出学習モデル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 device that optimizes exposure and focus adjustment in a region of a main subject has been described. However, the purpose of using the main subject area is not limited to shooting. For example, it can be used for any other purpose such as applying image processing to a main subject area (or an area other than the main subject area). Therefore, in the present invention, the configuration related to photography is not essential. Further, in the above-described embodiment, the configuration in which two types of learning models are switched and used has been described, but three or more types of learning models may be switched and used.
以上、被写体検出処理の対象となる被写体のボケ量や鮮明度が異なり得る状況の例として、合焦度合い、被写体の動きの大きさ、撮像装置の位置姿勢変化の大きさ、画像データのノイズの多さに着目した実施形態を説明した。しかし、他の条件に応じて検出学習モデルを切り替えるように構成してもよい。 As described above, examples of situations in which the amount of blur and sharpness of the subject to be subject to subject detection processing may differ include the degree of focusing, the magnitude of movement of the subject, the magnitude of change in the position and orientation of the image pickup device, and the noise of image data. An embodiment focusing on a large number has been described. However, it may be configured to switch the detection learning model according to other conditions.
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又はコンピュータ読み取り可能な記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータの1以上のプロセッサがプログラムを実行することでも実現できる。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or a computer-readable storage medium, and one or more processors of the computer of the system or device program 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 embodiment is merely a specific example for the purpose of assisting the understanding of the present invention, and there is no intention of limiting the present invention to the above-mentioned embodiment in any sense. All embodiments within the scope of the claims are included in the present invention.
100…デジタル一眼レフカメラ、101…本体、102…レンズ、108…測光センサー、111…撮像素子、204…被写体検出部、206…主被写体決定前の被写体検出処理用の検出学習モデル、207…主被写体決定後の被写体検出処理用の検出学習モデル 100 ... Digital single-lens reflex camera, 101 ... Main body, 102 ... Lens, 108 ... Photometric sensor, 111 ... Image sensor, 204 ... Subject detection unit, 206 ... Detection learning model for subject detection processing before main subject determination, 207 ... Main Detection learning model for subject detection processing after subject determination
Claims (15)
前記被写体検出手段によって検出された被写体の中から主被写体を決定する決定手段と、
前記被写体検出処理に用いるパラメータを複数記憶する記憶手段と、
前記記憶手段が記憶するパラメータから、前記被写体検出手段で用いるパラメータを選択する選択手段と、
を有し、
前記選択手段は、前記主被写体が決定され、かつ、前記主被写体の領域が合焦するように焦点調節が行われている場合と、前記主被写体が決定されていない場合とで、それぞれの場合に適した異なるパラメータを選択することを特徴とする画像処理装置。 A subject detection means that applies subject detection processing to image data using parameters generated based on machine learning, and
A determination means for determining the main subject from the subjects detected by the subject detection means, and
A storage means for storing a plurality of parameters used for the subject detection process, and
A selection means for selecting a parameter to be used in the subject detection means from the parameters stored in the storage means, and a selection means.
Have,
Said selection means, the main object is determined, and, in the case where the area of the main subject is being performed focusing to focus, in the case where the main subject is not determined, in each case An image processing device characterized by selecting different parameters suitable for.
前記第1のパラメータは、被写体の検出漏れの抑制よりも被写体の誤検出の抑制を優先した被写体検出処理を行うためのパラメータであり、
前記第2のパラメータは、被写体の誤検出の抑制よりも被写体の検出漏れの抑制を優先した被写体検出処理を行うためのパラメータであることを特徴とする請求項1に記載の画像処理装置。 The selection means selects the first parameter when the main subject is determined and the focus is adjusted so that the area of the main subject is in focus, and the main subject is determined. If not, select the second parameter and
The first parameter is a parameter for performing subject detection processing that prioritizes suppression of false detection of the subject rather than suppression of omission of detection of the subject.
The image processing apparatus according to claim 1, wherein the second parameter is a parameter for performing subject detection processing in which suppression of subject detection omission is prioritized over suppression of false detection of the subject.
請求項1から9のいずれか1項に記載の画像処理装置と、を有する撮像装置であって、
前記画像処理装置の被写体検出手段は、前記撮像素子によって得られる画像に対して被写体検出処理を適用する、
ことを特徴とする撮像装置。 Image sensor and
An image pickup apparatus comprising the image processing apparatus according to any one of claims 1 to 9.
The subject detection means of the image processing device applies the subject detection process to the image obtained by the image pickup device.
An imaging device characterized by this.
前記主被写体の領域が適正露出となるように露出条件を決定する決定手段と、
をさらに有することを特徴とする請求項10に記載の撮像装置。 The focus adjusting means for performing the focus adjustment and
Determining means for determining the exposure conditions so that the area of the main subject has an appropriate exposure,
The imaging apparatus according to claim 10, characterized in that it further comprises a.
機械学習に基づいて生成されたパラメータを用いて、画像に対して被写体検出処理を適用する被写体検出工程と、
前記被写体検出工程において検出された被写体の中から主被写体を決定する決定工程と、
前記被写体検出処理に用いるパラメータを複数記憶する記憶手段から、前記被写体検出工程で用いるパラメータを選択する選択工程と、
を有し、
前記選択工程では、前記主被写体が決定され、かつ、前記主被写体の領域が合焦するように焦点調節が行われている場合と、前記主被写体が決定されていない場合とで、それぞれの場合に適した異なるパラメータを選択することを特徴とする画像処理方法。 An image processing method executed by an image processing device.
A subject detection process that applies subject detection processing to an image using parameters generated based on machine learning,
A determination step of determining the main subject from the subjects detected in the subject detection step, and
A selection step of selecting a parameter to be used in the subject detection step from a storage means for storing a plurality of parameters used in the subject detection process, and a selection step of selecting the parameter to be used in the subject detection step.
Have,
Wherein the selection step, the main object is determined, and, in the case where the area of the main subject is being performed focusing to focus, in the case where the main subject is not determined, in each case An image processing method characterized by selecting different parameters suitable for.
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 JP2019186911A (en) | 2019-10-24 |
| JP6931369B2 true 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) |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114222902A (en) | 2019-10-10 | 2022-03-22 | 索尼半导体解决方案公司 | Electromagnetic wave detection device, electromagnetic wave detection system, and electromagnetic wave detection method |
| JP7536464B2 (en) * | 2020-02-19 | 2024-08-20 | キヤノン株式会社 | IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM |
| US20230290137A1 (en) * | 2020-07-01 | 2023-09-14 | Sony Semiconductor Solutions Corporation | Information processing apparatus, information processing method, and program |
| CN112433339B (en) * | 2020-12-10 | 2022-04-15 | 济南国科医工科技发展有限公司 | Microscope fine focusing method based on random forest |
| JP7695102B2 (en) * | 2021-01-07 | 2025-06-18 | キヤノン株式会社 | IMAGING APPARATUS, CONTROL METHOD FOR IMAGING APPARATUS, PROGRAM, 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 |
| JP2023034437A (en) * | 2021-08-31 | 2023-03-13 | ブラザー工業株式会社 | Computer program, image processing apparatus and image processing method |
| JP2023036437A (en) * | 2021-09-02 | 2023-03-14 | 京セラ株式会社 | Imaging apparatus and program |
| WO2023127124A1 (en) * | 2021-12-28 | 2023-07-06 | 日本電気株式会社 | Imaging system, imaging device, imaging method, and recording medium |
| JP7371712B2 (en) * | 2021-12-28 | 2023-10-31 | 日本電気株式会社 | Imaging system, imaging method, and computer program |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005160122A (en) * | 2005-03-04 | 2005-06-16 | Canon Inc | Imaging apparatus and computer-readable storage medium |
| JP4931218B2 (en) * | 2007-02-22 | 2012-05-16 | キヤノン株式会社 | Imaging apparatus, object detection method, and attitude parameter calculation method |
| JP5423631B2 (en) * | 2010-09-24 | 2014-02-19 | 株式会社デンソー | Image recognition device |
| JP6077785B2 (en) * | 2012-08-21 | 2017-02-08 | 株式会社豊田中央研究所 | Object detection apparatus and program |
| JP2015035704A (en) * | 2013-08-08 | 2015-02-19 | 株式会社東芝 | Detection apparatus, 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
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019186911A (en) | 2019-10-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6931369B2 (en) | Image processing device and image processing method, and imaging device | |
| CN110611761B (en) | Image pickup apparatus, focus adjustment method, and storage medium | |
| JP6812387B2 (en) | Image processing equipment and image processing methods, programs, storage media | |
| CN111107276B (en) | Information processing apparatus, control method thereof, storage medium, and imaging system | |
| JP4364078B2 (en) | Imaging method and imaging apparatus | |
| JP5676988B2 (en) | Focus adjustment device | |
| JP4998308B2 (en) | Focus adjustment device and imaging device | |
| JP6415196B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
| JP2010226709A (en) | Subject tracking device and imaging device | |
| JP2005309323A (en) | Focal length detecting method of imaging, and imaging apparatus | |
| KR101206389B1 (en) | Image processing apparatus. image processing method, and storage medium | |
| US10896350B2 (en) | Image processing apparatus, image processing method, and image capture apparatus | |
| JP2004264827A (en) | Focal length detection method and focusing device | |
| JP6818798B2 (en) | Image processing device and image processing method, and imaging device | |
| JP6463402B2 (en) | Focus adjustment apparatus and method, and imaging apparatus | |
| JP2005250401A (en) | Method for detecting focal distance and focusing device | |
| JP2023068454A (en) | Imaging device, imaging device control method, image processing device, and imaging system | |
| JP6346484B2 (en) | Image processing apparatus and control method thereof | |
| JP7286330B2 (en) | Image processing device and its control method, program, storage medium | |
| JP4301977B2 (en) | Imaging method and imaging apparatus | |
| JP7536464B2 (en) | IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM | |
| US12520031B2 (en) | Image capturing apparatus capable of selecting an object to be focused, control method thereof, and storage medium | |
| US20260046514A1 (en) | Detecting objects in images | |
| US20220272271A1 (en) | Image pickup apparatus capable of keeping focus on subject even when moving direction of subject changes in time series, control method for image pickup apparatus, and storage medium | |
| JP6799411B2 (en) | Focus detection device and method, and imaging device |
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 |