[go: up one dir, main page]

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

Image processing device, imaging device, and image processing method

Info

Publication number
JP7749437B2
JP7749437B2 JP2021200395A JP2021200395A JP7749437B2 JP 7749437 B2 JP7749437 B2 JP 7749437B2 JP 2021200395 A JP2021200395 A JP 2021200395A JP 2021200395 A JP2021200395 A JP 2021200395A JP 7749437 B2 JP7749437 B2 JP 7749437B2
Authority
JP
Japan
Prior art keywords
image
area
occupancy
unit
detection area
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
JP2021200395A
Other languages
Japanese (ja)
Other versions
JP2023086022A (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
Priority to JP2021200395A priority Critical patent/JP7749437B2/en
Publication of JP2023086022A publication Critical patent/JP2023086022A/en
Application granted granted Critical
Publication of JP7749437B2 publication Critical patent/JP7749437B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Description

本発明は、撮像画像からの追尾対象の検出領域の再検出技術に関するものである。 This invention relates to technology for re-detecting the detection area of a tracking target from a captured image.

画像から物体を検出する物体検出処理が、デジタルカメラ等の撮像装置の機能に応用されている。これまで物体検出処理は、人物の顔や顔器官(瞳、鼻、口)、人物の全身などの特定のカテゴリの物体に対して行われるものが多かった。近年、深層学習の発達に伴い、様々なカテゴリの物体の情報を用いて物体らしさを学習させることで、動物や乗り物など、不特定のカテゴリの物体(以下、不特定物体)を検出する技術が実現されてきている。 Object detection processing, which detects objects from images, is being applied to the functions of imaging devices such as digital cameras. Until now, object detection processing has often been performed on objects of specific categories, such as human faces and facial organs (eyes, nose, mouth), or the entire human body. In recent years, with the development of deep learning, technology has been realized that can detect objects of unspecified categories (hereinafter referred to as unspecified objects), such as animals and vehicles, by learning object-likeness using information on objects of various categories.

デジタルカメラにおいては、物体検出処理は、検出した物体を被写体として自動的に合焦するオートフォーカス(AF)技術に応用されている。AF技術の1つに、同一の被写体に継続的に合焦する追尾機能がある。追尾機能は、追尾対象を連続する画像中において同定する機能であるが、追尾対象が他の物体に遮蔽されて見えなくなってしまった等の場合には、追尾対象を消失してしまう。追尾対象を消失してしまった場合、再検出を行う必要がある。追尾対象の消失時における再検出方法として、特許文献1には、探索範囲のサイズを拡大して追尾対象の追尾特徴量をもとに再探索を実行する技術が開示されている。 In digital cameras, object detection processing is applied to autofocus (AF) technology, which automatically focuses on a detected object as the subject. One type of AF technology is a tracking function that continuously focuses on the same subject. The tracking function identifies the tracking target in successive images, but if the tracking target is obscured by another object and becomes invisible, the tracking target will disappear. When the tracking target disappears, it must be redetected. Patent Document 1 discloses a technique for redetecting a tracking target when it has disappeared, in which the size of the search range is expanded and a search is performed again based on the tracking feature quantities of the tracking target.

特開2009-17271号公報JP 2009-17271 A

しかしながら、追尾特徴量のみによる同定を行う場合、追尾対象が動物のように物体全体が似たようなテクスチャを持つ場合、再検出前後で物体サイズが変化していると、追尾対象(追尾部位)が変化してしまう可能性がある。さらに、追尾対象が不特定物体で消失した際に再検出を実行した場合、多数の不特定物体が検出されるので、その中からユーザの意図通りに元の追尾対象を検出することは難しい。本発明は、撮像画像からユーザの意図を考慮した追尾対象の再検出を実施するための技術を提供する。 However, when identification is performed using tracking features alone, if the tracking target is an animal or other object with a similar texture throughout, and the object size changes before and after redetection, the tracking target (tracked part) may change. Furthermore, if redetection is performed when the tracking target has disappeared due to an unspecified object, many unspecified objects will be detected, making it difficult to detect the original tracking target from among them as intended by the user. The present invention provides technology for redetecting the tracking target from captured images while taking into account the user's intentions.

本発明の一様態は、撮像画像中の追尾対象の画像領域もしくは該追尾対象が属するオブジェクトの画像領域における該追尾対象の画像領域の割合を示す占有度と、該追尾対象の特徴量と、を登録する登録手段と、撮像画像中の追尾対象の追尾が成功していないと判定された場合には、前記占有度および前記特徴量に基づいて、撮像画像から追尾対象の画像領域の再検出を行う再検出手段とを備えることを特徴とする。 One aspect of the present invention is characterized by comprising a registration means for registering an occupancy indicating the proportion of the image area of the tracking target in the image area of the captured image or the image area of the object to which the tracking target belongs, and a feature amount of the tracking target, and a redetection means for redetecting the image area of the tracking target from the captured image based on the occupancy amount and the feature amount when it is determined that tracking of the tracking target in the captured image has not been successful.

本発明によれば、撮像画像からユーザの意図を考慮した追尾対象の再検出を実施することができる。 This invention makes it possible to redetect a tracking target from captured images while taking into account the user's intentions.

撮像装置100の構成例を示すブロック図。FIG. 1 is a block diagram showing an example of the configuration of an imaging apparatus 100. (a)は撮像装置100のハードウェア構成例を示すブロック図、(b)は画像解析装置200および学習装置700のハードウェア構成例を示すブロック図。1A is a block diagram showing an example of the hardware configuration of an imaging device 100, and FIG. 1B is a block diagram showing an example of the hardware configuration of an image analyzing device 200 and a learning device 700. FIG. 撮像装置100の機能構成例を示すブロック図。FIG. 2 is a block diagram showing an example of the functional configuration of the imaging apparatus 100. 撮像装置100が行う処理のフローチャート。10 is a flowchart of processing performed by the imaging device 100. ステップS401における処理の詳細を示すフローチャート。10 is a flowchart showing details of the process in step S401. ニューラルネットワークの構成例を示す図。FIG. 1 is a diagram showing an example of the configuration of a neural network. 検出領域の占有度について説明する図。FIG. 10 is a diagram illustrating the occupancy rate of a detection region. 撮像画像の一例を示す図。FIG. 10 is a diagram showing an example of a captured image. 記憶部218に格納された占有度および追尾特徴の一例を示す図。FIG. 10 is a diagram showing an example of occupancy levels and tracking features stored in a storage unit 218. 追尾特徴の一例を示す図。FIG. 10 is a diagram showing an example of a tracking feature. 学習装置700の機能構成例を示すブロック図。FIG. 7 is a block diagram showing an example of the functional configuration of a learning device 700. 学習装置700によるニューラルネットワークの学習処理のフローチャート。10 is a flowchart of a neural network learning process performed by the learning device 700. 学習データの作成方法を説明する図。FIG. 1 is a diagram illustrating a method for creating learning data. (a)は第1画像の一例を示す図、(b)は第2画像の一例を示す図。FIG. 4A is a diagram showing an example of a first image, and FIG. 4B is a diagram showing an example of a second image. 撮像装置100の機能構成例を示すブロック図。FIG. 2 is a block diagram showing an example of the functional configuration of the imaging apparatus 100. 撮像画像の一例を示す図。FIG. 10 is a diagram showing an example of a captured image.

以下、添付図面を参照して実施形態を詳しく説明する。尚、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 The following describes the embodiments in detail with reference to the attached drawings. Note that the following embodiments do not limit the scope of the claimed invention. Although the embodiments describe multiple features, not all of these features are necessarily essential to the invention, and multiple features may be combined in any desired manner. Furthermore, in the attached drawings, the same reference numbers are used to designate identical or similar components, and redundant explanations will be omitted.

[第1の実施形態]
本実施形態では、動画像における各フレームの画像や定期的若しくは不定期的に撮像された静止画像を撮像画像として取得し、該撮像画像から検出/再検出した追尾対象(オブジェクトの一部若しくは全部)を追尾する追尾処理や、該追尾対象を被写体として自動的に合焦するAF処理を行う撮像装置について説明する。
[First embodiment]
In this embodiment, an imaging device will be described that acquires images of each frame in a moving image or still images captured periodically or irregularly as captured images, and performs a tracking process to track a tracking target (part or all of an object) detected/redetected from the captured images, and an AF process to automatically focus on the tracking target as a subject.

図1に示す如く、本実施形態に係る撮像装置100は、撮像画像に対して各種の解析処理を行って、「追尾対象の画像領域」の検出/再検出を行う画像解析装置200を有する。また、撮像装置100には、該画像解析装置200が上記の動作を実施するために使用するニューラルネットワークの学習処理を行う学習装置700が接続されている。 As shown in FIG. 1, the imaging device 100 according to this embodiment has an image analysis device 200 that performs various analytical processes on the captured image to detect/redetect the "image area of the tracking target." Also connected to the imaging device 100 is a learning device 700 that performs learning processes on the neural network used by the image analysis device 200 to perform the above operations.

まず、撮像装置100のハードウェア構成例について、図2(a)のブロック図を用いて説明する。なお、図2(a)には、以下の説明に関連する主な構成を示しており、撮像装置100が図2(a)に示した装置以外の装置を含むことを排除するものではない。 First, an example of the hardware configuration of the imaging device 100 will be described using the block diagram in Figure 2(a). Note that Figure 2(a) shows the main components relevant to the following description, and does not exclude the imaging device 100 from including devices other than those shown in Figure 2(a).

演算処理装置101は、CPU(Central Processing Unit)及び/又はGPU(Graphics Processing Unit)等のプロセッサと、該プロセッサのワークエリアを有するメモリと、を有する。演算処理装置101は、記憶装置102に保存されているコンピュータプログラムやデータを用いて各種の処理を実行することで、撮像装置100(画像解析装置200を含む)や学習装置700の動作制御を行う。 The arithmetic processing device 101 has a processor such as a CPU (Central Processing Unit) and/or a GPU (Graphics Processing Unit), and memory that has a work area for the processor. The arithmetic processing device 101 controls the operation of the imaging device 100 (including the image analysis device 200) and the learning device 700 by executing various processes using computer programs and data stored in the storage device 102.

記憶装置102は、磁気記憶装置、半導体メモリ等のストレージデバイスである。記憶装置102には、撮像装置100(画像解析装置200を含む)や学習装置700の動作制御を演算処理装置101に行わせるためのコンピュータプログラムやデータが保存されている。また、記憶装置102には、撮像画像をファイルとして保存することができる。 The storage device 102 is a storage device such as a magnetic storage device or semiconductor memory. The storage device 102 stores computer programs and data that cause the arithmetic processing device 101 to control the operation of the imaging device 100 (including the image analysis device 200) and the learning device 700. The storage device 102 can also store captured images as files.

撮像部105は、レンズ、絞り、外界からの光をアナログ信号に変換するCCDやCMOS等の撮像素子、該アナログ信号をデジタル信号に変換するA/D変換器、該デジタル信号に基づいて撮像画像を生成する生成回路を有する。さらに撮像部105は、絞りを制御する装置、フォーカスを制御する装置、等を有する。撮像部105において、撮像素子は、レンズを介して入光した光を光電変換によりアナログ信号に変換し、A/D変換器は、該アナログ信号をディジタル信号に変換し、生成回路は該デジタル信号に基づいて撮像画像を生成して出力する。また撮像部105は、演算処理装置101からの指示に応じてAF機能、AE機能、AWB機能等を実施する。撮像部105により定期的若しくは不定期的に撮像された静止画像、もしくは撮像部105により撮像された動画像における各フレームの画像は、撮像画像として記憶装置102に保存される。 The imaging unit 105 includes a lens, an aperture, an imaging element such as a CCD or CMOS that converts light from the outside world into an analog signal, an A/D converter that converts the analog signal into a digital signal, and a generation circuit that generates a captured image based on the digital signal. The imaging unit 105 also includes an aperture control device, a focus control device, and the like. In the imaging unit 105, the imaging element photoelectrically converts light incident through the lens into an analog signal, the A/D converter converts the analog signal into a digital signal, and the generation circuit generates and outputs a captured image based on the digital signal. The imaging unit 105 also performs AF, AE, AWB, and other functions in response to instructions from the processor 101. Still images captured periodically or irregularly by the imaging unit 105, or images of each frame of a moving image captured by the imaging unit 105, are stored in the storage device 102 as captured images.

画像解析装置200は、撮像部105により生成された撮像画像から追尾対象の検出/再検出を行う。演算処理装置101は、画像解析装置200により検出/再検出された追尾対象を追尾する追尾処理や、該追尾対象を被写体として自動的に合焦するAF処理を行うべく、撮像部105を制御する。 The image analysis device 200 detects/redetects the tracking target from the captured image generated by the imaging unit 105. The arithmetic processing device 101 controls the imaging unit 105 to perform tracking processing to track the tracking target detected/redetected by the image analysis device 200, and AF processing to automatically focus on the tracking target as a subject.

入力装置103は、マウス、キーボード、タッチパネルデバイス、ボタン等のユーザインターフェースであり、ユーザが操作することで各種の指示を演算処理装置101に対して入力することができる。 The input device 103 is a user interface such as a mouse, keyboard, touch panel device, or buttons, which can be operated by the user to input various instructions to the processing unit 101.

出力装置104は、液晶パネルなどの表示画面を有する装置であり、演算処理装置101による処理結果を画像や文字などでもって該表示画面に表示させる。本実施形態では、液晶パネルとしての出力装置104の表示画面に、タッチパネルデバイスとしての入力装置103を重ねてタッチパネル画面を構成する。タッチパネル画面は、演算処理装置101による処理結果を画像や文字などでもって表示すると共に、ユーザからの操作入力を受け付ける。 The output device 104 is a device having a display screen such as a liquid crystal panel, and displays the processing results of the arithmetic processing device 101 on the display screen in the form of images, text, etc. In this embodiment, a touch panel screen is constructed by overlaying the input device 103, which functions as a touch panel device, on the display screen of the output device 104, which functions as a liquid crystal panel. The touch panel screen displays the processing results of the arithmetic processing device 101 in the form of images, text, etc., and also accepts operational input from the user.

図2(a)に示した演算処理装置101、記憶装置102、撮像部105、画像解析装置200、入力装置103、出力装置104、は何れもシステムバス107に接続されている。なお、撮像装置100は、例えば、各種の装置間で通信を行うためのI/O部を有しても良い。I/O部は例えば、メモリーカード、USBケーブル等の入出力部、有線、無線等による送受信部である。 The arithmetic processing unit 101, storage device 102, imaging unit 105, image analysis device 200, input device 103, and output device 104 shown in FIG. 2(a) are all connected to a system bus 107. Note that the imaging device 100 may also have, for example, an I/O unit for communicating between various devices. The I/O unit may be, for example, an input/output unit such as a memory card or USB cable, or a wired or wireless transmission/reception unit.

次に、画像解析装置200および学習装置700のハードウェア構成例について、図2(b)のブロック図を用いて説明する。本実施形態では説明を簡単にするために、画像解析装置200および学習装置700は何れも同じハードウェア構成(図2(b))を有するものとして説明する。しかし、画像解析装置200および学習装置700のそれぞれのハードウェア構成は異なっていても良い。 Next, an example of the hardware configuration of the image analysis device 200 and the learning device 700 will be described using the block diagram in Figure 2(b). For simplicity's sake, in this embodiment, the image analysis device 200 and the learning device 700 will be described as having the same hardware configuration (Figure 2(b)). However, the hardware configurations of the image analysis device 200 and the learning device 700 may be different.

演算処理装置130は、CPU及び/又はGPU等のプロセッサと、該プロセッサのワークエリアを有するメモリと、を有する。演算処理装置130は、記憶装置131に保存されているコンピュータプログラムやデータを用いて各種の処理を実行することで、画像解析装置200/学習装置700全体の動作制御を行う。 The arithmetic processing device 130 has a processor such as a CPU and/or GPU, and memory that has a work area for the processor. The arithmetic processing device 130 controls the overall operation of the image analysis device 200/learning device 700 by executing various processes using computer programs and data stored in the storage device 131.

記憶装置131は、磁気記憶装置、半導体メモリ等のストレージデバイスである。記憶装置131には、画像解析装置200/学習装置700の動作制御を演算処理装置131に行わせるためのコンピュータプログラムやデータが保存されている。 The memory device 131 is a storage device such as a magnetic memory device or semiconductor memory. The memory device 131 stores computer programs and data that cause the arithmetic processing device 131 to control the operation of the image analysis device 200/learning device 700.

I/F132は、有線および/または無線のネットワークを介して外部装置との間のデータ通信を行うための通信インターフェースである。画像解析装置200のI/F132は、学習装置700との間のデータ通信を行うための通信インターフェースである。学習装置700のI/F132は、画像解析装置200との間のデータ通信を行うための通信インターフェースである。演算処理装置130、記憶装置131、I/F132は何れもシステムバス133に接続されている。 I/F 132 is a communication interface for performing data communication with an external device via a wired and/or wireless network. I/F 132 of the image analysis device 200 is a communication interface for performing data communication with the learning device 700. I/F 132 of the learning device 700 is a communication interface for performing data communication with the image analysis device 200. The arithmetic processing device 130, storage device 131, and I/F 132 are all connected to a system bus 133.

次に、撮像装置100の機能構成例について、図3のブロック図を用いて説明する。以下では、図3に示した各機能部を処理の主体として説明する場合がある。しかし、実際には、図3に示した機能部のうち追尾部219、AF処理部220、記憶部218を除く各機能部の機能を演算処理装置130に実現させるためのコンピュータプログラムを該演算処理装置130が実行することで、該機能部の機能が実現される。同様に、図3に示した機能部のうち追尾部219、AF処理部220の機能を演算処理装置101に実現させるためのコンピュータプログラムを該演算処理装置101が実行することで、該追尾部219、該AF処理部220の機能が実現される。 Next, an example of the functional configuration of the imaging device 100 will be described using the block diagram in FIG. 3. In the following, each functional unit shown in FIG. 3 may be described as the subject of processing. However, in reality, the functions of each functional unit shown in FIG. 3, except for the tracking unit 219, AF processing unit 220, and memory unit 218, are realized by the processing unit 130 executing a computer program that causes the processing unit 130 to realize the functions of the functional units. Similarly, the functions of the tracking unit 219 and AF processing unit 220, among the functional units shown in FIG. 3, are realized by the processing unit 101 executing a computer program that causes the processing unit 101 to realize the functions of the tracking unit 219 and AF processing unit 220.

取得部210は、撮像部105により生成された撮像画像を取得する。例えば、取得部210は、撮像部105により生成されたフルHD(1920画素×1280画素)の撮像画像をリアルタイム(60フレーム毎秒)で取得する。 The acquisition unit 210 acquires the captured image generated by the imaging unit 105. For example, the acquisition unit 210 acquires the full HD (1920 pixels x 1280 pixels) captured image generated by the imaging unit 105 in real time (60 frames per second).

取得部230は、取得部210が取得した撮像画像中のオブジェクトや該オブジェクトの一部(頭部、腕、足等)に係る情報を取得する。取得部230の機能構成例を図3(b)のブロック図に示す。 The acquisition unit 230 acquires information related to objects and parts of those objects (head, arms, legs, etc.) in the captured images acquired by the acquisition unit 210. An example of the functional configuration of the acquisition unit 230 is shown in the block diagram of Figure 3(b).

抽出部211aは、取得部210が取得した撮像画像から特徴量(物体特徴量)を抽出する。推定部212aは、抽出部211aが撮像画像から抽出した物体特徴量を用いて、該撮像画像中のオブジェクトの全体の画像領域や該オブジェクトの一部の画像領域を検出領域として推定(検出)する。これにより推定部212aは、撮像画像から推定した検出領域ごとに、該撮像画像における該検出領域の位置(中心位置、左上隅の位置等)、該検出領域のサイズ(縦サイズ及び横サイズ)、該検出領域に含まれる対象のオブジェクトらしさを表す尤度を取得する。以降、「特徴量」は、「特徴ベクトル」または「画像特徴」と同義である。 The extraction unit 211a extracts features (object features) from the captured image acquired by the acquisition unit 210. The estimation unit 212a uses the object features extracted from the captured image by the extraction unit 211a to estimate (detect) the entire image area of the object in the captured image or a partial image area of the object as a detection area. As a result, for each detection area estimated from the captured image, the estimation unit 212a acquires the position of the detection area in the captured image (center position, upper left corner position, etc.), the size of the detection area (vertical size and horizontal size), and the likelihood that the target included in the detection area is an object. Hereinafter, "feature" is synonymous with "feature vector" or "image feature."

推定部213aは、推定部212aが撮像画像から推定したそれぞれの検出領域について、抽出部211aが該撮像画像から抽出した物体特徴量を用いて、該撮像画像におけるオブジェクトの画像領域のうち該検出領域が占める割合を占有度として推定する。 For each detection area estimated from the captured image by the estimation unit 212a, the estimation unit 213a uses the object feature amounts extracted from the captured image by the extraction unit 211a to estimate the occupancy rate, which is the proportion of the image area of the object in the captured image that the detection area occupies.

抽出部214aは、推定部212aが撮像画像から推知したそれぞれの検出領域について、該検出領域に対応する特徴量(追尾特徴量)を抽出する。選択部240は、推定部212aが撮像画像から推定した検出領域のうち追尾対象の検出領域を選択する。そして選択部240は、該選択した検出領域について推定部213aが推定した占有度、該選択した検出領域について抽出部214aが抽出した追尾特徴量、を記憶部218に格納(登録)する。選択部240は、選択部215、入力部216、入力部217を有する。 The extraction unit 214a extracts features (tracking features) corresponding to each detection area estimated from the captured image by the estimation unit 212a. The selection unit 240 selects a detection area of the tracking target from the detection areas estimated from the captured image by the estimation unit 212a. The selection unit 240 then stores (registers) in the memory unit 218 the occupancy rate estimated by the estimation unit 213a for the selected detection area and the tracking features extracted by the extraction unit 214a for the selected detection area. The selection unit 240 has a selection unit 215, an input unit 216, and an input unit 217.

入力部216は、取得部210が取得した撮像画像を出力装置104の表示画面上に表示させて、該撮像画像における追尾対象の位置を指示するユーザ操作を受け付ける。ユーザが入力装置103を操作して該撮像画像における追尾対象の位置を指示すると、入力部216は、該位置の画像座標を取得する。 The input unit 216 displays the captured image acquired by the acquisition unit 210 on the display screen of the output device 104 and accepts user operations to indicate the position of the tracking target in the captured image. When the user operates the input device 103 to indicate the position of the tracking target in the captured image, the input unit 216 acquires the image coordinates of that position.

入力部217は、ユーザが入力装置103を操作して入力した追尾対象の占有度の範囲(占有度範囲)を取得する。選択部215は、入力部216が取得した画像座標と、入力部217が取得した占有度範囲と、に基づいて、推定部212aが撮像画像から推定した検出領域のうち追尾対象の検出領域を選択する。そして選択部215は、追尾対象の検出領域について推定部213aが推定した占有度、追尾対象の検出領域について抽出部214aが抽出した追尾特徴量、を記憶部218に格納(登録)する。 The input unit 217 acquires the range of occupancy of the tracking target (occupancy range) input by the user operating the input device 103. The selection unit 215 selects the detection area of the tracking target from the detection areas estimated from the captured image by the estimation unit 212a, based on the image coordinates acquired by the input unit 216 and the occupancy range acquired by the input unit 217. The selection unit 215 then stores (registers) in the memory unit 218 the occupancy estimated by the estimation unit 213a for the detection area of the tracking target and the tracking feature amount extracted by the extraction unit 214a for the detection area of the tracking target.

追尾部219は、記憶部218に格納された追尾対象の検出領域の追尾特徴量と、選択部215が選択した追尾対象の検出領域もしくは再検出部250によって再検出された追尾対象の画像領域と、を用いて、取得部210が取得した撮像画像における該追尾対象を追尾する追尾処理を実行する。追尾処理については周知であるため、追尾処理に係る詳細な説明は省略する。 The tracking unit 219 performs tracking processing to track the tracking target in the captured image acquired by the acquisition unit 210, using the tracking feature amounts of the tracking target detection area stored in the memory unit 218 and the tracking target detection area selected by the selection unit 215 or the tracking target image area re-detected by the re-detection unit 250. Since tracking processing is well known, a detailed description of the tracking processing will be omitted.

AF処理部220は、取得部210が取得した撮像画像において追尾部219が追尾している追尾対象の画像領域に対して、AF処理を実行する。AF処理については周知であるため、AF処理に係る詳細な説明は省略する。 The AF processing unit 220 performs AF processing on the image area of the tracking target that is being tracked by the tracking unit 219 in the captured image acquired by the acquisition unit 210. AF processing is well known, so a detailed description of the AF processing will be omitted.

判定部221は、追尾部219における追尾対象の追尾処理が成功しているか否かを判定する。再検出部250は、判定部221が「追尾部219における追尾対象の追尾処理が成功していない(失敗している)」と判定した場合に、撮像画像から追尾対象の再検出を行う。再検出部250の機能構成例を図3(c)のブロック図に示す。 The determination unit 221 determines whether the tracking unit 219 has successfully tracked the tracking target. The re-detection unit 250 re-detects the tracking target from the captured image if the determination unit 221 determines that the tracking unit 219 has not successfully tracked the tracking target (failed). An example of the functional configuration of the re-detection unit 250 is shown in the block diagram of Figure 3(c).

図3(c)において、抽出部211b、推定部212b、推定部213b、抽出部214b、はそれぞれ、抽出部211a、推定部212a、推定部213a、抽出部214a、と同様に動作する。つまり再検出部250は、取得部230と同様、撮像画像からそれぞれの検出領域について占有度および追尾特徴量を取得する。 In FIG. 3(c), the extraction unit 211b, estimation unit 212b, estimation unit 213b, and extraction unit 214b operate in the same manner as the extraction unit 211a, estimation unit 212a, estimation unit 213a, and extraction unit 214a, respectively. In other words, the re-detection unit 250, like the acquisition unit 230, acquires the occupancy rate and tracking feature amount for each detection area from the captured image.

処理部222は、それぞれの検出領域について取得した占有度および追尾特徴量を、記憶部218に格納された追尾対象の検出領域の占有度および追尾特徴量と比較して、該それぞれの検出領域のうち追尾対象の検出領域を特定(再検出)する。 The processing unit 222 compares the occupancy and tracking feature values acquired for each detection area with the occupancy and tracking feature values of the detection area of the tracking target stored in the memory unit 218, and identifies (redetects) the detection area of the tracking target among the respective detection areas.

次に、このような撮像装置100において追尾処理を実施するために該撮像装置100が行う処理について、図4のフローチャートに従って説明する。ステップS401では、撮像画像に含まれているオブジェクトの全体若しくは一部のうち追尾対象の検出領域について占有度および追尾特徴量を記憶部218に格納するための処理が行われる。ステップS401における処理の詳細について、図5のフローチャートに従って説明する。 Next, the processing performed by the imaging device 100 to perform tracking processing in such an imaging device 100 will be described with reference to the flowchart in FIG. 4. In step S401, processing is performed to store in the storage unit 218 the occupancy and tracking feature amounts for the detection area of the tracking target, which is the entire or part of the object included in the captured image. Details of the processing in step S401 will be described with reference to the flowchart in FIG. 5.

ステップS501では、取得部210は、撮像部105により生成された撮像画像を取得する。この撮像画像は、例えば、各画素におけるR(赤)の画素値、G(緑)の画素値、B(青)の画素値が何れも8ビットで表現されるRGBカラー画像のビットマップデータである。 In step S501, the acquisition unit 210 acquires the captured image generated by the imaging unit 105. This captured image is, for example, bitmap data of an RGB color image in which the R (red), G (green), and B (blue) pixel values of each pixel are all expressed in 8 bits.

ステップS502では、抽出部211aは、ステップS501で取得部210が取得した撮像画像から物体特徴量を抽出する。撮像画像から物体特徴量を抽出するための方法には様々な方法を適用することができるが、本実施形態では、抽出部211aは、ニューラルネットワークを用いて撮像画像から物体特徴量を抽出する。撮像画像から物体特徴量を抽出するために用いるニューラルネットワークの構成例を図6に示す。 In step S502, the extraction unit 211a extracts object features from the captured image acquired by the acquisition unit 210 in step S501. Various methods can be applied to extract object features from the captured image, but in this embodiment, the extraction unit 211a extracts object features from the captured image using a neural network. An example configuration of a neural network used to extract object features from the captured image is shown in Figure 6.

抽出部211aは、畳み込み層とプーリング層とを繰り返すことにより、認識タスクを行うニューラルネットワークである。抽出部211aは、複数の畳み込み層511、513、515と、複数のプーリング層512、514と、を有し、これらの層によって、入力画像(撮像画像)530から物体特徴量を抽出する。 The extraction unit 211a is a neural network that performs recognition tasks by repeatedly using convolutional layers and pooling layers. The extraction unit 211a has multiple convolutional layers 511, 513, and 515 and multiple pooling layers 512 and 514, and uses these layers to extract object features from the input image (captured image) 530.

畳み込み層では、入力画像または特徴マップに対して、例えば3×3サイズのフィルタを複数チャネル設定し、注目画素を中心に畳み込み演算を行い、複数チャネルに対応する複数の特徴マップ551、553、555を出力する。 In the convolutional layer, for example, a 3x3 filter is set on multiple channels for the input image or feature map, a convolution operation is performed centered on the pixel of interest, and multiple feature maps 551, 553, and 555 corresponding to the multiple channels are output.

プーリング層では、畳み込み層から出力された特徴マップを縮小した縮小特徴マップ552、554を生成する。2×2の範囲でプーリングを行う場合、特徴マップは1/4倍に縮小される。プーリングには最大値プーリングや平均値プーリングなどの方法を用いることができる。 The pooling layer generates reduced feature maps 552, 554 by reducing the feature maps output from the convolutional layer. When pooling within a 2x2 range, the feature maps are reduced by a factor of 4. Pooling can be performed using methods such as maximum value pooling or average value pooling.

なお、抽出部211aに適用可能なニューラルネットワークの構成は図6に示した構成に限らず、例えば、図6で示したニューラルネットワークよりも多層にしても構わないし、チャネル数を変更しても構わない。 Note that the configuration of the neural network applicable to the extraction unit 211a is not limited to the configuration shown in Figure 6; for example, the neural network may be made more multilayered than the one shown in Figure 6, or the number of channels may be changed.

ステップS503では、推定部212aは、ステップS502で抽出部211aが撮像画像から抽出した物体特徴量を用いて、該撮像画像中のオブジェクトの全体の画像領域や該オブジェクトの一部の画像領域を検出領域として推定する。この推定で推定部212aは、撮像画像から推定した検出領域ごとに、該検出領域の位置、該検出領域のサイズ、オブジェクトらしさを表す尤度、を推定する。 In step S503, the estimation unit 212a uses the object features extracted from the captured image by the extraction unit 211a in step S502 to estimate the entire image area of the object in the captured image or a partial image area of the object as a detection area. In this estimation, the estimation unit 212a estimates the position of the detection area, the size of the detection area, and the likelihood that it is an object, for each detection area estimated from the captured image.

本実施形態では、推定部212aもニューラルネットワークを用いて撮像画像から検出領域を推定する。図6を例にとると、特徴マップ555を全結合層556に入力することで、検出領域(検出枠)の位置、サイズ、尤度を出力し、これにより検出領域の推定を実現する。 In this embodiment, the estimation unit 212a also uses a neural network to estimate a detection area from a captured image. Taking Figure 6 as an example, the feature map 555 is input to the fully connected layer 556, which outputs the position, size, and likelihood of the detection area (detection frame), thereby estimating the detection area.

ステップS504では、推定部213aは、ステップS503で推定部212aが撮像画像から推定したそれぞれの検出領域について占有度を推定する。本実施形態では、推定部213aもニューラルネットワークを用いてそれぞれの検出領域の占有度を推定する。図6を例にとると、特徴マップ555を全結合層556に入力することで、検出領域の占有度を出力する。 In step S504, the estimation unit 213a estimates the occupancy rate for each detection region estimated from the captured image by the estimation unit 212a in step S503. In this embodiment, the estimation unit 213a also estimates the occupancy rate of each detection region using a neural network. Taking Figure 6 as an example, the feature map 555 is input to the fully connected layer 556, and the occupancy rate of the detection region is output.

ここで、占有度についてより詳細に説明する。検出領域の占有度とは、撮像画像中のオブジェクトの画像領域を該検出領域がどの程度捉えているかを表す度合いである。図7に示す具体例を用いて、検出領域の占有度について説明する。図7では、オブジェクトの一例として犬を用いている。 Here, we will explain occupancy in more detail. The occupancy of a detection area is the degree to which the detection area captures the image area of an object in a captured image. We will explain the occupancy of a detection area using the specific example shown in Figure 7. In Figure 7, a dog is used as an example of an object.

図7では、撮像画像600には犬の画像領域601が含まれており、推定部212aは、該犬の全身を含む検出領域602と、該犬の一部である頭部の検出領域603と、を推定している。 In Figure 7, the captured image 600 includes an image area 601 of a dog, and the estimation unit 212a estimates a detection area 602 that includes the entire body of the dog, and a detection area 603 that includes the head, which is part of the dog.

検出領域602は、画像領域601の全部を捉えており、画像領域601において該検出領域602が占める割合は100%であるので、推定部213aは、検出領域602の占有度は「1.0」と推定する。 The detection area 602 captures the entire image area 601, and the detection area 602 occupies 100% of the image area 601, so the estimation unit 213a estimates that the occupancy rate of the detection area 602 is "1.0".

検出領域603は、画像領域601の一部を捉えており、画像領域601において該検出領域603が占める割合が20%であるとすると、推定部213aは、検出領域603の占有度は「0.2」と推定する。 The detection area 603 captures a portion of the image area 601, and if the detection area 603 occupies 20% of the image area 601, the estimation unit 213a estimates that the occupancy rate of the detection area 603 is "0.2".

ステップS505では、抽出部214aは、ステップS503で推定部212aが撮像画像から推知したそれぞれの検出領域について、該検出領域に対応する追尾特徴量を抽出する。本実施形態では、抽出部214aもニューラルネットワークを用いて撮像画像からそれぞれの検出領域について追尾特徴量を抽出する。図6を例にとると、抽出部214aは、特徴マップ555のようなマップ形式の特徴マップを追尾特徴量として取得する。追尾特徴量のマップサイズは、ここでは幅、高さ、チャネルを1×1×C(Cは任意の自然数)とする。本実施形態では、ニューラルネットワークにより抽出された追尾特徴量を用いて説明するが、これに限らず輝度値、RGB値、それらのヒストグラム、SIFT特徴量、SURF特徴量などを追尾特徴量として用いても良い。 In step S505, the extraction unit 214a extracts tracking features corresponding to each detection area estimated from the captured image by the estimation unit 212a in step S503. In this embodiment, the extraction unit 214a also uses a neural network to extract tracking features for each detection area from the captured image. Taking FIG. 6 as an example, the extraction unit 214a acquires a feature map in map format such as feature map 555 as tracking features. Here, the map size of the tracking features is set to 1 x 1 x C (C is an arbitrary natural number) in terms of width, height, and channels. In this embodiment, tracking features extracted by a neural network will be used for explanation; however, this is not limiting; luminance values, RGB values, their histograms, SIFT features, SURF features, etc. may also be used as tracking features.

ステップS506では、選択部215は、入力部216が取得した画像座標と、入力部217が取得した占有度範囲と、に基づいて、ステップS503で推定部212aが撮像画像から推定した検出領域のうち追尾対象の検出領域を選択する。 In step S506, the selection unit 215 selects the detection area of the tracking target from the detection areas estimated from the captured image by the estimation unit 212a in step S503, based on the image coordinates acquired by the input unit 216 and the occupancy range acquired by the input unit 217.

選択部215による追尾対処の検出領域の選択処理について、図8(a)を例にとり説明する。撮像画像610において検出領域611~616はそれぞれ、推定部212aが撮像画像610から推定した検出領域である。 The process of selecting a detection area for tracking by the selection unit 215 will be explained using Figure 8(a) as an example. In the captured image 610, detection areas 611 to 616 are each detection areas estimated from the captured image 610 by the estimation unit 212a.

検出領域611は、犬の検出領域であり、検出領域612は該犬の一部である頭部の検出領域である。検出領域613は樹木の検出領域であり、検出領域614は該樹木の一部である花群の検出領域であり、検出領域615,616はそれぞれ該花群における花の検出領域である。点617は、ユーザが入力装置103を操作して追尾対象の位置として指示した指示位置を示す。 Detection area 611 is the detection area for the dog, and detection area 612 is the detection area for the head, which is part of the dog. Detection area 613 is the detection area for the tree, detection area 614 is the detection area for the group of flowers, which is part of the tree, and detection areas 615 and 616 are the detection areas for the flowers in the group of flowers. Point 617 indicates the position indicated by the user using input device 103 as the position of the tracking target.

入力部216は、点617に対応する画像座標を取得する。また、入力部217は、ユーザが入力装置103を操作して入力した「追尾対象の占有度として許容可能な範囲」を占有度範囲として取得する。 The input unit 216 acquires the image coordinates corresponding to point 617. In addition, the input unit 217 acquires, as the occupancy range, the "acceptable range for the occupancy of the tracking target" input by the user operating the input device 103.

選択部215は、検出領域611~616のうち、占有度が占有度範囲に含まれており且つ点617の画像座標を内包する検出領域を追尾対象の検出領域として選択する。「占有度が占有度範囲に含まれており且つ点617の画像座標を内包する検出領域」が複数存在する場合には、該複数存在する検出領域のうち点617の画像座標に最も近接する検出領域を追尾対象の検出領域として選択する。また、点617の画像座標を内包する検出領域が存在しない場合には、占有度が占有度範囲に含まれている検出領域のうち、点617の画像座標に最も近接する検出領域を追尾対象の検出領域として選択する。 The selection unit 215 selects, from among the detection areas 611 to 616, a detection area whose occupancy falls within the occupancy range and contains the image coordinates of point 617 as the detection area of the tracking target. If there are multiple "detection areas whose occupancy falls within the occupancy range and contain the image coordinates of point 617," the detection area closest to the image coordinates of point 617 among the multiple detection areas is selected as the detection area of the tracking target. Furthermore, if there is no detection area containing the image coordinates of point 617, the detection area whose occupancy falls within the occupancy range and is closest to the image coordinates of point 617 is selected as the detection area of the tracking target.

図8(a)の例では、点617を内包する検出領域は検出領域611のみである。ここで、占有度範囲が「0.01~0.6」である場合、検出領域611は点617を内包しているものの、占有度は1.0であり、占有度範囲には含まれていないため、検出領域611は追尾対象の検出領域として選択されない。このような場合、占有度範囲に含まれている占有度の検出領域のうち点617に最も近接する検出領域を追尾対象の検出領域として選択する。図8(a)の例では、検出領域612の占有度(0.2)は占有度範囲に含まれており、且つ検出領域611を除く検出領域612~616の中で検出領域612が点617に最も近接している検出領域である。よって、検出領域612が追尾対象の検出領域として選択される。 In the example of Figure 8(a), detection area 611 is the only detection area that contains point 617. Here, if the occupancy range is "0.01 to 0.6," detection area 611 contains point 617, but its occupancy is 1.0, so it is not included in the occupancy range and therefore detection area 611 is not selected as the detection area of the tracking target. In such a case, of the detection areas with occupancy levels included in the occupancy range, the detection area closest to point 617 is selected as the detection area of the tracking target. In the example of Figure 8(a), the occupancy level of detection area 612 (0.2) is included in the occupancy range, and of detection areas 612 to 616 excluding detection area 611, detection area 612 is the detection area closest to point 617. Therefore, detection area 612 is selected as the detection area of the tracking target.

ステップS507では、選択部215は、推定部213aがステップS504で推定した追尾対象の検出領域の占有度、抽出部214aがステップS505で抽出した追尾対象の検出領域の追尾特徴量、を記憶部218に格納(登録)する。記憶部218に格納された占有度および追尾特徴量の一例を図9に示す。 In step S507, the selection unit 215 stores (registers) in the memory unit 218 the occupancy rate of the detection area of the tracking target estimated by the estimation unit 213a in step S504 and the tracking feature amount of the detection area of the tracking target extracted by the extraction unit 214a in step S505. An example of the occupancy rate and tracking feature amount stored in the memory unit 218 is shown in Figure 9.

図4に戻って、次に、ステップS402では、追尾部219は、記憶部218に格納された追尾対象の検出領域の追尾特徴量と、選択部215が選択した追尾対象の検出領域もしくは再検出部250によって再検出された追尾対象の画像領域と、を用いて、取得部210が取得した撮像画像における該追尾対象を追尾する追尾処理を実行する。 Returning to FIG. 4, next, in step S402, the tracking unit 219 performs tracking processing to track the tracking target in the captured image acquired by the acquisition unit 210, using the tracking feature amounts of the detection area of the tracking target stored in the memory unit 218 and the detection area of the tracking target selected by the selection unit 215 or the image area of the tracking target re-detected by the re-detection unit 250.

ステップS403では、判定部221は、追尾部219における追尾処理が成功しているか否かを判定する。追尾部219における追尾処理が成功しているか否かを判定するための判定基準には様々な判定基準が考えられ、特定の判定基準に限らない。本実施形態では、判定部221は、撮像画像から取得部230が取得したそれぞれの検出領域の追尾特徴量と、記憶部218に格納されている追尾対象の追尾特徴量と、の類似度を求める。そして判定部221は、撮像画像から取得部230が取得した追尾特徴量のうち記憶部218に格納されている追尾対象の追尾特徴量との類似度が閾値以上となる追尾特徴量が1以上存在する場合、「追尾部219における追尾処理が成功している」と判定する。一方、判定部221は、撮像画像から取得部230が取得した追尾特徴量のうち記憶部218に格納されている追尾対象の追尾特徴量との類似度が閾値以上となる追尾特徴量がない場合、「追尾部219における追尾処理は成功していない(失敗)」と判定する。 In step S403, the determination unit 221 determines whether the tracking process in the tracking unit 219 has been successful. Various determination criteria are possible for determining whether the tracking process in the tracking unit 219 has been successful, and are not limited to specific determination criteria. In this embodiment, the determination unit 221 calculates the similarity between the tracking feature of each detection area acquired from the captured image by the acquisition unit 230 and the tracking feature of the tracking target stored in the memory unit 218. Then, if there is one or more tracking feature of the tracking feature acquired from the captured image by the acquisition unit 230 whose similarity with the tracking feature of the tracking target stored in the memory unit 218 is equal to or greater than a threshold, the determination unit 221 determines that "the tracking process in the tracking unit 219 has been successful." On the other hand, if there is no tracking feature acquired by the acquisition unit 230 from the captured image whose similarity with the tracking feature of the tracking target stored in the storage unit 218 is equal to or greater than a threshold, the determination unit 221 determines that "the tracking process in the tracking unit 219 has not been successful (failed)."

「追尾部219における追尾処理は成功していない(失敗)」と判定される状況の一例を図8(b)に示す。図8(b)に示す如く、追尾対象である犬が他のオブジェクトである樹木の物陰に隠れてしまった場合、撮像画像には犬の追尾特徴量との類似度が閾値以上となる追尾特徴量の検出領域が存在しない。よってこの場合、「追尾部219における追尾処理は成功していない(失敗)」と判定される。 Figure 8(b) shows an example of a situation in which it is determined that "the tracking process in the tracking unit 219 was not successful (failed)." As shown in Figure 8(b), if the dog being tracked is hidden behind a tree, which is another object, there is no detection area in the captured image where the tracking feature values have a similarity to the dog's tracking feature values that is equal to or greater than the threshold. Therefore, in this case, it is determined that "the tracking process in the tracking unit 219 was not successful (failed)."

このような判定の結果、追尾部219における追尾処理が成功していると判定された場合には、処理はステップS404に進む。一方、追尾部219における追尾処理は成功していないと判定された場合には、処理はステップS406に進む。 If, as a result of this determination, it is determined that the tracking process in the tracking unit 219 was successful, processing proceeds to step S404. On the other hand, if it is determined that the tracking process in the tracking unit 219 was not successful, processing proceeds to step S406.

ステップS404では、演算処理装置101は、撮像装置100の動作の終了条件が満たされているか否かを判断する。例えば、ユーザが入力装置103を操作して撮像装置100の動作の停止指示を入力したり、撮像装置100の電源をオフにするなどの操作を行うと、演算処理装置101は、撮像装置100の動作の終了条件が満たされたと判定する。 In step S404, the arithmetic processing unit 101 determines whether the conditions for terminating the operation of the imaging device 100 have been met. For example, when the user operates the input device 103 to input an instruction to stop the operation of the imaging device 100 or to turn off the power to the imaging device 100, the arithmetic processing unit 101 determines that the conditions for terminating the operation of the imaging device 100 have been met.

撮像装置100の動作の終了条件が満たされたと判定された場合には、図4のフローチャートに従った処理は終了する。一方、撮像装置100の動作の終了条件が満たされていないと判定した場合には、処理はステップS405に進む。 If it is determined that the conditions for terminating the operation of the imaging device 100 have been met, the processing according to the flowchart in FIG. 4 ends. On the other hand, if it is determined that the conditions for terminating the operation of the imaging device 100 have not been met, the processing proceeds to step S405.

ステップS405では、取得部210は、撮像部105により生成された撮像画像を取得する。そして処理はステップS402に進み、追尾部219は、ステップS405で取得部210が取得した撮像画像に対して追尾処理を実行する。 In step S405, the acquisition unit 210 acquires the captured image generated by the imaging unit 105. The process then proceeds to step S402, where the tracking unit 219 performs tracking processing on the captured image acquired by the acquisition unit 210 in step S405.

ステップS406では、抽出部211bは、ステップS502と同様にして、取得部210が取得した撮像画像から物体特徴量を抽出する。ステップS407では、推定部212bは、ステップS503と同様にして、抽出部211bが撮像画像から抽出した物体特徴量を用いて、該撮像画像中のオブジェクトの全体の画像領域や該オブジェクトの一部の画像領域を検出領域として推定する。これにより推定部212bは、撮像画像から推定した検出領域ごとに、該検出領域の位置、該検出領域のサイズ、オブジェクトらしさを表す尤度、を取得する。 In step S406, the extraction unit 211b extracts object features from the captured image acquired by the acquisition unit 210, similar to step S502. In step S407, the estimation unit 212b uses the object features extracted from the captured image by the extraction unit 211b to estimate the entire image area of the object in the captured image or a partial image area of the object as a detection area, similar to step S503. As a result, the estimation unit 212b acquires, for each detection area estimated from the captured image, the position of the detection area, the size of the detection area, and a likelihood representing the object-likeness of the detection area.

ステップS408では、推定部213bは、ステップS504と同様にして、推定部212bが撮像画像から推定したそれぞれの検出領域について占有度を推定する。ステップS409では、抽出部214bは、ステップS505と同様にして、推定部212bが撮像画像から推知したそれぞれの検出領域について、該検出領域に対応する追尾特徴量を抽出する。 In step S408, the estimation unit 213b estimates the occupancy rate for each detection area estimated from the captured image by the estimation unit 212b, similar to step S504. In step S409, the extraction unit 214b extracts tracking features corresponding to each detection area estimated from the captured image by the estimation unit 212b, similar to step S505.

ここで、ステップS409の処理の終了時に、図8(c)に示す如く、撮像画像から検出領域621~626が推定部212bによって推定されたとする。検出領域625は、犬の検出領域であり、検出領域626は該犬の一部である頭部の検出領域である。検出領域621は樹木の検出領域であり、検出領域622は該樹木の一部である花群の検出領域であり、検出領域623,624はそれぞれ該花群における花の検出領域である。このときの検出領域621~626のそれぞれの占有度および追尾特徴量の一例を図10に示す。「NO.」は各検出領域の参照番号、「ID」は各検出領域に固有の識別番号である。各検出領域の追尾特徴量は、追尾対象の追尾特徴量と同様のマップ形式を取り、そのマップサイズは、ここでは、幅、高さ、チャネルを1×1×Cとする。 Here, at the end of the processing of step S409, it is assumed that detection areas 621-626 have been estimated from the captured image by the estimation unit 212b, as shown in Figure 8(c). Detection area 625 is the detection area of the dog, and detection area 626 is the detection area of the head, which is part of the dog. Detection area 621 is the detection area of a tree, detection area 622 is the detection area of a group of flowers, which is part of the tree, and detection areas 623 and 624 are the detection areas of flowers in the group of flowers. An example of the occupancy and tracking features of each of detection areas 621-626 at this time is shown in Figure 10. "NO." is the reference number of each detection area, and "ID" is an identification number unique to each detection area. The tracking features of each detection area take the same map format as the tracking features of the tracked target, and the map size here is 1x1xC in width, height, and channel.

ステップS410では、処理部222は、撮像画像から追尾対象の検出領域の再検出を行う。まず処理部222は、記憶部218から、追尾対象の検出領域の占有度OCCを取得する。そして処理部222は、下記の式に示す如く、撮像画像中の検出領域のうち、占有度OCCに基づく範囲に含まれる占有度を求めた検出領域を、候補検出領域とする。 In step S410, the processing unit 222 re-detects the detection area of the tracking target from the captured image. First, the processing unit 222 acquires the occupancy OCC T of the detection area of the tracking target from the storage unit 218. Then, as shown in the following formula, the processing unit 222 determines, as a candidate detection area, a detection area in the captured image whose occupancy is found to be included in a range based on the occupancy OCC T.

OCC-α<OCCID<OCC+α
OCCIDは、撮像画像から推定されたそれぞれの検出領域の占有度である。αは、追尾対象の検出領域の占有度の変動の許容範囲に関する値であり、例えばここでは、0.05とする。OCC=0.2の場合、0.15<OCCID<0.25を満たすOCCIDに対応する検出領域が候補検出領域となる。図10では、占有度が0.20である検出領域622と占有度が0.18の検出領域626の2つが候補検出領域となる。
OCC T - α < OCC ID < OCC T + α
The OCC ID is the occupancy of each detection area estimated from the captured image. α is a value related to the allowable range of fluctuation in the occupancy of the detection area of the tracking target, and is set to 0.05 here, for example. When OCC T = 0.2, the detection areas corresponding to the OCC IDs that satisfy 0.15 < OCC ID < 0.25 are candidate detection areas. In FIG. 10 , the two candidate detection areas are the detection area 622 with an occupancy of 0.20 and the detection area 626 with an occupancy of 0.18.

次に処理部222は、候補検出領域のうち、記憶部218から取得した追尾対象の追尾特徴量との相関値が閾値(≧0)以上且つ最も高い追尾特徴量の候補検出領域を、追尾対象の検出領域として決定する。図10の例では、処理部222は、追尾対象の追尾特徴量F(1、1、C)と、検出領域622の追尾特徴量F(1、1、C)と、の相関値X1を求める。また、処理部222は、追尾対象の追尾特徴量F(1、1、C)と、検出領域626の追尾特徴量F(1、1、C)と、の相関値X2を求める。そして処理部222は、相関値X1が相関値X2よりも高く、且つ相関値X1が閾値以上であれば、検出領域622を追尾対象の検出領域として決定する。一方、処理部222は、相関値X2が相関値X1よりも高く、且つ相関値X2が閾値以上であれば、検出領域626を追尾対象の検出領域として決定する。なお、相関値X1および相関値X2の何れも閾値未満であれば、再検出部250は、追尾対象の検出領域の決定は行わず、次に入力される撮像画像について同様の処理を行って追尾対象の検出領域の再検出を行う。本実施形態では、再検出部250は、追尾対象の検出領域の再検出を開始してから予め設定された期間内に入力されるそれぞれの撮像画像について追尾対象の検出領域の再検出を行う。再検出部250は、追尾対象の検出領域の再検出を開始してから予め設定された期間内に入力されるそれぞれの撮像画像について追尾対象の検出領域の再検出を行っても追尾対象の検出領域が決定できなかった場合には、再検出失敗として動作を終了する。 Next, processing unit 222 determines, from among the candidate detection areas, the candidate detection area having the highest correlation value with the tracking feature of the tracking target acquired from storage unit 218 and equal to or greater than a threshold (≧0), as the detection area of the tracking target. In the example of Fig. 10 , processing unit 222 calculates a correlation value X1 between the tracking feature F T (1, 1, C) of the tracking target and the tracking feature F 2 (1, 1, C) of detection area 622. Processing unit 222 also calculates a correlation value X2 between the tracking feature F T (1, 1, C) of the tracking target and the tracking feature F 6 (1, 1, C) of detection area 626. Then, if correlation value X1 is higher than correlation value X2 and correlation value X1 is equal to or greater than the threshold, processing unit 222 determines detection area 622 as the detection area of the tracking target. On the other hand, if the correlation value X2 is higher than the correlation value X1 and is equal to or greater than the threshold, the processing unit 222 determines the detection area 626 as the detection area of the tracking target. Note that if both the correlation value X1 and the correlation value X2 are less than the threshold, the re-detection unit 250 does not determine the detection area of the tracking target, but instead performs the same process on the next captured image input to redetect the detection area of the tracking target. In this embodiment, the re-detection unit 250 redetects the detection area of the tracking target for each captured image input within a predetermined period after starting re-detection of the detection area of the tracking target. If the re-detection unit 250 is unable to determine the detection area of the tracking target even after re-detecting the detection area of the tracking target for each captured image input within a predetermined period after starting re-detection of the detection area of the tracking target, the re-detection unit 250 considers the re-detection to be a failure and terminates operation.

よって、ステップS410における再検出処理の結果、追尾対象の検出領域が決定できた場合には、処理はステップS402に進み、追尾対象の検出領域が決定できなかった場合には、処理はステップS411に進む。 Therefore, if the redetection process in step S410 results in the detection area of the tracking target being determined, processing proceeds to step S402; if the detection area of the tracking target cannot be determined, processing proceeds to step S411.

ステップS411では、再検出部250は、追尾対象の検出領域の再検出を開始してから予め設定された期間(所定時間)が経過したか否かを判断する。この判断の結果、追尾対象の検出領域の再検出を開始してから予め設定された期間(所定時間)が経過した場合には、図4のフローチャートに従った処理は終了する。一方、追尾対象の検出領域の再検出を開始してから未だ予め設定された期間(所定時間)経過していない場合には、処理はステップS410に進む。 In step S411, the redetection unit 250 determines whether a preset period (predetermined time) has elapsed since redetection of the detection area of the tracking target began. If this determination shows that the preset period (predetermined time) has elapsed since redetection of the detection area of the tracking target began, processing according to the flowchart in FIG. 4 ends. On the other hand, if the preset period (predetermined time) has not yet elapsed since redetection of the detection area of the tracking target began, processing proceeds to step S410.

このように、本実施形態では、撮像画像中の追尾対象の画像領域もしくは該追尾対象が属するオブジェクトの画像領域における該追尾対象の画像領域の割合を示す占有度と、該追尾対象の特徴量と、を登録しておく。そして、撮像画像中の追尾対象の追尾が成功していないと判定された場合には、該登録しておいた占有度および特徴量に基づいて、撮像画像から追尾対象の画像領域の再検出を行う。 In this way, in this embodiment, the occupancy rate, which indicates the proportion of the image area of the tracking target in the captured image or the image area of the object to which the tracking target belongs, and the feature values of the tracking target are registered. Then, if it is determined that tracking of the tracking target in the captured image has not been successful, the image area of the tracking target is re-detected from the captured image based on the registered occupancy rate and feature values.

図8(c)に示す如く、犬が図8(a)の撮像画像(記憶部218に格納した占有度および追尾特徴量の取得元である撮像画像)における犬よりも画面奥方向に移動していた場合、図8(c)の犬のサイズは図8(a)の犬のサイズと比べて相対的に小さくなる。ここで、図8(c)における犬全体のサイズが図8(a)における犬頭部のサイズと同程度のサイズであるとする。この場合、犬頭部および犬全体のそれぞれの追尾特徴量は比較的類似したものになるため、追尾特徴量のみを用いて追尾対象の検出を行っていると、図8(c)における犬全体を犬頭部と誤って再検出する可能性がある。その場合、再検出前後で追尾対象が犬頭部から犬全体に変化してしまう。本実施形態では、追尾特徴量に加えて占有度を用いて追尾対象の再検出を行うので、記憶部218に格納した占有度および追尾特徴量の取得元である撮像画像から追尾対象のサイズが変化した場合であっても、追尾対象を安定的に再検出することができる。 As shown in FIG. 8(c), if the dog has moved further into the screen than the dog in the captured image of FIG. 8(a) (the captured image from which the occupancy and tracking features stored in the memory unit 218 were obtained), the size of the dog in FIG. 8(c) will be relatively smaller than the size of the dog in FIG. 8(a). Here, assume that the size of the entire dog in FIG. 8(c) is approximately the same as the size of the dog's head in FIG. 8(a). In this case, the tracking features of the dog's head and the entire dog will be relatively similar, so if the tracking target is detected using only the tracking features, there is a possibility that the entire dog in FIG. 8(c) will be mistakenly redetected as the dog's head. In that case, the tracking target will change from the dog's head to the entire dog before and after redetection. In this embodiment, the tracking target is redetected using the occupancy in addition to the tracking features. Therefore, the tracking target can be reliably redetected even if the size of the tracking target has changed since the captured image from which the occupancy and tracking features stored in the memory unit 218 were obtained.

さらに、図8(c)において不特定物体の検出を行うと、犬や樹木及びそれらの部分など多数の検出領域が推定されるので、それらの検出領域の中から追尾特徴量のみで追尾対象の検出領域を特定するのは難しい。しかし、追尾対象が不特定物体であっても、追尾特徴量に加えて占有度を用いて追尾対象の再検出を行うことで、追尾対象を安定的に再検出することができる。 Furthermore, when detecting an unspecified object in Figure 8(c), many detection areas are estimated, such as dogs, trees, and parts of them, making it difficult to identify the detection area of the tracking target from among these detection areas using only the tracking feature amounts. However, even if the tracking target is an unspecified object, redetecting the tracking target using the occupancy in addition to the tracking feature amounts makes it possible to stably redetect the tracking target.

次に、上記の抽出部211a/211b、推定部212a/212b、推定部213a/213b、抽出部214a/214bにて用いられるニューラルネットワークの学習処理を行う学習装置700について説明する。 Next, we will explain the learning device 700 that performs learning processes for the neural networks used in the extraction units 211a/211b, estimation units 212a/212b, estimation units 213a/213b, and extraction units 214a/214b.

以下では、抽出部211aおよび抽出部211bに共通の説明を行う場合には、抽出部211aおよび抽出部211bをまとめて抽出部211と称する。同様に、推定部212aおよび推定部212bに共通の説明を行う場合には、推定部212aおよび推定部212bをまとめて推定部212と称する。同様に、推定部213aおよび推定部213bに共通の説明を行う場合には、推定部213aおよび推定部213bをまとめて推定部213と称する。同様に、抽出部214aおよび抽出部214bに共通の説明を行う場合には、抽出部214aおよび抽出部214bをまとめて抽出部214と称する。 In the following, when a common description is given for extraction unit 211a and extraction unit 211b, extraction unit 211a and extraction unit 211b will be collectively referred to as extraction unit 211. Similarly, when a common description is given for estimation unit 212a and estimation unit 212b, estimation unit 212a and estimation unit 212b will be collectively referred to as estimation unit 212. Similarly, when a common description is given for estimation unit 213a and estimation unit 213b, estimation unit 213a and estimation unit 213b will be collectively referred to as estimation unit 213. Similarly, when a common description is given for extraction unit 214a and extraction unit 214b, extraction unit 214a and extraction unit 214b will be collectively referred to as extraction unit 214.

本実施形態に係る学習装置700の機能構成例について、図11のブロック図を用いて説明する。なお、図11の抽出部211、推定部212、推定部213は何れも学習装置700による学習対象として示したものであって、これらの機能部を学習装置700が有することを示したものではない。 An example of the functional configuration of the learning device 700 according to this embodiment will be described using the block diagram in Figure 11. Note that the extraction unit 211, estimation unit 212, and estimation unit 213 in Figure 11 are all shown as learning targets by the learning device 700, and do not indicate that the learning device 700 has these functional units.

以下では、図11に示した機能部(抽出部211、推定部212、推定部213、記憶部701を除く)を処理の主体として説明する場合がある。しかし実際には、これらの機能部の機能を演算処理装置130に実行させるためのコンピュータプログラムを該演算処理装置130が実行することで、該機能部の機能が実現される。 In the following, the functional units shown in Figure 11 (excluding the extraction unit 211, estimation unit 212, estimation unit 213, and memory unit 701) may be described as the main processing units. However, in reality, the functions of these functional units are realized by the arithmetic processing unit 130 executing a computer program that causes the arithmetic processing unit 130 to execute the functions of the functional units.

記憶部701には、抽出部211、推定部212、推定部213にて用いられるニューラルネットワークの学習に用いる学習データが格納されている。学習データには、学習画像、該学習画像中のオブジェクトの全体もしくは一部の画像領域である基準領域の位置(中心位置、左上隅の位置など)およびサイズ(縦サイズおよび横サイズ)を示す領域情報、該基準領域の占有度、のセットが複数含まれている。 The memory unit 701 stores training data used to train the neural networks used in the extraction unit 211, estimation unit 212, and estimation unit 213. The training data includes multiple sets of training images, area information indicating the position (center position, upper left corner position, etc.) and size (vertical size and horizontal size) of a reference area, which is the image area of the entire or partial object in the training image, and the occupancy rate of the reference area.

取得部702は、記憶部701から学習データを取得する。取得部703は、取得部702が取得した学習データに含まれている学習画像を取得する。抽出部211は、取得部703が取得した学習画像から物体特徴量を抽出する。 The acquisition unit 702 acquires training data from the storage unit 701. The acquisition unit 703 acquires training images included in the training data acquired by the acquisition unit 702. The extraction unit 211 extracts object features from the training images acquired by the acquisition unit 703.

推定部212は、抽出部211が学習画像から抽出した物体特徴量を用いて、該学習画像中のオブジェクトの全体の画像領域や該オブジェクトの一部の画像領域を検出領域として推定する。これにより推定部212は、学習画像から推定した検出領域ごとに、該学習画像における該検出領域の位置(中心位置、左上隅の位置等)、該検出領域のサイズ(縦サイズおよび横サイズ)、該検出領域に含まれる対象のオブジェクトらしさを表す尤度、を求める。 The estimation unit 212 uses the object features extracted from the training image by the extraction unit 211 to estimate the entire image area of the object in the training image or a partial image area of the object as a detection area. As a result, for each detection area estimated from the training image, the estimation unit 212 calculates the position of the detection area in the training image (center position, upper left corner position, etc.), the size of the detection area (vertical size and horizontal size), and the likelihood that the target included in the detection area is an object.

推定部213は、抽出部212が学習画像から推定したそれぞれの検出領域について、該学習画像におけるオブジェクトの全体の画像領域を包含する画像領域のうち該検出領域が占める割合を占有度として推定する。 For each detection area estimated from the training image by the extraction unit 212, the estimation unit 213 estimates the occupancy as the proportion of the image area that the detection area occupies in the image area that includes the entire image area of the object in the training image.

算出部707は、推定部212が学習画像から推定した検出領域の位置およびサイズと、該学習画像とセットになっている領域情報が示す基準領域の位置およびサイズと、の間の誤差(位置の誤差およびサイズの誤差に基づく誤差)を領域誤差として求める。算出部707は、「位置の誤差」として、例えば、検出領域の位置と基準領域の位置との間の距離を求める。また算出部707は、「サイズの誤差」として、例えば、検出領域の縦サイズと基準領域の縦サイズとの差分と、検出領域の横サイズと基準領域の横サイズとの差分と、の和を求める。そして例えば、算出部707は、「位置の誤差」と「サイズの誤差」との和を、全ての検出領域について求め、全ての検出領域について求めた和の総和を領域誤差として求める。 The calculation unit 707 calculates, as the region error, the error (error based on the position error and size error) between the position and size of the detection region estimated by the estimation unit 212 from the training image and the position and size of the reference region indicated by the region information paired with the training image. The calculation unit 707 calculates, for example, the distance between the position of the detection region and the position of the reference region as the "position error." The calculation unit 707 also calculates, for example, the sum of the difference between the vertical size of the detection region and the vertical size of the reference region and the difference between the horizontal size of the detection region and the horizontal size of the reference region as the "size error." Then, for example, the calculation unit 707 calculates the sum of the "position error" and the "size error" for all detection regions, and calculates the sum of the sums calculated for all detection regions as the region error.

算出部708は、推定部213が学習画像から推定した検出領域ごとの占有度と、基準領域ごとの占有度と、の差分を占有度誤差として求める。学習部709は、算出部707が求めた領域誤差および算出部708が求めた占有度誤差が小さくなるように、抽出部211、推定部212、推定部213で用いるニューラルネットワークのパラメータを更新する。ニューラルネットワークのパラメータは、例えば、該ニューラルネットワークにおける畳込み層及び全結合層の重み係数である。このような更新処理により、ニューラルネットワークの学習処理を実現させる。 The calculation unit 708 calculates the difference between the occupancy for each detection region estimated from the training image by the estimation unit 213 and the occupancy for each reference region as the occupancy error. The learning unit 709 updates the parameters of the neural networks used by the extraction unit 211, estimation unit 212, and estimation unit 213 so as to reduce the region error calculated by the calculation unit 707 and the occupancy error calculated by the calculation unit 708. The neural network parameters are, for example, the weight coefficients of the convolutional layer and fully connected layer in the neural network. This updating process realizes the neural network learning process.

上記の学習装置700によるニューラルネットワークの学習処理について、図12のフローチャートに従って説明する。ステップS801では、取得部702は、記憶部701から学習データを取得する。取得部703は、取得部702が取得した学習データに含まれている学習画像を取得する。学習データは事前に作成して記憶部701に格納されている。ここで、学習データの作成方法について、図13を用いて説明する。学習データの作成は学習装置700が行っても良いし、他の装置が行っても良い。 The neural network learning process performed by the learning device 700 will be described with reference to the flowchart in Figure 12. In step S801, the acquisition unit 702 acquires learning data from the storage unit 701. The acquisition unit 703 acquires learning images included in the learning data acquired by the acquisition unit 702. The learning data is created in advance and stored in the storage unit 701. A method for creating the learning data will now be described with reference to Figure 13. The learning data may be created by the learning device 700 or by another device.

図13(a)において、人物1350を含む学習画像1300には、人物1350の全身の画像領域1310、人物1350の頭部の画像領域1320、人物1350の胴体の画像領域1330、人物1350の下半身の画像領域1340、が設定されている。 In Figure 13(a), a training image 1300 including a person 1350 has an image area 1310 of the entire body of the person 1350, an image area 1320 of the head of the person 1350, an image area 1330 of the torso of the person 1350, and an image area 1340 of the lower body of the person 1350 set.

図13(b)の人物1450をクローズアップして撮像した学習画像1400には、人物1450の頭部の画像領域1402、人物1450の胴体の画像領域1403、学習画像1400における人物1450の全体を含む画像領域1404、が設定されている。 In the training image 1400, which is a close-up image of the person 1450 in Figure 13(b), an image area 1402 of the head of the person 1450, an image area 1403 of the torso of the person 1450, and an image area 1404 including the entire person 1450 in the training image 1400 are set.

図13(c)の自動車1550を含む学習画像1500には、自動車1550の全体を含む画像領域1501、ヘッドライトの画像領域1502,1503、タイヤの画像領域1504,1505、フロントガラスの画像領域1506、が設定されている。 In the training image 1500 containing the automobile 1550 in Figure 13(c), an image region 1501 containing the entire automobile 1550, image regions 1502 and 1503 of the headlights, image regions 1504 and 1505 of the tires, and an image region 1506 of the windshield are set.

図13(d)において、猫1650を含む学習画像1600には、猫1650の全身の画像領域1601、頭部の画像領域1602、右目の画像領域1603、左目の画像領域1604、胴体の画像領域1605、が設定されている。 In Figure 13 (d), a training image 1600 containing a cat 1650 has an image area 1601 for the entire body of the cat 1650, an image area 1602 for the head, an image area 1603 for the right eye, an image area 1604 for the left eye, and an image area 1605 for the torso set.

学習画像上におけるオブジェクトの画像領域やオブジェクトの一部の画像領域の設定は、例えばユーザが入力装置103のようなユーザインターフェースを用いて手動で行っても良いし、検出器により検出された画像領域を設定することで行っても良い。また、検出器により検出された画像領域をユーザが手動で修正しても良い。 The image area of an object or a portion of an object on a training image may be set manually by the user using a user interface such as the input device 103, or by setting the image area detected by the detector. The image area detected by the detector may also be manually corrected by the user.

このようにして学習画像に対して設定されたオブジェクトの画像領域やオブジェクトの一部の画像領域の位置およびサイズを示す領域情報が該学習画像とセットで学習データに登録される。なお、オブジェクトによっては画像領域の回転方向および回転角度を示す回転情報を学習データに含めても良い。 In this way, area information indicating the position and size of the image area of an object or a part of the image area of an object set in the training image is registered in the training data together with the training image. Note that, depending on the object, rotation information indicating the rotation direction and angle of the image area may also be included in the training data.

また、学習画像中のオブジェクトの全体の画像領域の面積(画素数)に対する「オブジェクトの全体の画像領域もしくはオブジェクトの一部の画像領域」の面積の割合を該画像領域の占有度として求め、該占有度を該学習画像とセットで学習データに登録する。 In addition, the ratio of the area of the "entire image area of the object or a portion of the object's image area" to the area (number of pixels) of the entire image area of the object in the training image is calculated as the occupancy of that image area, and this occupancy is registered in the training data together with the training image.

図13(a)の例では、人物1350の全身の画像領域1310の面積に対する該画像領域1310の面積の割合を該画像領域1310の占有度として求める(この場合の占有度は1.0となる)。また、人物1350の全身の画像領域1310の面積に対する頭部の画像領域1320の面積の割合を画像領域1320の占有度として求める。また、画像領域1310の面積に対する胴体の画像領域1330の面積の割合を画像領域1330の占有度として求める。また、画像領域1310の面積に対する下半身の画像領域1340の面積の割合を画像領域1340の占有度として求める。図13(a)の例では、下半身の画像領域1340の面積は画像領域1310の面積の半分ぐらいであるから、画像領域1340の占有度は0.5と算出される。 In the example of Figure 13(a), the ratio of the area of image region 1310 to the area of image region 1310 of the entire body of person 1350 is calculated as the occupancy of image region 1310 (the occupancy in this case is 1.0). The ratio of the area of image region 1320 of the head to the area of image region 1310 of the entire body of person 1350 is calculated as the occupancy of image region 1320. The ratio of the area of image region 1330 of the torso to the area of image region 1310 is calculated as the occupancy of image region 1330. The ratio of the area of image region 1340 of the lower body to the area of image region 1310 is calculated as the occupancy of image region 1340. In the example of Figure 13(a), the area of image region 1340 of the lower body is about half the area of image region 1310, so the occupancy of image region 1340 is calculated as 0.5.

図13(b)の例のように、人物1450をクローズアップして撮像した学習画像1400の場合には、人物1450の一部の画像領域1404は存在するものの、人物1450の全身の画像領域が存在しない。このような場合には、ユーザが人物1450の全身の画像領域に対する画像領域1404の占有度を目測で推測して入力する。そして、頭部の画像領域1402の占有度を求める際には、画像領域1404の面積に対する画像領域1402の面積の割合と、画像領域1404の占有度と、の積を画像領域1402の占有度として求める。また、胴体の画像領域1403の占有度を求める際には、画像領域1404の面積に対する画像領域1403の面積の割合と、画像領域1404の占有度と、の積を画像領域1403の占有度として求める。また、ユーザが頭部の画像領域1402および胴体の画像領域1403の占有度を目測で推測して入力しても良い。 As shown in the example of Figure 13(b), in the case of learning image 1400 captured by capturing a close-up of person 1450, image area 1404 of a portion of person 1450 is present, but the image area of person 1450's entire body is not present. In such a case, the user visually estimates and inputs the occupancy of image area 1404 relative to the image area of person 1450's entire body. When calculating the occupancy of image area 1402 of the head, the occupancy of image area 1402 is calculated as the product of the ratio of the area of image area 1402 to the area of image area 1404 and the occupancy of image area 1404. When calculating the occupancy of image area 1403 of the torso, the occupancy of image area 1403 is calculated as the product of the ratio of the area of image area 1403 to the area of image area 1404 and the occupancy of image area 1404. The user may also visually estimate and input the occupancy of image area 1402 of the head and image area 1403.

図13(c)の例では、自動車1550の全体を含む画像領域1501の面積に対する該画像領域1501の面積の割合を該画像領域1501の占有度として求める。また、画像領域1501の面積に対する自動車1550のヘッドライトの画像領域1502の面積の割合を該画像領域1502の占有度として求める。また、画像領域1501の面積に対する自動車1550のヘッドライトの画像領域1503の面積の割合を該画像領域1503の占有度として求める。また、画像領域1501の面積に対する自動車1550のタイヤの画像領域1504の面積の割合を該画像領域1504の占有度として求める。また、画像領域1501の面積に対する自動車1550のタイヤの画像領域1505の面積の割合を該画像領域1505の占有度として求める。また、画像領域1501の面積に対する自動車1550のフロントガラスの画像領域1506の面積の割合を画像領域1506の占有度として求める。 In the example of Figure 13 (c), the ratio of the area of image area 1501 to the area of image area 1501, which includes the entire automobile 1550, is calculated as the occupancy of image area 1501. The ratio of the area of image area 1502 of the automobile 1550's headlights to the area of image area 1501 is calculated as the occupancy of image area 1502. The ratio of the area of image area 1503 of the automobile 1550's headlights to the area of image area 1501 is calculated as the occupancy of image area 1503. The ratio of the area of image area 1504 of the automobile 1550's tires to the area of image area 1501 is calculated as the occupancy of image area 1504. The ratio of the area of image area 1505 of the automobile 1550's tires to the area of image area 1501 is calculated as the occupancy of image area 1505. Additionally, the ratio of the area of the image area 1506 of the windshield of the automobile 1550 to the area of the image area 1501 is calculated as the occupancy of the image area 1506.

図13(d)の例では、猫1650の全身の画像領域1601の面積に対する該画像領域1601の面積の割合を該画像領域1601の占有度として求める。また、画像領域1601の面積に対する猫1650の頭部の画像領域1602の面積の割合を該画像領域1602の占有度として求める。また、画像領域1601の面積に対する猫1650の右目の画像領域1603の面積の割合を該画像領域1603の占有度として求める。また、画像領域1601の面積に対する猫1650の左目の画像領域1604の面積の割合を該画像領域1604の占有度として求める。また、画像領域1601の面積に対する猫1650の胴体の画像領域1605の面積の割合を該画像領域1605の占有度として求める。 In the example of Figure 13(d), the ratio of the area of image region 1601 to the area of image region 1601 of the entire body of cat 1650 is calculated as the occupancy of image region 1601. The ratio of the area of image region 1602 of cat 1650's head to the area of image region 1601 is calculated as the occupancy of image region 1602. The ratio of the area of image region 1603 of cat 1650's right eye to the area of image region 1601 is calculated as the occupancy of image region 1603. The ratio of the area of image region 1604 of cat 1650's left eye to the area of image region 1601 is calculated as the occupancy of image region 1604. The ratio of the area of image region 1605 of cat 1650's to the area of image region 1601 is calculated as the occupancy of image region 1605.

検出するオブジェクトの種別(カテゴリ)を限定して検出領域を推定したい場合には、限定した種別のオブジェクトの学習データを準備すればよい。例えば、人物を検出したい場合には、人物の学習データを準備すればよく、自動車を検出したい場合には自動車の学習データを準備すればよい。検出するオブジェクトの種別を限定せずに検出領域を推定したい場合には、様々な種別のオブジェクトの学習データを準備すればよい。 If you want to estimate a detection area by limiting the type (category) of object to be detected, you can prepare training data for the limited type of object. For example, if you want to detect people, you can prepare training data for people, and if you want to detect cars, you can prepare training data for cars. If you want to estimate a detection area without limiting the type of object to be detected, you can prepare training data for various types of objects.

例えば、図13に示した人物、自動車、猫に加えて、電車、飛行機、昆虫、鳥、犬など様々な種別のオブジェクトの学習データを準備すればよい。このように様々な種別のオブジェクトの学習データを準備し、適切に学習処理が実行できれば、学習データに含まれていない種別のオブジェクトも検出可能となる。例えば、魚の学習データがなくても、魚らしさを検出することができるので、魚の検出が可能となる。 For example, in addition to the people, cars, and cats shown in Figure 13, training data for various types of objects such as trains, airplanes, insects, birds, and dogs can be prepared. If training data for various types of objects is prepared in this way and the training process is performed appropriately, it will be possible to detect object types that are not included in the training data. For example, even if there is no training data for fish, it will be possible to detect fish because it is possible to detect their fish-likeness.

図12に戻って、次に、ステップS802では、抽出部211は、ステップS801で取得部703が取得した学習画像から、学習中のニューラルネットワークを用いて、物体特徴量を抽出する。 Returning to FIG. 12, next, in step S802, the extraction unit 211 extracts object features from the training image acquired by the acquisition unit 703 in step S801 using the neural network currently being trained.

ステップS803では、推定部212は、ステップS802で学習画像から抽出された物体特徴量と、学習中のニューラルネットワークと、を用いて、該学習画像中のオブジェクトの全体の画像領域や該オブジェクトの一部の画像領域を検出領域として推定する。 In step S803, the estimation unit 212 uses the object features extracted from the training image in step S802 and the neural network being trained to estimate the entire image area of the object in the training image or a partial image area of the object as the detection area.

ステップS804では、推定部213は学習中のニューラルネットワークを用いて、ステップS803で抽出部212が学習画像から推定したそれぞれの検出領域について占有度を推定する。 In step S804, the estimation unit 213 uses the neural network being trained to estimate the occupancy rate for each detection area estimated from the training image by the extraction unit 212 in step S803.

ステップS805では、算出部707は、推定部212が学習画像から推定した検出領域の位置およびサイズと、該学習画像とセットになっている領域情報が示す基準領域の位置およびサイズと、に基づいて領域誤差を求める。例えば、算出部707は、推定部212で推定した検出領域の中心座標およびサイズの、学習データ中の対応する基準領域の中心座標およびサイズに対するずれ量(例えば二乗誤差)を足し合わせて求める。 In step S805, the calculation unit 707 calculates the region error based on the position and size of the detection region estimated by the estimation unit 212 from the training image and the position and size of the reference region indicated by the region information paired with the training image. For example, the calculation unit 707 calculates the region error by adding the deviation (e.g., squared error) of the center coordinates and size of the detection region estimated by the estimation unit 212 from the center coordinates and size of the corresponding reference region in the training data.

ステップS806では、算出部708は、学習画像におけるそれぞれの検出領域について、推定部213が推定した該検出領域の占有度と、該学習画像とセットになっている対応領域の占有度と、の差分(例えば二乗誤差)を求める。そして算出部708は、学習画像におけるそれぞれの検出領域について求めた差分の総和を占有度誤差として求める。 In step S806, the calculation unit 708 calculates the difference (e.g., squared error) between the occupancy of each detection region in the training image estimated by the estimation unit 213 and the occupancy of the corresponding region paired with the training image. The calculation unit 708 then calculates the sum of the differences calculated for each detection region in the training image as the occupancy error.

ステップS807では、学習部709は、算出部707が求めた領域誤差と算出部708が求めた占有度誤差との和(損失値)が小さくなるように、抽出部211、推定部212、推定部213で用いるニューラルネットワークのパラメータを更新する。該パラメータの更新には、例えば、誤差逆伝搬法を用いることができる。 In step S807, the learning unit 709 updates the parameters of the neural networks used by the extraction unit 211, estimation unit 212, and estimation unit 213 so as to reduce the sum (loss value) of the area error calculated by the calculation unit 707 and the occupancy error calculated by the calculation unit 708. The parameters can be updated using, for example, backpropagation.

ステップS808では、学習部709は、学習の終了条件が満たされたか否かを判断する。学習の終了条件には様々な条件があり、特定の条件に限らない。例えば、学習の終了条件には、損失値が閾値以下、損失値の変化率が閾値以下、パラメータの更新回数が閾値以上、等がある。また例えば、パラメータ更新のための学習データとは別に精度検証用の学習データを用意しておき、上記のステップS801~ステップS807の処理を行って、損失値の総和が閾値以下になった場合に学習の終了条件が満たされたと判断するようにしても良い。 In step S808, the learning unit 709 determines whether the learning termination condition has been met. There are various conditions for terminating learning, and they are not limited to specific conditions. For example, the learning termination condition may be that the loss value is below a threshold, the rate of change of the loss value is below a threshold, or the number of parameter updates is above a threshold. Alternatively, for example, learning data for accuracy verification may be prepared separately from the learning data for parameter update, and the processing of steps S801 to S807 described above may be performed, and the learning termination condition may be determined to be met when the sum of the loss values is below a threshold.

このような判断の結果、学習の終了条件が満たされたと判断した場合には、図12のフローチャートに従った処理は終了し、学習の終了条件は満たされていないと判断した場合には、処理はステップS801に進む。 If it is determined that the learning termination conditions have been met, processing according to the flowchart in Figure 12 ends; if it is determined that the learning termination conditions have not been met, processing proceeds to step S801.

次に、抽出部214に係る学習について説明する。記憶部701には、抽出部214の学習用のデータ(学習データ)が格納されている。抽出部214の学習データには、同じオブジェクトを含む2枚の学習画像、該学習画像中の追尾対象の画像領域の位置(中心位置、左上隅の位置など)およびサイズ(縦サイズおよび横サイズ)を示す領域情報、該画像領域の占有度、のセットが複数含まれている。占有度の定義は上記の通りである。以下では、抽出部214の学習データに含まれている2枚の学習画像のうち一方を第1画像、他方を第2画像と称する。 Next, learning related to the extraction unit 214 will be described. The memory unit 701 stores data (learning data) used for learning by the extraction unit 214. The learning data of the extraction unit 214 includes multiple sets of two learning images containing the same object, area information indicating the position (center position, upper left corner position, etc.) and size (vertical size and horizontal size) of the image area to be tracked in the learning image, and the occupancy of the image area. The definition of occupancy is as described above. Hereinafter, one of the two learning images included in the learning data of the extraction unit 214 will be referred to as the first image, and the other as the second image.

図14に第1画像および第2画像の一例を示す。図14(a)は第1画像の一例を示し、図14(b)は第2画像の一例を示す。第1画像および第2画像には追尾対象のオブジェクト1701、非追尾対象のオブジェクト1702、の両方が含まれている。非追尾対象は追尾対象と類似する外見を有するオブジェクトである。このように、抽出部214の学習データには、追尾対象、該追尾対象と外見が類似している非追尾対象、の両方を含む2枚の学習画像が含まれている。 Figure 14 shows examples of the first and second images. Figure 14(a) shows an example of the first image, and Figure 14(b) shows an example of the second image. The first and second images include both a tracking target object 1701 and a non-tracking target object 1702. The non-tracking target is an object that has an appearance similar to the tracking target. In this way, the learning data of the extraction unit 214 includes two learning images that include both the tracking target and a non-tracking target that has an appearance similar to the tracking target.

第1画像中の追尾対象1701の画像領域1705および第2画像中の追尾対象1701の画像領域1707、のそれぞれの位置やサイズは学習データに含まれている領域情報で規定されている。第1画像中の非追尾対象1702の画像領域1706および第2画像中の非追尾対象1702の画像領域1708、のそれぞれの位置やサイズは、抽出部211および推定部212によって第1画像および第2画像のそれぞれから得られる。 The positions and sizes of image region 1705 of tracked target 1701 in the first image and image region 1707 of tracked target 1701 in the second image are defined by region information included in the training data. The positions and sizes of image region 1706 of non-tracked target 1702 in the first image and image region 1708 of non-tracked target 1702 in the second image are obtained from the first image and second image, respectively, by extraction unit 211 and estimation unit 212.

そして抽出部214は、第1画像から追尾対象1701の画像領域1705および非追尾対象1702の画像領域1706の追尾特徴量を取得し、第2画像から追尾対象1701の画像領域1707の追尾特徴量を取得する。 The extraction unit 214 then acquires tracking features of image area 1705 of the tracking target 1701 and image area 1706 of the non-tracking target 1702 from the first image, and acquires tracking features of image area 1707 of the tracking target 1701 from the second image.

そして学習部709は、第1画像中の追尾対象の追尾特徴量と第2画像中の追尾対象の追尾特徴量との特徴量間距離が短くなるように、且つ第1画像中の追尾対象の追尾特徴量と該第1画像中の非追尾対象の追尾特徴量との間の特徴量間距離が長くなるように、抽出部214で用いるニューラルネットワークのパラメータを更新する。該パラメータの更新には、例えば、誤差逆伝搬法を用いることができる。図14の例では、学習部709は、画像領域1705の追尾特徴量と画像領域1707の追尾特徴量との間の特徴量間距離が短くなるように、且つ画像領域1705の追尾特徴量と画像領域1706の追尾特徴量との間の特徴量間距離が長くなるように、抽出部214で用いるニューラルネットワークのパラメータを更新する。なお、学習データとして様々な種別のオブジェクトを含む画像を用意することで、不特定物体の追尾に適用可能な追尾特徴量を取得することができる。 The learning unit 709 then updates the parameters of the neural network used by the extraction unit 214 so that the inter-feature distance between the tracking feature of the tracked target in the first image and the tracking feature of the tracked target in the second image is shortened, and so that the inter-feature distance between the tracking feature of the tracked target in the first image and the tracking feature of the non-tracked target in the first image is lengthened. The parameter updating can be performed using, for example, backpropagation. In the example of FIG. 14 , the learning unit 709 updates the parameters of the neural network used by the extraction unit 214 so that the inter-feature distance between the tracking feature of image region 1705 and the tracking feature of image region 1707 is shortened, and so that the inter-feature distance between the tracking feature of image region 1705 and the tracking feature of image region 1706 is lengthened. Note that by preparing images containing various types of objects as training data, tracking feature amounts applicable to tracking unspecified objects can be acquired.

このように、本実施形態によれば、不特定物体の追尾対象を一時的に消失したとしても、画像内に追尾対象が復帰した際に追尾対象を再検出することができる。その際、再検出時に追尾対象の占有度を用いることで、画像内に追尾特徴量が似ている他の物体が存在したとしても、占有度が異なっていれば追尾対象を正確に再検出することができる。さらに、占有度を利用することで、追尾対象がオブジェクトの全体であれば該オブジェクトの全体を再検出し、追尾対象がオブジェクトの一部であれば該一部を再検出することができる。そのため、ユーザの意図した追尾対象を追尾したり該追尾対象に合焦したりすることができる。 As such, according to this embodiment, even if the tracking target, which is an unspecified object, temporarily disappears, it can be redetected when the tracking target returns to the image. In this case, by using the occupancy of the tracking target during redetection, even if there is another object in the image with similar tracking features, the tracking target can be accurately redetected as long as the occupancy is different. Furthermore, by using the occupancy, if the tracking target is the entire object, the entire object can be redetected, and if the tracking target is only a part of the object, that part can be redetected. Therefore, it is possible to track and focus on the tracking target intended by the user.

[第2の実施形態]
以下では、第1の実施形態との差分について説明し、以下で特に触れない限りは第1の実施形態と同様であるものとする。第1の実施形態では、ユーザが入力した画像座標および占有度範囲を用いて追尾対象の検出領域を特定し、該特定した検出領域について占有度および追尾特徴量を記憶部218に登録した。
Second Embodiment
The following describes the differences from the first embodiment, and unless otherwise specified below, it is assumed that the present embodiment is the same as the first embodiment. In the first embodiment, the detection area of the tracking target is specified using the image coordinates and occupancy range input by the user, and the occupancy and tracking feature amount for the specified detection area are registered in the storage unit 218.

本実施形態では、撮像装置100における撮像パラメータに対応する占有度と、ユーザが入力した画像座標と、を用いて追尾対象の検出領域を特定し、該特定した検出領域について占有度および追尾特徴量を記憶部218に登録する。 In this embodiment, the detection area of the tracking target is identified using the occupancy corresponding to the imaging parameters of the imaging device 100 and the image coordinates input by the user, and the occupancy and tracking features for the identified detection area are registered in the storage unit 218.

本実施形態に係る撮像装置100の機能構成例を図15のブロック図に示す。図15において図3に示した機能部と同様の機能部には同じ参照番号を付しており、該機能部に係る説明は省略する。また以下では、図15に示した各機能部を処理の主体として説明する場合がある。しかし、実際には、図15に示した機能部のうち追尾部219、AF処理部220、記憶部218を除く各機能部の機能を演算処理装置130に実現させるためのコンピュータプログラムを該演算処理装置130が実行することで、該機能部の機能が実現される。同様に、図15に示した機能部のうち追尾部219、AF処理部220の機能を演算処理装置101に実現させるためのコンピュータプログラムを該演算処理装置101が実行することで、該追尾部219、該AF処理部220の機能が実現される。 An example of the functional configuration of the imaging device 100 according to this embodiment is shown in the block diagram of FIG. 15. In FIG. 15, functional units similar to those shown in FIG. 3 are assigned the same reference numbers, and a description of these functional units will be omitted. In the following, each functional unit shown in FIG. 15 may be described as the subject of processing. However, in reality, the functions of each functional unit shown in FIG. 15, except for the tracking unit 219, AF processing unit 220, and memory unit 218, are realized by the arithmetic processing device 130 executing a computer program that causes the arithmetic processing device 130 to realize the functions of the functional units. Similarly, the functions of the tracking unit 219 and AF processing unit 220 are realized by the arithmetic processing device 101 executing a computer program that causes the arithmetic processing device 101 to realize the functions of the tracking unit 219 and AF processing unit 220, among the functional units shown in FIG. 15.

まず、撮像装置100の撮像パラメータについて説明する。撮像パラメータとしては、絞り値、露光時間、AFフレームサイズ、ISO感度、Bv値などが使用できる。以下では、具体的な説明を行うために、一例として、撮像装置100の撮像パラメータが「撮像部105のレンズの絞り値」であるケースについて説明する。しかし、撮像装置100の撮像パラメータが「撮像部105のレンズの絞り値」以外であっても、以下の説明は同様に適用可能である。絞り値は画像の明るさとボケ具合を制御する設定値の一つで、F1.4、F2、F2.8、F4、F5.6、F8、F11、F16のように表され、設定値の数値が小さいと、絞りの大きさが大きくなるため、撮像される画像が明るくなり、被写界深度が浅くなる。一方、設定値の数値が大きいと、絞りの大きさが小さくなるため、撮像される画像が暗くなり、被写界深度が深くなる。絞り値を小さくして被写界深度を浅くし、ピントが合う範囲を限定することで、主要被写体が背景から浮かび上がり、結果として印象的な撮像画像が得られる。逆に、絞り値を大きくして被写界深度を深くし、ピントが合う範囲を広くすることで、多くの被写体をボケることなく撮像画像内に収めることができる。 First, we will explain the imaging parameters of the imaging device 100. Examples of imaging parameters that can be used include aperture value, exposure time, AF frame size, ISO sensitivity, and Bv value. For the sake of specificity, the following will describe, as an example, a case in which the imaging parameter of the imaging device 100 is the "aperture value of the lens of the imaging unit 105." However, the following explanation is equally applicable even if the imaging parameter of the imaging device 100 is a parameter other than the "aperture value of the lens of the imaging unit 105." The aperture value is one of the setting values that controls the brightness and blur of an image and is expressed as F1.4, F2, F2.8, F4, F5.6, F8, F11, or F16. A smaller setting value results in a larger aperture size, resulting in a brighter captured image and a shallower depth of field. On the other hand, a larger setting value results in a smaller aperture size, resulting in a darker captured image and a deeper depth of field. By reducing the aperture value and shallowing the depth of field, and limiting the range in focus, the main subject will stand out from the background, resulting in a more impressive captured image. Conversely, by increasing the aperture value and deepening the depth of field, and widening the range in focus, you can fit many subjects into the captured image without them becoming blurred.

選択部940は、推定部212aが撮像画像から推定した検出領域のうち追尾対象の検出領域を選択する。そして選択部940は、該選択した検出領域について推定部213aが推定した占有度、該選択した検出領域について抽出部214aが抽出した追尾特徴量、を記憶部218に格納(登録)する。選択部240は、選択部915、入力部216、入力部917を有する。 The selection unit 940 selects a detection area of the tracking target from the detection areas estimated by the estimation unit 212a from the captured image. The selection unit 940 then stores (registers) in the storage unit 218 the occupancy rate estimated by the estimation unit 213a for the selected detection area and the tracking feature amount extracted by the extraction unit 214a for the selected detection area. The selection unit 240 has a selection unit 915, an input unit 216, and an input unit 917.

選択部915は、入力部216が取得した画像座標、入力部917が取得した撮像パラメータとしての絞り値、に基づいて、推定部212aが撮像画像から推定した検出領域のうち追尾対象の検出領域を選択する。選択部915は、様々な絞り値に対応する占有度を保持している。例えば、選択部915は、F1.4以下の絞り値に対応する占有度として「0.1」、F8以上の絞り値に対応する占有度として「1.0」を保持している。また、選択部915は、絞り値F1.4と絞り値F8の間の絞り値に対応する占有度は、絞り値F1.4に対応する占有度「0.1」と絞り値F8に対応する占有度「1.0」とを用いた線形補間により求める。 The selection unit 915 selects a detection area of the tracking target from the detection areas estimated from the captured image by the estimation unit 212a, based on the image coordinates acquired by the input unit 216 and the aperture value as an imaging parameter acquired by the input unit 917. The selection unit 915 holds occupancies corresponding to various aperture values. For example, the selection unit 915 holds "0.1" as the occupancy corresponding to an aperture value of F1.4 or less, and "1.0" as the occupancy corresponding to an aperture value of F8 or more. The selection unit 915 also calculates the occupancy corresponding to an aperture value between F1.4 and F8 by linear interpolation using the occupancy "0.1" corresponding to the aperture value F1.4 and the occupancy "1.0" corresponding to the aperture value F8.

入力部917は、ユーザが入力装置103を用いて入力した絞り値を入力する。このときユーザが操作する入力装置103には、例えば、撮像装置100のハードウェアダイヤルが適用可能である。 The input unit 917 inputs the aperture value input by the user using the input device 103. The input device 103 operated by the user at this time can be, for example, a hardware dial on the imaging device 100.

選択部940による追尾対処の検出領域の選択処理について、図16(a)を例にとり説明する。撮像画像1800において検出領域1802~1804はそれぞれ、推定部212aが撮像画像1800から推定した検出領域である。 The process of selecting detection areas for tracking by the selection unit 940 will be explained using Figure 16(a) as an example. In the captured image 1800, detection areas 1802 to 1804 are each detection areas estimated from the captured image 1800 by the estimation unit 212a.

検出領域1802は、馬1801の全体を含む検出領域であり、検出領域1803は該馬1801の一部である頭部の検出領域であり、検出領域1804は樹木の検出領域である。点1805は、ユーザが入力装置103を操作して追尾対象の位置として指示した指示位置を示す。ここで、推定部213aが検出領域1802について求めた占有度は「1.0」、検出領域1803について求めた占有度は「0.3」であるとする。 Detection area 1802 is a detection area that includes the entire horse 1801, detection area 1803 is a detection area for the head, which is part of the horse 1801, and detection area 1804 is a detection area for trees. Point 1805 indicates the indicated position indicated by the user operating the input device 103 as the position of the tracking target. Here, the occupancy degree calculated by the estimation unit 213a for detection area 1802 is "1.0", and the occupancy degree calculated for detection area 1803 is "0.3".

入力部216は、点1805に対応する画像座標を取得する。また、入力部917は、ユーザが入力装置103を操作して入力した「絞り値」を取得する。選択部915は、入力部917が取得した絞り値と関連付けて保持している占有度OCCを特定する。また選択部915は、検出領域1802~1804のうち、点1805に対応する画像座標を包含する検出領域を候補として特定する。図16(a)のケースでは、点1805に対応する画像座標を包含する検出領域は検出領域1802であるから検出領域1802が候補として特定される。なお、点1805に対応する画像座標を包含する検出領域が複数存在する場合には、該複数存在する検出領域のうち占有度が最も大きい検出領域が候補として特定される。そして選択部915は、候補として特定された検出領域、該候補として特定された検出領域に含まれる検出領域、のうち占有度が占有度OCCである検出領域を、追尾対象の検出領域として選択する。なお、選択部915は、候補として特定された検出領域、該候補として特定された検出領域に含まれる検出領域、のうち占有度が占有度OCCである検出領域が複数存在する場合には、該複数存在する検出領域のうち、入力部216が取得した画像座標に最も近い検出領域を追尾対象の検出領域とする。 The input unit 216 acquires image coordinates corresponding to point 1805. Furthermore, the input unit 917 acquires an "aperture value" input by the user by operating the input device 103. The selection unit 915 identifies the occupancy OCC T stored in association with the acquired aperture value by the input unit 917. Furthermore, the selection unit 915 identifies, as a candidate, a detection area from among the detection areas 1802 to 1804 that includes image coordinates corresponding to point 1805. In the case of FIG. 16( a), the detection area that includes the image coordinates corresponding to point 1805 is detection area 1802, and therefore detection area 1802 is identified as the candidate. Note that if there are multiple detection areas that include the image coordinates corresponding to point 1805, the detection area with the largest occupancy among the multiple detection areas is identified as the candidate. Then, the selection unit 915 selects, as the detection area of the tracking target, a detection area that has an occupancy OCC T from among the detection areas identified as candidates and detection areas included in the detection areas identified as candidates. In addition, when there are multiple detection areas with an occupancy degree of OCC T among the detection areas identified as candidates and the detection areas included in the detection areas identified as candidates, the selection unit 915 selects, from among the multiple detection areas, the detection area closest to the image coordinates acquired by the input unit 216 as the detection area to be tracked.

例えば、入力部917が取得した絞り値がF2.8であった場合、F2.8に対応する占有度は0.3である。検出領域1802~1804のうち点1805に対応する画像座標を包含する検出領域は検出領域1802のみであるから、検出領域1802が候補として特定される。そして、候補として特定された検出領域1802、該検出領域1802に含まれる検出領域1803、のうち、占有度が0.3の検出領域は検出領域1803のみであるから、選択部915は、該検出領域1803を追尾対象の検出領域として選択する。 For example, if the aperture value acquired by the input unit 917 is F2.8, the occupancy level corresponding to F2.8 is 0.3. Of detection areas 1802 to 1804, only detection area 1802 contains the image coordinates corresponding to point 1805, and therefore detection area 1802 is identified as a candidate. Then, of detection area 1802 identified as a candidate and detection area 1803 contained in detection area 1802, detection area 1803 is the only detection area with an occupancy level of 0.3, and therefore the selection unit 915 selects detection area 1803 as the detection area of the tracking target.

また例えば、入力部917が取得した絞り値がF8であった場合、F8に対応する占有度は1.0である。検出領域1802~1804のうち点1805に対応する画像座標を包含する検出領域は検出領域1802のみであるから、検出領域1802が候補として特定される。そして、候補として特定された検出領域1802、該検出領域1802に含まれる検出領域1803、のうち、占有度が1.0の検出領域は検出領域1802のみであるから、選択部915は、該検出領域1802を追尾対象の検出領域として選択する。 For example, if the aperture value acquired by the input unit 917 is F8, the occupancy level corresponding to F8 is 1.0. Of the detection areas 1802 to 1804, only detection area 1802 contains the image coordinates corresponding to point 1805, and therefore detection area 1802 is identified as a candidate. Of the detection area 1802 identified as a candidate and detection area 1803 contained within detection area 1802, detection area 1802 is the only detection area with an occupancy level of 1.0, and therefore the selection unit 915 selects detection area 1802 as the detection area of the tracking target.

なお、候補として特定された検出領域、該候補として特定された検出領域に含まれる検出領域、のうちOCC-α<OCCID<OCC+αを満たす占有度OCCIDの検出領域を追尾対象の検出領域として選択するようにしても良い。 Note that, among the detection areas identified as candidates and the detection areas included in the detection areas identified as candidates, a detection area with an occupancy degree OCC ID that satisfies OCC T −α< OCC ID < OCC T + α may be selected as the detection area of the tracking target.

このように、絞り値が大きい場合は占有度の大きい検出領域、絞り値が小さい場合は占有度の小さい検出領域を追尾対象の検出領域として選択する。これは、絞り値を小さくするときは合焦範囲を限定したい、絞り値を大きくするときは合焦範囲を広くしたいというユーザの意図に対応する。 In this way, when the aperture value is large, a detection area with a large occupancy is selected as the detection area for the tracking target, and when the aperture value is small, a detection area with a small occupancy is selected. This corresponds to the user's intention to limit the focus range when the aperture value is small, and to widen the focus range when the aperture value is large.

そして、記憶部218に追尾対象の占有度および追尾特徴量を登録した後に取得部210が取得した撮像画像が図16(b)に示す如く、図16(a)の馬1801が右方向に移動して撮像画像中央に位置する樹木に隠れて一旦該撮像画像から消失するとする。図18(c)、(d)に示した撮像画像は、図16(b)の撮像画像の後に取得部210が取得した撮像画像であり、馬1801が樹木の右側から再び現れた撮像画像である。 Then, suppose that after the occupancy rate and tracking features of the tracking target are registered in the memory unit 218, the captured image acquired by the acquisition unit 210 is as shown in Figure 16(b), in which the horse 1801 in Figure 16(a) moves to the right and disappears from the captured image, hiding behind a tree located in the center of the captured image. The captured images shown in Figures 18(c) and (d) are captured images acquired by the acquisition unit 210 after the captured image in Figure 16(b), and are captured images in which the horse 1801 reappears from the right side of the tree.

絞り値の設定がF2.8である場合、図16(c)に示す如く馬1801の頭部の検出領域1850が追尾対象の検出領域として再検出されるので、該再検出された頭部の検出領域1850に合焦することになる。これにより、結果として頭部より背景方向にある馬1801の胴体や樹木がぼけた撮像画像が得られる。このような撮像画像は、背景から馬1801の頭部が浮かび上がり、印象的な撮像画像となる。 When the aperture setting is F2.8, as shown in Figure 16(c), the detection area 1850 of the horse 1801's head is redetected as the detection area of the tracking target, and the focus is set on this redetected head detection area 1850. As a result, a captured image is obtained in which the body of the horse 1801 and trees in the background direction relative to the head are blurred. In such a captured image, the head of the horse 1801 stands out from the background, making for an impressive captured image.

一方、絞り値の設定がF8である場合、図16(d)に示す如く馬1801の全体の検出領域1860が追尾対象の検出領域として再検出される。然るに、このような撮像画像では、該再検出された馬1801の全体がはっきり見えるようになり、結果として、馬1801の躍動感が伝わるような撮像画像が得られる。 On the other hand, when the aperture setting is F8, the entire detection area 1860 of the horse 1801 is redetected as the detection area of the tracking target, as shown in Figure 16(d). Therefore, in such a captured image, the redetected horse 1801 is clearly visible in its entirety, resulting in an image that conveys the dynamic movement of the horse 1801.

このように、追尾対象を選択する際の占有度設定を絞り値と連動させることで、追尾対象を確実に検出することができるとともに、ユーザの意図した表現の撮像画像を取得することができるようになる。 In this way, by linking the occupancy setting when selecting a tracking target with the aperture value, it is possible to reliably detect the tracking target and obtain a captured image that expresses the user's intended expression.

上記の如く、本実施形態では、撮像パラメータは絞り値以外であっても良い。例えば、露光時間に応じて占有度の選択基準を変更する方法も考えられる。露光時間が長くなると被写体ブレや手ブレの量が大きくなるため、撮像画像をミクロ的に見てしまうと、ブレの影響が強く出る。したがって、露光時間がより長い場合には、占有度がより大きい検出領域を優先的に追尾対象の検出領域として選択した方がよい。 As mentioned above, in this embodiment, the imaging parameter may be something other than the aperture value. For example, it is possible to consider a method of changing the occupancy selection criteria depending on the exposure time. As the exposure time becomes longer, the amount of subject blur and camera shake increases, so when viewing a captured image microscopically, the effects of blur become more apparent. Therefore, when the exposure time is longer, it is better to prioritize selecting a detection area with a larger occupancy as the detection area for the tracking target.

その他、AFフレームサイズに応じて占有度の選択基準を変更する方法も考えられる。AFフレームサイズが小さいときは、被写体の一部に限定して合焦させたいというユーザの意図があるとみなせるので、AFフレームサイズが小さいほど、占有度がより小さい検出領域を追尾対象の検出領域として優先的に選択した方がよい。逆に、AFフレームサイズが大きいときは、被写体全体に合焦させたいというユーザの意図があるとみなせるので、AFフレームサイズが大きいほど、占有度がより大きい検出領域を追尾対象の検出領域として優先的に選択した方がよい。 Another possible method is to change the occupancy selection criteria depending on the AF frame size. When the AF frame size is small, it can be assumed that the user intends to focus on only a portion of the subject, so the smaller the AF frame size, the better it is to prioritize selecting a detection area with a smaller occupancy as the detection area for the tracking target. Conversely, when the AF frame size is large, it can be assumed that the user intends to focus on the entire subject, so the larger the AF frame size, the better it is to prioritize selecting a detection area with a larger occupancy as the detection area for the tracking target.

このように、本実施形態では、不特定物体の追尾対象を一時的に消失したとしても、画像内に追尾対象が復帰した際に追尾対象を再検出することができる。また、占有度設定を撮像パラメータと連動させることで、ユーザの意図した表現の撮像画像が得られるようにオブジェクトを追尾対象にすることができる。 In this way, in this embodiment, even if an unspecified object that is the tracking target temporarily disappears, the tracking target can be re-detected when it returns to the image. Furthermore, by linking the occupancy setting with the imaging parameters, it is possible to set the object as the tracking target so that a captured image that expresses the user's intended expression can be obtained.

[第3の実施形態]
第1の実施形態や第2の実施形態では、追尾対象の検出領域に対して追尾処理やAF処理を行うケースについて説明した。しかし、追尾対象の検出領域に対して行う処理は追尾処理やAF処理に限らず、適正露出に制御するオートエクスポージャー処理(AE処理)や光源に対して色調補正を行うオートホワイトバランス処理(AWB処理)などの他の処理であっても良い。また、追尾対象の検出領域に対して複数の処理を適用しても良い。
[Third embodiment]
In the first and second embodiments, cases where tracking processing and AF processing are performed on the detection area of the tracking target have been described. However, the processing performed on the detection area of the tracking target is not limited to tracking processing and AF processing, and other processing such as auto exposure processing (AE processing) that controls exposure to a proper level and auto white balance processing (AWB processing) that performs color correction for a light source may also be used. Furthermore, multiple processing may be applied to the detection area of the tracking target.

また、図1の構成では、学習装置700は撮像装置100とは別個の装置であるものとして説明したが、撮像装置100と学習装置700とを一体化させて1台の撮像装置100を構成しても良い。 Furthermore, in the configuration of Figure 1, the learning device 700 is described as being a separate device from the imaging device 100, but the imaging device 100 and the learning device 700 may be integrated to form a single imaging device 100.

また、上記の実施形態にて説明した撮像装置の動作は、「外部の撮像装置により撮像された撮像画像から追尾対象の検出領域を検出/再検出する画像処理装置」にも同様に適用可能である。このような画像処理装置は、例えば、検出/再検出した追尾対象の検出領域を該撮像装置に通知することで、該撮像装置に該追尾対象の検出領域に対する追尾処理やAF処理等を実行させることができる。また、このような画像処理装置は、検出/再検出した追尾対象の検出領域に係る情報を外部の装置に保持するようにしても良い。 Furthermore, the operation of the imaging device described in the above embodiment can also be applied to "an image processing device that detects/redetects the detection area of a tracking target from an image captured by an external imaging device." Such an image processing device can, for example, notify the imaging device of the detected/redetected detection area of the tracking target, causing the imaging device to perform tracking processing, AF processing, etc. for the detection area of the tracking target. Furthermore, such an image processing device may store information related to the detected/redetected detection area of the tracking target in an external device.

また、上記の実施形態では、図3,11,15に示した各機能部(記憶部218や記憶部701を除く)はソフトウェア(コンピュータプログラム)で実装したケースについて説明した。しかし、図3,11,15に示した各機能部の一部若しくは全部をハードウェアで実装しても構わない。 Furthermore, in the above embodiment, the functional units shown in Figures 3, 11, and 15 (excluding the memory unit 218 and memory unit 701) were described as being implemented as software (computer programs). However, some or all of the functional units shown in Figures 3, 11, and 15 may also be implemented as hardware.

また、上記の各実施形態で使用した数値、処理タイミング、処理順、処理の主体、データ(情報)の送信先/送信元/格納場所などは、具体的な説明を行うために一例として挙げたもので、このような一例に限定することを意図したものではない。 Furthermore, the numerical values, processing timing, processing order, processing subject, data (information) destination/source/storage location, etc. used in each of the above embodiments are given as examples to provide a concrete explanation, and are not intended to be limiting.

また、以上説明した各実施形態の一部若しくは全部を適宜組み合わせて使用しても構わない。また、以上説明した各実施形態の一部若しくは全部を選択的に使用しても構わない。 Furthermore, some or all of the embodiments described above may be used in appropriate combination. Furthermore, some or all of the embodiments described above may be used selectively.

(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention can also be realized by supplying a program that realizes one or more of the functions of the above-described embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program.The present invention can also be realized by a circuit (e.g., an ASIC) that realizes one or more of the functions.

発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the above-described embodiments, and various modifications and variations are possible without departing from the spirit and scope of the invention. Therefore, the following claims are appended to clarify the scope of the invention.

210:取得部 215:選択部 216:入力部 217:入力部 218:記憶部 219:追尾部 220:AF処理部 221:判定部 230:取得部 240:選択部 250:再検出部 210: Acquisition unit 215: Selection unit 216: Input unit 217: Input unit 218: Storage unit 219: Tracking unit 220: AF processing unit 221: Determination unit 230: Acquisition unit 240: Selection unit 250: Redetection unit

Claims (9)

撮像画像中の追尾対象の画像領域もしくは該追尾対象が属するオブジェクトの画像領域における該追尾対象の画像領域の割合を示す占有度と、該追尾対象の特徴量と、を登録する登録手段と、
撮像画像中の追尾対象の追尾が成功していないと判定された場合には、前記占有度および前記特徴量に基づいて、撮像画像から追尾対象の画像領域の再検出を行う再検出手段と
を備えることを特徴とする画像処理装置。
a registration means for registering an occupancy indicating a ratio of an image area of the tracking target in an image captured by the image capture device to an image area of an object to which the tracking target belongs, and a feature amount of the tracking target;
and a re-detection means for re-detecting an image area of the tracking target from the captured image based on the occupancy rate and the feature amount when it is determined that tracking of the tracking target in the captured image has not been successful.
前記再検出手段は、
撮像画像から検出されたオブジェクトもしくは該オブジェクトの一部の検出領域について占有度および特徴量を求め、該撮像画像から検出された検出領域のうち、前記登録手段が登録した占有度に基づく範囲に含まれる占有度の画像領域であって、前記登録手段が登録した特徴量との相関値が最も高い特徴量の画像領域を、追尾対象の画像領域として再検出することを特徴とする請求項1に記載の画像処理装置。
The re-detection means
The image processing device described in claim 1, characterized in that the occupancy and feature amount are calculated for a detection area of an object or a part of the object detected from a captured image, and an image area of the detection area detected from the captured image whose occupancy amount is included in a range based on the occupancy amount registered by the registration means and whose feature amount has the highest correlation value with the feature amount registered by the registration means is re-detected as the image area to be tracked.
前記登録手段は、
撮像画像からオブジェクトの全体若しくは一部の画像領域を検出領域として検出し、該検出した検出領域のうち、ユーザ操作に応じて選択された検出領域の占有度および特徴量を登録することを特徴とする請求項1または2に記載の画像処理装置。
The registration means
3. The image processing device according to claim 1, wherein the image area of the entire object or a part of the object is detected as a detection area from the captured image, and the occupancy rate and feature amount of a detection area selected from the detected detection areas in accordance with a user operation are registered.
前記登録手段は、ユーザが入力した占有度範囲に含まれる占有度の検出領域であって、ユーザが指示した画像座標を内包する検出領域の占有度および特徴量を登録することを特徴とする請求項3に記載の画像処理装置。 The image processing device described in claim 3, characterized in that the registration means registers the occupancy and feature values of a detection area whose occupancy is included in the occupancy range input by the user and that includes the image coordinates specified by the user. 前記登録手段は、ユーザが入力した画像座標に基づいて特定される検出領域のうち、ユーザが入力した撮像パラメータに応じた占有度の検出領域もしくは該占有度に基づく占有度範囲に含まれる占有度の検出領域の占有度および特徴量を登録することを特徴とする請求項3に記載の画像処理装置。 The image processing device described in claim 3, characterized in that the registration means registers the occupancy and feature values of a detection area identified based on image coordinates input by the user, the detection area having an occupancy level according to the imaging parameters input by the user, or a detection area having an occupancy level included in an occupancy level range based on the occupancy level. 撮像画像を撮像する撮像手段と、
請求項1ないし5の何れか1項に記載の画像処理装置と、
前記撮像画像中の追尾対象の画像領域に対して処理を実行する処理手段と
を備えることを特徴とする撮像装置。
an imaging means for capturing an image;
An image processing device according to any one of claims 1 to 5;
and processing means for executing processing on an image area of a tracking target in the captured image.
前記処理は、追尾処理、AF処理、AE処理、AWB処理、を含むことを特徴とする請求項6に記載の撮像装置。 The imaging device of claim 6, wherein the processing includes tracking processing, AF processing, AE processing, and AWB processing. 画像処理装置が行う画像処理方法であって、
前記画像処理装置の登録手段が、撮像画像中の追尾対象の画像領域もしくは該追尾対象が属するオブジェクトの画像領域における該追尾対象の画像領域の割合を示す占有度と、該追尾対象の特徴量と、を登録する登録工程と、
前記画像処理装置の再検出手段が、撮像画像中の追尾対象の追尾が成功していないと判定された場合には、前記占有度および前記特徴量に基づいて、撮像画像から追尾対象の画像領域の再検出を行う再検出工程と
を備えることを特徴とする画像処理方法。
An image processing method performed by an image processing device,
a registration step in which a registration means of the image processing device registers an occupancy rate indicating a ratio of an image area of the tracking target in an image area of the tracking target in a captured image or an image area of an object to which the tracking target belongs, and a feature amount of the tracking target;
and a re-detection step of re-detecting an image area of the tracking target from the captured image based on the occupancy rate and the feature amount when the re-detection means of the image processing device determines that tracking of the tracking target in the captured image has not been successful.
コンピュータを、請求項1ないし5の何れか1項に記載の画像処理装置の各手段として機能させるためのコンピュータプログラム。 A computer program for causing a computer to function as each means of the image processing device described in any one of claims 1 to 5.
JP2021200395A 2021-12-09 2021-12-09 Image processing device, imaging device, and image processing method Active JP7749437B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021200395A JP7749437B2 (en) 2021-12-09 2021-12-09 Image processing device, imaging device, and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021200395A JP7749437B2 (en) 2021-12-09 2021-12-09 Image processing device, imaging device, and image processing method

Publications (2)

Publication Number Publication Date
JP2023086022A JP2023086022A (en) 2023-06-21
JP7749437B2 true JP7749437B2 (en) 2025-10-06

Family

ID=86776069

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021200395A Active JP7749437B2 (en) 2021-12-09 2021-12-09 Image processing device, imaging device, and image processing method

Country Status (1)

Country Link
JP (1) JP7749437B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018018234A (en) 2016-07-27 2018-02-01 株式会社Jvcケンウッド Person detection device, person detection system, person detection method, and person detection program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018018234A (en) 2016-07-27 2018-02-01 株式会社Jvcケンウッド Person detection device, person detection system, person detection method, and person detection program

Also Published As

Publication number Publication date
JP2023086022A (en) 2023-06-21

Similar Documents

Publication Publication Date Title
US11457138B2 (en) Method and device for image processing, method for training object detection model
US10002463B2 (en) Information processing apparatus, information processing method, and storage medium, for enabling accurate detection of a color
US10701332B2 (en) Image processing apparatus, image processing method, image processing system, and storage medium
JP7499280B2 (en) Method and system for monocular depth estimation of a person - Patents.com
JP4373840B2 (en) Moving object tracking method, moving object tracking program and recording medium thereof, and moving object tracking apparatus
US8417059B2 (en) Image processing device, image processing method, and program
JP6371553B2 (en) Video display device and video display system
KR20210139450A (en) Image display method and device
CN106326832B (en) Device and method for processing image based on object region
US9734612B2 (en) Region detection device, region detection method, image processing apparatus, image processing method, program, and recording medium
US11159717B2 (en) Systems and methods for real time screen display coordinate and shape detection
CN113610865B (en) Image processing method, device, electronic device and computer readable storage medium
CN111382613A (en) Image processing method, apparatus, device and medium
CN108259770A (en) Image processing method, image processing device, storage medium and electronic equipment
US20160189392A1 (en) Object tracking apparatus, control method therefor and storage medium
CN112070954A (en) Living body identification method, living body identification device, living body identification equipment and storage medium
US9323981B2 (en) Face component extraction apparatus, face component extraction method and recording medium in which program for face component extraction method is stored
WO2012153868A1 (en) Information processing device, information processing method and information processing program
WO2015198592A1 (en) Information processing device, information processing method, and information processing program
JP7749437B2 (en) Image processing device, imaging device, and image processing method
CN114549976A (en) Multi-camera-based track measurement method and system for mobile robot
JP5539565B2 (en) Imaging apparatus and subject tracking method
JPH09265538A (en) Automatic tracking device
JP2023076286A (en) Imaging processor, image processing method and imaging apparatus
JP2016152467A (en) TRACKING DEVICE, TRACKING METHOD, AND TRACKING PROGRAM

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20241128

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20250819

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: 20250825

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20250924

R150 Certificate of patent or registration of utility model

Ref document number: 7749437

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150