Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7324066B2 - IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS - Google Patents
[go: Go Back, main page]

JP7324066B2 - IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS - Google Patents

IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS Download PDF

Info

Publication number
JP7324066B2
JP7324066B2 JP2019119017A JP2019119017A JP7324066B2 JP 7324066 B2 JP7324066 B2 JP 7324066B2 JP 2019119017 A JP2019119017 A JP 2019119017A JP 2019119017 A JP2019119017 A JP 2019119017A JP 7324066 B2 JP7324066 B2 JP 7324066B2
Authority
JP
Japan
Prior art keywords
motion
background
vector
image processing
motion vectors
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019119017A
Other languages
Japanese (ja)
Other versions
JP2020095673A (en
JP2020095673A5 (en
Inventor
慶祐 緑川
良介 辻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to US16/519,742 priority Critical patent/US11070729B2/en
Publication of JP2020095673A publication Critical patent/JP2020095673A/en
Publication of JP2020095673A5 publication Critical patent/JP2020095673A5/ja
Application granted granted Critical
Publication of JP7324066B2 publication Critical patent/JP7324066B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、画像処理装置およびその制御方法、ならびに撮像装置に関し、特に動体検出技術に関する。 The present invention relates to an image processing device, its control method, and an imaging device, and more particularly to a moving object detection technique.

動画のフレーム画像間の動きベクトルに基づいて、被写体の大局的な移動方向と逆方向に移動する被写体を検出する技術が知られている(特許文献1)。また、画面全体の動きと局所的な動きとの差異が大きい領域を主被写体の領域と判定する技術が知られている(特許文献2)。 A technique for detecting a subject moving in a direction opposite to the general moving direction of the subject based on a motion vector between frame images of a moving image is known (Patent Document 1). Also, there is known a technique of determining an area where there is a large difference between the movement of the entire screen and the local movement as the area of the main subject (Patent Document 2).

特開2015-194915号公報JP 2015-194915 A 特開2015-111746号公報JP 2015-111746 A

特許文献1に記載の手法は、多数の移動体と逆方向に移動する移動体を、多数の移動体の移動方向を表す動きベクトルに対して角度差が所定値以上である動きベクトルに基づいて検出している。そのため、例えば移動体をパンニングしながら撮影する場合の様に、背景と被写体(移動体)とが同じ方向に異なる速さで移動するシーンを撮影した場合、特許文献1に記載の手法は背景と被写体とを分離することができない。 The technique described in Japanese Patent Laid-Open No. 2002-200002 detects a moving object moving in the opposite direction to a large number of moving objects based on a motion vector whose angular difference is equal to or greater than a predetermined value with respect to the motion vector representing the moving direction of the large number of moving objects. Detecting. Therefore, when shooting a scene in which the background and the subject (moving object) move in the same direction at different speeds, such as when shooting a moving object while panning, the method described in Patent Document 1 can be used to It cannot be separated from the subject.

一方、特許文献2では、画像全体の動きと、局所的な動きとの差異に差に基づいて主被写体を判定するため、背景と主被写体とが同じ方向に異なる速さで移動している場合でも主被写体を判別できる。しかしながら、ユーザが意図している主被写体は、画面全体の動きと差異の大きな動きを有する大きな被写体とはかぎらない。 On the other hand, in Patent Document 2, since the main subject is determined based on the difference between the motion of the entire image and the difference between the local motion, the background and the main subject are moving in the same direction at different speeds. However, the main subject can be identified. However, the main subject intended by the user is not necessarily a large subject that has a large difference in motion from the motion of the entire screen.

本発明はこのような従来技術の課題に鑑みてなされたものであり、背景と同じ方向に移動する移動体を検出可能な画像処理装置およびその制御方法、ならびに撮像装置を提供することを目的の1つとする。 SUMMARY OF THE INVENTION The present invention has been made in view of such problems in the prior art, and an object of the present invention is to provide an image processing apparatus capable of detecting a moving object moving in the same direction as the background, a control method thereof, and an imaging apparatus. Let it be one.

上述の目的は、複数の画像間の複数の動きベクトルを検出する動きベクトル検出手段と、動きベクトルに基づいて、背景の動きを表す背景ベクトルを算出する算出手段と、複数の動きベクトルのそれぞれと背景ベクトルとのユークリッド距離の大きさに基づいて、複数の動きベクトルから動体の動きベクトルを検出する動体検出手段と、複数の動きベクトルをクラスタリングしてクラスタを生成するクラスタリング手段と、クラスタリング手段が生成したクラスタから、背景クラスタを選択する選択手段と、画像処理装置の動きを検出する動き検出手段と、を有し、算出手段は、背景クラスタを構成する動きベクトルから背景ベクトルを算出し、選択手段は、動き検出手段が検出した画像処理装置の動きから背景の動き方向を推定し、背景の動き方向を用いて、クラスタリング手段が生成したクラスタから背景クラスタを選択する、ことを特徴とする画像処理装置によって達成される。 The above objects are provided by motion vector detection means for detecting a plurality of motion vectors between a plurality of images, calculation means for calculating a background vector representing the motion of the background based on the motion vectors, and each of the plurality of motion vectors. A moving object detecting means for detecting a motion vector of a moving object from a plurality of motion vectors based on the magnitude of the Euclidean distance to a background vector; a clustering means for clustering the plurality of motion vectors to generate clusters; and a clustering means. selecting means for selecting a background cluster from the obtained clusters; motion detecting means for detecting motion of the image processing apparatus ; estimates the motion direction of the background from the motion of the image processing device detected by the motion detection means, and selects the background cluster from the clusters generated by the clustering means using the motion direction of the background. achieved by the device.

本発明によれば、背景と同じ方向に移動する移動体を検出可能な画像処理装置およびその制御方法、ならびに撮像装置を提供することができる。 ADVANTAGE OF THE INVENTION According to this invention, the image processing apparatus which can detect the moving body which moves in the same direction as a background, its control method, and an imaging device can be provided.

発明の実施形態に係るデジタルカメラの機能構成例を示すブロック図1 is a block diagram showing a functional configuration example of a digital camera according to an embodiment of the invention; FIG. 実施形態における画像処理部の動体検出に関する機能構成例を示すブロック図FIG. 2 is a block diagram showing a functional configuration example related to moving object detection of an image processing unit according to the embodiment; 実施形態における動体検出処理に関するフローチャートFlowchart relating to moving object detection processing according to the embodiment 実施形態における動体検出方法を説明するための模式図Schematic diagram for explaining the moving object detection method in the embodiment 実施形態における背景クラスタ選択動作の例に関するフローチャートFlowchart for an example of background cluster selection operation in an embodiment 実施形態における背景クラスタ選択動作の別の例に関するフローチャート4 is a flow chart of another example of background cluster selection operation in an embodiment 実施形態における距離マップを用いた動体検出を説明するための模式図Schematic diagram for explaining moving object detection using a distance map in the embodiment 第2実施形態における画像処理部の動体検出に関する機能構成例を示すブロック図FIG. 11 is a block diagram showing a functional configuration example related to moving object detection of an image processing unit according to the second embodiment; 第2実施形態における画像処理部の動作に関するフローチャートFlowchart regarding the operation of the image processing unit in the second embodiment 第2実施形態における動きベクトルのクラスタリングに関する図Diagram relating to clustering of motion vectors in the second embodiment 第2実施形態における主被写体判別処理に関するフローチャートFlowchart relating to main subject determination processing in the second embodiment

以下、添付図面を参照して、本発明をその例示的な実施形態に基づいて詳細に説明する。なお、説明する実施形態は単なる例示であり、本発明の範囲を限定するものではない。例えば、以下では本発明をデジタルカメラに適用した実施形態を説明する。しかし、デジタルカメラは本発明を適用可能な画像処理装置の一例にすぎない。本発明は任意の電子機器において実施可能である。このような電子機器には、デジタルカメラやデジタルビデオカメラといった撮像装置はもちろん、パーソナルコンピュータ、タブレット端末、携帯電話機、ゲーム機、ドライブレコーダ、ロボット、ドローンなどが含まれるが、これらに限定されない。なお、本発明には撮影機能は必須でなく、動画のように時系列で撮影された画像を取得可能な電子機器で実施可能である。 The invention will now be described in detail on the basis of its exemplary embodiments with reference to the accompanying drawings. It should be noted that the described embodiments are merely examples and do not limit the scope of the present invention. For example, an embodiment in which the present invention is applied to a digital camera will be described below. However, a digital camera is only one example of an image processing device to which the present invention can be applied. The present invention can be implemented in any electronic device. Such electronic devices include, but are not limited to, imaging devices such as digital cameras and digital video cameras, as well as personal computers, tablet terminals, mobile phones, game machines, drive recorders, robots, and drones. Note that the present invention does not require a photographing function, and can be implemented by an electronic device capable of acquiring images photographed in chronological order, such as moving images.

(撮像装置の構成)
図1は第1実施形態に係るデジタルカメラ100の機能構成例を示すブロック図である。デジタルカメラ100は動画および静止画の撮影ならびに記録が可能である。デジタルカメラ100内の各機能ブロックは、バス160を介して互いに通信可能に接続されている。デジタルカメラ100の動作は、主制御部151が有する1つ以上のプログラマブルプロセッサが例えばROM155に記憶されているプログラムをRAM154に読み込んで実行し、各機能ブロックを制御することにより実現される。
(Configuration of imaging device)
FIG. 1 is a block diagram showing an example functional configuration of a digital camera 100 according to the first embodiment. The digital camera 100 can shoot and record moving and still images. Each functional block within the digital camera 100 is communicably connected to each other via a bus 160 . The operation of the digital camera 100 is realized by one or more programmable processors of the main control unit 151 reading, for example, a program stored in the ROM 155 into the RAM 154 and executing the program to control each functional block.

撮影レンズ101(レンズユニット)は、固定1群レンズ102、ズームレンズ111、絞り103、固定3群レンズ121、フォーカスレンズ131、ズームモータ(ZM)112、絞りモータ(AM)104、およびフォーカスモータ(FM)132を有する。固定1群レンズ102、ズームレンズ111、絞り103、固定3群レンズ121、フォーカスレンズ131は撮影光学系を構成する。なお、便宜上レンズ102、111、121、131を1枚のレンズとして図示しているが、それぞれ複数のレンズで構成されてもよい。また、撮影レンズ101は撮像装置100から取り外し可能な交換レンズとして構成されてもよい。 The taking lens 101 (lens unit) includes a fixed 1st group lens 102, a zoom lens 111, an aperture 103, a fixed 3rd group lens 121, a focus lens 131, a zoom motor (ZM) 112, an aperture motor (AM) 104, and a focus motor ( FM) 132. A fixed 1st group lens 102, a zoom lens 111, an aperture 103, a fixed 3rd group lens 121, and a focus lens 131 constitute a photographing optical system. Although the lenses 102, 111, 121, and 131 are illustrated as one lens for convenience, they may each be composed of a plurality of lenses. Also, the photographing lens 101 may be configured as an interchangeable lens that can be removed from the imaging device 100 .

絞り制御部105は、主制御部151の命令にしたがって絞りモータ104の動作を制御し、絞り103の開口径を変更する。
ズーム制御部113は、主制御部151の命令にしたがってズームモータ112の動作を制御し、撮影レンズ101の焦点距離(画角)を変更する。
The aperture control unit 105 controls the operation of the aperture motor 104 according to the command from the main control unit 151 to change the aperture diameter of the aperture 103 .
The zoom control unit 113 controls the operation of the zoom motor 112 according to commands from the main control unit 151 to change the focal length (angle of view) of the photographing lens 101 .

フォーカス制御部133は、例えば撮像素子141から得られる1対の焦点検出用信号の位相差に基づいて撮影レンズ101のデフォーカス量およびデフォーカス方向を算出する。そしてフォーカス制御部133は、デフォーカス量およびデフォーカス方向をフォーカスモータ132の駆動量および駆動方向に変換する。この駆動量および駆動方向に基づいてフォーカス制御部133はフォーカスモータ132の動作を制御し、フォーカスレンズ131を駆動することにより、撮影レンズ101の焦点状態を制御する。 The focus control unit 133 calculates the defocus amount and the defocus direction of the photographing lens 101 based on the phase difference between the pair of focus detection signals obtained from the image sensor 141, for example. The focus control unit 133 then converts the defocus amount and defocus direction into the drive amount and drive direction of the focus motor 132 . The focus control unit 133 controls the operation of the focus motor 132 based on the drive amount and the drive direction, and drives the focus lens 131 to control the focus state of the photographing lens 101 .

このように、フォーカス制御部133は位相差検出方式の自動焦点検出(AF)を実施するが、フォーカス制御部133は撮像素子141から得られる画像信号のコントラスト評価値に基づくコントラスト検出方式のAFを実行してもよい。また、撮像素子141とは別個に設けたAFセンサから得られる焦点検出用信号を用いて位相差検出方式のAFを実行してもよい。なお、フォーカス制御部133におけるAF動作において、後述する画像処理部152が検出する主被写体の領域に焦点検出領域を設定することができる。 In this manner, the focus control unit 133 performs automatic focus detection (AF) using the phase difference detection method. may be executed. Alternatively, phase difference detection AF may be performed using a focus detection signal obtained from an AF sensor provided separately from the imaging device 141 . In the AF operation of the focus control section 133, the focus detection area can be set to the area of the main subject detected by the image processing section 152, which will be described later.

撮影レンズ101によって撮像素子141の結像面に形成される被写体像は、撮像素子141に配置された複数の画素のそれぞれが有する光電変換素子により電気信号(画像信号)に変換される。本実施形態では、撮像素子141に、水平方向にm、垂直方向にn(n,mは複数)の画素が行列状に配置されており、各画素には2つの光電変換素子(光電変換領域)が設けられている。撮像素子141からの信号読み出しは、主制御部151からの指示に従ってセンサ制御部143が制御する。 A subject image formed on the imaging plane of the imaging element 141 by the imaging lens 101 is converted into an electric signal (image signal) by a photoelectric conversion element of each of a plurality of pixels arranged on the imaging element 141 . In this embodiment, m pixels in the horizontal direction and n pixels in the vertical direction (where n and m are plural) are arranged in a matrix in the image sensor 141, and each pixel has two photoelectric conversion elements (photoelectric conversion regions). ) is provided. Signal reading from the imaging device 141 is controlled by the sensor control section 143 according to instructions from the main control section 151 .

個々の画素が有する2つの光電変換領域を領域Aおよび領域Bと呼び、個々の画素の領域Aから読み出した画像信号群からなる画像をA画像、個々の画素の領域Bから読み出した画像信号群からなる画像をB画像と呼ぶ。また、A画像とB画像を画素単位で加算した画像をA+B画像と呼ぶ。A画像とB画像は視差画像対を形成する。表示や記録にはA+B画像を用いる。また、位相差検出方式のAFに用いる焦点検出用信号の生成や、距離マップの生成にはA画像とB画像を用いる。 The two photoelectric conversion regions of each pixel are called region A and region B. An image composed of a group of image signals read out from region A of each pixel is called A image, and a group of image signals read out from region B of each pixel. is called a B-image. An image obtained by adding the A image and the B image pixel by pixel is called an A+B image. The A and B images form a parallax image pair. A+B images are used for display and recording. Further, the A image and the B image are used to generate a focus detection signal used in phase difference detection AF and to generate a distance map.

撮像素子141から読み出された画像信号は信号処理部142に供給される。信号処理部142は、画像信号にノイズ低減処理、A/D変換処理、自動利得制御処理などの信号処理を適用し、画像データとしてセンサ制御部143に出力する。センサ制御部143は信号処理部142から受信した画像データをRAM(ランダム・アクセス・メモリ)154に蓄積する。 An image signal read out from the imaging element 141 is supplied to the signal processing section 142 . The signal processing unit 142 applies signal processing such as noise reduction processing, A/D conversion processing, and automatic gain control processing to the image signal, and outputs the image signal to the sensor control unit 143 as image data. The sensor control unit 143 stores the image data received from the signal processing unit 142 in a RAM (random access memory) 154 .

RAM154に保存された画像データを記録する場合、主制御部151は画像データに例えば所定のヘッダを追加するなどして、記録形式に応じたデータファイルを生成する。この際、主制御部151は必要に応じて圧縮解凍部153で画像データを符号化し、符号化データをデータファイルに格納する。主制御部151は、生成したデータファイルを例えばメモリカードのような記録媒体157に記録する。 When recording the image data stored in the RAM 154, the main control unit 151 adds, for example, a predetermined header to the image data to generate a data file according to the recording format. At this time, the main control unit 151 encodes the image data in the compression/decompression unit 153 as necessary, and stores the encoded data in the data file. The main controller 151 records the generated data file in a recording medium 157 such as a memory card.

また、RAM154に保存された画像データを表示する場合、主制御部151は表示部150での表示サイズに適合するように画像データを画像処理部152でスケーリングした後、RAM154のうちビデオメモリとして用いる領域(VRAM領域)に書き込む。表示部150は、RAM154のVRAM領域から表示用の画像データを読み出し、例えばLCDや有機ELディスプレイなどの表示装置に表示する。表示部150では、画像処理部152が検出した主被写体(動体)の検出結果(主被写体領域を示す枠など)も表示する。 When displaying the image data stored in the RAM 154, the main control unit 151 scales the image data in the image processing unit 152 so as to fit the display size of the display unit 150, and then uses the RAM 154 as a video memory. Write to the area (VRAM area). The display unit 150 reads image data for display from the VRAM area of the RAM 154, and displays it on a display device such as an LCD or an organic EL display. The display unit 150 also displays the detection result of the main subject (moving object) detected by the image processing unit 152 (the frame indicating the main subject area, etc.).

デジタルカメラ100は、動画撮影時(撮影スタンバイ状態や動画記録中)に、撮影された動画を表示部150に即時表示することにより、表示部150を電子ビューファインダー(EVF)として機能させる。表示部150をEVFとして機能させる際に表示する動画およびそのフレーム画像を、ライブビュー画像もしくはスルー画像と呼ぶ。また、デジタルカメラ100は、静止画撮影を行った場合、撮影結果をユーザが確認できるように、直前に撮影した静止画を一定時間表示部150に表示する。これらの表示動作についても、主制御部151の制御によって実現される。 The digital camera 100 causes the display unit 150 to function as an electronic viewfinder (EVF) by immediately displaying the captured moving image on the display unit 150 during moving image capturing (shooting standby state or moving image recording). A moving image and its frame images displayed when the display unit 150 functions as an EVF are called a live view image or a through image. Further, when a still image is captured, the digital camera 100 displays the last captured still image on the display unit 150 for a certain period of time so that the user can confirm the result of the capturing. These display operations are also realized under the control of the main control unit 151 .

圧縮解凍部153は画像データを符号化したり復号したりする。例えば静止画や動画を記録する場合、予め定められた符号化方式によって画像データや音声データを符号化する。また、記録媒体157に記録された静止画データファイルや動画データファイルを再生する際、圧縮解凍部153は符号化データを復号してRAM154に格納する。 A compression/decompression unit 153 encodes and decodes image data. For example, when recording still images and moving images, image data and audio data are encoded by a predetermined encoding method. Also, when reproducing a still image data file or a moving image data file recorded on the recording medium 157 , the compression/decompression unit 153 decodes the encoded data and stores it in the RAM 154 .

RAM154はプログラムを実行するためのシステムメモリ、ビデオメモリ、バッファメモリなどとして用いられる。
ROM155は主制御部151のプロセッサが実行可能なプログラム、各種の設定値、デジタルカメラ100の固有情報、GUIデータなどを記憶する。ROM155は電気的に書き換え可能であってよい。
The RAM 154 is used as system memory, video memory, buffer memory, etc. for executing programs.
The ROM 155 stores programs that can be executed by the processor of the main control unit 151, various setting values, unique information of the digital camera 100, GUI data, and the like. The ROM 155 may be electrically rewritable.

操作部156は、ユーザがデジタルカメラ100に指示を入力するためのスイッチ、ボタン、キー、タッチパネルなどの入力デバイス群の総称である。操作部156を通じた入力はバス160を通じて主制御部151が検知し、主制御部151は入力に応じた動作を実現するために各部を制御する。 The operation unit 156 is a general term for a group of input devices such as switches, buttons, keys, and touch panel for the user to input instructions to the digital camera 100 . An input through the operation unit 156 is detected by the main control unit 151 through the bus 160, and the main control unit 151 controls each unit in order to realize operations according to the input.

主制御部151は例えばCPUやMPUなどのプログラマブルプロセッサを1つ以上有し、例えばROM155に記憶されたプログラムをRAM154に読み込んで実行することにより各部を制御し、デジタルカメラ100の機能を実現する。主制御部151はまた、被写体輝度の情報に基づいて露出条件(シャッタースピードもしくは蓄積時間、絞り値、感度)を自動的に決定するAE処理を実行する。被写体輝度の情報は例えば画像処理部152から取得することができる。主制御部151は、例えば人物の顔など、特定被写体の領域の輝度情報に基づいて露出条件を決定することもできる。 The main control unit 151 has one or more programmable processors such as a CPU and an MPU, and controls each unit by reading a program stored in the ROM 155 into the RAM 154 and executing it, thereby realizing the functions of the digital camera 100 . The main control unit 151 also executes AE processing for automatically determining exposure conditions (shutter speed or accumulation time, aperture value, sensitivity) based on subject brightness information. Information on subject brightness can be acquired from the image processing unit 152, for example. The main control unit 151 can also determine exposure conditions based on luminance information of a specific subject area such as a person's face.

主制御部151は、動画撮影時には絞り103は固定とし、電子シャッタスピード(蓄積時間)とゲインの大きさで露出を制御する。主制御部151は決定した蓄積時間とゲインの大きさをセンサ制御部143に通知する。センサ制御部143は通知された露出条件に従った撮影が行われるように撮像素子141の動作を制御する。 The main control unit 151 fixes the aperture 103 during moving image shooting, and controls the exposure based on the electronic shutter speed (accumulation time) and the magnitude of the gain. The main controller 151 notifies the sensor controller 143 of the determined accumulation time and gain. The sensor control unit 143 controls the operation of the imaging device 141 so that shooting is performed according to the notified exposure conditions.

距離マップ生成部161(距離検出手段)は、例えばRAM154に保存された画像データを用いて距離マップを生成する。距離マップは例えば画素の輝度値が被写体距離を表し、デプスマップ距離画像、奥行き画像などと呼ばれることもある。距離マップは公知の方法で生成することができる。例えば、距離マップ生成部161は、視差画像(上述したA画像およびB画像)の像ズレ量から各画素位置におけるデフォーカス量(フォーカスレンズの合焦位置からのズレ量およびズレの方向)を求めることができる。デフォーカス量は現在の被写体距離を基準としたピントのズレ量を表すので、デフォーカス量を距離情報と見なすことができる。もちろん、デフォーカス量に基づいてフォーカスレンズの合焦位置を求め、合焦位置に対応する被写体距離を求めてもよい。また、通常の撮像光学系においては像ズレ量とデフォーカス量は1対1に対応するため、像ズレ量の分布を距離マップとして、奥行きに応じた処理などを行うこともできる。なお、撮像装置100をステレオカメラのような多眼カメラとして視差画像を取得してもよいし、記憶媒体や外部装置から視差画像を取得してもよい。 The distance map generator 161 (distance detector) generates a distance map using image data stored in the RAM 154, for example. For example, the luminance value of a pixel in a distance map represents the subject distance, and is sometimes called a depth map distance image, a depth image, or the like. A distance map can be generated by a known method. For example, the distance map generation unit 161 obtains the defocus amount (the amount of deviation from the in-focus position of the focus lens and the direction of deviation) at each pixel position from the amount of image deviation of the parallax images (images A and B described above). be able to. Since the defocus amount represents the amount of defocus based on the current subject distance, the defocus amount can be regarded as distance information. Of course, the in-focus position of the focus lens may be obtained based on the defocus amount, and the object distance corresponding to the in-focus position may be obtained. In addition, since the amount of image shift and the amount of defocus correspond one-to-one in a normal imaging optical system, it is possible to use the distribution of the amount of image shift as a distance map to perform processing according to the depth. Note that parallax images may be acquired by using the imaging device 100 as a multi-view camera such as a stereo camera, or parallax images may be acquired from a storage medium or an external device.

また、距離マップは視差画像を用いずに生成することもできる。コントラスト評価値が極大となるフォーカスレンズ位置を画素ごとに求めることで、画素ごとに被写体距離を取得することができる。また、合焦距離を変えて同一シーンを複数回撮影して得られる画像データと光学系の点像分布関数(PSF)とから、ぼけ量と距離との相関関係に基づいて画素ごとの距離情報を求めることもできる。距離マップ生成部161は、画像全体に対して距離マップを生成してもよいし、画像のうち、動体検出に必要な部分領域に対してだけ距離マップを生成してもよい。距離マップ生成部161は、生成した距離マップをRAM154に保存する。距離マップは画像処理部152から参照される。なお、距離マップ生成部161は、被写体距離を画素ごとに求める代わりに小領域(画素ブロック)ごとに求めて距離マップを生成してもよい。 Also, the distance map can be generated without using parallax images. By finding the focus lens position that maximizes the contrast evaluation value for each pixel, the subject distance can be obtained for each pixel. In addition, from the image data obtained by shooting the same scene multiple times with different focal distances and the point spread function (PSF) of the optical system, distance information for each pixel is calculated based on the correlation between the amount of blur and the distance. can also be asked for. The distance map generator 161 may generate a distance map for the entire image, or may generate a distance map only for a partial area of the image that is necessary for detecting a moving object. Distance map generator 161 stores the generated distance map in RAM 154 . The distance map is referred to by the image processing unit 152 . Note that the distance map generation unit 161 may generate the distance map by obtaining the subject distance for each small area (pixel block) instead of obtaining the subject distance for each pixel.

さらに、距離マップ生成部161は、距離マップに領域ごとに信頼度を算出し、距離マップとともに保存することができる。信頼度の算出方法には特に制限はない。例えば、視差画像を用いて距離マップを生成する際、視差画像間の像ズレ量を求めるために、相対的なシフト量を変えながら例えばSADなどの相関量(類似度)を演算し、相関が最大(相関量が最小)になるシフト量を像ズレ量として検出する。算出した相関量の平均値と最大値との差が大きい程、検出した像ズレ量(デフォーカス量)の信頼度は高いと考えられる。したがって、各画素位置で算出した相関量の平均値と最大値との差を、その画素位置信頼度として用いることができる。なお、距離マップ生成部161は、被写体距離やその信頼度を、画素ごとに求める代わりに小領域(画素ブロック)ごとに求めて距離マップを生成してもよい。 Furthermore, the distance map generation unit 161 can calculate the reliability for each area of the distance map and store it together with the distance map. There is no particular limitation on the method of calculating the reliability. For example, when generating a distance map using parallax images, in order to obtain an image shift amount between parallax images, a correlation amount (similarity) such as SAD is calculated while changing the relative shift amount, and the correlation is The amount of shift that maximizes (minimizes the amount of correlation) is detected as the amount of image deviation. It is considered that the larger the difference between the calculated average value and the maximum value of the correlation amount, the higher the reliability of the detected image shift amount (defocus amount). Therefore, the difference between the average value and the maximum value of correlation amounts calculated at each pixel position can be used as the pixel position reliability. Note that the distance map generation unit 161 may generate the distance map by obtaining the subject distance and its reliability for each small area (pixel block) instead of obtaining it for each pixel.

動き検出部162は、例えばジャイロや加速度センサ、電子コンパスなどの姿勢センサにより構成され、デジタルカメラ100の位置や姿勢の変化を計測する。本実施形態では一例として、撮影レンズ101の光軸をロール軸とし、ロール軸に直交し、撮像素子の長手方向に平行な軸をピッチ軸、ロール軸とピッチ軸に直交する軸をヨー軸としたときのヨー軸およびピッチ軸周りの角速度を姿勢変化として検出する。動き検出部162は、検出した動きをRAM154に保存する。動き検出部162が検出した動きの情報は、画像処理部152から参照される。 The motion detection unit 162 is composed of, for example, an orientation sensor such as a gyro, an acceleration sensor, and an electronic compass, and measures changes in the position and orientation of the digital camera 100 . In this embodiment, as an example, the optical axis of the photographing lens 101 is the roll axis, the axis perpendicular to the roll axis and parallel to the longitudinal direction of the imaging element is the pitch axis, and the axis perpendicular to the roll and pitch axes is the yaw axis. Angular velocities around the yaw and pitch axes are detected as attitude changes. The motion detector 162 saves the detected motion in the RAM 154 . Information on the motion detected by the motion detection unit 162 is referred to by the image processing unit 152 .

画像処理部152は、RAM154に蓄積された画像データに対して予め定められた画像処理を適用する。画像処理部152が適用する画像処理には、ホワイトバランス調整処理、色補間(デモザイク)処理、ガンマ補正処理といった所謂現像処理のほか、信号形式変換処理、スケーリング処理などがあるが、これらに限定されない。さらに、画像処理部152は後述する動体検出処理を実行し、動体を主被写体として選択する。動体検出処理において画像処理部152は、距離マップ生成部161が生成した距離マップと動き検出部162が検出した動きを、動体情報に基づく主被写体の判別処理に用いることができる。 The image processing unit 152 applies predetermined image processing to the image data accumulated in the RAM 154 . Image processing applied by the image processing unit 152 includes, but is not limited to, so-called development processing such as white balance adjustment processing, color interpolation (demosaicing) processing, and gamma correction processing, as well as signal format conversion processing and scaling processing. . Further, the image processing unit 152 executes moving object detection processing, which will be described later, and selects a moving object as the main subject. In the moving object detection process, the image processing unit 152 can use the distance map generated by the distance map generating unit 161 and the motion detected by the motion detecting unit 162 for main subject discrimination processing based on moving object information.

判別した主被写体の領域に関する情報を、他の画像処理(例えばホワイトバランス調整処理や被写体の輝度情報の生成処理など)に利用してもよい。なお、フォーカス制御部133がコントラスト検出方式のAFを行う場合、コントラスト評価値を画像処理部152が生成してフォーカス制御部133に供給することができる。画像処理部152は、処理した画像データや、主被写体の領域に関する情報などをRAM154に保存する。 Information related to the determined area of the main subject may be used for other image processing (for example, white balance adjustment processing, subject brightness information generation processing, etc.). When the focus control unit 133 performs contrast detection AF, the image processing unit 152 can generate a contrast evaluation value and supply it to the focus control unit 133 . The image processing unit 152 stores the processed image data, information about the area of the main subject, and the like in the RAM 154 .

(動体検出処理)
図2は、本実施形態における動体検出処理を説明するために、画像処理部152を動体検出処理に特化した機能ブロックによって表現した模式図である。図2に示す機能ブロックのそれぞれは、別個のハードウェア回路として実現されてもよいし、画像処理部152が有するプログラマブルプロセッサがメモリにプログラムを読み込んで実行することによって実現されてもよい。
(Moving object detection processing)
FIG. 2 is a schematic diagram showing the image processing unit 152 with functional blocks specialized for moving object detection processing, in order to explain the moving object detection processing in this embodiment. Each of the functional blocks shown in FIG. 2 may be implemented as a separate hardware circuit, or may be implemented by a programmable processor included in the image processing unit 152 reading a program into memory and executing it.

図3は、画像処理部152が実施する動体検出処理のフローチャートである。
S201において画像入力部501は、撮影時刻が異なる2フレームの入力画像をRAM154から取得する。現フレームはセンサ制御部143から取得し、前フレーム(過去フレーム)はRAM154から取得してもよい。画像入力部501は、取得した入力画像を動きベクトル検出部502および顕著度算出部507に供給する。
FIG. 3 is a flowchart of moving object detection processing performed by the image processing unit 152 .
In S<b>201 , the image input unit 501 acquires two frames of input images captured at different times from the RAM 154 . The current frame may be acquired from the sensor control unit 143 and the previous frame (past frame) may be acquired from the RAM 154 . The image input unit 501 supplies the acquired input image to the motion vector detection unit 502 and the saliency calculation unit 507 .

S202において動きベクトル検出部502は、画像入力部501から供給された2フレームの入力画像について、画像間の複数の動きベクトルを検出する。動きベクトルの検出は、任意の公知の手法を用いて実現することができるが、本実施形態では一例としてテンプレートマッチングを用いて動きベクトルを検出するものとする。 In S<b>202 , the motion vector detection unit 502 detects a plurality of motion vectors between the two frames of input images supplied from the image input unit 501 . Motion vectors can be detected using any known technique. In this embodiment, template matching is used as an example to detect motion vectors.

すなわち、動きベクトル検出部502は、2フレームの画像のうち、先に撮影された1フレームの画像(フレームt-1とする)を水平および垂直方向にそれぞれ複数分割して複数の部分画像を生成する。そして、動きベクトル検出部502は、各部分画像をテンプレート、後に撮影された1フレームの画像(フレームtとする)を参照画像としたテンプレートマッチングを実施し、部分画像と類似度が最も高い領域を参照画像内で探索する。そして、動きベクトル検出部502は、部分画像の中心点の座標を始点とし、探索により見つかった、部分画像と類似度が最も高い領域の中心点の座標を終点とするベクトルを、部分画像についての動きベクトルとする。このようにして、動きベクトル検出部502は、フレームt-1の部分画像ごとに動きベクトルを検出する。 That is, the motion vector detection unit 502 generates a plurality of partial images by horizontally and vertically dividing an image of one frame (referred to as frame t-1) captured earlier among the images of the two frames. do. Then, the motion vector detection unit 502 performs template matching using each partial image as a template and an image of one frame captured later (assumed to be frame t) as a reference image. Explore in the reference image. Then, the motion vector detection unit 502 creates a vector whose starting point is the coordinates of the central point of the partial image and whose ending point is the coordinates of the central point of the area found by the search that has the highest degree of similarity to the partial image. be a motion vector. In this manner, the motion vector detection unit 502 detects a motion vector for each partial image of frame t-1.

図4(a)はフレームt-1、図4(b)はフレームtの例を示す図であり、図4(b)にはテンプレートマッチングによって検出された動きベクトルのいくつかが矢印で示されている。フレームt-1上の点

Figure 0007324066000001
を始点、それらに対応するフレームt上の点
Figure 0007324066000002
を終点とするベクトルviを以下のように算出する。
Figure 0007324066000003
なお、等号の上に三角形が付された記号は、左辺を右辺によって定義することを意味する。また、ベクトルの第一成分を画像の横方向、第二成分を画像の縦方向とする(以下同様)。動きベクトル検出部502は、検出した動きベクトルviと、動きベクトルviの終点eiとを関連づけてRAM154に保存する。 FIG. 4(a) shows an example of frame t-1, and FIG. 4(b) shows an example of frame t. In FIG. 4(b), some motion vectors detected by template matching are indicated by arrows. ing. point on frame t-1
Figure 0007324066000001
, and their corresponding points on frame t
Figure 0007324066000002
is calculated as follows .
Figure 0007324066000003
Note that the symbol with a triangle above the equal sign means that the left side is defined by the right side. Also, let the first component of the vector be the horizontal direction of the image and the second component be the vertical direction of the image (the same applies hereinafter). The motion vector detection unit 502 associates the detected motion vector vi with the end point ei of the motion vector vi and stores them in the RAM 154 .

S203においてクラスタリング部503は、S202において検出された動きベクトル群viをクラスタリングする。クラスタリングにはK-Means法や、Affinity Propagationなど、公知の任意のクラスタリング手法を用いることができる。図4(c)には、クラスタ数を自動決定可能なクラスタリング手法であるAffinity Propagationを用いたクラスタリング結果の例を示している。K-Means法のようなクラスタ数を自動決定出来ないクラスタリング手法を用いる場合には何らかの方法でクラスタ数を決定してからクラスタリングを実行する。 In S203, the clustering unit 503 clusters the motion vector group vi detected in S202. Any known clustering method such as the K-Means method or Affinity Propagation can be used for clustering. FIG. 4(c) shows an example of clustering results using Affinity Propagation, which is a clustering method capable of automatically determining the number of clusters. When using a clustering method such as the K-Means method that cannot automatically determine the number of clusters, clustering is performed after determining the number of clusters by some method.

S204において、背景クラスタ選択部504は、S203におけるクラスタリングによって得られたクラスタ(図4(c))のうち、背景領域のベクトルから成る背景クラスタを選択する。背景クラスタの選択方法については後述する。背景クラスタ選択部504は、背景クラスタが存在しない場合や選択できない場合には、背景クラスタの選択結果を、背景クラスタ無しとする。背景クラスタ選択部504は、背景クラスタの選択結果を背景ベクトル算出部505に供給する。 In S204, the background cluster selection unit 504 selects a background cluster made up of background region vectors from among the clusters obtained by the clustering in S203 (FIG. 4(c)). A method of selecting the background cluster will be described later. If the background cluster does not exist or cannot be selected, the background cluster selection unit 504 sets the background cluster selection result to no background cluster. The background cluster selection unit 504 supplies the background cluster selection result to the background vector calculation unit 505 .

S205において背景ベクトル算出部505は、背景クラスタが存在するか否かを判定し、背景クラスタが存在すると判定されればS206へ処理を進め、判定されなければ動体検出結果なしとして動体検出処理を終了する。背景ベクトル算出部505は、背景クラスタの選択結果が背景クラスタ無しだった場合は背景クラスタが存在しないと判定することができる。 In S205, the background vector calculation unit 505 determines whether or not a background cluster exists. If it is determined that a background cluster exists, the process proceeds to S206. do. The background vector calculation unit 505 can determine that the background cluster does not exist when the background cluster selection result indicates no background cluster.

S206において背景ベクトル算出部505は、背景クラスタ選択部504が選択した背景クラスタに属する動きベクトルから、背景の動きを表す背景ベクトルbを算出する。ここでは、一例として、背景クラスタに属する動きベクトルの平均ベクトルを背景ベクトルbとして算出するものとするが、これに限定されない。 In S<b>206 , the background vector calculation unit 505 calculates the background vector b representing the motion of the background from the motion vectors belonging to the background cluster selected by the background cluster selection unit 504 . Here, as an example, the average vector of the motion vectors belonging to the background cluster is calculated as the background vector b, but the invention is not limited to this.

S207において動体選択部506は、動きベクトル検出部502が検出した全ての動きベクトルについて、S206で得られた背景ベクトルとのユークリッド距離を算出する。そして、動体選択部506は、算出したユークリッド距離が最大となる動きベクトルを選択する。具体的には、動きベクトルviと、背景ベクトルbとのユークリッド距離をdisti、選択される動きベクトルのインデックスをmとすると、以下の式(2)および(3)に従って動体選択部506は動きベクトルのインデックスmを決定する。

Figure 0007324066000004
なお、distm(すなわち、背景ベクトルbと動きベクトルviとの最大のユークリッド距離)が所定の閾値未満である場合、動体選択部506は動体が検出されないものと判定して動体検出処理を終了する。この場合、動体検出結果は、動体検出無しとなる。一方、distmが閾値以上であれば、動体選択部506は、動きベクトルvmの終点の画像座標emをフレームtに対する動体検出位置として出力し、動体検出処理を終了する。 In S207, the moving object selection unit 506 calculates the Euclidean distance between all motion vectors detected by the motion vector detection unit 502 and the background vector obtained in S206. Then, the moving object selection unit 506 selects the motion vector that maximizes the calculated Euclidean distance. Specifically, if dist i is the Euclidean distance between the motion vector v i and the background vector b, and m is the index of the motion vector to be selected, the moving object selection unit 506 performs the following equations (2) and (3): Determine the motion vector index m.
Figure 0007324066000004
Note that when dist m (that is, the maximum Euclidean distance between the background vector b and the motion vector v i ) is less than a predetermined threshold, the moving object selection unit 506 determines that no moving object is detected, and terminates the moving object detection process. do. In this case, the moving object detection result is no moving object detection. On the other hand, if dist m is equal to or greater than the threshold, the moving object selection unit 506 outputs the image coordinates em of the end point of the motion vector v m as the moving object detection position for the frame t, and ends the moving object detection process.

検出した動体検出位置は、撮像装置の動作を制御するために用いることができる。例えば、動体検出位置を含むように焦点検出領域の設定することで、動体検出位置に合焦するようにレンズユニットの焦点検出を制御することができる。また、動体検出位置が適正露出になる様に自動露出制御を行うことができる。 The detected moving object detection position can be used to control the operation of the imaging device. For example, by setting the focus detection area so as to include the moving object detection position, it is possible to control the focus detection of the lens unit so as to focus on the moving object detection position. Also, automatic exposure control can be performed so that the moving object detection position is properly exposed.

(背景クラスタの選択処理例1)
ここで、S204で背景クラスタ選択部504が行う背景クラスタ選択処理の一例について図5のフローチャートを用いて説明する。この例において背景クラスタ選択部504は、クラスタを構成する動きベクトルの画像中における存在範囲が最大であるクラスタを背景クラスタとして選択する。これは、クラスタを構成する動きベクトルの検出位置の分布範囲が最も広いクラスタを背景クラスタとして選択すると言うこともできる。
(Background cluster selection process example 1)
Here, an example of the background cluster selection process performed by the background cluster selection unit 504 in S204 will be described using the flowchart of FIG. In this example, the background cluster selection unit 504 selects, as the background cluster, the cluster in which the motion vectors forming the cluster exist in the largest possible range in the image. This can be said to select the cluster having the widest distribution range of detection positions of the motion vectors forming the cluster as the background cluster.

S301において背景クラスタ選択部504は、クラスタリング部503が生成したクラスタのそれぞれについて、クラスタを構成する動きベクトルの、始点座標または終点座標の分散を算出する。背景クラスタ選択部504は、例えば座標のx座標についての分散と、y座標についての分散とを算出し、両者を加算することにより、座標の分散値を算出する。本実施形態において背景クラスタ選択部504は以下の式(4)に示すようにx座標の分散とy座標の分散を単純に加算してクラスタkの分散varkを算出するが、x座標の分散とy座標の分散を画像の縦横比に応じた重みで加算してもよい。

Figure 0007324066000005
ここで、nkはクラスタkを構成する動きベクトルの総数であり、
Figure 0007324066000006
はそれぞれ、クラスタkを構成する動きベクトルの終点のx座標exiおよびy座標eyiの平均値である。 In S<b>301 , the background cluster selection unit 504 calculates the variance of the start point coordinates or the end point coordinates of the motion vectors forming the clusters for each cluster generated by the clustering unit 503 . The background cluster selection unit 504 calculates, for example, the x-coordinate variance and the y-coordinate variance of the coordinates, and adds them together to calculate the variance value of the coordinates. In this embodiment, the background cluster selection unit 504 calculates the variance var k of cluster k by simply adding the variance of the x-coordinate and the variance of the y-coordinate as shown in the following equation (4). and the variance of the y-coordinate may be added with a weight according to the aspect ratio of the image.
Figure 0007324066000005
where n k is the total number of motion vectors that make up cluster k,
Figure 0007324066000006
are the average values of the x-coordinates ex i and y-coordinates ey i of the end points of the motion vectors forming the cluster k.

S302において背景クラスタ選択部504は、S301で算出した分散varkの最大値varKと、対応するクラスタKを選択し、例えば内部メモリに記憶する。 In S302, the background cluster selection unit 504 selects the maximum value var K of the variance var k calculated in S301 and the corresponding cluster K, and stores them in the internal memory, for example.

S303において背景クラスタ選択部504は、S302で記憶した最大分散値varKが所定の閾値以上か否か判定し、閾値以上と判定されればS304へ、判定されなければS305へ処理を進める。 In S303, the background cluster selection unit 504 determines whether or not the maximum variance value var K stored in S302 is greater than or equal to a predetermined threshold.

S304において背景クラスタ選択部504は、S302で記憶した、最大分散値varKに対応するクラスタKを背景クラスタとして選択し、背景クラスタ選択処理を終了する。ここでは最大分散値varKに対応するクラスタKを背景クラスタとして選択した。 In S304, the background cluster selection unit 504 selects the cluster K corresponding to the maximum variance value var K stored in S302 as the background cluster, and ends the background cluster selection process. Here, the cluster K corresponding to the maximum variance var K was selected as the background cluster.

S305において背景クラスタ選択部504は、背景クラスタなしと判定して背景クラスタ選択処理を終了する。 In S305, the background cluster selection unit 504 determines that there is no background cluster, and ends the background cluster selection process.

(背景クラスタの選択処理例2)
S204で背景クラスタ選択部504が行う背景クラスタ選択処理の別の例について図6のフローチャートを用いて説明する。この例において背景クラスタ選択部504は、デジタルカメラ100の動きに基づいて背景クラスタを選択する。デジタルカメラの動きを考慮することで、安定した背景クラスタの選択が実現できる。
(Background cluster selection process example 2)
Another example of the background cluster selection process performed by the background cluster selection unit 504 in S204 will be described using the flowchart of FIG. In this example, the background cluster selection unit 504 selects background clusters based on the movement of the digital camera 100 . By considering the movement of the digital camera, stable background cluster selection can be achieved.

S401において動き入力部508は、動き検出部162からデジタルカメラ100の動き情報(ここではヨー軸およびピッチ軸周りの角速度)を取得し、背景クラスタ選択部504に供給する。 In S<b>401 , the motion input unit 508 acquires motion information (here, angular velocities around the yaw axis and pitch axis) of the digital camera 100 from the motion detection unit 162 and supplies it to the background cluster selection unit 504 .

S402において背景クラスタ選択部504は、動き入力部508から受け取った動き情報から背景の動き方向を推定する。本実施形態において背景クラスタ選択部504は、ヨー軸周りの角速度をyaw、ピッチ軸周りの角速度をpitchとした場合、背景の動き方向を

Figure 0007324066000007
で定義されるgに平行な方向と推定する。なお、ここで説明した方法は単なる一例であり、ロール軸周りの角速度を考慮したり、シフト方向の速度を考慮したりして背景の動き方向を推定してもよい。 In S<b>402 , the background cluster selection unit 504 estimates the motion direction of the background from the motion information received from the motion input unit 508 . In this embodiment, the background cluster selection unit 504 selects the moving direction of the background as yaw for the angular velocity around the yaw axis and pitch for the angular velocity around the pitch axis.
Figure 0007324066000007
is assumed to be the direction parallel to g defined by Note that the method described here is merely an example, and the direction of movement of the background may be estimated by considering the angular velocity around the roll axis or the velocity in the shift direction.

S403において背景クラスタ選択部504は、各クラスタのクラスタ中心ベクトルと、式(5)のgとがなす角度をそれぞれ算出する。ここで、クラスタ中心ベクトルとは、各クラスタを構成する動きベクトルviの代表ベクトルであり、例えば平均ベクトルであってよい。 In S403, the background cluster selection unit 504 calculates the angle formed by the cluster center vector of each cluster and g in Equation (5). Here, the cluster center vector is a representative vector of the motion vectors v i forming each cluster, and may be an average vector, for example.

S404において背景クラスタ選択部504は、S403で算出した角度の最小値θKと、対応するクラスタKを選択し、例えば内部メモリに記憶する。 In S404, the background cluster selection unit 504 selects the minimum value θ K of the angle calculated in S403 and the corresponding cluster K, and stores them in the internal memory, for example.

S405において背景クラスタ選択部504は、S404で選択したθKが所定の閾値未満か否かを判定し、閾値未満と判定されればS406へ、判定されなければS407へ、処理を進める。 In S405, the background cluster selection unit 504 determines whether or not θ K selected in S404 is less than a predetermined threshold.

S406において背景クラスタ選択部504は、S404で選択したクラスタKを背景クラスタとして選択し、背景クラスタ選択処理を終了する。 In S406, the background cluster selection unit 504 selects the cluster K selected in S404 as the background cluster, and ends the background cluster selection process.

S407において背景クラスタ選択部504は、背景クラスタなしと判定して背景クラスタ選択処理を終了する。 In S407, the background cluster selection unit 504 determines that there is no background cluster, and ends the background cluster selection process.

(動体検出処理の別例1)
次に、S207における動体検出処理の別の例について説明する。本例において動体選択部506は、画像内の視覚的に目立った領域(顕著領域)に限定して動体検出処理を適用することで、より被写体らしい領域を選択することが可能となる。
(Another example 1 of moving object detection processing)
Next, another example of the moving object detection process in S207 will be described. In this example, the moving object selection unit 506 applies moving object detection processing only to visually conspicuous regions (salient regions) in the image, thereby making it possible to select regions that are more likely to be a subject.

顕著度算出部507は、画像入力部501から供給されるフレームtについて、動きベクトル検出部502が検出した動きベクトルのそれぞれの終点座標eiにおける顕著度を算出する。顕著度算出部507は、例えばLaurent Itti, Christof Koch, and Ernst Niebur, ”A Model of Saliency-Based Visual Attention for Rapid Scene Analysis”, IEEE Transactions on Pattern Analysis and Machine Intelligence archive Volume 20 Issue 11, November 1998 Pages 1254-1259に記載の顕著度(saliency)など、公知の任意の顕著度算出方法を用いて顕著度を算出することができる。顕著度算出部507は、算出した顕著度を、動きベクトルに対応付けてRAM154に格納する。 The salience calculation unit 507 calculates the salience of each end point coordinate ei of the motion vector detected by the motion vector detection unit 502 for the frame t supplied from the image input unit 501 . The saliency calculation unit 507 calculates, for example, Laurent Itti, Christof Koch, and Ernst Niebur, ``A Model of Saliency-Based Visual Attention for Rapid Scene Analysis'', IEEE Transactions on Pattern Analysis and Machine Intelligence archive Volume 20 Issue 11, November 1998 Pages. Saliency can be calculated using any known saliency calculation method, such as saliency described in pp. 1254-1259. The salience calculation unit 507 stores the calculated salience in the RAM 154 in association with the motion vector.

S207において動体選択部506は、背景ベクトルbとのユークリッド距離を算出する動きベクトルを、所定の閾値以上の顕著度を持つ動きベクトルに限定する。これにより、動体検出を顕著領域に限定して適用することができる。 In S207, the moving object selection unit 506 limits the motion vectors for calculating the Euclidean distance to the background vector b to motion vectors having a degree of salience equal to or greater than a predetermined threshold. As a result, moving object detection can be applied by limiting it to the salient region.

(動体検出処理の別例2)
次に、S207における動体検出処理のさらに別の例について説明する。本例において動体選択部506は、デジタルカメラ100に近い領域から優先的に動体検出を適用する。これにより、動体が複数存在する場合、手前にいる動体を優先して主被写体として検出することができる。
(Another example 2 of moving object detection processing)
Next, still another example of the moving object detection processing in S207 will be described. In this example, the moving object selection unit 506 preferentially applies moving object detection to an area close to the digital camera 100 . As a result, when there are a plurality of moving objects, the moving object in front can be preferentially detected as the main subject.

距離マップ入力部509は、距離マップ生成部161がフレームtに対して生成した距離マップを取得し、動体選択部506に供給する。 The distance map input unit 509 acquires the distance map generated for the frame t by the distance map generation unit 161 and supplies it to the moving object selection unit 506 .

S207において動体選択部506は、背景ベクトルbとのユークリッド距離を算出する動きベクトルを、その終点座標eiに対応する被写体距離が閾値未満である動きベクトルに限定する。これにより、動体検出をデジタルカメラ100に近い領域に限定して適用することができる。 In S207, the moving object selection unit 506 limits the motion vectors for calculating the Euclidean distance from the background vector b to motion vectors whose object distance corresponding to the end point coordinates ei is less than a threshold. As a result, moving object detection can be applied by limiting it to an area close to the digital camera 100 .

あるいは、動体選択部506は、背景ベクトルbとのユークリッド距離が閾値以上である動きベクトルの中から、終点座標eiに対応する被写体距離が最小であるeiを動体検出位置としてもよい。 Alternatively, the moving object selection unit 506 may set the moving object detection position ei , which has the smallest subject distance corresponding to the end point coordinates ei , among the motion vectors whose Euclidean distance to the background vector b is equal to or greater than a threshold.

後者の例を図7を用いて説明する。図7(a)および(b)は、動体として人物と犬が含まれるフレーム画像を模式的に示している。いずれのフレーム画像についても、人物と犬に関する動きベクトルは背景ベクトルbとのユークリッド距離が閾値以上であり、動体の動きベクトルであると推測できるものとする。ユークリッド距離が閾値以上である動きベクトルの中から、終点座標eiに対応する被写体距離が最小であるeiを動体検出位置とする場合、図7(a)では人物の動きベクトル、図7(b)では犬の動きベクトルの終点が動体検出位置として選択される。 The latter example will be described with reference to FIG. FIGS. 7A and 7B schematically show frame images containing a person and a dog as moving objects. For any frame image, the motion vector relating to the person and the dog has the Euclidean distance from the background vector b equal to or greater than the threshold, and can be assumed to be the motion vector of a moving object. Among the motion vectors whose Euclidean distance is equal to or greater than the threshold, e i with the smallest object distance corresponding to the end point coordinates e i is used as the moving object detection position. In b) the end point of the dog's motion vector is selected as the motion detection position.

