JP6465705B2 - Motion vector detection device, moving object angular velocity calculation device, imaging device, and lens device - Google Patents

Motion vector detection device, moving object angular velocity calculation device, imaging device, and lens device Download PDF

Info

Publication number
JP6465705B2
JP6465705B2 JP2015051761A JP2015051761A JP6465705B2 JP 6465705 B2 JP6465705 B2 JP 6465705B2 JP 2015051761 A JP2015051761 A JP 2015051761A JP 2015051761 A JP2015051761 A JP 2015051761A JP 6465705 B2 JP6465705 B2 JP 6465705B2
Authority
JP
Japan
Prior art keywords
angular velocity
motion vector
histogram
imaging device
lens
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.)
Expired - Fee Related
Application number
JP2015051761A
Other languages
Japanese (ja)
Other versions
JP2016171541A (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 JP2015051761A priority Critical patent/JP6465705B2/en
Publication of JP2016171541A publication Critical patent/JP2016171541A/en
Application granted granted Critical
Publication of JP6465705B2 publication Critical patent/JP6465705B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、動きベクトル検出装置、動体角速度算出装置、撮像装置およびレンズ装置に関する。   The present invention relates to a motion vector detection device, a moving object angular velocity calculation device, an imaging device, and a lens device.

特許文献1は、流し撮りにおいて、被写体の移動速度とパンニング速度に差に起因する主被写体のぶれを防止するために、被写体の移動速度とパンニング速度の差を像振れ補正レンズにより補正する方法を提案している。   Patent Document 1 discloses a method of correcting a difference between a moving speed and a panning speed of a subject by an image blur correction lens in order to prevent a main subject from being shaken due to a difference between the moving speed and the panning speed of the subject in panning. is suggesting.

特開2006−317848号公報JP 2006-317848 A

特許文献1の方法を適用するには、主被写体の像面上の移動量を任意のフレーム間の動きベクトルを用いて求めることが必要となる。しかしながら、流し撮りを行う主被写体の領域は画面全体に対して占める割合が小さい場合が多く、その動きベクトルを特定することが困難である。特に、主被写体が近い又は速い場合、即ち、パンニング角速度が速い場合は、この問題は顕著となる。なお、この課題は、カメラを左右に振るパンニングだけでなく、カメラを上下に振るチルティングにも当てはまる。   In order to apply the method of Patent Document 1, it is necessary to obtain the amount of movement of the main subject on the image plane using a motion vector between arbitrary frames. However, the ratio of the main subject area where the panning is performed is often small in the entire screen, and it is difficult to specify the motion vector. In particular, when the main subject is near or fast, that is, when the panning angular velocity is high, this problem becomes significant. This problem applies not only to panning that shakes the camera left and right, but also to tilting that shakes the camera up and down.

そこで、本発明は、主被写体の動きベクトルの検出を容易にすることが可能な動きベクトル検出装置、動体角速度算出装置、撮像装置およびレンズ装置を提供することを例示的な目的とする。   Accordingly, an object of the present invention is to provide a motion vector detection device, a moving object angular velocity calculation device, an imaging device, and a lens device that can easily detect a motion vector of a main subject.

本発明の動きベクトル検出装置は、フレーム画像における複数の領域の動きベクトルの情報に基づいて、該動きベクトルの大きさと度数との関係を示すヒストグラムを作成するヒストグラム作成手段と、前記ヒストグラム作成手段が作成した前記ヒストグラムにおける度数の閾値を設定する設定手段と、前記ヒストグラムにおいて、前記設定手段が設定した閾値以上の度数を有する前記動きベクトルの大きさの情報に基づいて、動体の動きベクトルを検出する検出手段と、を有し、前記設定手段は、前記フレーム画像を得る際の撮像装置が第1角速度で回転されたときの前記閾値よりも、前記撮像装置が前記第1角速度よりも高い第2角速度で回転されたときの前記閾値を低く設定することを特徴とする。   The motion vector detection device of the present invention is based on information on motion vectors of a plurality of regions in a frame image, a histogram creation means for creating a histogram showing the relationship between the magnitude of the motion vector and the frequency, and the histogram creation means Setting means for setting a frequency threshold in the created histogram, and detecting a motion vector of the moving object based on information on the magnitude of the motion vector having a frequency equal to or higher than the threshold set by the setting means in the histogram Detecting means, and the setting means has a second value that is higher than the first angular velocity than the threshold when the imaging device is rotated at the first angular velocity when obtaining the frame image. The threshold value when rotating at an angular velocity is set low.

本発明によれば、主被写体の動きベクトルの検出を容易にすることが可能な動きベクトル検出装置、動体角速度算出装置、撮像装置およびレンズ装置を提供することができる。   According to the present invention, it is possible to provide a motion vector detection device, a moving object angular velocity calculation device, an imaging device, and a lens device that can easily detect a motion vector of a main subject.

本発明の実施形態に係る撮像装置の全体構成図である。(実施例1、2)1 is an overall configuration diagram of an imaging apparatus according to an embodiment of the present invention. (Examples 1 and 2) 図1に示す撮像装置が実行する流し撮りアシスト制御を説明するフローチャートである。(実施例1、2)It is a flowchart explaining the panning assist control which the imaging device shown in FIG. 1 performs. (Examples 1 and 2) 図2に示すS203の主被写体角速度の算出方法を説明するための図である。(実施例1、2)It is a figure for demonstrating the calculation method of the main object angular velocity of S203 shown in FIG. (Examples 1 and 2) 図2に示すS203の詳細を説明するフローチャートである。(実施例1)It is a flowchart explaining the detail of S203 shown in FIG. (Example 1) 図1に示す動きベクトル検出部におけるベクトル検出領域の例を示す図である。(実施例1、2)It is a figure which shows the example of the vector detection area | region in the motion vector detection part shown in FIG. (Examples 1 and 2) 図5に示すベクトル検出枠によって検出されたベクトルのヒストグラムを示す図である。(実施例1)It is a figure which shows the histogram of the vector detected by the vector detection frame shown in FIG. (Example 1) 図2に示すS203の詳細を説明するフローチャートである。(実施例2)It is a flowchart explaining the detail of S203 shown in FIG. (Example 2) 図7に示すS701のヒストグラムの例である。(実施例2)It is an example of the histogram of S701 shown in FIG. (Example 2) 図7に示すS701のヒストグラムの例である。(実施例2)It is an example of the histogram of S701 shown in FIG. (Example 2)

図1は、本実施形態に係る撮像装置の構成例を示す図である。本発明の撮像装置は、ノンフレックス一眼レフカメラ(ミラーレスカメラ)であるが、一眼レフカメラであってもよい。また、撮像装置は、光学系を有するレンズ装置(交換レンズ)が撮像装置本体に着脱されるレンズ交換型レンズ交換型だけでなく、レンズ一体型撮像装置であってもよい。また、撮像装置は、デジタルビデオカメラ、デジタルスチルカメラ、携帯電話などにも適用可能である。   FIG. 1 is a diagram illustrating a configuration example of an imaging apparatus according to the present embodiment. The imaging apparatus of the present invention is a non-flex single-lens reflex camera (mirrorless camera), but may be a single-lens reflex camera. Further, the imaging apparatus is not limited to an interchangeable lens type in which a lens apparatus (an interchangeable lens) having an optical system is attached to and detached from the imaging apparatus main body, and may be an integrated lens type imaging apparatus. The imaging apparatus can also be applied to a digital video camera, a digital still camera, a mobile phone, and the like.

本実施形態の撮像装置は、交換レンズ(レンズ装置)100とカメラ本体120から構成されている。   The imaging apparatus according to the present embodiment includes an interchangeable lens (lens apparatus) 100 and a camera body 120.

交換レンズ100は、カメラ本体120に交換可能に装着され、被写体像を形成する撮像光学系101を備える。撮像光学系101は、固定レンズ102、ズームレンズ(変倍レンズ)103、フォーカスレンズ、シフトレンズ(像振れ補正レンズ)104、絞りなどからなる。フォーカスレンズは光軸方向に移動されて焦点調節を行う。ズームレンズ(変倍レンズ)は、光軸方向に移動されて焦点距離を変更する。シフトレンズ104は、光軸に直交する方向に移動されて像振れを光学的に補正する。なお、「直交する方向」は光軸に直交する成分があれば足り、光軸に斜めに移動されてもよい。絞りは、撮像光学系101の射出瞳位置に配置され、光量を調節する。なお、図1は、作図の便宜上、撮像光学系101の各レンズを単レンズとして示しているが、実際には一または複数のレンズ群から構成される。   The interchangeable lens 100 includes an imaging optical system 101 that is interchangeably attached to the camera body 120 and forms a subject image. The imaging optical system 101 includes a fixed lens 102, a zoom lens (magnification lens) 103, a focus lens, a shift lens (image blur correction lens) 104, a diaphragm, and the like. The focus lens is moved in the optical axis direction to adjust the focus. The zoom lens (magnification lens) is moved in the optical axis direction to change the focal length. The shift lens 104 is moved in a direction orthogonal to the optical axis to optically correct image blur. The “perpendicular direction” only needs to have a component orthogonal to the optical axis, and may be moved obliquely with respect to the optical axis. The stop is disposed at the exit pupil position of the imaging optical system 101 and adjusts the amount of light. FIG. 1 shows each lens of the imaging optical system 101 as a single lens for convenience of drawing, but in actuality, it is composed of one or a plurality of lens groups.

ズームエンコーダ105はズームレンズ103の位置を検出し、検出信号をレンズシステム制御用マイクロコンピュータ(以下、「レンズ制御手段」という)113に出力する。レンズ制御手段113は、ズームエンコーダ105の検出信号により撮像光学系101の焦点距離を得ることができる。   The zoom encoder 105 detects the position of the zoom lens 103 and outputs a detection signal to a lens system control microcomputer (hereinafter referred to as “lens control means”) 113. The lens control unit 113 can obtain the focal length of the imaging optical system 101 based on the detection signal of the zoom encoder 105.

角速度センサ(撮像装置角速度検出手段)111は、撮像装置全体の振れを検出し、振れ検出信号をアンプ112に出力する。アンプ112は、振れ検出信号を増幅してレンズ制御手段113に出力する。角速度センサ111は、交換レンズ100とカメラ本体120の一方に設けられていれば足りる。   An angular velocity sensor (imaging device angular velocity detection means) 111 detects a shake of the entire imaging device and outputs a shake detection signal to the amplifier 112. The amplifier 112 amplifies the shake detection signal and outputs it to the lens control unit 113. It is sufficient that the angular velocity sensor 111 is provided on one of the interchangeable lens 100 and the camera body 120.

レンズ制御手段113は、その他にもフォーカスレンズ制御、絞り制御等なども行う。第1ドライバ114は、レンズ制御手段113からの制御信号に従って、シフトレンズ104を駆動する。第1ドライバ114は、シフトレンズ104の駆動機構部とともに像振れ補正部を構成する。アンプ115は、シフトレンズ104の位置センサ106の出力を増幅してレンズ制御手段113に出力する。   In addition, the lens control unit 113 performs focus lens control, aperture control, and the like. The first driver 114 drives the shift lens 104 in accordance with a control signal from the lens control unit 113. The first driver 114 constitutes an image blur correction unit together with the drive mechanism unit of the shift lens 104. The amplifier 115 amplifies the output of the position sensor 106 of the shift lens 104 and outputs it to the lens control unit 113.

レンズ制御手段113は、像振れ補正制御を行う像振れ補正制御手段113aと、流し撮りアシスト用の制御を行う流し撮りアシスト制御手段113bを備える。   The lens control unit 113 includes an image blur correction control unit 113a that performs image blur correction control, and a panning assist control unit 113b that performs control for panning assist.

流し撮りは、流し撮りの対象となる主被写体(動体)を追いながら通常よりも遅いシャッター速度で撮影するが、長秒撮影のため露光期間中に主被写体角速度とパンニング角速度とを合わせることが難しい。流し撮りアシスト制御手段113bは、主被写体角速度とパンニング角速度の差分に基づく主被写体のぶれを補正し、主被写体が静止した画像が得られるようにシフトレンズ104の駆動を制御する。なお、本発明では、カメラの回転移動のうちパンニングのみを説明するが、チルティングにも当てはまる。像振れ補正については、例えば横方向と縦方向といった、直交する2軸に関して検出および補正が行われるが、同様の構成により行われるので、以下では1軸分のみ説明する。   While panning shots at a slower shutter speed than usual while following the main subject (moving object) that is the subject of the panning shot, it is difficult to match the main subject angular velocity and the panning angular velocity during the exposure period because of long-time shooting. . The panning assist control unit 113b corrects the shake of the main subject based on the difference between the main subject angular velocity and the panning angular velocity, and controls the driving of the shift lens 104 so that an image in which the main subject is stationary can be obtained. In the present invention, only panning of the rotational movement of the camera will be described, but this is also applicable to tilting. For image blur correction, for example, detection and correction are performed for two orthogonal axes such as a horizontal direction and a vertical direction, but since the same configuration is used, only one axis will be described below.

カメラ本体120は、シャッター121、撮像素子122、アナログ信号処理回路(AFE)123、カメラ信号処理回路124、タイミングジェネレータ(TG)125、操作手段131、カメラ制御手段132、第2ドライバ133、モータ134等を有する。   The camera body 120 includes a shutter 121, an image sensor 122, an analog signal processing circuit (AFE) 123, a camera signal processing circuit 124, a timing generator (TG) 125, an operation unit 131, a camera control unit 132, a second driver 133, and a motor 134. Etc.

シャッター121は、開閉駆動されて露光を行う。撮像素子122は、CCDイメージセンサ、CMOSイメージセンサなどから構成され、撮像光学系101が形成した被写体像を光電変換する。アナログ信号処理回路123は、撮像素子122の出力する撮像信号を処理して、AFE123に出力する。TG125は、撮像素子122やAFE123の動作タイミングを設定する。   The shutter 121 is driven to open and close to perform exposure. The image sensor 122 includes a CCD image sensor, a CMOS image sensor, and the like, and photoelectrically converts the subject image formed by the imaging optical system 101. The analog signal processing circuit 123 processes the image signal output from the image sensor 122 and outputs the processed image signal to the AFE 123. The TG 125 sets the operation timing of the image sensor 122 and the AFE 123.

操作手段131は、スイッチ、ボタン、ダイヤル、タッチパネル等の入力手段である。操作手段131は、電源のON/OFF、S1、S2スイッチの切り替え、流し撮りアシストモードの設定、シャッター速度の設定、自動焦点調節(AF)、マニュアル焦点調節(MF)の設定、AFにおける焦点検出の対象を定める焦点検出枠の設定等を行える。   The operation means 131 is an input means such as a switch, button, dial, touch panel or the like. The operation means 131 is for turning on / off the power, switching the S1 and S2 switches, setting the panning assist mode, setting the shutter speed, setting the automatic focus adjustment (AF), manual focus adjustment (MF), and detecting the focus in AF. It is possible to set a focus detection frame that determines the target of the image.

カメラシステム制御用マイクロコンピュータ(以下、「カメラ制御手段」という)132は、撮像装置全体を制御する。例えば、カメラ制御手段132は、シャッター用の第2ドライバ133に制御信号を出力し、シャッター駆動用のモータ134を駆動制御する。   A camera system control microcomputer (hereinafter referred to as “camera control means”) 132 controls the entire imaging apparatus. For example, the camera control unit 132 outputs a control signal to the second driver 133 for shutter, and drives and controls the motor 134 for driving the shutter.

カメラ制御手段132は、レリーズボタンの半押し(S1スイッチのON)に応じて、測光センサによる測光結果または撮影者が設定した絞り値に応じた絞りの駆動量を算出し、絞りを駆動させる。また、カメラ制御手段132は、レリーズボタンの半押しに応じて、シフトレンズ104のロックを解除して駆動可能な状態にし、焦点検出を行わせる。カメラ制御手段132は、レリーズボタンの全押し(S2スイッチのON)に応じて、シャッター121を駆動し、撮像光学系101からの光束を撮像素子122に導き、露光(撮影)を行い、シフトレンズ104を駆動する。カメラ制御手段132は、撮像素子122からの出力に基づいてカメラ信号処理回路124を制御して画像データ(動画や静止画)を生成させ、メモリカード(記憶媒体)171に記録させる。   In response to the release button being pressed halfway (the S1 switch is turned on), the camera control unit 132 calculates the aperture driving amount corresponding to the photometric result of the photometric sensor or the aperture value set by the photographer, and drives the aperture. Further, in response to half-pressing of the release button, the camera control unit 132 releases the lock of the shift lens 104 so that it can be driven, and performs focus detection. The camera control unit 132 drives the shutter 121 in response to full pressing of the release button (ON of the S2 switch), guides the light beam from the imaging optical system 101 to the imaging element 122, performs exposure (shooting), and shift lens. 104 is driven. The camera control unit 132 controls the camera signal processing circuit 124 based on the output from the image sensor 122 to generate image data (moving image or still image), and records it in the memory card (storage medium) 171.

表示部172は、撮影者がカメラで撮影しようとしている画像をモニタし、また撮影した画像を表示する液晶パネル(LCD)等から構成される。また、カメラ本体120は、不図示の焦点検出手段を備える。焦点検出手段は、例えば、表示部172に表示される画像(フレーム画像)に設定された焦点検出枠において焦点検出を行う。焦点検出方法は限定されず、例えば、位相差検出方式やコントラスト検出方式を使用することができる。位相差検出方式では、一対の被写体像の像信号の位相差を検出することによって焦点検出をする。コントラスト検出方式では、撮像光学系101が形成する焦点位置と撮像素子122の相対位置を変化させながら撮像素子122が形成した被写体像のコントラストのピーク位置を検出することによって焦点検出する。   The display unit 172 is configured by a liquid crystal panel (LCD) or the like that monitors an image that the photographer intends to capture with the camera and displays the captured image. The camera body 120 includes a focus detection unit (not shown). For example, the focus detection unit performs focus detection in a focus detection frame set in an image (frame image) displayed on the display unit 172. The focus detection method is not limited, and for example, a phase difference detection method or a contrast detection method can be used. In the phase difference detection method, focus detection is performed by detecting a phase difference between image signals of a pair of subject images. In the contrast detection method, focus detection is performed by detecting the peak position of the contrast of the subject image formed by the image sensor 122 while changing the relative position between the focus position formed by the imaging optical system 101 and the image sensor 122.

カメラ本体120は、交換レンズ100とのマウント接点部161を備える。レンズ制御手段113とカメラ制御手段132は、マウント接点部116および161を介して所定のタイミングでシリアル通信を行う。   The camera body 120 includes a mount contact portion 161 with the interchangeable lens 100. The lens control unit 113 and the camera control unit 132 perform serial communication at a predetermined timing via the mount contact portions 116 and 161.

カメラ信号処理回路124は、AFE123からの画像データに対して現像、撮影モードに応じた色調の調整(ホワイトバランス、γ処理など)等の画像処理を施す。カメラ信号処理回路(信号処理手段)124は、動きベクトル検出手段124aを備える。動きベクトル検出手段124aは、少なくとも2枚のフレーム画像を入力し、入力した2枚のフレーム画像に設定された複数の領域のそれぞれの動きベクトルを検出する。動きベクトル検出手段124aの検出信号はカメラ制御手段132に出力される。   The camera signal processing circuit 124 performs image processing such as development and color tone adjustment (white balance, γ processing, etc.) on the image data from the AFE 123 according to the shooting mode. The camera signal processing circuit (signal processing means) 124 includes a motion vector detection means 124a. The motion vector detection means 124a receives at least two frame images and detects each motion vector of a plurality of regions set in the input two frame images. The detection signal of the motion vector detection unit 124 a is output to the camera control unit 132.

カメラ制御手段132は、設定手段132a、ヒストグラム作成手段132b、被写体角速度算出手段132c、被写体検出手段132dを有する。   The camera control unit 132 includes a setting unit 132a, a histogram creation unit 132b, a subject angular velocity calculation unit 132c, and a subject detection unit 132d.

ヒストグラム作成手段132bは、動きベクトル検出手段124aが検出した動きベクトルの情報に基づいて、動きベクトルの大きさと度数との関係を示すヒストグラムを作成する。設定手段132aは、ヒストグラム作成手段132bが作成したヒストグラムにおける度数の閾値を設定する。被写体検出手段132dは、ヒストグラムにおいて、設定手段132aが設定した閾値以上の度数を有する動きベクトルの大きさの情報に基づいて、動体の動きベクトルを検出し、これによって、主被写体が存在する画面上の領域を選択する。カメラ制御手段132は、設定手段132a、ヒストグラム作成手段132b、被写体検出手段132dによって動きベクトル検出装置として機能する。   The histogram creating unit 132b creates a histogram indicating the relationship between the magnitude of the motion vector and the frequency based on the information on the motion vector detected by the motion vector detecting unit 124a. The setting means 132a sets a frequency threshold in the histogram created by the histogram creation means 132b. The subject detection unit 132d detects the motion vector of the moving object based on the information on the magnitude of the motion vector having a frequency equal to or higher than the threshold set by the setting unit 132a in the histogram, and thereby on the screen where the main subject exists. Select the area. The camera control means 132 functions as a motion vector detection device by the setting means 132a, the histogram creation means 132b, and the subject detection means 132d.

また、主被写体角速度算出手段132cは、被写体検出手段132dによって検出された主被写体の動きベクトル、フレーム画像を得る際の撮像装置の焦点距離とパンニング角速度の情報に基づいて動体の角速度(主被写体角速度)を算出する。このため、カメラ制御手段132は、動体角速度算出装置としても機能する。   Further, the main subject angular velocity calculating unit 132c is based on the motion vector of the main subject detected by the subject detecting unit 132d and the information on the focal length and panning angular velocity of the imaging device when obtaining the frame image. ) Is calculated. For this reason, the camera control means 132 also functions as a moving object angular velocity calculation device.

