[go: up one dir, main page]

JP2024173641A - Image processing device and image processing method - Google Patents

Image processing device and image processing method Download PDF

Info

Publication number
JP2024173641A
JP2024173641A JP2024008828A JP2024008828A JP2024173641A JP 2024173641 A JP2024173641 A JP 2024173641A JP 2024008828 A JP2024008828 A JP 2024008828A JP 2024008828 A JP2024008828 A JP 2024008828A JP 2024173641 A JP2024173641 A JP 2024173641A
Authority
JP
Japan
Prior art keywords
subject
identification information
image processing
tracked
detected
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.)
Pending
Application number
JP2024008828A
Other languages
Japanese (ja)
Inventor
明日華 松岡
Asuka Matsuoka
拓也 岩田
Takuya Iwata
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 EP24175980.2A priority Critical patent/EP4471716A1/en
Priority to US18/665,722 priority patent/US20240404076A1/en
Publication of JP2024173641A publication Critical patent/JP2024173641A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Closed-Circuit Television Systems (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

To provide a technique that, even when a subject to be tracked is no longer detected from a picked-up image, enables continuation of tracking of the subject to be tracked.SOLUTION: An image processing apparatus detects a subject from a frame, and in a case where a subject having identification information same as identification information of a subject to be tracked is not detected from a first frame, when identification information of a subject detected from the first frame includes new identification information different from identification information of a subject detected from a second frame before the timing at which the subject to be tracked is not detected, updates the identification information of the subject to be tracked to the new identification information.SELECTED DRAWING: Figure 2

Description

本発明は、被写体の追尾技術に関する。 The present invention relates to subject tracking technology.

一般に、PTZカメラとよばれるパン・チルト・ズームを調節することが可能なカメラが、ユーザからの要求に応じて、撮像画像から検出した追尾対象を自動で追尾する自動追尾技術がある。自動追尾技術では、追尾対象がカメラの画角内で所望の位置にくるようにパン・チルト・ズームを自動的に制御する。特許文献1には、画面上に表示された追尾目標の座標を元に、追尾目標を画面中心に表示するために必要なPTZカメラの制御パラメータを計算する方法が開示されている。 Generally, there is an automatic tracking technology in which a camera capable of adjusting pan, tilt, and zoom, known as a PTZ camera, automatically tracks a tracking target detected from a captured image in response to a user request. In the automatic tracking technology, the pan, tilt, and zoom are automatically controlled so that the tracking target is located at a desired position within the camera's angle of view. Patent Document 1 discloses a method for calculating the control parameters of a PTZ camera required to display a tracking target at the center of the screen based on the coordinates of the tracking target displayed on the screen.

特開平9-181961号公報Japanese Patent Application Publication No. 9-181961

自動追尾技術には、追尾対象が他の物体と交錯することにより追尾対象を見失ってしまう、ロストと呼ばれる課題がある。ロストが発生すると、自動追尾が正常に継続できなくなる。本発明では、追尾対象の被写体が撮像画像から検出されなくなっても、該追尾対象の被写体の追尾を継続可能にするための技術を提供する。 Automatic tracking technology has an issue known as "losing," in which the target to be tracked becomes confused with another object and is lost. When this occurs, automatic tracking cannot continue normally. This invention provides technology that makes it possible to continue tracking the target subject even if the target subject is no longer detected in the captured image.

本発明の一様態は、フレームから被写体を検出する検出手段と、第1フレームから追尾対象の被写体の識別情報と同じ識別情報の被写体が検出されなかった場合、該第1フレームから検出された被写体の識別情報の中に、該追尾対象の被写体が検出されなかったタイミング以前の第2フレームから検出された被写体の識別情報とは異なる新規の識別情報が含まれていれば、該追尾対象の被写体の識別情報を該新規の識別情報に更新する更新手段とを備えることを特徴とする。 One aspect of the present invention is characterized by comprising a detection means for detecting a subject from a frame, and an update means for updating the identification information of the subject to be tracked to new identification information if a subject with identification information identical to the identification information of the subject to be tracked is not detected in a first frame and the identification information of the subject detected in the first frame includes new identification information different from the identification information of the subject detected in a second frame prior to the timing at which the subject to be tracked was not detected.

本発明によれば、追尾対象の被写体が撮像画像から検出されなくなっても、該追尾対象の被写体の追尾を継続可能にすることができる。 According to the present invention, it is possible to continue tracking a subject to be tracked even if the subject to be tracked is no longer detected in a captured image.

システムの構成例を示す図。FIG. 1 is a diagram showing an example of a system configuration. カメラ100およびコントローラ200のそれぞれのハードウェア構成例を示すブロック図。FIG. 2 is a block diagram showing an example of the hardware configuration of each of the camera 100 and the controller 200. (a)はカメラ100の動作を示すフローチャート、(b)はコントローラ200の動作を示すフローチャート。4A is a flowchart showing the operation of the camera 100, and FIG. 4B is a flowchart showing the operation of the controller 200. 推論結果の一例を示す図。FIG. 11 is a diagram showing an example of an inference result. 撮像画像および推論結果の表示例を示す図。11A and 11B are diagrams showing examples of displaying captured images and inference results. (a)はカメラ100の動作を示すフローチャート、(b)はコントローラ200の動作を示すフローチャート。4A is a flowchart showing the operation of the camera 100, and FIG. 4B is a flowchart showing the operation of the controller 200.

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

[第1の実施形態]
まず、ユーザにより指定された追尾対象の被写体を追尾して撮像するシステムの構成例について、図1を用いて説明する。図1に示す如く、本実施形態に係るシステムは、被写体を追尾して撮像する機能を有するカメラ100と、該カメラ100の制御及び該カメラ100からの情報を処理する機能を有するコントローラ200と、を有する。そして、カメラ100およびコントローラ200はLAN(Local Area Network)400に接続されており、LAN400を介して互いにデータ通信が可能なように構成されている。LAN400は有線であっても良いし無線であっても良い。また、カメラ100とコントローラ200との間のネットワークは特定のネットワークに限らない。
[First embodiment]
First, a configuration example of a system that tracks and captures a subject designated by a user as a tracking target will be described with reference to Fig. 1. As shown in Fig. 1, the system according to this embodiment has a camera 100 having a function of tracking and capturing an image of a subject, and a controller 200 having a function of controlling the camera 100 and processing information from the camera 100. The camera 100 and the controller 200 are connected to a LAN (Local Area Network) 400, and are configured to be able to communicate data with each other via the LAN 400. The LAN 400 may be wired or wireless. The network between the camera 100 and the controller 200 is not limited to a specific network.

先ず、カメラ100について説明する。カメラ100は、撮像部111と、該撮像部111の撮像方向(パン方向、チルト方向)及びズームを制御する駆動部109と、を有する画像処理装置である。 First, we will explain the camera 100. The camera 100 is an image processing device that has an imaging unit 111 and a drive unit 109 that controls the imaging direction (pan direction, tilt direction) and zoom of the imaging unit 111.

撮像部111は、動画像を撮像する場合には、各フレームの画像を撮像画像として出力し、定期的若しくは不定期的に静止画像を撮像する場合には、該静止画像(フレーム)を撮像画像として出力する。撮像部111は、撮像画像や各種の情報を、LAN400を介してコントローラ200に対して送信する。駆動部109は、追尾対象の被写体として設定されている被写体を追尾して撮像するよう、該撮像部111の撮像方向(パン方向やチルト方向)やズームを制御する。 When capturing a moving image, the imaging unit 111 outputs an image of each frame as a captured image, and when capturing still images periodically or irregularly, the imaging unit 111 outputs the still images (frames) as captured images. The imaging unit 111 transmits the captured images and various information to the controller 200 via the LAN 400. The driving unit 109 controls the imaging direction (pan direction and tilt direction) and zoom of the imaging unit 111 so as to track and capture an image of a subject that is set as a subject to be tracked.

次に、コントローラ200について説明する。コントローラ200は、カメラ100から送信された各種の情報を処理したり、ユーザ操作に応じて選択された追尾対象の被写体をカメラ100に通知したりする。 Next, the controller 200 will be described. The controller 200 processes various information transmitted from the camera 100 and notifies the camera 100 of the subject to be tracked that has been selected in response to a user operation.

次に、カメラ100およびコントローラ200のそれぞれのハードウェア構成例について、図2のブロック図を用いて説明する。図2に示した構成は、後述する各種の処理を実行可能な構成の一例に過ぎず、適宜変更/変形が可能である。 Next, an example of the hardware configuration of the camera 100 and the controller 200 will be described using the block diagram in FIG. 2. The configuration shown in FIG. 2 is merely one example of a configuration capable of executing the various processes described below, and can be modified/altered as appropriate.

先ず、カメラ100のハードウェア構成例について説明する。CPU101は、RAM102に格納されているコンピュータプログラムやデータを用いて各種の処理を実行する。これによりCPU101は、カメラ100全体の動作制御を行うと共に、カメラ100が行う処理として説明する各種の処理を実行もしくは制御する。 First, an example of the hardware configuration of the camera 100 will be described. The CPU 101 executes various processes using computer programs and data stored in the RAM 102. In this way, the CPU 101 controls the operation of the entire camera 100, and also executes or controls various processes that will be described as processes performed by the camera 100.

RAM102は、DRAMなどの高速な記憶装置の一例である。RAM102は、記憶装置103からロードされたコンピュータプログラムやデータを格納するためのエリア、画像処理部106から出力された撮像画像を格納するためのエリア、を有する。さらにRAM102は、CPU101、推論部110、画像処理部106が各種の処理を実行する際に用いるワークエリア、を有する。このようにRAM102は、各種のエリアを適宜提供することができる。 RAM 102 is an example of a high-speed storage device such as a DRAM. RAM 102 has an area for storing computer programs and data loaded from storage device 103, and an area for storing captured images output from image processing unit 106. RAM 102 also has a work area used by CPU 101, inference unit 110, and image processing unit 106 when executing various processes. In this way, RAM 102 can provide various areas as appropriate.

記憶装置103は、ROM、フラッシュメモリ、HDD、などの揮発性の記憶装置や不揮発性の記憶装置を含む。記憶装置103には、OS(オペレーティングシステム)、カメラ100が行う処理として説明する各種の処理をCPU101、推論部110、画像処理部106などに実行もしくは制御させるためのコンピュータプログラムやデータ、などが格納されている。 The storage device 103 includes volatile and non-volatile storage devices such as ROM, flash memory, and HDD. The storage device 103 stores an operating system (OS), computer programs and data for causing the CPU 101, the inference unit 110, the image processing unit 106, and the like to execute or control various processes described as processes performed by the camera 100.

推論部110は、RAM102に格納されている撮像画像から被写体を検出し、該被写体の位置や有無等を推論する。推論部110は、GPU(Graphics Processing Unit)等の画像処理や推論処理に特化した演算装置である。学習処理に利用するのは一般的にはGPUが有効であるが、FPGA(Field -Programmable Gate Array)といった再構成可能な論理回路で同等の機能を実現してもよい。また、推論部110の処理をCPU101が担ってもよい。なお、推論部110は本実施形態では使用するが、後述する第2の実施形態では使用しないため、第2の実施形態では、カメラ100は推論部110を有していなくても良い。 The inference unit 110 detects a subject from the captured image stored in the RAM 102 and infers the position and presence of the subject. The inference unit 110 is a computing device specialized for image processing and inference processing, such as a GPU (Graphics Processing Unit). Although a GPU is generally effective for use in learning processing, a reconfigurable logic circuit such as an FPGA (Field-Programmable Gate Array) may achieve the same function. The processing of the inference unit 110 may also be performed by the CPU 101. Note that although the inference unit 110 is used in this embodiment, it is not used in the second embodiment described later, and therefore in the second embodiment, the camera 100 does not need to have the inference unit 110.

上記の駆動部109は、駆動I/F108に接続されている。駆動部109は、カメラ100の撮像方向やズームを変更するための回動機構を有し、メカ駆動系及び駆動源のモータ等を有する。駆動部109は、CPU101から駆動I/F108を介して受け取る指示に基づいてパン・チルト動作といった回動や、光学的に画角を変更するためのズーム動作を行う。 The drive unit 109 is connected to the drive I/F 108. The drive unit 109 has a rotation mechanism for changing the imaging direction and zoom of the camera 100, and has a mechanical drive system and a motor as a drive source. The drive unit 109 performs rotation such as pan and tilt operations and zoom operations for optically changing the angle of view based on instructions received from the CPU 101 via the drive I/F 108.

画像センサ107は、光学系、CCDやCMOSなどの撮像センサ、を有し、該光学系を介して入光した光は該撮像センサで受光し、該撮像センサは受光した光に応じた画像を出力する。 The image sensor 107 has an optical system and an image sensor such as a CCD or CMOS. The light entering through the optical system is received by the image sensor, which outputs an image corresponding to the received light.

画像処理部106は、画像センサ107から出力された画像を規定の画像フォーマットの画像に変換し、該変換した画像を撮像画像として出力する。なお、画像処理部106は、画像センサ107から出力された画像を用いて色補正、露出制御、シャープネス補正などの画質調整、画像中の所定領域を切り出すクロップ処理、などを行うようにしてもよい。 The image processing unit 106 converts the image output from the image sensor 107 into an image in a specified image format, and outputs the converted image as a captured image. Note that the image processing unit 106 may use the image output from the image sensor 107 to perform image quality adjustments such as color correction, exposure control, and sharpness correction, and cropping to cut out a specified area from the image.

カメラ100は、ネットワークI/F105を介してLAN400に接続されており、カメラ100は、Ethernet(登録商標)等の通信媒体を介してコントローラ200などの外部装置との間の通信を担う。なお、通信は、不図示のシリアル通信I/Fなど別のI/Fを介して行っても構わない。 The camera 100 is connected to the LAN 400 via the network I/F 105, and the camera 100 communicates with external devices such as the controller 200 via a communication medium such as Ethernet (registered trademark). Note that communication may also be performed via another I/F, such as a serial communication I/F (not shown).

CPU101、RAM102、記憶装置103、推論部110、駆動I/F108、画像処理部106、ネットワークI/F105、はいずれも、システムバス111に接続されている。 The CPU 101, RAM 102, storage device 103, inference unit 110, drive I/F 108, image processing unit 106, and network I/F 105 are all connected to a system bus 111.

次に、コントローラ200について説明する。コントローラ200は、PC(パーソナルコンピュータ)、タブレット端末装置、スマートフォン、などのコンピュータ装置である。 Next, the controller 200 will be described. The controller 200 is a computer device such as a PC (personal computer), a tablet terminal device, or a smartphone.

CPU201は、RAM202に格納されているコンピュータプログラムやデータを用いて各種の処理を実行する。これによりCPU201は、コントローラ200全体の動作制御を行うと共に、コントローラ200が行う処理として説明する各種の処理を実行もしくは制御する。 The CPU 201 executes various processes using computer programs and data stored in the RAM 202. As a result, the CPU 201 controls the operation of the entire controller 200, and executes or controls various processes that will be described as processes performed by the controller 200.

RAM202は、記憶装置203からロードされたコンピュータプログラムやデータを格納するためのエリア、CPU201や推論部210が各種の処理を実行する際に用いるワークエリア、を有する。さらにRAM202は、ネットワークI/F204を介してカメラ100から受信した各種の情報を格納するためのエリアを有する。このようにRAM202は、各種のエリアを適宜提供することができる。 The RAM 202 has an area for storing computer programs and data loaded from the storage device 203, and a work area used by the CPU 201 and the inference unit 210 when executing various processes. The RAM 202 also has an area for storing various information received from the camera 100 via the network I/F 204. In this way, the RAM 202 can provide various areas as needed.

記憶装置203は、ROM、フラッシュメモリ、HDD、などの揮発性の記憶装置や不揮発性の記憶装置を含む。記憶装置203には、OS(オペレーティングシステム)、コントローラ200が行う処理として説明する各種の処理をCPU201、推論部210などに実行もしくは制御させるためのコンピュータプログラムやデータ、などが格納されている。 The storage device 203 includes volatile and non-volatile storage devices such as ROM, flash memory, and HDD. The storage device 203 stores an operating system (OS), computer programs and data for causing the CPU 201 and the inference unit 210 to execute or control various processes described as processes performed by the controller 200, and the like.

推論部210は、上記の推論部110と同様の機能を有する。なお、推論部210は本実施形態では使用せず、後述する第2の実施形態では使用するので、本実施形態では、コントローラ200は、推論部210を有していなくても良い。 The inference unit 210 has the same functions as the inference unit 110 described above. Note that the inference unit 210 is not used in this embodiment, but is used in the second embodiment described below, so in this embodiment, the controller 200 does not need to have the inference unit 210.

ユーザ入力I/F206は、キーボード、マウス、タッチパネル画面、ジョイスティック、ボタン、ダイヤルなどのユーザインターフェースであり、ユーザが操作することで各種の情報や指示をコントローラ200に対して入力することができる。 The user input I/F 206 is a user interface such as a keyboard, mouse, touch panel screen, joystick, buttons, and dials, and can be operated by the user to input various information and instructions to the controller 200.

表示部205は、液晶画面やタッチパネル画面を有し、CPU201や推論部210による処理結果を画像や文字などでもって表示することができる。なお、表示部205は、コントローラ200が有する装置であることに限らず、有線もしくは無線でコントローラ200と接続されている外部装置であっても良い。また、表示部205は、画像や文字を投影するプロジェクタなどの投影装置であっても良い。 The display unit 205 has a liquid crystal screen or a touch panel screen, and can display the results of processing by the CPU 201 and the inference unit 210 as images, text, and the like. The display unit 205 is not limited to being a device that the controller 200 has, and may be an external device that is connected to the controller 200 by wire or wirelessly. The display unit 205 may also be a projection device such as a projector that projects images and text.

コントローラ200は、ネットワークI/F204を介してLAN400に接続されており、コントローラ200は、Ethernet(登録商標)等の通信媒体を介してカメラ100などの外部装置との間の通信を担う。なお、通信は、不図示のシリアル通信I/Fなど別のI/Fを介して行っても構わない。 The controller 200 is connected to the LAN 400 via the network I/F 204, and the controller 200 is responsible for communication with external devices such as the camera 100 via a communication medium such as Ethernet (registered trademark). Note that communication may also be performed via another I/F, such as a serial communication I/F (not shown).

CPU201、RAM202、記憶装置203、推論部210、ユーザ入力I/F206、表示部205、ネットワークI/F204,はいずれも、システムバス207に接続されている。 The CPU 201, RAM 202, storage device 203, inference unit 210, user input I/F 206, display unit 205, and network I/F 204 are all connected to a system bus 207.

次に、カメラ100の動作について、図3(a)のフローチャートに従って説明する。図3(a)のフローチャートに従った処理は、1フレーム分の撮像画像についての処理であり、実際には、カメラ100は、図3(a)のフローチャートに従った処理を、各フレームの撮像画像について行う。 Next, the operation of the camera 100 will be described with reference to the flowchart in FIG. 3(a). The process according to the flowchart in FIG. 3(a) is for one frame of captured image, and in reality, the camera 100 performs the process according to the flowchart in FIG. 3(a) for each frame of captured image.

ステップS101では、画像処理部106はCPU101からの指示に従って上記の如く撮像画像を生成し、該生成した撮像画像をRAM102に格納する。また、CPU101は、該撮像画像を推論部110に入力し、該推論部110は、CPU101からの指示に従って、該撮像画像に対する推論結果を生成し、該生成した推論結果をRAM102に格納する。 In step S101, the image processing unit 106 generates a captured image as described above in accordance with instructions from the CPU 101, and stores the generated captured image in the RAM 102. The CPU 101 also inputs the captured image to the inference unit 110, which generates an inference result for the captured image in accordance with instructions from the CPU 101, and stores the generated inference result in the RAM 102.

推論部110は、ディープラーニング等の機械学習手法を用いて作成された学習済みモデルを記憶装置103から読み出す。そして推論部110は、撮像画像を該学習済みモデルに入力して該学習済みモデルの演算(推論)を行うことで、撮像画像における被写体の位置を該被写体の推論結果として取得する。撮像画像に複数の被写体が含まれている場合には、推論部110は、それぞれの被写体について推論結果を取得する。なお、推論の処理速度向上のため、画像処理部106は撮像画像を縮小してRAM102に格納し、学習済みモデルには該縮小した撮像画像を入力するようにしても良い。 The inference unit 110 reads out a trained model created using a machine learning method such as deep learning from the storage device 103. The inference unit 110 then inputs the captured image into the trained model and performs calculations (inference) on the trained model to obtain the position of the subject in the captured image as an inference result for the subject. If the captured image contains multiple subjects, the inference unit 110 obtains an inference result for each subject. Note that, in order to improve the processing speed of the inference, the image processing unit 106 may reduce the captured image and store it in the RAM 102, and the reduced captured image may be input to the trained model.

そしてCPU101は、被写体の推論結果に対して、該被写体に固有の識別情報であるIDを付与する。撮像画像に複数の被写体が含まれている場合には、CPU101は、それぞれの被写体の推論結果に対し、該被写体に固有のIDを付与する。 Then, the CPU 101 assigns an ID, which is identification information unique to the subject, to the subject inference result. If the captured image contains multiple subjects, the CPU 101 assigns an ID unique to each subject to the inference result for that subject.

ここで、図4(a)~(e)を参照して、推論結果について説明する。図4では被写体を人物としている。図4(a)は、撮像画像700に2人の人物(人物701および人物702)が存在する場合の推論結果を示す図である。図4(a)の撮像画像700を推論部110に入力すると、推論部110からは、人物701の位置(人物701の推論結果)として「該人物701の全身を含む矩形710の左上頂点の画像座標および右下頂点の画像座標」が出力され、人物702の位置(人物702の推論結果)として「該人物702の全身を含む矩形711の左上頂点の画像座標および右下頂点の画像座標」が出力される。 Now, the inference results will be described with reference to Figs. 4(a) to (e). In Fig. 4, the subject is a person. Fig. 4(a) is a diagram showing the inference results when two people (person 701 and person 702) are present in the captured image 700. When the captured image 700 in Fig. 4(a) is input to the inference unit 110, the inference unit 110 outputs "the image coordinates of the upper left vertex and the image coordinates of the lower right vertex of a rectangle 710 that includes the entire body of the person 701" as the position of the person 701 (the inference result of the person 701), and outputs "the image coordinates of the upper left vertex and the image coordinates of the lower right vertex of a rectangle 711 that includes the entire body of the person 702" as the position of the person 702 (the inference result of the person 702).

また、CPU101は、人物701の推論結果に、該人物701に固有の識別情報であるID720として「1」を付与し、人物702の推論結果に、該人物702に固有の識別情報であるID721として「2」を付与する。 The CPU 101 also assigns "1" to the inference result for person 701 as ID 720, which is identification information unique to that person 701, and assigns "2" to the inference result for person 702 as ID 721, which is identification information unique to that person 702.

なお、推論部110が出力する人物の位置は、該人物の全身を含む矩形の左上頂点の画像座標および右下頂点の画像座標に限らない。たとえば図4(b)に示す如く、人物701の位置として、人物701の頭部を含む矩形730の左上頂点の画像座標および右下頂点の画像座標、人物702の位置として、人物702の頭部を含む矩形731の左上頂点の画像座標および右下頂点の画像座標、を出力するようにしても良い。また、人物の位置として、人物の他の部位を含む矩形の左上頂点の画像座標および右下頂点の画像座標を出力するようにしても良い。また、矩形の左上頂点の画像座標および右下頂点の画像座標の代わりに、矩形の中心の画像座標と該矩形の幅および高さを出力するようにしても良い。 The position of a person output by the inference unit 110 is not limited to the image coordinates of the upper left vertex and the lower right vertex of a rectangle including the entire body of the person. For example, as shown in FIG. 4B, the image coordinates of the upper left vertex and the lower right vertex of a rectangle 730 including the head of the person 701 may be output as the position of the person 701, and the image coordinates of the upper left vertex and the lower right vertex of a rectangle 731 including the head of the person 702 may be output as the position of the person. Furthermore, the image coordinates of the upper left vertex and the lower right vertex of a rectangle including other parts of the person may be output as the position of the person. Furthermore, instead of the image coordinates of the upper left vertex and the lower right vertex of the rectangle, the image coordinates of the center of the rectangle and the width and height of the rectangle may be output.

なお、人物の検出ではなく頭部や顔等、異なる物体を検出するためには、使用する学習済みモデルを、所望の出力に対応する学習データを元に学習されている学習済みモデルに変更すればよい。 In addition, to detect different objects, such as heads and faces, rather than people, you can change the trained model to one that has been trained based on the training data that corresponds to the desired output.

また、被写体の検出を機械学習手法を用いて作成された学習済みモデルを用いて行うケースについて説明したが、被写体を検出する方法は特定の方法に限らない。たとえば、撮像画像中の局所的な特徴点を照合して検出するSIFT法といった方法や、テンプレート画像との類似度を求めて検出するテンプレートマッチング法といった方法を用いてもよい。 In addition, although the case where the subject is detected using a trained model created using a machine learning method has been described, the method of detecting the subject is not limited to a specific method. For example, a method such as the SIFT method, which detects the subject by matching local feature points in a captured image, or a template matching method, which detects the subject by calculating the similarity with a template image, may be used.

また、推論結果に対するIDの付与は、CPU101がフレームごとに、現在の推論結果に対して実施する。このとき、CPU101は、過去のフレームの推論結果と現在のフレームの推論結果とを照合することで、被写体が移動した場合であっても同じ被写体に対しては同じIDが割り当てられるようにIDを付与する。具体的には、検出される矩形の位置や大きさを過去のフレームと現在のフレームで比較し、最も近い被写体に同じIDを付与する方法を用いてもよい。 Furthermore, the CPU 101 assigns IDs to the inference results for each frame to the current inference result. At this time, the CPU 101 compares the inference results of past frames with the inference results of the current frame to assign IDs so that the same ID is assigned to the same subject even if the subject has moved. Specifically, a method may be used in which the position and size of the detected rectangle is compared between past and current frames, and the same ID is assigned to the closest subject.

ここで、推論結果に対するIDの付与について図4(c)~(e)を参照して説明する。図4(c)~(e)には、以下の説明に必要な情報、つまり、前フレームから検出された人物701の全身を含む矩形710、該矩形710の中心740、現フレームから検出された人物701の全身を含む矩形710a、該矩形710aの中心740a、中心740を中心とする半径L1の円750、を示しており、その他の情報については記載を省略している。 Here, the assignment of IDs to inference results will be described with reference to Figures 4(c) to (e). Figures 4(c) to (e) show information necessary for the following description, namely, a rectangle 710 including the entire body of person 701 detected in the previous frame, a center 740 of rectangle 710, a rectangle 710a including the entire body of person 701 detected in the current frame, a center 740a of rectangle 710a, and a circle 750 of radius L1 centered on center 740; other information is omitted.

L1は予めパラメータとして記憶装置103に格納されている。CPU101は、現フレームにおいて、前フレームにおける被写体Aの矩形Aの中心位置から距離L1以内に被写体Bの矩形Bの中心があり、矩形Aの面積(画素数)と矩形Bの面積(画素数)との比(面積比)が規定範囲X内(たとえば0.9~1.1)であれば、被写体Bは被写体Aと同じ被写体であると判断し、被写体Bの推論結果には、被写体Aの推論結果に付与したIDと同じIDを付与する。規定範囲Xは予めパラメータとして記憶装置103に格納されている。 L1 is stored in advance as a parameter in storage device 103. If, in the current frame, the center of rectangle B of subject B is within distance L1 from the center position of rectangle A of subject A in the previous frame, and the ratio (area ratio) of the area (number of pixels) of rectangle A to the area (number of pixels) of rectangle B is within specified range X (for example, 0.9 to 1.1), CPU 101 determines that subject B is the same subject as subject A, and assigns to the inference result of subject B the same ID as the ID assigned to the inference result of subject A. The specified range X is stored in advance as a parameter in storage device 103.

図4(c)の例では、前フレームにおける矩形710の中心740から距離L1以内(つまり円750内)に矩形710aの中心740aがあり、矩形710の面積(画素数)と矩形710aの面積(画素数)との比(面積比)が規定範囲X内である。然るに、CPU101は、矩形710に対応する人物の推論結果に付与されたIDと同じIDを、矩形710aに対応する人物の推論結果に付与する。 In the example of FIG. 4(c), the center 740a of rectangle 710a is within distance L1 (i.e., within circle 750) from the center 740 of rectangle 710 in the previous frame, and the ratio (area ratio) of the area (number of pixels) of rectangle 710 to the area (number of pixels) of rectangle 710a is within specified range X. Therefore, CPU 101 assigns the same ID to the inference result of the person corresponding to rectangle 710, to the inference result of the person corresponding to rectangle 710a.

図4(d)の例では、前フレームにおける矩形710の中心740から距離L1以内(つまり円750内)に矩形710aの中心740aはない。然るに、CPU101は、矩形710に対応する人物の推論結果に付与されたIDとは異なる新規のIDを、矩形710aに対応する人物の推論結果に付与する。 In the example of FIG. 4(d), the center 740a of the rectangle 710a is not within the distance L1 (i.e., within the circle 750) from the center 740 of the rectangle 710 in the previous frame. Therefore, the CPU 101 assigns a new ID to the inference result of the person corresponding to the rectangle 710a, which is different from the ID assigned to the inference result of the person corresponding to the rectangle 710.

図4(e)の例では、前フレームにおける矩形710の中心740から距離L1以内(つまり円750内)に矩形710aの中心740aがあるが、矩形710の面積(画素数)と矩形710aの面積(画素数)との比(面積比)が規定範囲X内ではない。然るに、CPU101は、矩形710に対応する人物の推論結果に付与されたIDとは異なる新規のIDを、矩形710aに対応する人物の推論結果に付与する。また、前フレームと現在のフレームで矩形の縦横比の変化が閾値Y内のオブジェクトに対して同じIDを付与してもよい。 In the example of FIG. 4(e), the center 740a of rectangle 710a is within distance L1 (i.e., within circle 750) from the center 740 of rectangle 710 in the previous frame, but the ratio (area ratio) of the area (number of pixels) of rectangle 710 to the area (number of pixels) of rectangle 710a is not within the specified range X. Therefore, CPU 101 assigns a new ID to the inference result of the person corresponding to rectangle 710a that is different from the ID assigned to the inference result of the person corresponding to rectangle 710. In addition, the same ID may be assigned to objects whose aspect ratio changes between the previous frame and the current frame within threshold Y.

また、過去の数フレームの同じIDに対応する矩形の位置の推移から現在のフレームの矩形の位置をカルマンフィルタ等により予測し、予測した矩形の位置に最も近い矩形に対応する人物の推論結果に該IDと同じIDを付与する方法を用いてもよい。 Alternatively, a method may be used in which the position of a rectangle in the current frame is predicted using a Kalman filter or the like based on the change in the position of a rectangle corresponding to the same ID in the past few frames, and an ID equal to the predicted rectangle is assigned to the inference result of the person corresponding to the rectangle closest to the predicted rectangle position.

また、現在のフレームで検出されたオブジェクトに対して矩形内の画像の特徴量Aを取得し、該特徴量Aを過去のフレームで検出された各オブジェクトに対応する各矩形内の画像の特徴量Bと比較し、特徴量Aに最も近い特徴量Bの矩形の人物の推論結果に付与されているIDと同じIDを人物Aの推論結果に付与する方法を用いても良い。 Alternatively, a method may be used in which feature amount A of an image within a rectangle is obtained for an object detected in the current frame, feature amount A is compared with feature amount B of an image within each rectangle corresponding to each object detected in a previous frame, and the inference result for person A is assigned the same ID as the ID assigned to the inference result for the person in the rectangle with feature amount B that is closest to feature amount A.

以下、特徴量として画像の特徴ベクトルを使用する場合について述べる。まず、異なる角度から見た特定人物の画像に対して類似した特徴ベクトルを出力し、異なる人物の画像にはそれらと異なる特徴ベクトルを出力するように学習された機械学習モデルを用意する。具体的には、あらかじめ様々な被写体を様々な角度から撮影した画像を学習用画像として用意し、同じ被写体を撮影した画像については、同じIDでラベリングし、機械学習モデルの入力とする。出力は画像から出力される特徴ベクトルである。各学習用画像から出力された特徴ベクトルをマッピングした特徴ベクトル空間をDeep Metric Learning(深層距離学習)により学習する。深層距離学習において、2つの特徴量間の距離がデータの類似度を反映しており、意味の近い入力画像同士から出力された特徴量同士の距離は近く、意味の遠い入力画像同士から出力された特徴ベクトル同士の距離は遠くなるよう学習を行う。距離を算出する深層距離学習に用いる損失関数には、トリプレットロス、Contrastive loss、クラス分類誤差、などがある。このように学習された機械学習モデルに同じ被写体を別の角度から撮影した撮影画像を入力すると、推論結果として出力される特徴ベクトルは近いものになる。なお、損失関数は、入力画像の意味合いの近さに応じて損失が小さくなるように定義された関数であればどのようなものを使ってもよい。なお、深層距離学習を使う例を説明したが、それに限定されることはなく、特徴ベクトルのデータ群を、同じ被写体を撮影した画像の特徴ベクトル群と、異なる被写体を撮影した特徴ベクトル群と、に分離できる学習方法を使えばどのような方法を用いても実施できる。 The following describes the case where the feature vector of an image is used as a feature. First, a machine learning model is prepared that is trained to output similar feature vectors for images of a specific person viewed from different angles and output different feature vectors for images of different people. Specifically, images of various subjects taken from various angles are prepared in advance as learning images, and images of the same subject are labeled with the same ID and used as input for the machine learning model. The output is a feature vector output from the image. A feature vector space in which the feature vectors output from each learning image are mapped is learned by Deep Metric Learning. In deep metric learning, the distance between two feature amounts reflects the similarity of the data, and learning is performed so that the distance between feature amounts output from input images with similar meanings is close, and the distance between feature vectors output from input images with distant meanings is far. Loss functions used in deep metric learning to calculate distance include triplet loss, contrastive loss, and class classification error. If images of the same subject taken from different angles are input to a machine learning model trained in this way, the feature vectors output as inference results will be similar. Any loss function may be used as long as it is defined so that the loss decreases according to the similarity in meaning of the input images. Note that although an example using deep metric learning has been described, this is not limited to this, and any learning method that can separate feature vector data groups into feature vector groups of images of the same subject and feature vector groups of images of different subjects can be used.

また、ID付与に用いる特徴量はこの限りではなく、現在のフレームの矩形内の画像の色情報を取得し、これを過去のフレームの各矩形内の色情報と比較し、最も近い人物に同じIDを付与するといった方法でもよい。具体的には、色情報は、矩形の中の特定の割合の位置の画素値や、特定の領域の画素値の平均を算出することで得られる。または、矩形の中全体の平均をとっても良いし、例えば、上半身は同じユニフォームを着ているような場合は、矩形の下方の領域の画素値の平均を取るなどしてもよく、被写体の肌や服の差が顕著に表れる領域の色を取得できるようにすればよい。また、色情報として、矩形の全体や、特定の領域のヒストグラムを得て、過去のフレームの各矩形内のヒストグラムと、ピアソンの相関関数やカイ二乗検定などいった方法で比較し、最も類似度が高い人物に同じIDを付与してもよい。 Also, the feature amount used for ID assignment is not limited to this, and a method of obtaining color information of the image within the rectangle of the current frame, comparing this with color information within each rectangle of past frames, and assigning the same ID to the person who is closest to the person may be used. Specifically, color information can be obtained by calculating the average of pixel values at a specific percentage of the position within the rectangle, or the average of pixel values in a specific region. Alternatively, the average of the entire rectangle may be taken, or, for example, if the upper body is wearing the same uniform, the average of pixel values in the lower region of the rectangle may be taken, so long as it is possible to obtain the color of the region where the difference in the subject's skin or clothing is clearly visible. Also, a histogram of the entire rectangle or a specific region may be obtained as color information, and compared with the histograms within each rectangle of past frames using methods such as Pearson's correlation function or chi-square test, and the same ID may be assigned to the person with the highest similarity.

また、同じIDを付与するための特徴量の差(上記の例では特徴量Aと特徴量Bとの差)には閾値を設けても良い。この場合、CPU101は、特徴量Aと、該特徴量Aに最も近い特徴量Bと、の差が閾値以下であれば、該特徴量Bの矩形の人物の推論結果に付与されているIDと同じIDを人物Aの推論結果に付与する。 A threshold value may also be set for the difference in features for assigning the same ID (the difference between feature A and feature B in the above example). In this case, if the difference between feature A and feature B closest to feature A is equal to or less than the threshold value, the CPU 101 assigns to the inference result of person A the same ID as the ID assigned to the inference result of the rectangular person with feature B.

また、異なる角度から見た特定人物の画像に対して類似した特徴量を出力し、異なる人物の画像にはそれらと異なる特徴量を出力するように学習された機械学習モデルによって、特徴量を取得するようにしてもよい。また、これらの方法を組み合わせてIDを付与してもよい。 Functions may also be acquired using a machine learning model that is trained to output similar features for images of a specific person seen from different angles, and output different features for images of different people. IDs may also be assigned by combining these methods.

ステップS102では、CPU101は、RAM102に格納された撮像画像および推論結果(該推論結果のIDを含む)を送信情報として読み出し、該読み出した送信情報をネットワークI/F105を介してコントローラ200に対して送信する。 In step S102, the CPU 101 reads out the captured image and the inference result (including the ID of the inference result) stored in the RAM 102 as transmission information, and transmits the read transmission information to the controller 200 via the network I/F 105.

ステップS103では、CPU101は、ネットワークI/F105を介して「追尾対象の被写体のID(追尾被写体ID)」をコントローラ200から受信したか否かを判断する。この判断の結果、追尾被写体IDをコントローラ200から受信した場合には、処理はステップS105に進み、追尾被写体IDをコントローラ200から受信していない場合には、処理はステップS104に進む。 In step S103, the CPU 101 determines whether or not the "ID of the subject to be tracked (tracked subject ID)" has been received from the controller 200 via the network I/F 105. If the result of this determination is that the tracked subject ID has been received from the controller 200, the process proceeds to step S105, and if the tracked subject ID has not been received from the controller 200, the process proceeds to step S104.

ステップS104では、CPU101は、RAM102に決定済みの追尾被写体IDが格納されているか否か(追尾被写体IDは決定済みか否か)を判断する。この判断の結果、RAM102に決定済みの追尾被写体IDが格納されている(追尾被写体IDは決定済み)場合には、処理はステップS106に進む。一方、RAM102に決定済みの追尾被写体IDが格納されていない(追尾被写体IDは決定済みでない)場合には、処理はステップS101に進む。 In step S104, the CPU 101 determines whether or not a determined tracking subject ID is stored in the RAM 102 (whether or not the tracking subject ID has been determined). If the result of this determination is that a determined tracking subject ID is stored in the RAM 102 (the tracking subject ID has been determined), the process proceeds to step S106. On the other hand, if a determined tracking subject ID is not stored in the RAM 102 (the tracking subject ID has not been determined), the process proceeds to step S101.

たとえば、CPU101は、RAM102に格納されている追尾被写体IDに初期値(たとえばNULL)が設定されている場合には、RAM102に決定済みの追尾被写体IDが格納されていない(追尾被写体IDは決定済みでない)と判断しても良い。この場合、CPU101は、RAM102に格納されている追尾被写体IDに初期値以外の値が設定されている場合には、RAM102に決定済みの追尾被写体IDが格納されている(追尾被写体IDは決定済み)と判断する。 For example, if the tracking subject ID stored in RAM 102 is set to an initial value (e.g., NULL), CPU 101 may determine that a determined tracking subject ID is not stored in RAM 102 (the tracking subject ID has not been determined). In this case, if the tracking subject ID stored in RAM 102 is set to a value other than the initial value, CPU 101 determines that a determined tracking subject ID is stored in RAM 102 (the tracking subject ID has been determined).

ステップS105では、CPU101は、ネットワークI/F105を介してコントローラ200から受信した追尾被写体IDをRAM102に格納する。ステップS106では、CPU101は、ステップS101でRAM102に格納した推論結果(現フレームの撮像画像から検出された被写体の推論結果)のうち、追尾被写体IDと同じIDが付与されている推論結果が存在するか否かを判断する。つまりCPU101は、追尾被写体IDと同じIDに対応する被写体が現フレームの撮像画像から検出されているか否かを判断する。 In step S105, the CPU 101 stores the tracking subject ID received from the controller 200 via the network I/F 105 in the RAM 102. In step S106, the CPU 101 determines whether or not there is an inference result to which the same ID as the tracking subject ID is assigned among the inference results (inference results of the subject detected from the captured image of the current frame) stored in the RAM 102 in step S101. In other words, the CPU 101 determines whether or not a subject corresponding to the same ID as the tracking subject ID has been detected from the captured image of the current frame.

この判断の結果、現フレームの撮像画像から検出された被写体の推論結果の中に、追尾被写体IDと同じIDが付与されている推論結果が存在する(追尾被写体IDと同じIDに対応する被写体が検出されている)場合には、処理はステップS109に進む。 If this determination shows that the inference results for the subject detected from the captured image of the current frame include an inference result that has been assigned the same ID as the tracked subject ID (a subject corresponding to the same ID as the tracked subject ID has been detected), processing proceeds to step S109.

一方、現フレームの撮像画像から検出された被写体の推論結果の中に、追尾被写体IDと同じIDが付与されている推論結果は存在しない(追尾被写体IDと同じIDに対応する被写体は検出されていない)場合、CPU101は追尾対象の被写体のロストが発生したと判断し、現在の時刻TをRAM102に格納し、そして処理はステップS107に進む。現在の時刻はCPU101が有するタイマ機能により取得する。なお、CPU101は、現在の時刻に加えて若しくは代えて、現フレームのフレーム番号やタイムスタンプなど、追尾対象の被写体のロストが発生したタイミングを規定する情報を格納するようにしても良い。 On the other hand, if there is no inference result for the subject detected from the captured image of the current frame that has been assigned the same ID as the tracking subject ID (a subject corresponding to the same ID as the tracking subject ID has not been detected), the CPU 101 determines that the tracking target subject has been lost, stores the current time T in the RAM 102, and the process proceeds to step S107. The current time is obtained by a timer function of the CPU 101. Note that the CPU 101 may store information that specifies the timing when the tracking target subject was lost, such as the frame number of the current frame or a timestamp, in addition to or instead of the current time.

このときの撮像画像中の被写体の様子の例を図4(a)、(f)を用いて説明する。ここでは追尾被写体ID=1(つまり追尾対象の被写体は人物701)であるケースについて説明する。 An example of the state of the subject in the captured image at this time will be described using Figures 4(a) and (f). Here, we will explain the case where the tracking subject ID = 1 (i.e., the subject to be tracked is person 701).

図4(a)の状態の後、例えば人物701および人物702が移動し、人物702が人物701の手前(カメラ100側)を通って交錯した場合、図4(f)に示す如く、撮像画像700において人物701は人物702によって遮蔽されて見えなくなる(人物701のロストが発生した状態)。この結果、図4(f)の撮像画像700から得られるIDの中には追尾被写体IDは存在しない。この場合、処理はステップS106からステップS107に進む。 After the state of FIG. 4(a), for example, if person 701 and person 702 move and person 702 passes in front of person 701 (on the camera 100 side) and crosses over, person 701 is blocked by person 702 in the captured image 700 and becomes invisible (a state in which person 701 has been lost) as shown in FIG. 4(f). As a result, there is no tracking subject ID among the IDs obtained from the captured image 700 of FIG. 4(f). In this case, the process proceeds from step S106 to step S107.

ステップS107では、CPU101は、RAM102に格納されている「フレームごとの、該フレームから検出された被写体の推論結果」のうち、現在のフレームから検出された被写体の推論結果のIDと、時刻T以前(上記のタイミング以前)のフレームから検出された被写体の推論結果のIDと、を取得する。そしてCPU101は、現在のフレームから検出された被写体の推論結果のIDの中に、時刻T以前のフレームから検出された被写体の推論結果のIDのいずれとも異なる新規のIDが含まれているか否かを判断する。 In step S107, the CPU 101 acquires the ID of the inference result of the subject detected from the current frame and the ID of the inference result of the subject detected from a frame prior to time T (prior to the above timing) from the "inference results of the subject detected from the frame for each frame" stored in the RAM 102. The CPU 101 then determines whether the IDs of the inference result of the subject detected from the current frame include a new ID that is different from any of the IDs of the inference result of the subject detected from a frame prior to time T.

この判断の結果、現在のフレームから検出された被写体の推論結果のIDの中に、時刻T以前のフレームから検出された被写体の推論結果のIDのいずれとも異なる新規のIDが含まれている場合には、処理はステップS108に進む。一方、現在のフレームから検出された被写体の推論結果のIDの中に、時刻T以前のフレームから検出された被写体の推論結果のIDのいずれとも異なる新規のIDは含まれていない場合には、処理はステップS101に進む。 If the result of this determination is that the IDs of the inference results of the subject detected from the current frame include a new ID that is different from any of the IDs of the inference results of the subject detected from frames prior to time T, the process proceeds to step S108. On the other hand, if the IDs of the inference results of the subject detected from the current frame do not include a new ID that is different from any of the IDs of the inference results of the subject detected from frames prior to time T, the process proceeds to step S101.

このときの撮像画像中の被写体の様子の例を図4(a)、(f)、(g)を用いて説明する。例えば、図4(f)の撮像画像700を現在のフレーム、図4(a)の撮像画像700を時刻T以前のフレームとする。このとき、図4(f)の撮像画像700について取得した推論結果のIDはID=2のみであり、図4(a)の撮像画像700について取得した推論結果のIDはID=1,2であるから、新規のIDは存在しない。この場合は、処理はステップS107からステップS101に進む。 An example of the state of the subject in the captured image at this time will be described using Figures 4(a), (f), and (g). For example, the captured image 700 in Figure 4(f) is the current frame, and the captured image 700 in Figure 4(a) is the frame before time T. At this time, the ID of the inference result obtained for the captured image 700 in Figure 4(f) is only ID=2, and the IDs of the inference results obtained for the captured image 700 in Figure 4(a) are ID=1 and 2, so there is no new ID. In this case, the process proceeds from step S107 to step S101.

一方、図4(f)の状態から人物701および人物702がさらに移動して交錯が終了すると、図4(g)に示す如く、再び人物701が現れる。図4(g)の撮像画像700を入力した推論部110からは、人物701の推論結果と、人物702の推論結果と、が出力される。ここで、交錯後の人物の推論結果には、交錯前の人物の推論結果のIDと同じIDは付与されず、新規のIDが付与される場合があり、これにより追尾対象の被写体のロストが発生する。図4(g)の例では、撮像画像700に対する推論の結果、交錯後の人物701の推論結果には、交錯前の人物701の推論結果のID(ID=1)と同じIDは付与されず、新規のID722としてID=3が付与されている。 On the other hand, when the person 701 and the person 702 move further from the state of FIG. 4(f) and the intersection ends, the person 701 appears again as shown in FIG. 4(g). The inference unit 110, which has received the captured image 700 of FIG. 4(g), outputs the inference results of the person 701 and the person 702. Here, the inference result of the person after the intersection is not assigned the same ID as the ID of the inference result of the person before the intersection, but a new ID may be assigned, which may cause the tracking target subject to be lost. In the example of FIG. 4(g), the inference result of the captured image 700, the inference result of the person after the intersection is not assigned the same ID as the ID (ID=1) of the inference result of the person 701 before the intersection, but is assigned ID=3 as a new ID 722.

図4(g)の撮像画像700について取得した推論結果のIDはID=2,3であり、図4(a)の撮像画像700について取得した推論結果のIDはID=1,2であるから、ID=3が新規のIDとなる。この場合、処理はステップS107からステップS108に進む。 The IDs of the inference results obtained for the captured image 700 in FIG. 4(g) are ID=2, 3, and the IDs of the inference results obtained for the captured image 700 in FIG. 4(a) are ID=1, 2, so ID=3 becomes the new ID. In this case, the process proceeds from step S107 to step S108.

新規のIDが付与される例として、ロストする直前の被写体の位置と再出現した被写体の位置が離れている場合や、交錯後に被写体の向きや姿勢などが変化することで、被写体の矩形のロスト前後での大きさの変化が大きい場合、がある。また、新規のIDが付与される例として、交錯後に被写体の向きや外光の当たり方が変化し、色情報などの特徴量の変化がロスト前後で大きい場合などもある。 Examples of when a new ID is assigned include when the subject's position immediately before it was lost is far from the position of the subject when it reappears, or when the subject's orientation or posture changes after crossing, causing a large change in the size of the subject's rectangle before and after it is lost. Another example of when a new ID is assigned is when the subject's orientation or the way the external light hits it changes after crossing, causing a large change in features such as color information before and after it is lost.

なお、ステップS107における判断の方法は特定の判断方法に限らない。たとえば、CPU101は、ロストが発生したフレームで検出された被写体の推論結果のIDをRAM102に格納しておく。そしてCPU101は、現在のフレームで検出された被写体の推論結果のIDの中に、RAM102に格納されているIDのいずれとも異なる新規のIDが含まれているか否かを判断するようにしても良い。たとえば、CPU101は、図4(f)の撮像画像700(ロストが発生したフレーム)で検出された被写体の推論結果のIDをRAM102に格納しておき、図4(g)の撮像画像700(現在のフレーム)で検出された被写体の推論結果のIDの中に、RAM102に格納されているIDのいずれとも異なる新規のIDが含まれているか否かを判断するようにしても良い。 The method of judgment in step S107 is not limited to a specific judgment method. For example, CPU 101 stores in RAM 102 the ID of the inference result of the subject detected in the frame in which the loss occurred. CPU 101 may then determine whether the ID of the inference result of the subject detected in the current frame includes a new ID that is different from any of the IDs stored in RAM 102. For example, CPU 101 may store in RAM 102 the ID of the inference result of the subject detected in captured image 700 in FIG. 4(f) (the frame in which the loss occurred) and determine whether the ID of the inference result of the subject detected in captured image 700 in FIG. 4(g) (the current frame) includes a new ID that is different from any of the IDs stored in RAM 102.

そしてこのような判断の結果、現在のフレームで検出された被写体の推論結果のIDの中に、RAM102に格納されているIDのいずれとも異なる新規のIDが含まれている場合には、処理はステップS108に進む。 If the result of this determination is that the IDs of the inference results for the subject detected in the current frame include a new ID that is different from any of the IDs stored in RAM 102, processing proceeds to step S108.

一方、現在のフレームで検出された被写体の推論結果のIDの中に、RAM102に格納されているIDのいずれとも異なる新規のIDが含まれていない場合には、処理はステップS101に進む。 On the other hand, if the inference result IDs of the subject detected in the current frame do not include a new ID that is different from any of the IDs stored in RAM 102, processing proceeds to step S101.

ステップS108では、CPU101は、RAM102に格納されている追尾被写体IDを、新規のIDに更新する。図4(g)の撮像画像700については新規のID=3が存在するので、この場合は、CPU101は、追尾被写体IDを「3」に更新する。 In step S108, the CPU 101 updates the tracking subject ID stored in the RAM 102 to a new ID. Since a new ID of 3 exists for the captured image 700 in FIG. 4(g), in this case the CPU 101 updates the tracking subject ID to "3."

交錯によるロストが起きた場合、ロストが発生した時刻以降に新規で現れたIDは、ロスト前の追尾被写体IDである可能性が高いため、追尾被写体IDを新規のIDに更新することで、撮像画像上に存在する被写体の追尾を再開することができる。 If a subject is lost due to cross-over, the new ID that appears after the time the subject is lost is likely to be the ID of the subject being tracked before it was lost. Therefore, by updating the ID of the subject being tracked to a new ID, tracking of the subject present in the captured image can be resumed.

なお、CPU101は、ステップS108の処理の前に、新規のIDに対応する被写体の位置に基づいて、追尾被写体IDを新規のIDに更新するか否かを判断するようにしても良い。以下に図4を用いて一例を説明する。 Before the process of step S108, the CPU 101 may determine whether or not to update the tracking subject ID to a new ID based on the position of the subject corresponding to the new ID. An example will be described below with reference to FIG. 4.

図4(h)に示す如く、CPU101は、ロストした被写体の位置(図4(f)の位置760)を中心とした半径L2の円770を設定する。ロストした被写体の位置の求め方は特定の求め方に限らない。たとえば、ロスト直前のフレームにおける追尾対象の被写体の位置に、ロスト直前のフレームにおける追尾対象の被写体の移動ベクトルを加算した位置を、ロストした被写体の位置としてとして求めても良い。また、ロストした被写体を隠蔽した被写体の位置を、ロストした被写体の位置として求めても良い。L2は予めパラメータとして記憶装置103に格納されている。そしてCPU101は、新規のIDに対応する被写体の位置が円770内の位置であれば、追尾被写体IDを新規のIDに更新する、と判断し、ステップS108の処理を行う。 As shown in FIG. 4(h), the CPU 101 sets a circle 770 of radius L2 centered on the position of the lost subject (position 760 in FIG. 4(f)). The method of determining the position of the lost subject is not limited to a specific method. For example, the position of the lost subject may be determined by adding the movement vector of the tracked subject in the frame immediately before the subject was lost to the position of the tracked subject in the frame immediately before the subject was lost. The position of the subject that concealed the lost subject may also be determined as the position of the lost subject. L2 is stored in advance as a parameter in the storage device 103. If the position of the subject corresponding to the new ID is within the circle 770, the CPU 101 determines that the tracked subject ID should be updated to the new ID, and performs the process of step S108.

たとえば、図4(h)に示す如く、交錯後に人物701が再出現した際に、別の人物703が画角外から入ってくる場合、人物701の推論結果に対してだけでなく、人物703の推論結果に対しても、新規のIDが付与される。図4(h)では、人物703の推論結果には、新規のID723としてID=4が付与されている。この場合、CPU101は、人物701の位置761と位置760との間の距離D1、人物703の位置762と位置760との間の距離D2、を求める。その結果、人物701の位置761は円770の内側に存在しており(D1<L2)、人物703の位置762は円770の外側に位置している(D2>L2)。よってCPU101は、追尾被写体IDを、人物703の推論結果に付与された新規のID=4ではなく、人物701の推論結果に付与された新規のID=3に更新する。このように、追尾被写体IDを、ロストしたときの被写体の位置から離れた距離で出現した被写体のIDには更新しないので、適切な追尾を行うことができる。 For example, as shown in FIG. 4(h), when person 701 reappears after the intersection and another person 703 enters from outside the angle of view, a new ID is assigned not only to the inference result of person 701 but also to the inference result of person 703. In FIG. 4(h), ID=4 is assigned as a new ID 723 to the inference result of person 703. In this case, CPU 101 calculates the distance D1 between position 761 and position 760 of person 701, and the distance D2 between position 762 and position 760 of person 703. As a result, position 761 of person 701 is inside circle 770 (D1<L2), and position 762 of person 703 is outside circle 770 (D2>L2). Therefore, CPU 101 updates the tracking subject ID to the new ID=3 assigned to the inference result of person 701, rather than the new ID=4 assigned to the inference result of person 703. In this way, the ID of the tracked subject is not updated to the ID of a subject that appears at a distance from the subject's position when it was lost, allowing for proper tracking.

なお、ロストしたときの被写体の位置から半径L2の円内の範囲(閾値範囲)に現れた被写体のIDで追尾被写体IDを更新するとしたが、閾値範囲はこの限りではない。たとえば、閾値範囲の形状は円に限らず、矩形であってもよいし、非対称の形状であってもよい。 Note that, although it has been stated that the tracking subject ID is updated with the ID of a subject that appears within a range (threshold range) of a circle with a radius of L2 from the position of the subject when it was lost, the threshold range is not limited to this. For example, the shape of the threshold range is not limited to a circle, and it may be a rectangle or an asymmetric shape.

また、L2の値は一定ではなくロストが発生するたびに動的に変化させても良い。例えば、追尾対象の被写体がロストする前の推論結果の矩形のサイズを元に決めてもよい。矩形のサイズがより大きいほど、それに応じてL2の値もより大きくすることで、ロスト発生時も適切な追尾被写体IDの更新が行われるようにしてもよい。 The value of L2 may not be constant, but may be changed dynamically each time a subject becomes lost. For example, it may be determined based on the size of the rectangle in the inference result before the subject to be tracked was lost. The larger the size of the rectangle, the larger the value of L2 may be set accordingly, so that the tracking subject ID can be updated appropriately even when the subject is lost.

また、例えば、追尾対象の被写体がロストする前の追尾対象の被写体の矩形の移動距離から該矩形の移動速度を算出し、その速度に応じてL2の値を決めてもよい。具体的には、速度が速いほど、L2をより大きくすることで、ロスト発生時も適切な追尾被写体IDの更新が行われるようにしてもよい。 In addition, for example, the moving speed of the rectangle of the tracking target subject may be calculated from the moving distance of the rectangle of the tracking target subject before the tracking target subject is lost, and the value of L2 may be determined according to that speed. Specifically, the faster the speed, the larger L2 may be set, so that the tracking target subject ID can be appropriately updated even when the tracking target subject is lost.

また、例えば、追尾対象の被写体がロストする前の推論結果の矩形の移動方向を算出し、閾値範囲の形状を変えてもよい。具体的には、追尾被写体がロスト発生前に撮像画像中で右に移動していたとすると、ロスト発生位置に対して右側を、左側に対して大きくした形状の閾値範囲を設定してもよい。 In addition, for example, the direction of movement of the rectangle of the inference result before the subject to be tracked was lost may be calculated, and the shape of the threshold range may be changed. Specifically, if the subject to be tracked moved to the right in the captured image before it was lost, a threshold range may be set that is larger on the right side of the position where the subject was lost, and larger on the left side.

このようにすることで、誤った追尾被写体IDの更新を抑制しつつ、適切な追尾被写体IDの更新が行われる。また、例えば、ロスト発生時からの経過時間に応じてL2の値を決めてもよい。ロスト発生時からの経過時間が長いほど、L2の値を大きくすることで、大きな物体と交錯してロストが発生した際も適切な追尾被写体IDの更新が行われるようにしてもよい。このように、追尾被写体がロストした場合においても、新規のIDで追尾被写体IDを更新することで、追尾被写体に対して適切な追尾を継続することができる。 In this way, the ID of the tracking subject is updated appropriately while preventing erroneous updates to the ID of the tracking subject. In addition, for example, the value of L2 may be determined according to the time that has elapsed since the tracking subject was lost. The longer the time that has elapsed since the tracking subject was lost, the larger the value of L2 may be set, so that the ID of the tracking subject can be updated appropriately even when the tracking subject is lost due to collision with a large object. In this way, even if the tracking subject is lost, the tracking subject ID can be updated with a new ID, allowing appropriate tracking of the tracking subject to continue.

また、ステップS108にて新規に現れたIDについて、特徴量がロスト発生前の追尾被写体の特徴量と近い場合は、新規に現れたIDを新たな追尾被写体IDとして追尾被写体IDの更新を行ってもよい。 In addition, if the feature amount of the newly appeared ID in step S108 is close to the feature amount of the tracking subject before it was lost, the tracking subject ID may be updated to the newly appeared ID as a new tracking subject ID.

特徴量として特徴ベクトルを用いる場合は、ステップS101で全被写体の特徴ベクトルをRAM102に保存しておく。特徴ベクトルの算出は、ステップS101で述べた方法を用いて行う。ステップS106にて追尾被写体IDが検出されている場合は、追尾被写体IDが振られた被写体の特徴ベクトルをRAM102に保存しておく。ステップS108にて新規に現れたIDについて、当該IDが振られた被写体の特徴ベクトルと、RAM102から読み込んだ追尾被写体の特徴ベクトルと、の差が閾値以内であれば、新規に表れたIDにより追尾被写体IDを更新する。 When feature vectors are used as features, the feature vectors of all subjects are stored in RAM 102 in step S101. The feature vectors are calculated using the method described in step S101. When a tracking subject ID is detected in step S106, the feature vector of the subject to which the tracking subject ID is assigned is stored in RAM 102. For a newly appearing ID in step S108, if the difference between the feature vector of the subject to which the ID is assigned and the feature vector of the tracking subject read from RAM 102 is within a threshold, the tracking subject ID is updated with the newly appearing ID.

また、特徴量として顔や身体の向きを用いてもよい。ステップS108にて新規に現れたIDが振られたオブジェクトについて、顔や体の向きが、ロスト発生前の追尾被写体の顔や体の向きと近い場合は、新規に現れたIDを新たな追尾被写体IDとして追尾被写体IDの更新を行ってもよい。人物の顔や身体の画像と、当該画像の顔や体の向きを顔や体の向き(全方位を4分割し、正面、右向き、左向き、後ろ向きのいずれか)を教師データとして学習した学習済モデルを用意する。顔や体の向きは、前述のもの以外に、全方位を8分割し、右斜め後ろ向き、などより細かい向きを与えてもよい。また、顔や体の向きを、正面を0°として0°-359°のように与えても良い。より細かい向きを与えるほど、推論結果も細かい向きが結果として得られる。この学習済モデルに人物の顔や身体が写った画像を入力すると、推論結果として、被写体の向きを取得することができる。具体的には、ステップS101であらかじめ全被写体の身体や顔の向きを取得しておき、ステップS106にて追尾被写体IDが検出されている場合は、追尾被写体IDが振られた被写体の向きをRAM102に保存しておく。ステップS108にて新規に現れたIDについて、当該IDが振られた被写体の向きと、RAM102から読み込んだ追尾被写体の向きが同じであれば、新規に表れたIDにより追尾被写体IDを更新する。また、被写体の画像から鼻、口、目、耳、腕などの身体の部位の位置を出力する学習済モデルを用意し、推論の結果得られた、部位の数や位置関係から顔や身体の向きを決定してもよい。例えば、認識された被写体の矩形の中で目と耳がひとつしか認識されず、鼻が左側にある場合は、被写体の向きは左横向きであると決定できる。決め方はこの限りではない。 The orientation of the face or body may also be used as a feature. For an object with a newly-appearing ID assigned in step S108, if the orientation of the face or body is close to the orientation of the face or body of the tracking subject before the loss, the newly-appearing ID may be used as a new tracking subject ID to update the tracking subject ID. A trained model is prepared that has learned the image of a person's face or body and the orientation of the face or body in the image (dividing the entire direction into four, either forward, rightward, leftward, or backward) as teacher data. In addition to the above, the orientation of the face or body may be divided into eight directions and given in more detail, such as right-diagonal backward. The orientation of the face or body may also be given as 0°-359°, with the front being 0°. The more detailed the orientation, the more detailed the inference result. When an image of a person's face or body is input to this trained model, the orientation of the subject can be obtained as an inference result. Specifically, the orientation of the body and face of all subjects is acquired in advance in step S101, and if a tracking subject ID is detected in step S106, the orientation of the subject to which the tracking subject ID is assigned is stored in RAM 102. For a newly appearing ID in step S108, if the orientation of the subject to which the ID is assigned is the same as the orientation of the tracking subject read from RAM 102, the tracking subject ID is updated with the newly appearing ID. Also, a trained model that outputs the positions of body parts such as the nose, mouth, eyes, ears, and arms from the image of the subject may be prepared, and the orientation of the face and body may be determined from the number and positional relationship of the parts obtained as a result of inference. For example, if only one eye and one ear are recognized in the recognized rectangle of the subject, and the nose is on the left side, it can be determined that the orientation of the subject is left sideways. The method of determination is not limited to this.

このような処理により、交錯時は、被写体は一方向に移動してすれ違う場合が多いため、顔や身体の向きにより、ロストが発生した際も適切な追尾被写体IDの更新が行われる。前述のように、顔や身体の向きを、より細かい向きや角度を出力するような学習済モデルを用いる場合は、ロストした追尾被写体の向きと新規に現れたIDの被写体の向きが閾値以内であれば、新規に表れたIDにより追尾被写体IDを更新してもよい。例えば、向きを全方位を8分割で出力する場合、ロストした追尾被写体の向きが、右斜め前向きであった場合、新規に現れたIDが振られた被写体の向きが、右向き、右斜め前向き、下向きのいずれかであった場合は、新規に表れたIDにより追尾被写体IDを更新するとしてもよい。例えば、向きを全方位を0°-359°で出力する場合、ロストした追尾被写体の向きが、35°であった場合、新規に現れたIDが振られた被写体の向きが、25°から45°、すなわち被写体の向き±10°の範囲内である場合は、新規に表れたIDにより追尾被写体IDを更新するとしてもよい。このようにIDを更新する条件に幅を持たせることで、ロスト後の追尾被写体のわずかな向きの変更にもロバストになる。 By this processing, when a subject crosses the path, it often moves in one direction and passes by the subject, so even if the subject is lost, the tracking subject ID is updated appropriately depending on the direction of the face or body. As described above, when using a trained model that outputs more precise directions and angles for the direction of the face or body, if the direction of the lost tracking subject and the direction of the subject with the newly appeared ID are within a threshold, the tracking subject ID may be updated with the newly appeared ID. For example, when the direction is output in eight divisions in all directions, if the direction of the lost tracking subject was facing diagonally forward to the right, and the direction of the subject with the newly appeared ID is facing right, diagonally forward to the right, or downward, the tracking subject ID may be updated with the newly appeared ID. For example, if the orientation is output as 0°-359° in all directions, and the orientation of the lost tracked subject was 35°, if the orientation of a subject with a newly-appearing ID is between 25° and 45°, i.e., within the range of ±10° of the subject's orientation, the tracked subject ID may be updated with the newly-appearing ID. By allowing a certain degree of flexibility in the conditions for updating the ID in this way, the system becomes robust to even slight changes in the orientation of the tracked subject after it is lost.

また、特徴量として、顔や体の向き以外にも、被写体の姿勢や体形といった属性を用いてもよい。被写体の姿勢や体形といった属性を学習した学習済モデルを用意し、ロスト発生前の追尾被写体の属性と、ステップS108にて新規に現れたIDが振られたオブジェクトの属性が近い場合は、新規に現れたIDを新たな追尾被写体IDとして追尾被写体IDの更新を行ってもよい。具体的には、姿勢であれば、撮影画像と胴体部分の傾き角度を教師データとして学習させ、撮影画像から胴体の傾き角度を出力するような学習済モデルを用意する。体形であれば、撮影画像と豊満具合を数値化した数値を教師データとして学習させ、撮影画像から豊満具合を出力するような学習済モデルを用意する。このような学習済モデルを用いると、ロスト前後で姿勢が近いオブジェクト、体形が近いオブジェクトが分かる。このような処理を行うと、追尾対象被写体のロスト発生前後の特徴を加味し、ロストが発生した際も適切な追尾被写体IDの更新が行われる。 In addition, in addition to the orientation of the face and body, attributes such as the posture and body shape of the subject may be used as feature quantities. A trained model that has learned attributes such as the posture and body shape of the subject may be prepared, and if the attributes of the tracking subject before the loss occurrence are similar to the attributes of the object that has been assigned a new ID in step S108, the tracking subject ID may be updated with the newly appeared ID as a new tracking subject ID. Specifically, in the case of posture, a trained model is prepared that trains the captured image and the tilt angle of the torso part as teacher data and outputs the tilt angle of the torso from the captured image. In the case of body shape, a trained model is prepared that trains the captured image and a numerical value that quantifies the degree of fullness as teacher data and outputs the degree of fullness from the captured image. By using such a trained model, it is possible to determine objects with similar postures and body shapes before and after the loss. By performing such processing, the characteristics of the tracking target subject before and after the loss occurrence are taken into account, and the tracking subject ID is appropriately updated even when the loss occurs.

また、特徴量として、検出された矩形のサイズや縦横比を用いてもよい。ステップS101で認識された被写体の矩形の面積や、縦横比がロスト発生前の追尾被写体と、ステップS108にて新規に現れたIDが振られたオブジェクトの矩形の面積や、縦横比が近い場合は、新規に現れたIDを新たな追尾被写体IDとして追尾被写体IDの更新を行ってもよい。このような処理を行うと、追尾対象被写体のロスト発生前後の大きさに関する特徴を加味し、ロストが発生した際も適切な追尾被写体IDの更新が行われる。 The size and aspect ratio of the detected rectangle may also be used as a feature. If the rectangular area and aspect ratio of the subject recognized in step S101 are close to those of the tracking subject before it was lost, and the rectangular area and aspect ratio of the object newly assigned an ID in step S108, the tracking subject ID may be updated with the newly appeared ID as the new tracking subject ID. By performing such processing, the tracking subject ID is updated appropriately even when it is lost, taking into account the features related to the size of the tracking target subject before and after it was lost.

また、特徴量として、被写体の色を用いてもよい。ステップS108にて新規に現れたIDについて、身体の色が、ロスト発生前の追尾被写体の身体の色と近い場合は、新規に現れたIDを新たな追尾被写体IDとして追尾被写体IDの更新を行ってもよい。身体の色は推論部110が出力した矩形の中の特定の割合の位置の画素値や、特定の領域の画素値の平均を算出することで得られる。具体的には、ステップS101であらかじめ全被写体の身体の色を取得しておき、ステップS106にて追尾被写体IDが検出されている場合は、追尾被写体IDが振られた被写体の色をRAM102に保存しておく。ステップS108にて新規に現れたIDについて、当該IDが振られた被写体の色と、RAM102から読み込んだ追尾被写体の色と、の差が閾値以内であれば、新規に表れたIDにより追尾被写体IDを更新する。身体の色の取得は、推論部110が出力した矩形の中全体の平均をとっても良いし、例えば、上半身は同じユニフォームを着ているような場合は矩形の下方の領域の画素値の平均を取るなどしてもよく、被写体の肌や服の差が顕著に表れる領域の色を取得できるようにすればよい。また、身体の色の情報として矩形の全体や、特定の領域のヒストグラムを得てもよい。その場合は、新規に現れたIDの被写体のヒストグラムと、ロスト発生前の追尾被写体のヒストグラムをピアソンの相関関数やカイ二乗検定などいった方法で比較し、類似度が高い場合はIDの更新を行う。このような処理により、追尾対象被写体の身体や服の色の特徴を加味し、ロストが発生した際も適切な追尾被写体IDの更新が行われる。また、これらの特徴量を組み合わせてIDの更新を行ってもよい。 The color of the subject may also be used as a feature. For the ID newly appearing in step S108, if the body color is close to the body color of the tracking subject before the loss, the tracking subject ID may be updated with the newly appearing ID as a new tracking subject ID. The body color is obtained by calculating the average of pixel values at a specific percentage of positions in the rectangle output by the inference unit 110 or pixel values in a specific area. Specifically, the body colors of all subjects are acquired in advance in step S101, and if a tracking subject ID is detected in step S106, the color of the subject to which the tracking subject ID is assigned is stored in RAM 102. For the ID newly appearing in step S108, if the difference between the color of the subject to which the ID is assigned and the color of the tracking subject read from RAM 102 is within a threshold, the tracking subject ID is updated with the newly appearing ID. The body color may be obtained by taking the average of the entire rectangle output by the inference unit 110, or, for example, if the upper body is wearing the same uniform, the pixel values of the area below the rectangle may be taken as the average, so long as it is possible to obtain the color of the area where the difference in the subject's skin or clothing is prominent. In addition, a histogram of the entire rectangle or a specific area may be obtained as body color information. In this case, the histogram of the subject with the newly appeared ID and the histogram of the tracked subject before it was lost are compared using a method such as Pearson's correlation function or chi-square test, and if the similarity is high, the ID is updated. With this processing, the characteristics of the body and clothing colors of the tracked subject are taken into account, and the tracked subject ID is updated appropriately even when it is lost. The ID may also be updated by combining these features.

ステップS109では、CPU101は、ステップS101でRAM102に格納した「追尾被写体IDの推論結果(追尾対象の被写体の位置)」が、前回のステップS101でRAM102に格納した「追尾被写体IDの推論結果(追尾対象の被写体の位置)」と一致しているか否かを判断する。2つの位置が一致している、との判断は、2つの位置が同一の位置である、との判断に限らず、2つの位置の差が閾値以内である、との判断を含んでも良い。 In step S109, the CPU 101 determines whether the "tracking subject ID inference result (position of the subject to be tracked)" stored in the RAM 102 in step S101 matches the "tracking subject ID inference result (position of the subject to be tracked)" stored in the RAM 102 in the previous step S101. The determination that the two positions match is not limited to a determination that the two positions are the same position, but may also include a determination that the difference between the two positions is within a threshold value.

このような判断の結果、一致していると判断した場合には、現在のフレームについての図3(a)のフローチャートに従った処理は終了し、一致していると判断しなかった場合には、処理はステップS110に進む。 If it is determined that there is a match, the process for the current frame according to the flowchart in FIG. 3(a) ends, and if there is no match, the process proceeds to step S110.

ステップS110では、CPU101は、ステップS101でRAM102に格納した追尾対象の被写体の位置と、前回のステップS101でRAM102に格納した追尾対象の被写体の位置と、の差分を求める。そしてCPU101は、該求めた差分を用いて、撮像部111が追尾対象の被写体を追尾して撮像できるようなパン方向およびチルト方向の角速度(ベクトル)を求める。例えば、CPU101は、水平方向の差分が大きいほど、パン方向の角速度がより大きくなるように算出すればよく、垂直方向の差分が大きいほど、チルト方向の角速度がより大きくなるように算出すればよい。 In step S110, CPU 101 calculates the difference between the position of the subject to be tracked stored in RAM 102 in step S101 and the position of the subject to be tracked stored in RAM 102 in the previous step S101. CPU 101 then uses the calculated difference to calculate angular velocities (vectors) in the pan and tilt directions that allow imaging unit 111 to track and capture the subject to be tracked. For example, CPU 101 may calculate the angular velocity in the pan direction to be greater the greater the difference in the horizontal direction, and may calculate the angular velocity in the tilt direction to be greater the greater the difference in the vertical direction.

ステップS111では、CPU101は、ステップS110で求めたベクトルを用いて、追尾対象の被写体への方向へ所望の速度でパン・チルトするための駆動パラメータを求める。具体的には、CPU101は、駆動部109に含まれるパン方向/チルト方向のそれぞれのモータ(不図示)を制御するための駆動パラメータを求める。 In step S111, CPU 101 uses the vector obtained in step S110 to obtain drive parameters for panning and tilting at a desired speed in the direction toward the subject to be tracked. Specifically, CPU 101 obtains drive parameters for controlling motors (not shown) included in drive unit 109 for the pan direction and tilt direction.

ステップS112では、CPU101は、ステップS111で求めた駆動パラメータに基づいて、駆動I/F108を介して駆動部109を駆動制御し、駆動部109は該駆動制御により回動する。これにより、撮像部111の撮像方向の変更、即ちパン・チルト動作を行うことができる。 In step S112, the CPU 101 controls the drive of the drive unit 109 via the drive I/F 108 based on the drive parameters determined in step S111, and the drive unit 109 rotates through the drive control. This allows the imaging direction of the imaging unit 111 to be changed, i.e., a pan/tilt operation to be performed.

なお、CPU101は、撮像部111の画角範囲内にできるだけ大きく追尾対象の被写体が含まれるように、撮像部111のズーム位置を制御するためのパラメータを求め、該パラメータに基づいて駆動部109を駆動制御するようにしても良い。 In addition, the CPU 101 may determine parameters for controlling the zoom position of the imaging unit 111 so that the subject to be tracked is included as large as possible within the angle of view range of the imaging unit 111, and may control the driving of the driving unit 109 based on the parameters.

次に、コントローラ200の動作について、図3(b)のフローチャートに従って説明する。ステップS201では、CPU201は、カメラ100から送信された送信情報を、ネットワークI/F204を介して受信し、該受信した送信情報を、RAM202に格納する。 Next, the operation of the controller 200 will be described with reference to the flowchart in FIG. 3(b). In step S201, the CPU 201 receives transmission information sent from the camera 100 via the network I/F 204, and stores the received transmission information in the RAM 202.

ステップS202では、CPU201は、ステップS201でRAM202に格納した送信情報に含まれている撮像画像と推論結果とを表示部205に表示させる。表示部205における撮像画像および推論結果の表示例を図5(a)に示す。以降、表示部205に表示される表示画面の表示制御や、該表示画面に対するユーザ操作に応じて行われる処理はいずれもCPU201が行うものとする。 In step S202, the CPU 201 causes the display unit 205 to display the captured image and the inference result contained in the transmission information stored in the RAM 202 in step S201. An example of the captured image and the inference result displayed on the display unit 205 is shown in FIG. 5(a). Hereinafter, the CPU 201 will be responsible for all display control of the display screen displayed on the display unit 205 and processing performed in response to user operations on the display screen.

図5(a)に示す如く、表示部205の表示画面に表示される選択画面800には、送信情報に含まれる撮像画像900が表示される。そして該撮像画像900上には、送信情報に含まれる人物701に対応する推論結果に基づいて矩形910が描画されると共に、送信情報に含まれる人物702に対応する推論結果に基づいて矩形911が描画される。また、撮像画像900上には、人物701に対応する推論結果のID920である「1」と、人物702に対応する推論結果のID921である「2」と、が描画される。 As shown in FIG. 5(a), a selection screen 800 displayed on the display screen of the display unit 205 displays a captured image 900 included in the transmission information. A rectangle 910 is drawn on the captured image 900 based on the inference result corresponding to person 701 included in the transmission information, and a rectangle 911 is drawn on the captured image 900 based on the inference result corresponding to person 702 included in the transmission information. Also drawn on the captured image 900 are "1", which is the ID 920 of the inference result corresponding to person 701, and "2", which is the ID 921 of the inference result corresponding to person 702.

また、選択画面800の下部には、検出中IDとして、上記のID920の値およびID921の値が表示されている。コントローラ200のユーザは、表示部205に表示された選択画面800を見ることで、カメラ100による撮像画像や該撮像画像に対する推論の結果を確認することができる。 The values of ID920 and ID921 are displayed as the IDs currently being detected at the bottom of the selection screen 800. By looking at the selection screen 800 displayed on the display unit 205, the user of the controller 200 can check the image captured by the camera 100 and the results of inference on the captured image.

次に、ステップS203では、CPU201は、ユーザがユーザ入力I/F206を操作して選択した追尾対象の被写体のIDを追尾被写体IDとして取得し、該取得した追尾被写体IDをRAM202に格納する。追尾被写体IDを取得するための構成については特定の構成に限らない。以下に、追尾被写体IDを取得するための構成の一例について説明する。 Next, in step S203, the CPU 201 acquires the ID of the subject to be tracked, selected by the user through the user input I/F 206, as a tracking subject ID, and stores the acquired tracking subject ID in the RAM 202. The configuration for acquiring the tracking subject ID is not limited to a specific configuration. An example of a configuration for acquiring the tracking subject ID is described below.

ユーザは、図5(a)の選択画面800に表示された矩形910および矩形911のうち、追尾対象の被写体として選択したい被写体の矩形を、ユーザ入力I/F206を操作して指定する。たとえば、ユーザは、ジョイスティックを左右に倒したり、左右ボタン押下したり、タッチパネル画面上で所望の矩形をタッチしたりすることで、所望の矩形を選択することができる。矩形の選択方法は特定の指定方法に限らない。 The user operates the user input I/F 206 to specify the rectangle of the subject that the user wishes to select as the subject to be tracked from among rectangles 910 and 911 displayed on the selection screen 800 in FIG. 5(a). For example, the user can select the desired rectangle by tilting the joystick left or right, pressing the left or right button, or touching the desired rectangle on the touch panel screen. The method of selecting the rectangle is not limited to a specific method of specification.

ユーザがユーザ入力I/F206を操作して矩形910を選択すると、表示部205の表示画面800には図5(b)の選択画面800が表示される。図5(b)の選択画面800では、矩形910が選択されたことをユーザに視認させるべく、矩形910と矩形911とを互いに異なる表示形態でもって表示させる。このとき、矩形910が選択されているので、選択画面800の下部には、選択中IDとして、矩形910に対応する人物701のID920である「1」が表示されている。 When the user operates the user input I/F 206 to select rectangle 910, the selection screen 800 in FIG. 5(b) is displayed on the display screen 800 of the display unit 205. On the selection screen 800 in FIG. 5(b), rectangles 910 and 911 are displayed in different display forms so that the user can visually recognize that rectangle 910 has been selected. At this time, since rectangle 910 has been selected, "1", which is the ID 920 of the person 701 corresponding to rectangle 910, is displayed at the bottom of the selection screen 800 as the selected ID.

そして、ユーザがユーザ入力I/F206を操作して、人物701を追尾対象の被写体として決定するための操作を行うと、表示部205の表示画面800には図5(c)の選択画面800が表示される。図5(c)の選択画面800では、矩形910が決定されたことをユーザに視認させるべく、矩形910と矩形911とを互いに異なる表示形態でもって表示させる。 When the user operates the user input I/F 206 to determine the person 701 as the subject to be tracked, the selection screen 800 of FIG. 5(c) is displayed on the display screen 800 of the display unit 205. On the selection screen 800 of FIG. 5(c), the rectangles 910 and 911 are displayed in different display forms so that the user can visually recognize that the rectangle 910 has been determined.

たとえば、ユーザは、ジョイスティックを押し込んだり、決定ボタンを押下したり、タッチパネル画面上で所望の矩形を2度タッチしたりすることで、所望の矩形を決定することができる。矩形の決定方法は特定の指定方法に限らない。 For example, the user can determine the desired rectangle by pressing the joystick, pressing the confirm button, or touching the desired rectangle twice on the touch panel screen. The method of determining the rectangle is not limited to a specific designation method.

なお、図5に示した画面は、ユーザに追尾対象の被写体の選択状態を視認させるための画面の一例に過ぎず、また、画面に対する操作についても上記の操作は一例に過ぎない。たとえば、矩形ではなくID910やID921を選択しても良いし、追尾被写体IDをユーザがユーザ入力I/F206を操作して直接入力するようにしても良い。 The screen shown in FIG. 5 is merely one example of a screen for allowing the user to visually confirm the selection state of the subject to be tracked, and the above operations on the screen are also merely one example. For example, instead of a rectangle, ID910 or ID921 may be selected, or the user may directly input the tracking subject ID by operating the user input I/F 206.

次に、ステップS204では、CPU201は、ステップS203でRAM202に格納された追尾被写体IDを、ネットワークI/F204を介してカメラ100に対して送信する。 Next, in step S204, the CPU 201 transmits the tracking subject ID stored in the RAM 202 in step S203 to the camera 100 via the network I/F 204.

このように、本実施形態によれば、撮像画像から追尾被写体IDと同じIDの被写体が検出されなくても、該撮像画像から検出した被写体のIDに、ロスト前の撮像画像から検出された被写体のIDとは異なる新規のIDが含まれていた場合は、該新規のIDを追尾被写体IDとして更新する。これにより、ロストが発生した後も、追尾対象の被写体を追尾して撮像することができる。 As described above, according to this embodiment, even if a subject with the same ID as the tracking subject ID is not detected in the captured image, if the ID of the subject detected in the captured image contains a new ID that is different from the ID of the subject detected in the captured image before the subject was lost, the new ID is updated as the tracking subject ID. This makes it possible to track and capture the image of the tracking target subject even after the subject is lost.

[第2の実施形態]
以下では、第1の実施形態との差分について説明し、以下で特に触れない限りは、第1の実施形態と同様であるものとする。本実施形態では、カメラ100は撮像画像をコントローラ200に送信し、コントローラ200は、カメラ100に追尾対象の被写体の追尾を行わせるための制御コマンドを生成し、該生成した制御コマンドをカメラ100に送信する。そしてカメラ100は該制御コマンドに従って追尾対象の被写体の追尾を行って該追尾対象の被写体の撮像を行う。
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 this embodiment, the camera 100 transmits a captured image to the controller 200, and the controller 200 generates a control command for causing the camera 100 to track a subject to be tracked, and transmits the generated control command to the camera 100. The camera 100 then tracks the subject to be tracked according to the control command, and captures an image of the subject to be tracked.

本実施形態では、駆動部109は、コントローラ200から送信された制御コマンドに従って動作する。また、推論部210は、カメラ100から送信された撮像画像を用いて推論部110と同様の動作を行って、該撮像画像に含まれる被写体の推論結果を取得する。 In this embodiment, the drive unit 109 operates according to a control command transmitted from the controller 200. The inference unit 210 performs the same operation as the inference unit 110 using the captured image transmitted from the camera 100 to obtain an inference result for the subject included in the captured image.

次に、画像処理装置として動作するカメラ100の動作について、図6(a)のフローチャートに従って説明する。ステップS301では、上記のステップS101と同様、画像処理部106はCPU101からの指示に従って撮像画像を生成し、該生成した撮像画像をRAM102に格納する。そして、CPU101は、RAM102に格納された撮像画像を、ネットワークI/F105を介してコントローラ200に対して送信する。 Next, the operation of the camera 100 operating as an image processing device will be described with reference to the flowchart in FIG. 6(a). In step S301, similar to step S101 above, the image processing unit 106 generates a captured image in accordance with instructions from the CPU 101, and stores the generated captured image in the RAM 102. The CPU 101 then transmits the captured image stored in the RAM 102 to the controller 200 via the network I/F 105.

ステップS302では、CPU101は、コントローラ200から送信された制御コマンドをネットワークI/F105を介して受信し、該受信した制御コマンドをRAM102に格納する。 In step S302, the CPU 101 receives the control command sent from the controller 200 via the network I/F 105 and stores the received control command in the RAM 102.

ステップS303では、CPU101は、ステップS302でRAM102に格納した制御コマンドから、パン方向およびチルト方向それぞれに対する操作方向と制御量を示す値を読み出す。 In step S303, the CPU 101 reads values indicating the operation direction and control amount for each of the pan direction and tilt direction from the control command stored in the RAM 102 in step S302.

ステップS304では、CPU101は、ステップS303で読み出した値を元に、所望の方向へ所望の速度でパン・チルトするための駆動パラメータを求める。CPU101は、制御コマンドに含まれる操作方向と制御量を元に予め記憶装置103に格納されている変換テーブルを参照して駆動パラメータに変換しても良い。 In step S304, the CPU 101 determines drive parameters for panning and tilting in the desired direction at the desired speed based on the values read in step S303. The CPU 101 may convert the drive parameters into drive parameters by referring to a conversion table stored in advance in the storage device 103 based on the operation direction and control amount included in the control command.

ステップS305では、CPU101は、ステップS304で求めた駆動パラメータに基づいて、駆動I/F108を介して駆動部109を駆動制御し、駆動部109は該駆動制御により回動する。これにより、撮像部111の撮像方向の変更、即ちパン・チルト動作を行うことができる。 In step S305, the CPU 101 controls the drive of the drive unit 109 via the drive I/F 108 based on the drive parameters determined in step S304, and the drive unit 109 rotates through this drive control. This allows the imaging direction of the imaging unit 111 to be changed, i.e., a pan/tilt operation to be performed.

次に、コントローラ200の動作について、図6(b)のフローチャートに従って説明する。図6(b)のフローチャートに従った処理は、1フレーム分の撮像画像についての処理であり、実際には、コントローラ200は、図6(b)のフローチャートに従った処理を、各フレームの撮像画像について行う。 Next, the operation of the controller 200 will be described with reference to the flowchart in FIG. 6(b). The process according to the flowchart in FIG. 6(b) is for one frame of captured image, and in reality, the controller 200 performs the process according to the flowchart in FIG. 6(b) for each frame of captured image.

ステップS401では、CPU201は、カメラ100から送信された撮像画像を、ネットワークI/F204を受信し、該受信した撮像画像をRAM202に格納する。 In step S401, the CPU 201 receives the captured image sent from the camera 100 via the network I/F 204 and stores the received captured image in the RAM 202.

ステップS402では、CPU201は、ステップS401でRAM202に格納した撮像画像を推論部210に入力する。推論部210は、CPU201からの指示に従って上記の推論部110と同様の処理を行うことで、該撮像画像に含まれている被写体の推論結果を生成し、該生成した推論結果をRAM202に格納する。さらにCPU201は、第1の実施形態と同様、被写体の推論結果に対して、該被写体に固有のIDを付与する。 In step S402, the CPU 201 inputs the captured image stored in the RAM 202 in step S401 to the inference unit 210. The inference unit 210 performs the same processing as the inference unit 110 described above according to instructions from the CPU 201 to generate an inference result for the subject included in the captured image, and stores the generated inference result in the RAM 202. Furthermore, the CPU 201 assigns a unique ID to the subject for the inference result for the subject, as in the first embodiment.

ステップS403では、CPU201は、ステップS401でRAM202に格納した撮像画像と、ステップS402でRAM202に格納した推論結果(該推論結果のIDを含む)と、を表示部205に表示させる。表示内容については第1の実施形態と同様である。 In step S403, the CPU 201 causes the display unit 205 to display the captured image stored in the RAM 202 in step S401 and the inference result (including the ID of the inference result) stored in the RAM 202 in step S402. The display contents are the same as those in the first embodiment.

ステップS404では、CPU201は、ユーザによる追尾対象の被写体の選択操作を受け付ける。ユーザによる追尾対象の被写体の選択操作については第1の実施形態と同様である。 In step S404, the CPU 201 accepts a user's selection operation of a subject to be tracked. The user's selection operation of a subject to be tracked is the same as in the first embodiment.

ステップS405では、CPU201は、RAM202に格納されている追尾被写体IDを変更するようなユーザ操作が行われたか否かを判断する。たとえば、CPU201は、ユーザによる選択操作によって追尾対象の被写体を初めて選択する操作、もしくは従前の追尾対象の被写体とは異なる追尾対象の被写体を選択する操作、が行われたか否かを判断する。 In step S405, the CPU 201 determines whether a user operation has been performed to change the tracking subject ID stored in the RAM 202. For example, the CPU 201 determines whether a user operation has been performed to select a tracking subject for the first time through a selection operation, or to select a tracking subject different from the previous tracking subject.

この判断の結果、RAM202に格納されている追尾被写体IDを変更するようなユーザ操作が行われた場合には、処理はステップS407に進む。一方、RAM202に格納されている追尾被写体IDを変更するようなユーザ操作が行われなかった場合には、処理はステップS406に進む。 If the result of this determination is that a user operation has been performed to change the tracking subject ID stored in RAM 202, the process proceeds to step S407. On the other hand, if a user operation has not been performed to change the tracking subject ID stored in RAM 202, the process proceeds to step S406.

ステップS406では、CPU201は、RAM202に決定済みの追尾被写体IDが格納されているか否か(追尾被写体IDは決定済みか否か)を、上記のステップS104と同様の方法で判断する。この判断の結果、RAM202に決定済みの追尾被写体IDが格納されている(追尾被写体IDは決定済み)場合には、処理はステップS408に進む。一方、RAM202に決定済みの追尾被写体IDが格納されていない(追尾被写体IDは決定済みでない)場合には、処理はステップS401に進む。ステップS407では、CPU201は、ユーザ操作に応じて追尾対象の被写体として選択された被写体のIDを追尾被写体IDとしてRAM202に格納する。 In step S406, the CPU 201 determines whether or not a determined tracking subject ID is stored in the RAM 202 (whether or not the tracking subject ID has been determined) in the same manner as in step S104 above. If the result of this determination is that a determined tracking subject ID is stored in the RAM 202 (the tracking subject ID has been determined), the process proceeds to step S408. On the other hand, if a determined tracking subject ID is not stored in the RAM 202 (the tracking subject ID has not been determined), the process proceeds to step S401. In step S407, the CPU 201 stores the ID of the subject selected as the subject to be tracked in response to a user operation in the RAM 202 as the tracking subject ID.

ステップS408では、CPU201は、上記のステップS106と同様にして、追尾被写体IDと同じIDに対応する被写体が現在のフレームの撮像画像から検出されているか否かを判断する。 In step S408, the CPU 201 determines whether a subject corresponding to the same ID as the tracking subject ID has been detected in the captured image of the current frame, in the same manner as in step S106 above.

この判断の結果、追尾被写体IDと同じIDに対応する被写体が検出されている場合には、処理はステップS411に進む。一方、追尾被写体IDと同じIDに対応する被写体は検出されていない場合、第1の実施形態と同様、CPU201は追尾対象の被写体のロストが発生したと判断し、現在の時刻TをRAM202に格納し、そして処理はステップS409に進む。 If the result of this determination is that a subject corresponding to the same ID as the tracking subject ID has been detected, the process proceeds to step S411. On the other hand, if a subject corresponding to the same ID as the tracking subject ID has not been detected, the CPU 201 determines that the tracking target subject has been lost, stores the current time T in the RAM 202, and the process proceeds to step S409, as in the first embodiment.

ステップS409ではCPU201はステップS107と同様に、現在のフレームから検出された被写体の推論結果のIDの中に、時刻T以前のフレームから検出された被写体の推論結果のIDのいずれとも異なる新規のIDが含まれているか否かを判断する。 In step S409, similar to step S107, the CPU 201 determines whether the IDs of the inference results of the subject detected from the current frame include a new ID that is different from any of the IDs of the inference results of the subject detected from frames prior to time T.

この判断の結果、現在のフレームから検出された被写体の推論結果のIDの中に新規のIDが含まれている場合には、処理はステップS410に進む。一方、現在のフレームから検出された被写体の推論結果のIDの中に新規のIDは含まれていない場合には、処理はステップS401に進む。 If the result of this determination is that a new ID is included in the IDs of the inference results of the subject detected from the current frame, the process proceeds to step S410. On the other hand, if a new ID is not included in the IDs of the inference results of the subject detected from the current frame, the process proceeds to step S401.

ステップS410では、CPU201は、RAM202に格納されている追尾被写体IDを、新規のIDに更新する。ステップS411では、CPU201は、上記のステップS109と同様、ステップS402でRAM202に格納した「追尾被写体IDの推論結果(追尾対象の被写体の位置)」が、前回のステップS402でRAM202に格納した「追尾被写体IDの推論結果(追尾対象の被写体の位置)」と一致しているか否かを判断する。 In step S410, the CPU 201 updates the tracking subject ID stored in the RAM 202 to a new ID. In step S411, similar to step S109 above, the CPU 201 determines whether the "tracking subject ID inference result (position of the subject to be tracked)" stored in the RAM 202 in step S402 matches the "tracking subject ID inference result (position of the subject to be tracked)" stored in the RAM 202 in the previous step S402.

このような判断の結果、一致していると判断した場合には、現在のフレームについての図6(a)のフローチャートに従った処理は終了し、一致していると判断しなかった場合には、処理はステップS412に進む。 If it is determined that there is a match, the process for the current frame according to the flowchart in FIG. 6(a) ends; if there is no match, the process proceeds to step S412.

ステップS412では、CPU201は、上記のステップS110と同様、ステップS402でRAM202に格納した追尾対象の被写体の位置と、前回のステップS402でRAM202に格納した追尾対象の被写体の位置と、の差分を求める。そしてCPU201は、該求めた差分を用いて、撮像部111が追尾対象の被写体を追尾して撮像できるようなパン方向およびチルト方向の角速度(ベクトル)を求める。 In step S412, similar to step S110 above, the CPU 201 calculates the difference between the position of the subject to be tracked stored in the RAM 202 in step S402 and the position of the subject to be tracked stored in the RAM 202 in the previous step S402. The CPU 201 then uses the calculated difference to calculate angular velocities (vectors) in the pan and tilt directions that allow the imaging unit 111 to track and image the subject to be tracked.

ステップS413では、CPU201は、ステップS412で求めたベクトルのデータを、カメラ100を制御する方法として予め取り決めているプロトコルに則って制御コマンドに変換し、該変換した制御コマンドをRAM202に格納する。 In step S413, the CPU 201 converts the vector data calculated in step S412 into a control command in accordance with a protocol previously determined as a method for controlling the camera 100, and stores the converted control command in the RAM 202.

ステップS414では、CPU201は、ステップS413でRAM202に格納した制御コマンドを、ネットワークI/F204を介してカメラ100に対して送信する。 In step S414, the CPU 201 transmits the control command stored in the RAM 202 in step S413 to the camera 100 via the network I/F 204.

このように、本実施形態では、カメラ100に追尾対象の被写体の追尾を行わせるための制御コマンドを生成し、該生成した制御コマンドをカメラ100に送信する機能をコントローラ200に設けた場合も、第1の実施形態と同様の効果が得られる
上記の各実施形態で使用した数値、処理タイミング、処理順、処理の主体、データ(情報)の取得方法/送信先/送信元/格納場所などは、具体的な説明を行うために一例として挙げたもので、このような一例に限定することを意図したものではない。
In this way, in this embodiment, even if the controller 200 is provided with a function for generating a control command for causing the camera 100 to track the subject to be tracked and transmitting the generated control command to the camera 100, the same effect as in the first embodiment can be obtained. The numerical values, processing timing, processing order, processing subject, data (information) acquisition method/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 limited to such examples.

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

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

本明細書の発明は、以下の画像処理装置、画像処理方法、コンピュータプログラムを含む。
(項目1)
フレームから被写体を検出する検出手段と、
第1フレームから追尾対象の被写体の識別情報と同じ識別情報の被写体が検出されなかった場合、該第1フレームから検出された被写体の識別情報の中に、該追尾対象の被写体が検出されなかったタイミング以前の第2フレームから検出された被写体の識別情報とは異なる新規の識別情報が含まれていれば、該追尾対象の被写体の識別情報を該新規の識別情報に更新する更新手段と
を備えることを特徴とする画像処理装置。
(項目2)
前記更新手段はさらに、前記新規の識別情報に対応する被写体の位置が範囲内に位置しているか否かに基づいて、前記追尾対象の被写体の識別情報を前記新規の識別情報に更新するか否かを判断することを特徴とする項目1に記載の画像処理装置。
(項目3)
前記更新手段は、前記タイミングの前の前記追尾対象の被写体のサイズに応じて前記範囲のサイズを変更することを特徴とする項目2に記載の画像処理装置。
(項目4)
前記更新手段は、前記タイミングの前の前記追尾対象の被写体の移動速度に応じて前記範囲のサイズを変更することを特徴とする項目2に記載の画像処理装置。
(項目5)
前記更新手段は、前記タイミングの前の前記追尾対象の移動方向に基づいて前記範囲の形状を変更することを特徴とする項目2に記載の画像処理装置。
(項目6)
前記更新手段は、前記タイミングからの経過時間に応じて前記範囲のサイズを変更することを特徴とする項目2に記載の画像処理装置。
(項目7)
さらに、
撮像手段を備え、
前記検出手段は、前記撮像手段により撮像されたフレームから被写体を検出することを特徴とする項目1ないし6のいずれか1項目に記載の画像処理装置。
(項目8)
さらに、
前記撮像手段により撮像されたフレームから検出された被写体のうち、追尾対象の被写体の識別情報と同じ識別情報の被写体を追尾して撮像するよう前記撮像手段を制御する手段を備えることを特徴とする項目7に記載の画像処理装置。
(項目9)
前記検出手段は、前記画像処理装置と通信が可能な外部の撮像手段から受信したフレームから被写体を検出することを特徴とする項目1ないし6のいずれか1項目に記載の画像処理装置。
(項目10)
さらに、
追尾対象の被写体の識別情報と同じ識別情報の被写体を追尾して撮像するよう前記撮像手段を制御するための制御コマンドを生成し、該制御コマンドを前記撮像手段に対して送信する手段を備えることを特徴とする項目9に記載の画像処理装置。
(項目11)
さらに、
前記追尾対象の被写体が検出されなくなったタイミングの以降に、新たな識別情報を付与した被写体の、検出された被写体の特徴量が、前記追尾対象の被写体が検出されなくなる前に、前記追尾対象の被写体の特徴量と近い場合に、
前記追尾対象の被写体が検出されなくなったタイミングの以降に新たな識別情報を付与した被写体を、追尾対象として選択する手段を備えることを特徴とする項目1に記載の画像処理装置。
(項目12)
前記特徴量は、前記被写体の向き、体形、姿勢、大きさ、縦横比のうち、すくなくとも一つを含むことを特徴とする項目11に記載の画像処理装置。
(項目13)
前記特徴量は、前記被写体の色、ヒストグラムのうちすくなくとも1つを含むことを特徴とする項目11に記載の画像処理装置。
(項目14)
画像処理装置が行う画像処理方法であって、
前記画像処理装置の検出手段が、フレームから被写体を検出する検出工程と、
前記画像処理装置の更新手段が、第1フレームから追尾対象の被写体の識別情報と同じ識別情報の被写体が検出されなかった場合、該第1フレームから検出された被写体の識別情報の中に、該追尾対象の被写体が検出されなかったタイミング以前の第2フレームから検出された被写体の識別情報とは異なる新規の識別情報が含まれていれば、該追尾対象の被写体の識別情報を該新規の識別情報に更新する更新工程と
を備えることを特徴とする画像処理方法。
(項目15)
コンピュータを、項目1ないし13のいずれか1項目に記載の画像処理装置の各手段として機能させるためのコンピュータプログラム。
The invention of this specification includes the following image processing device, image processing method, and computer program.
(Item 1)
A detection means for detecting a subject from a frame;
and if a subject having identification information identical to the identification information of the subject to be tracked is not detected in the first frame, and the identification information of the subject detected in the first frame includes new identification information that is different from the identification information of the subject detected in the second frame prior to the timing when the subject to be tracked was not detected, updating the identification information of the subject to be tracked to the new identification information.
(Item 2)
The image processing device described in item 1, characterized in that the update means further determines whether to update the identification information of the subject to be tracked to the new identification information based on whether the position of the subject corresponding to the new identification information is located within a range.
(Item 3)
3. The image processing device according to claim 2, wherein the update means changes the size of the range according to the size of the subject to be tracked before the timing.
(Item 4)
3. The image processing device according to claim 2, wherein the update means changes the size of the range in accordance with a moving speed of the subject to be tracked before the timing.
(Item 5)
3. The image processing device according to claim 2, wherein the update means changes a shape of the range based on a moving direction of the tracking target before the timing.
(Item 6)
3. The image processing device according to claim 2, wherein the update means changes the size of the range in accordance with the elapsed time from the timing.
(Item 7)
moreover,
An imaging means is provided,
7. The image processing device according to claim 1, wherein the detection means detects a subject from a frame captured by the imaging means.
(Item 8)
moreover,
8. The image processing device according to item 7, further comprising a means for controlling the imaging means so as to track and image a subject having the same identification information as the identification information of the subject to be tracked, among the subjects detected from the frames captured by the imaging means.
(Item 9)
7. The image processing device according to any one of items 1 to 6, wherein the detection means detects a subject from a frame received from an external imaging means capable of communicating with the image processing device.
(Item 10)
moreover,
10. The image processing device according to item 9, further comprising: a means for generating a control command for controlling the imaging means to track and image a subject having the same identification information as the identification information of the subject to be tracked, and a means for transmitting the control command to the imaging means.
(Item 11)
moreover,
After the timing when the tracking target subject is no longer detected, if the feature amount of the detected subject to which new identification information has been added is close to the feature amount of the tracking target subject before the tracking target subject is no longer detected,
2. The image processing device according to item 1, further comprising a means for selecting, as a tracking target, a subject to which new identification information has been added after the timing at which the tracking target subject is no longer detected.
(Item 12)
12. The image processing device according to item 11, wherein the feature amount includes at least one of the subject's orientation, body shape, posture, size, and aspect ratio.
(Item 13)
12. The image processing device according to item 11, wherein the feature amount includes at least one of a color of the subject and a histogram.
(Item 14)
An image processing method performed by an image processing device, comprising:
a detection step in which a detection means of the image processing device detects a subject from a frame;
an updating step in which, when a subject having identification information identical to the identification information of the subject to be tracked is not detected in the first frame, the updating means of the image processing device updates the identification information of the subject to be tracked to the new identification information if the identification information of the subject detected in the first frame includes new identification information that is different from the identification information of the subject detected in the second frame prior to the time when the subject to be tracked was not detected.
(Item 15)
14. A computer program for causing a computer to function as each of the means of the image processing device according to any one of items 1 to 13.

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

100:カメラ 101:CPU 102:RAM 103:記憶装置 105:ネットワークI/F 106:画像処理部 107:画像センサ 108:駆動I/F 109:駆動部 110:推論部 111:システムバス 200:コントローラ 201:CPU 202:RAM 203:記憶装置 204:ネットワークI/F 205:表示部 206:ユーザ入力I/F 207:システムバス 210:推論部 100: Camera 101: CPU 102: RAM 103: Storage device 105: Network I/F 106: Image processing unit 107: Image sensor 108: Drive I/F 109: Drive unit 110: Inference unit 111: System bus 200: Controller 201: CPU 202: RAM 203: Storage device 204: Network I/F 205: Display unit 206: User input I/F 207: System bus 210: Inference unit

Claims (15)

フレームから被写体を検出する検出手段と、
第1フレームから追尾対象の被写体の識別情報と同じ識別情報の被写体が検出されなかった場合、該第1フレームから検出された被写体の識別情報の中に、該追尾対象の被写体が検出されなかったタイミング以前の第2フレームから検出された被写体の識別情報とは異なる新規の識別情報が含まれていれば、該追尾対象の被写体の識別情報を該新規の識別情報に更新する更新手段と
を備えることを特徴とする画像処理装置。
A detection means for detecting a subject from a frame;
and if a subject having identification information identical to the identification information of the subject to be tracked is not detected in the first frame, and the identification information of the subject detected in the first frame includes new identification information that is different from the identification information of the subject detected in the second frame prior to the timing when the subject to be tracked was not detected, updating the identification information of the subject to be tracked to the new identification information.
前記更新手段はさらに、前記新規の識別情報に対応する被写体の位置が範囲内に位置しているか否かに基づいて、前記追尾対象の被写体の識別情報を前記新規の識別情報に更新するか否かを判断することを特徴とする請求項1に記載の画像処理装置。 The image processing device according to claim 1, characterized in that the update means further determines whether to update the identification information of the subject to be tracked to the new identification information based on whether the position of the subject corresponding to the new identification information is located within a range. 前記更新手段は、前記タイミングの前の前記追尾対象の被写体のサイズに応じて前記範囲のサイズを変更することを特徴とする請求項2に記載の画像処理装置。 The image processing device according to claim 2, characterized in that the update means changes the size of the range depending on the size of the subject to be tracked before the timing. 前記更新手段は、前記タイミングの前の前記追尾対象の被写体の移動速度に応じて前記範囲のサイズを変更することを特徴とする請求項2に記載の画像処理装置。 The image processing device according to claim 2, characterized in that the update means changes the size of the range depending on the moving speed of the subject to be tracked before the timing. 前記更新手段は、前記タイミングの前の前記追尾対象の移動方向に基づいて前記範囲の形状を変更することを特徴とする請求項2に記載の画像処理装置。 The image processing device according to claim 2, characterized in that the update means changes the shape of the range based on the direction of movement of the tracking target before the timing. 前記更新手段は、前記タイミングからの経過時間に応じて前記範囲のサイズを変更することを特徴とする請求項2に記載の画像処理装置。 The image processing device according to claim 2, characterized in that the update means changes the size of the range depending on the elapsed time from the timing. さらに、
撮像手段を備え、
前記検出手段は、前記撮像手段により撮像されたフレームから被写体を検出することを特徴とする請求項1に記載の画像処理装置。
moreover,
An imaging means is provided,
2. The image processing apparatus according to claim 1, wherein the detection means detects a subject from a frame captured by the imaging means.
さらに、
前記撮像手段により撮像されたフレームから検出された被写体のうち、追尾対象の被写体の識別情報と同じ識別情報の被写体を追尾して撮像するよう前記撮像手段を制御する手段を備えることを特徴とする請求項7に記載の画像処理装置。
moreover,
8. The image processing device according to claim 7, further comprising: a means for controlling the imaging means so as to track and image a subject having the same identification information as a tracking target subject among subjects detected from a frame captured by the imaging means.
前記検出手段は、前記画像処理装置と通信が可能な外部の撮像手段から受信したフレームから被写体を検出することを特徴とする請求項1に記載の画像処理装置。 The image processing device according to claim 1, characterized in that the detection means detects a subject from a frame received from an external imaging means capable of communicating with the image processing device. さらに、
追尾対象の被写体の識別情報と同じ識別情報の被写体を追尾して撮像するよう前記撮像手段を制御するための制御コマンドを生成し、該制御コマンドを前記撮像手段に対して送信する手段を備えることを特徴とする請求項9に記載の画像処理装置。
moreover,
10. The image processing device according to claim 9, further comprising: a means for generating a control command for controlling the imaging means to track and image a subject having the same identification information as the identification information of the subject to be tracked, and transmitting the control command to the imaging means.
さらに、
前記追尾対象の被写体が検出されなくなったタイミングの以降に、新たな識別情報を付与した被写体の、検出された被写体の特徴量が、前記追尾対象の被写体が検出されなくなる前に、前記追尾対象の被写体の特徴量と近い場合に、
前記追尾対象の被写体が検出されなくなったタイミングの以降に新たな識別情報を付与した被写体を、追尾対象として選択する手段を備えることを特徴とする請求項1に記載の画像処理装置。
moreover,
After the timing when the tracking target subject is no longer detected, if the feature amount of the detected subject to which new identification information has been added is close to the feature amount of the tracking target subject before the tracking target subject is no longer detected,
2 . The image processing device according to claim 1 , further comprising: a means for selecting, as a tracking target, a subject to which new identification information has been added after the timing at which the tracking target subject is no longer detected.
前記特徴量は、前記被写体の向き、体形、姿勢、大きさ、縦横比のうち、すくなくとも一つを含むことを特徴とする請求項11に記載の画像処理装置。 The image processing device according to claim 11, characterized in that the feature amount includes at least one of the subject's orientation, body shape, posture, size, and aspect ratio. 前記特徴量は、前記被写体の色、ヒストグラムのうちすくなくとも1つを含むことを特徴とする請求項11に記載の画像処理装置。 The image processing device according to claim 11, characterized in that the feature amount includes at least one of the color and histogram of the subject. 画像処理装置が行う画像処理方法であって、
前記画像処理装置の検出手段が、フレームから被写体を検出する検出工程と、
前記画像処理装置の更新手段が、第1フレームから追尾対象の被写体の識別情報と同じ識別情報の被写体が検出されなかった場合、該第1フレームから検出された被写体の識別情報の中に、該追尾対象の被写体が検出されなかったタイミング以前の第2フレームから検出された被写体の識別情報とは異なる新規の識別情報が含まれていれば、該追尾対象の被写体の識別情報を該新規の識別情報に更新する更新工程と
を備えることを特徴とする画像処理方法。
An image processing method performed by an image processing device, comprising:
a detection step in which a detection means of the image processing device detects a subject from a frame;
an updating step in which, when a subject having identification information identical to the identification information of the subject to be tracked is not detected in the first frame, the updating means of the image processing device updates the identification information of the subject to be tracked to the new identification information if the identification information of the subject detected in the first frame includes new identification information that is different from the identification information of the subject detected in the second frame prior to the time when the subject to be tracked was not detected.
コンピュータを、請求項1ないし13のいずれか1項に記載の画像処理装置の各手段として機能させるためのコンピュータプログラム。 A computer program for causing a computer to function as each of the means of the image processing device according to any one of claims 1 to 13.
JP2024008828A 2023-05-30 2024-01-24 Image processing device and image processing method Pending JP2024173641A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP24175980.2A EP4471716A1 (en) 2023-05-30 2024-05-15 Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
US18/665,722 US20240404076A1 (en) 2023-05-30 2024-05-16 Image processing apparatus, image processing method, and non-transitory computer-readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2023089116 2023-05-30
JP2023089116 2023-05-30

Publications (1)

Publication Number Publication Date
JP2024173641A true JP2024173641A (en) 2024-12-12

Family

ID=93798599

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2024008828A Pending JP2024173641A (en) 2023-05-30 2024-01-24 Image processing device and image processing method

Country Status (1)

Country Link
JP (1) JP2024173641A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014168126A (en) * 2013-02-28 2014-09-11 Sony Corp Image processor, image processing method and program
JP2019125946A (en) * 2018-01-17 2019-07-25 キヤノン株式会社 Control device, imaging device, control method, and program
JP2022178493A (en) * 2021-05-20 2022-12-02 キヤノン株式会社 Imaging control device, imaging apparatus, imaging control method, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014168126A (en) * 2013-02-28 2014-09-11 Sony Corp Image processor, image processing method and program
JP2019125946A (en) * 2018-01-17 2019-07-25 キヤノン株式会社 Control device, imaging device, control method, and program
JP2022178493A (en) * 2021-05-20 2022-12-02 キヤノン株式会社 Imaging control device, imaging apparatus, imaging control method, and program

Similar Documents

Publication Publication Date Title
US20230093612A1 (en) Touchless photo capture in response to detected hand gestures
US20250321650A1 (en) Augmented reality eyewear 3d painting
US10936874B1 (en) Controller gestures in virtual, augmented, and mixed reality (xR) applications
US12293479B2 (en) Augmented reality eyewear with 3D costumes
US10606380B2 (en) Display control apparatus, display control method, and display control program
KR101663452B1 (en) Screen Operation Apparatus and Screen Operation Method
EP3333808B1 (en) Information processing device
US20250264939A1 (en) Head-mounted display
KR20170062439A (en) Control device, control method, and program
CN114153348B (en) Cursor prompt method and host
KR20110132260A (en) Monitor-based Augmented Reality System
CN111199583A (en) A virtual content display method, device, terminal device and storage medium
US10444831B2 (en) User-input apparatus, method and program for user-input
JPH1020998A (en) Positioning device
US20250203061A1 (en) Augmented reality eyewear with x-ray effect
JP2019087136A (en) Screen display control method and screen display control system
JP2024173641A (en) Image processing device and image processing method
EP4471716A1 (en) Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
CN117093124A (en) Method, device, equipment and medium for adjusting AR display interface
WO2021241110A1 (en) Information processing device, information processing method, and program
JP7781214B2 (en) head-mounted display
JP7743092B2 (en) Virtual space experience system and virtual space experience method
WO2025173831A1 (en) Method and system for dynamically aligning picture-in-picture (pip) window in a display unit
JP2025123026A (en) Control device and control method
JP2025080595A (en) Image processing device, image processing method, and system

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20241001

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20241001

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20250521

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20250530

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250725

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20251027