(背景ベクトル算出の別例)
上述の構成では、動きベクトルをクラスタリングして背景クラスタを選択し、背景クラスタを構成する動きベクトルから背景ベクトルbを算出した。しかし、デジタルカメラ100の動きと撮影レンズ101の焦点距離(画角)を用いて、クラスタリングを行わずに背景ベクトルを算出してもよい。これにより、動きベクトルのクラスタリングに係る演算負荷を除去することができる。また、背景領域に色変化が少なく動きベクトルを検出することが難しいシーンでこの手法が有用である。
(another example of background vector calculation)
In the above configuration, motion vectors are clustered to select a background cluster, and the background vector b is calculated from the motion vectors forming the background cluster. However, the movement of the digital camera 100 and the focal length (angle of view) of the imaging lens 101 may be used to calculate the background vector without clustering. This makes it possible to remove the computational load associated with the clustering of motion vectors. In addition, this method is useful in a scene where the background area has little color change and it is difficult to detect the motion vector.

背景ベクトル算出部505は、フレームtを撮影した際の撮影レンズ101(撮影光学系)の焦点距離f[mm]をズーム制御部113を通じて取得する。また、動き入力部508は、動き検出部162からデジタルカメラ100の動き情報(ここではヨー軸およびピッチ軸周りの角速度)を取得し、背景ベクトル算出部505に供給する。 The background vector calculation unit 505 acquires the focal length f [mm] of the photographing lens 101 (photographing optical system) when the frame t was photographed through the zoom control unit 113 . The motion input unit 508 also acquires motion information (here, angular velocities around the yaw axis and pitch axis) of the digital camera 100 from the motion detection unit 162 and supplies it to the background vector calculation unit 505 .