図1のカメラにおいて、操作手段131を用いて撮影者がカメラの電源をONすると、その状態変化をカメラ制御手段132が検出し、カメラ制御手段132は、カメラ本体120の各回路への電源供給および初期設定処理を実行する。また、カメラ制御手段132は、交換レンズ100への電源供給が行い、レンズ制御手段113は交換レンズ100内の初期設定を実行する。レンズ制御手段113とカメラ制御手段132との間で所定のタイミングで通信が始まる。カメラ本体120から交換レンズ100へはカメラの状態、撮影設定等が送信され、交換レンズ100からカメラ本体120へ交換レンズの焦点距離データ、角速度データ等が送信される。   In the camera of FIG. 1, when the photographer turns on the camera using the operation unit 131, the camera control unit 132 detects the change in state, and the camera control unit 132 supplies power to each circuit of the camera body 120. And execute the initial setting process. The camera control unit 132 supplies power to the interchangeable lens 100, and the lens control unit 113 executes initial settings in the interchangeable lens 100. Communication starts between the lens control unit 113 and the camera control unit 132 at a predetermined timing. From the camera body 120 to the interchangeable lens 100, the camera state, shooting settings, and the like are transmitted, and from the interchangeable lens 100 to the camera body 120, focal length data, angular velocity data, and the like of the interchangeable lens are transmitted.

