Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6931369B2 - Image processing device and image processing method, and imaging device - Google Patents
[go: Go Back, main page]

JP6931369B2 - Image processing device and image processing method, and imaging device - Google Patents

Image processing device and image processing method, and imaging device Download PDF

Info

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
Application number
JP2019023778A
Other languages
Japanese (ja)
Other versions
JP2019186911A (en
Inventor
保彦 岩本
保彦 岩本
良介 辻
良介 辻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Publication of JP2019186911A publication Critical patent/JP2019186911A/en
Application granted granted Critical
Publication of JP6931369B2 publication Critical patent/JP6931369B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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. Patent Document 1 discloses an imaging device that detects a region corresponding to a specific subject pattern such as a person's face from a captured image and optimizes the focus and exposure to the detected region.

また、深層学習と呼ばれる手法を用いて、画像中の被写体を学習、認識することが知られている(非特許文献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.

特開2005−318554号公報Japanese Unexamined Patent Publication No. 2005-318554

Alex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton, ”ImageNet classification with deep convolutional neural networks”, NIPS'12 Proceedings of the 25th International Conference on Neural Information Processing Systems - Volume 1, PP.1097-1105Alex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton, "ImageNet classification with deep convolutional neural networks", NIPS'12 Proceedings of the 25th International Conference on Neural Information Processing Systems --Volume 1, PP.1097-1105

特許文献1のように、撮影画像から検出された被写体領域に焦点を合わせる撮像装置においては、被写体検出に対する要求が、主被写体(焦点を合わせる被写体)の決定前後で異なる。主被写体の決定前では、ボケの大きさにかかわらず、検出対象の被写体を漏れなく検出できた方がよい。一方、主被写体の決定後は、ボケの大きな被写体は検出しなくてよい。 In an imaging device that focuses on a subject area detected from a captured image as in Patent Document 1, the requirements for subject detection differ before and after the determination of the main subject (the subject to be focused). Before determining the main subject, it is better to be able to detect the subject to be detected without omission regardless of the size of the blur. On the other hand, after the main subject is determined, it is not necessary to detect a subject with a large blur.

しかしながら、従来、機械学習を利用した被写体検出において、主被写体の決定前に適した被写体検出と、主被写体の決定後に適した被写体検出とを実現させるための手法は提案されていなかった。換言すれば、主被写体のボケ量(もしくは鮮明度)に適した被写体検出を行うための手法は提案されていなかった。主被写体のボケ量や鮮明度は、合焦度合いに限らず、被写体ブレや手ぶれの程度や、画像ノイズの大きさなどによっても変化する。 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.

第1実施形態に係る画像処理装置の一例としてのデジタル一眼レフカメラの模式的な垂直断面図。The schematic vertical sectional view of the digital single-lens reflex camera as an example of the image processing apparatus which concerns on 1st Embodiment. 第1実施形態に係るデジタル一眼レフカメラの機能構成例を示すブロック図。The block diagram which shows the functional structure example of the digital single-lens reflex camera which concerns on 1st Embodiment. 第1実施形態に係る撮影動作の概要に関するフローチャート。The flowchart regarding the outline of the shooting operation which concerns on 1st Embodiment. 第1実施形態に係る被写体検出処理に関するフローチャート。The flowchart regarding the subject detection process which concerns on 1st Embodiment. 第1実施形態に係る被写体検出部が用いるCNNの構成例を示す模式図。The schematic diagram which shows the structural example of the CNN used by the subject detection part which concerns on 1st Embodiment. 図5のCNNの一部の構成の示す模式図。The schematic diagram which shows the structure of a part of CNN of FIG. 第2〜第4実施形態に係るデジタル一眼レフカメラの機能構成例を示すブロック図。The block diagram which shows the functional structure example of the digital single-lens reflex camera which concerns on 2nd to 4th Embodiment. 第2実施形態に係る動きベクトル算出処理の一例を示す模式図。The schematic diagram which shows an example of the motion vector calculation process which concerns on 2nd Embodiment. 第2実施形態に係る被写体検出処理に関するフローチャート。The flowchart regarding the subject detection process which concerns on 2nd Embodiment. 第3実施形態に係る被写体検出処理に関するフローチャート。The flowchart regarding the subject detection process which concerns on 3rd Embodiment. 第4実施形態に係る被写体検出処理に関するフローチャート。The flowchart regarding the subject detection process which concerns on 4th Embodiment.

以下、添付図面を参照して、本発明の例示的な実施形態について詳細に説明する。なお、以下の実施形態は特許請求の範囲に係る発明を限定しない。また、実施形態には複数の特徴が記載されているが、その全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 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 main body 101 and a photographing lens 102 (interchangeable lens) that can be attached to and detached from the main body 101. A mount contact group 115 is provided on each of the attachment / detachment portion (mount) of the main body 101 and the photographing lens 102. When the photographing lens 102 is attached to the main body 101, the mount contact group 115 comes into contact with each other, and an electrical connection between the photographing lens 102 and the main body 101 is established.

システム制御部201は、1つ以上のプログラマブルプロセッサと、ROM2011、RAM2012を有し、ROM2011に記憶されているプログラムをRAM2012に読み込んで実行することにより、本体101および撮影レンズ102の動作を制御する。ROM2011には、システム制御部201が実行するプログラムのほか、各種の設定値、GUIデータなどが記憶されている。 The system control unit 201 has one or more programmable processors, a ROM 2011, and a RAM 2012, and controls the operations of the main body 101 and the photographing lens 102 by reading the program stored in the ROM 2011 into the RAM 2012 and executing the program. In addition to the program executed by the system control unit 201, various setting values, GUI data, and the like are stored in the ROM 2011.

撮影レンズ102には合焦距離を調節するフォーカスレンズ113と、本体101に入射する光量を調整する絞り114(およびこれらを駆動するモータやアクチュエータなど)が設けられる。フォーカスレンズ113や絞り114の駆動は、マウント接点群115を通じてカメラ本体101が制御する。 The photographing lens 102 is provided with a focus lens 113 for adjusting the focusing distance and a diaphragm 114 (and a motor or an actuator for driving them) for adjusting the amount of light incident on the main body 101. The drive of the focus lens 113 and the aperture 114 is controlled by the camera body 101 through the mount contact group 115.

メインミラー103およびサブミラー104は、クイックリターンミラーを構成する。メインミラー103の一部は、撮影レンズ102から入射する光束をファインダー光学系(図の上方)に向かう光束と、サブミラー104に向かう光束に分離するために反射率(透過率)が制御されている。 The main mirror 103 and the sub mirror 104 form a quick return mirror. The reflectance (transmittance) of a part of the main mirror 103 is controlled in order to separate the luminous flux incident from the photographing lens 102 into the luminous flux toward the finder optical system (upper part of the figure) and the luminous flux toward the sub mirror 104. ..

図1は光学ファインダー使用時(非撮影時)の状態を示しており、メインミラー103が撮影レンズ102から入射する光束の光路中に位置している。この状態では、メインミラー103の反射光がファインダー光学系に入射し、ペンタプリズム107によって屈曲された光束はアイピース109から出射する。したがって、ユーザはアイピース109を覗くことにより、光学被写体像を見ることができる。 FIG. 1 shows a state when the optical viewfinder is used (when not photographed), and the main mirror 103 is located in the optical path of the luminous flux incident from the photographing lens 102. In this state, the reflected light of the main mirror 103 is incident on the finder optical system, and the luminous flux bent by the pentaprism 107 is emitted from the eyepiece 109. Therefore, the user can see the optical subject image by looking into the eyepiece 109.

また、メインミラー103の透過光はサブミラー104で反射されてAFセンサ105に入射する。AFセンサ105は、撮影レンズ102の二次結像面をラインセンサー上に形成し、位相差検出方式による焦点検出に利用可能な1対の像信号(焦点検出用信号)を生成する。生成された焦点検出用信号はシステム制御部201へ送信される。システム制御部201は、焦点検出用信号を用いてフォーカスレンズ113のデフォーカス量を求め、デフォーカス量に基づいてフォーカスレンズ113の駆動方向および駆動量を制御する。 Further, the transmitted light of the main mirror 103 is reflected by the sub mirror 104 and is incident on the AF sensor 105. The AF sensor 105 forms a secondary image plane of the photographing lens 102 on the line sensor, and generates a pair of image signals (focus detection signals) that can be used for focus detection by the phase difference detection method. The generated focus detection signal is transmitted to the system control unit 201. The system control unit 201 obtains the defocus amount of the focus lens 113 using the focus detection signal, and controls the drive direction and the drive amount of the focus lens 113 based on the defocus amount.

ピント板106は、ファインダー光学系内の撮影レンズ102の予定結像面に配置される。アイピース109を覗いたユーザは、ピント板106に形成された光学像を観察する。なお、光学像のほか、シャッタースピード、絞り値などの撮影情報も併せて提供することができる。 The focus plate 106 is arranged on the planned image plane of the photographing lens 102 in the finder optical system. The user looking into the eyepiece 109 observes the optical image formed on the focus plate 106. In addition to the optical image, shooting information such as shutter speed and aperture value can also be provided.

測光センサー108は、入射する光束から像信号(露出制御用信号)を生成し、システム制御部201へ送信する。システム制御部201は、受信した露出制御用信号を用いて自動露出制御を行ったり、後述する被写体検出部204による被写体検出を制御したりする。測光センサー108は、光電変換部を備える画素が2次元状に配置された撮像素子である。被写体検出部204は、測光センサー108が出力する像信号に対して被写体検出処理を適用するものとするが、撮像素子111が出力する像信号に対して被写体検出処理を適用してもよい。 The photometric sensor 108 generates an image signal (exposure control signal) from the incident luminous flux and transmits it to the system control unit 201. The system control unit 201 performs automatic exposure control using the received exposure control signal, and controls subject detection by the subject detection unit 204, which will be described later. The photometric sensor 108 is an image sensor in which pixels including a photoelectric conversion unit are arranged two-dimensionally. The subject detection unit 204 applies the subject detection process to the image signal output by the photometric sensor 108, but the subject detection process may be applied to the image signal output by the image sensor 111.

撮像素子111の露光時、メインミラー103およびサブミラー104は、撮影レンズ102から入射する光束の光路の外に移動する。また、フォーカルプレーンシャッター110(以下、単にシャッターという)が開く。 When the image sensor 111 is exposed, the main mirror 103 and the sub mirror 104 move out of the optical path of the luminous flux incident from the photographing lens 102. Further, the focal plane shutter 110 (hereinafter, simply referred to as a shutter) opens.

撮像素子111には、光電変換部を備える画素が2次元状に配置されており、撮影レンズ102が形成する被写体光学像を各画素で光電変換し、画像信号をシステム制御部201に送信する。システム制御部201は、受信した画像信号から画像データを生成して画像記憶部202へ保存するとともに、LCD等の表示部112に表示する。また、撮像素子111で生成された画像データは、被写体検出のために被写体検出部204にも供給されてもよい。なお、システム制御部201は、画像データを用い、コントラスト方式による焦点検出を行ってもよい。なお、システム制御部201は、画像データを用い、コントラスト方式による焦点検出を行ってもよい。 Pixels including a photoelectric conversion unit are arranged two-dimensionally in the image pickup device 111, and the subject optical image formed by the photographing lens 102 is photoelectrically converted by each pixel, and the image signal is transmitted to the system control unit 201. The system control unit 201 generates image data from the received image signal, stores it in the image storage unit 202, and displays it on a display unit 112 such as an LCD. Further, the image data generated by the image sensor 111 may be supplied to the subject detection unit 204 for subject detection. The system control unit 201 may perform focus detection by a contrast method using image data. The system control unit 201 may perform focus detection by a contrast method using image data.

操作部203は、本体101および撮影レンズ102が備え、ユーザが操作可能な入力デバイス群の総称である。レリーズボタン、電源スイッチ、方向キー、決定ボタン、メニューボタン、動作モードの選択ダイヤルなどが操作部203に含まれる入力デバイスの具体例であるが、これらに限定されない。操作部203の操作は、システム制御部201が検知する。レリーズボタンは半押し操作でオンするスイッチSW1と、全押し操作でオンするスイッチSW2とを有する。 The operation unit 203 is a general term for a group of input devices provided with the main body 101 and the photographing lens 102 and which can be operated by the user. Specific examples of the input device included in the operation unit 203 include, but are not limited to, a release button, a power switch, a direction key, an enter button, a menu button, an operation mode selection dial, and the like. The operation of the operation unit 203 is detected by the system control unit 201. The release button has a switch SW1 that is turned on by a half-press operation and a switch SW2 that is turned on by a full-press operation.

例えば、レリーズボタンの半押し操作(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 system control unit 201 starts the still image shooting preparation operation. The shooting preparation operation is, for example, an operation related to automatic focus detection (AF) and automatic exposure control (AE). Further, when the full press operation of the release button (SW2 is turned on) is detected, the system control unit 201 executes a still image shooting and recording operation. The system control unit 201 displays the image obtained by shooting on the display unit 112 for a certain period of time.

また、動画撮影時(撮影スタンバイ状態や動画記録中)、システム制御部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 system control unit 201 displays the moving image obtained by shooting on the display unit 112 in real time, so that the display unit 112 is displayed in the electronic viewfinder (EVF). To function as. A moving image and a frame image thereof displayed when the display unit 112 functions as an EVF are referred to as a live view image or a through image. Whether to shoot a still image or a moving image can be selected through the operation unit 203, and the system control unit 201 switches the control method of the camera body 101 and the shooting lens 102 between the time of shooting a still image and the time of shooting a moving image.

被写体検出部204は、GPU(Graphic Processing Unit)で構成される。GPUは、元々は画像処理用のプロセッサであるが、複数の積和演算器を有し、行列計算を得意としているため、学習用の処理を行うプロセッサとしても用いられることが多い。そして、深層学習を行う処理においても、GPUが用いられることが一般的である。例えば、被写体検出部204として、NVIDIA社のJetson TX2 moduleを用いることができる。なお、被写体検出部204として、FPGA(Field-Programmable Gate Array)やASIC(Application Specific Integrated Circuit)などを用いてもよい。 The subject detection unit 204 is composed of a GPU (Graphic Processing Unit). The GPU is originally a processor for image processing, but since it has a plurality of product-sum arithmetic units and is good at matrix calculation, it is often used as a processor for performing learning processing. The GPU is also generally used in the process of performing deep learning. For example, as the subject detection unit 204, NVIDIA's Jetson TX2 model can be used. An FPGA (Field-Programmable Gate Array), an ASIC (Application Specific Integrated Circuit), or the like may be used as the subject detection unit 204.

被写体検出部204は、学習モデル記憶部205が複数記憶する学習モデルのうち、システム制御部201が選択した1つの学習モデルを用いて、供給される画像データに対して被写体検出処理を適用する。被写体検出処理の詳細については後述する。学習モデル記憶部205は例えば書き換え可能な不揮発性メモリであってよく、ROM2011の一部であってもよい。本実施形態において学習モデル記憶部は、被写体検出に求められる特性に応じた検出学習モデル206,207を記憶する。システム制御部201は、被写体検出部204が検出した被写体の領域から主被写体の領域を決定し、主被写体の領域に焦点や露出を最適化させる。具体的には、主被写体の領域が適正露出となるように露出条件を決定したり、主被写体の領域が合焦するように焦点調節したりすることができるが、これらに限定されない。 The subject detection unit 204 applies the subject detection process to the supplied image data by using one learning model selected by the system control unit 201 from the learning models stored in the learning model storage unit 205. The details of the subject detection process will be described later. The learning model storage unit 205 may be, for example, a rewritable non-volatile memory and may be a part of the ROM 2011. In the present embodiment, the learning model storage unit stores the detection learning models 206 and 207 according to the characteristics required for subject detection. The system control unit 201 determines the region of the main subject from the region of the subject detected by the subject detection unit 204, and optimizes the focus and exposure to the region of the main subject. Specifically, the exposure conditions can be determined so that the area of the main subject becomes an appropriate exposure, and the focus can be adjusted so that the area of the main subject is in focus, but the present invention is not limited to these.

(被写体検出における辞書切り替え)
本実施形態の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 subject detection unit 204 for determining the exposure condition and detecting the focus. More specifically, the system control unit 201 determines the main subject from the subjects detected by the subject detection unit 204, and uses the region of the main subject for determining the exposure condition and detecting the focus. Therefore, the characteristics required for subject detection differ before and after the determination of the main subject. The main subject may be determined by the system control unit 201 according to predetermined conditions (for example, the position and size of the subject area), or may be determined according to the user's selection.

主被写体の決定前に撮影される画像は、例えば画面中央が合焦するように焦点調節された画像であり、ユーザが主被写体としたい被写体には合焦していない場合がある。そのため、主被写体の決定前に実施する被写体検出では、ボケ量が大きくても検出対象の被写体が検出できることが要求される。換言すれば、誤検出の抑制よりも検出漏れの抑制を優先した被写体検出が要求される。 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 subject detection unit 204 of the present embodiment applies subject detection using processing parameters based on a learning model generated in advance through machine learning to an image. In the present embodiment, the learning model storage unit 205 stores the detection learning model 206 for subject detection before the main subject is determined and the detection learning model 207 for subject detection after the main subject is determined. The detection learning model 206 for subject detection before determining the main subject is generated by machine learning using an image of a large subject from a subject having a small amount of blur. Further, the detection learning model 207 for subject detection after determining the main subject is generated by machine learning that emphasizes a subject image having a small amount of blur.

そして、システム制御部201は、主被写体の決定前後で、被写体検出部204が用いる学習モデルを切り替えることにより、被写体検出部204における被写体検出の特性を切り替える。システム制御部201は、主被写体の決定前には主被写体決定前の被写体検出用の検出学習モデル206を、主被写体の決定後には主被写体決定後の被写体検出用の検出学習モデル207を用いるように切り替える。 Then, the system control unit 201 switches the subject detection characteristics of the subject detection unit 204 by switching the learning model used by the subject detection unit 204 before and after the determination of the main subject. The system control unit 201 uses the detection learning model 206 for subject detection before the main subject is determined before the main subject is determined, and uses the detection learning model 207 for subject detection after the main subject is determined after the main subject is determined. Switch to.

(撮像動作)
次に、図3および図4を参照して、本実施形態のDSLR100の撮影動作について説明する。
図3は撮影動作の概要に関するフローチャートであり、各ステップの処理はシステム制御部201のプログラマブルプロセッサがROM2011からRAM2012に読み込まれたプログラムを実行することによって実現される。ここでは、本体101の電源がONであり、撮影スタンバイ状態であるものとする。撮影スタンバイ状態でシステム制御部201は、例えば動画撮影を行い、得られた動画を表示部112に表示させることでEVFとして機能させるなど、予め定められた動作を実行している。
(Imaging operation)
Next, the photographing operation of the DSLR 100 of the present embodiment will be described with reference to FIGS. 3 and 4.
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 ROM 2011 into the RAM 2012 by the programmable processor of the system control unit 201. Here, it is assumed that the power supply of the main body 101 is ON and the shooting standby state is set. In the shooting standby state, the system control unit 201 executes a predetermined operation such as shooting a moving image and displaying the obtained moving image on the display unit 112 to function as an EVF.

S301でシステム制御部201は、レリーズボタンが有するスイッチSW1およびSW2の状態を検出し、スイッチSW1とSW2のいずれかがオンであれば処理をS302に進める。一方、スイッチSW1とSW2のいずれもオフであれば、システム制御部201はS301を繰り返し実行する。 In S301, the system control unit 201 detects the states of the switches SW1 and SW2 of the release button, and if any of the switches SW1 and SW2 is on, the process proceeds to S302. On the other hand, if both the switches SW1 and SW2 are off, the system control unit 201 repeatedly executes S301.

S302でシステム制御部201は、測光センサー108の露光処理(電荷蓄積)を行う。測光センサー108の露光処理は所謂電子シャッターによって所定時間電荷蓄積を行うことによって実現される。システム制御部201は、測光センサー108の動作を制御して、所定時間電荷蓄積を行い、測光センサー108から画像信号(露出制御用信号)を読み出す。また、システム制御部201は、AFセンサー105についても露光処理(電荷蓄積)を行い、画像信号(焦点検出用信号)を読み出す。 In S302, the system control unit 201 performs an exposure process (charge accumulation) of the photometric sensor 108. The exposure process of the photometric sensor 108 is realized by accumulating charges for a predetermined time with a so-called electronic shutter. The system control unit 201 controls the operation of the photometric sensor 108, accumulates electric charges for a predetermined time, and reads out an image signal (exposure control signal) from the photometric sensor 108. Further, the system control unit 201 also performs an exposure process (charge accumulation) on the AF sensor 105 and reads out an image signal (focus detection signal).

S303でシステム制御部201は、露出制御用信号を被写体検出部204に供給し、被写体検出結果を被写体検出部204から取得する。また、システム制御部201は、被写体検出結果に基づいて主被写体を決定する。主被写体は任意の方法で決定することができ、システム制御部201が自動的に決定してもよいし、検出された被写体の領域をユーザに示し、ユーザが選択した領域の被写体を主被写体と決定してもよい。システム制御部201が自動的に主被写体を決定する場合、例えば被写体の領域の位置や大きさに基づいて決定することができる。例えば、画像の中心に一番近い被写体や、領域が一番大きい被写体を主被写体に決定することができる。なお、被写体検出の信頼度や過去の検出結果など、他の条件を考慮したり、複数の条件を組み合わせて考慮したりして主被写体を決定することもできる。被写体検出処理の詳細については図4を用いて後述する。 In S303, the system control unit 201 supplies the exposure control signal to the subject detection unit 204, and acquires the subject detection result from the subject detection unit 204. Further, the system control unit 201 determines the main subject based on the subject detection result. The main subject can be determined by any method, the system control unit 201 may automatically determine the subject, the detected area of the subject is shown to the user, and the subject in the area selected by the user is set as the main subject. You may decide. When the system control unit 201 automatically determines the main subject, it can be determined based on, for example, the position and size of the area of the subject. For example, the subject closest to the center of the image or the subject having the largest area can be determined as the main subject. It should be noted that the main subject can be determined by considering other conditions such as the reliability of subject detection and past detection results, or by considering a combination of a plurality of conditions. The details of the subject detection process will be described later with reference to FIG.

S304でシステム制御部201は、選択可能な焦点検出領域のうち、S303で決定した主被写体の位置に最も近い焦点検出領域を選択する。そして、S302で読み出した焦点検出用信号のうち、選択した焦点検出領域に関する焦点検出用信号から、選択した焦点検出領域の焦点状態(デフォーカス量および方向)を検出する。 In S304, the system control unit 201 selects the focus detection area closest to the position of the main subject determined in S303 from the selectable focus detection areas. Then, among the focus detection signals read in S302, the focus state (defocus amount and direction) of the selected focus detection region is detected from the focus detection signal relating to the selected focus detection region.

なお、S303で被写体が検出されなかった場合、システム制御部201は、選択可能な全ての焦点検出領域についての焦点状態(デフォーカス量および方向)を、焦点検出用信号に基づいて求める。そして、最も近い距離に被写体が存在する焦点検出領域を選択する。 When the subject is not detected in S303, the system control unit 201 obtains the focus state (defocus amount and direction) for all the selectable focus detection regions based on the focus detection signal. Then, the focus detection area where the subject exists at the closest distance is selected.

S305でシステム制御部201は、S304で選択した焦点検出領域の焦点状態に基づいてフォーカスレンズ113の位置を制御することにより、撮影レンズ102の合焦距離を調節する。 In S305, the system control unit 201 adjusts the focusing distance of the photographing lens 102 by controlling the position of the focus lens 113 based on the focal state of the focus detection region selected in S304.

S306でシステム制御部201は、S302で読み出した露出制御用信号を用いて撮影条件(絞り値(AV値)、シャッタスピード(TV値)、ISO感度(ISO値))を決定する。撮影条件の決定方法に特に制限は無いが、ここでは、露出制御用信号に基づいて得られる輝度(Bv値)に対応する撮影条件を、予め記憶されたプログラム線図を参照して決定するものとする。なお、被写体検出処理によって検出された被写体領域の輝度を用いて撮影条件を決定するようにしてもよい。 In S306, the system control unit 201 determines the shooting conditions (aperture value (AV value), shutter speed (TV value), ISO sensitivity (ISO value)) using the exposure control signal read in S302. There is no particular limitation on the method of determining the shooting conditions, but here, the shooting conditions corresponding to the brightness (Bv value) obtained based on the exposure control signal are determined with reference to a pre-stored program diagram. And. The shooting conditions may be determined using the brightness of the subject area detected by the subject detection process.

S307でシステム制御部201は、スイッチSW2の状態を検出し、スイッチSW2がオンであれば処理をS308へ進め、スイッチSW2がオフであれば処理をS301に戻す。 In S307, the system control unit 201 detects the state of the switch SW2, advances the process to S308 if the switch SW2 is on, and returns the process to S301 if the switch SW2 is off.

S308でシステム制御部201は、静止画の撮影処理を実行する。システム制御部201は、撮影レンズ102からの光束と交差しない位置にメインミラー103およびサブミラー104を移動させるとともに、S306で決定したシャッタースピードに従ってシャッター110を駆動する。これにより、撮影レンズ102が形成する光学像によって撮像素子111が露光される。撮像素子111は各画素が露光期間に蓄積した電荷を電圧に変換した画像信号を生成する。システム制御部201は撮像素子から画像信号を読み出し、A/D変換、ノイズ低減、ホワイトバランス調整、色補間など、予め定められた画像処理を適用することにより画像データを生成する。システム制御部201は、生成した画像データを画像データファイルとして画像記憶部202に保存したり、画像データに基づく表示用画像信号を生成して表示部112に表示したりする。その後、システム制御部201は処理をS301に戻す。 In S308, the system control unit 201 executes a still image shooting process. The system control unit 201 moves the main mirror 103 and the sub mirror 104 to positions that do not intersect the light flux from the photographing lens 102, and drives the shutter 110 according to the shutter speed determined in S306. As a result, the image sensor 111 is exposed by the optical image formed by the photographing lens 102. The image sensor 111 generates an image signal in which the electric charge accumulated in each pixel during the exposure period is converted into a voltage. The system control unit 201 reads an image signal from the image sensor and generates image data by applying predetermined image processing such as A / D conversion, noise reduction, white balance adjustment, and color interpolation. The system control unit 201 saves the generated image data as an image data file in the image storage unit 202, or generates a display image signal based on the image data and displays it on the display unit 112. After that, the system control unit 201 returns the process to S301.

(被写体検出の処理の流れ)
次に、図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 system control unit 201 determines whether or not the main subject has been determined, and if it is determined that the main subject has been determined, the process proceeds to S402, and if it is determined to be determined, the process proceeds to S403.

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 model storage unit 205, and performs subject detection processing. It is set in the subject detection unit 204 as a parameter. The detection learning model 206 for detecting a subject before determining the main subject is a learning model for detecting a subject corresponding to a wide amount of blur, and has a wide amount of blur from a small amount of blur to a large amount of blur for the subject to be detected. This is a learning model obtained by machine learning using images. By using the detection learning model 206, it is possible to realize subject detection capable of detecting the subject to be detected even if the amount of blur is large.

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 model storage unit 205, and performs subject detection processing. It is set in the subject detection unit 204 as a parameter. The detection learning model 207 for detecting a subject after determining the main subject is a learning model for detecting a subject having a small amount of blur, and is obtained by machine learning for the subject to be detected by emphasizing an image with a small amount of blur. This is the obtained learning model. By using the detection learning model 207, it is possible to realize subject detection capable of accurately detecting a subject to be detected with a small amount of blur.

また、S402およびS403でシステム制御部201は、S302で読み出した露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS404に進める。 Further, the system control unit 201 in S402 and S403 supplies the image data generated by performing A / D conversion, noise reduction processing, or the like on the exposure control signal read in S302 to the subject detection unit 204. Then, the system control unit 201 advances the process to S404.

S404で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS402またはS403において設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報には、被写体が検出されたか否か(検出数)や、検出した被写体領域に関する情報(例えば位置や大きさ)が含まれてよい。被写体検出部204は、被写体検出にCNNを用いる。CNNの詳細については後述する。 In S404, the subject detection unit 204 applies the subject detection process to the image data based on the exposure control signal by using the detection learning model set in S402 or S403 from the system control unit 201. The subject detection unit 204 supplies information representing the detection result to the system control unit 201. The information representing the detection result may include whether or not the subject has been detected (number of detections) and information regarding the detected subject area (for example, position and size). The subject detection unit 204 uses CNN for subject detection. Details of CNN will be described later.

S405でシステム制御部201は、被写体検出の結果、被写体が1つ以上検出されていれば、検出された被写体から主被写体を決定する。主被写体の決定方法については先に述べたとおりである。 In S405, if one or more subjects are detected as a result of subject detection, the system control unit 201 determines the main subject from the detected subjects. The method of determining the main subject is as described above.

ここでは、主被写体の決定後は、ボケ量の小さい被写体の画像を重視した機械学習で得られた検出学習モデル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 subject detection unit 204 will be described. In the present embodiment, the subject detection unit 204 is composed of a neocognitron which is a kind of CNN (convolutional neural network). The basic configuration of the subject detection unit 204 will be described with reference to FIGS. 5 and 6. FIG. 5 shows a basic configuration of a CNN that detects a subject from the two-dimensional image data input in FIG. In the processing flow, the left end is used as an input, and the processing proceeds to the right. The CNN has two layers called a feature detection layer (S layer) and a feature integration layer (C layer) as one set, which are hierarchically configured. The S layer corresponds to the convolution layer described in the prior art, and the C layer corresponds to the pooling layer or the subsampling layer.

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番目の細胞面内において、位置(ξ, ζ)の特徴検出ニューロンの出力値を

Figure 0006931369
と表記する。また、L階層目のC層のM番目の細胞面内において、位置(ξ, ζ)の特徴統合ニューロンの出力値を
Figure 0006931369
と表記する。その時、それぞれのニューロンの結合係数を
Figure 0006931369
とすると、各出力値は以下のように表すことができる。 The output value of the feature detection neuron at the position (ξ, ζ) in the M-th cell plane of the S-layer of the L-layer shown in FIG.
Figure 0006931369
Notated as. In addition, the output value of the feature-integrated neuron at the position (ξ, ζ) in the Mth cell plane of the C layer of the L layer is calculated.
Figure 0006931369
Notated as. At that time, the connection coefficient of each neuron
Figure 0006931369
Then, each output value can be expressed as follows.

[数式1]

Figure 0006931369
[数式2]
Figure 0006931369
ここで、数式1におけるfは活性化関数であり、例えばロジスティック関数や双曲正接関数などのシグモイド関数である。また、
Figure 0006931369
は、L階層目のS層のM番目の細胞面における、位置(ξ, ζ)の特徴検出ニューロンの内部状態を表す。数式2は活性化関数を用いておらず、単純な線形和で表されている。 [Formula 1]
Figure 0006931369
[Formula 2]
Figure 0006931369
Here, f in Equation 1 is an activation function, for example, a sigmoid function such as a logistic function or a hyperbolic tangent function. again,
Figure 0006931369
Represents the internal state of the feature detection neuron at the position (ξ, ζ) on the Mth cell surface of the S layer of the L layer. Equation 2 does not use the activation function and is expressed by a simple linear sum.

数式2のように活性化関数を用いない場合、ニューロンの内部状態

Figure 0006931369
と出力値
Figure 0006931369
とは等しい。また、数式1の
Figure 0006931369
を特徴検出ニューロンの結合先出力値と呼び、数式2の
Figure 0006931369
を特徴統合ニューロンの結合先出力値と呼ぶ。 When the activation function is not used as in Equation 2, the internal state of the neuron
Figure 0006931369
And output value
Figure 0006931369
Is equal to. Also, in formula 1,
Figure 0006931369
Is called the connection destination output value of the feature detection neuron, and is described in Equation 2.
Figure 0006931369
Is called the connection destination output value of the feature integrated neuron.

ここで、数式1及び数式2におけるξ,ζ,u,v,nについて説明する。位置(ξ, ζ)は入力画像における位置座標に対応しており、例えば出力値

Figure 0006931369
が大きい場合、入力画像の画素位置(ξ, ζ)に、L階層目のS層のM番目の細胞面が検出する特徴が存在する可能性が高いことを意味する。またnは数式1において、L−1階層目のC層のn番目の細胞面を意味しており、統合先特徴番号と呼ぶ。基本的にL−1階層目のC層に存在する全ての細胞面について積和演算を行う。(u, v)は、結合係数の相対位置座標であり、検出する特徴のサイズに応じて有限の範囲(u, v)において積和演算を行う。このような有限な(u, v)の範囲を受容野と呼ぶ。また受容野の大きさを、以下では受容野サイズと呼び、結合している範囲の横画素数×縦画素数で表す。 Here, ξ, ζ, u, v, and n in Equation 1 and Equation 2 will be described. The position (ξ, ζ) corresponds to the position coordinates in the input image, for example, the output value.
Figure 0006931369
When is large, it means that there is a high possibility that the pixel position (ξ, ζ) of the input image has a feature detected by the M-th cell surface of the S layer of the L layer. Further, n means the nth cell surface of the C layer of the L-1 layer in the mathematical formula 1, and is called an integration destination feature number. Basically, the product-sum calculation is performed on all the cell surfaces existing in the C layer of the L-1 layer. (U, v) is the relative position coordinates of the coupling coefficient, and the product-sum operation is performed in a finite range (u, v) according to the size of the feature to be detected. Such a finite (u, v) range is called a receptive field. The size of the receptive field is hereinafter referred to as the receptive field size, and is expressed by the number of horizontal pixels x the number of vertical pixels in the combined range.

また数式1において、L=1つまり最初の階層のS層では、数式1中の

Figure 0006931369
は、入力画像
Figure 0006931369
である。ちなみにニューロンや画素の分布は離散的であり、結合先特徴番号も離散的なので、ξ,ζ,u,v,nは離散的な値をとる。ここでは、ξ,ζは非負整数、nは自然数、u,vは整数とし、何れも有限な範囲を有する。 Further, in the formula 1, L = 1, that is, in the S layer of the first layer, the formula 1 is used.
Figure 0006931369
Is the input image
Figure 0006931369
Is. By the way, since the distribution of neurons and pixels is discrete and the connection destination feature numbers are also discrete, ξ, ζ, u, v, and n take discrete values. Here, ξ and ζ are non-negative integers, n is a natural number, and u and v are integers, all of which have a finite range.

数式1中の

Figure 0006931369
は、所定の特徴を検出するための結合係数であり、結合係数を適切な値に調整することによって、所定の特徴を検出可能になる。この結合係数の調整が学習であり、CNNの構築においては、さまざまなテストパターンを用いて、
Figure 0006931369
が適切な出力値になるように、結合係数を繰り返し徐々に修正していくことで結合係数を調整する。 In formula 1
Figure 0006931369
Is a coupling coefficient for detecting a predetermined feature, and by adjusting the coupling coefficient to an appropriate value, the predetermined feature can be detected. This adjustment of the coupling coefficient is learning, and in the construction of CNN, various test patterns are used.
Figure 0006931369
Adjust the coupling coefficient by repeating and gradually modifying the coupling coefficient so that is an appropriate output value.

次に、数式2中の

Figure 0006931369
は、2次元のガウシアン関数を用いており、以下の数式3のように表すことができる。
[数式3]
Figure 0006931369
ここでも、(u,v)は有限の範囲を有し、特徴検出ニューロンの場合と同様、範囲を受容野、範囲の大きさを受容野サイズと呼ぶ。ここではL階層目のS層のM番目の特徴のサイズに従って、受容野サイズの値を適宜設定することができる。数式3中のσは特徴サイズ因子であり、受容野サイズに応じて適宜定めることができる定数であってよい。例えば、受容野の一番外側の値がほぼ0とみなせるような値になるように特徴サイズ因子σを設定することができる。このように、本実施形態の被写体検出部204は、上述した演算を各階層で行い、最終階層(n階層目)のS層において被写体検出を行うCNNによって構成される。 Next, in formula 2
Figure 0006931369
Uses a two-dimensional Gaussian function and can be expressed as in the following mathematical formula 3.
[Formula 3]
Figure 0006931369
Here, too, (u, v) has a finite range, and the range is called the receptive field and the size of the range is called the receptive field size, as in the case of the feature detection neuron. Here, the value of the receptive field size can be appropriately set according to the size of the Mth feature of the S layer of the L layer. Σ in Equation 3 is a feature size factor and may be a constant that can be appropriately determined according to the receptive field size. For example, the feature size factor σ can be set so that the outermost value of the receptive field is a value that can be regarded as almost 0. As described above, the subject detection unit 204 of the present embodiment is configured by the CNN that performs the above-mentioned calculation in each layer and detects the subject in the S layer of the final layer (nth layer).

(被写体検出の学習方法)
結合係数

Figure 0006931369
の具体的な調整(学習)方法について説明する。被写体検出部204に直接的に学習を行わせても良いし、被写体検出部204と等価なCNNの機能を有するクラウドや外部のエッジコンピュータ上において学習を行わせるようにしてもよい。クラウドやエッジコンピュータ上で学習を行った場合には、DSLR100が生成された学習モデルを無線通信、有線通信、あるいは、着脱可能な記憶メディアを介して取得し、学習モデル記憶部205に記憶させるようにすればよい。学習は、CNNに特定の入力画像(テストパターン)を与えて得られるニューロンの出力値と、教師信号(そのニューロンが出力すべき出力値)との関係に基づいて、結合係数
Figure 0006931369
を修正することである。本実施形態の学習では、最終階層(n階層目)の特徴検出層Sについては最小二乗法を用いて結合係数を修正する。また、他の階層(1〜n−1階層目)の特徴検出層Sについては、誤差逆伝搬法を用いて結合係数を修正する。最小二乗法や誤差逆伝搬法を用いた結合係数の修正手法は例えば非特許文献1に記載されるような公知技術を用いることができるため、詳細についての説明は省略する。 (Learning method for subject detection)
Coupling coefficient
Figure 0006931369
The specific adjustment (learning) method of is explained. The subject detection unit 204 may be made to perform learning directly, or may be made to perform learning on a cloud or an external edge computer having a CNN function equivalent to that of the subject detection unit 204. When learning is performed on the cloud or an edge computer, the learning model generated by the DSLR 100 is acquired via wireless communication, wired communication, or a detachable storage medium, and stored in the learning model storage unit 205. It should be. Learning is based on the relationship between the output value of a neuron obtained by giving a specific input image (test pattern) to the CNN and the teacher signal (the output value that the neuron should output), and the coupling coefficient.
Figure 0006931369
Is to fix. In the learning of the present embodiment, the coupling coefficient is corrected by using the least squares method for the feature detection layer S of the final layer (nth layer). Further, for the feature detection layer S of the other layers (1st to n-1th layers), the coupling coefficient is corrected by using the error back propagation method. As a method for correcting the coupling coefficient using the least squares method or the error back propagation method, for example, a known technique as described in Non-Patent Document 1 can be used, and therefore detailed description thereof will be omitted.

検出すべきパターンと、検出すべきでないパターンとを、学習用のテストパターンとして多数用意する。各テストパターンは、画像データと、対応する教師信号とを有する。検出すべきパターンに該当する画像データについては、最終階層の特徴検出細胞面において、検出対象のパターンが存在する領域に対応するニューロンの出力が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 DSLR 100 according to the present embodiment, and the same reference numbers as those in FIG. 2 are added to the same configuration as that of the first embodiment. However, the photometric sensor 108 is different from the first embodiment in that when the image signal is generated, a gain is applied to the image signal so that the brightness value of the image signal is included in a predetermined range. The magnitude of the gain applied by the photometric sensor 108 to the image signal is notified from the photometric sensor 108 to the system control unit 201. Further, the learning model storage unit 205 is different from the first embodiment in the type of the detection learning model that is stored.

位置姿勢変化取得部701は、例えばジャイロ、加速度センサ、電子コンパス等の位置姿勢センサを有し、DSLR100の位置姿勢変化を表す信号を出力する。システム制御部201は、位置姿勢変化取得部701が出力した信号をRAM2012に格納する。 The position / attitude change acquisition unit 701 has a position / attitude sensor such as a gyro, an acceleration sensor, and an electronic compass, and outputs a signal indicating the position / attitude change of the DSLR 100. The system control unit 201 stores the signal output by the position / attitude change acquisition unit 701 in the RAM 2012.

動きベクトル検出部702は、2フレーム分の画像データを用いて動きベクトルを検出する。検出した動きベクトルの情報はシステム制御部201に出力する。システム制御部201は、動きベクトルの情報をRAM2012に格納する。ベクトル検出処理の詳細については後述する。その他の各部については第1実施形態と同様のため、説明を省略する。 The motion vector detection unit 702 detects the motion vector using the image data for two frames. The detected motion vector information is output to the system control unit 201. The system control unit 201 stores the motion vector information in the RAM 2012. The details of the vector detection process will be described later. Since the other parts are the same as those in the first embodiment, the description thereof will be omitted.

(動きベクトル算出処理の詳細)
動きベクトル検出部702における、動きベクトル算出処理の詳細について説明する。図8は、動きベクトル検出部702に供給される2フレーム分の画像を模式的に示した図である。ここで、2フレーム分の画像は、同じ視点から異なるタイミングで撮影された画像であり、現フレームをフレームt、1つ前のフレームをフレームt-1とするフレームt-1内の複数の位置に対して、フレームtとのマッチング処理を行う。そして、フレームt-1上の点

Figure 0006931369
を始点、それらに対応するフレームt上の点
Figure 0006931369
を終点とする、i個のベクトルviを以下のように算出する。
Figure 0006931369
ただし、ベクトルの第一成分を画像の横方向、第二成分を画像の縦方向とする。 (Details of motion vector calculation process)
The details of the motion vector calculation process in the motion vector detection unit 702 will be described. FIG. 8 is a diagram schematically showing images for two frames supplied to the motion vector detection unit 702. Here, the images for two frames are images taken from the same viewpoint at different timings, and a plurality of positions in the frame t-1 where the current frame is the frame t and the previous frame is the frame t-1. Is matched with the frame t. And the point on frame t-1
Figure 0006931369
Starting point, the corresponding points on the frame t
Figure 0006931369
The i vectors v i having the end point are calculated as follows.
Figure 0006931369
However, the first component of the vector is the horizontal direction of the image, and the second component is the vertical direction of the image.

(被写体検出における辞書切り替え)
フレーム間の動きベクトルに基づいて現フレーム内の被写体領域を検出しようとした場合、動きベクトルが大きいほど誤検出の確率が増加する。これは、動きベクトルが大きい被写体は画像のブレが大きく、ボケ量の大きい場合と同様、被写体に類似した画像のバリエーションが増加するとともに、被写体の特徴が失われるからである。
(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 subject detection unit 204 applies the subject detection process using the processing parameters based on the learning model generated in advance through machine learning to the image. Specifically, the subject detection unit 204 includes a detection learning model 703 for a small main subject motion vector and a detection learning model 704 for a large main subject motion vector among the learning models stored in the learning model storage unit 205. refer. The detection learning model 703 for small main subject motion vector is generated by machine learning that emphasizes a subject image with a small amount of subject blur. Further, the detection learning model 704 for using the main subject motion vector is generated by machine learning that emphasizes a subject image having a large amount of subject blur.

そして、システム制御部201は、主被写体の動きベクトルの大きさに応じて、主被写体動きベクトル小用の検出学習モデル703と主被写体動きベクトル大用の検出学習モデル704のどちらを被写体検出部204で用いるかを切り替える。主被写体の動きベクトルの大きさに応じて被写体検出処理に用いる学習モデルを切り替えることにより、システム制御部201は主被写体検出部204における被写体検出処理の特性を切り替える。より具体的には、システム制御部201は、主被写体の動きベクトルが大きい判定されなければ検出学習モデル703を、主被写体の動きベクトルが大きいと判定されれば検出学習モデル704を用いるように切り替える。動きベクトルの大きさを判定するための閾値は、例えば予め実験的に定めることができる。 Then, the system control unit 201 determines which of the detection learning model 703 for the main subject motion vector small and the detection learning model 704 for the main subject motion vector large is used in the subject detection unit 204 according to the magnitude of the motion vector of the main subject. Switch whether to use in. By switching the learning model used for the subject detection process according to the magnitude of the motion vector of the main subject, the system control unit 201 switches the characteristics of the subject detection process in the main subject detection unit 204. More specifically, the system control unit 201 switches to use the detection learning model 703 if it is determined that the motion vector of the main subject is large, and to use the detection learning model 704 if it is determined that the motion vector of the main subject is large. .. The threshold value for determining the magnitude of the motion vector can be experimentally determined in advance, for example.

(被写体検出の処理の流れ)
次に、図9に示すフローチャートを用いて、本実施形態のDSLR100が撮影動作で行う被写体検出処理の詳細について説明する。本実施形態のDSLR100の撮影動作は第1実施形態と同様であるため、以下で説明する被写体検出処理は、図3のS303で実施される。なお、ここでは既に主被写体が決定されており、動きベクトル検出部702は例えば撮影スタンバイ状態で撮影される動画のフレーム画像を用いて、前フレームにおける主被写体領域内の点を始点とする動きベクトルを1つ以上検出しているものとする。
(Flow of subject detection processing)
Next, the details of the subject detection process performed by the DSLR 100 of the present embodiment in the photographing operation will be described with reference to the flowchart shown in FIG. Since the photographing operation of the DSLR 100 of the present embodiment is the same as that of the first embodiment, the subject detection process described below is performed in S303 of FIG. Here, the main subject has already been determined, and the motion vector detection unit 702 uses, for example, a frame image of a moving image shot in the shooting standby state, and a motion vector starting from a point in the main subject area in the previous frame. It is assumed that one or more of are detected.

S901でシステム制御部201は、RAM2012を参照して主被写体の動きベクトルの大きさを算出する。そして、システム制御部201は、算出した大きさを予め定めた閾値と比較し、閾値より大きければ動きベクトルが大きいと判定する。システム制御部201は、主被写体の動きベクトルが大きいと判定されればS903へ、判定されなければS902へ、それぞれ処理を進める。 In S901, the system control unit 201 calculates the magnitude of the motion vector of the main subject with reference to the RAM 2012. Then, the system control unit 201 compares the calculated size with a predetermined threshold value, and determines that the motion vector is large if it is larger than the threshold value. The system control unit 201 proceeds to S903 if it is determined that the motion vector of the main subject is large, and proceeds to S902 if it is not determined.

S902でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、動きベクトル小用の検出学習モデル703を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。検出学習モデル703を用いることにより、被写体ブレが小さな検出対象の被写体を精度よく検出可能な被写体検出が実現できる。 In S902, the system control unit 201 selects a detection learning model 703 for a small motion vector from a plurality of learning models stored in the learning model storage unit 205, and sets it in the subject detection unit 204 as a parameter for subject detection processing. do. By using the detection learning model 703, it is possible to realize subject detection capable of accurately detecting a subject to be detected with a small subject blur.

S903でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、動きベクトル大用の検出学習モデル704を選択し、被写体検出処理用パラメータとして被写体検出部204に設定する。検出学習モデル704を用いることにより、被写体ブレが大きくても検出対象の被写体を検出可能な被写体検出が実現できる。 In S903, the system control unit 201 selects a detection learning model 704 for a large motion vector from a plurality of learning models stored in the learning model storage unit 205, and sets it in the subject detection unit 204 as a parameter for subject detection processing. .. By using the detection learning model 704, it is possible to realize subject detection capable of detecting the subject to be detected even if the subject blur is large.

また、S902およびS903でシステム制御部201は、S302で読みだした露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS904に進める。 Further, the system control unit 201 in S902 and S903 supplies the image data generated by performing A / D conversion, noise reduction processing, or the like on the exposure control signal read in S302 to the subject detection unit 204. Then, the system control unit 201 advances the process to S904.

S904で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS902またはS903で設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報や、CNNを用いた被写体検出の具体的な処理は第1実施形態と同様であってよい。 In S904, the subject detection unit 204 applies the subject detection process to the image data based on the exposure control signal by using the detection learning model set in S902 or S903 from the system control unit 201. The subject detection unit 204 supplies information representing the detection result to the system control unit 201. The information representing the detection result and the specific processing of the subject detection using the CNN may be the same as those in the first embodiment.

S905でシステム制御部201は、被写体検出の結果、被写体が1つ以上検出されていれば、検出された被写体から主被写体を決定する。主被写体の決定方法についても第1実施形態と同様であってよい。 In S905, if one or more subjects are detected as a result of subject detection, the system control unit 201 determines the main subject from the detected subjects. The method for determining the main subject may be the same as in the first embodiment.

S906で動きベクトル検出部702は、前述の方法によりS905で決定した主被写体の動きベクトルを算出する。 In S906, the motion vector detection unit 702 calculates the motion vector of the main subject determined in S905 by the above method.

本実施形態では、主被写体の動きベクトルの大きさ応じて望ましい被写体検出の特性が異なることに着目し、被写体検出に用いるパラメータ(機械学習によって生成した学習モデル)を、主被写体の動きベクトルの大きさに応じて切り替える構成とした。そのため、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 detection learning model 703 for a small motion vector is prepared by machine learning using a test pattern that focuses on image data with a small amount of subject blur. Further, for the subject to be detected, a detection learning model 704 for a large motion vector is prepared by machine learning using a test pattern that focuses on image data with a large amount of subject blur.

そして、主被写体の動きベクトルが大きいと判定される場合には検出学習モデル704を、大きいと判定されない場合には検出学習モデル703を用いて被写体検出処理を実行するよう、検出学習モデルを切り替える。これにより、主被写体の動きベクトルの大きさ(すなわち、被写体像のブレ量の大きさ)に適した被写体検出を実現できる。そのため、検出された被写体のうち、特定の被写体の領域を用いる処理を適切に実行することができる。 Then, the detection learning model is switched so that the subject detection process is executed using the detection learning model 704 when it is determined that the motion vector of the main subject is large and the detection learning model 703 when it is not determined to be large. As a result, it is possible to realize subject detection suitable for the magnitude of the motion vector of the main subject (that is, the magnitude of the amount of blurring of the subject image). Therefore, among the detected subjects, it is possible to appropriately execute the process using the area of a specific subject.

《第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 subject detection unit 204 of the present embodiment applies subject detection using processing parameters based on a learning model generated in advance through machine learning to an image. In the present embodiment, the learning model storage unit 205 refers to the detection learning model 705 for small position / orientation change and the detection learning model 706 for large position / attitude change. The detection learning model 705 for small position / orientation change is generated by machine learning that emphasizes the subject image when the amount of camera shake is small. Further, the detection learning model 706 for large use of position / orientation change is generated by machine learning that emphasizes the subject image when the amount of camera shake is large.

そして、システム制御部201は、位置姿勢変化の大きさに応じて、被写体検出部204が用いる学習モデルを切り替えることにより、被写体検出部204における被写体検出の特性を切り替える。より具体的には、位置姿勢変化が大きいと判定されない場合には、位置姿勢変化小用の検出学習モデル705を、位置姿勢変化が大きいと判定される場合には、位置姿勢変化大用の検出学習モデル706を用いるように切り替える。位置姿勢変化の大きさを判定するための閾値は、例えば予め実験的に定めることができる。 Then, the system control unit 201 switches the subject detection characteristics of the subject detection unit 204 by switching the learning model used by the subject detection unit 204 according to the magnitude of the position / orientation change. More specifically, if it is not determined that the position / attitude change is large, the detection learning model 705 for small position / attitude change is detected, and if it is determined that the position / attitude change is large, the detection for large position / attitude change is detected. Switch to use the learning model 706. The threshold value for determining the magnitude of the position-posture change can be experimentally determined in advance, for example.

(被写体検出の処理の流れ)
次に、図10に示すフローチャートを用いて、本実施形態のDSLR100が撮影動作で行う被写体検出処理の詳細について説明する。本実施形態のDSLR100の撮影動作は第1実施形態と同様であるため、以下で説明する被写体検出処理は、図3のS303で実施される。
(Flow of subject detection processing)
Next, the details of the subject detection process performed by the DSLR 100 of the present embodiment in the photographing operation will be described with reference to the flowchart shown in FIG. Since the photographing operation of the DSLR 100 of the present embodiment is the same as that of the first embodiment, the subject detection process described below is performed in S303 of FIG.

S1001でシステム制御部201は、RAM2012を参照して、位置姿勢変化取得部701から得られた位置姿勢変化を予め定めた閾値と比較し、閾値より大きければ位置姿勢変化が大きいと判定する。システム制御部201は、DSLR100の位置姿勢変化が大きいと判定されればS1003へ、判定されなければS1002へ、それぞれ処理を進める。 In S1001, the system control unit 201 refers to the RAM 2012, compares the position / attitude change obtained from the position / attitude change acquisition unit 701 with a predetermined threshold value, and determines that the position / attitude change is large if it is larger than the threshold value. The system control unit 201 proceeds to S1003 if it is determined that the position / orientation change of the DSLR100 is large, and to S1002 if it is not determined.

S1002でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、位置姿勢変化小用の検出学習モデル705を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。検出学習モデル705を用いることにより、手ブレが小さな検出対象の被写体を精度よく検出可能な被写体検出が実現できる。
S1003でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、位置姿勢変化大用の検出学習モデル706を選択し、被写体検出処理用パラメータとして被写体検出部204に設定する。検出学習モデル706を用いることにより、手ブレが大きくても検出対象の被写体を検出可能な被写体検出が実現できる。
In S1002, the system control unit 201 selects the detection learning model 705 for small position / orientation change from the learning models stored in the learning model storage unit 205, and causes the subject detection unit 204 as a parameter for the subject detection process. Set. By using the detection learning model 705, it is possible to realize subject detection capable of accurately detecting a subject to be detected with a small camera shake.
In S1003, the system control unit 201 selects the detection learning model 706 for large position / orientation change from the learning models stored in the learning model storage unit 205, and sets it in the subject detection unit 204 as a parameter for subject detection processing. do. By using the detection learning model 706, it is possible to realize subject detection capable of detecting the subject to be detected even if the camera shake is large.

また、S1002およびS1003でシステム制御部201は、S302で読みだした露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS1004に進める。 Further, the system control unit 201 in S1002 and S1003 supplies the image data generated by performing A / D conversion, noise reduction processing, or the like on the exposure control signal read in S302 to the subject detection unit 204. Then, the system control unit 201 advances the process to S1004.

S1004で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS1002またはS1003で設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報や、CNNを用いた被写体検出の具体的な処理は第1実施形態と同様であってよい。 In S1004, the subject detection unit 204 applies the subject detection process to the image data based on the exposure control signal by using the detection learning model set in S1002 or S1003 from the system control unit 201. The subject detection unit 204 supplies information representing the detection result to the system control unit 201. The information representing the detection result and the specific processing of the subject detection using the CNN may be the same as those in the first embodiment.

本実施形態では、撮像装置の位置姿勢変化の大きさに応じて望ましい被写体検出の特性が異なることに着目し、被写体検出に用いるパラメータ(機械学習によって生成した学習モデル)を、位置姿勢変化の大きさに応じて切り替える構成とした。そのため、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 detection learning model 705 for small position / orientation change is performed by machine learning using a test pattern that focuses on image data when the amount of camera shake is small. prepare. Further, for the subject to be detected, a detection learning model 706 for a large change in position and orientation is prepared by machine learning based on a test pattern that focuses on image data when the amount of camera shake is large.

そして、位置姿勢変化が大きいと判定される場合には検出学習モデル706を、大きいと判定されない場合には検出学習モデル705を用いて被写体検出処理を実行するよう、検出学習モデルを切り替える。これにより、位置姿勢変化の大きさ(すなわち、被写体像のブレ量の大きさ)に適した被写体検出を実現できる。そのため、検出された被写体のうち、特定の被写体の領域を用いる処理を適切に実行することができる。 Then, the detection learning model is switched so that the subject detection process is executed using the detection learning model 706 when it is determined that the position / orientation change is large and the detection learning model 705 when it is not determined to be large. As a result, it is possible to realize subject detection suitable for the magnitude of the position / orientation change (that is, the magnitude of the amount of blurring of the subject image). Therefore, among the detected subjects, it is possible to appropriately execute the process using the area of a specific subject.

《第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 subject detection unit 204. To switch.

大きなゲインが適用された画像データに対して被写体検出処理を適用した場合、被写体領域の誤検出が起こりやすくなる。これは、画像データにゲインを適用することで、ノイズも増幅され、画像の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 subject detection unit 204 of the present embodiment applies subject detection using processing parameters based on a learning model generated in advance through machine learning to an image. In the present embodiment, the learning model storage unit 205 refers to the detection learning model 707 for small gain and the detection learning model 708 for large gain. The detection learning model 707 for small gain is generated by machine learning that emphasizes the subject image when the noise is small. Further, the detection learning model 708 for large gain is generated by machine learning that emphasizes the subject image when the noise is large.

そして、システム制御部201は、被写体検出部204に供給される画像データに適用されたゲインの大きさに応じて、被写体検出部204が用いる学習モデルを切り替えることにより、主被写体検出部204における被写体検出の特性を切り替える。より具体的には、画像データに施されたゲインが大きいと判定される場合には、ゲイン大用の検出学習モデル708を、画像に施されたゲインが大きいと判定されない場合には、ゲイン小用の検出学習モデル707を用いるように切り替える。ゲインの大きさを判定するための閾値は、例えば予め実験的に定めることができる。なお、被写体検出を撮像素子111で得られた画像データに対して実施する場合、システム制御部201は例えば撮影感度に対応するゲインの大きさを判定することができる。 Then, the system control unit 201 switches the learning model used by the subject detection unit 204 according to the magnitude of the gain applied to the image data supplied to the subject detection unit 204, so that the subject in the main subject detection unit 204 Switch the detection characteristics. More specifically, if it is determined that the gain applied to the image data is large, the detection learning model 708 for large gain is used, and if it is not determined that the gain applied to the image is large, the gain is small. To switch to using the detection learning model 707 for. The threshold value for determining the magnitude of the gain can be experimentally determined in advance, for example. When subject detection is performed on the image data obtained by the image sensor 111, the system control unit 201 can determine, for example, the magnitude of the gain corresponding to the shooting sensitivity.

(被写体検出の処理の流れ)
次に、図11に示すフローチャートを用いて、本実施形態のDSLR100が撮影動作で行う被写体検出処理の詳細について説明する。本実施形態のDSLR100の撮影動作は第1実施形態と同様であるため、以下で説明する被写体検出処理は、図3のS303で実施される。
(Flow of subject detection processing)
Next, the details of the subject detection process performed by the DSLR 100 of the present embodiment in the photographing operation will be described with reference to the flowchart shown in FIG. Since the photographing operation of the DSLR 100 of the present embodiment is the same as that of the first embodiment, the subject detection process described below is performed in S303 of FIG.

S1101でシステム制御部201は、測光センサー108が像信号に適用したゲインの大きさを予め定めた閾値と比較し、閾値より大きければゲインが大きいと判定する。システム制御部201は、ゲインが大きいと判定されればS1103へ、判定されなければS1102へ、それぞれ処理を進める。 In S1101, the system control unit 201 compares the magnitude of the gain applied to the image signal by the photometric sensor 108 with a predetermined threshold value, and determines that the gain is large if it is larger than the threshold value. The system control unit 201 proceeds to S1103 if it is determined that the gain is large, and proceeds to S1102 if it is not determined.

S1102でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、ゲイン小用の検出学習モデル707を選択し、被写体検出処理用のパラメータとして被写体検出部204に設定する。検出学習モデル707を用いることにより、ノイズが小さい場合に検出対象の被写体を精度よく検出可能な被写体検出が実現できる。 In S1102, the system control unit 201 selects the detection learning model 707 for small gain from the learning models stored in the learning model storage unit 205, and sets the detection learning model 707 in the subject detection unit 204 as a parameter for the subject detection process. .. By using the detection learning model 707, it is possible to realize subject detection capable of accurately detecting the subject to be detected when the noise is small.

S1103でシステム制御部201は、学習モデル記憶部205に複数記憶されている学習モデルのうち、ゲイン大用の検出学習モデル708を選択し、被写体検出処理用パラメータとして被写体検出部204に設定する。検出学習モデル708を用いることにより、ノイズが大きい場合でも検出対象の被写体を検出可能な被写体検出が実現できる。 In S1103, the system control unit 201 selects a detection learning model 708 for large gain from the learning models stored in the learning model storage unit 205, and sets the detection learning model 708 as a parameter for subject detection processing in the subject detection unit 204. By using the detection learning model 708, it is possible to realize subject detection capable of detecting the subject to be detected even when the noise is large.

また、S1102およびS1103でシステム制御部201は、S302で読みだした露出制御用信号に対してA/D変換やノイズ低減処理などを行って生成した画像データを被写体検出部204に供給する。そして、システム制御部201は、処理をS1104に進める。 Further, the system control unit 201 in S1102 and S1103 supplies the image data generated by performing A / D conversion, noise reduction processing, or the like on the exposure control signal read in S302 to the subject detection unit 204. Then, the system control unit 201 advances the process to S1104.

S1104で被写体検出部204は、露出制御用信号に基づく画像データに対して、システム制御部201からS1102またはS1103で設定された検出学習モデルを用いて被写体検出処理を適用する。被写体検出部204は、検出結果を表す情報をシステム制御部201に供給する。検出結果を表す情報や、CNNを用いた被写体検出の具体的な処理は第1実施形態と同様であってよい。 In S1104, the subject detection unit 204 applies the subject detection process to the image data based on the exposure control signal by using the detection learning model set in S1102 or S1103 from the system control unit 201. The subject detection unit 204 supplies information representing the detection result to the system control unit 201. The information representing the detection result and the specific processing of the subject detection using the CNN may be the same as those in the first embodiment.

本実施形態では、画像データのノイズの量に応じて望ましい被写体検出の特性が異なることに着目し、被写体検出に用いるパラメータ(機械学習によって生成した学習モデル)を、画像データに適用されたゲインの大きさに応じて切り替える構成とした。そのため、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 detection learning model 707 with a small gain is prepared by machine learning using a test pattern that focuses on image data with less noise. Further, for the subject to be detected, a detection learning model 708 with a large gain is prepared by machine learning using a test pattern that focuses on noisy image data.

そして、被写体検出を行う画像データに適用されたゲインが大きいと判定される場合には検出学習モデル708を、大きいと判定されない場合には検出学習モデル707を用いて被写体検出処理を実行するよう、検出学習モデルを切り替える。これにより、ノイズが少ない場合に適した被写体検出と、ノイズが多い場合に適した被写体検出とを実現できる。そのため、検出された被写体のうち、特定の被写体の領域を用いる処理を適切に実行することができる。 Then, when it is determined that the gain applied to the image data for subject detection is large, the detection learning model 708 is used, and when it is not determined that the gain is large, the detection learning model 707 is used to execute the subject detection process. Switch the detection learning model. As a result, it is possible to realize subject detection suitable for when there is little noise and subject detection suitable for when there is a lot of noise. Therefore, among the detected subjects, it is possible to appropriately execute the process using the area of a specific subject.

(その他の実施形態)
上述の実施形態では、主被写体の領域に露出や焦点調節を最適化する撮像装置に本発明を適用した例について説明した。しかし、主被写体領域の利用目的は撮影に限定されない。例えば、主被写体領域(もしくは主被写体領域以外の領域)に画像処理を適用する場合など、他の任意の目的に用いることができる。したがって、本発明において撮影に関する構成は必須ではない。また、上述の実施形態では、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のパラメータを選択し、前記第2のパラメータは、前記第1のパラメータよりも、ボケ量の大きな被写体の検出に適したパラメータであることを特徴とする請求項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. The second parameter is selected if not present, and the second parameter is a parameter suitable for detecting a subject having a larger amount of blur than the first parameter, according to claim 1. Image processing equipment. 前記選択手段は、前記主被写体が決定され、かつ、前記主被写体の領域が合焦するように焦点調節が行われている場合には第1のパラメータを選択し、前記主被写体が決定されていない場合には第2のパラメータを選択し、
前記第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.
前記選択手段は、前記主被写体が決定された後であっても、前記主被写体が所定期間継続して検出されない場合には前記第2のパラメータを選択することを特徴とする請求項2または3に記載の画像処理装置。 Said selection means, even after the main subject is determined, according to claim 2 or 3 wherein the main subject in the case where not detected continuously for a predetermined period and selects said second parameter The image processing apparatus according to. 前記選択手段は、前記主被写体が決定された後であっても、前記主被写体のボケ量が閾値以上である場合には前記第2のパラメータを選択することを特徴とする請求項2から4のいずれか1項に記載の画像処理装置。 Claims 2 to 4 are characterized in that the selection means selects the second parameter even after the main subject has been determined, when the amount of blurring of the main subject is equal to or greater than a threshold value. The image processing apparatus according to any one of the above. 主被写体の領域に必要な被写体検出の確からしさを、前記第2のパラメータを用いて検出された被写体領域については、前記第1のパラメータを用いて検出された被写体領域よりも高く設定することを特徴とする請求項2から5のいずれか1項に記載の画像処理装置。 The certainty of subject detection required for the area of the main subject should be set higher for the subject area detected using the second parameter than for the subject area detected using the first parameter. The image processing apparatus according to any one of claims 2 to 5, which is characterized. 前記パラメータが、コンボリューショナル・ニューラル・ネットワーク(CNN)で用いる結合係数であることを特徴とする請求項1から6のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 6, wherein the parameter is a coupling coefficient used in a convolutional neural network (CNN). 前記パラメータを外部から取得するための取得手段を有することを特徴とする請求項1から7のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 7, further comprising an acquisition means for acquiring the parameter from the outside. 前記取得手段は、無線通信、有線通信、あるいは、着脱可能な記憶メディアを介して前記パラメータを外部から取得し、前記記憶手段は前記取得手段が取得した前記パラメータを記憶することを特徴とする請求項8に記載の画像処理装置。 The claim is characterized in that the acquisition means acquires the parameters from the outside via wireless communication, wired communication, or a detachable storage medium, and the storage means stores the parameters acquired by the acquisition means. Item 8. The image processing apparatus according to item 8. 撮像素子と、
請求項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.
前記撮像素子が、露出制御用の画像を取得するための撮像素子であることを特徴とする請求項10または11に記載の撮像装置。 The image pickup device according to claim 10 or 11, wherein the image pickup device is an image pickup device for acquiring an image for exposure control. 画像処理装置が実行する画像処理方法であって、
機械学習に基づいて生成されたパラメータを用いて、画像に対して被写体検出処理を適用する被写体検出工程と、
前記被写体検出工程において検出された被写体の中から主被写体を決定する決定工程と、
前記被写体検出処理に用いるパラメータを複数記憶する記憶手段から、前記被写体検出工程で用いるパラメータを選択する選択工程と、
を有し、
前記選択工程では、前記主被写体が決定され、かつ、前記主被写体の領域が合焦するように焦点調節が行われている場合と、前記主被写体が決定されていない場合とで、それぞれの場合に適した異なるパラメータを選択することを特徴とする画像処理方法。
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.
コンピュータを、請求項1から9のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。 A program for causing a computer to function as each means of the image processing apparatus according to any one of claims 1 to 9. 撮像装置が有するコンピュータを、請求項10から12のいずれか1項に記載の撮像装置が有する画像処理装置として機能させるためのプログラム。 A program for causing a computer included in an image pickup apparatus to function as an image processing apparatus included in the image pickup apparatus according to any one of claims 10 to 12.
JP2019023778A 2018-04-10 2019-02-13 Image processing device and image processing method, and imaging device Active JP6931369B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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