背景ベクトル算出部505は以下の式(6)に従って背景ベクトルbを算出することができる。

Figure 0007324066000008
ここで、Aは撮像素子141上の実距離[mm]を画像座標系の距離[pixel]に変換するための係数であり、デジタルカメラ100の構造と画像サイズで決定される撮像素子の情報であり、例えばROM155に予め定め記憶されている。Tはフレームt-1とフレームtの撮影間隔[sec]である。 The background vector calculation unit 505 can calculate the background vector b according to Equation (6) below.
Figure 0007324066000008
Here, A is a coefficient for converting the actual distance [mm] on the image sensor 141 to the distance [pixel] in the image coordinate system, and is the information of the image sensor determined by the structure of the digital camera 100 and the image size. Yes, it is stored in advance in the ROM 155, for example. T is the imaging interval [sec] between frame t-1 and frame t.

背景ベクトル算出部505は、算出した背景ベクトルbを動体選択部506に供給する。動体選択部506の処理は上述した通りでよい。 The background vector calculation unit 505 supplies the calculated background vector b to the moving object selection unit 506 . The processing of the moving object selection unit 506 may be as described above.

以上説明したように本実施形態によれば、個々の動きベクトルと背景ベクトルとのユークリッド距離に基づいて動体の動きベクトルを選択することにより、背景と同じ方向に移動する移動体であっても検出することができる。 As described above, according to this embodiment, even a moving object moving in the same direction as the background is detected by selecting the motion vector of the moving object based on the Euclidean distance between each motion vector and the background vector. can do.