流し撮りアシストモード中には、カメラ本体120から交換レンズ100に対して、流し撮りアシストモードが設定されている情報と、主被写体角速度算出手段132cが算出した主被写体角速度が送信される。レンズ制御手段113は、流し撮りアシストモードが設定されていればシフトレンズ駆動制御を流し撮り制御手段113bの制御とし、流し撮りアシストモードが設定されていなければ、シフトレンズ駆動制御を像振れ補正制御手段113aの制御とする。   During the panning assist mode, the camera body 120 transmits information about the setting of the panning assist mode and the main subject angular velocity calculated by the main subject angular velocity calculating unit 132c to the interchangeable lens 100. If the panning assist mode is set, the lens control unit 113 sets the shift lens driving control as the control of the panning control unit 113b. If the panning assist mode is not set, the lens control unit 113 sets the shift lens driving control to the image blur correction control. The control of the means 113a is assumed.

なお、本実施形態では「流し撮りアシストモード」を設定しているが、本発明は当該モードの設定は必須ではない。また、撮影者は、流し撮りにおいてシャッター速度を設定することもできるが、既定のシャッター速度を利用することもできる。   Although the “panning assist mode” is set in the present embodiment, the setting of the mode is not essential in the present invention. In addition, the photographer can set the shutter speed in panning shots, but can also use a predetermined shutter speed.

図2は、操作手段131によって流し撮りアシストモードが選択された場合の流し撮りアシスト制御に関するフローチャートである。図2において、S201〜S206はカメラ制御手段132が実行するフローチャートであり、S211〜S218はレンズ制御手段113が実行するフローチャートであり、「S」はステップ(工程)を表す。図2及び他の図に示すフローチャートは、コンピュータに各ステップを実行させるためのプログラムとして具現化が可能であり、かかるプログラムは非一時的なコンピュータ可読媒体に格納されてもよい。   FIG. 2 is a flowchart relating to the panning assist control when the panning assist mode is selected by the operation unit 131. 2, S201 to S206 are flowcharts executed by the camera control unit 132, S211 to S218 are flowcharts executed by the lens control unit 113, and “S” represents a step (process). The flowchart shown in FIG. 2 and other figures can be embodied as a program for causing a computer to execute each step, and such a program may be stored in a non-transitory computer-readable medium.

図2に示すフローチャートは、フレームレート単位で動いている。フレームレートは、単位時間(例えば、1秒)当たりに処理させるフレーム数(静止画像数、コマ数)であり、fpsという単位で表す。また、S221はレンズ制御手段113が角速度センサ111から取得する角速度データの割り込み処理を表している。   The flowchart shown in FIG. 2 operates on a frame rate basis. The frame rate is the number of frames (the number of still images and the number of frames) processed per unit time (for example, 1 second), and is expressed in units of fps. S221 represents an interruption process of angular velocity data acquired by the lens control unit 113 from the angular velocity sensor 111.

