JP7504579B2 - Image capture device, image capture device control method and program - Google Patents

Image capture device, image capture device control method and program Download PDF

Info

Publication number
JP7504579B2
JP7504579B2 JP2019209572A JP2019209572A JP7504579B2 JP 7504579 B2 JP7504579 B2 JP 7504579B2 JP 2019209572 A JP2019209572 A JP 2019209572A JP 2019209572 A JP2019209572 A JP 2019209572A JP 7504579 B2 JP7504579 B2 JP 7504579B2
Authority
JP
Japan
Prior art keywords
imaging device
attitude
focusing
change
distance
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
JP2019209572A
Other languages
Japanese (ja)
Other versions
JP2021081611A (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 JP2019209572A priority Critical patent/JP7504579B2/en
Publication of JP2021081611A publication Critical patent/JP2021081611A/en
Application granted granted Critical
Publication of JP7504579B2 publication Critical patent/JP7504579B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Camera Bodies And Camera Details Or Accessories (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Description

本発明は、撮像装置、撮像装置の制御方法およびプログラムに関する。 The present invention relates to an imaging device, a control method for an imaging device, and a program.

焦点検出および調節を自動で行うオートフォーカス(以下、AFと記す)機能がある。特許文献1は、カメラの姿勢変化にともなうレンズの光軸の角度変化量が検出された場合に、レンズを合焦駆動するためのレンズ駆動量を演算してレンズ駆動を実施することで合焦の再調節を行う技術を開示している。特許文献1では、所望の被写体に合焦させた後に、三脚に設置されたカメラをパンさせることで構図変更を実施した場合に、カメラの角度変化量に基づいて被写体までの距離の補正値を演算してレンズ駆動量を算出している。 There is an autofocus (hereinafter referred to as AF) function that automatically detects and adjusts focus. Patent Document 1 discloses a technology that calculates the lens drive amount for driving the lens to focus and drives the lens to readjust the focus when an angle change in the optical axis of the lens due to a change in the camera's attitude is detected. In Patent Document 1, when the composition is changed by panning the camera mounted on a tripod after focusing on a desired subject, a correction value for the distance to the subject is calculated based on the angle change of the camera to calculate the lens drive amount.

特開平4-175738号公報Japanese Patent Application Laid-Open No. 4-175738

しかしながら、特許文献1では、撮像装置の姿勢変化に伴う撮像装置の内部状態変化に関しては考慮されておらず、内部状態変化により撮像光学系の焦点距離に変化が生じた場合、被写体への合焦にずれが生じる。撮像装置の姿勢変化に伴う撮像装置の内部状態変化としては、例えば、撮像光学系のレンズ間隔変化、レンズ傾き変化、撮像素子の取り付け位置変化などがある。撮像装置の内部状態は、特許文献1で説明されている水平方向の動きに比べ、撮像装置を上向きや下向きに構えた場合に重力の影響を受けて大きく変化する。 However, Patent Document 1 does not take into consideration changes in the internal state of the imaging device that occur when the attitude of the imaging device changes, and if a change in the internal state causes a change in the focal length of the imaging optical system, a shift in focus on the subject will occur. Changes in the internal state of the imaging device that occur when the attitude of the imaging device changes include, for example, changes in the lens spacing of the imaging optical system, changes in the lens tilt, and changes in the mounting position of the imaging element. Compared to the horizontal movement described in Patent Document 1, the internal state of the imaging device changes significantly due to the influence of gravity when the imaging device is held facing upward or downward.

一方、AFによる合焦動作においては、撮像装置の姿勢変化による内部状態変化が生じても、変化した状態における合焦動作が実施されれば被写体への合焦は可能となる。しかしながら、フォーカスレンズの位置など撮像装置の内部状態に応じて算出される被写体までの距離等の計測値は、撮像装置の姿勢による内部状態変化によって同距離に位置する被写体でも異なる計測値が算出されてしまう恐れがある。 On the other hand, in a focusing operation using AF, even if a change in the internal state occurs due to a change in the attitude of the imaging device, it is possible to focus on the subject if the focusing operation is performed in the changed state. However, there is a risk that measurement values such as the distance to the subject, which are calculated based on the internal state of the imaging device, such as the position of the focus lens, will differ even for subjects located at the same distance due to changes in the internal state caused by the attitude of the imaging device.

本発明は、撮像装置の姿勢に応じて計測値を高精度に取得できる撮像装置を提供する。 The present invention provides an imaging device that can obtain measurement values with high accuracy according to the orientation of the imaging device.

上記課題を解決するために、本発明の撮像装置は、合焦時のフォーカシングレンズの駆動量を取得する計測手段と、前記合焦時の撮像装置の姿勢を検出する姿勢検出手段と、前記撮像装置の姿勢に起因する前記撮像装置の内部の状態変化によるフォーカシングレンズの駆動量の誤差を補正するための補正情報として、検出した前記撮像装置の姿勢に応じたフォーカシングレンズの駆動量の変化量を取得する補正情報取得手段と、前記補正情報に基づいて前記合焦時のフォーカシングレンズの駆動量を補正し、補正したフォーカシングレンズの駆動量に基づいて合焦した被写体までの距離である被写体距離を算出する補正手段と、を備える。 In order to solve the above problems, the imaging device of the present invention comprises a measurement means for acquiring the amount of drive of the focusing lens when focusing , an attitude detection means for detecting the attitude of the imaging device when focusing , a correction information acquisition means for acquiring the amount of change in the drive amount of the focusing lens corresponding to the detected attitude of the imaging device as correction information for correcting errors in the drive amount of the focusing lens due to changes in the internal state of the imaging device caused by the attitude of the imaging device , and a correction means for correcting the drive amount of the focusing lens when focusing based on the correction information and calculating a subject distance, which is the distance to the focused subject, based on the corrected drive amount of the focusing lens .

本発明によれば、撮像装置の姿勢に応じて計測値を高精度に取得できる撮像装置を提供することができる。 The present invention provides an imaging device that can obtain measurement values with high accuracy according to the orientation of the imaging device.

第1実施形態に係る撮像装置の機能構成を説明する図である。FIG. 2 is a diagram illustrating the functional configuration of the imaging device according to the first embodiment. 撮像装置の姿勢による内部状態の変化を説明する図である。1A and 1B are diagrams illustrating changes in the internal state of an imaging device depending on its attitude. 被写体までの距離算出処理を示すフローチャートである。11 is a flowchart showing a process of calculating a distance to a subject. 第2実施形態に係る撮像装置の機能構成を説明する図である。FIG. 11 is a diagram illustrating the functional configuration of an imaging device according to a second embodiment. 第2実施形態に係る撮像素子の構成を説明する図である。13 is a diagram illustrating a configuration of an image sensor according to a second embodiment. FIG. 撮像面位相差測距方式の測距原理を説明する図である。1A and 1B are diagrams for explaining the principle of distance measurement using an imaging surface phase difference distance measurement method. 視差量とデフォーカス量との関係について説明する図である。11A and 11B are diagrams illustrating the relationship between the amount of parallax and the amount of defocus. 深度画像を生成する処理を示すフローチャートである。11 is a flowchart showing a process for generating a depth image. 焦点距離および撮影倍率の補正処理を示すフローチャートである。10 is a flowchart showing a process of correcting focal length and imaging magnification.

各実施形態では、撮像装置の一例として撮像装置から合焦した被写体までの距離を示す深度情報を取得可能なデジタルカメラに本発明を適用した例に説明する。しかし、これに限られるものではなく、本発明は被写体までの距離を取得可能な任意の撮像機器に適用可能である。また、各実施形態では撮像装置の一例としてレンズ装置と本体部が一体となった撮像装置について説明するが、これに限られるものではなく、レンズ装置が本体部に着脱可能なレンズ交換式の撮像装置であってもよい。 In each embodiment, the present invention is described as being applied to a digital camera that can acquire depth information indicating the distance from the imaging device to a focused subject, as an example of an imaging device. However, the present invention is not limited to this, and can be applied to any imaging device that can acquire the distance to a subject. Also, in each embodiment, the present invention is described as being applied to an imaging device in which a lens device and a main body are integrated, as an example of an imaging device, but the present invention is not limited to this, and an imaging device with interchangeable lenses in which the lens device is detachably attached to the main body may be used.

(第1実施形態)
図1は、第1実施形態に係る撮像装置100の機能構成を説明する図である。撮像装置100は、撮像光学系10、撮像素子11、制御部12、計測部13、画像処理部14、記憶部15、入力部16、表示部17、通信部18、センサ19を備える。なお、以下では、撮像光学系10の光軸103と平行な方向(図1の左右方向)をz方向または深度方向とする。光軸103と直交し、撮像素子11の垂直方向と平行な方向をx方向(図1の上下方向)とする。光軸103およびx軸と直交し、撮像素子11の水平方向と平行な方向をy方向とする。
First Embodiment
1 is a diagram for explaining the functional configuration of an imaging device 100 according to the first embodiment. The imaging device 100 includes an imaging optical system 10, an imaging element 11, a control unit 12, a measurement unit 13, an image processing unit 14, a storage unit 15, an input unit 16, a display unit 17, a communication unit 18, and a sensor 19. In the following description, a direction parallel to an optical axis 103 of the imaging optical system 10 (left-right direction in FIG. 1) is referred to as a z-direction or depth direction. A direction perpendicular to the optical axis 103 and parallel to the vertical direction of the imaging element 11 is referred to as an x-direction (up-down direction in FIG. 1). A direction perpendicular to the optical axis 103 and the x-axis and parallel to the horizontal direction of the imaging element 11 is referred to as a y-direction.

撮像光学系10は、被写体の光学像を撮像素子11上に結像させる。撮像光学系10は、撮影倍率を変更するズームレンズ104、焦点調節に使用するフォーカシングレンズ105、手振れ等による画像ブレを補正するシフトレンズ102を含む光軸103上に並んだ複数のレンズと絞りを備える。また、撮像光学系10の射出瞳101は、撮像素子11から所定距離離れた位置にある。 The imaging optical system 10 forms an optical image of a subject on an image sensor 11. The imaging optical system 10 has a number of lenses and an aperture arranged on an optical axis 103, including a zoom lens 104 that changes the shooting magnification, a focusing lens 105 used for focus adjustment, and a shift lens 102 that corrects image blur caused by camera shake or the like. The exit pupil 101 of the imaging optical system 10 is located at a predetermined distance from the image sensor 11.

撮像素子11は、例えばCCD(電荷結合素子)やCMOSセンサ(相補型金属酸化膜半導体)である。撮像素子11は、撮像光学系10を介して撮像面に結像された被写体像を光電変換し、被写体像に係る画像信号を出力する。 The image sensor 11 is, for example, a CCD (charge-coupled device) or a CMOS (complementary metal-oxide semiconductor) sensor. The image sensor 11 photoelectrically converts the subject image formed on the imaging surface via the imaging optical system 10, and outputs an image signal related to the subject image.

制御部12は、例えばCPU(Central Processing Unit)やマイクロプロセッサ等であり、撮像装置100が備える各ブロックの動作を制御する。制御部12は、例えば、撮像時のAF(自動焦点合わせ)、フォーカス(合焦)位置の変更、F値(絞り)の変更、画像の取り込み、被写体距離の測定、記憶部15、入力部16、表示部17、通信部18の制御等を行う。 The control unit 12 is, for example, a CPU (Central Processing Unit) or a microprocessor, and controls the operation of each block of the imaging device 100. The control unit 12 performs, for example, AF (automatic focusing) during imaging, changing the focus position, changing the F-number (aperture), capturing images, measuring the subject distance, and controlling the memory unit 15, input unit 16, display unit 17, and communication unit 18.

計測部13は、合焦した被写体までの距離を算出する。計測部13は、レンズ駆動情報取得部130、姿勢検出部131、補正情報取得部132、補正部133を備える。レンズ駆動情報取得部130は、制御部12を介して、撮像光学系10内の各レンズの駆動情報を取得する。例えば、レンズ駆動情報取得部130は、合焦動作によってフォーカシングレンズ105を駆動した際の駆動量を制御部12から取得する。 The measurement unit 13 calculates the distance to the focused subject. The measurement unit 13 includes a lens drive information acquisition unit 130, an attitude detection unit 131, a correction information acquisition unit 132, and a correction unit 133. The lens drive information acquisition unit 130 acquires drive information for each lens in the imaging optical system 10 via the control unit 12. For example, the lens drive information acquisition unit 130 acquires from the control unit 12 the drive amount when the focusing lens 105 is driven by a focusing operation.

姿勢検出部131は、撮像装置100に設置されたセンサ19の出力に基づいて、撮影時の撮像装置100の姿勢情報を検出する。補正情報取得部132は、撮像装置100の姿勢に応じて、距離補正に必要な距離補正情報を取得する。具体的には、補正情報取得部132は、予め撮像装置100の姿勢ごとの距離補正情報を記憶している記憶部15から、姿勢検出部131が検出した撮像装置100の姿勢情報に応じた距離補正情報を取得する。補正部133は、補正情報取得部132が取得した距離補正情報に基づいて、被写体距離情報を算出する。 The attitude detection unit 131 detects attitude information of the imaging device 100 at the time of shooting based on the output of the sensor 19 installed in the imaging device 100. The correction information acquisition unit 132 acquires distance correction information required for distance correction according to the attitude of the imaging device 100. Specifically, the correction information acquisition unit 132 acquires distance correction information corresponding to the attitude information of the imaging device 100 detected by the attitude detection unit 131 from the storage unit 15, which stores distance correction information for each attitude of the imaging device 100 in advance. The correction unit 133 calculates subject distance information based on the distance correction information acquired by the correction information acquisition unit 132.

画像処理部14は、撮像素子11から出力された画像信号に対して、各種画像処理を実施する。例えば、画像処理部14は画像処理として、撮像素子11から出力された画像信号のノイズ除去、デモザイキング、輝度信号変換、収差補正、ホワイトバランス調整、色補正などの処理を行う。画像処理部14から出力される画像データ(撮像画像)は不図示のメモリに蓄積され、表示部17に表示される。また、画像処理部14から出力された画像データは、記憶部15に保存される。画像処理部14は、論理回路を用いて構成してもよいし、中央演算処理装置(CPU)と演算処理プログラムを格納するメモリで構成してもよい。 The image processing unit 14 performs various image processing on the image signal output from the imaging element 11. For example, the image processing unit 14 performs processes such as noise removal, demosaicing, luminance signal conversion, aberration correction, white balance adjustment, and color correction on the image signal output from the imaging element 11. The image data (captured image) output from the image processing unit 14 is accumulated in a memory (not shown) and displayed on the display unit 17. The image data output from the image processing unit 14 is also saved in the storage unit 15. The image processing unit 14 may be configured using a logic circuit, or may be configured with a central processing unit (CPU) and a memory that stores a processing program.

記憶部15は、撮像された画像データ、各ブロックの動作の過程で生成された中間データ、画像処理部14や撮像装置100の動作において参照されるパラメータ等が記録される記録媒体である。記憶部15は、処理の実現にあたり許容される処理性能が担保されるものであれば、高速に読み書きでき、かつ、大容量の記録媒体であればどのようなものであってもよく、例えば、フラッシュメモリなどが好ましい。 The storage unit 15 is a recording medium on which captured image data, intermediate data generated during the operation of each block, parameters referenced in the operation of the image processing unit 14 and the imaging device 100, etc. are recorded. The storage unit 15 may be any type of recording medium that can be read and written at high speed and has a large capacity, so long as it ensures processing performance acceptable for implementing processing; for example, a flash memory is preferable.

入力部16は、例えば、ダイヤル、ボタン、スイッチ、タッチパネル等の撮像装置100に対してなされた情報入力や設定変更の操作入力を検出するユーザインターフェイスである。入力部16は、ユーザからの操作入力を検出すると対応する制御信号を制御部12に出力する。表示部17は、例えば、液晶ディスプレイや有機EL等の表示装置である。表示部17は、撮像画像をリアルタイムで表示することによる撮影時の構図確認、各種設定の確認、メッセージ情報の報知等に用いられる。また、表示部17にタッチパネルを利用することで表示機能と入力機能を併せ持つことができる。 The input unit 16 is a user interface that detects information input or setting change operation input made to the imaging device 100, such as a dial, button, switch, or touch panel. When the input unit 16 detects an operation input from the user, it outputs a corresponding control signal to the control unit 12. The display unit 17 is a display device such as a liquid crystal display or an organic EL. The display unit 17 is used to check the composition during shooting by displaying the captured image in real time, check various settings, notify message information, etc. In addition, by using a touch panel for the display unit 17, it can have both a display function and an input function.

通信部18は、外部装置との情報送受信を実現する通信インタフェースである。通信部18は、撮像画像、撮影情報、距離情報等を、外部装置に送出する。センサ19は、撮像装置100の状態をモニタリングするセンサ類である。センサ19には、例えば、加速度センサ、ジャイロセンサ、温度センサ等が設置されている。撮像装置100の姿勢検出には一般に加速度センサが使用される。 The communication unit 18 is a communication interface that realizes sending and receiving information to and from an external device. The communication unit 18 sends captured images, shooting information, distance information, and the like to the external device. The sensor 19 is a type of sensor that monitors the state of the imaging device 100. The sensor 19 includes, for example, an acceleration sensor, a gyro sensor, a temperature sensor, and the like. An acceleration sensor is generally used to detect the attitude of the imaging device 100.

撮像装置100の撮影時の姿勢による内部状態の変化について図2を用いて説明する。図2は、撮像装置の姿勢による内部状態の変化を説明する図である。図2(A)は撮像装置100を水平に保持した場合、図2(B)は撮像装置100を下向きに保持した場合、図2(C)は撮像装置100を上向きに保持した場合における撮像装置100の内部状態を示している。以下では、ズームレンズ104の取り付け時に間隙が生じていると仮定する。また、各レンズの被写体側を第一面、撮像装置100側を第二面とする。 The change in the internal state of the imaging device 100 depending on the orientation during shooting will be explained using FIG. 2. FIG. 2 is a diagram explaining the change in the internal state depending on the orientation of the imaging device. FIG. 2(A) shows the internal state of the imaging device 100 when it is held horizontally, FIG. 2(B) shows the internal state of the imaging device 100 when it is held facing downward, and FIG. 2(C) shows the internal state of the imaging device 100 when it is held facing upward. In the following, it is assumed that a gap occurs when the zoom lens 104 is attached. Also, the subject side of each lens is referred to as the first surface, and the imaging device 100 side is referred to as the second surface.

図2(A)は、撮像装置100を水平に保持した場合の内部状態を表す断面図である。以下では、撮像装置100を水平に保持した状態を基準姿勢とする。水平保持状態におけるズームレンズ104の第二面とフォーカシングレンズ105の第一面の間隔をLとする。 Figure 2 (A) is a cross-sectional view showing the internal state of the imaging device 100 when it is held horizontally. In the following, the state in which the imaging device 100 is held horizontally is taken as the reference posture. The distance between the second surface of the zoom lens 104 and the first surface of the focusing lens 105 when it is held horizontally is taken as L.

図2(B)は、撮像装置100を下向き(-z方向)に保持した場合の内部状態を表す断面図である。図2(B)の状態では、水平方向を0°とした場合に検出した姿勢情報が-90°となる。下向き状態におけるズームレンズ104の第二面とフォーカシングレンズ105の第一面の間隔をLdとする。ズームレンズ104の取り付けに間隙があるため、重力によりレンズ104は-z方向に平行移動する。そのため、下向きの状態のレンズ間隔Ldは基準姿勢のレンズ間隔Lよりも長くなる。 Figure 2 (B) is a cross-sectional view showing the internal state when the imaging device 100 is held facing downward (-z direction). In the state of Figure 2 (B), the detected attitude information is -90° when the horizontal direction is 0°. The distance between the second surface of the zoom lens 104 and the first surface of the focusing lens 105 in the downward state is Ld. Because there is a gap in the attachment of the zoom lens 104, the lens 104 moves parallel in the -z direction due to gravity. Therefore, the lens distance Ld in the downward state is longer than the lens distance L in the reference attitude.

一方、図2(C)は、撮像装置100を上向き(+z方向)に保持した場合の内部状態を表す断面図である。図2(C)の状態では、水平方向を0°とした場合に検出した姿勢情報が90°となる。上向き状態におけるズームレンズ104の第二面とフォーカシングレンズ105の第一面の間隔をLuとする。ズームレンズ104の取り付けに間隙があるため、重力によりズームレンズ104は+z方向に平行移動する。そのため、上向きの状態のレンズ間隔Ldは基準姿勢のレンズ間隔Lよりも短くなる。 On the other hand, FIG. 2(C) is a cross-sectional view showing the internal state when the imaging device 100 is held facing upward (+z direction). In the state of FIG. 2(C), the detected attitude information is 90° when the horizontal direction is 0°. The distance between the second surface of the zoom lens 104 and the first surface of the focusing lens 105 in the upward facing state is set to Lu. Because there is a gap in the attachment of the zoom lens 104, the zoom lens 104 moves parallel in the +z direction due to gravity. Therefore, the lens distance Ld in the upward facing state is shorter than the lens distance L in the reference attitude.

レンズ間隔の変化は、撮影時の姿勢における摩擦力、応力、重力の影響により決定され、摩擦力および応力は撮像光学系10の鏡筒設計に依存する。また、レンズ間隔が変化することで撮像光学系10の状態に基づく焦点距離や焦点距離等の測定値が微小変動する。レンズ間隔の変化に伴う測定値の変化量は、撮像光学系10の光学設計といずれのレンズがどれだけ移動したかに依存する。なお、上記では一つのレンズを例にとって説明したが、実際には複数のレンズにおいて位置変動が生じる。各レンズの変動は、公差や製造誤差によってそれぞれ異なる。また、撮像光学系10の光学設計によって各レンズの位置変動による測定値の変化への敏感度も異なる。 The change in lens spacing is determined by the effects of friction, stress, and gravity in the posture during shooting, and friction and stress depend on the lens barrel design of the imaging optical system 10. In addition, changes in lens spacing cause slight fluctuations in measured values such as focal length and focal length based on the state of the imaging optical system 10. The amount of change in measured values due to changes in lens spacing depends on the optical design of the imaging optical system 10 and how much each lens has moved. Note that while the above explanation uses one lens as an example, in reality position fluctuations occur in multiple lenses. The fluctuations in each lens differ depending on tolerances and manufacturing errors. In addition, the sensitivity of each lens to changes in measured values due to position fluctuations also differs depending on the optical design of the imaging optical system 10.

このように、レンズ間隔変化およびそれに伴う計測値の変動は、撮像光学系10の光学設計および鏡筒設計に複雑に依存する。しかし、一般的な傾向として基準姿勢(水平)からの姿勢変化が小さい場合は大きな影響がみられず、姿勢変化が大きくなると急激に変動が生じる傾向がある。そのため、撮像装置100の姿勢を変数とする3次関数により、計測値の変化量を近似することもできる。 In this way, the change in lens spacing and the accompanying fluctuation in the measurement value depend in a complex way on the optical design and lens barrel design of the imaging optical system 10. However, as a general trend, when the change in attitude from the reference attitude (horizontal) is small, there is no significant effect, but when the change in attitude becomes large, there is a tendency for sudden fluctuations to occur. Therefore, the amount of change in the measurement value can also be approximated by a cubic function that uses the attitude of the imaging device 100 as a variable.

撮像装置100の基準姿勢とは異なる姿勢でAFを実行する場合、焦点距離の微小変動が生じていても、撮影像が良好に取得できるようにフォーカシングレンズ105を移動させるため合焦動作に支障はきたさない。しかしながら、フォーカシングレンズ105の移動状態と基準姿勢における光学設計情報を用いて合焦した被写体までの距離を算出する場合には、撮像光学系10の状態が基準状態と異なっていると算出する被写体距離に誤差が生じてしまう。そのため、撮像装置100を用いて被写体までの距離を計測する場合や撮像装置1の00の焦点距離を用いて被写体の寸法計測を実行する場合において、撮像装置100の姿勢変化に伴う内部状態変化の影響が無視できないものとなる。 When AF is performed in a posture different from the reference posture of the imaging device 100, even if there is a slight change in the focal length, the focusing operation is not hindered because the focusing lens 105 is moved so that a good captured image can be obtained. However, when the distance to a focused subject is calculated using the movement state of the focusing lens 105 and the optical design information in the reference posture, an error will occur in the calculated subject distance if the state of the imaging optical system 10 is different from the reference state. Therefore, when measuring the distance to a subject using the imaging device 100 or when measuring the dimensions of a subject using the focal length of the imaging device 100, the influence of the change in internal state due to the change in posture of the imaging device 100 cannot be ignored.

撮像装置100の姿勢変化に伴う内部状態変化として撮像光学系10の状態変化について説明したが、これに限られるものではなく、例えば撮像素子11の位置変動が生じる可能性もある。また、撮像装置100がレンズ交換式カメラである場合には、撮像光学系10の本体部への取り付け部分において間隙が生じ、姿勢による内部状態変化の一因となりうる。 The change in state of the imaging optical system 10 has been described as an internal state change accompanying a change in the posture of the imaging device 100, but this is not limited thereto, and for example, the position of the imaging element 11 may also fluctuate. In addition, if the imaging device 100 is an interchangeable lens camera, a gap may occur in the attachment portion of the imaging optical system 10 to the main body, which may be a cause of an internal state change due to posture.

合焦した被写体までの距離算出処理について、図3のフローチャートを用いて説明する。図3は、被写体までの距離算出処理を示すフローチャートである。
ステップS301で、レンズ駆動情報取得部130は、合焦時のレンズ駆動情報を取得する。具体的には、レンズ駆動情報取得部130は、合焦動作によって撮像光学系10内に設置されたフォーカシングレンズ102を駆動した際の駆動量を制御部12から取得する。ここでレンズ駆動情報取得部130が取得するフォーカシングレンズ102の駆動量は、例えば、フォーカシングレンズ102をステッピングモーター等の駆動装置で駆動した際の駆動パルス数である。なお、パルス数は絶対値であっても相対値であってもよく、取得するパルス値に合わせて以降の処理を実行することができる。
The process of calculating the distance to a focused subject will be described with reference to the flowchart of Fig. 3. Fig. 3 is a flowchart showing the process of calculating the distance to a subject.
In step S301, the lens drive information acquisition unit 130 acquires lens drive information at the time of focusing. Specifically, the lens drive information acquisition unit 130 acquires the drive amount when the focusing lens 102 installed in the imaging optical system 10 is driven by the focusing operation from the control unit 12. Here, the drive amount of the focusing lens 102 acquired by the lens drive information acquisition unit 130 is, for example, the number of drive pulses when the focusing lens 102 is driven by a drive device such as a stepping motor. Note that the number of pulses may be an absolute value or a relative value, and subsequent processing can be performed according to the acquired pulse value.

ステップS302で、姿勢検出部131は、撮像装置100に設置されたセンサ19の加速度センサの出力に基づいて、撮影時の撮像装置100の姿勢情報を検出する。姿勢情報は、撮像装置100の基準姿勢からのロール・ピッチ・ヨー方向の角度変化量である。なお、本実施形態における撮像装置100の基準姿勢は水平方向とするが、これに限られるものではない。 In step S302, the attitude detection unit 131 detects attitude information of the imaging device 100 at the time of shooting based on the output of the acceleration sensor of the sensor 19 installed in the imaging device 100. The attitude information is the amount of angular change in the roll, pitch, and yaw directions from the reference attitude of the imaging device 100. Note that, although the reference attitude of the imaging device 100 in this embodiment is the horizontal direction, this is not limited to this.

撮像装置100の内部状態は、水平方向の動きに比べ、撮像装置を上向きや下向きに構えた場合に重力の影響を受けて大きく変化する。そのため、特に、上下方向(ピッチ方向)にどの程度の角度傾いた状態で撮影が実施されたかを取得するのが有用である。本実施形態では、撮像装置100の姿勢情報として水平方向を基準とする上下方向のピッチ角度を例に説明を行う。 The internal state of the imaging device 100 changes significantly under the influence of gravity when the imaging device is held facing upward or downward compared to horizontal movement. For this reason, it is particularly useful to obtain the degree of tilt in the up-down direction (pitch direction) at which the image was captured. In this embodiment, we will explain the attitude information of the imaging device 100 by taking the pitch angle in the up-down direction relative to the horizontal direction as an example.

ステップS303で、補正情報取得部132は、撮像装置100の姿勢情報に応じた距離補正情報を取得する。具体的には、補正情報取得部132は、記憶部15に予め保存されている距離補正情報から、ステップS302で検出した撮像装置100の姿勢情報(ピッチ方向の角度)に応じた距離補正情報を取得する。距離補正情報は、距離補正に必要な情報であり、本実施形態においては、姿勢変化に対応するフォーカシングレンズ102の駆動量の変化量である。例えば、ステッピングモーターを利用してフォーカシングレンズ102を駆動した場合は、姿勢変化に対応する駆動パルス変化量が距離補正情報となる。 In step S303, the correction information acquisition unit 132 acquires distance correction information corresponding to the attitude information of the image capture device 100. Specifically, the correction information acquisition unit 132 acquires distance correction information corresponding to the attitude information (angle in the pitch direction) of the image capture device 100 detected in step S302 from the distance correction information stored in advance in the storage unit 15. The distance correction information is information necessary for distance correction, and in this embodiment, it is the amount of change in the drive amount of the focusing lens 102 corresponding to the change in attitude. For example, when the focusing lens 102 is driven using a stepping motor, the amount of change in drive pulse corresponding to the change in attitude becomes the distance correction information.

記憶部15には、予め撮像装置100の姿勢情報ごとの距離補正情報、即ち撮像装置100の姿勢変化に伴う駆動パルス変化量がテーブルや関数の形で保存されている。記憶部15に予め保存されている距離補正情報としての駆動パルス変化量は、基準姿勢における駆動パルス値と基準姿勢とは異なる姿勢における駆動パルス値のずれとして算出された値である。より具体的には、撮像装置100の基準姿勢において特定距離にある被写体(例えば、チャート)への合焦動作時のフォーカシングレンズ102の駆動パルス値(制御パルス)を取得する。そして、被写体距離が一定のまま撮像装置100の姿勢を上下方向に変化させ、合焦動作を実行した際のフォーカシングレンズ102の駆動パルス値(制御パルス)を取得する。取得した基準姿勢における駆動パルス値と、撮像装置100の姿勢変化に応じた駆動パルス値のずれ(相対パルス数)が駆動パルス変化量である。算出した駆動パルス変化量をテーブルとして保存して利用してもよいし、算出した駆動パルス変化量と撮像装置100の姿勢変化量の関係をフィッティングした関数の係数のみを保存して利用してもよい。関数の係数のみを保存する場合は、テーブルを保存する場合に比べ、保存するデータ量の削減が可能となる。 The storage unit 15 stores in advance distance correction information for each posture information of the imaging device 100, that is, the amount of change in the drive pulse due to the posture change of the imaging device 100, in the form of a table or a function. The amount of change in the drive pulse as distance correction information stored in advance in the storage unit 15 is a value calculated as the difference between the drive pulse value in the reference posture and the drive pulse value in a posture different from the reference posture. More specifically, the drive pulse value (control pulse) of the focusing lens 102 during the focusing operation on a subject (e.g., a chart) at a specific distance in the reference posture of the imaging device 100 is acquired. Then, the posture of the imaging device 100 is changed in the vertical direction while the subject distance is kept constant, and the drive pulse value (control pulse) of the focusing lens 102 when the focusing operation is performed is acquired. The difference (relative pulse number) between the drive pulse value in the acquired reference posture and the drive pulse value corresponding to the posture change of the imaging device 100 is the amount of change in the drive pulse. The calculated drive pulse change amount may be saved as a table for use, or only the coefficients of a function that fits the relationship between the calculated drive pulse change amount and the posture change amount of the imaging device 100 may be saved for use. When only the function coefficients are saved, the amount of data to be saved can be reduced compared to when a table is saved.

なお、補正情報は前述のように実験的に取得する以外にもレンズ取り付けの公差量とステッピングモーターのパルスとレンズ移動量の関係を考慮してシミュレーションにより算出してもよい。また、合焦する距離によって姿勢変化に伴うパルス変化量が変化する場合は、被写体と撮像装置100の距離を変更して同様にパルス変化量を取得する。フォーカシングレンズ102のパルス数が多い場合は、全ての合焦距離においてパルス変化量を取得する代わりに、複数の距離においてパルス変化量を取得し、補間によりその他の距離におけるパルス変化量を算出すればよい。また、焦点距離可変の撮像光学系を利用する場合には、設定可能なそれぞれの焦点距離においてパルス変化量を取得しておくのが好適である。全ての焦点距離においてパルス変化量の取得が困難な場合は、所定の焦点距離間隔でパルス変化量を取得し、所定の焦点距離間隔内の焦点距離におけるパルス変化量を内挿して算出するよいにしてもよい。 In addition to obtaining the correction information experimentally as described above, the correction information may be calculated by simulation taking into account the relationship between the lens mounting tolerance and the pulses of the stepping motor and the lens movement amount. If the amount of pulse change associated with the change in posture changes depending on the focusing distance, the distance between the subject and the imaging device 100 is changed and the amount of pulse change is obtained in the same manner. If the number of pulses of the focusing lens 102 is large, instead of obtaining the amount of pulse change at all focusing distances, the amount of pulse change may be obtained at multiple distances and the amount of pulse change at other distances may be calculated by interpolation. In addition, when using an imaging optical system with a variable focal length, it is preferable to obtain the amount of pulse change at each of the focal lengths that can be set. If it is difficult to obtain the amount of pulse change at all focal lengths, the amount of pulse change may be obtained at a predetermined focal length interval and the amount of pulse change at focal lengths within the predetermined focal length interval may be calculated by interpolation.

撮像装置100に付属する撮像光学系10が交換可能であった場合には、複数の異なる撮像光学系における補正情報を記憶部15に格納しておくのが好適である。また、撮像光学系10が記憶部を備える場合には、撮像光学系10の記憶部に補正情報を格納しておき、補正情報取得部13が撮像光学系10から該補正情報を読み出せる構成にしてもよい。この構成の場合、記憶部15に距離補正情報が格納されていない撮像光学系10であっても、撮像光学系10の補正情報を取得することが可能となる。なお、本実施形態では、距離補正情報を記憶部15に保存している例を説明したが、撮像装置100の撮像光学系10が固定である場合は、予め計測部13内の不図示の不揮発性メモリに補正情報を格納するようにしてもよい。 If the imaging optical system 10 attached to the imaging device 100 is replaceable, it is preferable to store correction information for multiple different imaging optical systems in the storage unit 15. Also, if the imaging optical system 10 has a storage unit, the correction information may be stored in the storage unit of the imaging optical system 10, and the correction information acquisition unit 13 may be configured to read the correction information from the imaging optical system 10. In this configuration, even if the imaging optical system 10 does not have distance correction information stored in the storage unit 15, it is possible to acquire the correction information of the imaging optical system 10. Note that, in this embodiment, an example in which distance correction information is stored in the storage unit 15 has been described, but if the imaging optical system 10 of the imaging device 100 is fixed, the correction information may be stored in advance in a non-volatile memory (not shown) in the measurement unit 13.

ステップS304で、補正部133は、補正した被写体距離を算出する。具体的には、補正部133は、ステップS301で取得した合焦時の駆動パルス数と、ステップS303で取得した撮像装置100の姿勢変化に応じた駆動パルス変化量から、基準姿勢で撮影した場合の駆動パルス数を算出する。そして、基準姿勢で撮影した場合の駆動パルス数に応じた被写体距離を、補正した被写体距離として算出する。 In step S304, the correction unit 133 calculates the corrected subject distance. Specifically, the correction unit 133 calculates the number of drive pulses when shooting in the reference posture from the number of drive pulses when focusing obtained in step S301 and the amount of change in drive pulse corresponding to the posture change of the imaging device 100 obtained in step S303. Then, the correction unit 133 calculates the subject distance corresponding to the number of drive pulses when shooting in the reference posture as the corrected subject distance.

駆動パルス数に基づく被写体距離の算出は、予め保存された駆動パルス数と被写体距離の関係をテーブルもしくは関数を用いることで行われる。駆動パルス数と被写体距離の関係を表す被写体距離情報テーブルは、基準姿勢における合焦時の撮像光学系10中のフォーカシングレンズ102の駆動パルス数(駆動位置)と、合焦距離の関係を撮像光学系10の設計情報を用いて算出することで作成される。この被写体距離情報テーブルもしくは関数と補正された駆動パルス数(基準姿勢での駆動パルス数)から、撮像装置100の姿勢による内部状態変化による距離算出誤差を補正した距離を出力することが可能となる。 The calculation of the subject distance based on the number of drive pulses is performed by using a table or function of the relationship between the number of drive pulses and the subject distance that has been stored in advance. The subject distance information table showing the relationship between the number of drive pulses and the subject distance is created by calculating the relationship between the number of drive pulses (drive position) of the focusing lens 102 in the imaging optical system 10 when focusing in the reference posture and the focusing distance using the design information of the imaging optical system 10. From this subject distance information table or function and the corrected number of drive pulses (number of drive pulses in the reference posture), it is possible to output a distance in which the distance calculation error due to changes in the internal state caused by the posture of the imaging device 100 has been corrected.

以上説明したように、本実施形態の撮像装置によれば、合焦時のカメラ姿勢に応じた補正情報(駆動パルス変化量)を取得して、補正情報を基にした距離情報等の計測値を算出することができる。そのため、撮像装置の姿勢によって撮像装置の内部状態が変化することによる被写体までの測距誤差を補正することができ、姿勢に依存せずに高精度な測距が可能となる。 As described above, the imaging device of this embodiment can acquire correction information (change in driving pulse) according to the camera attitude when focusing, and calculate measurement values such as distance information based on the correction information. Therefore, it is possible to correct distance measurement errors to the subject caused by changes in the internal state of the imaging device depending on the attitude of the imaging device, making it possible to perform highly accurate distance measurement independent of the attitude.

(第2実施形態)
第1実施形態では、AF動作等で合焦した被写体位置における一つの距離を出力する態様について説明した。本実施形態では、撮像面で測距を行うことで撮影画像と同様の領域の深度画像を出力する態様に対して本発明を適用する例を説明する。
Second Embodiment
In the first embodiment, a mode in which one distance at a subject position focused by an AF operation or the like is output is described. In the present embodiment, an example in which the present invention is applied to a mode in which a depth image of an area similar to that of a captured image is output by performing distance measurement on an imaging surface is described.

本実施形態に係る撮像装置200の機能構成を示すブロック図を図4に示す。図4は、第2実施形態における撮像装置の機能構成を説明する図である。第1実施形態と同様の構成については、同じ符号を付すことでその説明を省略する。以下では、第1実施形態との差異である、撮像素子20および画像処理部24について説明する。 Figure 4 shows a block diagram showing the functional configuration of the imaging device 200 according to this embodiment. Figure 4 is a diagram for explaining the functional configuration of the imaging device in the second embodiment. The same components as in the first embodiment are given the same reference numerals and their explanation will be omitted. Below, the imaging element 20 and image processing unit 24, which are differences from the first embodiment, will be explained.

撮像素子20は、撮像面位相差測距方式の測距機能を有する撮像素子である。そのため、撮像素子20は、撮像画像に加えて、撮像装置から被写体までの距離(被写体距離)を示す距離情報を生成して出力することができる。 The image sensor 20 is an image sensor that has a distance measurement function using an image plane phase difference distance measurement method. Therefore, the image sensor 20 can generate and output distance information indicating the distance from the image sensor to the subject (subject distance) in addition to the captured image.

撮像素子20の詳細な構成について、図5を参照して説明する。図5は、撮像素子20の構成を説明する図である。図5(A)は、撮像素子20および画素210を説明する図である。図5(B)は、画素210を説明する図である。撮像素子20は、行方向および列方向に二次元状に配置された複数の画素210を有する。それぞれの画素210には、赤(R)、緑(G)、青(B)のカラーフィルタが適用された2行×2列の画素210が複数連結して配列される。そのため、画素210からは、R、G、Bのいずれかの色情報を示した画像信号が出力される。なお、本実施形態では一例として、カラーフィルタがベイヤー配列されている例を説明するが、本発明の実施がこれに限られるものではない。 The detailed configuration of the imaging element 20 will be described with reference to FIG. 5. FIG. 5 is a diagram for explaining the configuration of the imaging element 20. FIG. 5(A) is a diagram for explaining the imaging element 20 and the pixel 210. FIG. 5(B) is a diagram for explaining the pixel 210. The imaging element 20 has a plurality of pixels 210 arranged two-dimensionally in the row direction and the column direction. Each pixel 210 is arranged in a 2-row x 2-column array in which a plurality of pixels 210 are connected to each other, to which red (R), green (G), and blue (B) color filters are applied. Therefore, an image signal indicating any one of the color information of R, G, or B is output from the pixel 210. Note that in this embodiment, an example in which the color filters are arranged in a Bayer array will be described as an example, but the implementation of the present invention is not limited to this.

撮像面位相差測距方式の測距機能を有する本実施形態の撮像素子20の各画素210は、複数の光電変換部を有する。複数の光電変換部は、撮像素子20の水平方向に係る図5(A)のI-I’断面において並んで配置されている。図5(B)に示されるように、各画素210は、導光層213および受光層214を備える。導光層213は、1つのマイクロレンズ211と、複数のカラーフィルタ212を有する。受光層214は、第1の光電変換部215および第2の光電変換部216を有する。すなわち、画素210は、1つのマイクロレンズに対して複数の光電変換部を有する構成となっている。 Each pixel 210 of the image sensor 20 of this embodiment, which has a distance measurement function using the image plane phase difference distance measurement method, has multiple photoelectric conversion units. The multiple photoelectric conversion units are arranged side by side in the I-I' cross section of FIG. 5(A) in the horizontal direction of the image sensor 20. As shown in FIG. 5(B), each pixel 210 has a light guide layer 213 and a light receiving layer 214. The light guide layer 213 has one microlens 211 and multiple color filters 212. The light receiving layer 214 has a first photoelectric conversion unit 215 and a second photoelectric conversion unit 216. In other words, the pixel 210 is configured to have multiple photoelectric conversion units for one microlens.

マイクロレンズ211は、画素へ入射した光束を第1の光電変換部215および第2の光電変換部216へ効率よく導くよう構成されている。カラーフィルタ212は、所定の波長帯域の光を通過させるものであり、赤(R)、緑(G)、青(B)のいずれかの波長帯の光のみを通過させ、後段の第1の光電変換部215および第2の光電変換部216に導く。 The microlens 211 is configured to efficiently guide the light beam incident on the pixel to the first photoelectric conversion unit 215 and the second photoelectric conversion unit 216. The color filter 212 passes light of a specific wavelength band, and passes only light of one of the wavelength bands of red (R), green (G), or blue (B), and guides it to the downstream first photoelectric conversion unit 215 and second photoelectric conversion unit 216.

第1の光電変換部215および第2の光電変換部216は、受光した光をアナログ画像信号に変換する。第1の光電変換部215および第2の光電変換部216は、撮像光学系10の互いに異なる瞳領域を通過する光束から一対の像信号を生成し、一対の画像信号が測距に用いられる。すなわち、撮像素子20の各画素210の第1の光電変換部215から出力された像信号で構成される第1の画像信号と、第2の光電変換部216から出力された像信号で構成される第2の画像信号が測距に用いられる。 The first photoelectric conversion unit 215 and the second photoelectric conversion unit 216 convert the received light into an analog image signal. The first photoelectric conversion unit 215 and the second photoelectric conversion unit 216 generate a pair of image signals from light beams passing through different pupil regions of the imaging optical system 10, and the pair of image signals are used for distance measurement. That is, a first image signal composed of an image signal output from the first photoelectric conversion unit 215 of each pixel 210 of the imaging element 20, and a second image signal composed of an image signal output from the second photoelectric conversion unit 216 are used for distance measurement.

第1の光電変換部215と第2の光電変換部216とは、画素に対してマイクロレンズ211を介して入光する光束をそれぞれ部分的に受光する。そのため、最終的に得られる2種類の画像信号は、撮像光学系10の射出瞳101の異なる領域を通過した光束に係る瞳分割画像群となる。ここで、各画素210で第1の光電変換部215と第2の光電変換部216とが光電変換した画像信号を合成した画像信号は、画素に1つの光電変換部のみが設けられている態様において該1つの光電変換部から出力される鑑賞用の画像信号と等価である。 The first photoelectric conversion unit 215 and the second photoelectric conversion unit 216 each partially receive the light beam that enters the pixel through the microlens 211. Therefore, the two types of image signals finally obtained are pupil division images related to the light beams that have passed through different regions of the exit pupil 101 of the imaging optical system 10. Here, the image signal obtained by combining the image signals photoelectrically converted by the first photoelectric conversion unit 215 and the second photoelectric conversion unit 216 in each pixel 210 is equivalent to the image signal for viewing output from the single photoelectric conversion unit in an embodiment in which only one photoelectric conversion unit is provided in the pixel.

このような構造を有することで、本実施形態の撮像素子20は、鑑賞用画像信号と測距用画像信号(2種類の瞳分割画像)とを出力することが可能となっている。なお、本実施形態では、撮像素子20の全ての画素210が2つの光電変換部を備え、高密度な深度情報を出力可能に構成されている例を説明するが、これに限られるものではない。例えば、各画素210が備える光電変換部の数が2つ以上でもよい。また、全ての画素210ではなく一部の画素210が複数の光電変換部を備える構成でもよい。 By having such a structure, the image sensor 20 of this embodiment is capable of outputting an image signal for viewing and an image signal for distance measurement (two types of pupil-split images). Note that in this embodiment, an example is described in which all pixels 210 of the image sensor 20 are provided with two photoelectric conversion units and are configured to be able to output high-density depth information, but this is not limited to this. For example, the number of photoelectric conversion units provided in each pixel 210 may be two or more. Also, a configuration in which some, but not all, pixels 210 have multiple photoelectric conversion units may be used.

ここで、第1の光電変換部215および第2の光電変換部216から出力された瞳分割画像群に基づいて被写体距離を導出する原理について、図6および図7を参照して説明する。図6(A)は、撮像素子20の画素210の第1の光電変換部215に受光する光束を示した概略図である。図6(B)は、第2の光電変換部216に受光する光束を示した概略図である。 Here, the principle of deriving the subject distance based on the pupil division image group output from the first photoelectric conversion unit 215 and the second photoelectric conversion unit 216 will be described with reference to Figs. 6 and 7. Fig. 6(A) is a schematic diagram showing the light flux received by the first photoelectric conversion unit 215 of the pixel 210 of the image sensor 20. Fig. 6(B) is a schematic diagram showing the light flux received by the second photoelectric conversion unit 216.

マイクロレンズ211は、射出瞳101と受光層214とが光学的に共役関係になるように配置されている。撮像光学系10の射出瞳101を通過した光束は、マイクロレンズ211により集光されて第1の光電変換部215または第2の光電変換部216に導かれる。この際、第1の光電変換部215と第2の光電変換部216にはそれぞれ異なる瞳領域を通過した光束を主に受光する。第1の光電変換部215は第1の瞳領域510を通過した光束を受光し、第2の光電変換部216は第2の瞳領域520を通過した光束を受光する。 The microlens 211 is arranged so that the exit pupil 101 and the light receiving layer 214 are optically conjugate. The light beam that passes through the exit pupil 101 of the imaging optical system 10 is collected by the microlens 211 and guided to the first photoelectric conversion unit 215 or the second photoelectric conversion unit 216. At this time, the first photoelectric conversion unit 215 and the second photoelectric conversion unit 216 mainly receive the light beam that passes through different pupil regions. The first photoelectric conversion unit 215 receives the light beam that passes through the first pupil region 510, and the second photoelectric conversion unit 216 receives the light beam that passes through the second pupil region 520.

撮像素子20が備える複数の第1の光電変換部215は、第1の瞳領域510を通過した光束を主に受光し、第1の画像信号を出力する。同時に、撮像素子20が備える複数の第2の光電変換部216は、第2の瞳領域520を通過した光束を主に受光し、第2の画像信号を出力する。第1の画像信号からは、第1の瞳領域510を通過した光束が撮像素子20上に形成する像の強度分布を得ることができる。同様に、第2の画像信号からは、第2の瞳領域520を通過した光束が、撮像素子20上に形成する像の強度分布を得ることができる。 The multiple first photoelectric conversion units 215 included in the image sensor 20 mainly receive the light beam that has passed through the first pupil region 510 and output a first image signal. At the same time, the multiple second photoelectric conversion units 216 included in the image sensor 20 mainly receive the light beam that has passed through the second pupil region 520 and output a second image signal. From the first image signal, it is possible to obtain the intensity distribution of the image formed on the image sensor 20 by the light beam that has passed through the first pupil region 510. Similarly, from the second image signal, it is possible to obtain the intensity distribution of the image formed on the image sensor 20 by the light beam that has passed through the second pupil region 520.

第1の画像信号と第2の画像信号間の相対的な位置ズレ量(所謂、視差量)は、デフォーカス量に応じた値となる。視差量とデフォーカス量との関係について、図7を用いて説明する。図7は、視差量とデフォーカス量との関係について説明する図である。図7において、第1の光束511は、第1の瞳領域510を通過する光束を示し、第2の光束521は第2の瞳領域520を通過する光束を示す。 The relative positional shift amount (so-called parallax amount) between the first image signal and the second image signal is a value according to the defocus amount. The relationship between the parallax amount and the defocus amount will be explained using FIG. 7. FIG. 7 is a diagram explaining the relationship between the parallax amount and the defocus amount. In FIG. 7, a first light beam 511 indicates a light beam passing through the first pupil region 510, and a second light beam 521 indicates a light beam passing through the second pupil region 520.

図7(A)は、合焦時の状態を示している。合焦時には、第1の光束511と第2の光束521が撮像素子20上で収束している。このとき、第1の光束511により形成される第1の画像信号と第2の光束521により形成される第2の画像信号間との視差量は0となる。 Figure 7 (A) shows the state when in focus. When in focus, the first light beam 511 and the second light beam 521 converge on the image sensor 20. At this time, the parallax amount between the first image signal formed by the first light beam 511 and the second image signal formed by the second light beam 521 is 0.

図7(B)は、像がz軸の負方向にデフォーカスした状態を示している。このとき、第1の光束により形成される第1の画像信号と第2の信号により形成される第2の画像信号との視差量は0とはならず、負の値を有する。図7(C)は、像がz軸の正方向にデフォーカスした状態を示している。このとき、第1の光束により形成される第1の画像信号と第2の光束により形成される第2の画像信号との視差量は0とはならず、正の値を有する。図7(B)と図7(C)の比較から、デフォーカス量の正負に応じて、位置ズレの方向が入れ替わることが分かる。また、デフォーカス量に応じて、撮像光学系10の結像関係(幾何関係)に従って位置ズレが生じることが分かる。なお、第1の画像信号と第2の画像信号との位置ズレである視差量は、後述する領域ベースのマッチング手法により検出することができる。 7B shows a state where the image is defocused in the negative direction of the z axis. At this time, the parallax amount between the first image signal formed by the first light beam and the second image signal formed by the second light beam is not 0, but has a negative value. FIG. 7C shows a state where the image is defocused in the positive direction of the z axis. At this time, the parallax amount between the first image signal formed by the first light beam and the second image signal formed by the second light beam is not 0, but has a positive value. From a comparison of FIG. 7B and FIG. 7C, it can be seen that the direction of the positional deviation is reversed depending on whether the defocus amount is positive or negative. It can also be seen that the positional deviation occurs according to the imaging relationship (geometric relationship) of the imaging optical system 10 depending on the defocus amount. The parallax amount, which is the positional deviation between the first image signal and the second image signal, can be detected by a region-based matching method described later.

画像処理部24は、画像生成部240と深度生成部241を備える。画像生成部240は、撮像素子20から得られた一対の画像信号を合成して観賞用の撮像画像を生成する。深度生成部241は、撮像素子20から得られた一対の画像信号から深度画像を生成する。 The image processing unit 24 includes an image generating unit 240 and a depth generating unit 241. The image generating unit 240 synthesizes a pair of image signals obtained from the imaging element 20 to generate an image for viewing. The depth generating unit 241 generates a depth image from the pair of image signals obtained from the imaging element 20.

ここで、深度画像生成に係る処理について、図8のフローチャートを用いて説明する。図8は、深度画像を生成する処理を示すフローチャートである。ステップS2401で、深度生成部241は、第1の画像信号および第2の画像信号に光量補正処理を行う。撮像光学系10の周辺画角ではヴィネッティングによって第1の瞳領域510と第2の瞳領域520の形状が異なることに起因して、第1の画像信号と第2の画像信号の間では光量バランスが崩れている。そのため、深度生成部241は、例えば不図示のメモリに予め格納されている光量補正値を用いて、第1の画像信号と第2の画像信号の光量補正を行い、第1の画像信号と第2の画像信号の光量を揃える。 Here, the process for generating a depth image will be described with reference to the flowchart of FIG. 8. FIG. 8 is a flowchart showing the process for generating a depth image. In step S2401, the depth generation unit 241 performs a light amount correction process on the first image signal and the second image signal. At the peripheral angle of view of the imaging optical system 10, the shape of the first pupil region 510 and the second pupil region 520 differs due to vignetting, causing a loss of light amount balance between the first image signal and the second image signal. Therefore, the depth generation unit 241 performs light amount correction on the first image signal and the second image signal using, for example, a light amount correction value stored in advance in a memory (not shown), and aligns the light amount of the first image signal and the second image signal.

ステップS2402で、深度生成部241は、第1の画像信号および第2の画像信号に生じたノイズを低減する処理を行う。ノイズは、例えば撮像素子20における光電変換時に生じたノイズである。具体的には深度生成部241は、第1の画像信号と第2の画像信号に対してフィルタ処理を適用することで、ノイズ低減を実現する。一般に、空間周波数が高い高周波領域ほどSN比が低くなり、相対的にノイズ成分が多くなる。従って、深度生成部241は、空間周波数が高いほど、通過率が低減するローパスフィルタを第1の画像信号と第2の画像信号に対して適用する。なお、ステップS2401における光量補正は撮像光学系10の製造誤差等によっては好適な結果とはならないため、深度生成部241は、直流成分を遮断しかつ高周波成分の通過率が低いバンドパスフィルタをステップS2402で適用することがより好ましい。 In step S2402, the depth generation unit 241 performs a process to reduce noise generated in the first image signal and the second image signal. The noise is, for example, noise generated during photoelectric conversion in the image sensor 20. Specifically, the depth generation unit 241 achieves noise reduction by applying a filter process to the first image signal and the second image signal. In general, the higher the spatial frequency is, the lower the S/N ratio is, and the more noise components there are relatively. Therefore, the depth generation unit 241 applies a low-pass filter, which reduces the pass rate as the spatial frequency is higher, to the first image signal and the second image signal. Note that the light quantity correction in step S2401 may not produce a favorable result due to manufacturing errors in the imaging optical system 10, so it is more preferable for the depth generation unit 241 to apply a band-pass filter in step S2402 that blocks direct current components and has a low pass rate for high-frequency components.

ステップS2403で、深度生成部241は、深度画像を生成する。深度生成部241は、第1の画像信号と第2の画像信号の画像間の視差量を算出してデフォーカス量に変換し、デフォーカス量を画素値とする2次元情報を深度画像として生成する。 In step S2403, the depth generation unit 241 generates a depth image. The depth generation unit 241 calculates the amount of parallax between the images of the first image signal and the second image signal, converts it into a defocus amount, and generates two-dimensional information in which the defocus amount is a pixel value as a depth image.

具体的には、深度生成部241は、まず視差量を算出するために、第1の画像信号内に、代表画素情報に対応した注目点と、該注目点を中心とする照合領域とを設定する。照合領域は、例えば、注目点を中心とした一辺が所定長さを有する正方領域等の矩形領域である。次に深度生成部241は、第2の画像信号内に参照点を設定し、該参照点を中心とする参照領域を設定する。参照領域は、上述した照合領域と同一の大きさおよび形状を有する。深度生成部241は、参照点を順次移動させながら、第1の画像信号の照合領域内に含まれる画像と、第2の画像信号の参照領域内に含まれる画像との相関度を導出し、最も相関度が高い参照点を、第2の画像信号における注目点に対応する対応点として特定する。このようにしてマッチングにより特定された対応点と注目点との相対的な位置ズレ量が、注目点における視差量となる。深度生成部241は、注目点を代表画素情報に従って順次変更しながら視差量を算出することで、該代表画素情報によって定められた複数の画素位置における視差量を導出する。本実施形態では簡単のため、鑑賞用画像と同一の解像度で深度情報を得るべく、視差量を計算する画素位置(代表画素情報に含まれる画素群)は、鑑賞用画像と同数になるよう設定されているものとする。相関度の導出方法としてNCC(Normalized Cross-Correlation)やSSD(Sum of Squared Difference)、SAD(Sum of Absolute Difference)等の方法を用いてよい。 Specifically, in order to calculate the amount of parallax, the depth generation unit 241 first sets a point of interest corresponding to the representative pixel information and a matching area centered on the point of interest in the first image signal. The matching area is, for example, a rectangular area such as a square area with one side having a predetermined length centered on the point of interest. Next, the depth generation unit 241 sets a reference point in the second image signal and sets a reference area centered on the reference point. The reference area has the same size and shape as the above-mentioned matching area. While sequentially moving the reference point, the depth generation unit 241 derives the degree of correlation between the image included in the matching area of the first image signal and the image included in the reference area of the second image signal, and identifies the reference point with the highest degree of correlation as the corresponding point corresponding to the point of interest in the second image signal. The relative positional shift amount between the corresponding point identified by matching in this way and the point of interest becomes the amount of parallax at the point of interest. The depth generation unit 241 calculates the amount of parallax while sequentially changing the point of interest according to the representative pixel information, thereby deriving the amount of parallax at multiple pixel positions determined by the representative pixel information. For simplicity, in this embodiment, in order to obtain depth information at the same resolution as the image for viewing, it is assumed that the pixel positions (pixel groups included in the representative pixel information) at which the amount of parallax is calculated are set to be the same number as the image for viewing. Methods such as NCC (Normalized Cross-Correlation), SSD (Sum of Squared Difference), and SAD (Sum of Absolute Difference) may be used as a method for deriving the degree of correlation.

算出した視差量は、所定の変換係数を用いることで撮像素子20から撮像光学系10の焦点までの距離であるデフォーカス量に変換することができる。ここで、所定の変換係数K、デフォーカス量をΔLとすると、視差量は、下記の式1によって、デフォーカス量に変換できる。
ΔL=K×d・・・(式1)
深度生成部241は、算出したデフォーカス量を画素値とする2次元情報を構成し、深度画像として不図示のメモリに格納する。
The calculated parallax amount can be converted into a defocus amount, which is the distance from the image sensor 20 to the focal point of the image pickup optical system 10, by using a predetermined conversion coefficient. Here, assuming that the predetermined conversion coefficient K and the defocus amount are ΔL, the parallax amount can be converted into the defocus amount by the following formula 1.
ΔL=K×d (Equation 1)
The depth generation unit 241 generates two-dimensional information with the calculated defocus amount as a pixel value, and stores the information in a memory (not shown) as a depth image.

本実施形態における補正処理は、第1実施形態における補正処理のフローチャート(図3)と同様の流れで処理を実施するが、距離補正に用いる情報が異なる。第1実施形態では、フォーカシングレンズ105の駆動パルス数を利用して補正を実行する例を説明したが、本実施形態では像側におけるフォーカス位置のずれ(デフォーカス量)を基準として補正を実行する。 The correction process in this embodiment is performed in a similar manner to the correction process flowchart in the first embodiment (Figure 3), but the information used for distance correction is different. In the first embodiment, an example was described in which correction was performed using the number of drive pulses for the focusing lens 105, but in this embodiment, correction is performed based on the shift in focus position (defocus amount) on the image side.

本実施形態における距離補正処理は、図3に示される第1実施形態の焦点距離補正処理と同様の処理であるが、撮像装置200の姿勢に応じたフォーカシングレンズ105の駆動量の変化量をデフォーカス量として保持している点が異なっている。ステップS301で、レンズ駆動情報取得部130は、合焦動作によって撮像光学系10内に設置されたフォーカシングレンズ105を駆動した際の駆動量を制御部12から取得する。レンズ駆動情報取得部130は、取得した駆動量に基づいて、撮像光学系10の主点から像面までの像面距離を算出する。 The distance correction process in this embodiment is similar to the focal length correction process in the first embodiment shown in FIG. 3, but differs in that the change in the drive amount of the focusing lens 105 according to the attitude of the imaging device 200 is stored as the defocus amount. In step S301, the lens drive information acquisition unit 130 acquires from the control unit 12 the drive amount when the focusing lens 105 installed in the imaging optical system 10 is driven by the focusing operation. The lens drive information acquisition unit 130 calculates the image plane distance from the principal point of the imaging optical system 10 to the image plane based on the acquired drive amount.

ステップS302で、姿勢検出部131は、センサ19の加速度センサやジャイロセンサ等の出力から、撮影時すなわち合焦時の撮像装置200の姿勢情報を検出する。姿勢検出部131は姿勢情報として、撮像装置200の基準姿勢からのロール・ピッチ・ヨーの傾き角度、特に上下方向にどの程度の傾き角度で撮影が実施されたかを取得する。 In step S302, the attitude detection unit 131 detects attitude information of the imaging device 200 at the time of shooting, i.e., at the time of focusing, from the output of the acceleration sensor, gyro sensor, etc. of the sensor 19. As attitude information, the attitude detection unit 131 obtains the roll, pitch, and yaw tilt angles from the reference attitude of the imaging device 200, particularly the tilt angle in the vertical direction at which shooting was performed.

ステップS303で、補正情報取得部132は、記憶部15から予め取得された距離補正に必要な距離補正情報を取得する。本実施形態における距離補正情報は、フォーカシングレンズ105を駆動した際の姿勢変化に対する駆動量の変化量をデフォーカス量に換算した値である。記憶部15には距離補正情報として、予め取得された姿勢によるデフォーカス量の変化をテーブルとして保存してもよいし、姿勢の角度による関数で近似しその係数を保持してもよい。距離補正情報として関数を利用する場合、一般的に、姿勢が上向きおよび下向きになった場合にデフォーカス量が急激に変化する傾向があるため、ピッチ角度に対する三角関数や三次関数で近似するのが好適である。 In step S303, the correction information acquisition unit 132 acquires distance correction information required for distance correction, which has been acquired in advance from the storage unit 15. The distance correction information in this embodiment is a value obtained by converting the amount of change in drive amount due to a change in attitude when the focusing lens 105 is driven into a defocus amount. The storage unit 15 may store the change in defocus amount due to attitude acquired in advance as a table as distance correction information, or may approximate the amount of defocus amount due to an attitude angle and hold its coefficient. When a function is used as distance correction information, it is preferable to approximate the amount of defocus amount due to a trigonometric function or a cubic function for the pitch angle, since the amount of defocus generally tends to change rapidly when the attitude is facing upward or downward.

ステップS304で、補正部133は、ステップS301で取得した合焦時の像面距離、深度生成部241で生成したデフォーカス量、ステップS303で取得した撮像装置200の姿勢に伴うデフォーカス量を用いて、補正後の像側の被写体距離(像面距離+被写体のデフォーカス量)を算出する。そして、補正部133は、幾何光学における下記の式2で示されるレンズの公式を用いることで、算出した像側の被写体距離を物側の被写体距離に変換する。
1/A+1/B=1/F・・・(式2)
ここで、Aは被写体から撮像光学系10の主点までの距離(被写体距離)、Bは撮像光学系10の主点から像側の被写体距離、Fは撮像光学系10の焦点距離を表す。レンズの公式において、Bの値がステップS304で算出した像側の被写体距離である。像側の被写体距離Bと撮像時の焦点距離Fの設定に基づいて、物側の被写体距離Aを算出することができる。
深度生成部241で生成したデフォーカス量を用いない場合は、ステップS301で取得した合焦時の像面距離とステップS303で取得した撮像装置200の姿勢に伴うデフォーカス量を用いて、補正後の像面距離を算出する。
In step S304, the correction unit 133 calculates the corrected image-side subject distance (image-side distance + subject defocus amount) using the image-side distance at the time of focusing acquired in step S301, the defocus amount generated by the depth generation unit 241, and the defocus amount acquired in step S303 due to the attitude of the imaging device 200. Then, the correction unit 133 converts the calculated image-side subject distance into the object-side subject distance by using the lens formula shown in the following Equation 2 in geometric optics.
1/A+1/B=1/F (Equation 2)
Here, A represents the distance from the subject to the principal point of the imaging optical system 10 (subject distance), B represents the subject distance from the principal point of the imaging optical system 10 to the image side, and F represents the focal length of the imaging optical system 10. In the lens formula, the value of B is the subject distance on the image side calculated in step S304. The subject distance A on the object side can be calculated based on the setting of the subject distance B on the image side and the focal length F during imaging.
If the defocus amount generated by the depth generation unit 241 is not used, the corrected image plane distance is calculated using the image plane distance at the time of focus obtained in step S301 and the defocus amount associated with the attitude of the imaging device 200 obtained in step S303.

本実施形態では、撮像面位相差測距方式を利用した深度画像生成においても、撮像装置の姿勢による距離計測誤差を補正可能となり、撮像装置の姿勢変化に依存せずに被写体距離および深度画像生成が可能となる。そして、補正部133は、幾何光学における式2で示されるレンズの公式を用いることで、算出した像面距離を物側の被写体距離に変換する。 In this embodiment, even in depth image generation using the imaging plane phase difference ranging method, distance measurement errors due to the attitude of the imaging device can be corrected, making it possible to generate subject distance and depth images independent of changes in the attitude of the imaging device. The correction unit 133 then converts the calculated image plane distance into the subject distance on the object side by using the lens formula shown in Equation 2 in geometric optics.

(第3実施形態)
第1実施形態および第2実施形態では、被写体までの距離を補正する例について説明した。しかしながら、被写体までの距離以外にも撮像装置の姿勢変化に伴うズレが生じる。例えば、撮像装置の姿勢変化に伴い、撮像光学系10内のレンズ取り付け時に生じる間隙等に起因するレンズ間隔の変化により、撮像光学系10の焦点距離の微小変化が生じる。焦点距離の微小変化は通常の撮影に支障をきたすものではないが、撮影倍率の算出にも誤差を生じさせる。また、第2実施形態における撮像素子20のような構成での深度画像生成において、式2における焦点距離をより正確な値にすることにより、被写体距離をより正確に算出することが可能となる。そこで本実施形態では、焦点距離および撮影倍率を補正する処理について説明する。
Third Embodiment
In the first and second embodiments, examples of correcting the distance to the subject have been described. However, in addition to the distance to the subject, deviations occur due to changes in the attitude of the imaging device. For example, due to changes in the attitude of the imaging device, a slight change in the focal length of the imaging optical system 10 occurs due to changes in the lens spacing caused by gaps that occur when lenses are attached in the imaging optical system 10. Although a slight change in the focal length does not interfere with normal photography, it also causes errors in the calculation of the imaging magnification. In addition, in generating a depth image with a configuration such as the imaging element 20 in the second embodiment, by making the focal length in Equation 2 a more accurate value, it becomes possible to calculate the subject distance more accurately. Therefore, in this embodiment, a process of correcting the focal length and the imaging magnification will be described.

焦点距離の補正処理について図9(A)のフローチャートを用いて説明する。図9(A)は、焦点距離の補正処理を示すフローチャートである。第1実施形態と同様の処理については同じ符号を付すことでその説明を省略する。なお、本実施形態における撮像装置の構成は第1実施形態と同様でもよいし、第2実施形態と同様でもよい。以下では、第1実施形態の撮像装置100を例に説明する。 The focal length correction process will be described with reference to the flowchart in FIG. 9(A). FIG. 9(A) is a flowchart showing the focal length correction process. Processes similar to those in the first embodiment are given the same reference numerals and their description will be omitted. Note that the configuration of the imaging device in this embodiment may be the same as that in the first embodiment or the second embodiment. The imaging device 100 in the first embodiment will be used as an example below.

ステップS901で、補正情報取得部132は、焦点距離補正情報を記憶部15から取得する。焦点距離補正情報は、姿勢変化に伴う焦点距離の変化情報であり、撮像装置100の基準となる姿勢(例えば、水平)での焦点距離と撮像装置100の姿勢を変化させた場合の焦点距離の変化を表す値である。焦点距離補正情報は、例えば特定距離に設置したチャートから姿勢による画角の微小変化から算出され、予め記憶部15に保存されている。 In step S901, the correction information acquisition unit 132 acquires focal length correction information from the storage unit 15. The focal length correction information is information about the change in focal length associated with a change in attitude, and is a value that represents the focal length in a reference attitude (e.g., horizontal) of the imaging device 100 and the change in focal length when the attitude of the imaging device 100 is changed. The focal length correction information is calculated, for example, from a minute change in the angle of view due to the attitude from a chart placed at a specific distance, and is stored in advance in the storage unit 15.

ステップS902で、補正部133は、ステップS301で取得したレンズ駆動情報から基準となる焦点距離を算出し、ステップS901で取得した焦点距離補正情報を用いて算出した焦点距離を補正する。補正した焦点距離は、撮影した画像の付属情報として画像に紐づけて記憶部15に保存される。また、補正した焦点距離を第2実施形態における式2の演算で利用することで、被写体距離の補正をより高精度に行うことができる。 In step S902, the correction unit 133 calculates a reference focal length from the lens drive information acquired in step S301, and corrects the calculated focal length using the focal length correction information acquired in step S901. The corrected focal length is linked to the captured image as auxiliary information of the image and stored in the storage unit 15. In addition, by using the corrected focal length in the calculation of Equation 2 in the second embodiment, the subject distance can be corrected with higher accuracy.

次に、撮影倍率の補正処理について図9(B)のフローチャートを用いて説明する。図9(A)は、撮影倍率の補正処理を示すフローチャートである。撮影倍率の補正処理では、被写体距離の補正と焦点距離の補正とを実施して、補正した撮影倍率を算出する。第1実施形態(図3)および焦点距離の補正処理(図9(A))と同様の処理については、同じ符号を付すことでその説明を省略する。 Next, the magnification correction process will be described with reference to the flowchart in FIG. 9(B). FIG. 9(A) is a flowchart showing the magnification correction process. In the magnification correction process, corrections are made to the subject distance and the focal length to calculate a corrected magnification. Processes similar to those in the first embodiment (FIG. 3) and the focal length correction process (FIG. 9(A)) are given the same reference numerals and will not be described again.

ステップS903で、補正部133もしくは測定部13内の不図示の倍率算出部は、ステップS304で算出した補正された被写体距離A’と、ステップS902で算出した補正された焦点距離F’から撮影倍率Mを算出する。撮影倍率Mは、M=A’/F’で算出される。算出した撮影倍率に基づいて、画像処理部14内の不図示の寸法計測部において被写体の寸法計測を実行することが可能となる。寸法計測では、像面上の被写体の大きさを撮像素子10の画素サイズから算出し、撮影倍率を乗算することによって物体側における被写体寸法を算出することが可能となる。 In step S903, the correction unit 133 or a magnification calculation unit (not shown) in the measurement unit 13 calculates the shooting magnification M from the corrected subject distance A' calculated in step S304 and the corrected focal length F' calculated in step S902. The shooting magnification M is calculated by M = A'/F'. Based on the calculated shooting magnification, it becomes possible to perform subject dimension measurement in a dimension measurement unit (not shown) in the image processing unit 14. In the dimension measurement, the size of the subject on the image plane is calculated from the pixel size of the image sensor 10, and by multiplying it by the shooting magnification, it becomes possible to calculate the subject dimension on the object side.

本実施形態では、撮像装置の姿勢変化に伴う撮像光学系の焦点距離および撮影倍率の補正を行うことが可能となり、姿勢変化に対応したより正確な焦点距離および撮影倍率を算出することが可能となる。さらに、焦点距離および撮影倍率の補正は、撮影画像からの寸法計測を実施する場合に有効であり、撮像装置の姿勢に依存せずに撮影画像からの寸法計測が可能となる。 In this embodiment, it is possible to correct the focal length and imaging magnification of the imaging optical system in accordance with changes in the attitude of the imaging device, and it is possible to calculate a more accurate focal length and imaging magnification corresponding to the change in attitude. Furthermore, the correction of the focal length and imaging magnification is effective when performing dimensional measurements from the captured image, and it is possible to measure dimensions from the captured image independently of the attitude of the imaging device.

(第4実施形態)
第1実施形態~第3実施形態では、被写体距離や焦点距離といった1次元情報の補正に関して説明したが、本実施形態では撮像装置100の姿勢変化に伴う2次元情報の補正に関して述べる。撮像装置100の姿勢変化により、撮像光学系10中のレンズに傾きが生じた場合、像面のボケ量分布に応じて撮影した画像に片ボケが生じる場合がある。そこで、補正情報として、撮像装置100の姿勢変化に応じた像面の各位置におけるボケ量またはデフォーカス量を予め計測し、記憶部15に保存しておく。撮像装置100の姿勢変化に応じた補正情報を用いることで、撮影時の撮像装置100の姿勢を検出することだけで画像中のどの領域にどれだけのボケが生じるかの情報を取得することができる。そして、撮影画像中の領域ごとにボケに対応したシャープネスフィルタを適用することで、撮影画像の片ボケの影響を軽減することが可能となる。また、補正情報として、撮像装置100の姿勢変化に応じた補正用のフィルタを予め保存するようにしてもよい。
Fourth Embodiment
In the first to third embodiments, correction of one-dimensional information such as the subject distance and the focal length has been described, but in this embodiment, correction of two-dimensional information accompanying a change in the posture of the imaging device 100 will be described. When a tilt occurs in the lens in the imaging optical system 10 due to a change in the posture of the imaging device 100, one-sided blur may occur in the captured image according to the distribution of the amount of blur on the image plane. Therefore, as correction information, the amount of blur or the amount of defocus at each position on the image plane according to the change in the posture of the imaging device 100 is measured in advance and stored in the storage unit 15. By using the correction information according to the change in the posture of the imaging device 100, it is possible to obtain information on how much blur occurs in which area of the image simply by detecting the posture of the imaging device 100 at the time of shooting. Then, by applying a sharpness filter corresponding to the blur to each area in the captured image, it is possible to reduce the effect of one-sided blur in the captured image. In addition, a correction filter corresponding to the change in the posture of the imaging device 100 may be stored in advance as correction information.

本実施形態によると、撮像装置の姿勢変化に伴って撮影画像に生じる片ボケの影響を補正することができ、撮像装置がどのような姿勢であってもその姿勢による片ボケの影響を軽減した撮影画像を取得することが可能となる。 According to this embodiment, it is possible to correct the effect of one-sided blur that occurs in a captured image when the image capture device changes its posture, and it is possible to obtain a captured image in which the effect of one-sided blur caused by the posture of the image capture device is reduced, regardless of the posture of the image capture device.

(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
Other Examples
The present invention can also be realized by a process in which a program for implementing 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) that implements one or more of the functions.

以上、本発明の好ましい実施形態について説明したが、本発明は、これらの実施形態に限定されず、その要旨の範囲内で種々の変形および変更が可能である。 The above describes preferred embodiments of the present invention, but the present invention is not limited to these embodiments, and various modifications and variations are possible within the scope of the gist of the invention.

100 撮像装置
10 撮像光学系
11 撮像素子
12 制御部
13 計測部
130 レンズ駆動情報取得部
131 姿勢検出部
132 補正情報取得部
133 補正部
14 画像処理部
15 記憶部
19 センサ
REFERENCE SIGNS LIST 100 Imaging device 10 Imaging optical system 11 Imaging element 12 Control unit 13 Measurement unit 130 Lens drive information acquisition unit 131 Attitude detection unit 132 Correction information acquisition unit 133 Correction unit 14 Image processing unit 15 Storage unit 19 Sensor

Claims (9)

合焦時のフォーカシングレンズの駆動量を取得する計測手段と、
前記合焦時の撮像装置の姿勢を検出する姿勢検出手段と、
前記撮像装置の姿勢に起因する前記撮像装置の内部の状態変化によるフォーカシングレンズの駆動量の誤差を補正するための補正情報として、検出した前記撮像装置の姿勢に応じたフォーカシングレンズの駆動量の変化量を取得する補正情報取得手段と、
前記補正情報に基づいて前記合焦時のフォーカシングレンズの駆動量を補正し、補正したフォーカシングレンズの駆動量に基づいて合焦した被写体までの距離である被写体距離を算出する補正手段と、を備えることを特徴とする撮像装置。
A measuring means for acquiring a driving amount of the focusing lens when focusing;
an attitude detection means for detecting an attitude of the imaging device when focusing;
a correction information acquisition means for acquiring a change in a driving amount of a focusing lens according to the detected attitude of the imaging device as correction information for correcting an error in a driving amount of a focusing lens due to a change in an internal state of the imaging device caused by the attitude of the imaging device;
and a correction means for correcting a driving amount of the focusing lens at the time of focusing based on the correction information, and calculating a subject distance, which is a distance to a focused subject, based on the corrected driving amount of the focusing lens.
合焦時のフォーカシングレンズの駆動量に基づいて撮像光学系の主点から像面までの像面距離を取得する計測手段と、
前記合焦時の撮像装置の姿勢を検出する姿勢検出手段と、
前記撮像装置の姿勢に起因する前記撮像装置の内部の状態変化による像面距離の誤差を補正するための補正情報として、検出した前記撮像装置の姿勢に応じたフォーカシングレンズの駆動量の変化量を換算したデフォーカス量の変化量を取得する補正情報取得手段と、
前記補正情報に基づいて前記合焦時の像面距離を補正し、補正した像面距離に基づいて合焦した被写体までの距離である被写体距離を算出する補正手段と、を備えることを特徴とする撮像装置。
a measuring means for acquiring an image plane distance from a principal point of the imaging optical system to an image plane based on a driving amount of the focusing lens during focusing;
an attitude detection means for detecting an attitude of the imaging device when focusing;
a correction information acquisition means for acquiring a change in defocus amount obtained by converting a change in a driving amount of a focusing lens corresponding to the detected attitude of the imaging device, as correction information for correcting an error in an image plane distance due to a change in an internal state of the imaging device caused by the attitude of the imaging device;
a correction unit that corrects the image plane distance at the time of focusing based on the correction information, and calculates a subject distance, which is the distance to a focused subject, based on the corrected image plane distance.
合焦時のフォーカシングレンズの駆動量を取得する計測手段と、
前記合焦時の撮像装置の姿勢を検出する姿勢検出手段と、
前記撮像装置の姿勢に起因する前記撮像装置の内部の状態変化による撮像光学系の焦点距離の誤差を補正するための補正情報として、検出した前記撮像装置の姿勢に応じた撮像光学系の焦点距離の変化量を取得する補正情報取得手段と、
前記合焦時のフォーカシングレンズの駆動量に基づいて合焦時の撮像光学系の焦点距離を算出し、算出した焦点距離を前記補正情報に基づいて補正する補正手段と、を備えることを特徴とする撮像装置。
A measuring means for acquiring a driving amount of the focusing lens when focusing;
an attitude detection means for detecting an attitude of the imaging device when focusing;
a correction information acquisition means for acquiring a change in focal length of the imaging optical system corresponding to the detected attitude of the imaging device as correction information for correcting an error in focal length of the imaging optical system due to a change in an internal state of the imaging device caused by an attitude of the imaging device;
a correction unit that calculates a focal length of the imaging optical system when in focus based on the driving amount of the focusing lens when in focus, and corrects the calculated focal length based on the correction information.
合焦時のフォーカシングレンズの駆動量を取得する計測手段と、
前記合焦時の撮像装置の姿勢を検出する姿勢検出手段と、
前記撮像装置の姿勢に起因する前記撮像装置の内部の状態変化によるフォーカシングレンズの駆動量の誤差を補正するための補正情報として、検出した前記撮像装置の姿勢に応じたフォーカシングレンズの駆動量の変化量を取得する第1の補正情報取得手段と、
取得した前記フォーカシングレンズの駆動量の変化量に基づいて前記補正情報に基づいて前記合焦時のフォーカシングレンズの駆動量を補正し、補正したフォーカシングレンズの駆動量に基づいて合焦した被写体までの距離である補正被写体距離を算出する第1の補正手段と、
前記撮像装置の姿勢に起因する前記撮像装置の内部の状態変化による撮像光学系の焦点距離の誤差を補正するための補正情報として、検出した前記撮像装置の姿勢に応じた撮像光学系の焦点距離の変化量を取得する第2の補正情報取得手段と、
前記合焦時のフォーカシングレンズの駆動量に基づいて合焦時の撮像光学系の焦点距離を算出し、算出した焦点距離を取得した前記焦点距離の変化量に基づいて補正して補正焦点距離を算出する第2の補正手段と、
前記補正被写体距離および前記補正焦点距離に基づいて撮影倍率を算出する倍率算出手段と、を備えることを特徴とする撮像装置。
A measuring means for acquiring a driving amount of the focusing lens when focusing;
an attitude detection means for detecting an attitude of the imaging device when focusing;
a first correction information acquisition means for acquiring a change in a driving amount of a focusing lens according to the detected attitude of the imaging device as correction information for correcting an error in a driving amount of a focusing lens due to a change in an internal state of the imaging device caused by an attitude of the imaging device;
a first correction means for correcting the driving amount of the focusing lens at the time of focusing based on the acquired change amount of the driving amount of the focusing lens and the correction information, and calculating a corrected subject distance which is a distance to a focused subject based on the corrected driving amount of the focusing lens;
a second correction information acquisition means for acquiring a change in focal length of the imaging optical system corresponding to the detected attitude of the imaging device as correction information for correcting an error in focal length of the imaging optical system due to a change in an internal state of the imaging device caused by an attitude of the imaging device;
a second correction means for calculating a focal length of the imaging optical system when in focus based on a driving amount of the focusing lens when in focus, and correcting the calculated focal length based on the acquired amount of change in the focal length to calculate a corrected focal length;
and a magnification calculation unit that calculates a photographing magnification based on the corrected object distance and the corrected focal length.
前記倍率算出手段が算出した前記撮影倍率と像面における被写体像の寸法から被写体寸法を算出する寸法計測手段を更に備えることを特徴とする請求項に記載の撮像装置。 5. The imaging apparatus according to claim 4 , further comprising a dimension measuring means for calculating a subject dimension from the photographing magnification calculated by the magnification calculating means and a dimension of the subject image on an image plane. 前記補正情報は、前記撮像装置の姿勢に応じたテーブルまたは前記撮像装置の姿勢を変数とする関数の係数として記憶手段に保存されることを特徴とする請求項1乃至のいずれか1項に記載の撮像装置。 6. The imaging device according to claim 1, wherein the correction information is stored in a storage device as a table corresponding to the orientation of the imaging device or as coefficients of a function having the orientation of the imaging device as a variable. 前記姿勢検出手段が検出する前記撮像装置の姿勢は、前記撮像装置の基準姿勢に対するロール方向またはピッチ方向の角度のいずれかであることを特徴とする請求項1乃至のいずれか1項に記載の撮像装置。 7. The imaging apparatus according to claim 1, wherein the attitude of the imaging apparatus detected by the attitude detection means is an angle in either a roll direction or a pitch direction with respect to a reference attitude of the imaging apparatus. 撮像装置の制御方法であって、
合焦時のフォーカシングレンズの駆動量を取得する工程と、
前記合焦時の撮像装置の姿勢を検出する工程と、
前記撮像装置の姿勢に起因する前記撮像装置の内部の状態変化によるフォーカシングレンズの駆動量の誤差を補正するための補正情報として、検出した前記撮像装置の姿勢に応じたフォーカシングレンズの駆動量の変化量を取得する工程と、
前記補正情報に基づいて前記合焦時のフォーカシングレンズの駆動量を補正し、補正したフォーカシングレンズの駆動量に基づいて合焦した被写体までの距離である被写体距離を算出する工程と、を有することを特徴とする制御方法。
A control method for an imaging device, comprising:
acquiring a driving amount of the focusing lens when focusing;
detecting the attitude of the imaging device when focusing;
acquiring a change in a driving amount of a focusing lens according to the detected attitude of the imaging device as correction information for correcting an error in a driving amount of a focusing lens due to a change in an internal state of the imaging device caused by the attitude of the imaging device;
and correcting the amount of drive of the focusing lens at the time of focusing based on the correction information, and calculating an object distance, which is the distance to the focused object, based on the corrected amount of drive of the focusing lens.
請求項1乃至のいずれか1項に記載の撮像装置の各手段としてコンピュータを機能させるためのプログラム。 A program for causing a computer to function as each of the means of the imaging apparatus according to any one of claims 1 to 7 .
JP2019209572A 2019-11-20 2019-11-20 Image capture device, image capture device control method and program Active JP7504579B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019209572A JP7504579B2 (en) 2019-11-20 2019-11-20 Image capture device, image capture device control method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019209572A JP7504579B2 (en) 2019-11-20 2019-11-20 Image capture device, image capture device control method and program

Publications (2)

Publication Number Publication Date
JP2021081611A JP2021081611A (en) 2021-05-27
JP7504579B2 true JP7504579B2 (en) 2024-06-24

Family

ID=75965094

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019209572A Active JP7504579B2 (en) 2019-11-20 2019-11-20 Image capture device, image capture device control method and program

Country Status (1)

Country Link
JP (1) JP7504579B2 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000227543A (en) 1999-02-05 2000-08-15 Canon Inc Optical equipment
JP2005292659A (en) 2004-04-02 2005-10-20 Matsushita Electric Ind Co Ltd Imaging apparatus, lens barrel used in the imaging apparatus and camera body
US20090268310A1 (en) 2003-12-09 2009-10-29 Panasonic Corporation Lens driving apparatus, imaging apparatus, and lens barrel and camera main body used for this
JP2011013460A (en) 2009-07-02 2011-01-20 Canon Inc Optical device
WO2014046184A1 (en) 2012-09-24 2014-03-27 富士フイルム株式会社 Device and method for measuring distances of multiple subjects
JP2014126858A (en) 2012-12-27 2014-07-07 Canon Inc Imaging device and control method therefor
JP2019082468A (en) 2017-10-27 2019-05-30 キヤノン株式会社 Imaging device and control method for imaging device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0651176A (en) * 1992-07-28 1994-02-25 Nikon Corp Lens barrel

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000227543A (en) 1999-02-05 2000-08-15 Canon Inc Optical equipment
US20090268310A1 (en) 2003-12-09 2009-10-29 Panasonic Corporation Lens driving apparatus, imaging apparatus, and lens barrel and camera main body used for this
JP2005292659A (en) 2004-04-02 2005-10-20 Matsushita Electric Ind Co Ltd Imaging apparatus, lens barrel used in the imaging apparatus and camera body
JP2011013460A (en) 2009-07-02 2011-01-20 Canon Inc Optical device
WO2014046184A1 (en) 2012-09-24 2014-03-27 富士フイルム株式会社 Device and method for measuring distances of multiple subjects
JP2014126858A (en) 2012-12-27 2014-07-07 Canon Inc Imaging device and control method therefor
JP2019082468A (en) 2017-10-27 2019-05-30 キヤノン株式会社 Imaging device and control method for imaging device

Also Published As

Publication number Publication date
JP2021081611A (en) 2021-05-27

Similar Documents

Publication Publication Date Title
US8730373B2 (en) Image forming apparatus
JP5791349B2 (en) Imaging apparatus and control method thereof
US9681037B2 (en) Imaging apparatus and its control method and program
US9344617B2 (en) Image capture apparatus and method of controlling that performs focus detection
JP2012234152A (en) Imaging apparatus and control method thereof
JP5784395B2 (en) Imaging device
US20170257583A1 (en) Image processing device and control method thereof
JP6664177B2 (en) Focus detection device, prediction method, program, and storage medium
JP2019168479A (en) Controller, imaging device, method for control, program, and, and storage medium
JP5338112B2 (en) Correlation calculation device, focus detection device, and imaging device
JP7504579B2 (en) Image capture device, image capture device control method and program
JP4696730B2 (en) Focus measuring device
JP2014142497A (en) Imaging apparatus and method for controlling the same
JP2013061560A (en) Distance measuring device, and imaging device
JP2018045105A (en) Imaging device and control method of the same, information processing device as well as information processing method
JP2013044827A (en) Imaging apparatus
JP2022103610A (en) Lens device, image capturing device, method of controlling lens device, and program
JP6728005B2 (en) Imaging device, imaging method, and program
JP6566800B2 (en) Imaging apparatus and imaging method
US20220232166A1 (en) Range measurement apparatus, storage medium and range measurement method
JP4038103B2 (en) Auto focus camera
JP2019074634A (en) Imaging apparatus
JP6257201B2 (en) FOCUS DETECTION DEVICE, ITS CONTROL METHOD, CONTROL PROGRAM, AND IMAGING DEVICE
JP2012134826A (en) Imaging apparatus
JP6270601B2 (en) Imaging apparatus, control method therefor, and imaging system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230810

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230822

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20231019

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240206

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240402

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240612