(第2実施形態)
次に、本発明の第2実施形態について説明する。本実施形態は動き情報を用いて主被写体を判別する際に、ユーザが意図している主被写体を確率よく判別する画像処理装置およびその制御方法に関する。以下では、第1実施形態と類似又は同様の構成や動作に関しては同じ参照数字を用い、重複する説明を省略する。
(Second embodiment)
Next, a second embodiment of the invention will be described. The present embodiment relates to an image processing apparatus and a control method thereof for discriminating a main subject intended by a user with high probability when discriminating a main subject using motion information. Below, the same reference numerals are used for configurations and operations that are similar or similar to those of the first embodiment, and overlapping descriptions are omitted.

図8は、本実施形態における動体検出処理を説明するために、画像処理部152を動体検出処理に特化した機能ブロックによって表現した模式図である。図8に示す機能ブロックのそれぞれは、別個のハードウェア回路として実現されてもよいし、画像処理部152が有するプログラマブルプロセッサがメモリにプログラムを読み込んで実行することによって実現されてもよい。 FIG. 8 is a schematic diagram showing the image processing unit 152 with functional blocks specialized for moving object detection processing, in order to explain the moving object detection processing in this embodiment. Each of the functional blocks shown in FIG. 8 may be implemented as a separate hardware circuit, or may be implemented by a programmable processor included in the image processing unit 152 reading a program into memory and executing it.