まず、カメラ制御手段132の動作から説明する。S201では、レンズ情報を取得する部分であり、レンズ制御手段113との通信により、角速度データ、焦点距離データなどを取得する。S202では、カメラ信号処理回路124の動きベクトル検出手段124aからベクトルデータの取得を行う。なお、カメラ制御部132が動きベクトル検出手段124aの機能を有してもよい。S203では、S201で取得した角速度データ、および焦点距離データと、S202で取得したベクトルデータに基づいて、主被写体角速度を算出する。主被写体が検出できなかった場合は、主被写体角速度算出結果として0を設定する。S204では、S203で算出された主被写体角速度をレンズ制御手段113へと送信する。S205では、S201〜S204の動作をS2が押されるまで繰り返し、S2スイッチがONになると、その情報をレンズ制御手段113へ通知する。S206ではベクトルデータ、主被写体角速度などのデータを初期化して、S201に戻る。   First, the operation of the camera control means 132 will be described. In S <b> 201, the lens information is acquired, and angular velocity data, focal length data, and the like are acquired through communication with the lens control unit 113. In S202, vector data is acquired from the motion vector detection means 124a of the camera signal processing circuit 124. The camera control unit 132 may have the function of the motion vector detection unit 124a. In S203, the main subject angular velocity is calculated based on the angular velocity data and focal length data acquired in S201, and the vector data acquired in S202. When the main subject cannot be detected, 0 is set as the main subject angular velocity calculation result. In S <b> 204, the main subject angular velocity calculated in S <b> 203 is transmitted to the lens control unit 113. In S205, the operations in S201 to S204 are repeated until S2 is pressed. When the S2 switch is turned on, the information is notified to the lens control unit 113. In S206, vector data, main subject angular velocity, and other data are initialized, and the process returns to S201.

次に、レンズ制御手段113の動作について説明する。S211では角速度データを、S212では焦点距離データを、それぞれカメラ制御手段132へ送信する。S213では、カメラ制御手段132から主被写体角速度を受信する。S214では、レンズ制御手段113は、S2スイッチがONになるまで以上の処理を繰り返し、S2スイッチがONになると、S215以降でシフトレンズ104の制御を行う。S215では、主被写体角速度が検出されたかどうかを判定する。主被写角速度が0の時は主被写体が検出されていないので、S216において、通常防振制御を行う。主被写体角速度が検出された場合は、S217において、現在の角速度データとS213で受信した主被写体角速度の差分を算出し、S218において、S217で算出した差分データからシフトレンズ104の駆動命令を出力する。S219では、露光終了が検出されるまで、S216、あるいはS217およびS218の動作を繰り返し、露光が終了すると、S220で、シフトレンズ104が中心位置(初期位置)に戻るための駆動命令を出力する。   Next, the operation of the lens control unit 113 will be described. The angular velocity data is transmitted to the camera control means 132 in S211 and the focal length data is transmitted in S212. In step S213, the main subject angular velocity is received from the camera control unit 132. In S214, the lens control unit 113 repeats the above processing until the S2 switch is turned on. When the S2 switch is turned on, the lens control unit 113 controls the shift lens 104 in and after S215. In S215, it is determined whether or not the main subject angular velocity is detected. Since the main subject is not detected when the main subject angular velocity is 0, normal image stabilization control is performed in S216. If the main subject angular velocity is detected, a difference between the current angular velocity data and the main subject angular velocity received in S213 is calculated in S217, and a driving instruction for the shift lens 104 is output from the difference data calculated in S217 in S218. . In S219, the operation of S216 or S217 and S218 is repeated until the end of exposure is detected. When the exposure is completed, a drive command for returning the shift lens 104 to the center position (initial position) is output in S220.

図3は、主被写体角速度の算出方法を説明するための図である。具体的には、図3は、主被写体がt秒の間に点Aから点Bへ移動し、それに応じて撮像素子122に結像した被写体像が点Cから点Dへと移動したことを示す図である。点Cと点Dとの距離(像面移動量)をν[pixel]、焦点距離をf[mm]、撮像素子122の画素ピッチをp[μm/pixel]とすると、像面上の主被写体の角速度ω[rad/sec]は以下の式で表わされる。   FIG. 3 is a diagram for explaining a method of calculating the main subject angular velocity. Specifically, FIG. 3 shows that the main subject has moved from point A to point B during t seconds, and the subject image formed on the image sensor 122 has moved from point C to point D accordingly. FIG. When the distance (image plane movement amount) between point C and point D is ν [pixel], the focal length is f [mm], and the pixel pitch of the image sensor 122 is p [μm / pixel], the main subject on the image plane The angular velocity ω [rad / sec] is expressed by the following equation.

撮像装置をパンニングすると、像面上の主被写体の角速度ωは、次式で示すように、主被写体自身の角速度である主被写体角速度ωからパンニング角速度ωを減算したものとなる。 When panning an imaging apparatus, the main object of the angular velocity omega in the image plane, as shown in the following equation, and minus the panning angular velocity omega p from main object angular velocity omega s is the angular velocity of the main subject itself.

数式(2)から、主被写体角速度ωは以下のように算出される。 From Equation (2), the main subject angular velocity ω s is calculated as follows.

角速度センサ111からはパンニング角速度ωの情報が得られ、像面上の主被写体の角速度ωは、上述した動きベクトル検出装置から得られる。この結果、被写体角速度算出手段132cは、数式3から主被写体角速度ωを求めることができる。S204、S213ではこの情報が送受信される。なお、主被写体角速度の算出方法は、これに限定されず、予め指定された値を使用してもよい。S217では、数式(2)からωを算出するのであるが、このときのパンニング角速度ωは露光中に角速度センサ111によって検出された最新の情報を使用する。S218では、差分の角速度を積分してシフトレンズ104の移動量を算出する。 Information on the panning angular velocity ω p is obtained from the angular velocity sensor 111, and the angular velocity ω of the main subject on the image plane is obtained from the motion vector detection device described above. As a result, the subject angular velocity calculation unit 132c can obtain the main subject angular velocity ω s from Equation 3. In S204 and S213, this information is transmitted and received. Note that the method of calculating the main subject angular velocity is not limited to this, and a value designated in advance may be used. In S217, ω is calculated from Equation (2). At this time, the latest information detected by the angular velocity sensor 111 during exposure is used as the panning angular velocity ω p . In S218, the amount of movement of the shift lens 104 is calculated by integrating the angular velocity of the difference.

カメラ制御手段132、レンズ制御手段113の以上の動作により流し撮りアシスト機能が実現されることになる。   The panning assist function is realized by the above operations of the camera control unit 132 and the lens control unit 113.

図4は、実施例1に係るS203の詳細を示すフローチャートである。まず、S401において、ヒストグラム作成手段132bは、動きベクトル検出手段124aによる検出結果に基づいてヒストグラムを作成する。   FIG. 4 is a flowchart illustrating details of S203 according to the first embodiment. First, in S401, the histogram creation unit 132b creates a histogram based on the detection result by the motion vector detection unit 124a.

図5は、動きベクトル検出手段124aでのベクトル検出領域の例を示す図である。同図中、501は、撮像素子122で得られる画像(フレーム画像)であり、表示部172は画像501を表示することができ、操作手段131より不図示の焦点検出枠をここに設定することができる。破線で描かれている枠はベクトル検出枠502である。503は主被写体である。   FIG. 5 is a diagram showing an example of a vector detection area in the motion vector detection means 124a. In the figure, reference numeral 501 denotes an image (frame image) obtained by the image sensor 122, the display unit 172 can display the image 501, and a focus detection frame (not shown) is set here by the operation means 131. Can do. A frame drawn with a broken line is a vector detection frame 502. Reference numeral 503 denotes a main subject.

図5では、撮像画面上に40個のベクトル検出枠が設定され、少なくとも2つのフレーム画像間の相関結果が各領域のベクトルデータとして動きベクトル検出手段124aから出力される。動きベクトルの検出には、テンプレートマッチングなど周知の方法を使用することができる。   In FIG. 5, 40 vector detection frames are set on the imaging screen, and a correlation result between at least two frame images is output from the motion vector detection unit 124a as vector data of each region. A known method such as template matching can be used to detect the motion vector.

図6は、全領域で検出された動きベクトルの大きさに基づいて作成されたヒストグラムを示す図である。一般に、ヒストグラムは、縦軸に度数、横軸に階級をとった統計グラフである。本実施例の横軸は、動きベクトルの大きさを画素毎に並べた図である。   FIG. 6 is a diagram showing a histogram created based on the magnitudes of motion vectors detected in the entire region. In general, a histogram is a statistical graph with frequency on the vertical axis and class on the horizontal axis. The horizontal axis of the present embodiment is a diagram in which the magnitudes of motion vectors are arranged for each pixel.

図6(A)は、通常の像振れ補正モード時のヒストグラムを示している。通常の像振れ補正モードは背景の振れを止めることが主たる目的になり、動きベクトル検出では、背景に対応したベクトル検出枠の数が多いため、ヒストグラムの度数ピークは高くなり、背景のベクトルの大きさは0近傍に集中する。図6(A)、601は、通常の像振れ補正モード時に設定される度数に対する信頼度判定の閾値であり、設定手段132aによって設定される。503で示す移動体ベクトルをノイズとして除去するために、閾値は高く設定される。   FIG. 6A shows a histogram in the normal image blur correction mode. The main purpose of the normal image stabilization mode is to stop background blur.In motion vector detection, the number of vector detection frames corresponding to the background is large, so the frequency peak of the histogram is high, and the size of the background vector is large. It concentrates around 0. 6A and 601 are threshold values for determining reliability with respect to the frequency set in the normal image blur correction mode, and are set by the setting unit 132a. In order to remove the moving body vector indicated by 503 as noise, the threshold value is set high.

