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
JP7710293B2 - Image blur correction device, control method thereof, and program - Google Patents
[go: Go Back, main page]

JP7710293B2 - Image blur correction device, control method thereof, and program - Google Patents

Image blur correction device, control method thereof, and program

Info

Publication number
JP7710293B2
JP7710293B2 JP2020154011A JP2020154011A JP7710293B2 JP 7710293 B2 JP7710293 B2 JP 7710293B2 JP 2020154011 A JP2020154011 A JP 2020154011A JP 2020154011 A JP2020154011 A JP 2020154011A JP 7710293 B2 JP7710293 B2 JP 7710293B2
Authority
JP
Japan
Prior art keywords
subject
correction amount
blur
motion
motion vector
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
JP2020154011A
Other languages
Japanese (ja)
Other versions
JP2021096460A5 (en
JP2021096460A (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 US17/116,868 priority Critical patent/US11575834B2/en
Publication of JP2021096460A publication Critical patent/JP2021096460A/en
Priority to US18/148,823 priority patent/US12026856B2/en
Publication of JP2021096460A5 publication Critical patent/JP2021096460A5/ja
Application granted granted Critical
Publication of JP7710293B2 publication Critical patent/JP7710293B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Adjustment Of Camera Lenses (AREA)
  • Studio Devices (AREA)

Description

本発明は、撮像装置において、像ブレを補正する技術に関するものである。 The present invention relates to a technology for correcting image blur in an imaging device.

デジタルカメラ等の撮像装置では、カメラ本体部を保持するユーザの「手振れ」によって、画像にブレが生じてしまう場合がある。また人物などの被写体が移動して被写体位置が変化する「被写体振れ」によって、画像にブレが生じてしまう場合もある。 In imaging devices such as digital cameras, images may become blurred due to "hand shake" by the user holding the camera body. Images may also become blurred due to "subject shake," which occurs when a subject, such as a person, moves and changes the subject position.

「手振れ」を検出する方法としては、撮像装置に取り付けた角速度センサを用いる方法や、撮像画像内の静止物体(背景)の動きベクトルを用いる方法がある。一方、「被写体振れ」を検出する方法としては、撮像画像内で被写体を検出し、被写体の動きベクトルを用いる方法がある。 Methods for detecting "camera shake" include using an angular velocity sensor attached to the imaging device, and using the motion vector of a stationary object (background) in the captured image. On the other hand, a method for detecting "subject shake" includes detecting a subject in the captured image and using the motion vector of the subject.

「手振れ」や「被写体振れ」に起因する像ブレを補正する方式には、光学式ブレ補正と電子式ブレ補正がある。光学式ブレ補正では、光学系内の補正レンズまたは撮像素子を振れに応じて動かし、撮像素子の受光面に結像される像を、振れを打ち消すように移動させることにより像ブレを補正する。電子式ブレ補正では、撮像画像に対する画像処理により疑似的にブレを補正する。 There are two methods for correcting image blur caused by camera shake or subject movement: optical blur correction and electronic blur correction. With optical blur correction, the correction lens or image sensor in the optical system is moved in response to the shake, and the image formed on the light-receiving surface of the image sensor is moved in a way that counteracts the shake, thereby correcting the image blur. With electronic blur correction, image processing is performed on the captured image to artificially correct the shake.

「手振れ」と「被写体振れ」では一般に振れ量(振れの向き及び大きさ)が異なるので、両者を完全に補正することはできない。そこで、例えば特許文献1には、被写体の顔が検出された場合に「被写体振れ」を補正し、被写体の顔が検出されない場合に「手振れ」を補正する技術が開示されている。 "Camera shake" and "subject shake" generally have different amounts of shake (the direction and magnitude of the shake), so it is not possible to completely correct both. Therefore, for example, Patent Document 1 discloses a technology that corrects "subject shake" when the subject's face is detected, and corrects "camera shake" when the subject's face is not detected.

特開2007-201534号公報JP 2007-201534 A

「手振れ」と「被写体振れ」のいずれを補正対象にすべきかは、撮影シーンにおけるユーザの意図(着目対象)によって異なると考えられる。例えば、ユーザが背景に着目している場合は、画面全体の振れである「手振れ」が補正されていることが望ましい。一方、ユーザが主被写体に着目している場合は、「被写体振れ」が補正されていることが望ましい。そのため、撮影シーンと共に変化するユーザの意図に合わせて、振れ補正対象を適切に制御する必要がある。 Whether to correct "camera shake" or "subject shake" is thought to depend on the user's intention (target of focus) in the shooting scene. For example, if the user is focusing on the background, it is desirable to correct "camera shake," which is the shaking of the entire screen. On the other hand, if the user is focusing on the main subject, it is desirable to correct "subject shake." For this reason, it is necessary to appropriately control the target of shake correction according to the user's intention, which changes along with the shooting scene.

しかしながら、特許文献1に開示された技術では、ユーザの意図に関わらず、顔検出の有無で振れ補正対象を切り替えているため、シーンによってはユーザの意図に適した像ブレ補正効果が得られないという課題があった。さらに、特許文献1の技術を動画に適用した場合、顔検出の有無で振れ補正対象を二値的に切り替えるため、切り替え時に微小ではあっても映像の不自然なシフトが生じるという課題があった。 However, the technology disclosed in Patent Document 1 switches the shake correction target depending on whether or not a face is detected, regardless of the user's intention, which causes the problem that the image stabilization effect suited to the user's intention cannot be obtained depending on the scene. Furthermore, when the technology in Patent Document 1 is applied to moving images, there is a problem that an unnatural shift in the image occurs when switching, even if it is very small, because the shake correction target is switched in a binary manner depending on whether or not a face is detected.

本発明は上述した課題に鑑みてなされたものであり、その目的は、ユーザの望む像ブレ補正効果が得られる像ブレ補正装置を提供することである。 The present invention has been made in consideration of the above-mentioned problems, and its purpose is to provide an image stabilization device that can achieve the image stabilization effect desired by the user.

本発明に係わる像ブレ補正装置は、入力画像に対して、特定の被写体を検出し、被写体情報を出力する被写体検出手段と、撮影状況を推定するために必要なカメラ情報を取得するカメラ情報取得手段と、前記被写体情報と前記カメラ情報とを用いて、画像内の着目対象を推定する推定手段と、入力画像における背景の動きと被写体の動きを検出する第1の動き検出手段と、前記第1の動き検出手段により検出された背景の動きと被写体の動きを、それぞれ背景のブレを補正する第1のブレ補正量と被写体のブレを補正する第2のブレ補正量に変換する変換手段と、前記推定手段より推定された前記着目対象に基づいて、前記第1のブレ補正量と前記第2のブレ補正量を合成して、最終的なブレ補正量を生成する補正量算出手段と、を備え、前記カメラ情報は、シャッタスピードを示す情報、AFエリアを示す情報、焦点距離を示す情報、ユーザ操作を示す情報、慣性センサの検出結果を示す情報、被写体までの距離を示す情報、ユーザの視線検出結果を示す情報の少なくともいずれかを含むことを特徴とする。 an image blur correction device according to the present invention comprising: subject detection means for detecting a specific subject in an input image and outputting subject information; camera information acquisition means for acquiring camera information necessary for estimating a shooting situation; estimation means for estimating an object of interest in the image using the subject information and the camera information; first motion detection means for detecting background movement and subject movement in the input image; conversion means for converting the background movement and subject movement detected by the first motion detection means into a first blur correction amount for correcting background blur and a second blur correction amount for correcting subject blur, respectively; and correction amount calculation means for combining the first blur correction amount and the second blur correction amount based on the object of interest estimated by the estimation means to generate a final blur correction amount, wherein the camera information includes at least any of information indicating a shutter speed, information indicating an AF area, information indicating a focal length, information indicating a user operation, information indicating a detection result of an inertial sensor, information indicating a distance to the subject, and information indicating a detection result of a user's line of sight .

本発明によれば、ユーザの望む像ブレ補正効果が得られる像ブレ補正装置を提供することが可能となる。 The present invention makes it possible to provide an image stabilization device that can achieve the image stabilization effect desired by the user.

本発明の第1の実施形態に係わる撮像装置の構成を示すブロック図。1 is a block diagram showing the configuration of an image capturing apparatus according to a first embodiment of the present invention. 第1の実施形態で行われる処理を説明するフローチャート。4 is a flowchart illustrating a process performed in the first embodiment. カメラ情報と着目対象の関係を示す図。FIG. 4 is a diagram showing the relationship between camera information and an object of interest. テンプレートマッチングを説明する図。FIG. 4 is a diagram for explaining template matching. 相関値マップを説明する図。FIG. 13 is a diagram for explaining a correlation value map. 動き分離を説明する図。FIG. 第2の実施形態に係わる撮像装置の構成を示すブロック図。FIG. 13 is a block diagram showing the configuration of an image capturing apparatus according to a second embodiment. 第2の実施形態で行われる処理を説明するフローチャート。10 is a flowchart illustrating a process performed in a second embodiment. 相関値マップの表現方法を説明する図。FIG. 13 is a diagram for explaining a method of expressing a correlation value map. 動きベクトルの信頼度を表わす相関値指標を説明する図。11A and 11B are diagrams for explaining a correlation value index representing the reliability of a motion vector. 動きベクトルの信頼度の算出方法を説明する図。5A and 5B are diagrams for explaining a method of calculating the reliability of a motion vector. 動き分離の分離度が低い例を説明する図。11A and 11B are diagrams for explaining an example in which the degree of separation of motion is low; 動きの分離度の算出方法を説明する図。5A and 5B are diagrams for explaining a method of calculating a degree of separation of motion. 第3の実施形態に係わる撮像装置の構成を示すブロック図。FIG. 13 is a block diagram showing the configuration of an imaging apparatus according to a third embodiment. 第3の実施形態で行われる処理を説明するフローチャート。13 is a flowchart illustrating a process performed in a third embodiment. 像ブレ補正に関する表示アイテムを説明する図。5A to 5C are diagrams illustrating display items relating to image stabilization. 像ブレ補正に関する表示アイテムの表示方法を説明する図。5A to 5C are diagrams illustrating a method of displaying display items relating to image stabilization. 本発明の第4の実施形態に係わる撮像装置の構成を示すブロック図。FIG. 13 is a block diagram showing the configuration of an image pickup apparatus according to a fourth embodiment of the present invention. 第4の実施形態で行われる処理を説明するフローチャート。13 is a flowchart illustrating a process performed in the fourth embodiment. ハイパスフィルターの係数とゲインを求める動作を説明する図。5A and 5B are diagrams for explaining an operation for determining a coefficient and a gain of a high-pass filter. ハイパスフィルターの係数とゲインを再設定するための表を示す図。A diagram showing a table for resetting the coefficients and gains of a high-pass filter. ハイパスフィルターの係数とゲインを再設定するための表を示す図。A diagram showing a table for resetting the coefficients and gains of a high-pass filter.

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

(第1の実施形態)
図1は、本発明の第1の実施形態に係わる撮像装置の構成を示す図である。
First Embodiment
FIG. 1 is a diagram showing the arrangement of an image pickup apparatus according to a first embodiment of the present invention.

図1において、光学系101により形成された被写体像は、撮像素子102により画像信号に変換され、現像処理部103によりホワイトバランス処理、色(輝度・色差信号)変換処理、γ補正処理などの現像処理が実施され、画像データ(入力画像データ)として出力される。画像メモリ104は、現像処理部103で現像された画像データを1フレームの間又は複数のフレームの間、一時的に記憶保持する。 In FIG. 1, the subject image formed by the optical system 101 is converted into an image signal by the image sensor 102, and development processing such as white balance processing, color (luminance and color difference signal) conversion processing, and gamma correction processing is performed by the development processing unit 103, and the image data is output as image data (input image data). The image memory 104 temporarily stores and holds the image data developed by the development processing unit 103 for one frame or multiple frames.

動きベクトル検出部105は、現像処理部103および画像メモリ104から入力される画像データから動きベクトルを検出する。動き分離部106は、動きベクトル検出部105により検出された動きベクトルを、背景の動きを表す第1の動きベクトルと、被写体の動きを表す第2の動きベクトルとに分離する。ブレ補正量変換部107は、動き分離部106より得られる第1の動きベクトルおよび第2の動きベクトルを、それぞれ第1のブレ補正量および第2のブレ補正量に変換する。 The motion vector detection unit 105 detects a motion vector from the image data input from the development processing unit 103 and the image memory 104. The motion separation unit 106 separates the motion vector detected by the motion vector detection unit 105 into a first motion vector representing the motion of the background and a second motion vector representing the motion of the subject. The blur correction amount conversion unit 107 converts the first motion vector and second motion vector obtained by the motion separation unit 106 into a first blur correction amount and a second blur correction amount, respectively.

被写体検出部108は、現像処理部103から入力される画像データから特定の被写体を検出し、被写体情報を出力する。被写体情報とは、例えば被写体領域(被写体の位置および大きさ)、被写体の人物らしさ、被写体の動きなどである。 The subject detection unit 108 detects a specific subject from the image data input from the development processing unit 103 and outputs subject information. Subject information includes, for example, the subject area (position and size of the subject), the subject's human-likeness, the subject's movement, etc.

カメラ情報取得部109は、撮影状況を推定するために必要なカメラ情報を取得する。カメラ情報とは、例えば撮影モード、シャッタースピード、AFエリア情報、焦点距離、ユーザ指示情報、慣性センサ情報、奥行き情報、視線情報などである。 The camera information acquisition unit 109 acquires camera information necessary to estimate the shooting conditions. Camera information includes, for example, the shooting mode, shutter speed, AF area information, focal length, user instruction information, inertial sensor information, depth information, and line of sight information.

着目対象推定部110は、被写体検出部108により得られる被写体情報、および、カメラ情報取得部109により得られるカメラ情報を用いて、画像内の着目対象を推定する。 The target object estimation unit 110 estimates the target object in the image using the subject information obtained by the subject detection unit 108 and the camera information obtained by the camera information acquisition unit 109.

ブレ補正量算出部111は、着目対象推定部110により得られる着目対象の情報に基づいて、ブレ補正量変換部107により得られる第1のブレ補正量および第2のブレ補正量を合成することで、最終的なブレ補正量を生成する。 The blur correction amount calculation unit 111 generates a final blur correction amount by combining the first blur correction amount and the second blur correction amount obtained by the blur correction amount conversion unit 107 based on the information on the target of interest obtained by the target of interest estimation unit 110.

生成されたブレ補正量は、光学式ブレ補正手段である光学系101内の補正レンズ及び/または撮像素子102を光軸に垂直な方向にシフトさせるシフト機構に出力され、光学式ブレ補正が行われる。なお、本発明は光学式ブレ補正に限定されるものではなく、ブレ補正量を不図示の電子式ブレ補正手段に出力して、電子式ブレ補正を行ってもよい。 The generated shake correction amount is output to a shift mechanism that shifts the correction lens in the optical system 101, which is the optical shake correction means, and/or the image sensor 102 in a direction perpendicular to the optical axis, and optical shake correction is performed. Note that the present invention is not limited to optical shake correction, and the shake correction amount may be output to an electronic shake correction means (not shown) to perform electronic shake correction.

次に、上記のように構成される撮像装置100における像ブレ補正動作について、図2に示すフローチャートを用いて説明する。 Next, the image stabilization operation of the imaging device 100 configured as described above will be explained using the flowchart shown in FIG.

ステップS201では、被写体検出部108は、現像処理部103から入力される画像データから特定の被写体を検出し、被写体情報を出力する。被写体情報としては、被写体領域情報(被写体の位置および大きさ)、被写体の人物らしさの情報、被写体の動き情報を用いる。特定の被写体としては、人物の顔が代表的である。検出方法は公知の顔検出方法を用いればよい。顔検出の公知技術としては、顔に関する知識(肌色情報、目・鼻・口などのパーツ)を利用する方法や、ニューラルネットワークに代表される学習アルゴリズムにより顔検出のための識別器を構成する方法などがある。そして、検出精度の向上のために、これらを組み合わせて顔検出を行うのが一般的である。 In step S201, the subject detection unit 108 detects a specific subject from the image data input from the development processing unit 103, and outputs subject information. As subject information, subject area information (position and size of the subject), information on the subject's human-likeness, and subject movement information are used. A typical example of a specific subject is a human face. A publicly known face detection method may be used as the detection method. Publicly known face detection techniques include a method that uses knowledge about the face (skin color information, features such as the eyes, nose, and mouth), and a method that uses a learning algorithm such as a neural network to configure a classifier for face detection. To improve detection accuracy, it is common to combine these methods to perform face detection.

なお、画像中に複数の人物の顔が存在する場合は、最も主要と考えられる顔を一つ選択して出力するものとする。選択方法としては、例えば顔のサイズが大きく、顔の位置が画像の中央に近く、顔検出の信頼度が高いものほど優先的に選択すればよい。また複数の候補からユーザに選択させるようにしてもよい。 When multiple human faces are present in an image, the face that is considered to be the most dominant is selected and output. As a selection method, for example, the face that is larger, closer to the center of the image, and has a higher reliability in face detection may be selected first. Alternatively, the user may be allowed to select from multiple candidates.

以上の方法により、被写体情報として、被写体領域および被写体の人物らしさを得ることができる。また、被写体の動きは、例えば連続するフレーム画像間で、被写体領域の重心の変位量を求めることで得られる。 By using the above method, the subject area and the human-like nature of the subject can be obtained as subject information. In addition, the movement of the subject can be obtained by calculating the amount of displacement of the center of gravity of the subject area between successive frame images, for example.

ステップS202では、カメラ情報取得部109は、撮影状況を推定するために必要なカメラ情報を取得する。カメラ情報としては、撮影モード情報、シャッタースピード情報、AFエリア情報、焦点距離情報、ユーザ指示情報、慣性センサ情報、奥行き情報、視線情報を用いるものとする。 In step S202, the camera information acquisition unit 109 acquires camera information necessary to estimate the shooting conditions. The camera information to be used includes shooting mode information, shutter speed information, AF area information, focal length information, user instruction information, inertial sensor information, depth information, and line of sight information.

撮影モード情報、シャッタースピード情報、AFエリア情報、焦点距離情報、ユーザ指示情報に関しては、ユーザがカメラに設定した値を読み取ることで取得できる。ユーザ指示情報は、後述する背景または被写体に対する着目度合いを示す情報で、ユーザがカメラで直接設定できるものである。 Shooting mode information, shutter speed information, AF area information, focal length information, and user instruction information can be obtained by reading the values set by the user on the camera. User instruction information is information that indicates the degree of attention to the background or subject, which will be described later, and can be set directly by the user on the camera.

慣性センサ情報は、カメラに設置された角速度センサや加速度センサにより得られ、カメラの位置姿勢を表す情報である。奥行き情報は、例えば測距センサを用いるか、あるいは、撮像画像データから公知のSfM(Structure from Motion)を用いて検出する。視線情報は、公知の角膜反射法などの手法により得られ、画像内の視線が位置する領域を示す情報である。 Inertial sensor information is obtained by an angular velocity sensor or acceleration sensor installed in the camera, and is information that indicates the position and orientation of the camera. Depth information is detected, for example, by using a distance measurement sensor, or from captured image data using the well-known SfM (Structure from Motion). Gaze information is obtained by a well-known method such as the corneal reflex method, and is information that indicates the area in the image where the gaze is located.

ステップS203では、着目対象推定部110は、ステップS201で検出した被写体情報およびステップS202で取得したカメラ情報に基づいて、撮影者が着目対象として背景と被写体のいずれに着目しているかを推定する。 In step S203, the focus estimation unit 110 estimates whether the photographer is focusing on the background or the subject based on the subject information detected in step S201 and the camera information acquired in step S202.

被写体情報およびカメラ情報に基づいて、着目対象を推定する方法について説明する。ここでは、まずそれぞれの情報ごとに着目対象が背景である度合いを表す背景度合いと、着目対象が被写体である度合いを表す被写体度合いを算出する。ここでは、背景度合いと被写体度合いを合計して1になる数値として表現する。なお、背景度合いと被写体度合いのいずれか一方だけを算出するようにしてもよい。 A method for estimating an object of interest based on subject information and camera information is described below. First, for each piece of information, a background degree, which indicates the degree to which the object of interest is the background, and a subject degree, which indicates the degree to which the object of interest is the subject, are calculated. Here, the background degree and subject degree are expressed as a numerical value that sums to 1. Note that it is also possible to calculate only one of the background degree or subject degree.

まず、被写体情報に関して説明する。被写体の位置については、被写体が画面中央に近いほど被写体に着目して撮影している可能性が高いので、被写体度合いを高く(例えば0.8)、背景度合いを低く(例えば0.2)する。 First, we will explain the subject information. Regarding the subject's position, the closer the subject is to the center of the screen, the more likely it is that the subject was the focus of the shot, so the subject degree is set high (e.g., 0.8) and the background degree is set low (e.g., 0.2).

被写体の大きさについては、被写体が大きいほど、被写体に着目して撮影している可能性が高いので、被写体度合いを高く(例えば0.8)、背景度合いを低く(例えば0.2)する。 Regarding the size of the subject, the larger the subject, the more likely it is that the subject was the focus of the photo, so the subject degree is set high (e.g., 0.8) and the background degree is set low (e.g., 0.2).

被写体の人物らしさについては、被写体がより人物らしいほど、被写体に着目して撮影している可能性が高いので、被写体度合いを高く(例えば0.7)、背景度合いを低く(例えば0.3)する。 Regarding the subject's human-likeness, the more the subject resembles a person, the more likely it is that the subject was the focus of the photo, so the subject degree is set high (e.g., 0.7) and the background degree is set low (e.g., 0.3).

被写体の動きについては、被写体の動きが小さいほど、被写体を捉えようとカメラを構えていることが想定され、被写体に着目して撮影している可能性が高いので、被写体度合いを高く(例えば0.6)、背景度合いを低く(例えば0.4)する。 Regarding the subject's movement, the smaller the subject's movement, the more likely it is that the camera is being held to capture the subject, and the more likely it is that the subject is being photographed with a focus on it, so the subject degree is set high (e.g., 0.6) and the background degree is set low (e.g., 0.4).

続いてカメラ情報に関して説明する。撮影モードについては、例えば、ポートレートモードの場合には人物(=被写体)に着目して撮影している可能性が高いので、被写体度合を高く(例えば0.9)、背景度合いを低く(例えば0.1)する。一方、風景モードの場合には風景に着目して撮影している可能性が高いため、被写体度合いを低く(例えば0.1)、背景度合いを高く(例えば0.9)する。このように、撮影モードでは、モードによって可能性の高い撮影状況を想定することで、背景度合いおよび被写体度合いを決めることができる。 Next, the camera information will be explained. Regarding the shooting mode, for example, in portrait mode, it is highly likely that the image was shot with a focus on a person (= subject), so the subject degree is set high (e.g. 0.9) and the background degree is set low (e.g. 0.1). On the other hand, in landscape mode, it is highly likely that the image was shot with a focus on the landscape, so the subject degree is set low (e.g. 0.1) and the background degree is set high (e.g. 0.9). In this way, the shooting mode can determine the background degree and subject degree by assuming the most likely shooting situation depending on the mode.

シャッタースピードについては、シャッタースピードが速いほど、高速に移動する被写体に着目して撮影している可能性が高いので、被写体度合いを高く(例えば0.7)、背景度合いを低く(例えば0.3)する。 As for the shutter speed, the faster the shutter speed, the more likely it is that the image is being shot with a focus on a fast-moving subject, so the subject degree is set high (e.g., 0.7) and the background degree is set low (e.g., 0.3).

AFエリア情報については、AFエリアが広いほど、背景に着目して撮影している可能性が高いので、被写体度合いを低く(例えば0.3)、背景度合いを高く(例えば0.7)する。また顔認識AFや瞳AFが設定されている場合には、人物や動物などの被写体に着目して撮影している可能性が高いので、被写体度合を高く(例えば0.9)、背景度合いを低く(例えば0.1)する。 For AF area information, the wider the AF area, the more likely it is that the background is being focused on when taking the picture, so the subject degree is set low (e.g. 0.3) and the background degree is set high (e.g. 0.7). Also, when face recognition AF or eye AF is set, the more likely it is that the subject, such as a person or animal, is being focused on when taking the picture, so the subject degree is set high (e.g. 0.9) and the background degree is set low (e.g. 0.1).

視線情報については、被写体情報と組み合わせて、例えば画像内の視線が位置する領域が被写体領域であれば、被写体に着目して撮影している可能性が高いので、被写体度合いを高く(例えば0.9)、背景度合いを低く(例えば0.1)する。 When combined with subject information, the gaze information is used to determine, for example, if the area in the image where the gaze is located is the subject area, there is a high possibility that the subject was the focus of the photograph, so the subject degree is increased (e.g., 0.9) and the background degree is decreased (e.g., 0.1).

焦点距離と奥行き情報については、それぞれ単独では撮影者の意図を汲み取ることが難しい。そこで、両者を組み合わせて着目対象を推定する方法の一例について説明する。 It is difficult to understand the photographer's intentions using focal length and depth information alone. Therefore, we will explain an example of a method that combines the two to estimate the subject of interest.

焦点距離f[mm]と、被写体までの距離(奥行き情報)d[mm]が与えられている場合、撮像面上での被写体の大きさをX[mm]とすれば、実際の被写体の大きさY[mm]は、以下の式(1)で算出できる。 If the focal length f [mm] and the distance to the subject (depth information) d [mm] are given, and the size of the subject on the imaging surface is X [mm], the actual size of the subject Y [mm] can be calculated using the following formula (1).

Y=(d/f)・X (1)
実際の被写体の大きさが分かれば、像面上での被写体の大きさや焦点距離との関係から、撮影者の意図を汲み取ることができる。例えば、実際の被写体の大きさは小さいが、像面上での被写体の大きさが大きく、焦点距離が長い場合は、被写体に非常に着目していることになる。そのため、実際の被写体の大きさが小さい、かつ、像面上での被写体の大きさが大きい、かつ、焦点距離が長いほど被写体度合いを高く、背景度合いを低くする。
Y=(d/f)・X (1)
If the actual size of the subject is known, the photographer's intention can be understood from the relationship between the size of the subject on the image plane and the focal length. For example, if the actual size of the subject is small, but the size of the subject on the image plane is large and the focal length is long, the photographer is paying close attention to the subject. Therefore, the smaller the actual size of the subject is, the larger the size of the subject on the image plane is, and the longer the focal length is, the higher the subject degree is and the lower the background degree is.

このように、本実施形態では、複数のカメラ情報を組み合わせることにより、単独のカメラ情報からでは汲み取れない撮影者の意図を把握することができる。 In this way, in this embodiment, by combining information from multiple cameras, it is possible to understand the photographer's intentions, which cannot be understood from information from a single camera.

慣性センサ情報についても、単独では撮影者の意図を汲み取ることが難しい。そこで、慣性センサ情報と被写体の動き情報を組み合わせて着目対象を推定する方法の一例について説明する。撮影者の着目対象が被写体である場合、被写体を画面の定位置に収めようとカメラを動かすため、被写体の動きはカメラの動きに比べて相対的に小さくなる。 It is also difficult to understand the photographer's intentions from inertial sensor information alone. Therefore, we will explain an example of a method for estimating the target of interest by combining inertial sensor information and subject movement information. When the photographer's target of interest is the subject, the camera is moved to keep the subject in a fixed position on the screen, so the subject's movement is relatively small compared to the camera movement.

よって、慣性センサ情報から得られるフレーム画像間のカメラの移動量に対して、被写体の移動量が小さくなるほど、被写体を捉えようとカメラを構えていることが想定される。そのため、被写体に着目して撮影している可能性が高いので、被写体度合いを高く、背景度合いを低くする。 Therefore, the smaller the amount of subject movement is compared to the amount of camera movement between frame images obtained from the inertial sensor information, the more likely it is that the camera is being held to capture the subject. As a result, it is highly likely that the subject is being focused on when taking the picture, so the subject degree is set high and the background degree is set low.

この考え方は流し撮りにもそのまま適用することができる。流し撮りの場合、撮影者が移動する被写体を中央に留めようとカメラを大きく振るため、背景の動きは大きく、被写体の動きは小さくなる。よって、流し撮り時には、慣性センサ情報と被写体の動き情報に基づいて、自動的に被写体度合いが高くなる。 This concept can also be applied to panning. When panning, the photographer shakes the camera widely to keep a moving subject in the center, resulting in large background movements and small subject movements. Therefore, when panning, the subject degree is automatically increased based on inertial sensor information and subject movement information.

以上に説明した被写体情報およびカメラ情報と着目対象との関係について、一部を図3の表にまとめた。カッコ内の数値は、前述した背景度合い/被写体度合いの一例を示している。 The relationship between the subject information and camera information and the target object described above is summarized in the table in Figure 3. The numbers in parentheses indicate an example of the background degree/subject degree described above.

着目対象の推定に利用できる情報が複数ある場合、情報ごとに得られる背景度合いおよび被写体度合いに対してそれぞれ重み付け加算を行い、最終的な背景度合いおよび被写体度合いを算出すればよい。重みは、例えば各情報源の確からしさに基づいて設定すればよい。 When multiple pieces of information are available for estimating the target object, the background degree and subject degree obtained for each piece of information are weighted and added together to calculate the final background degree and subject degree. The weights can be set, for example, based on the reliability of each information source.

例えば情報源として、撮影モード、被写体の人物らしさ、被写体の大きさ、被写体の動き、シャッタースピードがあるとして、それぞれから得られる背景度合いをDa、Db、Dc、Dd、De、重みをGa、Gb、Gc、Gd、Geとする。最終的な背景度合いDは、以下の式(2)で計算することができる。 For example, the information sources are the shooting mode, the subject's human-likeness, the subject's size, the subject's movement, and the shutter speed, and the background degrees obtained from each are Da, Db, Dc, Dd, and De, and the weights are Ga, Gb, Gc, Gd, and Ge. The final background degree D can be calculated using the following formula (2).

D=Ga×Da+Gb×Db+Gc×Dc+Gd×Dd+Ge×De (2)
例えば、重みをGa=0.3、Gb=0.2、Gc=0.2、Gd=0.1、Ge=0.2とする。ここで、重みは合計が1になるよう正規化した。いま、撮影モードが風景モード(Da=0.9)、被写体の人物らしさが高い(Db=0.3)、被写体の大きさが小さい(Dc=0.8)、被写体の動きが小さい(Dd=0.4)、シャッタースピードが遅い(De=0.7)とすれば、式(2)よりD=0.6となる。最終的な被写体度合いについても同じように算出することができる。各情報源の確からしさが同一または不明の場合は、全ての重みを同じにすればよい。
D=Ga×Da+Gb×Db+Gc×Dc+Gd×Dd+Ge×De (2)
For example, the weights are Ga=0.3, Gb=0.2, Gc=0.2, Gd=0.1, and Ge=0.2. Here, the weights are normalized so that the sum is 1. If the shooting mode is landscape mode (Da=0.9), the subject is highly human-like (Db=0.3), the subject is small in size (Dc=0.8), the subject moves little (Dd=0.4), and the shutter speed is slow (De=0.7), then D=0.6 is obtained from formula (2). The final subject degree can be calculated in the same way. If the certainty of each information source is the same or unknown, all the weights should be set to the same.

なお、カメラ情報としてユーザ指示情報を用いる場合、例えば背景と被写体の着目度合いをユーザに指示させることで、推定することなく背景度合いと被写体度合いを決めることができる。着目度合いは直接数値で指示するようにしてもよいし、強弱などのように定性的に指示するようにしてもよい。被写体が複数存在する場合は、いずれかを選択できるようにしてもよい。また水平方向と垂直方向で独立して背景度合いおよび被写体度合いを設定してもよい。 When using user instruction information as camera information, for example, the degree of attention to the background and subject can be determined without estimation by having the user indicate the degree of attention to the background and subject. The degree of attention may be indicated directly as a numerical value, or may be indicated qualitatively, such as strength. If there are multiple subjects, one of them may be selectable. The background degree and subject degree may also be set independently in the horizontal and vertical directions.

ステップS204では、動きベクトル検出部105は、現像処理部103および画像メモリ104から入力される画像に対して、テンプレートマッチングにより動きベクトルを検出する。 In step S204, the motion vector detection unit 105 detects a motion vector by template matching for the image input from the development processing unit 103 and the image memory 104.

図4は、テンプレートマッチングの概要を示した図である。図4(a)は2つのベクトル検出画像のうちの一方である基準画像を示し、図4(b)は他方である参照画像を示している。ここでは、基準画像として画像メモリ104に保持されているフレーム画像、参照画像として現像処理部103から直接入力される画像データを用いることにより、過去のフレーム画像から現在のフレーム画像への動きベクトルを算出する。なお、基準画像と参照画像は逆に入れ替えてもよく、その場合は現在のフレーム画像から過去のフレーム画像への動きベクトルを算出することを意味する。 Figure 4 is a diagram showing an overview of template matching. Figure 4(a) shows a base image, which is one of two vector detection images, and Figure 4(b) shows the other, a reference image. Here, a frame image stored in image memory 104 is used as the base image, and image data directly input from development processing unit 103 is used as the reference image, to calculate a motion vector from a past frame image to a current frame image. Note that the base image and reference image may be swapped, in which case this means that a motion vector is calculated from the current frame image to a past frame image.

動きベクトル検出部105は、基準画像にテンプレート領域301、参照画像にサーチ領域302を配置し、テンプレート領域301とサーチ領域302との相関値を算出する。 The motion vector detection unit 105 places a template area 301 in the base image and a search area 302 in the reference image, and calculates the correlation value between the template area 301 and the search area 302.

ここで、テンプレート領域301の配置は任意であり、画面内に定められた複数の固定的な座標を中心に配置してもよいし、公知の手法により検出される特徴点の座標を中心に配置してもよい。またステップS201で得られる被写体情報を用いて、被写体領域とそれ以外の領域とで配置されるテンプレート領域の数が均等になるよう、配置する座標を定めてもよい。サーチ領域については、テンプレート領域を上下左右均等に包含するように所定の大きさで配置すればよい。 The template regions 301 may be positioned arbitrarily, and may be positioned around multiple fixed coordinates determined within the screen, or around the coordinates of feature points detected by a known method. The subject information obtained in step S201 may also be used to determine the coordinates to be positioned so that the number of template regions positioned in the subject region and other regions is equal. The search region may be positioned with a predetermined size so as to equally encompass the template regions on all four sides.

本実施形態では、相関値の算出方法として、差分絶対値和(Sum of Absolute Difference:以下、SADと略す)を使用する。SADの計算式を式(3)に示す。 In this embodiment, the Sum of Absolute Difference (hereinafter abbreviated as SAD) is used as the method for calculating the correlation value. The calculation formula for SAD is shown in Equation (3).

式(3)において、f(i,j)はテンプレート領域301内の座標(i,j)での輝度値を示している。また、g(i,j)はサーチ領域302内において相関値の算出対象となる領域(以下、相関値算出領域という)303内の各座標での輝度値を示す。SADでは、両領域302,303内の輝度値f(i,j),g(i,j)の差の絶対値を計算し、その総和を求めることにより相関値S_SADを得る。相関値S_SADの値が小さいほど、テンプレート領域301と相関値算出領域303のテクスチャの類似度が高いことを表す。 In equation (3), f(i,j) indicates the luminance value at the coordinates (i,j) in the template region 301. Furthermore, g(i,j) indicates the luminance value at each coordinate in the region (hereafter referred to as the correlation value calculation region) 303 in the search region 302 for which the correlation value is to be calculated. In SAD, the absolute value of the difference between the luminance values f(i,j) and g(i,j) in both regions 302 and 303 is calculated, and the correlation value S_SAD is obtained by calculating the sum of these values. The smaller the correlation value S_SAD, the higher the similarity in texture between the template region 301 and the correlation value calculation region 303.

なお、相関値の算出にSAD以外の方法を用いてもよく、例えば差分二乗和(SSD)や正規化相互相関(NCC)を用いてもよい。 Note that methods other than SAD may be used to calculate the correlation value, such as sum of squared differences (SSD) or normalized cross correlation (NCC).

動きベクトル検出部105は、サーチ領域302の全域において相関値算出領域303を移動させて相関値を算出する。これにより、サーチ領域302に対して図5に示すような相関値マップを作成する。 The motion vector detection unit 105 calculates correlation values by moving the correlation value calculation area 303 throughout the entire search area 302. In this way, a correlation value map such as that shown in FIG. 5 is created for the search area 302.

図5(a)はサーチ領域302の座標系で算出した相関値マップを示しており、X軸とY軸は相関値マップ座標、Z軸は各座標での相関値の大きさを表している。また図5(b)は、図5(a)の等高線を示した図である。 Figure 5(a) shows a correlation value map calculated in the coordinate system of the search region 302, with the X-axis and Y-axis representing the correlation value map coordinates and the Z-axis representing the magnitude of the correlation value at each coordinate. Figure 5(b) shows the contour lines of Figure 5(a).

図5(a)および図5(b)において、相関値が最も小さいのは極小値401であり、サーチ領域302内で極小値401が算出された領域にはテンプレート領域301と非常に類似したテクスチャが存在していると判定できる。402は二番目の極小値、403は三番目の極小値を表わしており、これらは極小値401に次いで類似したテクスチャが存在していることを意味する。 In Figures 5(a) and 5(b), the correlation value is smallest for minimum value 401, and it can be determined that the area in search area 302 where minimum value 401 was calculated has a texture that is very similar to that of template area 301. 402 represents the second minimum value, and 403 represents the third minimum value, which means that a texture next to minimum value 401 exists.

このように、動きベクトル検出部105は、テンプレート領域301とサーチ領域302との間で相関値を算出し、その値が最も小さくなる相関値算出領域303の位置を判定する。これにより、基準画像上のテンプレート領域301の参照画像上での移動先を特定することができる。そして、基準画像上でのテンプレート領域の位置を基準とした参照画像上での移動先への方向および移動量を方向および大きさとした動きベクトルを検出することができる。 In this way, the motion vector detection unit 105 calculates the correlation value between the template area 301 and the search area 302, and determines the position of the correlation value calculation area 303 where this value is smallest. This makes it possible to identify the destination on the reference image of the template area 301 on the standard image. Then, it is possible to detect a motion vector whose direction and magnitude are the direction to the destination on the reference image and the amount of movement based on the position of the template area on the standard image.

ステップS205では、動き分離部106は、ステップS204で検出された動きベクトルを、背景の動きを表す第1の動きベクトル(以下、背景ベクトルと呼ぶ)と、被写体の動きを表す第2の動きベクトル(以下、被写体ベクトルと呼ぶ)とに分離する。 In step S205, the motion separation unit 106 separates the motion vector detected in step S204 into a first motion vector (hereafter referred to as a background vector) representing the motion of the background, and a second motion vector (hereafter referred to as a subject vector) representing the motion of the subject.

分離方法の一例について説明する。最初にステップS201で得られる被写体情報を用いて、被写体領域の外側に属する点で検出された動きベクトルを背景ベクトル、被写体領域の内側に属する点で検出された動きベクトルを被写体ベクトルとして第1の分離処理を行う。 An example of a separation method will be described. First, using the subject information obtained in step S201, a first separation process is performed with the motion vector detected at a point outside the subject region as the background vector and the motion vector detected at a point inside the subject region as the subject vector.

なお、被写体が検出されない場合には、例えばステップS202で得られる奥行き情報に基づく分離が考えられる。その場合は、例えば画像内の所定の奥行きよりも遠い領域に属する点で検出された動きベクトルを背景ベクトル、所定の奥行きよりも近い領域に属する点で検出された動きベクトルを被写体領域として第1の分離処理を行えばよい。被写体が検出されず、かつ、画面内に奥行き差もない場合は、全て背景ベクトルとして分離処理を終了する。 If no subject is detected, separation based on the depth information obtained in step S202 may be considered. In that case, the first separation process may be performed using, for example, a motion vector detected at a point in an area farther than a predetermined depth in the image as a background vector, and a motion vector detected at a point in an area closer than the predetermined depth as a subject area. If no subject is detected and there is no depth difference in the screen, all are treated as background vectors and the separation process ends.

第1の分離処理のみで分離処理を終えてもよいが、このような「被写体領域に基づく分離」では、背景と被写体の境界付近の点で検出された動きベクトルの分類を誤ってしまう場合がある。また、被写体検出の精度の問題で被写体領域が誤っている場合にも、動きベクトルの分類を誤ってしまう場合がある。そのため、さらに第2の分離処理として「動きベクトルの量に基づく分離」を行うことが好ましい。ここでは、例えば公知のk-means法を用いることができる。 The separation process may be completed with only the first separation process, but such "separation based on subject area" may result in incorrect classification of motion vectors detected at points near the boundary between the background and the subject. In addition, if the subject area is incorrect due to a problem with the accuracy of subject detection, the motion vector may also be incorrectly classified. For this reason, it is preferable to further perform "separation based on the amount of motion vector" as a second separation process. Here, for example, the well-known k-means method can be used.

k-means法では、分類するクラスタの数kと、各クラスタの重心の初期値Vkを事前に定める必要がある。クラスタの数については、今回の場合は背景クラスタと被写体クラスタに分離するため、k=2とする。被写体が複数存在する場合には、被写体の数に応じてクラスタ数を変更してもよい。また背景にも被写体にも属さない動きベクトル群を分離するためのクラスタを設けてもよい。 In the k-means method, the number of clusters k to be classified and the initial value Vk of the center of gravity of each cluster must be determined in advance. In this case, the number of clusters is set to k = 2 in order to separate into background clusters and subject clusters. If there are multiple subjects, the number of clusters may be changed according to the number of subjects. Also, a cluster may be provided to separate the motion vectors that belong neither to the background nor to the subject.

各クラスタの重心の初期値については、第1の分離処理の結果を利用する。具体的には、第1の分離処理で得られた背景ベクトルについて、X方向の移動量とY方向の移動量でそれぞれヒストグラムを生成し、各ヒストグラムの最頻値V1x,V1yを求める。この最頻値は背景ベクトルの代表値であるので、これを背景クラスタの重心の初期値V1=(V1x,V1y)とする。同様の方法で、第1の分離処理で得られた被写体ベクトルの代表値V2x,V2yを求め、被写体クラスタの重心の初期値V2=(V2x,V2y)とする。 The results of the first separation process are used for the initial value of the center of gravity of each cluster. Specifically, for the background vectors obtained in the first separation process, histograms are generated for the amount of movement in the X direction and the amount of movement in the Y direction, and the most frequent values V1x and V1y of each histogram are found. Since this most frequent value is the representative value of the background vectors, it is set as the initial value V1 = (V1x, V1y) of the center of gravity of the background cluster. Using a similar method, the representative values V2x and V2y of the subject vectors obtained in the first separation process are found, and the initial value V2 = (V2x, V2y) of the center of gravity of the subject cluster is set.

なお、背景クラスタの初期値に関しては、背景ベクトルではなく、ステップS202で得られる慣性センサ情報を用いてもよい。その場合、角速度センサから得られるヨー方向およびピッチ方向の角速度をそれぞれ積分して角度θy、θpに変換し、それを撮像面上での変位量に換算する。焦点距離をfとすれば、V1x=ftan(θy)、V1y=ftan(θp)と計算される。 In addition, the initial value of the background cluster may be determined using the inertial sensor information obtained in step S202 instead of the background vector. In this case, the angular velocities in the yaw and pitch directions obtained from the angular velocity sensor are integrated and converted into angles θy and θp, respectively, and then converted into the amount of displacement on the imaging surface. If the focal length is f, then V1x = f tan(θy) and V1y = f tan(θp) are calculated.

また被写体クラスタの初期値に関しては、被写体ベクトルではなく、ステップS201で得られる被写体領域のフレーム間での重心の変位量を用いてもよい。この場合、フレーム間で同一の被写体を検出できていることが前提となる。 In addition, the initial value of the object cluster may be the displacement of the center of gravity between frames of the object region obtained in step S201, instead of the object vector. In this case, it is assumed that the same object has been detected between frames.

以上のように、クラスタの数および各クラスタの重心の初期値が定まるので、次に各動きベクトルデータと各クラスタの重心との距離を算出する。そして、各動きベクトルデータを、距離が最も近いクラスタに属するものとして、クラスタの割り当てをし直す。 As described above, the number of clusters and the initial value of the center of gravity of each cluster are determined, and the next step is to calculate the distance between each motion vector data and the center of gravity of each cluster. Then, each motion vector data is reassigned to a cluster by assuming that it belongs to the cluster with the closest distance.

上記の処理において全てのベクトルデータに対するクラスタの割り当てが変化しなかった場合、あるいは変化量が事前に設定した一定の閾値を下回った場合に、処理が収束したと判定して、第2の分離処理を終了する。それ以外の場合は、新しく割り当てられたクラスタから重心を再計算した後に、各動きベクトルデータと各クラスタの重心との距離を算出して、クラスタの割り当てをし直すという前述した処理を繰り返す。 If the cluster assignment for all vector data remains unchanged in the above process, or if the amount of change falls below a preset threshold, it is determined that the process has converged and the second separation process is terminated. Otherwise, the process repeats the above-mentioned process of recalculating the centroid from the newly assigned cluster, calculating the distance between each motion vector data and the centroid of each cluster, and reassigning the clusters.

上記のように動きベクトルを分離した結果の一例を図6に示す。 Figure 6 shows an example of the results of separating motion vectors as described above.

図6(a)は、動きベクトルのX方向変位量を横軸に、Y方向変位量を縦軸にプロットした図である。□は背景クラスタの重心の初期値、☆は被写体クラスタの重心の初期値を表しており、背景ベクトルとして分離されたものを○、被写体ベクトルとして分離されたものを△で表示している。 Figure 6(a) is a plot of the X-direction displacement of the motion vector on the horizontal axis and the Y-direction displacement on the vertical axis. □ represents the initial value of the center of gravity of the background cluster, and ☆ represents the initial value of the center of gravity of the subject cluster. Those separated as background vectors are indicated with ○, and those separated as subject vectors are indicated with △.

また、図6(b)は、図6(a)の背景ベクトルと被写体ベクトルの各始点位置(特徴点位置)を画像上にプロットしたものである。図6(b)から、背景と主被写体が正しく分離できることが分かる。 Figure 6(b) shows the starting points (feature point positions) of the background vectors and subject vectors in Figure 6(a) plotted on the image. Figure 6(b) shows that the background and main subject can be correctly separated.

ステップS206では、ブレ補正量変換部107は、ステップS205で得られた背景ベクトルおよび被写体ベクトルを、それぞれ第1のブレ補正量(以下、手振れ補正量と呼ぶ)および第2のブレ補正量(以下、被写体振れ補正量と呼ぶ)に変換する。 In step S206, the blur correction amount conversion unit 107 converts the background vector and the subject vector obtained in step S205 into a first blur correction amount (hereinafter referred to as the camera shake correction amount) and a second blur correction amount (hereinafter referred to as the subject blur correction amount), respectively.

動きベクトルをブレ補正量に変換する方法としては、例えば前述のようにヒストグラムを用いる方法がある。動きベクトルについてX方向の移動量とY方向の移動量でそれぞれヒストグラムを生成し、各ヒストグラムの最頻値を算出する。この最頻値はフレーム間で生じているブレの代表値であるので、この最頻値の逆符号を取ることで、ブレを打ち消すブレ補正量を得ることができる。 As a method for converting a motion vector into a blur correction amount, for example, there is a method using a histogram as mentioned above. A histogram is generated for the amount of movement in the X direction and the amount of movement in the Y direction for the motion vector, and the most frequent value of each histogram is calculated. Since this most frequent value is a representative value of the blur occurring between frames, by taking the inverse sign of this most frequent value, a blur correction amount that cancels out the blur can be obtained.

また、他の変換方法としては、動きベクトルにより得られるフレーム間の特徴点の対応関係を利用する方法がある。フレーム間の特徴点の対応関係から、射影変換行列(またはアフィン変換行列)を公知の方法で算出する。算出された射影変換行列はフレーム間で生じているブレを表すので、この行列の逆行列を計算することで、ブレを打ち消すブレ補正量を得ることができる。 Another conversion method is to use the correspondence between feature points between frames obtained from motion vectors. From the correspondence between feature points between frames, a projective transformation matrix (or affine transformation matrix) is calculated using a known method. The calculated projective transformation matrix represents the blur that occurs between frames, so by calculating the inverse matrix of this matrix, it is possible to obtain a blur correction amount that cancels out the blur.

ヒストグラムを用いる方法の場合、補正できるのはブレの並進成分のみであるが、動きベクトルの数が少ない場合でも比較的安定して補正量を得られる特性がある。一方、特徴点の対応関係を用いる方法の場合、ブレの並進成分に加えて回転成分やあおり成分を補正することが可能であるが、動きベクトルの数が少ない場合には補正量が正しく求められないという特性がある。そのため、動きベクトルの数に応じていずれの方法を用いるかを変更してもよい。 The method using histograms can only correct the translational component of blur, but has the characteristic that it can obtain a relatively stable amount of correction even when the number of motion vectors is small. On the other hand, the method using the correspondence between feature points can correct the rotational and tilt components of blur in addition to the translational component, but has the characteristic that it cannot obtain an accurate amount of correction when the number of motion vectors is small. Therefore, it is possible to change which method to use depending on the number of motion vectors.

ここでは第1のブレ補正量を得るために背景ベクトルを利用したが、角速度センサを有する場合は必ずしも背景ベクトルを利用する必要はない。背景クラスタの初期値の算出方法のところで説明したように、角速度センサから得られる角速度情報を撮像面上での変位量に換算して用いてもよい。 Here, a background vector is used to obtain the first blur correction amount, but if an angular velocity sensor is included, it is not necessary to use a background vector. As explained in the section on how to calculate the initial value of the background cluster, angular velocity information obtained from the angular velocity sensor may be converted into the amount of displacement on the imaging surface and used.

ステップS207では、ブレ補正量算出部111は、ステップS203で得られる着目対象に基づいて、ステップS206で得られる手振れ補正量および被写体振れ補正量を合成することにより、最終的なブレ補正量を生成する。 In step S207, the shake correction amount calculation unit 111 generates a final shake correction amount by combining the camera shake correction amount and the subject shake correction amount obtained in step S206 based on the target object obtained in step S203.

手振れ補正量および被写体振れ補正量の合成方法の一例について説明する。背景度合いをA、被写体度合いを1-Aと表す。ステップS206で算出された手振れ補正量および被写体振れ補正量をそれぞれH0,H1とすれば、最終的な合成後のブレ補正量Hは以下の式で求められる。 An example of a method for combining the camera shake compensation amount and the subject shake compensation amount will be described below. The background degree is represented as A, and the subject degree is represented as 1-A. If the camera shake compensation amount and the subject shake compensation amount calculated in step S206 are H0 and H1, respectively, the final combined shake compensation amount H can be calculated using the following formula.

H=(A×H0)+{(1-A)×H1} (4)
式(4)により、撮影者が100%背景に着目している場合、A=1となるので、H=H0となり、手振れが100%補正される。反対に、撮影者が100%被写体に着目している場合、A=0となるので、H=H1となり、被写体振れが100%補正される。そして、撮影者が背景と被写体に50%ずつ着目している場合、A=0.5となるので、手振れが50%、被写体振れが50%補正されることになる。このように、背景度合いおよび被写体度合いに応じて、手振れと被写体振れの補正比率が制御される。なお、背景度合いおよび被写体度合いと同様に、手振れと被写体振れの補正比率は水平方向と垂直方向で独立させても構わない。
H=(A×H0)+{(1-A)×H1} (4)
According to formula (4), when the photographer focuses 100% on the background, A=1, so H=H0, and camera shake is corrected 100%. Conversely, when the photographer focuses 100% on the subject, A=0, so H=H1, and subject shake is corrected 100%. And when the photographer focuses 50% on the background and 50% on the subject, A=0.5, so camera shake is corrected 50% and subject shake is corrected 50%. In this way, the correction ratio of camera shake and subject shake is controlled according to the background degree and subject degree. Note that, like the background degree and subject degree, the correction ratio of camera shake and subject shake may be set independently in the horizontal and vertical directions.

最後のステップS208では、撮像装置100は、最終フレームまで処理が完了したか否かを判定する。最終フレームまで処理が完了している場合は処理を終了し、完了していない場合はステップS201に戻る。 In the final step S208, the imaging device 100 determines whether or not processing has been completed up to the final frame. If processing has been completed up to the final frame, the processing ends, and if processing has not been completed, the processing returns to step S201.

以上説明したように、本実施形態では、撮影者の着目対象に応じて、手振れと被写体振れの補正比率を制御することにより、撮影者が望むブレ補正効果を得ることができる。 As described above, in this embodiment, the photographer can obtain the shake correction effect desired by controlling the correction ratio between camera shake and subject shake according to the subject of the photographer's attention.

なお、本実施形態で説明した技術は、動画および静止画のいずれに対しても適用することができる。動画の場合はシーンに応じて手振れ補正と被写体振れ補正を連続的に切り替えることができ、切り替えによる微小な画像シフトなどの違和感を抑制することができる。静止画の場合は、手振れと被写体振れがそれぞれ程よいバランスで抑制された画像を生成することができる。また前述したように、流し撮りという特殊な静止画撮影に対しても適用することができる。 The technology described in this embodiment can be applied to both video and still images. In the case of video, it is possible to continuously switch between camera shake correction and subject shake correction depending on the scene, and it is possible to suppress discomfort such as slight image shifts caused by switching. In the case of still images, it is possible to generate images in which camera shake and subject shake are suppressed in an appropriate balance. As mentioned above, it can also be applied to a special type of still image shooting called panning.

(第2の実施形態)
図7は、本発明の第2の実施形態に係わる撮像装置600の構成を示す図である。図7において、図1に示した構成要素と共通する部分については、図1と同符号を付して説明を省略する。本実施形態の撮像装置は、図1に示した構成に加えて、信頼度算出部601と分離度算出部602を有する。本実施形態では、第1の実施形態と異なる処理を行う部分についてのみ説明する。
Second Embodiment
Fig. 7 is a diagram showing the configuration of an image pickup device 600 according to a second embodiment of the present invention. In Fig. 7, parts common to the components shown in Fig. 1 are given the same reference numerals as in Fig. 1, and description thereof will be omitted. In addition to the configuration shown in Fig. 1, the image pickup device of this embodiment has a reliability calculation unit 601 and a separation degree calculation unit 602. In this embodiment, only parts that perform processing different from the first embodiment will be described.

第1の実施形態では、背景と主被写体に対する着目度合いに応じてブレ補正量を算出した。ただし、撮影シーンによっては着目度合いが高い場合であっても、動き検出や動き分離が困難な場合がある。例えば、コントラストが低い空などや、フレーム間での形状変化の激しい軟体や流体などは動き検出が困難である。また同一被写体内で動き量が異なったり、奥行き差があったりすると、背景と主被写体とでの動き分離が困難である。このような場合に、単純に着目度合いだけでブレ補正量を算出すると、ブレ補正が正しく行われず、不安定になることが考えられる。 In the first embodiment, the amount of blur correction was calculated according to the degree of attention given to the background and the main subject. However, depending on the shooting scene, motion detection and motion separation may be difficult even when the degree of attention is high. For example, it is difficult to detect motion in a low-contrast sky, or in a soft body or fluid whose shape changes drastically between frames. Furthermore, if the amount of movement differs within the same subject, or there is a depth difference, it is difficult to separate the movements of the background and the main subject. In such cases, if the amount of blur correction is calculated simply based on the degree of attention, it is thought that blur correction will not be performed correctly and will become unstable.

そこで、本実施形態では、「背景と主被写体の着目度合い」に加えて、「動き検出の信頼度」および「動きの分離度」を加味することにより、より安定的にブレ補正を行う方法について説明する。 Therefore, in this embodiment, we will explain a method for performing blur correction more stably by taking into account the reliability of motion detection and the degree of motion separation in addition to the degree of attention to the background and main subject.

本実施形態が第1の実施形態と異なる点は、動き分離部106aにおいて信頼度算出部601の出力結果を用いる点と、ブレ補正量算出部111aにおいて信頼度算出部601および分離度算出部602の出力結果を用いる点である。 This embodiment differs from the first embodiment in that the motion separation unit 106a uses the output results of the reliability calculation unit 601, and the blur correction amount calculation unit 111a uses the output results of the reliability calculation unit 601 and the separation degree calculation unit 602.

信頼度算出部601は、動きベクトル検出部105から入力される動きベクトルに対して信頼度を算出する。分離度算出部602は、動き分離部106aから入力される背景ベクトルおよび被写体ベクトルの分離度を算出する。 The reliability calculation unit 601 calculates the reliability of the motion vector input from the motion vector detection unit 105. The separation calculation unit 602 calculates the separation of the background vector and the subject vector input from the motion separation unit 106a.

図8は、第2の実施形態における像ブレ補正動作を示すフローチャートである。図8において、図2に示したステップと共通するステップについては、図2と同符号を付し説明を省略する。 Figure 8 is a flowchart showing the image stabilization operation in the second embodiment. In Figure 8, steps common to those shown in Figure 2 are given the same reference numerals as in Figure 2, and descriptions thereof will be omitted.

ステップS701では、信頼度算出部601は、ステップS204で得られた動きベクトルの信頼度を算出する。 In step S701, the reliability calculation unit 601 calculates the reliability of the motion vector obtained in step S204.

動きベクトルの信頼度の算出には、二次元の相関値マップを用いる。図5(b)の2次元の相関値マップにおいて、相関値を矢印404で示すようにラスター順に並べ、1次元で表わしたものを図9に示す。図9の縦軸は相関値、横軸は相関値マップのX座標とY座標により一意に定まる画素アドレスである。以降、動きベクトルの信頼度を算出するために、この図9の表現を用いることとする。なお、点801は図5の極小値に対応する位置を示している。 A two-dimensional correlation value map is used to calculate the reliability of a motion vector. In the two-dimensional correlation value map of FIG. 5(b), the correlation values are arranged in raster order as indicated by arrow 404, and shown in one dimension in FIG. 9. The vertical axis of FIG. 9 is the correlation value, and the horizontal axis is the pixel address that is uniquely determined by the X and Y coordinates of the correlation value map. Hereafter, the representation in FIG. 9 will be used to calculate the reliability of a motion vector. Note that point 801 indicates the position corresponding to the minimum value in FIG. 5.

図10は、動きベクトルの信頼度を表わす相関値の指標の一例を示す図である。図10の横軸は画素のアドレス、縦軸は相関値を示している。 Figure 10 shows an example of a correlation value index that indicates the reliability of a motion vector. The horizontal axis of Figure 10 shows pixel addresses, and the vertical axis shows correlation values.

図10(a)では、指標として相関値の最小値と最大値の差分Daを用いる。Daは相関値マップのレンジを表わしており、Daが小さい場合、テクスチャのコントラストが低いことが考えられ、信頼度が低いことを示す。 In Figure 10(a), the difference Da between the minimum and maximum correlation values is used as an index. Da represents the range of the correlation value map, and if Da is small, it is considered that the texture contrast is low, indicating low reliability.

図10(b)では、指標として相関値の最小値と最大値の差分Aと、最小値と平均値の差分Bとの比率Db(=B/A)を用いる。Dbは相関値ピークの急峻性を表わしており、Dbが小さい場合、テンプレート領域とサーチ領域の類似度が低いと考えられ、信頼度が低いことを示す。 In FIG. 10(b), the ratio Db (=B/A) of the difference A between the minimum and maximum correlation values and the difference B between the minimum and average correlation values is used as an index. Db represents the steepness of the correlation value peak, and when Db is small, it is considered that the similarity between the template region and the search region is low, indicating low reliability.

図10(c)では、指標として相関値の極小値と二番目の極小値の差分Dcを用いる。ここで点901,902,903は、それぞれ図5の相関値401,402,403と対応している。よって、図10(c)は、図5(b)の等高線において、相関値の最小と類似した極小値が存在しないかを確認することを意味している。 In FIG. 10(c), the difference Dc between the minimum value of the correlation value and the second minimum value is used as an index. Here, points 901, 902, and 903 correspond to correlation values 401, 402, and 403 in FIG. 5, respectively. Therefore, FIG. 10(c) means to check whether there is a minimum value similar to the minimum of the correlation value in the contour lines in FIG. 5(b).

Dcは相関値マップの周期性を表わし、Dcが小さい場合、テクスチャが繰り返しパターンやエッジなどであることが考えられ、信頼度が低いことを示す。なお、ここでは極小値と二番目の極小値を選択したが、相関値マップの周期性を判定できればよいため、その他の極小値を選択してもよい。 Dc represents the periodicity of the correlation value map. If Dc is small, it is possible that the texture is a repeating pattern or edge, indicating low reliability. Note that here, the minimum value and the second minimum value were selected, but other minimum values may be selected as long as it is possible to determine the periodicity of the correlation value map.

図10(d)では、指標として相関値の最小値Ddを用いる。Ddが大きい場合、テンプレート領域とサーチ領域の類似度が低いと考えられ、信頼度が低いことを表わす。Ddと信頼度は反比例の関係にあるため、Ddの逆数(1/Dd)を指標とする。 In FIG. 10(d), the minimum correlation value Dd is used as the index. If Dd is large, the similarity between the template region and the search region is considered to be low, indicating low reliability. Since Dd and reliability are inversely proportional, the reciprocal of Dd (1/Dd) is used as the index.

上記で説明した相関値の指標はそのまま信頼度として用いることができるが、例えば図11のように、相関値指標と信頼度の対応付けを行ってもよい。図11の横軸は相関値指標(上述のDa,Db,Dc,1/Ddのいずれか)を示し、縦軸は信頼度を示す。この例では、二つの閾値T1,T2を設けており、閾値T1以下なら信頼度を0、閾値T2以上なら信頼度を1としている。閾値は相関値指標ごとに変更してもよい。また閾値T1と閾値T2の間の区間は、相関値指標と信頼度とを線形に対応付けてもよいし、非線形に対応付けてもよい。以降の説明では、各相関値指標から得られる信頼度をRa,Rb,Rc,Rdと表現する。ここで、Ra=f(Da),Rb=f(Db),Rc=f(Dc),Rd=f(Dd)の関係にある。 The correlation value index described above can be used as the reliability as it is, but the correlation value index and the reliability may be associated as shown in FIG. 11. The horizontal axis of FIG. 11 indicates the correlation value index (any of Da, Db, Dc, or 1/Dd described above), and the vertical axis indicates the reliability. In this example, two thresholds T1 and T2 are set, and the reliability is set to 0 if the reliability is below the threshold T1, and 1 if the reliability is above the threshold T2. The threshold may be changed for each correlation value index. In addition, the correlation value index and the reliability may be associated linearly or nonlinearly in the section between the thresholds T1 and T2. In the following description, the reliability obtained from each correlation value index is expressed as Ra, Rb, Rc, and Rd. Here, the relationship is Ra=f(Da), Rb=f(Db), Rc=f(Dc), and Rd=f(Dd).

最終的な動きベクトルの信頼度Rは、これらRa,Rb,Rc,Rdを組み合わせて算出すればよい。ここでは、重み付け加算と論理演算による組み合わせ方法について説明する。 The final reliability R of the motion vector can be calculated by combining Ra, Rb, Rc, and Rd. Here, we will explain the combination method using weighted addition and logical operations.

重み付け加算による組み合わせでは、Ra,Rb,Rc,Rdの重みをそれぞれWa,Wb,Wc,Wdとすれば、信頼度Rは式(5)のように計算される。 In the combination by weighted addition, if the weights of Ra, Rb, Rc, and Rd are Wa, Wb, Wc, and Wd, respectively, the reliability R is calculated as shown in formula (5).

R=Wa×Ra+Wb×Rb+Wc×Rc+Wd×Rd (5)
例えば重みをWa=0.4,Wb=0.3,Wc=0.2,Wd=0.1とする。全ての信頼度が十分に高く、Ra=Rb=Rc=Rd=1の場合には、式(5)よりR=1.0となる。またRa=0.6,Rb=0.5,Rc=0.7,Rd=0.7のような場合には、式(5)よりR=0.6となる。
R=Wa×Ra+Wb×Rb+Wc×Rc+Wd×Rd (5)
For example, the weights are Wa = 0.4, Wb = 0.3, Wc = 0.2, and Wd = 0.1. If all reliabilities are sufficiently high and Ra = Rb = Rc = Rd = 1, then equation (5) gives R = 1.0. If Ra = 0.6, Rb = 0.5, Rc = 0.7, and Rd = 0.7, then equation (5) gives R = 0.6.

論理演算による組み合わせでは、Ra,Rb,Rc,Rdに対する閾値をそれぞれTa,Tb,Tc,Tdとすれば、信頼度Rは例えば論理積を用いて式(6)のように計算される。 In combination using logical operations, if the thresholds for Ra, Rb, Rc, and Rd are Ta, Tb, Tc, and Td, respectively, the reliability R is calculated, for example, using logical product as shown in formula (6).

R=(Ra≧Ta)∧(Rb≧Tb)∧(Rc≧Tc)∧(Rd≧Td) (6)
ここで、∧ は論理積を表す記号である。Ra≧Ta,Rb≧Tb,Rc≧Tc,Rd≧Tdが全て成立する場合にR=1(高信頼)、それ以外の場合にR=0(低信頼)となる。
R=(Ra≧Ta)∧(Rb≧Tb)∧(Rc≧Tc)∧(Rd≧Td) (6)
Here, ^ is a symbol representing a logical product. If Ra ≥ Ta, Rb ≥ Tb, Rc ≥ Tc, and Rd ≥ Td are all satisfied, then R = 1 (high reliability), and otherwise R = 0 (low reliability).

また、論理和を用いて式(7)のように計算してもよい。 It is also possible to use logical sum as in equation (7).

R=(Ra<Ta)↓(Rb<Tb)↓(Rc<Tc)↓(Rd<Td) (7)
ここで、↓は否定論理和を表す記号である。Ra<Ta、Rb<Tb,Rc<Tc,Rd<Tdの全てが成立しない場合にR=1(高信頼)、それ以外の場合にR=0(低信頼)となる。
R=(Ra<Ta)↓(Rb<Tb)↓(Rc<Tc)↓(Rd<Td) (7)
Here, ↓ is a symbol representing a negative logical sum. When none of Ra<Ta, Rb<Tb, Rc<Tc, and Rd<Td is satisfied, R=1 (high reliability), and otherwise R=0 (low reliability).

ステップS702では、動き分離部106aは、ステップS701で算出された信頼度を用いて、ステップS204で検出された動きベクトルを、背景ベクトルと被写体ベクトルとに分離する。 In step S702, the motion separation unit 106a separates the motion vector detected in step S204 into a background vector and a subject vector, using the reliability calculated in step S701.

ステップS205との違いは、最初に全ての動きベクトルのうち、信頼度が所定の閾値よりも低いものを除去する点である。信頼度が低い動きベクトルは誤検出の可能性が高く、動きの分離を誤る可能性を高めるので、用いないようにする。信頼度の低い動きベクトルを除去した以降は、ステップS205と全く同様に動きの分離処理を行う。 The difference with step S205 is that first, of all motion vectors, those with a reliability lower than a predetermined threshold are removed. Motion vectors with low reliability are likely to be falsely detected, increasing the possibility of erroneous motion separation, and are therefore not used. After removing the motion vectors with low reliability, motion separation processing is performed in exactly the same way as in step S205.

ステップS703では、分離度算出部602は、ステップS702で分離された背景ベクトルおよび被写体ベクトルを用いて、両ベクトル間の分離度合いを表す分離度Uを算出する。前述した図6は、分離度が高い状態の例を示している。一方、図12は分離度が低い状態の例を示している。 In step S703, the separation degree calculation unit 602 uses the background vector and the subject vector separated in step S702 to calculate a separation degree U that indicates the degree of separation between the two vectors. The above-mentioned FIG. 6 shows an example of a state in which the separation degree is high. On the other hand, FIG. 12 shows an example of a state in which the separation degree is low.

分離度の算出方法の一例としては、例えば被写体ベクトルの始点(=特徴点)座標の分散Sを利用することができる。分離された被写体ベクトルがある特定の動きのある被写体を捉えている場合、分散Sは時間変化に対して一定になる特性が知られている。そのため、例えば図13のように、分散Sのフレーム間の変位量δSが大きいほど分離度Uが低くなるように算出すればよい。 As an example of a method for calculating the degree of separation, the variance S of the coordinates of the starting point (=feature point) of the subject vector can be used. When the separated subject vector captures a subject with a certain movement, the variance S has the property of remaining constant over time. Therefore, for example, as shown in Figure 13, the degree of separation U can be calculated so that the larger the inter-frame displacement δS of the variance S is, the lower the degree of separation U becomes.

図13の横軸は分散Sのフレーム間の変位量δSを示し、縦軸は分離度Uを示す。この例では、二つの閾値T1,T2を設けている。δSが閾値T1以下で小さい場合、前述の通り、背景に対してある特定の被写体の動きを分離できていると考え、分離度Uを1にしている。反対に、δSが閾値T2以上で大きい場合、背景に対してある特定の被写体の動きを分離できていないと考え、分離度Uを0にしている。閾値T1とT2の間の区間は、δSと分離度Uを線形に対応付けてもよいし、非線形に対応付けてもよい。 The horizontal axis of Figure 13 indicates the amount of displacement δS of the variance S between frames, and the vertical axis indicates the degree of separation U. In this example, two thresholds T1 and T2 are set. When δS is small and equal to or less than threshold T1, it is considered that the movement of a specific subject has been separated from the background, as described above, and the degree of separation U is set to 1. Conversely, when δS is large and equal to or greater than threshold T2, it is considered that the movement of a specific subject has not been separated from the background, and the degree of separation U is set to 0. In the section between thresholds T1 and T2, δS and the degree of separation U may be associated linearly or nonlinearly.

ステップS704では、ブレ補正量算出部111aは、ステップS203で得られる着目対象、ステップS701で得られる動きベクトル検出の信頼度、および、ステップS703で得られる動きの分離度に基づいて、ステップS206で得られる手振れ補正量および被写体振れ補正量を合成することにより、最終的なブレ補正量を生成する。 In step S704, the blur correction amount calculation unit 111a generates a final blur correction amount by combining the camera shake correction amount and subject blur correction amount obtained in step S206 based on the target object obtained in step S203, the reliability of the motion vector detection obtained in step S701, and the degree of motion separation obtained in step S703.

ステップS207との違いは、ブレ補正量の合成比率として、動き検出の信頼度および動きの分離度を反映させる点である。背景ベクトルと被写体ベクトルの信頼度の合計値をそれぞれRAとRB、分離度をUと表す。反映方法の一例としては、例えば以下の式(8)のようにブレ補正量を算出する方法が考えられる。
H=A・RA・(1-U)・H0/{A・RA・(1-U)+(1-A)・RB・U}
+(1-A)・RB・U・H1/{A・RA・(1-U)+(1-A)・RB・U}
(8)
式(8)により、背景ベクトルの信頼度RAが、被写体ベクトルの信頼度RBよりも高いほど、背景ブレ補正の比率が高くなる。また、分離度Uが高いほど、被写体振れ補正の比率が高くなる。
The difference from step S207 is that the reliability of motion detection and the degree of separation of motion are reflected as the blending ratio of the shake correction amount. The sums of the reliability of the background vector and the subject vector are represented as RA and RB, respectively, and the degree of separation is represented as U. As an example of the reflection method, a method of calculating the shake correction amount as shown in the following formula (8) can be considered.
H=A・RA・(1-U)・H0/{A・RA・(1-U)+(1-A)・RB・U}
+(1-A)・RB・U・H1/{A・RA・(1−U)+(1−A)・RB・U}
(8)
According to formula (8), the higher the reliability RA of the background vector is compared to the reliability RB of the subject vector, the higher the ratio of background blur correction. Also, the higher the degree of separation U, the higher the ratio of subject blur correction.

以上説明したように、本実施形態では、「背景と主被写体の着目度合い」に加えて、「動きベクトル検出の信頼度」および「動きの分離度」を加味することにより、第1の実施形態よりもさらに安定的にブレ補正を行うことができるという効果が得られる。 As described above, in this embodiment, by taking into account the "reliability of motion vector detection" and the "separability of motion" in addition to the "degree of attention to the background and main subject," it is possible to obtain the effect of performing blur correction more stably than in the first embodiment.

(第3の実施形態)
図14は、本発明の第3の実施形態に係わる撮像装置1300の構成を示す図である。図14において、図1に示した構成要素と共通する部分については、図1と同符号を付して説明を省略する。本実施形態の撮像装置は、図1に示した構成に加えて、ブレ補正効果判定部1301と表示部1302を有する。本実施形態では、第1の実施形態と異なる処理を行う部分についてのみ説明する。
Third Embodiment
Fig. 14 is a diagram showing the configuration of an image pickup apparatus 1300 according to a third embodiment of the present invention. In Fig. 14, parts common to the components shown in Fig. 1 are given the same reference numerals as in Fig. 1, and description thereof will be omitted. In addition to the configuration shown in Fig. 1, the image pickup apparatus of this embodiment has a blur correction effect determination unit 1301 and a display unit 1302. In this embodiment, only parts that perform processing different from the first embodiment will be described.

第1の実施形態では、撮影者の着目対象に応じて手振れと被写体振れの補正比率を制御した。ただし、手振れと被写体振れのブレ量が概ね等しいような場合、撮影者はどちらのブレ補正の効果が効いているのか知ることができない。近年のカメラでは、手振れ補正機能は標準的に搭載されているが、被写体振れ補正機能はまだ搭載されていないものも多い。そのため、手振れ補正には馴染みがあるが、被写体振れ補正には馴染みがない撮影者が多く存在する。そのような撮影者に対して、被写体振れ補正が効いている状況を的確に伝えることは非常に重要である。 In the first embodiment, the correction ratio between camera shake and subject shake was controlled according to the subject of the photographer's attention. However, when the amount of camera shake and subject shake is roughly equal, the photographer cannot know which type of shake correction is working. Cameras these days come equipped with a camera shake correction function as standard, but many still do not have a subject shake correction function. For this reason, there are many photographers who are familiar with camera shake correction but not with subject shake correction. It is very important to accurately communicate to such photographers the situations in which subject shake correction is working.

そこで、本実施形態では、被写体振れ補正の効果が顕著に表れる状況を判定し、その状況を撮影者に通知する方法について説明する。 Therefore, in this embodiment, we will explain a method for determining a situation in which the effect of subject shake correction is prominent and notifying the photographer of that situation.

本実施形態が第1の実施形態と異なる点は、ブレ補正効果判定部1301が、着目対象推定部110およびブレ補正量変換部107の出力を用いて被写体振れ補正の効果を判定し、表示部1302がその判定結果を撮影者に通知する点である。 This embodiment differs from the first embodiment in that the blur correction effect determination unit 1301 determines the effect of subject blur correction using the output of the focus target estimation unit 110 and the blur correction amount conversion unit 107, and the display unit 1302 notifies the photographer of the determination result.

ブレ補正効果判定部1301は、着目対象推定部110により得られる着目対象の情報と、ブレ補正量変換部107から得られる手振れ補正量および被写体振れ補正量に基づいて、被写体振れ補正の効果を判定する。表示部1302は、現像処理部103から得られる画像データとともに、ブレ補正効果判定部1301から入力されるブレ補正効果の判定結果を表示する。 The blur correction effect determination unit 1301 determines the effect of subject blur correction based on the information on the target obtained by the target estimation unit 110 and the camera shake correction amount and subject blur correction amount obtained from the blur correction amount conversion unit 107. The display unit 1302 displays the blur correction effect determination result input from the blur correction effect determination unit 1301 together with the image data obtained from the development processing unit 103.

図15は、第3の実施形態の処理動作を示すフローチャートである。図15において、図2に示したステップと共通するステップについては、図2と同符号を付し説明を省略する。 Figure 15 is a flowchart showing the processing operation of the third embodiment. In Figure 15, steps common to those shown in Figure 2 are given the same reference numerals as in Figure 2 and descriptions thereof are omitted.

ステップS1401では、ブレ補正効果判定部1301は、ステップS203で得られる着目対象、及び/または、ステップS206で得られる手振れ補正量および被写体振れ補正量を用いて、被写体振れ補正の効果を判定する。 In step S1401, the image stabilization effectiveness determination unit 1301 determines the effectiveness of the object shake correction using the object of interest obtained in step S203 and/or the camera shake correction amount and object shake correction amount obtained in step S206.

被写体振れ補正の効果の判定方法としては、例えば、着目対象が被写体である度合いを示す被写体度合いが高いほど、また、手振れ補正量と被写体振れ補正量との差の絶対値が大きいほど、被写体振れ補正の効果が高いと判定する。なお、被写体度合いや差の絶対値と、補正の効果の高さ度合いとは線形関係になくてもよい。被写体度合いが所定値以上の場合は所定値未満の場合よりも被写体振れ補正の効果が高いと判定したり、手振れ補正量と被写体振れ補正量との差の絶対値が所定値以上の場合は被写体振れ補正の効果が高いと判定したりしてもよい。 As a method of determining the effectiveness of subject blur correction, for example, the higher the subject degree, which indicates the degree to which the object of interest is a subject, and the larger the absolute value of the difference between the amount of camera shake correction and the amount of subject blur correction, the greater the effect of subject blur correction is determined to be. Note that the subject degree or the absolute value of the difference does not have to have a linear relationship with the degree of correction effectiveness. If the subject degree is equal to or greater than a predetermined value, it may be determined that the effect of subject blur correction is greater than if the subject degree is less than the predetermined value, or the effect of subject blur correction may be determined to be greater if the absolute value of the difference between the amount of camera shake correction and the amount of subject blur correction is equal to or greater than a predetermined value.

また被写体振れ補正の効果を判定するための情報として、被写体情報の信頼度、被写体ベクトルの信頼度、背景ベクトルと被写体ベクトルの分離度、ブレ補正量の上限を加味してもよい。 In addition, the reliability of the subject information, the reliability of the subject vector, the degree of separation between the background vector and the subject vector, and the upper limit of the blur correction amount may be taken into account as information for determining the effectiveness of subject blur correction.

被写体情報の信頼度は、被写体検出部108から得られる被写体情報の信頼度である。特定の被写体が人物の顔である場合、顔検出の信頼度を用いればよい。被写体情報の信頼度が低い場合、被写体振れ補正が正しく動作しない可能性がある。そのため、被写体情報の信頼度が高い方が、低い場合よりも被写体振れ補正の効果が高いと判定する。 The reliability of the subject information is the reliability of the subject information obtained from the subject detection unit 108. If the specific subject is a person's face, the reliability of the face detection can be used. If the reliability of the subject information is low, there is a possibility that subject blur correction will not work properly. For this reason, it is determined that the effect of subject blur correction is greater when the reliability of the subject information is high than when the reliability is low.

被写体ベクトルの信頼度は、第2の実施形態で説明した通り、信頼度算出部601から得ることができる。被写体ベクトルの信頼度が低い場合、被写体振れ補正が正しく動作しない可能性がある。そのため、被写体ベクトルの信頼度が高い方が、低い場合よりも被写体振れ補正の効果が高いと判定する。 The reliability of the subject vector can be obtained from the reliability calculation unit 601, as described in the second embodiment. If the reliability of the subject vector is low, there is a possibility that subject blur correction will not work properly. Therefore, it is determined that the effect of subject blur correction is greater when the reliability of the subject vector is high than when the reliability is low.

背景ベクトルと被写体ベクトルの分離度は、第2の実施形態で説明した通り、分離度算出部602から得ることができる。背景ベクトルと被写体ベクトルの分離度が低い場合、被写体振れ補正が正しく動作しない可能性がある。そのため、背景ベクトルと被写体ベクトルの分離度が高い方が、低い場合よりも被写体振れ補正の効果が高いと判定する。 The degree of separation between the background vector and the subject vector can be obtained from the separation calculation unit 602, as described in the second embodiment. If the degree of separation between the background vector and the subject vector is low, subject blur correction may not work properly. For this reason, it is determined that the effect of subject blur correction is greater when the degree of separation between the background vector and the subject vector is high than when the degree of separation is low.

ブレ補正量の上限は、先述の光学式ブレ補正手段または電子式ブレ補正手段で補正可能なブレ量の上限である。光学式ブレ補正手段の場合は、光学系内の補正レンズまたは撮像素子の可動できる範囲によって上限が決まる。電子式ブレ補正の場合は、画像の出力領域に対して周辺に設けられる余剰画素領域の大きさによって上限が決まる。被写体振れ補正量がブレ補正量の上限を超えている場合、被写体振れ補正が正しく動作しない可能性がある。そのため、ブレ補正量の上限から被写体振れ補正量を差し引いた値が大きい方が、小さい場合よりも被写体振れ補正の効果が高いと判定する。 The upper limit of the blur correction amount is the upper limit of the amount of blur that can be corrected by the optical blur correction means or electronic blur correction means described above. In the case of optical blur correction means, the upper limit is determined by the movable range of the correction lens or image sensor in the optical system. In the case of electronic blur correction, the upper limit is determined by the size of the surplus pixel area provided on the periphery of the image output area. If the subject blur correction amount exceeds the upper limit of the blur correction amount, subject blur correction may not work correctly. For this reason, it is determined that the effect of subject blur correction is greater when the value obtained by subtracting the subject blur correction amount from the upper limit of the blur correction amount is larger than when the value is smaller.

上記に示した複数の情報に基づいて、被写体振れ補正の効果を判定する。複数の情報から判定する方法は、先述の式(2)により着目対象を推定する方法と同様であるので説明を省略する。最終的に被写体振れ補正の効果を示す値が、所定の閾値よりも大きい場合に、被写体振れ補正の効果があると判定し、所定の閾値以下の場合に、被写体振れ補正の効果がないと判定すればよい。その際、判定結果が頻繁に切り替わることを防ぐため、所定の閾値よりも大きいまたは小さい状態が、所定の時間以上継続した場合に、判定結果を切り替えることが好ましい。 The effectiveness of subject blur correction is determined based on the multiple pieces of information shown above. The method of making a determination from multiple pieces of information is similar to the method of estimating the target of interest using equation (2) described above, so a detailed explanation will be omitted. Finally, if the value indicating the effectiveness of subject blur correction is greater than a predetermined threshold, it is determined that subject blur correction is effective, and if it is equal to or less than the predetermined threshold, it is determined that subject blur correction is ineffective. In this case, in order to prevent the determination result from switching frequently, it is preferable to switch the determination result when a state in which the value remains greater or smaller than the predetermined threshold continues for more than a predetermined time.

次にステップS1402では、表示部1302は、現像処理部103から得られる画像データとともに、ステップS1401で得られるブレ補正効果の判定結果を表示する。表示するものはテキストやアイコンなどの表示アイテムであり、特に限定はない。 Next, in step S1402, the display unit 1302 displays the image data obtained from the development processing unit 103 as well as the judgment result of the image stabilization effect obtained in step S1401. What is displayed is display items such as text and icons, and there are no particular limitations.

図16にブレ補正効果の判定結果に対応する表示アイテムの一例を示す。図16(a)は手振れ補正が効いていることを示すアイコン(以下、手振れ補正アイコンと呼ぶ)を示し、図16(b)は被写体振れ補正が効いていることを示すアイコン(以下、被写体振れ補正アイコンと呼ぶ)を示す。 Figure 16 shows an example of a display item corresponding to the judgment result of the shake correction effect. Figure 16 (a) shows an icon indicating that image stabilization is working (hereafter referred to as the image stabilization icon), and Figure 16 (b) shows an icon indicating that subject shake correction is working (hereafter referred to as the subject shake correction icon).

例えば、ステップS1401で被写体振れ補正の効果がないと判定された場合、表示部1402は、画面内の特定箇所に図16(a)の手振れ補正アイコンを表示する。一方、ステップS1402で被写体振れ補正の効果があると判定された場合、表示部1402は、画面内の特定箇所に図16(b)の被写体振れ補正アイコンを表示する。このように表示アイテムを切り替えることで、撮影者は手振れ補正が効いている状況と、被写体振れ補正が効いている状況を的確に識別することができる。 For example, if it is determined in step S1401 that subject blur correction is ineffective, the display unit 1402 displays the image stabilization icon in FIG. 16(a) at a specific location on the screen. On the other hand, if it is determined in step S1402 that subject blur correction is effective, the display unit 1402 displays the subject blur correction icon in FIG. 16(b) at a specific location on the screen. By switching the display items in this way, the photographer can accurately distinguish between situations where image stabilization is effective and situations where subject blur correction is ineffective.

以下では表示アイテムの表示方法について説明する。手振れ補正に関しては、背景全体のブレを補正するものであるため、手振れ補正アイコンは画面内の固定位置に表示されることが一般的である。しかしながら、被写体振れ補正は特定の被写体のブレを補正するものであり、画面内の被写体は1つとは限らない。そのため、被写体振れ補正アイコンは、通常の手振れ補正アイコンとは異なる表示方法が求められる。 The following explains how to display the display items. As image stabilization corrects blurring of the entire background, the image stabilization icon is generally displayed in a fixed position on the screen. However, subject stabilization corrects blurring of a specific subject, and there is not necessarily only one subject on the screen. For this reason, the subject stabilization icon requires a different display method than the normal image stabilization icon.

図17に被写体振れ補正アイコンの表示方法の一例を示す。図17では、画面内に三人の人物(1601,1602,1603)が被写体として存在している。いま被写体振れ補正の対象(ブレ補正対象)が、画面中央の人物1602である場合を考える。 Figure 17 shows an example of how to display a subject blur correction icon. In Figure 17, three people (1601, 1602, 1603) are present on the screen as subjects. Let us now consider the case where the subject of subject blur correction (blur correction target) is person 1602 in the center of the screen.

図17(a)では、被写体振れ補正アイコン1604を、被写体振れ補正の対象の人物1602の近傍に表示している。このように被写体振れ補正アイコンの表示位置を動的に変更することで、人物1602の被写体振れが補正されていることを撮影者に伝えることができる。 In FIG. 17(a), a subject blur correction icon 1604 is displayed near a person 1602 who is the target of subject blur correction. By dynamically changing the display position of the subject blur correction icon in this way, it is possible to inform the photographer that the subject blur of the person 1602 is being corrected.

図17(b)では、被写体振れ補正アイコン1604は画面左上の固定位置に表示されている。人物1602の検出枠1605を被写体振れ補正の対象の人物1602に表示している。このように被写体振れ補正アイコンと被写体の検出枠を組み合わせることで、人物1602の被写体振れが補正されていることを撮影者に伝えることができる。なお、被写体の検出枠は、被写体の顔などの一部のパーツを囲むものでもよいし、被写体全体を囲むものでもよい。 In FIG. 17(b), a subject shake correction icon 1604 is displayed in a fixed position in the upper left of the screen. A detection frame 1605 for a person 1602 is displayed for the person 1602 who is the target of subject shake correction. By combining the subject shake correction icon and the subject detection frame in this way, it is possible to inform the photographer that the subject shake of the person 1602 has been corrected. Note that the subject detection frame may surround a part of the subject, such as the face, or may surround the entire subject.

図17(c)では、人物1601の検出枠を1606、人物1602の検出枠を1607、人物1603の検出枠を1608で示している。このとき、被写体振れ補正の対象の人物1602の検出枠1607のみ、他の検出枠1606、1608とは異なるデザインで表示している。今回の例では、検出枠1607を二重線にすることで他の検出枠と区別している。その他に、検出枠1607のみ他の検出枠と色や形、大きさを変更することで区別してもよい。このように被写体検出枠のデザインを変更することで、人物1602の被写体振れが補正されていることを撮影者に伝えることができる。 In FIG. 17(c), the detection frame for person 1601 is indicated by 1606, the detection frame for person 1602 by 1607, and the detection frame for person 1603 by 1608. In this case, only the detection frame 1607 for person 1602, who is the target of subject shake correction, is displayed with a different design from the other detection frames 1606 and 1608. In this example, detection frame 1607 is distinguished from the other detection frames by drawing a double line. Alternatively, detection frame 1607 alone may be distinguished from the other detection frames by changing its color, shape, or size. By changing the design of the subject detection frame in this way, it is possible to inform the photographer that the subject shake of person 1602 has been corrected.

以上説明したように、本実施形態では、第1の実施形態に対してさらに被写体振れ補正の効果が顕著に表れる状況を撮影者に的確に通知できるという効果が得られる。 As described above, this embodiment has the added advantage over the first embodiment of being able to accurately notify the photographer of situations in which the effects of subject shake correction are most pronounced.

(第4の実施形態)
本実施形態では、補正ストロークの有効活用とブレ補正性能の両立を改良した形態について説明する。
(Fourth embodiment)
In this embodiment, an embodiment in which both effective use of the correction stroke and blur correction performance are improved will be described.

図18は、本発明の第4の実施形態に係わる撮像装置の構成を示す図である。図1に示した第1の実施形態に係る撮像装置と共通する構成については説明を省略する。 Figure 18 is a diagram showing the configuration of an imaging device according to a fourth embodiment of the present invention. A description of the configuration common to the imaging device according to the first embodiment shown in Figure 1 will be omitted.

図18において、慣性センサ112は、撮像装置100の振れを検出するセンサであり、角速度センサなどが用いられる。出力処理部113は、慣性センサ(以下、角速度センサと呼ぶ)112の出力信号を第3のブレ補正量に変換する。ブレ補正量算出部111は、着目対象推定部110により得られる着目対象の情報に基づいて、ブレ補正量変換部107により得られる第1、第2のブレ補正量、および出力処理部113により得られる第3のブレ補正量を用いて、光学式ブレ補正量と電子式ブレ補正量を生成する。生成された光学式ブレ補正量は、光学式ブレ補正手段である光学系101内の補正レンズ及び/または撮像素子102を光軸に垂直な方向にシフトさせるシフト機構に出力され、光学式ブレ補正が行われる。また生成された電子式ブレ補正量は、電子式ブレ補正部114に出力され、被写体の位置を所定位置付近に制御する電子式ブレ補正が行われる。 In FIG. 18, the inertial sensor 112 is a sensor that detects the shake of the imaging device 100, and an angular velocity sensor or the like is used. The output processing unit 113 converts the output signal of the inertial sensor (hereinafter referred to as the angular velocity sensor) 112 into a third shake correction amount. The shake correction amount calculation unit 111 generates an optical shake correction amount and an electronic shake correction amount using the first and second shake correction amounts obtained by the shake correction amount conversion unit 107 and the third shake correction amount obtained by the output processing unit 113 based on the information of the target of interest obtained by the target of interest estimation unit 110. The generated optical shake correction amount is output to a shift mechanism that shifts the correction lens in the optical system 101, which is an optical shake correction means, and/or the image sensor 102 in a direction perpendicular to the optical axis, and optical shake correction is performed. The generated electronic shake correction amount is also output to the electronic shake correction unit 114, and electronic shake correction is performed to control the position of the subject to be near a predetermined position.

次に、上記のように構成される撮像装置100における像ブレ補正動作について、図19に示すフローチャートを用いて説明する。ステップS201~S205、および、ステップS208については第1の実施形態と同様であるため、これらのステップについては流れについてのみ説明する。 Next, the image stabilization operation in the imaging device 100 configured as described above will be described using the flowchart shown in FIG. 19. Steps S201 to S205 and step S208 are the same as in the first embodiment, so only the flow of these steps will be described.

ステップS201では、被写体検出部108は、現像処理部103から入力される画像データから特定の被写体を検出し、被写体情報を出力する。 In step S201, the subject detection unit 108 detects a specific subject from the image data input from the development processing unit 103 and outputs subject information.

ステップS202では、カメラ情報取得部109は、撮影状況を推定するために必要なカメラ情報を取得する。 In step S202, the camera information acquisition unit 109 acquires the camera information necessary to estimate the shooting conditions.

ステップS203では、着目対象推定部110は、ステップS201で検出した被写体情報およびステップS202で取得したカメラ情報に基づいて、撮影者が着目対象として背景と被写体のいずれに着目しているかを推定する。 In step S203, the focus estimation unit 110 estimates whether the photographer is focusing on the background or the subject based on the subject information detected in step S201 and the camera information acquired in step S202.

ステップS204では、動きベクトル検出部105は、現像処理部103および画像メモリ104から入力される画像に対して、テンプレートマッチングにより動きベクトルを検出する。 In step S204, the motion vector detection unit 105 detects a motion vector by template matching for the image input from the development processing unit 103 and the image memory 104.

ステップS205では、動き分離部106は、ステップS204で検出された動きベクトルを、背景ベクトルと、被写体ベクトルとに分離する。 In step S205, the motion separation unit 106 separates the motion vector detected in step S204 into a background vector and a subject vector.

ステップS1906では、ブレ補正量変換部107は、図2のステップS206と同様に背景ベクトルを第1のブレ補正量(以下、手振れ補正量と呼ぶ)へ、被写体ベクトルを第2のブレ補正量(以下、被写体振れ補正量と呼ぶ)へ変換する。また同時に、出力処理部113は、角速度センサ112の出力信号を第3のブレ補正量へ変換する。なお、出力処理部113では、角速度センサ112の出力信号について、そのオフセット成分を除去した後に積分処理を行い、角速度情報を撮像面上での変位量に換算する。その後にその逆符号を取ることで、ブレを打ち消す第3のブレ補正量に変換する。 In step S1906, the blur correction amount conversion unit 107 converts the background vector into a first blur correction amount (hereinafter referred to as the camera shake correction amount) and the subject vector into a second blur correction amount (hereinafter referred to as the subject blur correction amount) in the same manner as in step S206 in FIG. 2. At the same time, the output processing unit 113 converts the output signal of the angular velocity sensor 112 into a third blur correction amount. Note that the output processing unit 113 performs integration processing on the output signal of the angular velocity sensor 112 after removing the offset component, and converts the angular velocity information into a displacement amount on the imaging surface. Then, by taking the inverse sign, it is converted into a third blur correction amount that cancels out the blur.

ステップS1907では、ブレ補正量算出部111は、ステップS203で得られる着目対象に基づいて、ステップS1906で得られる第1、第2、第3のブレ補正量から、手振れ補正量および被写体振れ補正量を求める。さらに、手振れ補正量および被写体振れ補正量を合成することにより、ブレ補正量を生成する。 In step S1907, the shake correction amount calculation unit 111 calculates the camera shake correction amount and the subject shake correction amount from the first, second, and third shake correction amounts obtained in step S1906 based on the target obtained in step S203. Furthermore, the camera shake correction amount and the subject shake correction amount are combined to generate a shake correction amount.

なお、被写体振れ補正量は、被写体ベクトルから算出した第2のブレ補正量をそのまま用いる。手振れ補正量は、背景ベクトルから算出した第1のブレ補正量と、角速度センサ112の情報から算出した第3のブレ補正量とを用いて求める。この方法は周波数分割を用いるのが一般的である。 The subject shake compensation amount is the second shake compensation amount calculated from the subject vector. The camera shake compensation amount is calculated using the first shake compensation amount calculated from the background vector and the third shake compensation amount calculated from information from the angular velocity sensor 112. This method generally uses frequency division.

第3のブレ補正量はサンプル周期が短く高周波のブレを検出するのに有利であるが、角速度センサが持つオフセットエラーやドリフトによる検出誤差が低周波領域では発生する。この誤差は高温下でより大きくなる。第1のブレ補正量はサンプル周期が長く高周波のブレを検出するのに不利であるが、オフセットエラーやドリフトによる検出誤差は発生しない。しかし暗所では撮像素子102のSN比が低下するため誤差が発生しやすい。 The third blur correction amount has a short sample period and is advantageous for detecting high-frequency blur, but detection errors due to offset errors and drift of the angular velocity sensor occur in the low-frequency range. These errors become larger at high temperatures. The first blur correction amount has a long sample period and is disadvantageous for detecting high-frequency blur, but detection errors due to offset errors and drift do not occur. However, in dark places, the signal-to-noise ratio of the image sensor 102 decreases, making errors more likely to occur.

そこで、カットオフ周波数が1Hz程度のローパスフィルターとハイパスフィルターを用いてフィルター処理を行う。第1のブレ補正量にローパスフィルターをかけた出力と、第3のブレ補正量にハイパスフィルターをかけた出力の加算結果を手振れ補正量とする。また高温下では、第1のブレ補正量にローパスフィルターをかけた出力を手振れ補正量とし、暗所では第3のブレ補正量にハイパスフィルターをかけた出力を手振れ補正量としてもよい。 Therefore, filtering is performed using a low-pass filter and a high-pass filter with a cutoff frequency of about 1 Hz. The image stabilization amount is determined by adding the output obtained by applying the first image stabilization amount to the low-pass filter and the output obtained by applying the third image stabilization amount to the high-pass filter. In addition, in high temperatures, the image stabilization amount may be determined by applying the output obtained by applying the first image stabilization amount to the low-pass filter, and in dark places, the image stabilization amount may be determined by applying the output obtained by applying the third image stabilization amount to the high-pass filter.

ステップS1907における手振れ補正量および被写体振れ補正量の合成方法については、図2のステップS207と同様であるため、詳細な説明を省略する。例えば、前述した式(4)を用いて最終的な合成後のブレ補正量Hを取得することができる。 The method for combining the camera shake compensation amount and the subject shake compensation amount in step S1907 is the same as that in step S207 in FIG. 2, so a detailed description will be omitted. For example, the final combined shake compensation amount H can be obtained using the above-mentioned formula (4).

ステップS1909では、ステップS1907で算出された合成後のブレ補正量Hが、補正レンズ、撮像素子のシフト機構、画像切り出しに割り振られ、画像に生じるブレを補正するブレ補正制御が行われる。このブレ補正制御は、補正レンズ及び撮像素子のシフト機構にブレ補正制御信号を出力して駆動することにより行われる。また同時に、電子式ブレ補正部114に制御信号を出力し、現像処理部103から出力される画像信号の一部分を切り出して新たな画像信号を生成する画像切り出し位置の制御(電子式ブレ補正制御)を実行することにより電子式ブレ補正が行われる。そして、撮像素子102からの出力画像は不図示の画像信号記録手段や画像表示手段に送られる。 In step S1909, the combined blur correction amount H calculated in step S1907 is allocated to the correction lens, the shift mechanism of the image sensor, and image cropping, and blur correction control is performed to correct blur that occurs in the image. This blur correction control is performed by outputting a blur correction control signal to the correction lens and the shift mechanism of the image sensor to drive them. At the same time, a control signal is output to the electronic blur correction unit 114, and electronic blur correction is performed by executing control of the image cropping position (electronic blur correction control) that crops out a part of the image signal output from the development processing unit 103 and generates a new image signal. The output image from the image sensor 102 is then sent to image signal recording means and image display means (not shown).

最後のステップS208では、撮像装置100は、最終フレームまで処理が完了したか否かを判定する。最終フレームまで処理が完了している場合は処理を終了し、完了していない場合はステップS201に戻る。 In the final step S208, the imaging device 100 determines whether or not processing has been completed up to the final frame. If processing has been completed up to the final frame, the processing ends, and if processing has not been completed, the processing returns to step S201.

ここで、ステップS1909のブレ補正制御についてさらに説明する。 Here, we further explain the blur correction control in step S1909.

通常の手振れや被写体振れによって生じるブレは補正できる場合でも、被写体の高速な移動に対して撮影者のパンニングが遅延した場合や主被写体(補正対象)が一時的に他の被写体に隠れた場合などは、画面上で主被写体が大きく動く場合がある。このような場合に、補正対象(主被写体)を画面上の所定の位置に留め続けようとすると、補正ストロークが不足して、補正対象に生じるブレを補正することができなくなる。 Even if it is possible to correct blurring caused by normal camera shake or subject movement, if the photographer's panning is delayed in relation to the rapid movement of the subject, or if the main subject (the subject to be corrected) is temporarily hidden by another subject, the main subject may move significantly on the screen. In such cases, if you try to keep the subject to be corrected (the main subject) in a specified position on the screen, the correction stroke will be insufficient, and it will not be possible to correct the blurring caused by the subject to be corrected.

そこで、本実施形態においては、補正ストローク不足の解消と被写体ブレ補正の両立を可能にするために、補正ストロークの端に達したら単純に補正リミットを掛けるということは行わない。その代わりに、主被写体(補正対象)が大きく動いた場合はその動きはある程度許容し、補正ストロークの残り量に応じて、補正量にハイパス効果を待つフィルターをかけ、高周波のブレ補正に重点を置いた補正信号を作成する。また、出力ゲインを可変にする。 Therefore, in this embodiment, in order to make it possible to both resolve the insufficient correction stroke and correct subject blur, a correction limit is not simply imposed when the end of the correction stroke is reached. Instead, if the main subject (subject to be corrected) moves significantly, this movement is tolerated to a certain extent, and a filter with a high-pass effect is applied to the correction amount according to the remaining amount of correction stroke, creating a correction signal that focuses on correcting high-frequency blur. In addition, the output gain is made variable.

以下、ブレ補正制御信号の生成方法について説明する。なお、以下の説明では、説明を分かりやすくするため、一軸のみについてブレ補正を行う場合を例に説明するが、実際は複数の補正軸が存在し、各軸ごとに同様の制御を行ってブレ補正を行う。また各補正手段を軸ごとに割り当てることも可能であり、一例としてロール方向のブレ補正は全て撮像素子のシフト機構で行い、ピッチ方向とヨー方向のブレ補正は補正レンズで行うなどの方法を用いてもよい。 The method for generating the shake correction control signal is explained below. Note that in the following explanation, for ease of understanding, an example will be given in which shake correction is performed on only one axis, but in reality, there are multiple correction axes, and shake correction is performed by performing similar control on each axis. It is also possible to assign each correction means to each axis. As an example, a method may be used in which all shake correction in the roll direction is performed by the shift mechanism of the image sensor, and shake correction in the pitch and yaw directions is performed by a correction lens.

図20を用いて、ブレ補正制御信号の生成方法について説明する。 The method for generating the blur correction control signal will be explained using Figure 20.

ステップS2001において、ブレ補正量にかけるハイパスフィルターの係数Fcとゲインβを求めてから所定時間が経過したか否かを判定する。これは後述するステップS2012もしくはS2013で係数Fcとゲインβが設定された時刻と現在の時刻の差分が所定時間以上か否かを調べることで行われる。もし、所定時間以上経過していたならばステップS2002に進み、所定時間未満ならばステップS2005に進む。 In step S2001, it is determined whether a predetermined time has passed since the coefficient Fc and gain β of the high-pass filter to be applied to the shake correction amount were calculated. This is performed by checking whether the difference between the time when the coefficient Fc and gain β were set in step S2012 or S2013 described later and the current time is equal to or greater than a predetermined time. If the predetermined time has passed, proceed to step S2002, and if it is less than the predetermined time, proceed to step S2005.

ステップS2002では、係数Fcとゲインβの設定時の時刻のリセットを行った後、補正レンズ、撮像素子102のシフト機構、電子式ブレ補正部114で補正するブレ補正量を算出する(ブレ補正量Hの割り振り処理を行う)。 In step S2002, the time when the coefficient Fc and gain β were set is reset, and then the amount of blur correction to be performed by the correction lens, the shift mechanism of the image sensor 102, and the electronic blur correction unit 114 is calculated (allocation process of the blur correction amount H is performed).

この各機構で分担する補正量の算出において、補正量が大きくなってもブレ補正のためのストロークが不足して補正ができない状況が生じないような設定が行われる。具体的には、画像切り出し位置の制御による補正量のハイパスフィルターの係数Fccとゲインβc、及び角速度センサ112の情報から算出した第3のブレ補正量のハイパスフィルターの係数Fclsと補正レンズとシフト機構のゲインβl,βsを設定する。 When calculating the amount of correction shared by each mechanism, settings are made so that even if the amount of correction becomes large, the stroke for blur correction is insufficient and correction is not impossible. Specifically, the coefficient Fcc and gain βc of the high-pass filter for the amount of correction by controlling the image cropping position, as well as the coefficient Fcls of the high-pass filter for the third amount of blur correction calculated from information from the angular velocity sensor 112, and the gains βl and βs of the correction lens and shift mechanism are set.

ブレ補正量Hが小さい場合(ケース1)は、画像切り出し位置は中央に固定して、補正レンズとシフト機構を駆動することによりブレ補正を行う。これは、画面中央付近は光学性能が周辺に対して優れており、シェーディングもほとんどないので、より解像度が高く、左右の輝度差も無い画像が取得できるからである。 When the blur correction amount H is small (Case 1), the image extraction position is fixed at the center, and blur correction is performed by driving the correction lens and shift mechanism. This is because the optical performance near the center of the screen is superior to that of the periphery, and there is almost no shading, so an image with higher resolution and no brightness difference between the left and right can be obtained.

ブレ補正量Hが増加し、補正レンズとシフト機構で補正できる最大量にブレ補正量Hが近づいた場合(ケース2)は、画像切り出し位置を制御することで、補正レンズとシフト機構での補正量を軽減し、ブレ補正のストローク不足を回避する。これにより、良好なブレ補正を可能にする。 When the amount of blur correction H increases and approaches the maximum amount that can be corrected by the correction lens and shift mechanism (Case 2), the image extraction position is controlled to reduce the amount of correction by the correction lens and shift mechanism, and to avoid insufficient stroke of blur correction. This enables good blur correction.

ブレ補正量Hがさらに増加した場合(ケース3)は、画像切り出し位置の制御による補正量に対するハイパスフィルターの係数Fccとゲインβcを設定する。また、角速度センサ112の情報から算出した第3のブレ補正量のハイパスフィルターの係数Fclsとゲインβl,βsを設定する。これらにより、低周波の振れに対するブレ補正の感度を下げ、ブレ補正のストローク不足を回避し、良好なブレ補正を可能にする。 When the shake correction amount H is further increased (Case 3), the high-pass filter coefficient Fcc and gain βc are set for the correction amount due to control of the image crop position. Also, the high-pass filter coefficient Fcls and gains βl and βs for the third shake correction amount calculated from the information of the angular velocity sensor 112 are set. This reduces the sensitivity of the shake correction to low-frequency vibration, avoids insufficient shake correction stroke, and enables good shake correction.

ここで、本実施形態では、画像切り出し位置の制御による補正量に対するハイパスフィルターの係数Fcc、ゲインβcと、第3のブレ補正量のハイパスフィルターの係数Fcls、ゲインβl,βsは、互いの信号に応じて切り替えるのであるが、ステップS2002ではまず単独で最適値に設定する。以下では、ステップS2002において、ハイパスフィルターの係数Fcc,Fcls、ゲインβc,βl,βsをそれぞれ単独で最適値に設定する方法について説明する。 In this embodiment, the high-pass filter coefficient Fcc and gain βc for the correction amount due to control of the image crop position, and the high-pass filter coefficient Fcls and gains βl and βs for the third blur correction amount are switched according to each other's signal, but in step S2002, they are first set to optimal values independently. Below, a method for setting the high-pass filter coefficients Fcc, Fcls and gains βc, βl, and βs independently to optimal values in step S2002 will be described.

画像切り出し位置の制御による補正量及び角速度センサ112の情報から算出した第3のブレ補正量はハイパスフィルターがかけられ、このハイパスフィルターの係数Fcc,Fclsを変更することで、効果を変更することが可能である。またその出力に最大値が100%のゲインβc,βl,βsを掛けることにより制御レベルの制限を設けることが可能である。 The third blur correction amount calculated from the correction amount by controlling the image cropping position and the information from the angular velocity sensor 112 is high-pass filtered, and the effect can be changed by changing the coefficients Fcc and Fcls of this high-pass filter. In addition, it is possible to set a limit on the control level by multiplying the output by gains βc, βl, and βs with a maximum value of 100%.

補正レンズの制御による補正量Hl、撮像素子102のシフト機構の制御による補正量Hs、電子式ブレ補正部114の画像切り出し位置の制御による補正量Hcは、補正量Hから以下のようにして算出する。 The correction amount Hl due to control of the correction lens, the correction amount Hs due to control of the shift mechanism of the image sensor 102, and the correction amount Hc due to control of the image cropping position of the electronic image stabilization unit 114 are calculated from the correction amount H as follows:

(ケース1)
H≦(Hlmax+Hsmax)*αlsの場合
Hl=H×Hlmax/(Hlmax+Hsmax)
Hs=H×Hsmax/(Hlmax+Hsmax)
(ケース2)
H>(Hlmax+Hsmax)*αls、且つ
H≦(Hlmax+Hsmax)*αls+Hcmax*αcの場合
Hc=H-(Hlmax+Hsmax)*αls
Hl=Hlmax*αls
Hs=Hsmax*αls
(ケース3)
H>(Hlmax+Hsmax)*αls+Hcmax*αcの場合
Hc=Hcmax*αc+Hover*Hcmax/Hmax
Hl=Hlmax*αls/2+Hover*Hlmax/Hmax
Hs=Hsmax*αls/2+Hover*Hsmax/Hmax
ただし、
Hover=H-{(Hlmax+Hsmax)*αls+Hcmax*αc}
Hmax=Hlmax+Hsmax+Hcmax
なお、Hlmax、Hsmax、Hcmaxは補正レンズの制御による補正量Hl、撮像素子のシフト機構の制御による補正量Hs、画像切り出し位置の制御による補正量Hcの最大値、すなわち補正ストロークである。αls、αcは補正ストロークに対する割合で、最終的なブレ補正量の割り振りや補正値の設定の場合分けに用いる所定値である。
(Case 1)
If H≦(Hlmax+Hsmax)*αls, Hl=H×Hlmax/(Hlmax+Hsmax)
Hs=H×Hsmax/(Hlmax+Hsmax)
(Case 2)
If H>(Hlmax+Hsmax)*αls and H≦(Hlmax+Hsmax)*αls+Hcmax*αc, then Hc=H-(Hlmax+Hsmax)*αls
Hl=Hlmax*αls
Hs=Hsmax*αls
(Case 3)
If H>(Hlmax+Hsmax)*αls+Hcmax*αc, Hc=Hcmax*αc+Hover*Hcmax/Hmax
Hl=Hlmax*αls/2+Hover*Hlmax/Hmax
Hs=Hsmax*αls/2+Hover*Hsmax/Hmax
however,
Hover=H-{(Hlmax+Hsmax)*αls+Hcmax*αc}
Hmax=Hlmax+Hsmax+Hcmax
Here, Hlmax, Hsmax, and Hcmax are the maximum values of the correction amount Hl by controlling the correction lens, the correction amount Hs by controlling the shift mechanism of the image sensor, and the correction amount Hc by controlling the image clipping position, i.e., the correction stroke. αls and αc are ratios to the correction stroke, and are predetermined values used for different cases in allocating the final shake correction amount and setting the correction value.

そして、(ケース3)では、補正量Hl、補正量Hs、補正量Hcに応じて、画像切り出し位置の制御による補正量Hcのハイパスフィルターの係数Fcc、第3のブレ補正量のハイパスフィルターの係数Fcls、補正量Hlのゲインβl、補正量Hsのゲインβs、補正量Hcのゲインβcを設定する。具体的には以下に従って設定する。 In (Case 3), the coefficient Fcc of the high-pass filter of the correction amount Hc by controlling the image crop position, the coefficient Fcls of the high-pass filter of the third blur correction amount, the gain βl of the correction amount Hl, the gain βs of the correction amount Hs, and the gain βc of the correction amount Hc are set according to the correction amount Hl, the correction amount Hs, and the correction amount Hc. Specifically, they are set as follows.

Hoverが[Hmax-{(Hlmax+Hsmax)*αls+Hcmax*αc}]のPe1(%)未満の場合
Fcc=Fcc1(Hz)>Fcc0(Hz),βc=βc1(%)<100%
Fcls=Fcls0(Hz)、βl=βs=100%
Hoverが[Hmax-{(Hlmax+Hsmax)*αls+Hcmax*αc}]Pe1(%)以上かつPe2(%)未満の場合
Fcc=Fcc2(Hz)>Fcc1(Hz),βc=βc2(%)<βc1(%)
Fcls=Fcls2(Hz)>Fcls1(Hz),βl=βs=βls2(%)<100%
Hoverが[Hmax-{(Hlmax+Hsmax)*αls+Hcmax*αc}]のPe2(%)以上の場合
Fcc=Fcc3(Hz)>Fcc2(Hz),βc=βc3(%)<βc2(%)
Fcls=Fcls3(Hz)>Fcls1(Hz),βl=βs=βls3(%)<βls2(%)
ただし、Fccは画像切り出し位置の制御による補正量のハイパスフィルターの係数、βcは補正量Hcのゲイン、Fclsは第3のブレ補正量のハイパスフィルターの係数、βl,βsは補正量Hl、補正量Hsのゲインである。なお、Fcc0(Hz)は、ハイパスフィルターの係数Fccの最小値、Fcls0(Hz)は、ハイパスフィルターの係数Fclsの最小値である。
When Hover is less than Pe1(%) of [Hmax-{(Hlmax+Hsmax)*αls+Hcmax*αc}], Fcc=Fcc1(Hz)>Fcc0(Hz), βc=βc1(%)<100%
Fcls=Fcls0 (Hz), βl=βs=100%
When Hover is [Hmax-{(Hlmax+Hsmax)*αls+Hcmax*αc}] Pe1(%) or more and less than Pe2(%), Fcc=Fcc2(Hz)>Fcc1(Hz), βc=βc2(%)<βc1(%)
Fcls=Fcls2(Hz)>Fcls1(Hz), βl=βs=βls2(%)<100%
When Hover is equal to or greater than Pe2(%) of [Hmax-{(Hlmax+Hsmax)*αls+Hcmax*αc}], Fcc=Fcc3(Hz)>Fcc2(Hz), βc=βc3(%)<βc2(%)
Fcls=Fcls3(Hz)>Fcls1(Hz), βl=βs=βls3(%)<βls2(%)
where Fcc is the high-pass filter coefficient of the correction amount by controlling the image cropping position, βc is the gain of the correction amount Hc, Fcls is the high-pass filter coefficient of the third blur correction amount, βl and βs are the gains of the correction amount Hl and the correction amount Hs. Note that Fcc0 (Hz) is the minimum value of the high-pass filter coefficient Fcc, and Fcls0 (Hz) is the minimum value of the high-pass filter coefficient Fcls.

なお、(ケース1)、(ケース2)の場合のハイパスフィルターの係数及びゲインは、Fcc=Fcc0Hz(最小値)、βc=100%、Fcls=Fcls0(Hz)、βl=βs=100%である。 Note that the coefficients and gains of the high-pass filter in (Case 1) and (Case 2) are Fcc = Fcc0Hz (minimum value), βc = 100%, Fcls = Fcls0 (Hz), and βl = βs = 100%.

次いで、ステップS2003に進み、撮像装置100がパンニング状態か否かを判定する。角速度センサ112の出力や動きベクトル検出部105のベクトル検出結果から、パンニングの開始時や前半に生じる大きなブレが検出されていれば、パンニング状態と判断して、ステップS2004へ進む。パンニングが検出されていなければステップS2006へ進む。 Then, the process proceeds to step S2003, where it is determined whether the image capture device 100 is in a panning state. If a large shake occurring at the start or first half of panning is detected from the output of the angular velocity sensor 112 or the vector detection result of the motion vector detection unit 105, it is determined that the image capture device 100 is in a panning state, and the process proceeds to step S2004. If panning is not detected, the process proceeds to step S2006.

ステップS2004では、画像切り出し位置の制御による補正量のハイパスフィルターの係数Fccの値を上げ、より高周波の補正量の割合が大きくなるようにする。例えば、変更前の値がFcc0(Hz)ならば、Fcc1(Hz)に、Fcc1(Hz)ならば、Fcc2(Hz)に、Fcc2(Hz)ならば、Fcc3(Hz)に変更し、Fcc3(Hz)の場合は変更しない。 In step S2004, the value of the coefficient Fcc of the high-pass filter for the amount of correction due to control of the image cropping position is increased so that the proportion of the amount of correction for higher frequencies becomes greater. For example, if the value before the change is Fcc0 (Hz), it is changed to Fcc1 (Hz), if it is Fcc1 (Hz), it is changed to Fcc2 (Hz), if it is Fcc2 (Hz), it is changed to Fcc3 (Hz), and if it is Fcc3 (Hz), it is not changed.

同時に画像切り出し位置の制御による補正量のゲインβcの値を下げる。変更前の値がβc=100%ならば、βc1(%)に、βc1(%)ならば、βc2(%)に、βc2(%)ならば、βc3(%)に変更し、βc3(%)の場合は変更しない。 At the same time, the value of the gain βc of the correction amount by controlling the image cropping position is lowered. If the value before the change is βc = 100%, it is changed to βc1(%), if it is βc1(%), it is changed to βc2(%), if it is βc2(%), it is changed to βc3(%), and if it is βc3(%), it is not changed.

これにより、パンニングなどによる角速度センサ112の信号の急激な増加の影響を減少させることができる。 This reduces the effect of sudden increases in the signal from the angular velocity sensor 112 caused by panning, etc.

また、角速度センサ112の信号はパンニングなどカメラの動きを反映するので、被写体の動きを反映する動きベクトルに比べて遅延する。高速のカメラ移動におけるこの遅延の影響を低減するために、その時点で設定されている画像切り出し位置の制御による補正量についての係数Fccとゲインβcの値に基づいて、第3の補正量についての係数Fcls、補正レンズによる補正量Hlのゲインβl、シフト機構による補正量Hsのゲインβsを図21に従って再設定する。 In addition, the signal from the angular velocity sensor 112 reflects the movement of the camera, such as panning, and is therefore delayed compared to the motion vector that reflects the movement of the subject. In order to reduce the effect of this delay during high-speed camera movement, the coefficient Fcls for the third correction amount, the gain βl of the correction amount Hl by the correction lens, and the gain βs of the correction amount Hs by the shift mechanism are reset according to FIG. 21 based on the values of the coefficient Fcc and gain βc for the correction amount by control of the image cropping position that are set at that time.

画像切り出し位置の制御による補正量の係数FccがFcc1(Hz)(この場合のゲインはβc1となる)であるなら、第3のブレ補正量のハイパスフィルターの係数Fclsは、Fcls0とその時点の設定値の高い方のカットオフ周波数を選択する。補正レンズの制御による補正量Hlのゲインβlとシフト機構の制御による補正量Hsのゲインβsは、100%とその時点での設定値の低い方を選択する。他の場合も同様である。 If the coefficient Fcc of the correction amount due to control of the image crop position is Fcc1 (Hz) (the gain in this case is βc1), the coefficient Fcls of the high-pass filter for the third blur correction amount selects either Fcls0 or the higher cutoff frequency set at that time. The gain βl of the correction amount Hl due to control of the correction lens and the gain βs of the correction amount Hs due to control of the shift mechanism select either 100% or the lower set value at that time. The same applies to the other cases.

その後ステップS2005へ進み、設定されている値に従って、補正制御信号を光学系101の補正レンズ、撮像素子102のシフト機構、電子式ブレ補正部114に出力し、ブレ補正を行う。 Then, the process proceeds to step S2005, where a correction control signal is output to the correction lens of the optical system 101, the shift mechanism of the image sensor 102, and the electronic blur correction unit 114 according to the set value, and blur correction is performed.

一方、ステップS2003からS2006へ進んだ場合は、パンニング終了間近か否かを判断し、終了間近ならステップS2007へ進み、間近で無いならばステップS2010へ進む。パンニング終了間近か否かの判定は、角速度センサ112の出力やベクトル検出結果を時系列的に観察することにより行う。 On the other hand, if the process proceeds from step S2003 to S2006, it is determined whether panning is about to end, and if so, the process proceeds to step S2007, and if not, the process proceeds to step S2010. The determination of whether panning is about to end is made by observing the output of the angular velocity sensor 112 and the vector detection results in chronological order.

角速度センサ112の出力やベクトル検出結果から、パンニングの開始時や前半に生じる大きなブレが検出された後、パンニングを示す信号の絶対値が減少して所定値以下になり、かつその傾きが所定傾き以下となった場合に、パンニング終了間近と判定する。逆に所定値以上である場合には、パンニング終了まじかではないと判断する。絶対値の所定値と所定傾き値は予め決められた値でもよいし、パンニングを検出した信号からその都度計算してもよい。絶対値の所定値は、パンニング時の信号の最大値の所定倍(1未満)の値、所定傾き値はパンニング時の信号の最大値までの平均傾きの所定倍(1未満)の値とすればよい。 If a large shake occurring at the start or first half of panning is detected from the output of the angular velocity sensor 112 or the vector detection results, and then the absolute value of the signal indicating panning decreases to a predetermined value or less, and the slope is less than the predetermined slope, it is determined that panning is about to end. Conversely, if it is greater than the predetermined value, it is determined that panning is not about to end. The predetermined absolute value and the predetermined slope value may be predetermined values, or may be calculated each time from the signal that detects panning. The predetermined absolute value may be a predetermined multiple (less than 1) of the maximum value of the signal during panning, and the predetermined slope value may be a predetermined multiple (less than 1) of the average slope up to the maximum value of the signal during panning.

ステップS2007では、第3の補正量の係数Fclsを下げ、より低周波のブレの補正を行うようにする。例えば、変更前のFclsの値がFcls3(Hz)ならば、Fcls2(Hz)に、Fcls2(Hz)ならば、Fcls1(Hz)に変更し、Fcls0(Hz)の場合は変更しない。 In step S2007, the coefficient Fcls of the third correction amount is lowered to correct lower frequency shake. For example, if the value of Fcls before the change is Fcls3 (Hz), it is changed to Fcls2 (Hz), if it is Fcls2 (Hz), it is changed to Fcls1 (Hz), and if it is Fcls0 (Hz), it is not changed.

同時に補正レンズの制御による補正量Hlのゲインβlとシフト機構の制御による補正量Hsのゲインβsを上げる。変更前のβl,βsの値がβl3(%),βs3(%)ならば、βl2(%),βs2(%)に、βl2(%),βs2(%)ならば、βl=βs=100%に変更し、βl,βsが100%の場合は変更しない。これにより、パンニング終了間近にもより低周波のブレの補正を行うことができる。 At the same time, the gain βl of the correction amount Hl caused by controlling the correction lens and the gain βs of the correction amount Hs caused by controlling the shift mechanism are increased. If the values of βl and βs before the change are βl3(%) and βs3(%), they are changed to βl2(%) and βs2(%), if they are βl2(%) and βs2(%), they are changed to βl = βs = 100%, and if βl and βs are 100%, no change is made. This makes it possible to correct low-frequency blur even near the end of panning.

また、動きベクトルを検出するには1フレーム以上の画像を要するので、検出に時間がかかる。小移動の被写体の追尾などの低速のカメラ移動の際のこの影響を減少するために、その時点で設定されている第3の補正量についてのFcls、補正レンズの制御による補正量Hlのゲインβl、シフト機構の制御による補正量Hsのゲインβsの値に基づいて、画像切り出し位置の制御による補正量の係数Fccとゲインβcを図22に従って再設定する。 Moreover, since detecting a motion vector requires one or more frames of images, the detection takes time. To reduce this effect during slow camera movement, such as tracking a subject with small movements, the coefficient Fcc and gain βc of the correction amount due to control of the image cut-out position are reset according to FIG. 22 based on the values of Fcls for the third correction amount set at that time, the gain βl of the correction amount Hl due to control of the correction lens, and the gain βs of the correction amount Hs due to control of the shift mechanism.

第3のブレ補正量のハイパスフィルターの係数FclsがFcls2(Hz)(この場合の補正レンズとシフト機構のゲインβl,βsはβls2となる)であるなら、画像切り出し位置の制御による補正量のFccはFcc2とその時点の設定値の低い方のカットオフ周波数を選択する。その場合のゲインβcはβc2とその時点での設定値の高い方を選択する。他の場合も同様である。 If the coefficient Fcls of the high-pass filter for the third blur correction amount is Fcls2 (Hz) (in this case, the gains βl and βs of the correction lens and shift mechanism are βls2), the correction amount Fcc due to control of the image crop position selects the lower cutoff frequency of Fcc2 or the setting value at that time. In that case, the gain βc selects the higher of βc2 or the setting value at that time. The same applies to other cases.

一方、ステップS2006でパンニング終了間近で無いと判定された場合は、ステップS2010において、ベクトル検出結果の積算を行う。なお、ベクトルの積算結果のリセットはステップS2004で行われる。 On the other hand, if it is determined in step S2006 that panning is not about to end, the vector detection results are accumulated in step S2010. Note that the vector accumulation results are reset in step S2004.

その後ステップS2011へ進み、ベクトル積算値(電子式ブレ補正量)の絶対値が減少していて、かつ絶対値が所定値より小さいかを判定する。条件を満たしていればステップS2012へ進み、満たしていなければステップS2013へ進む。ただし、ベクトル積算開始から所定時間経過していない場合は、以下の処理を行わずにステップS2005へ進む。これは、積算開始から所定時間経過していない積算値は信頼性が低いからである。 Then, the process proceeds to step S2011, where it is determined whether the absolute value of the vector integrated value (electronic shake correction amount) has decreased and is smaller than a predetermined value. If the condition is met, the process proceeds to step S2012, and if not, the process proceeds to step S2013. However, if the predetermined time has not elapsed since the start of the vector integration, the process proceeds to step S2005 without performing the following process. This is because an integrated value that has not yet elapsed the predetermined time since the start of integration is unreliable.

ステップS2012では、第3の補正量のハイパスフィルターの係数Fclsに基づき、画像切り出し位置の制御による補正量のハイパスフィルターの係数Fcc、ゲインβcの設定を行う。その際、第3の補正量の係数Fclsを、画像切り出し位置の制御による補正量の係数Fccより低くする。 In step S2012, the coefficient Fcc and gain βc of the high-pass filter of the correction amount due to control of the image cut-out position are set based on the coefficient Fcls of the high-pass filter of the third correction amount. At that time, the coefficient Fcls of the third correction amount is set lower than the coefficient Fcc of the correction amount due to control of the image cut-out position.

このベクトル積算値(電子式ブレ補正量)の絶対値が小さく、減少している場合は、被写体の移動に追従できていると考えられるので、広い周波数帯でのブレ補正が可能な設定を行う。 If the absolute value of this vector integrated value (electronic image stabilization amount) is small and decreasing, it is considered that the camera is able to track the movement of the subject, so a setting that allows image stabilization over a wide frequency range is used.

まず、係数Fclsと係数Fccを比較し、係数Fclsが係数Fccより低くない場合は、低くなるよう係数Fccに以下の変更を行う。ただし、すでに係数Fclsが最低周波数であるFcls0(Hz)の場合は変更を行わない。 First, the coefficient Fcls is compared with the coefficient Fcc, and if the coefficient Fcls is not lower than the coefficient Fcc, the following changes are made to the coefficient Fcc so that it is lower. However, if the coefficient Fcls is already Fcls0 (Hz), which is the lowest frequency, no changes are made.

Fcls≧Fccの場合、
Fcls=Fcls0なら、Fcc=Fcc1
Fcls=Fcls1なら、Fcc=Fcc2
Fcls=Fcls2なら、Fcc=Fcc3
Fcls=Fcls3なら、Fcc=Fcc3
と変更する。
If Fcls ≧ Fcc,
If Fcls=Fcls0, then Fcc=Fcc1
If Fcls=Fcls1, then Fcc=Fcc2
If Fcls = Fcls2, then Fcc = Fcc3
If Fcls = Fcls3, then Fcc = Fcc3
Change it to:

そしてゲインβcは変更された係数Fccに従い、
Fcc=Fcc1なら、βc=βc1
Fcc=Fcc2なら、βc=βc2
Fcc=Fcc3なら、βc=βc3
と変更する。
Then, the gain βc is calculated according to the changed coefficient Fcc as follows:
If Fcc=Fcc1, then βc=βc1
If Fcc = Fcc2, then βc = βc2
If Fcc = Fcc3, then βc = βc3
Change it to:

そして、ステップS2013では、ベクトル積算値(電子式ブレ補正量)の絶対値が増加していてかつ絶対値が所定値より大きいか判定する。条件を満たしていればステップS2014へ進み、満たしていなければステップS2005へ進む。 Then, in step S2013, it is determined whether the absolute value of the vector integrated value (electronic shake correction amount) has increased and is greater than a predetermined value. If this condition is met, the process proceeds to step S2014; if not, the process proceeds to step S2005.

ステップS2014では、画像切り出し位置の制御による補正量の係数Fccに基づき、第3の補正量の係数Fclsと、補正レンズとシフト機構のゲインβl,βsの設定を行う。その際、第3の補正量の係数Fclsを画像切り出し位置の制御による補正量のFccより高くする。 In step S2014, the coefficient Fcls of the third correction amount and the gains βl and βs of the correction lens and shift mechanism are set based on the coefficient Fcc of the correction amount due to control of the image cut-out position. At that time, the coefficient Fcls of the third correction amount is set higher than the coefficient Fcc of the correction amount due to control of the image cut-out position.

このベクトル積算値(電子式ブレ補正量)の絶対値が大きく増加している場合は、被写体の移動に追従できていないと考えられるので、より高周波の補正量の割合が大きくなるようにする。 If the absolute value of this vector integrated value (electronic image stabilization amount) has increased significantly, it is believed that the camera is not able to keep up with the movement of the subject, so the proportion of high frequency correction amount is increased.

まず、係数Fclsと係数Fccを比較し、係数Fclsが係数Fccより高くない場合は、高くなるように以下の変更を行う。ただしすでにFclsが最低周波数であるFcls0(Hz)の場合は変更を行わない。 First, the coefficient Fcls is compared with the coefficient Fcc, and if the coefficient Fcls is not higher than the coefficient Fcc, the following changes are made so that it is higher. However, if Fcls is already the lowest frequency, Fcls0 (Hz), no changes are made.

Fcls≦Fccの場合、
Fcc=Fcc0またはFcc=Fcc1なら、Fcls=Fcls2
Fcc=Fcc2なら、Fcls=Fcls3
Fcc=Fcc3なら、Fcls=Fcls3
と変更する。
If Fcls≦Fcc,
If Fcc=Fcc0 or Fcc=Fcc1, then Fcls=Fcls2
If Fcc=Fcc2, then Fcls=Fcls3
If Fcc=Fcc3, then Fcls=Fcls3
Change it to:

そしてゲインβl,βsは変更されたFclsに従い、
Fcls=Fcls2なら、βl=βs=βls2
Fcls=Fcls3なら、βl=βs=βls3
と変更する。
Then, the gains βl and βs are calculated according to the changed Fcls.
If Fcls = Fcls2, then βl = βs = βls2
If Fcls = Fcls3, then βl = βs = βls3
Change it to:

また、画像切り出し位置の制御による補正量のゲインβcに応じて、ファインダーの表示を変更して、撮影者に警告を行うようにしてもよい。補正ストロークの余裕が減少していることを警告するファインダー内のLEDなどを点灯や点滅する表示を行ってもよいし、ファインダーの周辺部の表示を半透明にするなどした上で、補正ストロークの余裕の減少に従って半透明部分を濃くするようにしてもよい。 The viewfinder display may be changed to warn the photographer according to the gain βc of the correction amount due to control of the image crop position. An LED or the like in the viewfinder may be lit or blinked to warn that the correction stroke margin is decreasing, or the display around the periphery of the viewfinder may be made semi-transparent, and the semi-transparent parts may be made darker as the correction stroke margin decreases.

また、予め角速度センサ112の出力とベクトル検出結果の位相差を観測しておくことにより、ブレ補正性能を向上することが可能である。ベクトルはその検出に1フレーム以上を要するために検出の遅延が発生するので、予めその遅延量を計算で求めておく。角速度センサの出力から、手振れとベクトルの遅延量の計算値と実測値を関係付けしておく。これにより検出の遅延を考慮したベクトル積算値(電子式ブレ補正量)の算出が可能になる。そのため、ベクトル積算値(電子式ブレ補正量)を用いた画像切り出し位置の制御による補正量の係数Fccとゲイン、及び第3の補正量の係数Fcls、補正レンズとシフト機構のゲインβl,βsの設定をより精度よく行うことが可能となる。 It is also possible to improve blur correction performance by observing the phase difference between the output of the angular velocity sensor 112 and the vector detection result in advance. Since a vector requires one or more frames to detect, a detection delay occurs, so the amount of delay is calculated in advance. The calculated and measured values of the camera shake and vector delay are related to each other from the output of the angular velocity sensor. This makes it possible to calculate a vector integrated value (electronic blur correction amount) that takes into account the detection delay. This makes it possible to more accurately set the coefficient Fcc and gain of the correction amount by controlling the image cut-out position using the vector integrated value (electronic blur correction amount), as well as the coefficient Fcls of the third correction amount, and the gains βl and βs of the correction lens and shift mechanism.

このようにして求めた係数Fc、ゲインβが設定された信号がそれぞれの補正機構へ出力され、ブレ補正が行われる。 The signals with the coefficient Fc and gain β calculated in this way are output to the respective correction mechanisms, and blur correction is performed.

以上説明したように、本実施形態では、撮影者の着目対象に応じて、手振れと被写体振れの補正比率を制御することにより、撮影者が望むブレ補正効果を得ることができる。 As described above, in this embodiment, the photographer can obtain the shake correction effect desired by controlling the correction ratio between camera shake and subject shake according to the subject of the photographer's attention.

さらに、画像切り出し位置の制御による補正量と第3のブレ補正量のハイパスフィルターの係数とゲインを、互いの信号に応じて切り替えるようにする。これにより、ブレ補正のストローク不足を回避し、主被写体のフレームアウトの防止と画像劣化に影響の大きいブレ補正を両立することが可能となる。 In addition, the coefficient and gain of the high-pass filter for the amount of correction by controlling the image crop position and the third blur correction amount are switched according to each signal. This makes it possible to avoid a lack of stroke for blur correction and to simultaneously prevent the main subject from going out of frame and perform blur correction, which has a large impact on image degradation.

なお、本実施形態で説明した技術は、動画および静止画のいずれに対しても適用することができる。動画の場合はシーンに応じて手振れ補正と被写体振れ補正を連続的に切り替えることができ、切り替えによる微小な画像シフトなどの違和感を抑制することができる。静止画の場合は、手振れと被写体振れがそれぞれ程よいバランスで抑制された画像を生成することができる。また流し撮りという特殊な静止画撮影に対しても適用することができる。 The technology described in this embodiment can be applied to both video and still images. In the case of video, it is possible to continuously switch between camera shake correction and subject shake correction depending on the scene, and it is possible to suppress discomfort such as slight image shifts caused by switching. In the case of still images, it is possible to generate images in which camera shake and subject shake are suppressed in an appropriate balance. It can also be applied to a special type of still image shooting called panning.

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

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

100:撮像装置、101:光学系、102:撮像素子、103:現像処理部、104:画像メモリ、105:動きベクトル検出部、106:動き分離部、107:ブレ補正量変換部、108:被写体検出部、109:カメラ情報取得部、110:着目対象推定部、111:ブレ補正量算出部、601:信頼度算出部、602:分離度算出部、1301:ブレ補正効果判定部、1302:表示部 100: imaging device, 101: optical system, 102: imaging element, 103: development processing unit, 104: image memory, 105: motion vector detection unit, 106: motion separation unit, 107: blur correction amount conversion unit, 108: subject detection unit, 109: camera information acquisition unit, 110: focus target estimation unit, 111: blur correction amount calculation unit, 601: reliability calculation unit, 602: separation degree calculation unit, 1301: blur correction effect determination unit, 1302: display unit

Claims (36)

入力画像に対して、特定の被写体を検出し、被写体情報を出力する被写体検出手段と、
撮影状況を推定するために必要なカメラ情報を取得するカメラ情報取得手段と、
前記被写体情報と前記カメラ情報とを用いて、画像内の着目対象を推定する推定手段と、
入力画像における背景の動きと被写体の動きを検出する第1の動き検出手段と、
前記第1の動き検出手段により検出された背景の動きと被写体の動きを、それぞれ背景のブレを補正する第1のブレ補正量と被写体のブレを補正する第2のブレ補正量に変換する変換手段と、
前記推定手段より推定された前記着目対象に基づいて、前記第1のブレ補正量と前記第2のブレ補正量を合成して、最終的なブレ補正量を生成する補正量算出手段と、
を備え、
前記カメラ情報は、シャッタスピードを示す情報、AFエリアを示す情報、焦点距離を示す情報、ユーザ操作を示す情報、慣性センサの検出結果を示す情報、被写体までの距離を示す情報、ユーザの視線検出結果を示す情報の少なくともいずれかを含むことを特徴とする像ブレ補正装置。
a subject detection means for detecting a specific subject from an input image and outputting subject information;
A camera information acquisition means for acquiring camera information necessary for estimating a photographing situation;
an estimation means for estimating an object of interest in an image using the subject information and the camera information;
a first motion detection means for detecting a motion of a background and a motion of a subject in an input image;
a conversion means for converting the background motion and the subject motion detected by the first motion detection means into a first blur compensation amount for compensating for background blur and a second blur compensation amount for compensating for subject blur, respectively;
a correction amount calculation means for combining the first blur correction amount and the second blur correction amount based on the target object estimated by the estimation means to generate a final blur correction amount;
Equipped with
the camera information includes at least any one of information indicating a shutter speed, information indicating an AF area, information indicating a focal length, information indicating a user operation, information indicating a detection result of an inertial sensor, information indicating a distance to a subject, and information indicating a detection result of a user's line of sight.
前記第1の動き検出手段は、入力画像について動きベクトルを検出して、該動きベクトルを、背景の動きを表す第1の動きベクトルと、被写体の動きを表す第2の動きベクトルとに分離し、前記変換手段は、前記第1の動きベクトルと前記第2の動きベクトルを、それぞれ前記第1のブレ補正量と前記第2のブレ補正量に変換することを特徴とする請求項1に記載の像ブレ補正装置。 The image stabilization device according to claim 1, characterized in that the first motion detection means detects a motion vector for an input image and separates the motion vector into a first motion vector representing the motion of the background and a second motion vector representing the motion of the subject, and the conversion means converts the first motion vector and the second motion vector into the first shake correction amount and the second shake correction amount, respectively. 撮像装置の振れを検出する角速度センサからの信号を取得する取得手段をさらに備え、前記第1の動き検出手段は、入力画像について動きベクトルを検出して、該動きベクトルを、背景の動きを表す第1の動きベクトルと、被写体の動きを表す第2の動きベクトルとに分離し、前記変換手段は、前記角速度センサで検出された振れと前記第2の動きベクトルを、それぞれ前記第1のブレ補正量と前記第2のブレ補正量に変換することを特徴とする請求項1に記載の像ブレ補正装置。 The image stabilization device according to claim 1, further comprising an acquisition means for acquiring a signal from an angular velocity sensor that detects shake of the imaging device, the first motion detection means detecting a motion vector for an input image and separating the motion vector into a first motion vector representing the motion of the background and a second motion vector representing the motion of the subject, and the conversion means converting the shake detected by the angular velocity sensor and the second motion vector into the first shake compensation amount and the second shake compensation amount, respectively. 前記動きベクトルの信頼度を算出する信頼度算出手段と、前記第1の動きベクトルと前記第2の動きベクトルの分離度を算出する分離度算出手段と、をさらに備え、
前記補正量算出手段は、前記推定手段より推定された前記着目対象と、前記信頼度算出手段より算出された前記動きベクトルの信頼度と、前記分離度算出手段より算出された前記第1の動きベクトルと前記第2の動きベクトルの分離度とに基づいて、前記第1のブレ補正量と前記第2のブレ補正量を合成して、最終的なブレ補正量を生成することを特徴とする請求項2または3に記載の像ブレ補正装置。
a reliability calculation means for calculating a reliability of the motion vector; and a separation calculation means for calculating a separation between the first motion vector and the second motion vector,
4. The image blur correction device according to claim 2, wherein the correction amount calculation means generates a final blur correction amount by combining the first blur correction amount and the second blur correction amount based on the target object estimated by the estimation means, the reliability of the motion vector calculated by the reliability calculation means, and the separation between the first motion vector and the second motion vector calculated by the separation calculation means.
前記被写体情報は、被写体の位置および大きさ、被写体の人物らしさ、被写体の動きの少なくともいずれかを含むことを特徴とする請求項1乃至4のいずれか1項に記載の像ブレ補正装置。 The image stabilization device according to any one of claims 1 to 4, characterized in that the subject information includes at least one of the position and size of the subject, the likeness of the subject to a human, and the movement of the subject. 前記推定手段は、前記被写体情報および前記カメラ情報の少なくとも一つに基づいて、前記着目対象が背景である度合いを示す背景度合いと、前記着目対象が被写体である度合いを示す被写体度合いの少なくともいずれかを算出することを特徴とする請求項1乃至5のいずれか1項に記載の像ブレ補正装置。 The image stabilization device according to any one of claims 1 to 5, characterized in that the estimation means calculates at least one of a background degree indicating the degree to which the target object is a background and a subject degree indicating the degree to which the target object is a subject, based on at least one of the subject information and the camera information. 前記補正量算出手段は、前記背景度合いおよび前記被写体度合いの少なくともいずれかに基づいて、前記第1のブレ補正量および前記第2のブレ補正量を重み付け加算することにより、最終的なブレ補正量を生成することを特徴とする請求項6に記載の像ブレ補正装置。 The image stabilization device according to claim 6, characterized in that the correction amount calculation means generates a final blur correction amount by performing a weighted addition of the first blur correction amount and the second blur correction amount based on at least one of the background degree and the subject degree. 前記補正量算出手段は、前記背景度合いが高くなるにつれて、前記第1のブレ補正量の重みを大きくすることを特徴とする請求項7に記載の像ブレ補正装置。 The image stabilization device according to claim 7, characterized in that the correction amount calculation means increases the weight of the first image stabilization amount as the background degree increases. 前記補正量算出手段は、前記被写体度合いが高くなるにつれて、前記第2のブレ補正量の重みを大きくすることを特徴とする請求項7または8に記載の像ブレ補正装置。 The image stabilization device according to claim 7 or 8, characterized in that the correction amount calculation means increases the weight of the second image stabilization amount as the subject degree increases. 前記補正量算出手段は、前記動きベクトルの信頼度に基づいて、前記第1のブレ補正量および前記第2のブレ補正量を重み付け加算することにより、最終的なブレ補正量を生成することを特徴とする請求項4に記載の像ブレ補正装置。 The image stabilization device according to claim 4, characterized in that the correction amount calculation means generates a final blur correction amount by performing a weighted addition of the first blur correction amount and the second blur correction amount based on the reliability of the motion vector. 前記補正量算出手段は、前記第1の動きベクトルの信頼度の方が、前記第2の動きベクトルの信頼度よりも高くなるにつれて、前記第1のブレ補正量の重みを大きくすることを特徴とする請求項10に記載の像ブレ補正装置。 The image stabilization device according to claim 10, characterized in that the correction amount calculation means increases the weight of the first blur correction amount as the reliability of the first motion vector becomes higher than the reliability of the second motion vector. 前記補正量算出手段は、前記第1の動きベクトルと前記第2の動きベクトルの分離度に基づいて、前記第1のブレ補正量および前記第2のブレ補正量を重み付け加算することにより、最終的なブレ補正量を生成することを特徴とする請求項4に記載の像ブレ補正装置。 The image stabilization device according to claim 4, characterized in that the correction amount calculation means generates a final blur correction amount by performing a weighted addition of the first blur correction amount and the second blur correction amount based on the degree of separation between the first motion vector and the second motion vector. 前記補正量算出手段は、前記第1の動きベクトルと前記第2の動きベクトルの分離度が高くなるにつれて、前記第2のブレ補正量の重みを大きくすることを特徴とする請求項12に記載の像ブレ補正装置。 The image stabilization device according to claim 12, characterized in that the correction amount calculation means increases the weight of the second blur correction amount as the degree of separation between the first motion vector and the second motion vector increases. 前記第1の動き検出手段は、前記被写体情報と前記動きベクトルの量とに基づいて、前記動きベクトルを、前記第1の動きベクトルと第2の動きベクトルとに分離することを特徴とする請求項2乃至4のいずれか1項に記載の像ブレ補正装置。 The image stabilization device according to any one of claims 2 to 4, characterized in that the first motion detection means separates the motion vector into the first motion vector and a second motion vector based on the subject information and the amount of the motion vector. 前記第2のブレ補正量に基づくブレ補正の効果を判定する判定手段と、
前記入力画像とともに前記判定手段による判定結果に対応する表示アイテムを表示する表示手段と、をさらに備え、
前記判定手段は、前記着目対象、前記第1のブレ補正量および前記第2のブレ補正量、前記被写体情報の信頼度、前記第2の動きベクトルの信頼度、前記第1の動きベクトルと前記第2の動きベクトルの分離度、ブレ補正量の上限の少なくともいずれかに基づいて、前記第2のブレ補正量に基づくブレ補正の効果を判定することを特徴とする請求項2に記載の像ブレ補正装置。
a determination means for determining an effect of blur correction based on the second blur correction amount;
a display unit that displays a display item corresponding to the determination result by the determination unit together with the input image,
3. The image blur correction device according to claim 2, wherein the determination unit determines an effect of blur correction based on the second blur correction amount, based on at least any of the target, the first blur correction amount and the second blur correction amount, reliability of the object information, reliability of the second motion vector, a degree of separation between the first motion vector and the second motion vector, and an upper limit of the blur correction amount.
前記判定手段は、前記着目対象が被写体である度合いが第1の値の場合、前記度合いが前記第1の値よりも低い第2の場合のときよりも、前記第2のブレ補正量に基づくブレ補正の効果が高いと判定することを特徴とする請求項15に記載の像ブレ補正装置。 The image stabilization device according to claim 15, characterized in that the determination means determines that the effect of the shake correction based on the second shake correction amount is higher when the degree of the object of interest being a subject is a first value than when the degree is a second value lower than the first value. 前記判定手段は、前記第1のブレ補正量と前記第2のブレ補正量との差の絶対値が第3の値の場合、前記差の絶対値が前記第3の値よりも小さい第4の値の場合よりも、前記第2のブレ補正量に基づくブレ補正の効果が高いと判定することを特徴とする請求項15に記載の像ブレ補正装置。 The image stabilization device according to claim 15, characterized in that the determination means determines that the effect of the stabilization based on the second stabilization amount is higher when the absolute value of the difference between the first stabilization amount and the second stabilization amount is a third value than when the absolute value of the difference is a fourth value smaller than the third value. 前記判定手段は、前記被写体情報の信頼度が高い場合の方が、前記信頼度が低い場合よりも前記第2のブレ補正量に基づくブレ補正の効果が高いと判定することを特徴とする請求項15に記載の像ブレ補正装置。 The image stabilization device according to claim 15, characterized in that the determination means determines that the effect of the shake correction based on the second shake correction amount is greater when the reliability of the subject information is high than when the reliability is low. 前記判定手段は、前記第2の動きベクトルの信頼度が高い場合の方が、前記信頼度が低い場合よりも前記第2のブレ補正量に基づくブレ補正の効果が高いと判定することを特徴とする請求項15に記載の像ブレ補正装置。 The image stabilization device according to claim 15, characterized in that the determination means determines that the effect of the stabilization based on the second stabilization amount is higher when the reliability of the second motion vector is high than when the reliability is low. 前記判定手段は、前記第1の動きベクトルと前記第2の動きベクトルの分離度が高い場合の方が、前記分離度が低い場合よりも前記第2のブレ補正量に基づくブレ補正の効果が高いと判定することを特徴とする請求項15に記載の像ブレ補正装置。 The image stabilization device according to claim 15, characterized in that the determination means determines that the effect of the blur correction based on the second blur correction amount is higher when the degree of separation between the first motion vector and the second motion vector is high than when the degree of separation is low. 前記判定手段は、前記ブレ補正量の上限から前記第2のブレ補正量を差し引いた値が第5の値の場合、前記第5の値よりも小さい第6の値の場合よりも、前記第2のブレ補正量に基づくブレ補正の効果が高いと判定することを特徴とする請求項15に記載の像ブレ補正装置。 The image stabilization device according to claim 15, characterized in that the determination means determines that the effect of the shake correction based on the second shake correction amount is higher when the value obtained by subtracting the second shake correction amount from the upper limit of the shake correction amount is a fifth value than when the value is a sixth value smaller than the fifth value. 前記判定手段は、前記第2のブレ補正量に基づくブレ補正の効果が所定の閾値よりも高い状態が、所定の時間以上継続した場合に、前記第2のブレ補正量に基づくブレ補正の効果があると判定することを特徴とする請求項15に記載の像ブレ補正装置。 The image stabilization device according to claim 15, characterized in that the determination means determines that the image stabilization based on the second image stabilization amount is effective when a state in which the effect of the image stabilization based on the second image stabilization amount is higher than a predetermined threshold continues for a predetermined time or more. 前記表示手段は、前記判定手段により前記第2のブレ補正量に基づくブレ補正の効果がないと判定された場合に、前記第1のブレ補正量に基づくブレ補正に対応する第1の表示アイテムを表示し、前記第2のブレ補正量に基づくブレ補正の効果があると判定された場合に、前記第2のブレ補正量に基づくブレ補正に対応する第2の表示アイテムを表示することを特徴とする請求項15に記載の像ブレ補正装置。 The image stabilization device according to claim 15, characterized in that the display means displays a first display item corresponding to the shake correction based on the first shake correction amount when the determination means determines that the shake correction based on the second shake correction amount is ineffective, and displays a second display item corresponding to the shake correction based on the second shake correction amount when the determination means determines that the shake correction based on the second shake correction amount is effective. 前記表示手段は、第2の表示アイテムを、ブレ補正の対象となる被写体領域の近傍に表示することを特徴とする請求項23に記載の像ブレ補正装置。 The image stabilization device according to claim 23, characterized in that the display means displays the second display item in the vicinity of the subject area that is the target of image stabilization. 前記表示手段は、第2の表示アイテムと被写体を囲う枠とによって、ブレ補正対象となる被写体を撮影者に通知することを特徴とする請求項23に記載の像ブレ補正装置。 The image stabilization device according to claim 23, characterized in that the display means notifies the photographer of the subject for which stabilization is to be performed by using a second display item and a frame surrounding the subject. 前記表示手段は、被写体を枠で囲い、ブレ補正対象となる被写体の枠の色、形、大きさの少なくともいずれかを、他の被写体とは異なるように変更することで、ブレ補正対象となる被写体を撮影者に通知することを特徴とする請求項23に記載の像ブレ補正装置。 The image stabilization device according to claim 23, characterized in that the display means notifies the photographer of the subject to be subjected to shake correction by surrounding the subject with a frame and changing at least one of the color, shape, and size of the frame of the subject to be subjected to shake correction so as to be different from that of other subjects. 前記像ブレ補正装置の動きを検出する第2の動き検出手段をさらに備え、
前記変換手段はさらに、前記第2の動き検出手段により検出された前記像ブレ補正装置の動きを、ブレを補正する第3のブレ補正量に変換し、
前記補正量算出手段は、前記推定手段より推定された前記着目対象に基づいて、前記第1のブレ補正量と前記第2のブレ補正量と前記第3のブレ補正量から、前記最終的なブレ補正量を算出するとともに、
前記第1の動き検出手段および前記第2の動き検出手段の出力に対してフィルター処理を行い、互いの出力に応じてそのフィルターの特性または出力ゲインを設定することを特徴とする請求項1乃至26のいずれか1項に記載の像ブレ補正装置。
a second motion detection unit for detecting a motion of the image stabilization device,
the conversion means further converts the movement of the image stabilization device detected by the second movement detection means into a third image stabilization amount for correcting blur;
the correction amount calculation means calculates the final blur correction amount from the first blur correction amount, the second blur correction amount, and the third blur correction amount based on the target estimated by the estimation means, and
27. The image stabilization device according to claim 1, wherein a filter process is performed on the outputs of the first motion detection means and the second motion detection means, and a characteristic or an output gain of the filter is set in accordance with each output.
前記補正量算出手段は、前記第2の動き検出手段により、前記像ブレ補正装置の動きの速さが第1の所定値以上と判定される場合、前記第1の動き検出手段の出力に基づき、前記第2の動き検出手段の出力に対するフィルターのカットオフ周波数を上げるか出力ゲインを下げるかの少なくともいずれかの処理を行うことを特徴とする請求項27に記載の像ブレ補正装置。 The image stabilization device according to claim 27, characterized in that, when the second motion detection means determines that the speed of movement of the image stabilization device is equal to or greater than a first predetermined value, the correction amount calculation means performs at least one of increasing the cutoff frequency of a filter for the output of the second motion detection means or decreasing the output gain based on the output of the first motion detection means. 前記補正量算出手段は、前記第2の動き検出手段により、前記像ブレ補正装置の動きの速さが第2の所定値以下と判定される場合、前記第2の動き検出手段の出力に基づき、前記第1の動き検出手段の出力に対するフィルターのカットオフ周波数を下げるか出力ゲインを上げるかの少なくともいずれかの処理を行うことを特徴とする請求項27に記載の像ブレ補正装置。 The image stabilization device according to claim 27, characterized in that, when the second motion detection means determines that the speed of movement of the image stabilization device is equal to or less than a second predetermined value, the correction amount calculation means performs at least one of lowering the cutoff frequency of a filter for the output of the first motion detection means or increasing the output gain based on the output of the second motion detection means. 前記補正量算出手段は、前記第1の動き検出手段の出力の絶対値が増加しかつその値が所定値以上の場合、前記第2の動き検出手段の出力に対するフィルターのカットオフ周波数を、前記第1の動き検出手段の出力に対するフィルターのカットオフ周波数より高くすることを特徴とする請求項27に記載の像ブレ補正装置。 The image stabilization device according to claim 27, characterized in that the correction amount calculation means makes the cutoff frequency of the filter for the output of the second motion detection means higher than the cutoff frequency of the filter for the output of the first motion detection means when the absolute value of the output of the first motion detection means increases and is equal to or greater than a predetermined value. 前記補正量算出手段は、前記第1の動き検出手段の出力の絶対値が減少しかつその値が所定値以下の場合、前記第2の動き検出手段の出力に対するフィルターのカットオフ周波数を、前記第1の動き検出手段の出力に対するフィルターのカットオフ周波数より低くすることを特徴とする請求項27に記載の像ブレ補正装置。 The image stabilization device according to claim 27, characterized in that the correction amount calculation means, when the absolute value of the output of the first motion detection means decreases and is equal to or smaller than a predetermined value, makes the cutoff frequency of the filter for the output of the second motion detection means lower than the cutoff frequency of the filter for the output of the first motion detection means. 入力画像に対して、特定の被写体を検出し、被写体情報を出力する被写体検出手段と、
撮影状況を推定するために必要なカメラ情報を取得するカメラ情報取得手段と、
入力画像における背景の動きと被写体の動きを検出する第1の動き検出手段と、
前記第1の動き検出手段により検出された背景の動きと被写体の動きを、それぞれ背景のブレを補正する第1のブレ補正量と被写体のブレを補正する第2のブレ補正量に変換する変換手段と、
前記第1のブレ補正量と前記第2のブレ補正量を合成して、最終的なブレ補正量を生成する補正量算出手段と、
前記第1のブレ補正量と前記第2のブレ補正量との差分、ブレ補正量の上限と前記第2のブレ補正量との差分、前記被写体情報の信頼度、前記特定の被写体の動きを表す第2の動きベクトルの信頼度、前記背景の動きを表す第1の動きベクトルと前記第2の動きベクトルの分離度、の少なくともいずれかに基づく被写体のブレの補正効果及び背景のブレの補正効果に応じた表示アイテムを、前記入力画像とともに表示手段に表示させるように制御する表示制御手段と、を備えることを特徴とする像ブレ補正装置。
a subject detection means for detecting a specific subject from an input image and outputting subject information;
A camera information acquisition means for acquiring camera information necessary for estimating a photographing situation;
a first motion detection means for detecting a motion of a background and a motion of a subject in an input image;
a conversion means for converting the background motion and the subject motion detected by the first motion detection means into a first blur compensation amount for compensating for background blur and a second blur compensation amount for compensating for subject blur, respectively;
a correction amount calculation means for combining the first motion compensation amount and the second motion compensation amount to generate a final motion compensation amount;
and a display control means for controlling a display means to display, together with the input image, a display item according to a subject blur compensation effect and a background blur compensation effect based on at least any one of a difference between the first blur compensation amount and the second blur compensation amount, a difference between an upper limit of the blur compensation amount and the second blur compensation amount, a reliability of the subject information, a reliability of a second motion vector representing a movement of the specific subject , and a degree of separation between the first motion vector and the second motion vector representing a movement of the background.
被写体像を撮像して入力画像を生成する撮像手段をさらに備えることを特徴とする請求項1乃至32のいずれか1項に記載の像ブレ補正装置。 33. The image stabilization apparatus according to claim 1, further comprising an image capturing unit that captures an image of a subject and generates an input image. 入力画像に対して、特定の被写体を検出し、被写体情報を出力する被写体検出工程と、
撮影状況を推定するために必要なカメラ情報を取得するカメラ情報取得工程と、
前記被写体情報と前記カメラ情報とを用いて、画像内の着目対象を推定する推定工程と、
入力画像における背景の動きと被写体の動きを検出する動き検出工程と、
前記動き検出工程において検出された背景の動きと被写体の動きを、それぞれ背景のブレを補正する第1のブレ補正量と被写体のブレを補正する第2のブレ補正量に変換する変換工程と、
前記推定工程において推定された前記着目対象に基づいて、前記第1のブレ補正量と前記第2のブレ補正量を合成して、最終的なブレ補正量を生成する補正量算出工程と、
を有し、
前記カメラ情報は、シャッタスピードを示す情報、AFエリアを示す情報、焦点距離を示す情報、ユーザ操作を示す情報、慣性センサの検出結果を示す情報、被写体までの距離を示す情報、ユーザの視線検出結果を示す情報の少なくともいずれかを含むことを特徴とする像ブレ補正装置の制御方法。
a subject detection step of detecting a specific subject from an input image and outputting subject information;
A camera information acquisition step of acquiring camera information necessary for estimating a shooting situation;
an estimation step of estimating an object of interest in the image using the subject information and the camera information;
a motion detection step for detecting background motion and subject motion in an input image;
a conversion step of converting the background motion and the subject motion detected in the motion detection step into a first blur compensation amount for compensating for background blur and a second blur compensation amount for compensating for subject blur, respectively;
a correction amount calculation step of combining the first blur correction amount and the second blur correction amount based on the target object estimated in the estimation step to generate a final blur correction amount;
having
the camera information includes at least any one of information indicating a shutter speed, information indicating an AF area, information indicating a focal length, information indicating a user operation, information indicating a detection result of an inertial sensor, information indicating a distance to a subject, and information indicating a detection result of a user's line of sight.
入力画像に対して、特定の被写体を検出し、被写体情報を出力する被写体検出工程と、
撮影状況を推定するために必要なカメラ情報を取得するカメラ情報取得工程と、
入力画像における背景の動きと被写体の動きを検出する動き検出工程と、
前記動き検出工程において検出された背景の動きと被写体の動きを、それぞれ背景のブレを補正する第1のブレ補正量と被写体のブレを補正する第2のブレ補正量に変換する変換工程と、
前記第1のブレ補正量と前記第2のブレ補正量を合成して、最終的なブレ補正量を生成する補正量算出工程と、
前記第1のブレ補正量と前記第2のブレ補正量との差分、ブレ補正量の上限と前記第2のブレ補正量との差分、前記被写体情報の信頼度、前記特定の被写体の動きを表す第2の動きベクトルの信頼度、前記背景の動きを表す第1の動きベクトルと前記第2の動きベクトルの分離度、の少なくともいずれかに基づく被写体のブレの補正効果及び背景のブレの補正効果に応じた表示アイテムを、前記入力画像とともに表示手段に表示させるように制御する表示制御工程と、を有することを特徴とする像ブレ補正装置の制御方法。
a subject detection step of detecting a specific subject from an input image and outputting subject information;
A camera information acquisition step of acquiring camera information necessary for estimating a shooting situation;
a motion detection step for detecting background motion and subject motion in an input image;
a conversion step of converting the background motion and the subject motion detected in the motion detection step into a first blur compensation amount for compensating for background blur and a second blur compensation amount for compensating for subject blur, respectively;
a correction amount calculation step of combining the first blur correction amount and the second blur correction amount to generate a final blur correction amount;
and a display control step of controlling a display means to display, together with the input image, a display item according to a subject blur compensation effect and a background blur compensation effect based on at least any one of a difference between the first blur compensation amount and the second blur compensation amount, a difference between an upper limit of the blur compensation amount and the second blur compensation amount, a reliability of the subject information , a reliability of a second motion vector representing a movement of the specific subject, and a degree of separation between the first motion vector and the second motion vector representing a movement of the background.
コンピュータを、請求項1または32に記載の像ブレ補正装置の各手段として機能させるためのプログラム。 A program for causing a computer to function as each of the means of the image stabilization device according to claim 1 or 32.
JP2020154011A 2019-12-17 2020-09-14 Image blur correction device, control method thereof, and program Active JP7710293B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US17/116,868 US11575834B2 (en) 2019-12-17 2020-12-09 Image stabilization apparatus, method of controlling same, and storage medium
US18/148,823 US12026856B2 (en) 2019-12-17 2022-12-30 Image stabilization apparatus, method of controlling same, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019227705 2019-12-17
JP2019227705 2019-12-17

Publications (3)

Publication Number Publication Date
JP2021096460A JP2021096460A (en) 2021-06-24
JP2021096460A5 JP2021096460A5 (en) 2023-09-27
JP7710293B2 true JP7710293B2 (en) 2025-07-18

Family

ID=76431305

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020154011A Active JP7710293B2 (en) 2019-12-17 2020-09-14 Image blur correction device, control method thereof, and program

Country Status (1)

Country Link
JP (1) JP7710293B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023007407A (en) * 2021-06-29 2023-01-18 キヤノン株式会社 Correction control device, imaging apparatus, control method, and program
JP2023136247A (en) * 2022-03-16 2023-09-29 キヤノン株式会社 Anti-vibration control device and method, imaging device, imaging system, program, and storage medium
KR102748811B1 (en) * 2023-08-28 2024-12-31 주식회사 아이티아이씨앤씨 Device and method for correcting object blur based on deep learning
CN121194066A (en) * 2024-06-14 2025-12-23 荣耀终端股份有限公司 Image stabilization control methods and related devices

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008141437A (en) 2006-11-30 2008-06-19 Sony Corp Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method
JP2010114752A (en) 2008-11-07 2010-05-20 Canon Inc Device and method of imaging and program
JP2010233188A (en) 2009-03-30 2010-10-14 Canon Inc Imaging apparatus, control method thereof, and program
JP2011254447A (en) 2010-05-07 2011-12-15 Canon Inc Video playback apparatus and method, program, and recording medium
JP2012257080A (en) 2011-06-09 2012-12-27 Sony Corp Image processor, image processing method, and program
JP2016066928A (en) 2014-09-25 2016-04-28 キヤノン株式会社 Blur correction device, blur correction method, program, and imaging apparatus
JP2018036366A (en) 2016-08-30 2018-03-08 キヤノン株式会社 Image tremor correction device, imaging device and control method
JP2018195084A (en) 2017-05-17 2018-12-06 キヤノン株式会社 Image processing apparatus, image processing method, program, and storage medium
JP2019200787A (en) 2018-05-09 2019-11-21 キヤノン株式会社 Image processor, method for processing image, imaging device, and program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008141437A (en) 2006-11-30 2008-06-19 Sony Corp Imaging apparatus, image processing apparatus, image processing method therefor, and program causing computer to execute the method
JP2010114752A (en) 2008-11-07 2010-05-20 Canon Inc Device and method of imaging and program
JP2010233188A (en) 2009-03-30 2010-10-14 Canon Inc Imaging apparatus, control method thereof, and program
JP2011254447A (en) 2010-05-07 2011-12-15 Canon Inc Video playback apparatus and method, program, and recording medium
JP2012257080A (en) 2011-06-09 2012-12-27 Sony Corp Image processor, image processing method, and program
JP2016066928A (en) 2014-09-25 2016-04-28 キヤノン株式会社 Blur correction device, blur correction method, program, and imaging apparatus
JP2018036366A (en) 2016-08-30 2018-03-08 キヤノン株式会社 Image tremor correction device, imaging device and control method
JP2018195084A (en) 2017-05-17 2018-12-06 キヤノン株式会社 Image processing apparatus, image processing method, program, and storage medium
JP2019200787A (en) 2018-05-09 2019-11-21 キヤノン株式会社 Image processor, method for processing image, imaging device, and program

Also Published As

Publication number Publication date
JP2021096460A (en) 2021-06-24

Similar Documents

Publication Publication Date Title
JP7710293B2 (en) Image blur correction device, control method thereof, and program
US12026856B2 (en) Image stabilization apparatus, method of controlling same, and storage medium
US9092875B2 (en) Motion estimation apparatus, depth estimation apparatus, and motion estimation method
US8228383B2 (en) Image pickup apparatus and method for controlling ranging area based on detected object
JP5596138B2 (en) Imaging apparatus, image processing apparatus, image processing method, and image processing program
CN105979135B (en) Image processing equipment and image processing method
JP4527152B2 (en) Digital image acquisition system having means for determining camera motion blur function
US10839529B2 (en) Image processing apparatus and image processing method, and storage medium
US10764500B2 (en) Image blur correction device and control method
JP2018151689A (en) Image processing apparatus, control method thereof, program and storage medium
JP2023033355A (en) Image processing device and its control method
JP7013205B2 (en) Image shake correction device and its control method, image pickup device
JP7341712B2 (en) Image processing device, image processing method, imaging device, and program
JP6016546B2 (en) Imaging device, control method thereof, and control program
JP6381212B2 (en) Imaging apparatus and control method thereof
CN115103108B (en) Anti-shake processing method, device, electronic equipment and computer readable storage medium
JP7695102B2 (en) IMAGING APPARATUS, CONTROL METHOD FOR IMAGING APPARATUS, PROGRAM, AND RECORDING MEDIUM
JP6915016B2 (en) Information processing equipment and methods, information processing systems, and programs
JP2025008937A (en) Apparatus and method for controlling subject blur correction, and imaging apparatus
JP2018005337A (en) Image processing device, imaging device, image processing method, and program
JP2019161540A (en) Imaging apparatus, control method of the same, and program
JP2016082371A (en) Image processing apparatus, imaging apparatus including the same, and image processing method
JP2013005222A (en) Imaging device, control method therefor, and program

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

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230913

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20241122

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20250404

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250527

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20250708

R150 Certificate of patent or registration of utility model

Ref document number: 7710293

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150