画像入力部501は、撮影時刻が異なる2フレームの入力画像をRAM154から取得する。現フレームはセンサ制御部143から取得し、前フレーム(過去フレーム)はRAM154から取得してもよい。 The image input unit 501 acquires two frames of input images captured at different times from the RAM 154 . The current frame may be acquired from the sensor control unit 143 and the previous frame (past frame) may be acquired from the RAM 154 .

動きベクトル検出部502は、画像入力部501が取得した入力画像間で複数の動きベクトルを検出する。動きベクトルの検出は、任意の公知の手法を用いて実現することができるが、本実施形態では一例としてテンプレートマッチングを用いて動きベクトルを検出するものとする。 A motion vector detection unit 502 detects a plurality of motion vectors between input images acquired by the image input unit 501 . Motion vectors can be detected using any known technique. In this embodiment, template matching is used as an example to detect motion vectors.

クラスタリング部503は、動きベクトル検出部502で検出された複数の動きベクトルを、少なくとも以下の3つのクラスタに分類する。
・背景クラスタ:画像全体の動きベクトル(例えば撮像装置100の動きに基づくベクトル)
・主被写体クラスタ:前フレーム以前の主被写体に関する動きベクトル
・主被写体候補クラスタ:背景クラスタに属する動きベクトルとの距離が大きいベクトル(実空間で動きの大きいベクトル)
A clustering unit 503 classifies a plurality of motion vectors detected by the motion vector detection unit 502 into at least the following three clusters.
- Background cluster: a motion vector of the entire image (for example, a vector based on the motion of the imaging device 100)
・Main subject cluster: motion vector related to the main subject in the previous frame ・Main subject candidate cluster: vector with a large distance from the motion vector belonging to the background cluster (vector with large motion in real space)

これら少なくとも3つのクラスタに分類することで、動きに基づく主被写体判別処理において、現在の主被写体の動き情報を考慮した判別を実現できる。そのため、ユーザの意図する主被写体を正しく判別する確率を高めることができる。例えば、現在の主被写体が実空間で静止していれば、動きのある別の被写体を新たな主被写体として判別することが可能である。あるいは、現在の主被写体が実空間で動いていれば、別の動体が存在していても、主被写体の判別結果を変更しないようにすることも可能である。 By classifying into at least these three clusters, it is possible to realize determination that considers the current motion information of the main subject in main subject determination processing based on motion. Therefore, it is possible to increase the probability of correctly determining the main subject intended by the user. For example, if the current main subject is stationary in real space, it is possible to determine another moving subject as the new main subject. Alternatively, if the current main subject is moving in real space, it is possible not to change the determination result of the main subject even if another moving object exists.

主被写体判別部802では、クラスタリング部503によるクラスタリングの結果に基づいて、現フレーム内の主被写体領域を判別する。主被写体判別部802で判別された主被写体領域の情報は、例えば自動露出制御や自動焦点検出といった各種の処理に用いることができる。また、被写体追尾部801は、主被写体判別部802で判別された主被写体領域をテンプレートとしたマッチング処理により、次フレーム以降の入力画像中の主被写体領域を探索する被写体追尾処理を実行する。被写体追尾部801による被写体追尾結果(画像内の主被写体領域に関する情報)は、クラスタリング部503にも供給される。 A main subject discriminating unit 802 discriminates a main subject area in the current frame based on the result of clustering by the clustering unit 503 . Information on the main subject area determined by the main subject determination unit 802 can be used for various processes such as automatic exposure control and automatic focus detection. Also, the subject tracking unit 801 executes subject tracking processing for searching for the main subject area in the input image of the next and subsequent frames by matching processing using the main subject area determined by the main subject determining unit 802 as a template. The subject tracking result (information about the main subject area in the image) by the subject tracking unit 801 is also supplied to the clustering unit 503 .

なお、動き情報に基づく主被写体判別処理には、画像入力部501が取得する入力画像以外に、撮像装置100で取得できる他の情報を用いてもよい。例えば、動き検出部162が検出した動きの情報を動き入力部508を通じてクラスタリング部503に入力し、背景クラスタの推定に用いることができる。また、距離マップ生成部161で得られる距離マップを距離マップ入力部509を通じて主被写体判別部802に入力し、主被写体判別処理に利用することができる。 In addition to the input image acquired by the image input unit 501, other information that can be acquired by the imaging device 100 may be used for main subject determination processing based on motion information. For example, motion information detected by the motion detection unit 162 can be input to the clustering unit 503 through the motion input unit 508 and used to estimate the background cluster. Further, the distance map obtained by the distance map generation unit 161 can be input to the main subject determination unit 802 through the distance map input unit 509 and used for main subject determination processing.

(主被写体判別処理)
図9は、画像処理部152が実施する主被写体判別処理のフローチャートである。
S901において画像入力部501は、撮影時刻が異なる2フレームの入力画像を取得する。
(動きベクトル検出)
S902において、動きベクトル検出部502は、画像入力部501が取得した2フレームの入力画像間で複数の動きベクトルを検出する。動きベクトル検出部502は、2フレームの画像のうち、先に撮影された1フレームの画像(フレームt-1とする)を水平および垂直方向にそれぞれ複数分割して複数の部分画像を生成する。そして、動きベクトル検出部502は、各部分画像をテンプレート、後に撮影された1フレームの画像(フレームtとする)を参照画像としたテンプレートマッチングを実施し、部分画像と類似度が最も高い領域を参照画像内で探索する。そして、動きベクトル検出部502は、部分画像の中心点の座標を始点とし、探索により見つかった、部分画像と類似度が最も高い領域の中心点の座標を終点とするベクトルを、部分画像についての動きベクトルとする。このようにして、動きベクトル検出部502は、第1実施形態と同様にしてフレームt-1の部分画像ごとに動きベクトルを検出する。そして、動きベクトル検出部502は、検出した動きベクトルviと、動きベクトルviの終点eiとを関連づけてRAM154に保存する。
(Main subject discrimination processing)
FIG. 9 is a flowchart of main subject determination processing performed by the image processing unit 152 .
In S901, the image input unit 501 acquires two frames of input images captured at different times.
(Motion vector detection)
In S<b>902 , the motion vector detection unit 502 detects a plurality of motion vectors between the two frames of input images acquired by the image input unit 501 . The motion vector detection unit 502 generates a plurality of partial images by horizontally and vertically dividing the first frame image (frame t-1) of the two frame images. Then, the motion vector detection unit 502 performs template matching using each partial image as a template and an image of one frame captured later (assumed to be frame t) as a reference image. Explore in the reference image. Then, the motion vector detection unit 502 creates a vector whose starting point is the coordinates of the central point of the partial image and whose ending point is the coordinates of the central point of the area found by the search that has the highest degree of similarity to the partial image. be a motion vector. In this manner, the motion vector detection unit 502 detects a motion vector for each partial image of frame t-1 in the same manner as in the first embodiment. Then, the motion vector detection unit 502 associates the detected motion vector vi with the end point ei of the motion vector vi and stores them in the RAM 154 .

(クラスタリング)
S903からS906までは、クラスタリング部503よる、動きベクトルのクラスタリング処理に関する。
S903においてクラスタリング部503は、S902において検出された動きベクトル群viをクラスタリングする。クラスタリングは第1実施形態と同様にK-Means法や、Affinity Propagationなど、公知の任意のクラスタリング手法を用いることができる。
(Clustering)
S 903 to S 906 relate to clustering processing of motion vectors by the clustering unit 503 .
In S903, the clustering unit 503 clusters the motion vector group vi detected in S902. As in the first embodiment, any known clustering method such as the K-Means method or Affinity Propagation can be used for clustering.