図6(B)は、流し撮り時の主被写体の動きが遅い場合のヒストグラムを示している。ここでは、503で示す移動体を主被写体として判定する必要があるが、主被写体に対するベクトル検出枠数が少ないため、602で示すように、設定手段132aは、信頼度判定の閾値を低く設定する。主被写体の動きが遅い場合は背景も検出されるので、主被写体と背景に対応する部分にピークができるが、主被写体が静止した画像を得ようとしているため、主被写体に対するベクトルが0近傍の値となる。角速度センサ111の出力を像面上の移動量に換算した値は、背景のベクトルと等しくなるため、これを利用することで背景ベクトルを分離し、主被写体に対するベクトルだけを選択することが可能となる。   FIG. 6B shows a histogram when the main subject moves slowly during panning. Here, it is necessary to determine the moving object indicated by 503 as the main subject. However, since the number of vector detection frames for the main subject is small, the setting means 132a sets the reliability determination threshold value low as indicated by 602. . Since the background is also detected when the main subject moves slowly, a peak appears in the portion corresponding to the main subject and the background, but since the main subject is trying to obtain a still image, the vector for the main subject is near zero. Value. Since the value obtained by converting the output of the angular velocity sensor 111 into the amount of movement on the image plane is equal to the background vector, it is possible to separate the background vector by using this and select only the vector for the main subject. Become.

図6(C)は、流し撮り時の主被写体の動きが速い場合のヒストグラムを示している。被写体の速度が速く、それを追いかけるカメラのパンニング角速度が速い場合は、背景に対するベクトルが検出範囲を超えて検出されなくなる。また、流れによる低コントラストのために、主被写体以外のベクトルがピークを構成しなくなる。また、主被写体として検出されるベクトルにばらつきが増えるため、主被写体に対する度数のピークは低くなる。そこで、設定手段132aは、信頼度判定の閾値603で示すように低く設定する。これにより、主被写体以外のベクトルを誤検出することがなくなり、かつ主被写体の検出が可能となる。   FIG. 6C shows a histogram when the main subject moves quickly during panning. When the speed of the subject is fast and the panning angular speed of the camera that follows it is fast, the vector for the background is not detected beyond the detection range. Also, because of the low contrast due to the flow, vectors other than the main subject do not form a peak. Further, since the variation in the vector detected as the main subject increases, the frequency peak for the main subject becomes low. Therefore, the setting unit 132a sets a low value as shown by the threshold value 603 for reliability determination. As a result, vectors other than the main subject are not erroneously detected, and the main subject can be detected.

図4に戻り、S402では、設定手段132aは、信頼度判定の閾値を流し撮りアシストモード用に設定するが、ここでは、図6(B)に示す閾値602に設定する。   Returning to FIG. 4, in S <b> 402, the setting unit 132 a sets the reliability determination threshold for the panning assist mode, but here sets the threshold 602 shown in FIG. 6B.

S403では、パンニング角速度に応じて、設定手段132aは、信頼度判定の閾値を再設定する。パンニング角速度が速い場合には、図6(C)に示す閾値603を設定する。パンニング角速度が高ければ高いほどそれに比例して閾値を下げてもよいが、比例的に閾値を変更する必要はなく、段階的や指数関数的に変更してもよい。即ち、設定手段132aは、第1パンニング角速度の第1閾値(例えば、図6(B)に示す閾値602)よりも、第1パンニング角速度よりも高い第2パンニング角速度の第2閾値(例えば、図6(C)に示す閾値603)のほうが低ければ足りる。より一般には、設定手段132aは、フレーム画像を得る際の撮像装置が第1角速度で回転されたときの閾値よりも、撮像装置が第1角速度よりも高い第2角速度で回転されたときの閾値を低く設定すれば足りる。   In S403, the setting unit 132a resets the reliability determination threshold according to the panning angular velocity. When the panning angular velocity is high, a threshold 603 shown in FIG. 6C is set. The higher the panning angular velocity, the lower the threshold may be proportionally. However, the threshold need not be changed proportionally, and may be changed stepwise or exponentially. In other words, the setting unit 132a has a second threshold value of the second panning angular velocity that is higher than the first threshold value of the first panning angular velocity (for example, the threshold value 602 shown in FIG. 6B). It is sufficient that the threshold value 603) shown in FIG. More generally, the setting means 132a has a threshold value when the imaging device is rotated at a second angular velocity higher than the first angular velocity than a threshold value when the imaging device is rotated at the first angular velocity when obtaining a frame image. It is sufficient to set low.

S404では、変更した閾値を用いて、被写体検出手段132dは、ヒストグラムから主被写体となるベクトルが検出されているかどうかを判定する。閾値を変更することにより、主被写体が判定しやすくなっているため、ここでは高い確率で主被写体が検出することができる。   In S404, using the changed threshold value, the subject detection unit 132d determines whether a vector serving as the main subject is detected from the histogram. Since the main subject can be easily determined by changing the threshold value, the main subject can be detected here with high probability.

主被写体に相当するベクトルが検出された場合、S405では、被写体検出手段132dは、主被写体に相当するヒストグラムの度数を構成しているベクトルデータを用いて、主被写体に対する最終動きベクトルを算出する。例えば、S405では、動きベクトル検出手段124aで検出された対応する動きベクトル値の平均をとることによって主被写体に対する最終動きベクトルを算出する。   When a vector corresponding to the main subject is detected, in step S405, the subject detection unit 132d calculates a final motion vector for the main subject using vector data constituting the frequency of the histogram corresponding to the main subject. For example, in S405, the final motion vector for the main subject is calculated by taking the average of the corresponding motion vector values detected by the motion vector detection means 124a.

S406では、被写体角速度算出手段132cは、S405で算出された最終動きベクトルと、レンズ制御手段113から受信した現在の角速度データとから主被写体角速度を算出する。   In step S406, the subject angular velocity calculation unit 132c calculates the main subject angular velocity from the final motion vector calculated in step S405 and the current angular velocity data received from the lens control unit 113.

一方、S404において、閾値を変更しても主被写体が検出できなかった場合、例えば、狙っている被写体が小さすぎて主被写体判定が可能な閾値まで達しなかった場合などは、S407において、主被写体角速度を0に設定する。   On the other hand, if the main subject cannot be detected even if the threshold value is changed in S404, for example, if the target subject is too small to reach the threshold value for determining the main subject, the main subject is determined in S407. Set the angular velocity to zero.

このようにして取得した主被写体角速度の情報をレンズ制御手段113に送信することによって、流し撮りアシスト動作が高い確率で実行されることになる。   By transmitting the information on the main subject angular velocity acquired in this way to the lens control unit 113, the panning assist operation is executed with a high probability.

以上、実施例1によれば、設定手段132aは、パンニング角速度に応じて信頼度判定の閾値を設定する。具体的には、ヒストグラムにおける第1パンニング角速度の信頼度判定の閾値よりも、第1パンニング角速度よりも高い第2パンニング角速度のそれを低くする。これによって、主被写体の動きベクトルの検出を容易にし、流し撮りアシスト機能を発揮させ易くする。   As described above, according to the first embodiment, the setting unit 132a sets the threshold for reliability determination according to the panning angular velocity. Specifically, the second panning angular velocity higher than the first panning angular velocity is set lower than the threshold value for determining the reliability of the first panning angular velocity in the histogram. This facilitates the detection of the motion vector of the main subject and facilitates the use of the panning assist function.

実施例2では、パンニング角速度に応じてヒストグラムの分割数を少なくする(ビンの幅を広げる、ビンの数を少なくする)ことによって、主被写体の動きベクトルの検出を容易にしている。本実施例では、信頼度判定の閾値は図6(B)に示す閾値602に固定されているものとする。実施例1の図6に示すヒストグラムは、横軸が動きベクトルの大きさを画素単位で示したものである。ヒストグラムの分割数を少なくする(ビンの数を少なくする)とは、例えば、横軸が動きベクトルの大きさを数画素〜数十画素単位で示す場合である。また、本実施例では、ヒストグラム作成手段132bは、フレーム画像を得る際の撮像装置が第1角速度で回転されたときのビンの数よりも、第1角速度よりも高い第2角速度で回転されたときのビンの数を少なく設定することができる。   In the second embodiment, the motion vector of the main subject is easily detected by reducing the number of histogram divisions according to the panning angular velocity (widening the bin width and reducing the number of bins). In this embodiment, it is assumed that the threshold value for reliability determination is fixed to the threshold value 602 shown in FIG. In the histogram illustrated in FIG. 6 of the first embodiment, the horizontal axis indicates the magnitude of the motion vector in units of pixels. Reducing the number of histogram divisions (reducing the number of bins) is, for example, a case where the horizontal axis indicates the magnitude of a motion vector in units of several pixels to several tens of pixels. In the present embodiment, the histogram creating means 132b is rotated at a second angular velocity higher than the first angular velocity than the number of bins when the imaging device for obtaining the frame image is rotated at the first angular velocity. When the number of bins can be set small.