現フレームの画像と、現フレームと前フレームとの間で検出された動きベクトルとを模式的に図10(a)に示す。そして、この動きベクトルを、クラスタ数を自動決定可能なクラスタリング手法であるAffinity Propagationを用いたクラスタリング結果の例を図10(c)に示す。K-Means法のようなクラスタ数を自動決定出来ないクラスタリング手法を用いる場合には何らかの方法でクラスタ数を決定してからクラスタリングを実行する。 FIG. 10A schematically shows an image of the current frame and motion vectors detected between the current frame and the previous frame. FIG. 10(c) shows an example of clustering results using Affinity Propagation, which is a clustering method capable of automatically determining the number of clusters, for these motion vectors. When using a clustering method such as the K-Means method that cannot automatically determine the number of clusters, clustering is performed after determining the number of clusters by some method.

(背景クラスタの選択)
S904において、クラスタリング部503は、S903におけるクラスタリングによって得られたクラスタ(図10(c))のうち、背景領域のベクトルから成る背景クラスタを選択する(図10(d))。背景クラスタの選択は、第1実施形態で図5や図6を用いて説明した方法で行うことができる。
(select background cluster)
In S904, the clustering unit 503 selects a background cluster composed of vectors of background regions (FIG. 10(d)) among the clusters obtained by the clustering in S903 (FIG. 10(c)). Background clusters can be selected by the method described with reference to FIGS. 5 and 6 in the first embodiment.

(主被写体クラスタの選択)
図9に戻り、S905においてクラスタリング部503は、S903で得られたクラスタのうち、主被写体領域のベクトルから構成される主被写体クラスタを選択する。主被写体領域は前フレーム以前で、主被写体判別部802によって判別されている。そして、被写体追尾部801は、例えば直近に判別された主被写体領域をテンプレートとしたテンプレートマッチングにより、画像入力部501が取得する現フレームの画像内で主被写体領域を探索する。
(Selection of main subject cluster)
Returning to FIG. 9, in S905, the clustering unit 503 selects a main subject cluster composed of vectors of the main subject area from among the clusters obtained in S903. The main subject area is before the previous frame and has been determined by the main subject determination unit 802 . Then, the subject tracking unit 801 searches for the main subject area in the image of the current frame acquired by the image input unit 501, for example, by template matching using the most recently determined main subject area as a template.

被写体追尾部801は具体的には現フレームの画像の部分領域と主被写体領域(テンプレート)との類似度を、部分領域の位置を変えながら順次算出することにより、テンプレートと最も類似度が高い領域を現フレームの画像内で探索する。類似度は例えば相関量であってよい。そして、被写体追尾部801は、最も類似度が高い部分領域の類似度が予め定められた閾値を超える場合に、その部分領域がテンプレートと同じ画像(すなわち、現フレームの画像における主被写体領域)であると判定する。 Specifically, the subject tracking unit 801 sequentially calculates the degree of similarity between the partial area of the current frame image and the main subject area (template) while changing the position of the partial area, thereby finding the area with the highest similarity to the template. is searched in the image of the current frame. The degree of similarity may be, for example, the amount of correlation. Then, when the similarity of the partial region with the highest similarity exceeds a predetermined threshold, the subject tracking unit 801 detects the partial region in the same image as the template (that is, the main subject region in the image of the current frame). Determine that there is.

図10(b)に、被写体追尾部801によって主被写体領域と判定された領域501を示す。クラスタリング部503は、被写体追尾部801から主被写体領域の情報を取得し、主被写体領域内に終点eiが含まれる動きベクトルを主被写体クラスタに割り当てる(図10(d))。なお、被写体追尾部801による被写体追尾結果が得られない場合、クラスタリング部503は例えばユーザが指定した画像領域を主被写体領域として用いてもよい。 FIG. 10B shows an area 501 determined to be the main subject area by the subject tracking unit 801 . The clustering unit 503 acquires information on the main subject area from the subject tracking unit 801, and assigns a motion vector including the end point ei in the main subject area to the main subject cluster (FIG. 10(d)). If the subject tracking unit 801 cannot obtain the subject tracking result, the clustering unit 503 may use, for example, an image area specified by the user as the main subject area.

(主被写体候補クラスタの選択)
S906において、クラスタリング部503は、S903で得られたクラスタのうち、新たな主被写体領域の候補を示す動きベクトルから構成される主被写体候補クラスタを選択する。まずクラスタリング部503は、S905で選択した背景クラスタに属する動きベクトルから、背景の動きを表す背景ベクトルbを算出する。ここでは、第1実施形態の背景クラスタ選択部504がS206で行う処理と同様に、背景クラスタに属する動きベクトルの平均ベクトルを背景ベクトルbとして算出するものとする(図10(d))が、これに限定されない。
(Selection of main subject candidate cluster)
In S906, the clustering unit 503 selects, from among the clusters obtained in S903, main subject candidate clusters composed of motion vectors indicating new main subject area candidates. First, the clustering unit 503 calculates a background vector b representing the motion of the background from the motion vectors belonging to the background cluster selected in S905. Here, as in the process performed in S206 by the background cluster selection unit 504 of the first embodiment, the average vector of the motion vectors belonging to the background cluster is calculated as the background vector b (FIG. 10(d)). It is not limited to this.

そして、クラスタリング部503は、動きベクトル検出部502が検出した全ての動きベクトルについて、背景ベクトルbとのユークリッド距離を算出する。そして、クラスタリング部503は、算出したユークリッド距離が最大となる動きベクトルを選択する。この処理は、第1実施形態の動体選択部506がS207で行う処理と同様である。具体的には、クラスタリング部503は式(2)および(3)に従って動きベクトルのインデックスmを決定する。なお、ユークリッド距離が最大となる動きベクトルが複数検出されている場合、インデックスmも複数決定される。なお、distm(すなわち、背景ベクトルbと動きベクトルviとの最大のユークリッド距離)が所定の閾値未満である場合、クラスタリング部503は主被写体候補クラスタに割り当てる動きベクトルが存在しないと判定する。一方、distmが閾値以上であれば、クラスタリング部503は、動きベクトルvmを主被写体候補クラスタに割り当てる(図10(d))。 The clustering unit 503 then calculates the Euclidean distance between all motion vectors detected by the motion vector detection unit 502 and the background vector b. Then, the clustering unit 503 selects the motion vector that maximizes the calculated Euclidean distance. This process is the same as the process performed in S207 by the moving object selection unit 506 of the first embodiment. Specifically, the clustering unit 503 determines the motion vector index m according to equations (2) and (3). When a plurality of motion vectors with the maximum Euclidean distance are detected, a plurality of indices m are also determined. Note that when dist m (that is, the maximum Euclidean distance between the background vector b and the motion vector v i ) is less than a predetermined threshold, the clustering unit 503 determines that there is no motion vector to be assigned to the main subject candidate cluster. On the other hand, if dist m is equal to or greater than the threshold, the clustering unit 503 assigns the motion vector v m to the main subject candidate cluster (FIG. 10(d)).

(主被写体判別)
S907において主被写体判別部802は、背景、主被写体、および主被写体候補の3つのクラスタに属する動きベクトルに基づいて、主被写体を判別する。図11は、S907における主被写体判別処理の詳細に関するフローチャートである。
(Main subject discrimination)
In S907, the main subject determination unit 802 determines the main subject based on the motion vectors belonging to the three clusters of background, main subject, and main subject candidate. FIG. 11 is a flowchart regarding details of the main subject determination processing in S907.

S1101で主被写体判別部802は、主被写体クラスタに属する動きベクトルの代表ベクトル(例えば平均ベクトル)と、背景クラスタに属する動きベクトルの代表ベクトル(例えば背景ベクトルb)とのユークリッド距離を算出する。そして、主被写体判別部802は、算出したユークリッド距離が所定の閾値未満であるか否かを判定し、閾値未満(距離が小さい)と判定されればS1102へ、閾値未満と判定されなければS1104へ処理を進める。ここで、距離が閾値未満であることは、実空間での主被写体の動きが小さい状態を示す。なお、主被写体判別部802は、主被写体クラスタに属する動きベクトルが存在しない場合にはS1102へ、背景クラスタに属する動きベクトルが存在しない場合にはS1104へ、処理を進める。 In S1101, the main subject determination unit 802 calculates the Euclidean distance between the representative vector of motion vectors belonging to the main subject cluster (eg, average vector) and the representative vector of motion vectors belonging to the background cluster (eg, background vector b). Then, the main subject determination unit 802 determines whether or not the calculated Euclidean distance is less than a predetermined threshold. Proceed to. Here, the fact that the distance is less than the threshold indicates that the movement of the main subject in the real space is small. Note that the main subject determination unit 802 advances the process to S1102 if there is no motion vector belonging to the main subject cluster, and to S1104 if there is no motion vector belonging to the background cluster.

S1102で主被写体判別部802は、主被写体候補クラスタに所定の条件を満たす動きベクトルが存在するか否か判定し、存在すると判定されればS1103へ、判定されなければS1104へ処理を進める。なお、本実施形態では主被写体候補クラスタを構成する動きベクトルは1種類であるため、主被写体判別部802は、主被写体候補クラスタに属する動きベクトルが所定の条件を満たすか否かを判定してもよい。 In S1102, the main subject determination unit 802 determines whether or not a motion vector satisfying a predetermined condition exists in the main subject candidate cluster. In this embodiment, since only one type of motion vector constitutes a main subject candidate cluster, the main subject determination unit 802 determines whether a motion vector belonging to a main subject candidate cluster satisfies a predetermined condition. good too.

S1103で主被写体判別部802は、主被写体候補クラスタに属する動きベクトル(ここでは動きベクトルvm)を検出した現フレーム画像内の部分領域を、新たな主被写体領域と判別する。すなわち、主被写体判別部802は、主被写体を変更することを決定する。なお、主被写体候補クラスタに属する動きベクトルを検出した現フレーム画像内の部分領域が複数存在する場合、主被写体判別部802は、他の1つ以上の部分領域と隣接する部分領域群を主被写体領域と判別してもよい。 In S1103, the main subject discriminating unit 802 discriminates, as a new main subject area, the partial area in the current frame image in which the motion vector (here, motion vector v m ) belonging to the main subject candidate cluster is detected. That is, the main subject determination unit 802 determines to change the main subject. Note that if there are a plurality of partial areas in the current frame image for which motion vectors belonging to main subject candidate clusters have been detected, the main subject determination unit 802 selects a group of partial areas adjacent to one or more other partial areas as the main subject. You may discriminate|determine with an area|region.

ここで、S1102における所定の条件は、ユーザの意図する主被写体が、現在の主被写体よりも、主被写体候補クラスタに属する動きベクトルに対応する別の被写体である可能性が高いか否かを判定するための条件である。そして、所定の条件が満たされると判定される場合、主被写体判別部802は、ユーザの意図する主被写体が主被写体候補クラスタに属する動きベクトルに対応する別の被写体であると推定し、主被写体を変更する。そして、主被写体判別部802は、新たな主被写体領域の情報を被写体追尾部801に通知する。通知に応じて被写体追尾部801は、追尾処理に用いるテンプレートを、新たな主被写体領域に基づくテンプレートに更新する。 Here, the predetermined condition in S1102 is to determine whether or not the main subject intended by the user is more likely to be another subject corresponding to the motion vector belonging to the main subject candidate cluster than the current main subject. It is a condition for Then, when it is determined that the predetermined condition is satisfied, the main subject determination unit 802 estimates that the main subject intended by the user is another subject corresponding to the motion vector belonging to the main subject candidate cluster, to change Then, the main subject determination unit 802 notifies the subject tracking unit 801 of information on the new main subject area. In response to the notification, the subject tracking unit 801 updates the template used for tracking processing to a template based on the new main subject area.

例えば、被写体を画面の中央に配置するためにデジタルカメラ100をフレーミングしている場合、その被写体はユーザが意図した主被写体である可能性が高い。主被写体候補クラスタに属する動きベクトルが画像中心に近づく方向の動きベクトルであることを所定の条件とすることで、別の被写体に対してこのようなカメラ操作が行われている場合に、主被写体領域を変更することができる。その結果、ユーザが意図した主被写体を確率よく判別することができる。 For example, when framing the digital camera 100 to place the subject in the center of the screen, the subject is likely to be the main subject intended by the user. By setting a predetermined condition that a motion vector belonging to a main subject candidate cluster is a motion vector in a direction approaching the center of the image, when such a camera operation is performed on another subject, the main subject You can change the area. As a result, the main subject intended by the user can be determined with high probability.

また、デジタルカメラ100に近づいている被写体は主被写体である可能性が高い。そのため、主被写体候補クラスタに属する動きベクトルが、デジタルカメラ100に近づく方向の動きベクトルであることを所定の条件とすることで、別の被写体がデジタルカメラ100に近づいている場合に、主被写体領域を変更することができる。この場合も、ユーザが意図した主被写体を確率よく判別することができる。 Also, there is a high possibility that the subject approaching the digital camera 100 is the main subject. Therefore, by making it a predetermined condition that a motion vector belonging to a main subject candidate cluster is a motion vector in a direction approaching the digital camera 100, when another subject is approaching the digital camera 100, the main subject region can be changed. Also in this case, the main subject intended by the user can be discriminated with good probability.

なお、動きベクトルがカメラに近づく方向の動きベクトルであるか否かは、距離マップ入力部509が取得する距離マップを用いて判定することができる。デジタルカメラ100に近づく方向の動きベクトルは、別の被写体の距離が小さくなる方向の動きベクトルである。主被写体候補クラスタに属する動きベクトルの始点より終点の距離が小さい動きベクトルは、デジタルカメラ100に近づく方向の動きベクトルであると判定できる。 It should be noted that whether or not the motion vector is in the direction of approaching the camera can be determined using the distance map acquired by the distance map input unit 509 . A motion vector in the direction of approaching the digital camera 100 is a motion vector in a direction in which the distance of another subject becomes smaller. A motion vector belonging to the main subject candidate cluster whose end point is closer to the start point can be determined to be a motion vector in the direction of approaching the digital camera 100 .

なお、ここで説明した所定の条件は単なる例示であり、主被写体候補クラスタに属する動きベクトルに対応する被写体が、ユーザの意図する主被写体である可能性が高いと判定するための他の任意の条件を定めることができる。また、所定の条件は複数存在してもよい。この場合、複数の条件の1つでも満たすと判定されれば主被写体領域を変更するようにしたり、複数の条件を全て満たすと判定されれば主被写体領域を変更するようにしたりすることができる。 Note that the predetermined condition described here is merely an example, and any other condition for determining that the subject corresponding to the motion vector belonging to the main subject candidate cluster is likely to be the main subject intended by the user. You can set the conditions. Also, a plurality of predetermined conditions may exist. In this case, it is possible to change the main subject area if it is determined that even one of a plurality of conditions is satisfied, or to change the main subject area if it is determined that all of the plurality of conditions are satisfied. .

S1104で主被写体判別部802は、主被写体領域を維持する(変更しない)ことを決定する。例えば、主被写体クラスタに属する動きベクトルの代表ベクトルと、背景クラスタに属する動きベクトルの代表ベクトルとのユークリッド距離が閾値以上の場合には、主被写体が有意に移動していると考えられる。この場合には現在の主被写体を変更しない。また、移動している被写体が検出されない場合には、上述したdistmが閾値未満となり、主被写体候補クラスタに割り当てられる動きベクトルが存在しないため、現在の主被写体領域が維持される。 In S1104, the main subject determination unit 802 determines to maintain (not change) the main subject area. For example, when the Euclidean distance between the representative vector of the motion vectors belonging to the main subject cluster and the representative vector of the motion vectors belonging to the background cluster is equal to or greater than a threshold, it is considered that the main subject is moving significantly. In this case, the current main subject is not changed. Further, when a moving subject is not detected, the dist m described above is less than the threshold, and there is no motion vector assigned to the main subject candidate cluster, so the current main subject area is maintained.

以上説明したように、本実施形態では、フレーム間で検出した動きベクトルに基づいて主被写体を判別する際、現在の主被写体と別の被写体の動きベクトルを考慮するようにした。そして、別の被写体の動きベクトルから、例えばユーザが意図する主被写体が、現在の主被写体ではなく別の被写体であると想定される場合には、主被写体を変更するようにした。そのため、ユーザの意図にあった主被写体を判別できる可能性を高めることができる。 As described above, in this embodiment, when the main subject is determined based on the motion vector detected between frames, the motion vector of the current main subject and another subject is taken into consideration. Then, for example, when it is assumed that the main subject intended by the user is not the current main subject but another subject from the motion vector of another subject, the main subject is changed. Therefore, it is possible to increase the possibility of determining the main subject that matches the user's intention.

なお、本実施形態では、主被写体候補クラスタを、背景ベクトルbとのユークリッド距離が最大の動きベクトルのみから構成されるクラスタとした。しかし、他の方法で主被写体候補クラスタを規定してもよい。例えば、主被写体候補クラスタを、背景ベクトルbとのユークリッド距離が最大の動きベクトルを含む、背景ベクトルbとのユークリッド距離が最大の動きベクトルと大きさおよび方向の差が閾値未満である動きベクトルから構成されるクラスタとしてもよい。 In this embodiment, the main subject candidate cluster is a cluster composed only of motion vectors having the maximum Euclidean distance from the background vector b. However, other methods may be used to define the main subject candidate clusters. For example, main subject candidate clusters are selected from motion vectors having the largest Euclidean distance from the background vector b and the difference in magnitude and direction from the motion vector having the largest Euclidean distance from the background vector b. It may be a configured cluster.

また、S1101では、主被写体クラスタに属する動きベクトルの代表ベクトルと、背景クラスタに属する動きベクトルの代表ベクトルとのユークリッド距離が閾値未満の場合には処理をS1102に進めていた。しかし、ユークリッド距離が閾値未満の場合でも、距離マップに基づいて主被写体が近付いていると判定される場合には処理をS1102に進めずにS1104に進めてもよい。 Also, in S1101, if the Euclidean distance between the representative vector of the motion vectors belonging to the main subject cluster and the representative vector of the motion vectors belonging to the background cluster is less than the threshold, the process proceeds to S1102. However, even if the Euclidean distance is less than the threshold, if it is determined that the main subject is approaching based on the distance map, the process may proceed to S1104 without proceeding to S1102.

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

また、上述の実施形態は本発明の理解を助けることを目的とした具体例に過ぎず、いかなる意味においても本発明を上述の実施形態に限定する意図はない。特許請求の範囲に規定される範囲に含まれる全ての実施形態は本発明に包含される。 Moreover, the above-described embodiments are merely specific examples for the purpose of helping understanding of the present invention, and are not intended to limit the present invention to the above-described embodiments in any sense. All embodiments falling within the scope defined by the claims are included in the present invention.

100…撮像装置、101…レンズユニット、141…撮像素子、142…撮像信号処理部、143…撮像制御部、151…主制御部、152…画像処理部、154…RAM、155…ROM、161…距離マップ生成部、162…動き検出部 DESCRIPTION OF SYMBOLS 100... Imaging apparatus 101... Lens unit 141... Imaging element 142... Imaging signal processing part 143... Imaging control part 151... Main control part 152... Image processing part 154... RAM 155... ROM 161... distance map generator, 162 motion detector

Claims (19)