図7は、実施例2に係るS203の詳細を示すフローチャートである。まず、S601では、取得したパンニング角速度に応じてヒストグラムの分割数を設定する。S602では、S601で作成したヒストグラムから主被写体が検出されたかどうかを判定する。   FIG. 7 is a flowchart illustrating details of S203 according to the second embodiment. First, in S601, the number of histogram divisions is set according to the acquired panning angular velocity. In step S602, it is determined whether a main subject has been detected from the histogram created in step S601.

図8(A)は、パンニング角速度が速い場合のヒストグラムを示す図である。図8(A)は、分割数を変更する前後のヒストグラムを示している。実線は分割数を変更する前のヒストグラム、波線は分割数を変更した後のヒストグラム、をそれぞれ表しているが、これは、図8の他の図でも同様である。分割数変更前のヒストグラムでは、主被写体に対応するベクトルが分散してしまい度数が低く、信頼度判定の閾値801(または602)を超えないため、主被写体が検出されない。一方、分割数を少なくすることで、同じビンの中にある度数が合計されるので度数のピークが閾値701を超え、主被写体が検出可能となる。分割数を少なくしたヒストグラムは、0を中心として再配置する。即ち、ヒストグラム作成手段132bは、動きベクトルの大きさが0の位置が中心となるビンを含むようにビンを設定する。流し撮り中は、主被写体を追いかけようとしているため、主被写体に対する動きベクトルが0近傍になることが予想されるからである。   FIG. 8A shows a histogram when the panning angular velocity is high. FIG. 8A shows a histogram before and after changing the number of divisions. The solid line represents the histogram before the number of divisions is changed, and the wavy line represents the histogram after the number of divisions is changed. This is the same in other figures of FIG. In the histogram before changing the number of divisions, the vector corresponding to the main subject is dispersed and the frequency is low and does not exceed the reliability determination threshold value 801 (or 602). Therefore, the main subject is not detected. On the other hand, by reducing the number of divisions, the frequencies in the same bin are summed, so that the frequency peak exceeds the threshold 701 and the main subject can be detected. A histogram with a reduced number of divisions is rearranged around 0. That is, the histogram creation unit 132b sets bins so as to include a bin centered at a position where the magnitude of the motion vector is zero. This is because the motion vector for the main subject is expected to be close to 0 during the panning because the main subject is being chased.

図8(B)は、パンニング角速度が速い場合の図8(A)とは別のヒストグラムを示す図である。図8(B)では、ヒストグラムの分割点が互いに一致しないように(ビンの位置が互いにずれるように)複数の(ここでは、2種類の)ヒストグラムを作成する。同図において、ヒストグラムAおよびBは、それぞれ、分割数を変更する前後のヒストグラムを示している。分割点をこのように設定した2種類のヒストグラムを作成することで、度数のピークを検出し易くし、主被写体の検出を容易にしている。この場合、被写体検出手段132dは、複数のヒストグラムの一つに基づいて主被写体を検出する。   FIG. 8B is a diagram showing a different histogram from FIG. 8A when the panning angular velocity is high. In FIG. 8B, a plurality of (here, two types) histograms are created so that the dividing points of the histograms do not match each other (the bin positions are shifted from each other). In the same figure, histograms A and B respectively show histograms before and after changing the number of divisions. By creating two types of histograms with division points set in this way, it is easy to detect the peak of the frequency, and the main subject can be easily detected. In this case, the subject detection unit 132d detects the main subject based on one of the plurality of histograms.

図8(C)は、パンニング角速度が速い場合の更に別のヒストグラムを示している。主被写体のベクトルは0近傍にあることが予想されるため、0近傍のヒストグラムの分割数は少なくするが、0から離れた部分では分割数を変更しないようにする。そして、0に対してどの範囲まで分割数を少なくするかの判断を、パンニング角速度に応じて変更するようにする。つまり、ヒストグラム作成手段132bは、撮像装置が第2角速度で回転された場合、動きベクトルの大きさが0の位置を含む第1範囲にあるビンの数を少なく設定し、第1範囲の外側の第2範囲にあるビンの数を少なく設定しない。このようなヒストグラムを作成することで、ベクトル出力に予期せぬノイズ成分が含まれていても、そのノイズの影響を無視することができ、確実に主被写体を判別することができる。   FIG. 8C shows still another histogram when the panning angular velocity is high. Since the vector of the main subject is expected to be in the vicinity of 0, the number of divisions of the histogram near 0 is reduced, but the number of divisions is not changed in a portion away from 0. Then, the determination as to which range the number of divisions is reduced with respect to 0 is changed according to the panning angular velocity. That is, when the imaging apparatus is rotated at the second angular velocity, the histogram creating unit 132b sets the number of bins in the first range including the position where the magnitude of the motion vector is 0 to be small, and the outside of the first range. Do not set a small number of bins in the second range. By creating such a histogram, even if an unexpected noise component is included in the vector output, the influence of the noise can be ignored, and the main subject can be reliably identified.

図7に戻り、S703で、被写体検出手段132dによって主被写体が検出されていればS704へ進み、S703で主被写体が検出されていなければS708へ進む。   Returning to FIG. 7, if the main subject is detected by the subject detection unit 132d in S703, the process proceeds to S704, and if the main subject is not detected in S703, the process proceeds to S708.

S704では、カメラ制御手段132はS701で設定した分割数が所定値以上かどうかを判定し、分割数が所定値に満たなかった場合はS705へ進み、分割数が所定値を満たす場合はS706へ進む。   In S704, the camera control unit 132 determines whether or not the number of divisions set in S701 is equal to or greater than a predetermined value. If the number of divisions does not satisfy the predetermined value, the process proceeds to S705. If the number of divisions satisfies the predetermined value, the process proceeds to S706. move on.

S705では、カメラ制御手段132は分割設定数に応じて主被写体の動きベクトルを算出する。主被写体を検出するためにヒストグラムの分割数を少なくした場合、ピークを作っているベクトルをすべて利用して主被写体の動きベクトルを算出すると誤差が発生し易くなる。そこで、ヒストグラムの分割数を少なくした場合の、最終的な主被写体の動きベクトルの算出方法を、ヒストグラムの分割数を少なくしなかった場合のそれと変更する。   In S705, the camera control unit 132 calculates a motion vector of the main subject according to the number of division settings. When the number of divisions of the histogram is reduced in order to detect the main subject, an error is likely to occur if the motion vector of the main subject is calculated using all vectors that make a peak. Therefore, the final method for calculating the motion vector of the main subject when the number of divisions of the histogram is reduced is changed from that when the number of divisions of the histogram is not reduced.

例えば、焦点検出枠が、撮影者によって表示部172において設定されている場合、焦点検出枠近傍のベクトル検出枠で検出されたベクトルに対して重み付けを行う。より具体的には、被写体検出手段132dは、焦点検出枠から所定範囲にある動きベクトルに重み付けをし、所定範囲外にある動きベクトルと加算して平均することによって主被写体の動きベクトルを検出する。本発明はこの例に限定されず、焦点検出枠から所定範囲にある動きベクトルを平均することによって(所定範囲外にある動きベクトルを用いずに)主被写体の動きベクトルを検出してもよい。これによって、最も有効となるベクトルを選択し、主被写体の動きベクトルをより正確に検出することができる。S707では、上述したように、角速度データ、焦点距離データ等を用いて主被写体角速度を算出する。   For example, when the focus detection frame is set on the display unit 172 by the photographer, the vector detected in the vector detection frame near the focus detection frame is weighted. More specifically, the subject detection unit 132d weights motion vectors within a predetermined range from the focus detection frame, adds the motion vectors outside the predetermined range, and averages them to detect the motion vector of the main subject. . The present invention is not limited to this example, and the motion vector of the main subject may be detected by averaging motion vectors within a predetermined range from the focus detection frame (without using a motion vector outside the predetermined range). Thereby, the most effective vector can be selected and the motion vector of the main subject can be detected more accurately. In S707, as described above, the main subject angular velocity is calculated using the angular velocity data, the focal length data, and the like.