画像処理装置であって、
複数の画像間の複数の動きベクトルを検出する動きベクトル検出手段と、
前記動きベクトルに基づいて、背景の動きを表す背景ベクトルを算出する算出手段と、
前記複数の動きベクトルのそれぞれと前記背景ベクトルとのユークリッド距離の大きさに基づいて、前記複数の動きベクトルから動体の動きベクトルを検出する動体検出手段と、
前記複数の動きベクトルをクラスタリングしてクラスタを生成するクラスタリング手段と、
前記クラスタリング手段が生成したクラスタから、背景クラスタを選択する選択手段と、
前記画像処理装置の動きを検出する動き検出手段と、を有し、
前記算出手段は、前記背景クラスタを構成する動きベクトルから前記背景ベクトルを算出し、
前記選択手段は、前記動き検出手段が検出した前記画像処理装置の動きから背景の動き方向を推定し、前記背景の動き方向を用いて、前記クラスタリング手段が生成したクラスタから前記背景クラスタを選択する、
ことを特徴とする画像処理装置。
An image processing device,
motion vector detection means for detecting a plurality of motion vectors between a plurality of images;
calculation means for calculating a background vector representing the motion of the background based on the motion vector;
moving object detection means for detecting a motion vector of a moving object from the plurality of motion vectors based on the Euclidean distance between each of the plurality of motion vectors and the background vector;
clustering means for clustering the plurality of motion vectors to generate clusters;
a selection means for selecting a background cluster from the clusters generated by the clustering means;
and motion detection means for detecting motion of the image processing device,
The calculation means calculates the background vector from motion vectors forming the background cluster ,
The selecting means estimates the direction of motion of the background from the motion of the image processing device detected by the motion detecting means, and selects the background cluster from the clusters generated by the clustering means using the direction of motion of the background. ,
An image processing apparatus characterized by:
画像処理装置であって、
前記画像処理装置の動きを検出する動き検出手段と、
複数の画像間の複数の動きベクトルを検出する動きベクトル検出手段と、
前記複数の画像を撮影した撮影光学系の焦点距離および撮像素子の情報を取得する取得手段と、
前記画像処理装置の動きと、前記焦点距離と、前記撮像素子の情報と、前記複数の画像の撮影間隔とから、背景の動きを表す背景ベクトルを算出する算出手段と、
前記複数の動きベクトルのそれぞれと前記背景ベクトルとのユークリッド距離の大きさに基づいて、前記複数の動きベクトルから動体の動きベクトルを検出する動体検出手段と、
を有することを特徴とする画像処理装置。
An image processing device,
motion detection means for detecting motion of the image processing device;
motion vector detection means for detecting a plurality of motion vectors between a plurality of images;
Acquisition means for acquiring information about the focal length of the imaging optical system and the imaging device that captured the plurality of images;
a calculation means for calculating a background vector representing the movement of the background from the movement of the image processing device, the focal length, the information of the image sensor, and the photographing intervals of the plurality of images;
moving object detection means for detecting a motion vector of a moving object from the plurality of motion vectors based on the Euclidean distance between each of the plurality of motion vectors and the background vector;
An image processing device comprising :
前記動きベクトルの終点座標における画像の顕著度を算出する顕著度算出手段をさらに有し、
前記動体検出手段は、前記複数の動きベクトルのうち、終点座標における画像の顕著度が閾値以上である動きベクトルから前記動体の動きベクトルを検出することを特徴とする請求項1または2に記載の画像処理装置。
further comprising saliency calculation means for calculating the salience of the image at the end point coordinates of the motion vector;
3. The moving object detection means according to claim 1, wherein said moving object detection means detects the motion vector of said moving object from among said plurality of motion vectors, the motion vectors whose saliency of the image at the coordinates of the end point is equal to or greater than a threshold. Image processing device.
画素位置における被写体距離を検出する距離検出手段をさらに有し、
前記動体検出手段は、前記複数の動きベクトルのうち、終点座標の画素位置における被写体距離が閾値未満である動きベクトルから前記動体の動きベクトルを検出する、
ことを特徴とする請求項1または2に記載の画像処理装置。
further comprising distance detection means for detecting a subject distance at a pixel position;
The moving object detection means detects the motion vector of the moving object from among the plurality of motion vectors, the motion vector of which the subject distance at the pixel position of the end point coordinates is less than a threshold.
3. The image processing apparatus according to claim 1, wherein:
画素位置における被写体距離を検出する距離検出手段をさらに有し、
前記動体検出手段は、前記複数の動きベクトルのうち、前記ユークリッド距離が閾値以上である動きベクトルであり、かつ終点座標の画素位置における被写体距離が最小である動きベクトルを前記動体の動きベクトルとして検出する、
ことを特徴とする請求項1または2に記載の画像処理装置。
further comprising distance detection means for detecting a subject distance at a pixel position;
The moving object detection means detects, from among the plurality of motion vectors, a motion vector having the Euclidean distance equal to or greater than a threshold and having a minimum object distance at a pixel position of end point coordinates as the motion vector of the moving object. do,
3. The image processing apparatus according to claim 1, wherein:
請求項1から5のいずれか1項に記載の画像処理装置と、
前記複数の画像を撮影する撮像素子と、
前記画像処理装置が検出した動体の動きベクトルに基づいて焦点検出および/または露出制御を行う制御手段と、
を有することを特徴とする撮像装置。
An image processing device according to any one of claims 1 to 5;
an imaging device that captures the plurality of images;
a control means for performing focus detection and/or exposure control based on the motion vector of the moving object detected by the image processing device;
An imaging device characterized by comprising:
画像処理装置の制御方法であって、
複数の画像間の複数の動きベクトルを検出することと、
前記複数の動きベクトルに基づいて、背景の動きを表す背景ベクトルを算出することと、
前記複数の動きベクトルのそれぞれと前記背景ベクトルとのユークリッド距離の大きさに基づいて、前記複数の動きベクトルから動体の動きベクトルを検出することと、
前記複数の動きベクトルをクラスタリングしてクラスタを生成することと、
前記クラスタから、背景クラスタを選択することと、
前記画像処理装置の動きを検出することと、を有し、
前記算出することは、前記背景クラスタを構成する動きベクトルから前記背景ベクトルを算出することを含み
前記選択することは、
前記画像処理装置の動きから背景の動き方向を推定することと、
前記背景の動き方向を用いて、前記クラスタから前記背景クラスタを選択することを含む、
ことを特徴とする画像処理装置の制御方法。
A control method for an image processing device,
detecting multiple motion vectors between multiple images;
calculating a background vector representing the motion of the background based on the plurality of motion vectors;
Detecting a motion vector of a moving object from the plurality of motion vectors based on the magnitude of the Euclidean distance between each of the plurality of motion vectors and the background vector;
clustering the plurality of motion vectors to generate clusters;
selecting a background cluster from the clusters;
detecting motion of the image processing device;
the calculating includes calculating the background vector from motion vectors that make up the background cluster;
Said selecting is
estimating the motion direction of the background from the motion of the image processing device;
selecting the background cluster from the clusters using the background motion direction;
A control method for an image processing apparatus, characterized by:
画像処理装置の制御方法であって、
前記画像処理装置の動きを検出することと、
複数の画像間の複数の動きベクトルを検出することと、
前記複数の画像を撮影した撮影光学系の焦点距離および撮像素子の情報を取得することと、
前記画像処理装置の動きと、前記焦点距離と、前記撮像素子の情報と、前記複数の画像の撮影間隔とから、背景の動きを表す背景ベクトルを算出することと、
前記複数の動きベクトルのそれぞれと前記背景ベクトルとのユークリッド距離の大きさに基づいて、前記複数の動きベクトルから動体の動きベクトルを検出することと、
を有することを特徴とする画像処理装置の制御方法。
A control method for an image processing device,
detecting motion of the image processing device;
detecting multiple motion vectors between multiple images;
Acquiring information about the focal length of the imaging optical system and the imaging device that captured the plurality of images;
calculating a background vector representing the movement of the background from the movement of the image processing device, the focal length, the information of the imaging element, and the photographing intervals of the plurality of images;
Detecting a motion vector of a moving object from the plurality of motion vectors based on the magnitude of the Euclidean distance between each of the plurality of motion vectors and the background vector;
A control method for an image processing device, comprising :
コンピュータを、請求項1から5のいずれか1項に記載の画像処理装置が有する各手段として機能させるためのプログラム。 A program for causing a computer to function as each unit included in the image processing apparatus according to any one of claims 1 to 5. 複数の画像間の複数の動きベクトルを検出するベクトル検出手段と、
前記複数の動きベクトルに基づいて、主被写体の領域を判別する判別手段と、を有し、
前記判別手段は、
前記複数の動きベクトルのうち、現在の主被写体とは別の被写体に関する動きベクトルを検出し、
前記複数の動きベクトルのうち、背景に関する動きベクトルを代表する背景ベクトルを算出し、
前記複数の動きベクトルのうち、前記背景ベクトルとのユークリッド距離の大きさが閾値以上である動きベクトルを、前記別の被写体に関する動きベクトルとして検出し、
前記別の被写体を新たな主被写体として判別する、
ことを特徴とする画像処理装置。
vector detection means for detecting a plurality of motion vectors between a plurality of images;
determining means for determining an area of the main subject based on the plurality of motion vectors;
The determination means is
Detecting a motion vector related to a subject other than the current main subject from among the plurality of motion vectors;
calculating a background vector representative of the motion vectors relating to the background among the plurality of motion vectors;
Detecting, from among the plurality of motion vectors, a motion vector having a Euclidean distance to the background vector equal to or greater than a threshold value as a motion vector relating to the another subject;
determining the another subject as a new main subject;
An image processing apparatus characterized by:
前記判別手段は、前記複数の動きベクトルのうち、前記現在の主被写体に関する動きベクトルと前記背景ベクトルとのユークリッド距離が閾値以上の場合には、前記現在の主被写体を変更しないことを特徴とする請求項10に記載の画像処理装置。 The discriminating means does not change the current main subject when the Euclidean distance between the motion vector relating to the current main subject and the background vector, among the plurality of motion vectors, is equal to or greater than a threshold. The image processing apparatus according to claim 10. 前記判別手段は、前記複数の動きベクトルのうち、前記現在の主被写体に関する動きベクトルに基づいて、前記現在の主被写体が近づいていると判定される場合には、前記現在の主被写体を変更しないことを特徴とする請求項10または11に記載の画像処理装置。 The determination means does not change the current main subject when it is determined that the current main subject is approaching based on the motion vector relating to the current main subject among the plurality of motion vectors. 12. The image processing apparatus according to claim 10, wherein: 前記複数の動きベクトルをクラスタリングしてクラスタを生成するクラスタリング手段をさらに有し、
前記判別手段は、
前記クラスタリング手段が生成したクラスタのうち、クラスタを構成する動きベクトルの検出位置の分布範囲が最も広いクラスタを背景クラスタとして選択し、
前記背景クラスタを構成する動きベクトルから前記背景ベクトルを算出する、
ことを特徴とする請求項10から12のいずれか1項に記載の画像処理装置。
further comprising clustering means for clustering the plurality of motion vectors to generate clusters;
The determination means is
Selecting, from among the clusters generated by the clustering means, a cluster having the widest distribution range of detection positions of motion vectors constituting the cluster as a background cluster;
calculating the background vector from the motion vectors that make up the background cluster;
13. The image processing apparatus according to any one of claims 10 to 12, characterized by:
前記複数の動きベクトルをクラスタリングしてクラスタを生成するクラスタリング手段をさらに有し、
前記判別手段は、
前記クラスタリング手段が生成したクラスタのうち、クラスタを構成する動きベクトルの始点または終点の座標の分散が最大であるクラスタを背景クラスタとして選択し、
前記背景クラスタを構成する動きベクトルから前記背景ベクトルを算出する、
ことを特徴とする請求項10から12のいずれか1項に記載の画像処理装置。
further comprising clustering means for clustering the plurality of motion vectors to generate clusters;
The determination means is
Selecting, from among the clusters generated by the clustering means, a cluster having the largest variance of the coordinates of the start point or the end point of the motion vectors forming the cluster as a background cluster;
calculating the background vector from the motion vectors that make up the background cluster;
13. The image processing apparatus according to any one of claims 10 to 12, characterized by:
前記複数の動きベクトルをクラスタリングしてクラスタを生成するクラスタリング手段と、
前記画像処理装置の動きを検出する動き検出手段と、をさらに有し、
前記判別手段は、
前記動き検出手段が検出した前記画像処理装置の動きから背景の動き方向を推定し、
前記背景の動き方向を用いて、前記クラスタリング手段が生成したクラスタから背景クラスタを選択し、
前記背景クラスタを構成する動きベクトルから前記背景ベクトルを算出する、
ことを特徴とする請求項10から12のいずれか1項に記載の画像処理装置。
clustering means for clustering the plurality of motion vectors to generate clusters;
and motion detection means for detecting motion of the image processing device,
The determination means is
estimating the motion direction of the background from the motion of the image processing device detected by the motion detection means;
selecting a background cluster from the clusters generated by the clustering means using the motion direction of the background;
calculating the background vector from the motion vectors that make up the background cluster;
13. The image processing apparatus according to any one of claims 10 to 12, characterized by:
前記判別手段は、前記クラスタリング手段が生成したクラスタのうち、代表ベクトルが前記背景の動き方向となす角度が最小であるクラスタを前記背景クラスタとして選択することを特徴とする請求項15に記載の画像処理装置。 16. The image according to claim 15, wherein said determining means selects, from among the clusters generated by said clustering means, a cluster having a minimum angle between a representative vector and a moving direction of said background as said background cluster. processing equipment. 請求項10から16のいずれか1項に記載の画像処理装置と、
前記複数の画像を撮影する撮像素子と、
前記画像処理装置が検出した動体の動きベクトルに基づいて焦点検出および/または露出制御を行う制御手段と、
を有することを特徴とする撮像装置。
an image processing device according to any one of claims 10 to 16;
an imaging device that captures the plurality of images;
a control means for performing focus detection and/or exposure control based on the motion vector of the moving object detected by the image processing device;
An imaging device characterized by comprising:
複数の画像間の複数の動きベクトルを検出することと、
前記複数の動きベクトルに基づいて、主被写体の領域を判別することと、を有し、
前記判別することは、
前記複数の動きベクトルのうち、現在の主被写体とは別の被写体に関する動きベクトルを検出することと、
前記複数の動きベクトルのうち、背景に関する動きベクトルを代表する背景ベクトルを算出することと、
前記複数の動きベクトルのうち、前記背景ベクトルとのユークリッド距離の大きさが閾値以上である動きベクトルを、前記別の被写体に関する動きベクトルとして検出し、前記別の被写体を新たな主被写体として判別することと、を含む
ことを特徴とする画像処理装置の制御方法。
detecting multiple motion vectors between multiple images;
determining a region of a main subject based on the plurality of motion vectors;
The determining is
Detecting a motion vector related to a subject other than the current main subject among the plurality of motion vectors;
Calculating a background vector representing a motion vector related to the background among the plurality of motion vectors;
Among the plurality of motion vectors, a motion vector having a magnitude of Euclidean distance to the background vector equal to or greater than a threshold is detected as a motion vector related to the another subject, and the another subject is determined as a new main subject. A control method for an image processing device, comprising:
コンピュータを、請求項10から16のいずれか1項に記載の画像処理装置が有する各手段として機能させるためのプログラム。 A program for causing a computer to function as each unit included in the image processing apparatus according to any one of claims 10 to 16.
JP2019119017A 2018-07-27 2019-06-26 IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS Active JP7324066B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/519,742 US11070729B2 (en) 2018-07-27 2019-07-23 Image processing apparatus capable of detecting moving objects, control method thereof, and image capture apparatus

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2018141635 2018-07-27
JP2018141635 2018-07-27
JP2018228321 2018-12-05
JP2018228321 2018-12-05

Publications (3)

Publication Number Publication Date
JP2020095673A JP2020095673A (en) 2020-06-18
JP2020095673A5 JP2020095673A5 (en) 2022-07-04
JP7324066B2 true JP7324066B2 (en) 2023-08-09

Family

ID=71084987

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019119017A Active JP7324066B2 (en) 2018-07-27 2019-06-26 IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS

Country Status (1)

Country Link
JP (1) JP7324066B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7766406B2 (en) 2021-03-12 2025-11-10 キヤノン株式会社 Image processing device and image processing method
JP7739059B2 (en) * 2021-06-10 2025-09-16 キヤノン株式会社 Information processing device, information processing method, and program
CN115914612A (en) * 2021-08-23 2023-04-04 北京字跳网络技术有限公司 Method, device, equipment and medium for determining video fluency
JP7844159B2 (en) * 2021-12-24 2026-04-13 キヤノン株式会社 Image processing apparatus and image processing method, and imaging apparatus
CN118261884B (en) * 2024-04-09 2024-11-22 吉林省送变电工程有限公司 Wind turbine tower hoisting screw loosening detection method based on feature difference distance threshold

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010258710A (en) 2009-04-23 2010-11-11 Canon Inc Motion vector detection device, control method therefor, and imaging device
JP2012160780A (en) 2011-01-28 2012-08-23 Nikon Corp Imaging device, image processing device, and image processing program
JP2015161730A (en) 2014-02-26 2015-09-07 キヤノン株式会社 Image shake correction apparatus, control method therefor, optical apparatus, and imaging apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010258710A (en) 2009-04-23 2010-11-11 Canon Inc Motion vector detection device, control method therefor, and imaging device
JP2012160780A (en) 2011-01-28 2012-08-23 Nikon Corp Imaging device, image processing device, and image processing program
JP2015161730A (en) 2014-02-26 2015-09-07 キヤノン株式会社 Image shake correction apparatus, control method therefor, optical apparatus, and imaging apparatus

Also Published As

Publication number Publication date
JP2020095673A (en) 2020-06-18

Similar Documents

Publication Publication Date Title
US11070729B2 (en) Image processing apparatus capable of detecting moving objects, control method thereof, and image capture apparatus
JP7324066B2 (en) IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS
JP4274233B2 (en) Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method
JP7223079B2 (en) IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS
EP3093822B1 (en) Displaying a target object imaged in a moving picture
JP4575829B2 (en) Display screen position analysis device and display screen position analysis program
JP2010114752A (en) Device and method of imaging and program
CN105979135A (en) Image processing apparatus, image processing method
CN113610865A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
JP2023033355A (en) Image processing device and its control method
JP2019175112A (en) Image processing device, photographing device, image processing method, and program
US10880457B2 (en) Image processing apparatus, image capturing apparatus, image processing method, and storage medium
US20230237758A1 (en) Image processing apparatus, control method therefor, image capturing apparatus, and storage medium
JP2008211534A (en) Face detection device
JP7657611B2 (en) Image processing device and control method thereof, imaging device, and program
JP6063680B2 (en) Image generation apparatus, image generation method, imaging apparatus, and imaging method
JP7122916B2 (en) IMAGING DEVICE AND CONTROL METHOD THEREOF, PROGRAM AND STORAGE MEDIUM
JP2022054247A (en) Information processing device and information processing method
JP2017102748A (en) Pupil image learning device, pupil position detection device, and program therefor
JP7642592B2 (en) Focus adjustment device, imaging device, focus adjustment method, and program
JP2025180116A (en) Information processing device, control method and program for information processing device
KR20130000929A (en) Apparatus for detecting a moving object and detecting method thereof
JP2017228873A (en) Image processing apparatus, imaging apparatus, control method, and program
JP2022140058A (en) Image processing apparatus and image processing method
JP2011090488A (en) Object tracking device, object tracking program, and camera

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20210103

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210113

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220624

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220624

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230517

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230526

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230614

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230630

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230728

R151 Written notification of patent or utility model registration

Ref document number: 7324066

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151