図9は、パンニング角速度が遅い(主被写体角速度が遅い)場合のヒストグラムを示す図であり、実線は分割数を変更する前のヒストグラム、波線は分割数を変更した後のヒストグラム、をそれぞれ表している。パンニング角速度が遅い場合は、背景と主被写体、両方の動きベクトルが検出されることになる。図9において、901は背景に対応するベクトル、902が主被写体に対応するベクトルである。このようにパンニング角速度が遅い場合、ヒストグラムの分割数を少なくすると、903に示すように、背景と主被写体が一体となってしまう。一方、904は信頼度判定の閾値を示しているが、パンニング角速度が遅いと主被写体に対する動きベクトルは集中するため、スレッシュレベルに達する可能性が高く、ヒストグラムの分割数を少なくする必要がない。   FIG. 9 is a diagram showing a histogram when the panning angular velocity is slow (main subject angular velocity is slow), where the solid line represents the histogram before the division number is changed, and the wavy line represents the histogram after the division number is changed. Yes. When the panning angular velocity is low, both the background and main subject motion vectors are detected. In FIG. 9, 901 is a vector corresponding to the background, and 902 is a vector corresponding to the main subject. When the panning angular velocity is low in this way, if the number of histogram divisions is reduced, the background and the main subject are integrated as shown at 903. On the other hand, reference numeral 904 indicates a reliability determination threshold value, but when the panning angular velocity is low, the motion vectors for the main subject are concentrated, so that there is a high possibility that the threshold level will be reached, and there is no need to reduce the number of histogram divisions.

そこで、パンニング角速度が遅い場合は、S701において、ヒストグラムの分割数は所定値以上となっている。この場合は、ヒストグラムの結果は主被写体の動きを十分正確に表しているため、S706では、被写体検出手段132dは、焦点検出枠に基づいて重み付けなどせずに、対応する動きベクトルを単純平均することによって主被写体の動きベクトルを検出する。S707では、角速度データ、焦点距離データ等を用いて主被写体角速度を算出する。   Therefore, when the panning angular velocity is low, the number of histogram divisions is equal to or greater than a predetermined value in S701. In this case, since the result of the histogram represents the motion of the main subject sufficiently accurately, in S706, the subject detection means 132d simply averages the corresponding motion vectors without weighting based on the focus detection frame. Thus, the motion vector of the main subject is detected. In S707, the main subject angular velocity is calculated using angular velocity data, focal length data, and the like.

S708では、主被写体角速度を0に設定する。この場合は、像振れ補正は行われない。   In S708, the main subject angular velocity is set to zero. In this case, image blur correction is not performed.

以上、実施例2によれば、ヒストグラム作成手段132bは、パンニング角速度に応じてヒストグラムの分割数を変更する。具体的には、ヒストグラムにおける第1パンニング角速度の分割数よりも、第1パンニング角速度よりも高い第2パンニング角速度のそれを少なくする。これによって、主被写体の動きベクトルの検出を容易にし、流し撮りアシスト機能を発揮させ易くする。また、実施例2によれば、パンニング角速度に応じて主被写体の動きベクトルの算出方法を変更している。具体的には、第1パンニング角速度における算出方法では、閾値以上の度数に対応する動きベクトルをそのまま使用して(例えば、単純平均して)主被写体の動きベクトルを検出する。一方、第2パンニング角速度における算出方法では、閾値以上の度数に対応する動きベクトルのうち、焦点検出枠近傍の動きベクトルのみを使用するか、重み付けをして焦点検出枠から離れた動きベクトルと加算して平均をとっている。これによって、主被写体の動きベクトルが存在する可能性がより高い領域の結果を表すデータに変換し、そのデータから主被写体の動きベクトルを検出している。   As described above, according to the second embodiment, the histogram creating unit 132b changes the division number of the histogram according to the panning angular velocity. Specifically, the second panning angular velocity higher than the first panning angular velocity is less than the number of divisions of the first panning angular velocity in the histogram. This facilitates the detection of the motion vector of the main subject and facilitates the use of the panning assist function. Further, according to the second embodiment, the method for calculating the motion vector of the main subject is changed according to the panning angular velocity. Specifically, in the calculation method at the first panning angular velocity, the motion vector of the main subject is detected using the motion vector corresponding to the frequency equal to or higher than the threshold value as it is (for example, by simple averaging). On the other hand, in the calculation method for the second panning angular velocity, only the motion vectors in the vicinity of the focus detection frame among the motion vectors corresponding to the frequency equal to or higher than the threshold value are used, or weighted and added to the motion vector away from the focus detection frame. And take the average. As a result, the data is converted into data representing the result of the region where the motion vector of the main subject is more likely to exist, and the motion vector of the main subject is detected from the data.

実施例1と2の方法は同時に適用されてもよい。   The methods of Examples 1 and 2 may be applied simultaneously.

以上、本発明の実施例について説明したが、本発明はその要旨の範囲内で種々の変形及び変更が可能である。   Although the embodiments of the present invention have been described above, the present invention can be variously modified and changed within the scope of the gist thereof.

本発明の撮像装置は、デジタルカメラ、デジタルビデオカメラ、携帯電話等の撮像装置の用途に適用することができる。   The imaging device of the present invention can be applied to the use of an imaging device such as a digital camera, a digital video camera, and a mobile phone.

132a…設定手段、132b…ヒストグラム作成手段、132c…被写体速度算出手段、132d…被写体検出手段 132a ... setting means, 132b ... histogram creation means, 132c ... subject speed calculation means, 132d ... subject detection means

Claims (14)

フレーム画像における複数の領域のそれぞれの動きベクトルの情報に基づいて、該動きベクトルの大きさと度数との関係を示すヒストグラムを作成するヒストグラム作成手段と、
前記ヒストグラム作成手段が作成した前記ヒストグラムにおける度数の閾値を設定する設定手段と、
前記ヒストグラムにおいて、前記設定手段が設定した閾値以上の度数を有する前記動きベクトルの大きさの情報に基づいて、動体の動きベクトルを検出する検出手段と、
を有し、
前記設定手段は、前記フレーム画像を得る際の撮像装置が第1角速度で回転されたときの前記閾値よりも、前記撮像装置が前記第1角速度よりも高い第2角速度で回転されたときの前記閾値を低く設定することを特徴とする動きベクトル検出装置。
Histogram creation means for creating a histogram indicating the relationship between the magnitude of the motion vector and the frequency based on the information on the motion vector of each of the plurality of regions in the frame image;
Setting means for setting a frequency threshold in the histogram created by the histogram creating means;
Detecting means for detecting a motion vector of a moving object based on information on the magnitude of the motion vector having a frequency equal to or higher than a threshold set by the setting means in the histogram;
Have
The setting means is configured such that when the imaging device is rotated at a second angular velocity higher than the first angular velocity than the threshold value when the imaging device is rotated at the first angular velocity when obtaining the frame image. A motion vector detection apparatus characterized by setting a threshold value low.
前記設定手段は、前記撮像装置の角速度が大きいほど前記閾値を小さくすることを特徴とする請求項1に記載の動きベクトル検出装置。   The motion vector detection device according to claim 1, wherein the setting unit decreases the threshold as the angular velocity of the imaging device increases. フレーム画像における複数の領域の動きベクトルの情報に基づいて、該動きベクトルの大きさと度数との関係を示すヒストグラムを作成するヒストグラム作成手段と、
前記ヒストグラム作成手段が作成した前記ヒストグラムにおいて、閾値以上の度数を有する前記動きベクトルの大きさの情報に基づいて、動体の動きベクトルを検出する検出手段と、
を有し、
前記ヒストグラム作成手段は、前記フレーム画像を得る際の撮像装置が第1角速度で回転されたときの前記ヒストグラムにおけるビンの数よりも、前記撮像装置が前記第1角速度よりも高い第2角速度で回転されたときの前記ビンの数を少なく設定することを特徴とする動きベクトル検出装置。
Histogram creation means for creating a histogram showing the relationship between the magnitude of the motion vector and the frequency based on information on motion vectors of a plurality of regions in the frame image;
In the histogram created by the histogram creating means, detecting means for detecting a motion vector of a moving object based on information on the magnitude of the motion vector having a frequency equal to or higher than a threshold value;
Have
The histogram creating means rotates the imaging device at a second angular velocity higher than the first angular velocity than the number of bins in the histogram when the imaging device at the time of obtaining the frame image is rotated at the first angular velocity. A motion vector detection apparatus characterized in that the number of bins when set is small.
前記ヒストグラム作成手段は、前記撮像装置の角速度が大きいほど前記ビンの数を少なく設定することを特徴とする請求項3に記載の動きベクトル検出装置。   The motion vector detection device according to claim 3, wherein the histogram creation unit sets the number of bins to be smaller as the angular velocity of the imaging device is larger. 前記ヒストグラム作成手段は、前記動きベクトルの大きさが0の位置が中心となるビンを含むように前記ビンを設定することを特徴とした請求項3または4に記載の動きベクトル検出装置。   5. The motion vector detection device according to claim 3, wherein the histogram creation unit sets the bin so as to include a bin centered at a position where the magnitude of the motion vector is zero. 前記ヒストグラム作成手段は、ビンの位置が互いにずれている複数のヒストグラムを作成し、
前記検出手段は、前記複数のヒストグラムの一つに基づいて前記動体の動きベクトルを検出することを特徴とした請求項3または4に記載の動きベクトル検出装置。
The histogram creating means creates a plurality of histograms in which bin positions are shifted from each other,
5. The motion vector detection apparatus according to claim 3, wherein the detection unit detects a motion vector of the moving object based on one of the plurality of histograms.
前記ヒストグラム作成手段は、前記撮像装置が前記第2角速度で回転された場合、前記動きベクトルの大きさが0の位置を含む第1範囲にある前記ビンの数を少なく設定し、前記第1範囲の外側の第2範囲にあるビンの数を少なく設定しないことを特徴とした請求項4に記載の動きベクトル検出装置。   When the imaging device is rotated at the second angular velocity, the histogram creation means sets the number of the bins in the first range including a position where the magnitude of the motion vector is 0, and sets the first range. The motion vector detection device according to claim 4, wherein the number of bins in the second range outside is not set to be small. 請求項1乃至7のうちいずれか1項に記載の動きベクトル検出装置と、
該動きベクトル検出装置によって検出された前記動体の前記動きベクトル、前記フレーム画像を得る際の前記撮像装置の焦点距離、前記フレーム画像を得る際の前記撮像装置の角速度の情報に基づいて前記動体の角速度を算出する算出手段と、
を有することを特徴とする動体角速度算出装置。
The motion vector detection device according to any one of claims 1 to 7,
Based on the motion vector of the moving object detected by the motion vector detecting device, the focal length of the imaging device when obtaining the frame image, and the angular velocity information of the imaging device when obtaining the frame image. A calculation means for calculating an angular velocity;
A moving object angular velocity calculation device comprising:
主被写体としての前記動体の角速度を算出する請求項8に記載の動体角速度算出装置を有することを特徴とする撮像装置。   9. An imaging apparatus comprising the moving object angular velocity calculation device according to claim 8, wherein an angular velocity of the moving object as a main subject is calculated. 前記検出手段は、前記閾値以上の度数を有する前記動きベクトルを動きベクトルを平均することによって前記動体の動きベクトルを検出することを特徴とする請求項9に記載の撮像装置。   The imaging device according to claim 9, wherein the detection unit detects a motion vector of the moving object by averaging motion vectors of the motion vectors having a frequency equal to or greater than the threshold. 前記フレーム画像に設定された焦点検出枠において焦点検出を行う焦点検出手段を更に有し、
前記検出手段は、前記焦点検出枠から所定範囲にある動きベクトルに重み付けをし、所定範囲外にある動きベクトルと加算して平均することによって前記動体の動きベクトルを検出することを特徴とする請求項10に記載の撮像装置。
A focus detection unit that performs focus detection in a focus detection frame set in the frame image;
The detection means weights a motion vector within a predetermined range from the focus detection frame, adds the motion vector outside the predetermined range, and averages the motion vector to detect the motion vector of the moving object. Item 15. The imaging device according to Item 10.
前記フレーム画像に設定された焦点検出枠において焦点検出を行う焦点検出手段を更に有し、
前記検出手段は、前記焦点検出枠から所定範囲にある動きベクトルを平均することによって前記動体の動きベクトルを検出することを特徴とする請求項10に記載の撮像装置。
A focus detection unit that performs focus detection in a focus detection frame set in the frame image;
The imaging device according to claim 10, wherein the detection unit detects a motion vector of the moving object by averaging motion vectors within a predetermined range from the focus detection frame.
前記動体角速度算出装置が検出した前記動体の角速度に基づいて、光軸に直交する方向に移動されて像振れを補正する補正レンズを更に有することを特徴とする請求項9に記載の撮像装置。   The imaging apparatus according to claim 9, further comprising a correction lens that is moved in a direction orthogonal to the optical axis based on the angular velocity of the moving object detected by the moving object angular velocity calculation device and corrects image blur. 請求項9乃至11のうちいずれか1項に記載の撮像装置に交換可能に装着されるレンズ装置であって、
前記レンズ装置と前記撮像装置の一方は、前記レンズ装置が装着された前記撮像装置の角速度を検出する撮像装置角速度検出手段を有し、
前記レンズ装置は、
光軸に直交する方向に移動されて像振れを補正する補正レンズと、
前記撮像装置の前記動体角速度算出装置が検出した前記動体の角速度と前記撮像装置角速度検出手段が検出した前記撮像装置の角速度の情報に基づいて、前記動体が静止した画像が得られるように前記補正レンズの駆動を制御する制御手段と、
を有することを特徴とするレンズ装置。
A lens device that is replaceably attached to the imaging device according to any one of claims 9 to 11,
One of the lens device and the imaging device has an imaging device angular velocity detection means for detecting an angular velocity of the imaging device to which the lens device is attached,
The lens device is
A correction lens that is moved in a direction perpendicular to the optical axis to correct image blur;
Based on the information on the angular velocity of the moving body detected by the moving body angular velocity calculation device of the imaging device and the angular velocity of the imaging device detected by the imaging device angular velocity detection means, the correction is performed so that an image in which the moving body is stationary is obtained. Control means for controlling the driving of the lens;
A lens device comprising:
JP2015051761A 2015-03-16 2015-03-16 Motion vector detection device, moving object angular velocity calculation device, imaging device, and lens device Expired - Fee Related JP6465705B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015051761A JP6465705B2 (en) 2015-03-16 2015-03-16 Motion vector detection device, moving object angular velocity calculation device, imaging device, and lens device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015051761A JP6465705B2 (en) 2015-03-16 2015-03-16 Motion vector detection device, moving object angular velocity calculation device, imaging device, and lens device

Publications (2)

Publication Number Publication Date
JP2016171541A JP2016171541A (en) 2016-09-23
JP6465705B2 true JP6465705B2 (en) 2019-02-06

Family

ID=56984333

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015051761A Expired - Fee Related JP6465705B2 (en) 2015-03-16 2015-03-16 Motion vector detection device, moving object angular velocity calculation device, imaging device, and lens device

Country Status (1)

Country Link
JP (1) JP6465705B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6932531B2 (en) * 2017-03-28 2021-09-08 キヤノン株式会社 Image blur correction device, image pickup device, control method of image pickup device
JP7058945B2 (en) * 2017-04-24 2022-04-25 キヤノン株式会社 Image stabilization device and its control method, image pickup device
JP7071204B2 (en) * 2018-04-27 2022-05-18 キヤノン株式会社 Imaging system, lens device, imaging device, and its control method
JP7224839B2 (en) 2018-10-09 2023-02-20 キヤノン株式会社 Imaging device and its control method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009272870A (en) * 2008-05-07 2009-11-19 Olympus Corp Image processor, image processing method, and image processing program
JP5473260B2 (en) * 2008-06-27 2014-04-16 キヤノン株式会社 Imaging device
US8929655B2 (en) * 2008-10-16 2015-01-06 Nikon Corporation Image evaluation apparatus and camera
JP5811654B2 (en) * 2011-07-15 2015-11-11 カシオ計算機株式会社 Image processing apparatus, image processing method, and program
JP6261205B2 (en) * 2013-06-28 2018-01-17 キヤノン株式会社 Image processing device

Also Published As

Publication number Publication date
JP2016171541A (en) 2016-09-23

Similar Documents

Publication Publication Date Title
US10104299B2 (en) Zoom control apparatus, zoom control method, and storage medium
US10148889B2 (en) Image processing apparatus and control method thereof, image capturing apparatus and storage medium
US10194085B2 (en) Image pickup apparatus and its control method
US9955069B2 (en) Control apparatus, storage medium for storing control program, control method, and optical apparatus
CN104065868A (en) Image capture apparatus and control method thereof
US20170353654A1 (en) Image capturing apparatus and method of controlling the same
CN108712601B (en) Image blur correction apparatus, control method, image pickup apparatus, and lens apparatus
CN107786809B (en) Image pickup and accessory apparatus, communication control method thereof, image pickup system, and storage medium
US20120057034A1 (en) Imaging system and pixel signal readout method
US11012627B2 (en) Image capturing apparatus and control method thereof
JP2016171460A (en) Image processing system, image processing method, program and storage medium
US11812133B2 (en) Image processing apparatus and method for controlling image processing apparatus
JP6465705B2 (en) Motion vector detection device, moving object angular velocity calculation device, imaging device, and lens device
US9692973B2 (en) Image capturing apparatus and control method therefor
US10659692B2 (en) Image blur correction device, imaging apparatus, control method of imaging apparatus and non-transitory storage medium
JP2019138979A (en) Image shake correction device, imaging system, control method thereof, and program
US10554891B2 (en) Image stabilization apparatus, image stabilization method, image capturing apparatus, image capturing system and non-transitory storage medium
JP7131541B2 (en) Image processing device, image processing method and image processing program
US11190686B2 (en) Control apparatus and control method for image detection with blur correction
US10951829B2 (en) Image capturing apparatus and method for controlling display
JP7254555B2 (en) IMAGING DEVICE AND METHOD OF CONTROLLING IMAGING DEVICE
US10681274B2 (en) Imaging apparatus and control method thereof
JP2010183353A (en) Photographing device
JP6778014B2 (en) Imaging device and its control method, program, storage medium
WO2020012960A1 (en) Imaging device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180305

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181129

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190108

R151 Written notification of patent or utility model registration

Ref document number: 6465705

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees