JP2014099832A - Camera - Google Patents

Camera Download PDF

Info

Publication number
JP2014099832A
JP2014099832A JP2012251953A JP2012251953A JP2014099832A JP 2014099832 A JP2014099832 A JP 2014099832A JP 2012251953 A JP2012251953 A JP 2012251953A JP 2012251953 A JP2012251953 A JP 2012251953A JP 2014099832 A JP2014099832 A JP 2014099832A
Authority
JP
Japan
Prior art keywords
camera
tilt
angle
correction
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012251953A
Other languages
Japanese (ja)
Inventor
Haruo Hatanaka
晴雄 畑中
Fumitaka Shiroo
文祟 城尾
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.)
Xacti Corp
Original Assignee
Xacti Corp
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 Xacti Corp filed Critical Xacti Corp
Priority to JP2012251953A priority Critical patent/JP2014099832A/en
Publication of JP2014099832A publication Critical patent/JP2014099832A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To achieve proper inclination correction execution control, without imposing a burden on a photographer.SOLUTION: In a camera, a camera inclination angle (θ[i]) around an optical axis is successively detected. When the inclination state of the camera is stable, a reference angle θis set based on the camera inclination angle at that time and a correction flag is turned on (steps S16 to S18). After that, an inclination correction (step 20) for correcting the inclination angle of an output image to the reference angle θis executed. When the camera inclination angle larger than a threshold θis detected or an inclination change in the same direction is continuously detected for a fixed period, during the execution of the inclination correction, the correction flag is turned off to stop the inclination correction (steps S21 to S25).

Description

本発明は、カメラに関する。   The present invention relates to a camera.

小型のカメラは手に持って使用されることも多く、特に歩行時に撮影を行う場合やシャッタ操作を行う場合などにおいては、カメラがぶれることも多い。カメラのぶれの内、光軸周りの傾き(ロール方向の回転ぶれ)を検出し補正する方法が提案されている(例えば下記特許文献1参照)。この種の傾き補正では、ユーザ操作に依らず自動的に、実空間上の水平線が撮影画像上でも水平となるように(撮影画像の水平方向を向くように)、光軸周りのカメラの検出傾き角度に基づき、撮像素子の回転駆動又は画像処理が行われる。   A small camera is often used while being held in hand, and the camera is often shaken particularly when shooting while walking or when performing a shutter operation. A method of detecting and correcting tilt around the optical axis (rotational shake in the roll direction) among camera shakes has been proposed (see, for example, Patent Document 1 below). This type of tilt correction automatically detects the camera around the optical axis so that the horizontal line in the real space is horizontal in the captured image (so that it faces the horizontal direction of the captured image), regardless of user operation. Based on the tilt angle, rotation driving or image processing of the image sensor is performed.

また、撮影者の手動操作に従って光軸周りの傾き補正量を調整する方法も開示されている(例えば下記特許文献2参照)。   Also disclosed is a method of adjusting the tilt correction amount around the optical axis in accordance with the manual operation of the photographer (see, for example, Patent Document 2 below).

特開2008−151822号公報JP 2008-151822 A 特開2012−4899号公報JP 2012-4899 A

ユーザ操作に依らず自動的に実空間上の水平線を撮影画像上で水平にする傾き補正(以下、自動水平化処理という)は、多くの状況下において有益に機能する。しかしながら、傾き補正機能を有する従来カメラでは、光軸周りに傾いた構図での撮影を撮影者が望んでいてカメラを光軸周りに意図的に傾かせた場合でも自動水平化処理が行われるため、撮影者の望む撮影を行えないことがある。   Inclination correction (hereinafter referred to as “automatic leveling process”) for automatically leveling a horizontal line in real space on a captured image regardless of a user operation functions beneficially in many situations. However, in a conventional camera having a tilt correction function, an automatic leveling process is performed even when the photographer wants to shoot with a composition tilted around the optical axis and the camera is intentionally tilted around the optical axis. , The photographer may not be able to perform the desired shooting.

例えば、図19に示す如く、花911の上方に木の枝912が斜めに伸びている風景に関し、撮影者が花911のみを撮影したいと考えている場合を想定する。カメラ1を水平に保っている状態では撮影領域910の中に枝912が入ってしまうため、撮影者が枝912を撮影領域910から排除すべくカメラ1を光軸周りに傾けたとする。しかしながら、自動水平化機能が有効になっているとき、カメラ1の傾きが打ち消されるように傾き補正が行われて枝912が引き続き撮影画像内に入ってしまう(カメラ1を傾けても図19の右下の撮影画像が得られることになる)。つまり、自動水平化機能が撮影者の操作の妨げになる。自動水平化機能をオフにする手動操作をカメラに入力すれば意図通りの構図が得られる。或いは、手動操作にて傾き補正量を調整した場合(特許文献2参照)も意図通りの構図が得られる。しかしながら、手動操作での傾き補正オン/オフ切り替えや、手動操作での傾き補正量調整はユーザにとって手間がかかる。   For example, as shown in FIG. 19, it is assumed that the photographer wants to photograph only the flower 911 with respect to a landscape in which a tree branch 912 extends obliquely above the flower 911. When the camera 1 is kept horizontal, the branch 912 enters the shooting area 910. Therefore, it is assumed that the photographer tilts the camera 1 around the optical axis to exclude the branch 912 from the shooting area 910. However, when the automatic leveling function is enabled, tilt correction is performed so that the tilt of the camera 1 is canceled, and the branch 912 continues to be in the captured image (even if the camera 1 is tilted, FIG. 19). The lower right shot image will be obtained). That is, the automatic leveling function hinders the photographer's operation. If the manual operation to turn off the automatic leveling function is input to the camera, the composition as intended can be obtained. Alternatively, when the tilt correction amount is adjusted manually (see Patent Document 2), the intended composition can be obtained. However, switching the tilt correction on / off by manual operation and adjusting the tilt correction amount by manual operation are troublesome for the user.

そこで本発明は、撮影者に負担を課すことなく適切な傾き補正実行制御の実現に寄与するカメラを提供することを目的とする。   Accordingly, an object of the present invention is to provide a camera that contributes to the realization of appropriate tilt correction execution control without imposing a burden on the photographer.

本発明に係るカメラは、光学系及び前記光学系を介して結像される光学像の信号を出力する撮像素子を有する撮像部を備え、前記撮像素子の出力信号から出力画像を取得するカメラにおいて、前記光学系の光軸周りのカメラ傾き角度を検出する傾き検出部と、前記カメラ傾き角度に基づき、当該カメラの傾きによる前記出力画像の傾きの角度を基準角度に補正する傾き補正を実行可能な傾き補正部と、前記カメラ傾き角度の大きさ又は複数の時刻における複数のカメラ傾き角度に基づき、前記傾き補正の実行有無の制御又は前記基準角度の設定を行う傾き補正制御部と、を更に備えたことを特徴とする。   A camera according to the present invention includes an imaging unit having an optical system and an image sensor that outputs an optical image signal formed through the optical system, and obtains an output image from an output signal of the image sensor. An inclination detector that detects a camera inclination angle around the optical axis of the optical system and an inclination correction that corrects the inclination angle of the output image due to the inclination of the camera to a reference angle based on the camera inclination angle. A tilt correction unit, and a tilt correction control unit that controls whether to perform tilt correction or sets the reference angle based on the size of the camera tilt angle or a plurality of camera tilt angles at a plurality of times. It is characterized by having.

カメラ傾き角度の大きさ又は複数の時刻における複数のカメラ傾き角度に基づけば、光軸周りのカメラの傾きに関する、撮影者の意図(傾き補正の実行を望んでいるか否か、補正目標をどこにおいているのか)を推測することができる。その推測結果に基づけば、特段の手動操作を必要とせずに、撮影者の意図に沿う形で、傾き補正の実行有無を制御したり、補正目標とも言える基準角度を設定したりすることが可能となる。   Based on the size of the camera tilt angle or multiple camera tilt angles at multiple times, the photographer ’s intention (whether or not he / she wants to perform tilt correction) Can be guessed). Based on the estimation results, it is possible to control whether or not to perform tilt correction and set a reference angle that can be said to be a correction target in a way that suits the photographer's intention without requiring any special manual operation. It becomes.

具体的には例えば、前記傾き補正制御部は、前記傾き補正の実行中において所定閾値より大きな大きさを持つ前記カメラ傾き角度が検出されたとき、前記傾き補正の実行を停止させても良い。   Specifically, for example, the tilt correction control unit may stop the tilt correction when the camera tilt angle having a magnitude larger than a predetermined threshold is detected during the tilt correction.

比較的大きなカメラ傾き角度が検出される状態は、撮影者が明確な意図を持ってカメラを光軸周りに傾けた状態に相当する、と推測できる。故に、このような状態が観測された場合には、傾き補正の実行を停止することが撮影者の意図に沿うと考えられる。その停止に際し、撮影者の手動操作は不要であるため撮影者に特段の負担は無い。   It can be inferred that a state in which a relatively large camera tilt angle is detected corresponds to a state in which the photographer tilts the camera around the optical axis with a clear intention. Therefore, when such a state is observed, it is considered that stopping the execution of the inclination correction is in line with the photographer's intention. At the time of the stop, no manual operation of the photographer is necessary, so there is no particular burden on the photographer.

より具体的には例えば、前記傾き補正制御部は、第1期間中の複数のカメラ傾き角度に基づき前記基準角度を設定して前記傾き補正の実行を開始した後、第2期間において前記所定閾値より大きな大きさを持つ前記カメラ傾き角度が検出されたとき、前記傾き補正の実行を停止させると良い。   More specifically, for example, the tilt correction control unit sets the reference angle based on a plurality of camera tilt angles during the first period and starts the tilt correction, and then performs the predetermined threshold in the second period. When the camera tilt angle having a larger size is detected, the execution of the tilt correction may be stopped.

或いは例えば、前記傾き補正制御部は、前記傾き補正の実行中において時系列上で同一方向に連続的に変化する複数のカメラ傾き角度が検出されたとき、前記傾き補正の実行を停止させても良い。   Alternatively, for example, the tilt correction control unit may stop execution of the tilt correction when a plurality of camera tilt angles continuously changing in the same direction in time series are detected during the tilt correction. good.

一方向への連続的な傾き変化が検出される状態は、撮影者が明確な意図を持ってカメラを光軸周りに回転させている状態に相当する、と推測できる。故に、このような状態が観測された場合には、傾き補正の実行を停止することが撮影者の意図に沿うと考えられる。その停止に際し、撮影者の手動操作は不要であるため撮影者に特段の負担は無い。   It can be inferred that the state in which a continuous tilt change in one direction is detected corresponds to a state in which the photographer rotates the camera around the optical axis with a clear intention. Therefore, when such a state is observed, it is considered that stopping the execution of the inclination correction is in line with the photographer's intention. At the time of the stop, no manual operation of the photographer is necessary, so there is no particular burden on the photographer.

より具体的には例えば、前記傾き補正制御部は、第1期間中の複数のカメラ傾き角度に基づき前記基準角度を設定して前記傾き補正の実行を開始した後、第2期間において時系列上で同一方向に連続的に変化する複数のカメラ傾き角度が検出されたとき、前記傾き補正の実行を停止させると良い。   More specifically, for example, the tilt correction control unit sets the reference angle based on a plurality of camera tilt angles during the first period and starts execution of the tilt correction. When a plurality of camera tilt angles that continuously change in the same direction are detected, it is preferable to stop the tilt correction.

また例えば、前記傾き補正制御部は、前記傾き補正の実行前に得られた複数のカメラ傾き角度に基づき、前記光軸周りにおける当該カメラの傾き状態の安定有無を判定し、当該傾き状態が安定している場合、前記傾き補正の実行前に得られた複数のカメラ傾き角度に基づき前記基準角度を設定して前記傾き補正を開始させると良い。   Further, for example, the tilt correction control unit determines whether the tilt state of the camera around the optical axis is stable based on a plurality of camera tilt angles obtained before the tilt correction is performed, and the tilt state is stable. In this case, the tilt correction may be started by setting the reference angle based on a plurality of camera tilt angles obtained before the tilt correction is performed.

複数のカメラ傾き角度に基づき傾き状態が安定していると判定されるとき、その傾きを持った構図で被写体撮影を行おうとする意図を撮影者が有していると推測される。このような場合には、従来の単純な傾き補正よりも、複数のカメラ傾き角度に基づく基準角度を目標にして傾き補正を行った方が撮影者の意図に沿うと考えられる。補正目標とも言うべき基準角度の設定に際し、撮影者に特段の負担は無い(特許文献2の方法では必要となるような手動操作は不要である)。   When it is determined that the tilt state is stable based on a plurality of camera tilt angles, it is estimated that the photographer has an intention to shoot the subject with a composition having the tilt. In such a case, it is considered that it is more in line with the photographer's intention to perform the tilt correction with a reference angle based on a plurality of camera tilt angles as a target, rather than the conventional simple tilt correction. There is no particular burden on the photographer when setting the reference angle, which can also be called a correction target (manual operation that is necessary in the method of Patent Document 2 is unnecessary).

また具体的には例えば、前記傾き補正部は、前記傾き補正において、前記カメラ傾き角度に基づき、前記撮像素子を前記光軸周りで回転させて前記撮像素子の出力信号から前記出力画像を生成しても良いし、又は、前記カメラ傾き角度に基づき、前記撮像素子の出力信号による入力画像に画像回転処理を含む画像処理を施すことで前記出力画像を生成しても良い。   More specifically, for example, the tilt correction unit generates the output image from the output signal of the image sensor by rotating the image sensor around the optical axis based on the camera tilt angle in the tilt correction. Alternatively, the output image may be generated by performing image processing including image rotation processing on the input image based on the output signal of the image sensor based on the camera tilt angle.

また例えば、前記傾き補正制御部は、前記カメラ傾き角度の変化速度、又は、前記傾き以外の前記カメラの動きに応じて、一旦設定した前記基準角度を所定の初期角度に戻しても良い。   Further, for example, the tilt correction control unit may return the once set reference angle to a predetermined initial angle according to the change rate of the camera tilt angle or the movement of the camera other than the tilt.

本発明によれば、撮影者に負担を課すことなく適切な傾き補正実行制御の実現に寄与するカメラを提供することが可能である。   According to the present invention, it is possible to provide a camera that contributes to realization of appropriate tilt correction execution control without imposing a burden on the photographer.

本発明の実施形態に係るカメラの概略全体ブロック図である。1 is a schematic overall block diagram of a camera according to an embodiment of the present invention. 本発明の実施形態に係る撮像部の内部構成図である。It is an internal block diagram of the imaging part which concerns on embodiment of this invention. 図2の撮像素子の出力から入力画像が得られる様子を示す図(a)及び(b)と、入力画像とXY座標面との関係を示す図(c)である。FIG. 3 is a diagram (a) and (b) showing how an input image is obtained from the output of the image sensor of FIG. 2, and a diagram (c) showing the relationship between the input image and an XY coordinate plane. カメラ、光軸及び被写体の関係を示す図である。It is a figure which shows the relationship between a camera, an optical axis, and a to-be-photographed object. カメラ及び光軸と、被写体の一種である水平基準線との関係を示す図である。It is a figure which shows the relationship between a camera and an optical axis, and the horizontal reference line which is a kind of to-be-photographed object. 3つの条件下において観測される表示画面の様子を示す図である。It is a figure which shows the mode of the display screen observed on three conditions. 3つの条件下において得られる入力画像を示す図である。It is a figure which shows the input image obtained on three conditions. 撮像素子の回転角度を説明するための図である。It is a figure for demonstrating the rotation angle of an image pick-up element. 図1の主処理/制御部の内部ブロック図である。FIG. 2 is an internal block diagram of a main processing / control unit in FIG. 1. 画像回転処理の内容を説明するための図である。It is a figure for demonstrating the content of an image rotation process. 出力画像における傾き角度を説明するための図である。It is a figure for demonstrating the inclination angle in an output image. カメラ傾き角度と基準角度(補正目標)との関係を示す図である。It is a figure which shows the relationship between a camera inclination angle and a reference angle (correction target). IS回転処理による傾き補正の内容を説明するための図である。It is a figure for demonstrating the content of the inclination correction by IS rotation process. 画像回転処理による傾き補正の内容を説明するための図である。It is a figure for demonstrating the content of the inclination correction by an image rotation process. 本発明の実施形態に係るカメラの動作フローチャートである。5 is an operation flowchart of the camera according to the embodiment of the present invention. 第1ケースにおけるカメラ傾き及び表示画面の変遷の様子を示す図である。It is a figure which shows the mode of the camera inclination in a 1st case, and the transition of a display screen. 第2ケースにおけるカメラ傾き及び表示画面の変遷の様子を示す図である。It is a figure which shows the mode of the camera tilt in a 2nd case, and the transition of a display screen. 第3ケースにおけるカメラ傾き及び表示画面の変遷の様子を示す図である。It is a figure which shows the mode of the transition of the camera inclination in a 3rd case, and a display screen. 従来カメラにおける傾き補正(自動水平化処理)の内容を示す図である。It is a figure which shows the content of the inclination correction (automatic leveling process) in a conventional camera.

以下、本発明の実施形態の例を、図面を参照して具体的に説明する。参照される各図において、同一の部分には同一の符号を付し、同一の部分に関する重複する説明を原則として省略する。尚、本明細書では、記述の簡略化上、情報、信号、物理量、状態量又は部材等を参照する記号又は符号を記すことによって該記号又は符号に対応する情報、信号、物理量、状態量又は部材等の名称を省略又は略記することがある。   Hereinafter, an example of an embodiment of the present invention will be specifically described with reference to the drawings. In each of the drawings to be referred to, the same part is denoted by the same reference numeral, and redundant description regarding the same part is omitted in principle. In this specification, for simplification of description, a symbol or reference that refers to information, signal, physical quantity, state quantity, member, or the like is written to indicate information, signal, physical quantity, state quantity or Names of members and the like may be omitted or abbreviated.

図1は、本発明の実施形態に係るカメラ1の概略全体ブロック図である。撮像装置としてのカメラは、静止画像及び動画像を撮影及び記録可能なデジタルビデオカメラ、又は、静止画像のみを撮影及び記録可能なデジタルスチルカメラである。カメラ1は、符号11〜15によって参照される各部位を備える。   FIG. 1 is a schematic overall block diagram of a camera 1 according to an embodiment of the present invention. A camera as an imaging device is a digital video camera capable of capturing and recording still images and moving images, or a digital still camera capable of capturing and recording only still images. The camera 1 is provided with each part referred by the codes | symbols 11-15.

撮像部11は、撮像素子を用いて被写体の撮影を行う。図2は、撮像部11の内部構成図である。撮像部11は、ズームレンズ30及びフォーカスレンズ31を含む複数枚のレンズから形成される光学系35と、絞り32と、CCD(Charge Coupled Device)又はCMOS(Complementary Metal Oxide Semiconductor)イメージセンサなどから成る撮像素子(固体撮像素子)33と、光学系35や絞り32を駆動制御するためのドライバ34と、を有している。後述されるように撮像素子33もドライバ34によって回転駆動されうる。主処理/制御部12により、ドライバ34を介して、レンズ30及び31の各位置並びに絞り32の開度(即ち絞り値)が制御されると共に撮像素子33の回転が制御されうる。撮像素子33は、光学系35を介して自身の撮像面に結像される光学像の信号を出力する。軸300は、光学系35の光軸(換言すれば撮像部11又はカメラ1の光軸)である。   The imaging unit 11 captures a subject using an imaging element. FIG. 2 is an internal configuration diagram of the imaging unit 11. The imaging unit 11 includes an optical system 35 formed by a plurality of lenses including a zoom lens 30 and a focus lens 31, a diaphragm 32, a CCD (Charge Coupled Device), a CMOS (Complementary Metal Oxide Semiconductor) image sensor, and the like. An image sensor (solid-state image sensor) 33 and a driver 34 for driving and controlling the optical system 35 and the diaphragm 32 are provided. As will be described later, the image sensor 33 can also be rotationally driven by the driver 34. The main processing / control unit 12 can control the positions of the lenses 30 and 31 and the opening of the diaphragm 32 (that is, the diaphragm value) and the rotation of the image sensor 33 via the driver 34. The imaging element 33 outputs an optical image signal formed on its imaging surface via the optical system 35. The axis 300 is the optical axis of the optical system 35 (in other words, the optical axis of the imaging unit 11 or the camera 1).

主処理/制御部12は、信号処理回路、CPU(Central Processing Unit)、ROM(Read Only Memory)及びRAM(Random Access Memory)等にて形成され、カメラ1内の各部位の動作を統括的に制御する。表示画面13は、液晶ディスプレイパネル等の表示画面であり、主処理/制御部12の制御の下、任意の映像を表示する。記録媒体14は、半導体メモリや磁気ディスク等の不揮発性メモリであり、主処理/制御部12による制御の下、撮像部11の撮影画像等を記録する。操作部15は、外部からの各種操作を受け付ける。操作部15に対する操作内容は主処理/制御部12に伝達される。タッチパネルを用いて操作部15が形成されていても良い。   The main processing / control unit 12 is formed of a signal processing circuit, a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like, and comprehensively operates each part in the camera 1. Control. The display screen 13 is a display screen such as a liquid crystal display panel, and displays an arbitrary video under the control of the main processing / control unit 12. The recording medium 14 is a nonvolatile memory such as a semiconductor memory or a magnetic disk, and records a photographed image or the like of the imaging unit 11 under the control of the main processing / control unit 12. The operation unit 15 receives various operations from the outside. The content of the operation on the operation unit 15 is transmitted to the main processing / control unit 12. The operation unit 15 may be formed using a touch panel.

撮像素子33の撮像面に結像される光学像、即ち、撮像素子33の撮像面に形成される画像を入力画像IAと呼ぶ(図3(a)参照)。撮像素子33の撮像面に形成される画像に対して所定の信号処理(信号増幅処理、デモザイキング処理、ノイズ除去処理等)を施して得られる画像が入力画像IAであると考えても良い。図3(b)に入力画像IAの例を示す。図3(b)の入力画像IAには、被写体SUBの像が含まれている。入力画像IA又は入力画像IAに基づく画像を表示画面13に表示することができる。また、図3(c)に示す如く、入力画像IA及び撮像素子33の撮像面は、X軸及びY軸を座標軸として持つXY座標面上に定義されていると考える。X軸は、撮像素子33の撮像面の水平方向及び入力画像IAの水平方向に平行であり、Y軸は、撮像素子33の撮像面の垂直方向及び入力画像IAの垂直方向に平行である。X軸及びY軸はXY座標面の原点Oにて直交する。原点Oは入力画像IAの中心及び撮像面の中心に位置するものとする。   An optical image formed on the imaging surface of the imaging device 33, that is, an image formed on the imaging surface of the imaging device 33 is referred to as an input image IA (see FIG. 3A). It may be considered that an image obtained by performing predetermined signal processing (signal amplification processing, demosaicing processing, noise removal processing, etc.) on an image formed on the imaging surface of the imaging device 33 is the input image IA. FIG. 3B shows an example of the input image IA. The input image IA in FIG. 3B includes an image of the subject SUB. The input image IA or an image based on the input image IA can be displayed on the display screen 13. Further, as shown in FIG. 3C, the input image IA and the image pickup surface of the image pickup device 33 are considered to be defined on an XY coordinate plane having the X axis and the Y axis as coordinate axes. The X axis is parallel to the horizontal direction of the imaging surface of the imaging element 33 and the horizontal direction of the input image IA, and the Y axis is parallel to the vertical direction of the imaging surface of the imaging element 33 and the vertical direction of the input image IA. The X axis and the Y axis are orthogonal at the origin O of the XY coordinate plane. The origin O is located at the center of the input image IA and the center of the imaging surface.

図4に、カメラ1と被写体SUBとの関係を示す。カメラ1の動きには、カメラ1を光軸300周りに回転させる(換言すれば、光軸300を回転軸としてカメラ1を回転させる)ロール方向の動きが含まれる。ロール方向の動きによる、光軸300周りのカメラ1の傾きをロール方向の傾きと呼ぶ。カメラ1におけるロール方向の傾きの角度をカメラ傾き角度と呼び、それを記号θにて表す。光軸300周りの撮像素子33の回転角度であるIS回転角度φ(図8(a)及び(b)参照)が0°であるとき、ロール方向の傾きに応じ、入力画像IAにおいて被写体SUBは傾く。カメラ1は、このような傾きを補正する機能を有する。   FIG. 4 shows the relationship between the camera 1 and the subject SUB. The movement of the camera 1 includes a movement in the roll direction that rotates the camera 1 around the optical axis 300 (in other words, rotates the camera 1 about the optical axis 300 as a rotation axis). The tilt of the camera 1 around the optical axis 300 due to the movement in the roll direction is referred to as the tilt in the roll direction. The angle of tilt in the roll direction in the camera 1 is called a camera tilt angle, which is represented by the symbol θ. When the IS rotation angle φ (see FIGS. 8A and 8B), which is the rotation angle of the image sensor 33 around the optical axis 300, is 0 °, the subject SUB in the input image IA depends on the inclination in the roll direction. Tilt. The camera 1 has a function of correcting such tilt.

当該機能の説明の具体化及び明確化のため、以下では、図5に示す如く、実空間において被写体の一種である水平基準線HLが固定的に存在しており、撮像部11の撮影領域内に水平基準線HLが常に収まっているものとする。水平基準線HLは、実空間における水平方向に平行な線分(従って鉛直方向に直交する線分)であり、水平基準線HLの一端は光軸300上に位置するものとする。   In order to clarify and clarify the description of the function, in the following, as shown in FIG. 5, a horizontal reference line HL that is a kind of subject in the real space is fixedly present, and within the imaging region of the imaging unit 11. It is assumed that the horizontal reference line HL is always within the range. The horizontal reference line HL is a line segment parallel to the horizontal direction in real space (and therefore a line segment orthogonal to the vertical direction), and one end of the horizontal reference line HL is located on the optical axis 300.

カメラ1は様々な姿勢をとるが、その内の1つの姿勢を基準姿勢と呼ぶ。基準姿勢では、光軸300が実空間の水平方向に平行であって水平基準線HLに直交する。基準姿勢では、ロール方向の傾きは無く、従ってカメラ傾き角度θは0°である。水平基準線HLに正対してカメラ1を持つ撮影者から見て、カメラ1を基準姿勢から時計回り方向に角度θJだけ回転させたとき“θ=θJ”であり、カメラ1を基準姿勢から反時計回り方向に角度θJだけ回転させたとき“θ=−θJ”である。図6(a)〜(c)には、IS回転角度φが0°である場合において入力画像IAをそのまま表示画面13に表示したときの様子が示されている。図7(a)〜(c)には、IS回転角度φが0°である場合において取得される入力画像IAが示されている。但し、図6(a)及び図7(a)では“θ=0°”であり、図6(b)及び図7(b)では“θ=θJ”であり、図6(c)及び図7(c)では“θ=−θJ”である(θJ>0°)。 The camera 1 takes various postures, and one of the postures is referred to as a reference posture. In the reference posture, the optical axis 300 is parallel to the horizontal direction of the real space and orthogonal to the horizontal reference line HL. In the reference posture, there is no tilt in the roll direction, and therefore the camera tilt angle θ is 0 °. When viewed from the photographer who has the camera 1 facing the horizontal reference line HL, when the camera 1 is rotated clockwise by an angle θ J from the reference posture, “θ = θ J ” is obtained, and the camera 1 is in the reference posture. Is rotated counterclockwise by an angle θ J, “θ = −θ J ”. 6A to 6C show a state where the input image IA is displayed on the display screen 13 as it is when the IS rotation angle φ is 0 °. 7A to 7C show the input image IA acquired when the IS rotation angle φ is 0 °. However, “θ = 0 °” in FIGS. 6A and 7A, “θ = θ J ” in FIGS. 6B and 7B, and FIGS. In FIG. 7C, “θ = −θ J ” (θ J > 0 °).

基準姿勢においてIS回転角度φが0°であるとき、入力画像IA及び撮像面上において、水平基準線HLはX軸に平行であり(従ってY軸に直交し)、原点OからX軸の正方向に伸びる(図7(a)参照)。IS回転角度φが0°であるとき、カメラ傾き角度θが0°から正に増大するにつれて、水平基準線HLは入力画像IA上で原点Oを回転軸に反時計回りに回転してゆく。IS回転角度φが0°であるとき、入力画像IA上の水平基準線HLとX軸との成す角度εAは、極性も含めてカメラ傾き角度θと一致するものとする(図7(b)及び(c)参照)。尚、カメラ傾き角度θは“−180°<θ≦−180°”を満たす範囲で変動するが、以下では、説明の便宜上、“−90°<θ≦−90°”が成立すると考える。 When the IS rotation angle φ is 0 ° in the reference posture, the horizontal reference line HL is parallel to the X axis (and thus orthogonal to the Y axis) on the input image IA and the imaging surface, and is positive from the origin O to the X axis. It extends in the direction (see FIG. 7A). When the IS rotation angle φ is 0 °, the horizontal reference line HL rotates counterclockwise around the origin O on the input image IA as the camera tilt angle θ increases positively from 0 °. When the IS rotation angle φ is 0 °, the angle ε A formed by the horizontal reference line HL on the input image IA and the X axis coincides with the camera tilt angle θ including the polarity (FIG. 7B). ) And (c)). Although the camera tilt angle θ varies within a range that satisfies “−180 ° <θ ≦ −180 °”, it will be assumed below that “−90 ° <θ ≦ −90 °” holds for convenience of explanation.

図8(a)及び(b)に示す如く、IS回転角度φは、光軸300周りの撮像素子33の回転角度(即ち、光軸300を回転軸とした撮像素子33の回転の角度)である。基準姿勢において、IS回転角度φが0°であるとき、撮像素子33の水平及び垂直方向は実空間の水平及び鉛直方向と一致する。尚、IS回転角度φが0°である状態をIS回転ゼロ状態という。基準姿勢において、IS回転角度φを0°以外にすれば、撮像素子33の水平方向(従ってX軸)は実空間の水平方向からIS回転角度φだけ傾く。図8(c)の透視図に示す如く、水平基準線HLに正対してカメラ1を持つ撮影者から見て、撮像素子33をIS回転ゼロ状態から反時計回り方向に回転させたときの角度φの極性が正であるとする。   As shown in FIGS. 8A and 8B, the IS rotation angle φ is the rotation angle of the image sensor 33 around the optical axis 300 (that is, the rotation angle of the image sensor 33 with the optical axis 300 as the rotation axis). is there. In the reference posture, when the IS rotation angle φ is 0 °, the horizontal and vertical directions of the image sensor 33 coincide with the horizontal and vertical directions of the real space. A state where the IS rotation angle φ is 0 ° is referred to as an IS rotation zero state. If the IS rotation angle φ is set to a value other than 0 ° in the reference posture, the horizontal direction (and hence the X axis) of the image sensor 33 is inclined by the IS rotation angle φ from the horizontal direction of the real space. As shown in the perspective view of FIG. 8C, the angle when the image sensor 33 is rotated counterclockwise from the IS rotation zero state when viewed from the photographer having the camera 1 facing the horizontal reference line HL. Suppose that the polarity of φ is positive.

図9に示す如く、主処理/制御部12には、出力画像生成部50、傾き検出部51、傾き補正部52及び傾き補正制御部53が設けられる。   As shown in FIG. 9, the main processing / control unit 12 includes an output image generation unit 50, an inclination detection unit 51, an inclination correction unit 52, and an inclination correction control unit 53.

出力画像生成部50は、入力画像IAに所定の画像処理(信号処理)を施すことで出力画像IBを生成する。当該画像処理に、ノイズ除去処理及びエッジ強調処理などを含めることができる他、後述の傾き補正のための画像回転処理を含めることができる。尚、画像回転処理が行われない場合、入力画像IAと出力画像IBは完全に又は実質的に同じ画像でありうる。入力画像IAと出力画像IBが完全に同じである場合、出力画像生成部50をカメラ1から割愛可能である。出力画像IBを、表示画面13に表示することができ、また記録媒体14に記録することができる。   The output image generation unit 50 generates an output image IB by performing predetermined image processing (signal processing) on the input image IA. The image processing can include noise removal processing, edge enhancement processing, and the like, and can also include image rotation processing for tilt correction described later. When the image rotation process is not performed, the input image IA and the output image IB can be completely or substantially the same image. When the input image IA and the output image IB are completely the same, the output image generation unit 50 can be omitted from the camera 1. The output image IB can be displayed on the display screen 13 and can be recorded on the recording medium 14.

画像回転処理を含む画像処理について説明する。画像回転処理が実行される場合、IS回転角度φが0°の状態で入力画像IAが取得される。図10を参照する。画像回転処理において、出力画像生成部50は、入力画像IAの中心(原点O)に中心を持ち且つ入力画像IAと共通のアスペクト比を持った矩形枠である切り出し枠CFを入力画像IAに設定し、入力画像IAから切り出し枠CF内の画像を切り出す。この際、切り出し枠CFは入力画像IAに対して角度αだけ傾いている。入力画像IAに対し切り出し枠CFが傾いていない状態を基準として、切り出し枠CFを入力画像IA上で反時計周りに回転させたときの角度αの極性が正であるとする。切り出し枠CFの全体が入力画像IAに内包されるという条件を満たしつつ、なるだけ大きな切り出し枠CFが入力画像IAに設定される。画像回転処理において、出力画像生成部50は、入力画像IAから切り出した切り出し枠CF内の画像を、時計回りに(−α)の角度だけ回転させる幾何学的変換を実行することで出力画像IBを生成する(幾何学的変換を経た切り出し枠CF内の画像が出力画像IBである)。出力画像IBの画像サイズを規定サイズに一致させるための画像拡大処理が、当該幾何学的変換に含まれていても良い。尚、ここでは、切り出し処理後に画像回転を含む幾何学的変換を行っているが、入力画像IAの全体を回転させた後に切り出し処理を行うようにしても良い。   Image processing including image rotation processing will be described. When the image rotation process is executed, the input image IA is acquired with the IS rotation angle φ being 0 °. Please refer to FIG. In the image rotation process, the output image generation unit 50 sets a cutout frame CF, which is a rectangular frame having a center at the center (origin O) of the input image IA and a common aspect ratio to the input image IA, as the input image IA. Then, the image in the cutout frame CF is cut out from the input image IA. At this time, the cutout frame CF is inclined by the angle α with respect to the input image IA. Assume that the polarity of the angle α when the clipping frame CF is rotated counterclockwise on the input image IA is positive with reference to the state where the clipping frame CF is not inclined with respect to the input image IA. While satisfying the condition that the entire cutout frame CF is included in the input image IA, a cutout frame CF that is as large as possible is set in the input image IA. In the image rotation process, the output image generation unit 50 performs geometric transformation that rotates the image in the cutout frame CF cut out from the input image IA clockwise by an angle of (−α), thereby outputting the output image IB. (The image in the cutout frame CF that has undergone the geometric transformation is the output image IB). An image enlargement process for matching the image size of the output image IB with a specified size may be included in the geometric transformation. Here, geometric transformation including image rotation is performed after the clipping process, but the clipping process may be performed after the entire input image IA is rotated.

また、なるだけ大きな切り出し枠CFを設定する方法を上述したが、その設定方法に代えて、以下の設定方法を採用しても良い。所定の回転限度角αLIMを設定しておき(0°<αLIM<90°)、“−αLIM≦α≦αLIM”が成立する範囲内において、入力画像IAの外枠に内接する最小の切り出し枠CFを予め求めておく。この最小の切り出し枠CFは、上記範囲内において、入力画像IAの外枠に内接する切り出し枠CFの内、最小の大きさを持った切り出し枠CFである。そして、画像回転処理において、切り出し枠CFの大きさを常に上記最小の切り出し枠CFの大きさと一致させる。これにより、上記範囲内において、出力画像IBの画角変動を無くすことができる。 Further, although the method for setting the cutout frame CF as large as possible has been described above, the following setting method may be employed instead of the setting method. A predetermined rotation limit angle α LIM is set (0 ° <α LIM <90 °), and the minimum inscribed in the outer frame of the input image IA is within a range where “−α LIM ≦ α ≦ α LIM ” is satisfied. The cutout frame CF is obtained in advance. This minimum cutout frame CF is a cutout frame CF having the smallest size among the cutout frames CF inscribed in the outer frame of the input image IA within the above range. In the image rotation process, the size of the cutout frame CF is always matched with the minimum cutout frame CF. Thereby, the angle-of-view variation of the output image IB can be eliminated within the above range.

傾き検出部51は、センサを用いてカメラ傾き角度θを検出することができる。例えば、傾き検出部51は、カメラ1の加速度を検出する加速度センサを用いてカメラ傾き角度θを検出しても良い。この際、光軸300に直交する2つの軸の方向におけるカメラ1の加速度を2つの加速度センサを用いて検出し、当該2つの加速度センサの検出結果に基づきカメラ傾き角度θを検出しても良い。また例えば、傾き検出部51は、ロール方向におけるカメラ1の角速度を検出するジャイロセンサを用いてカメラ傾き角度θを検出しても良い。また例えば、傾き検出部51は、カメラ傾き角度θそのものを直接検出する傾斜センサを用いても良い。   The tilt detection unit 51 can detect the camera tilt angle θ using a sensor. For example, the tilt detection unit 51 may detect the camera tilt angle θ using an acceleration sensor that detects the acceleration of the camera 1. At this time, the acceleration of the camera 1 in the directions of two axes orthogonal to the optical axis 300 may be detected using two acceleration sensors, and the camera tilt angle θ may be detected based on the detection results of the two acceleration sensors. . Further, for example, the tilt detection unit 51 may detect the camera tilt angle θ using a gyro sensor that detects the angular velocity of the camera 1 in the roll direction. Further, for example, the tilt detection unit 51 may use a tilt sensor that directly detects the camera tilt angle θ itself.

傾き検出部51は、撮像素子33の出力信号に基づきカメラ傾き角度θを検出しても良い。撮像素子33の出力信号に基づきカメラ傾き角度を検出する方法として、公知の方法(例えば、特開2007−306500号公報に記載の方法)を利用可能である。カメラ1にとっての被写界を画像として捉えた場合、その被写界には、通常、鉛直線及び水平線に平行なエッジが多く含まれている。例えば、建造物、家具、直立姿勢の人物、地平線などを画像として捉えた場合、それらには鉛直線及び/又は水平線に平行なエッジが多く含まれている。故に、入力画像IAの画像信号に基づき、入力画像IAにおいてエッジの伸びる方向を検出して検出方向を統計処理すれば、実空間上の鉛直線及び水平線に対応する、入力画像IA上の鉛直線及び水平線の方向を判断でき、その判断した方向とX及びY軸との関係から、カメラ傾き角度θを求めることができる。   The tilt detection unit 51 may detect the camera tilt angle θ based on the output signal of the image sensor 33. As a method for detecting the camera tilt angle based on the output signal of the image sensor 33, a known method (for example, a method described in Japanese Patent Application Laid-Open No. 2007-306500) can be used. When an object scene for the camera 1 is captured as an image, the object scene usually includes many edges parallel to a vertical line and a horizontal line. For example, when a building, furniture, a person in an upright position, a horizon line, and the like are captured as an image, they include many edges parallel to the vertical line and / or the horizontal line. Therefore, if the direction in which the edge extends in the input image IA is detected based on the image signal of the input image IA and the detection direction is statistically processed, the vertical line on the input image IA corresponding to the vertical line and the horizontal line in the real space. The direction of the horizontal line can be determined, and the camera tilt angle θ can be obtained from the relationship between the determined direction and the X and Y axes.

傾き補正部52は、傾き検出部51によって検出されたカメラ傾き角度θに基づき、ロール方向のカメラ1の傾きによる出力画像IBの傾きの角度を基準角度θREFに補正する傾き補正、換言すれば、ロール方向のカメラ1の傾きによる出力画像IBの傾きの角度を基準角度θREFに一致させる傾き補正を実行可能である。出力画像IBの傾きの角度は、出力画像IBにおける水平基準線HLの傾きの角度εBに相当する(図11参照)。出力画像IBにおいて水平基準線HLが水平方向を向いている状態では、角度εBは0°であり、その状態を基準にして、図11に示す如く、出力画像IBの中心周りに出力画像IB上で水平基準線HLが反時計周り方向に回転したとき、その回転角分だけ角度εBは正の値を持つとする(逆に、時計周り方向に回転したときには、その回転角分だけ角度εBは負の値を持つ)。 The tilt correction unit 52 is based on the camera tilt angle θ detected by the tilt detection unit 51, in other words, tilt correction that corrects the tilt angle of the output image IB due to the tilt of the camera 1 in the roll direction to the reference angle θ REF , in other words. Inclination correction can be executed to match the inclination angle of the output image IB with the inclination of the camera 1 in the roll direction to the reference angle θ REF . The inclination angle of the output image IB corresponds to the inclination angle ε B of the horizontal reference line HL in the output image IB (see FIG. 11). In the state where the horizontal reference line HL is oriented in the horizontal direction in the output image IB, the angle ε B is 0 °, and with reference to this state, as shown in FIG. 11, the output image IB around the center of the output image IB. When the horizontal reference line HL rotates in the counterclockwise direction above, the angle ε B has a positive value corresponding to the rotation angle (conversely, when rotated in the clockwise direction, the angle is equal to the rotation angle. ε B has a negative value).

傾き補正における基準角度θREFは補正目標として機能し、傾き補正の実行により、カメラ傾き角度θを基準角度θREFにした状態で撮影を行ったかのような画像が出力画像IBとして得られる。故に、傾き補正における補正量は“θ−θREF”にて表される(図12参照)。傾き補正部52は、当該傾き補正を、IS回転処理又は画像回転処理によって実現する。 The reference angle θ REF in the tilt correction functions as a correction target. By executing the tilt correction, an image as if shooting was performed with the camera tilt angle θ set to the reference angle θ REF is obtained as the output image IB. Therefore, the correction amount in the inclination correction is represented by “θ−θ REF ” (see FIG. 12). The tilt correction unit 52 realizes the tilt correction by IS rotation processing or image rotation processing.

IS回転処理において、傾き補正部52は、ドライバ34(図2)を介して光軸300周りに撮像素子33を回転させる。即ち、IS回転処理による傾き補正において、傾き補正部52は、“φ=θ−θREF”となるように、補正量“θ−θREF”だけ撮像素子33をIS回転ゼロ状態から回転させる。IS回転処理によって傾き補正を実現する場合、入力画像IAがそのまま出力画像IBとして生成される。但し、入力画像IAから出力画像IBの生成過程に、画像回転を伴わない信号処理(ノイズ除去処理等)は介在していても良い。 In the IS rotation process, the tilt correction unit 52 rotates the image sensor 33 around the optical axis 300 via the driver 34 (FIG. 2). That is, in tilt correction by IS rotation processing, the tilt correction unit 52 rotates the image sensor 33 from the IS rotation zero state by the correction amount “θ−θ REF ” so that “φ = θ−θ REF ”. When the tilt correction is realized by the IS rotation process, the input image IA is generated as it is as the output image IB. However, signal processing (such as noise removal processing) that does not involve image rotation may be involved in the process of generating the output image IB from the input image IA.

具体的には例えば、θ=25°且つθREF=0°である場合において、IS回転処理による傾き補正を実行した場合、φ=25°とされて、図13(a)の画像351が入力画像IA及び出力画像IBとして得られる。画像351上では、水平基準線HLが画像351の水平方向を向いている(即ちεA=εB=0°)。 Specifically, for example, when θ = 25 ° and θ REF = 0 °, when tilt correction by IS rotation processing is executed, φ = 25 ° and the image 351 in FIG. 13A is input. Obtained as an image IA and an output image IB. On the image 351, the horizontal reference line HL faces the horizontal direction of the image 351 (that is, ε A = ε B = 0 °).

また例えば、θ=25°且つθREF=15°である場合において、IS回転処理による傾き補正を実行した場合、φ=10°とされて、図13(b)の画像352が入力画像IA及び出力画像IBとして得られる。画像352上では、水平基準線HLが画像351の水平方向から15°(=θREF)だけ傾いている(即ちεA=εB=15°)。 Further, for example, when θ = 25 ° and θ REF = 15 °, when tilt correction by IS rotation processing is executed, φ = 10 ° is set, and an image 352 in FIG. Obtained as an output image IB. On the image 352, the horizontal reference line HL is inclined by 15 ° (= θ REF ) from the horizontal direction of the image 351 (that is, ε A = ε B = 15 °).

画像回転処理によって傾き補正を実現する場合(図14(a)及び(b)参照)、出力画像生成部50は、IS回転角度φを0°にした状態で得た入力画像IAに切り出し枠CFを設定し、切り出し枠CF内の画像を補正量“θ−θREF”だけ回転させる幾何学的変換を実行することで出力画像IBを生成する。この際、傾き補正部52は、角度θ及びθREFに基づき、出力画像生成部50における切り出し枠CFの設定及び切り出し動作を制御する。 When the tilt correction is realized by the image rotation process (see FIGS. 14A and 14B), the output image generation unit 50 cuts the cutout frame CF into the input image IA obtained with the IS rotation angle φ set to 0 °. Is set, and geometrical transformation is performed to rotate the image in the cutout frame CF by the correction amount “θ−θ REF ” to generate the output image IB. At this time, the inclination correction unit 52 controls the setting of the cutout frame CF and the cutout operation in the output image generation unit 50 based on the angles θ and θREF .

具体的には例えば、θ=25°且つθREF=0°である場合において、画像回転処理による傾き補正を実行する場合、まず、角度εAが25°である図14(a)の画像361が入力画像IAとして得られる。出力画像生成部50は、画像361に25°(=θ−θREF=25°−0°))だけ傾いた切り出し枠CF(即ち、α=25°の切り出し枠CF;図10も参照)を設定し、画像361から切り出した切り出し枠CF内の画像を時計回りに25°(反時計周りでは−25°)だけ回転させる幾何学的変換を実行することで出力画像IBとしての画像362を得る。画像362上では、水平基準線HLが画像362の水平方向を向いている(即ちεB=0°である)。 Specifically, for example, in the case where θ = 25 ° and θ REF = 0 °, when performing tilt correction by image rotation processing, first, the image 361 in FIG. 14A in which the angle ε A is 25 ° is shown. Is obtained as the input image IA. The output image generation unit 50 includes a cutout frame CF (that is, a cutout frame CF with α = 25 °; see also FIG. 10) inclined by 25 ° (= θ− θREF = 25 ° −0 °) in the image 361. The image 362 as the output image IB is obtained by executing geometric transformation that is set and rotated by 25 ° clockwise (−25 ° in the counterclockwise direction) in the cutout frame CF cut out from the image 361. . On the image 362, the horizontal reference line HL faces the horizontal direction of the image 362 (that is, ε B = 0 °).

また例えば、θ=25°且つθREF=15°である場合において、画像回転処理による傾き補正を実行した場合も、まず、角度εAが25°である図14(b)の画像361が入力画像IAとして得られる。但し、この場合、出力画像生成部50は、画像361上に10°(=θ−θREF=25°−15°)だけ傾いた切り出し枠CF(即ち、α=10°の切り出し枠CF;図10も参照)を設定し、画像361から切り出した切り出し枠CF内の画像を時計回りに10°(反時計周りでは−10°)だけ回転させる幾何学的変換を実行することで出力画像IBとしての画像363を得る。画像363上では、水平基準線HLが画像363の水平方向から15°(=θREF)だけ傾いている(即ちεB=15°)。 For example, in the case where θ = 25 ° and θ REF = 15 °, when the inclination correction by the image rotation process is executed, first, the image 361 in FIG. 14B in which the angle ε A is 25 ° is input. Obtained as an image IA. However, in this case, the output image generation unit 50 causes the cutout frame CF tilted by 10 ° (= θ− θREF = 25 ° −15 °) on the image 361 (that is, the cutout frame CF of α = 10 °; 10 is also set), and an output image IB is obtained by executing a geometric transformation that rotates the image in the cutout frame CF cut out from the image 361 by 10 ° clockwise (−10 ° counterclockwise). Image 363 is obtained. On the image 363, the horizontal reference line HL is inclined by 15 ° (= θ REF ) from the horizontal direction of the image 363 (ie, ε B = 15 °).

尚、傾き補正が画像回転処理によって実現される場合、傾き補正は出力画像生成部50にて行われているとも言える。故に、出力画像生成部50は傾き補正部52に内包されていると考えても良い。   Note that when the tilt correction is realized by image rotation processing, it can be said that the tilt correction is performed by the output image generation unit 50. Therefore, it may be considered that the output image generation unit 50 is included in the inclination correction unit 52.

図9の傾き補正制御部53は、1以上の時刻に検出された1以上のカメラ傾き角度θに基づき、上述の傾き補正の実行有無の制御又は基準角度θREFの設定を行う。傾き補正制御部53の機能の詳細は図15の説明の中で明らかとなる。 The tilt correction control unit 53 in FIG. 9 controls whether or not to perform the tilt correction described above or sets the reference angle θ REF based on one or more camera tilt angles θ detected at one or more times. Details of the function of the inclination correction control unit 53 will be apparent in the description of FIG.

図15は、撮影モードにおけるカメラ1の動作フローチャートである。図15の動作では、カメラ1における傾き補正機能が有効になっているものとする。撮影者としてのユーザは、操作部15を用いて傾き補正機能の有効/無効を切り替え設定することができる。カメラ1が起動してカメラ1の動作モードが撮影モードに設定されると、ステップS11において制御部53は初期化処理を行う。初期化処理では、補正フラグをオフに設定すると共に、基準角度θREFに初期角度である0°を設定し、更に変数iに1を代入する。補正フラグは、ロール方向のカメラ1の傾き変化をフレーム間で逐次補正するか否かを指定するフラグである。 FIG. 15 is an operation flowchart of the camera 1 in the shooting mode. In the operation of FIG. 15, it is assumed that the tilt correction function in the camera 1 is enabled. A user as a photographer can use the operation unit 15 to switch between valid / invalid of the tilt correction function. When the camera 1 is activated and the operation mode of the camera 1 is set to the shooting mode, the control unit 53 performs an initialization process in step S11. In the initialization process, the correction flag is set to OFF, the initial angle 0 ° is set to the reference angle θ REF , and 1 is substituted into the variable i. The correction flag is a flag for designating whether or not the tilt change of the camera 1 in the roll direction is sequentially corrected between frames.

初期化処理後、ステップS12にて傾き検出部51により、傾き検出角度θ[i]が検出される。撮影モードでは、所定のフレーム周期での順次撮影によって入力画像IAが(従って出力画像IBも)順次得られるが、θ[i]は、第i番目のフレームに対して検出された傾き検出角度θである。時刻tiでの撮影により得られた入力画像IAを第i番目のフレームと考えてよい。時刻ti+1は、時刻tiより1フレーム周期分だけ後の時刻である。ステップS12に続くステップS13において、制御部53は、前フレームと現フレームとの間の傾き変化量Δθを、“Δθ=θ[i]−θ[i−1]”に従って算出する(尚、θ[0]はゼロであるとする)。制御部53は、後述の各処理を行うために、θ[i]及びΔθの値を必要分だけ保持する。 After the initialization process, the inclination detection unit 51 detects the inclination detection angle θ [i] in step S12. In the shooting mode, the input image IA (and thus the output image IB) is sequentially obtained by sequential shooting at a predetermined frame period, and θ [i] is an inclination detection angle θ detected with respect to the i-th frame. It is. The input image IA obtained by shooting at the time t i may be considered as the i-th frame. Time t i + 1 is a time after one frame period from time t i . In step S13 subsequent to step S12, the control unit 53 calculates an inclination change amount Δθ between the previous frame and the current frame in accordance with “Δθ = θ [i] −θ [i−1]” (note that θ [0] is assumed to be zero). The control unit 53 holds the necessary values of θ [i] and Δθ in order to perform each process described later.

ステップS13に続くステップS14において、制御部53は、補正フラグを確認し、補正フラグがオンである場合にはステップS14からステップS20への遷移を発生させる一方で、補正フラグがオフである場合にはステップS14からステップS15への遷移を発生させる。ステップS15において、制御部53は、基準角度θREFが0°であるか否かを確認し、基準角度θREFが0°でない場合にはステップS30の回転処理を行ってからステップS16への遷移を発生させ、基準角度θREFが0°である場合にはステップS16への直接遷移を発生させる。図15の動作開始直後では補正フラグがオフであって且つ基準角度θREFが0°であるため、ステップS14及びS15を経由して、ステップS30を経由することなくステップS16に至る(ステップS30の回転処理については後述)。 In step S14 following step S13, the control unit 53 checks the correction flag, and when the correction flag is on, causes the transition from step S14 to step S20 while the correction flag is off. Causes a transition from step S14 to step S15. In step S15, the control unit 53 transitions from the reference angle theta REF confirms whether or not 0 °, if the reference angle theta REF is not 0 ° by performing the rotation processing in step S30 to step S16 When the reference angle θ REF is 0 °, a direct transition to step S16 is generated. Immediately after the start of the operation in FIG. 15, since the correction flag is off and the reference angle θ REF is 0 °, the process goes through steps S14 and S15 to step S16 without going through step S30 (in step S30). The rotation process will be described later).

ステップS16において、制御部53は、評価期間中に得られた複数のカメラ傾き角度θに基づきカメラ傾き状態が安定しているか否かを判定し、カメラ傾き状態が安定していると判定した場合には、ステップS17で基準角度θREFを設定又は更新し且つステップS18で補正フラグをオンに設定してからステップS26への遷移を発生させる。一方、カメラ傾き状態が安定していないと判定した場合、制御部53は、ステップS16からステップS26への直接遷移を発生させる。上記評価期間は、ステップS16の判定を行う時刻である現在時刻tiと、現在時刻tiよりも所定時間前の時刻ti-mとの間の期間である(mは1以上の整数)。評価期間の長さは、例えば1〜3秒である。後述の説明からも明らかとなるが、カメラ傾き角度θの検出(ステップS12)はフレームごとに行われるため、評価期間中には、計(m+1)個のカメラ傾き角度θ[i−m]〜θ[i]が検出され、角度θ[i−m]〜θ[i]に基づく計m個の傾き変化量Δθが算出される。 In step S16, the control unit 53 determines whether the camera tilt state is stable based on the plurality of camera tilt angles θ obtained during the evaluation period, and determines that the camera tilt state is stable. In step S17, the reference angle θ REF is set or updated, and the correction flag is turned on in step S18, and then the transition to step S26 occurs. On the other hand, if it is determined that the camera tilt state is not stable, the control unit 53 causes a direct transition from step S16 to step S26. The evaluation period is a period between the current time t i that is the time for the determination in step S16 and the time t im that is a predetermined time before the current time t i (m is an integer of 1 or more). The length of the evaluation period is, for example, 1 to 3 seconds. As will be apparent from the following description, since the detection of the camera tilt angle θ (step S12) is performed for each frame, a total of (m + 1) camera tilt angles θ [i−m] ˜ θ [i] is detected, and a total of m inclination change amounts Δθ based on the angles θ [i−m] to θ [i] are calculated.

例えば、制御部53は、評価期間中に算出された各傾き変化量Δθの絶対値が全て所定値(例えば1°)以下である場合にカメラ傾き状態が安定していると判定し、そうでない場合にカメラ傾き状態が安定していないと判定する。この際、評価期間中に取得された各傾き変化量Δθの絶対値が全て所定値以下であったとしても、評価期間中においてカメラ傾き角度θが同一方向に変化している場合には(即ち、継続的に増加又は減少している場合には)、例外的にカメラ傾き状態が安定していないと判定しても良い。
或いは例えば、制御部53は、評価期間中に得られたカメラ傾き角度θ[i−m]〜θ[i]の分散が所定値以下である場合にカメラ傾き状態が安定していると判定し、そうでない場合にカメラ傾き状態が安定していないと判定しても良い。
For example, the control unit 53 determines that the camera tilt state is stable when the absolute values of the respective tilt change amounts Δθ calculated during the evaluation period are all equal to or less than a predetermined value (for example, 1 °), and is not so. In this case, it is determined that the camera tilt state is not stable. At this time, even if the absolute values of the respective inclination change amounts Δθ acquired during the evaluation period are all equal to or less than a predetermined value, the camera inclination angle θ changes in the same direction during the evaluation period (ie, In the case of continuous increase or decrease), it may be determined that the camera tilt state is exceptionally not stable.
Alternatively, for example, the control unit 53 determines that the camera tilt state is stable when the variance of the camera tilt angles θ [im] to θ [i] obtained during the evaluation period is equal to or less than a predetermined value. Otherwise, it may be determined that the camera tilt state is not stable.

ステップS17では、上記評価期間中に検出されたカメラ傾き角度θの平均角度(即ち、θ[i−m]〜θ[i]の平均角度)を基準角度θREFに設定する。カメラ傾き状態が安定している場合(例えば、Δθが一定期間微小である場合)、その時のカメラ傾きで撮影構図を定めようとする撮影者の意図が推測されるため、その時点のカメラ傾き角度を元に補正目標とも言うべき基準角度θREFを設定し(ステップS17)、補正フラグをオンにする(ステップS18)。 In step S17, the average angle of the camera tilt angle θ detected during the evaluation period (that is, the average angle of θ [i−m] to θ [i]) is set as the reference angle θ REF . When the camera tilt state is stable (for example, when Δθ is very small for a certain period), the photographer's intention to determine the shooting composition is estimated based on the camera tilt at that time. A reference angle θ REF to be called a correction target is set based on (step S17), and a correction flag is turned on (step S18).

ステップS26では、出力画像IBが表示画面13に表示される。補正フラグがオフとなっていて且つ基準角度θREFがゼロである状態では、ステップS20の傾き補正もステップS30の回転処理も成されていない状態の入力画像IAが、そのまま出力画像IBとして表示画面13に表示される。ステップS26に続くステップS27では、カメラ1の動作モードが撮影モードに維持されているか否かが確認され、カメラ1の動作モードが撮影モードに維持されている場合にはステップS28にて変数iに1を加えてからステップS12に戻る。ステップS12から始まってステップS28に至るまでの処理がフレーム周期ごとに繰り返し実行される。カメラ1の動作モードが撮影モード以外のモード(再生モード等)に変更された場合やカメラ1の電源がオフされた場合には、図15の動作を終了する(ステップS27のN)。 In step S26, the output image IB is displayed on the display screen 13. In a state where the correction flag is off and the reference angle θ REF is zero, the input image IA in a state where neither the tilt correction in step S20 nor the rotation processing in step S30 is performed is displayed as the output image IB as it is. 13 is displayed. In step S27 following step S26, it is confirmed whether or not the operation mode of the camera 1 is maintained in the shooting mode. If the operation mode of the camera 1 is maintained in the shooting mode, the variable i is set in step S28. After adding 1, the process returns to step S12. The process from step S12 to step S28 is repeatedly executed for each frame period. When the operation mode of the camera 1 is changed to a mode other than the shooting mode (reproduction mode or the like) or when the power of the camera 1 is turned off, the operation of FIG. 15 is terminated (N in step S27).

ステップS17及びS18にて基準角度θREFが設定され且つ補正フラグがオンに設定された後には、ステップS14からステップS20への遷移が発生する。ステップS20において、傾き補正部52は、“θ[i]−θREF”を補正量に設定した上述の傾き補正を行う。ステップS20の傾き補正は、図13(a)及び(b)を参照して説明したIS回転処理による傾き補正でも良いし、図14(a)及び(b)を参照して説明した画像回転処理による傾き補正でも良い。図13(a)、(b)、図14(a)及び(b)並びにそれらの図の説明文における“θ”を“θ[i]”に読み替えた傾き補正がステップS20にて実行される。 After the reference angle θ REF is set and the correction flag is turned on in steps S17 and S18, a transition from step S14 to step S20 occurs. In step S <b> 20, the inclination correction unit 52 performs the above-described inclination correction in which “θ [i] −θ REF ” is set as the correction amount. The tilt correction in step S20 may be tilt correction by IS rotation processing described with reference to FIGS. 13A and 13B, or image rotation processing described with reference to FIGS. 14A and 14B. Tilt correction by means of In step S20, inclination correction is performed by replacing "θ" with "θ [i]" in FIGS. 13A, 13B, 14A, 14B, and the explanatory texts of those drawings. .

ステップS20の傾き補正の後、ステップS21等を経由してステップS26に至った場合、ステップS26では、傾き補正を経て得られた出力画像IBが表示画面13に表示される。即ち例えば、(θ[i],θREF)=(25°,0°)なら図13(a)の画像351又は図14(a)の画像362が出力画像IBとして生成されて表示画面13に表示され、(θ[i],θREF)=(25°,15°)なら図13(b)の画像352又は図14(b)の画像363が出力画像IBとして生成されて表示画面13に表示される。 After step S20, the output image IB obtained through the tilt correction is displayed on the display screen 13 when step S26 is reached via step S21 or the like. That is, for example, if (θ [i], θ REF ) = (25 °, 0 °), the image 351 in FIG. 13A or the image 362 in FIG. 14A is generated as the output image IB on the display screen 13. If (θ [i], θ REF ) = (25 °, 15 °), the image 352 in FIG. 13B or the image 363 in FIG. 14B is generated as the output image IB and displayed on the display screen 13. Is displayed.

ステップS20からステップS26に至る過程においては、ステップS21及びS22の分岐判定が介在する。即ちステップS20の後、ステップS21において、制御部53は、現在のカメラ傾き角度θ[i]の大きさである絶対値|θ[i]|を所定の正の判定角度θTHと比較し(例えば、θTH=30°)、|θ[i]|がθTHよりも大きい場合にはステップS23への遷移を発生させて、ステップS23及びS25にて基準角度θREFに0°を設定し且つ補正フラグをオフにしてからステップS26への遷移を発生させる。|θ[i]|がθTH以下である場合には、ステップS21からステップS22への遷移が発生する。 In the process from step S20 to step S26, branch determination of steps S21 and S22 is involved. That is, after step S20, in step S21, the control unit 53 compares the absolute value | θ [i] |, which is the magnitude of the current camera tilt angle θ [i], with a predetermined positive determination angle θ TH ( For example, when θ TH = 30 °) and | θ [i] | are larger than θ TH , a transition to step S23 is generated, and 0 ° is set to the reference angle θ REF in steps S23 and S25. Further, after the correction flag is turned off, a transition to step S26 is generated. When | θ [i] | is equal to or smaller than θTH, a transition from step S21 to step S22 occurs.

ステップS22において、制御部53は、一定期間中の傾き変化方向が同じであるか否かを判定する。制御部53は、一定期間中の傾き変化方向が同じである場合には、ステップS24への遷移を発生させて、ステップS24及びS25にて基準角度θREFを更新し且つ補正フラグをオフにしてからステップS26への遷移を発生させる。一定期間中の傾き変化方向が同じでないと判定された場合にはステップS22からステップS26への直接遷移が発生する。 In step S <b> 22, the control unit 53 determines whether or not the inclination change direction during a certain period is the same. When the inclination change direction during a certain period is the same, the control unit 53 generates a transition to step S24, updates the reference angle θ REF in steps S24 and S25, and turns off the correction flag. The transition from step S26 to step S26 is generated. If it is determined that the inclination change directions during a certain period are not the same, a direct transition from step S22 to step S26 occurs.

制御部53は、ステップS22において、ステップS22の判定を行う時刻である現在時刻tiと、現在時刻tiよりも所定時間前の時刻ti-mとの間の期間である判定期間を設定し、判定期間中における計(m+1)個のカメラ傾き角度θ[i−m]〜θ[i]に基づきステップS22の判定を行う。判定期間の長さは、例えば1〜3秒である。制御部53は、例えば、判定期間中の角度θ[i−m]〜θ[i]に基づく計m個の傾き変化量Δθが同じ極性を持っている場合(即ち、時系列上で同一方向に連続的に変化する複数のカメラ傾き角度θが検出された場合)に、一定期間中の傾き変化方向が同じであると判定し、そうでない場合に一定期間中の傾き変化方向が同じでないと判定する。 In step S22, the control unit 53 sets a determination period that is a period between the current time t i that is the time when the determination of step S22 is performed and the time t im that is a predetermined time before the current time t i . The determination in step S22 is performed based on a total of (m + 1) camera tilt angles θ [i−m] to θ [i] during the determination period. The length of the determination period is, for example, 1 to 3 seconds. The control unit 53, for example, when a total of m inclination change amounts Δθ based on the angles θ [i−m] to θ [i] during the determination period have the same polarity (that is, in the same direction on the time series) When a plurality of camera tilt angles θ that continuously change are detected), it is determined that the tilt change direction during a certain period is the same, and otherwise, the tilt change direction during the certain period is not the same. judge.

時刻tiにおいて一定期間中の傾き変化方向が同じであると判定した場合、制御部53は、ステップS24にて、判定期間中の複数のカメラ検出角度θに基づき、又は、判定期間中の複数のカメラ検出角度θの何れかに基づき、基準角度θREFを設定及び更新する。具体的には、判定期間中に角度θ[i−m]〜θ[i]が得られている場合、時刻tiでのステップS24において、最新の傾き検出角度θであるθ[i]にて基準角度θREFを更新する、又は、角度θ[i−m]〜θ[i]から時刻tiより後の時刻でのカメラ傾き角度θを推定し、推定角度にて基準角度θREFを更新する。 If it is determined at time t i that the tilt change directions during the certain period are the same, the control unit 53 determines, at step S24, based on the plurality of camera detection angles θ during the determination period, or a plurality during the determination period. The reference angle θ REF is set and updated based on one of the camera detection angles θ. Specifically, when the angles θ [im] to θ [i] are obtained during the determination period, in step S24 at time t i , the latest inclination detection angle θ is set to θ [i]. Update the reference angle θ REF or estimate the camera tilt angle θ at a time later than the time t i from the angles θ [i−m] to θ [i], and set the reference angle θ REF as the estimated angle. Update.

ステップS24では基本的に0°でない角度が基準角度θREFに設定されるため、ステップS24及びS25を経由してステップS28に至った場合、次のフレームではステップS14からステップS15を介してステップS30に至る。ステップS30において、制御部53は傾き補正部52にθREFの回転処理を行わせる。θREFの回転処理を第2傾き補正とも呼ぶ。補正フラグがオンの時に実行される上述の傾き補正では、現在のカメラ傾き角度θ[i]に基づきロール方向のカメラ1の傾き変化がフレーム間で逐次補正されるが、ステップS20の回転処理(第2傾き補正)では、現在のカメラ傾き角度θ[i]に依存することなく、ロール方向のカメラ1の傾きによる出力画像IBの傾きの角度が基準角度θREFだけ一律に補正される。 In step S24, basically, an angle other than 0 ° is set as the reference angle θ REF , so when step S28 is reached via steps S24 and S25, step S30 is passed through step S15 in step S14 in the next frame. To. In step S <b> 30, the control unit 53 causes the tilt correction unit 52 to perform θ REF rotation processing. The rotation process of θ REF is also called second inclination correction. In the tilt correction executed when the correction flag is on, the tilt change of the camera 1 in the roll direction is sequentially corrected between frames based on the current camera tilt angle θ [i]. In the second tilt correction), the tilt angle of the output image IB due to the tilt of the camera 1 in the roll direction is uniformly corrected by the reference angle θ REF without depending on the current camera tilt angle θ [i].

第2傾き補正もIS回転処理又は画像回転処理にて実現される。第2傾き補正がIS回転処理にて実現される場合、“φ=θREF”となるように、補正量θREFだけ撮像素子33をIS回転ゼロ状態から回転させる。IS回転処理によって第2傾き補正を実現する場合、入力画像IAがそのまま出力画像IBとして生成される。画像回転処理によって第2傾き補正を実現する場合、出力画像生成部50は、IS回転角度φを0°にした状態で得た入力画像IAに切り出し枠CFを設定し、切り出し枠CF内の画像を補正量θREFだけ回転させる幾何学的変換を実行することで出力画像IBを生成する。この際、傾き補正部52は、角度θREFに基づき、出力画像生成部50における切り出し枠CFの設定及び切り出し動作を制御する。ステップS30の第2傾き補正の後は、ステップS16への遷移が発生する。 The second tilt correction is also realized by IS rotation processing or image rotation processing. When the second tilt correction is realized by the IS rotation process, the image sensor 33 is rotated from the IS rotation zero state by the correction amount θ REF so that “φ = θ REF ”. When the second tilt correction is realized by the IS rotation process, the input image IA is generated as it is as the output image IB. When the second tilt correction is realized by the image rotation process, the output image generation unit 50 sets the cutout frame CF to the input image IA obtained with the IS rotation angle φ set to 0 °, and the image in the cutout frame CF The output image IB is generated by performing geometric transformation that rotates the image by the correction amount θ REF . At this time, the inclination correction unit 52 controls the setting of the cutout frame CF and the cutout operation in the output image generation unit 50 based on the angle θ REF . After the second inclination correction in step S30, a transition to step S16 occurs.

以下、図15の動作を幾つかのケースに当てはめて考える。   Hereinafter, the operation of FIG. 15 will be applied to several cases.

[第1ケース]
図16に対応する第1ケースを説明する。図16に示す如く、撮影モードの起動後、撮影者が被写体を斜めに撮影しようとして、θ=10°となるようにカメラ1をロール方向に傾け、その傾き状態が安定していると、基準角度θREFに10°が設定された上で補正フラグがオンされ(ステップS17及びS18)、以後、θREF=10°を目標にした傾き補正(ステップS20)が行われる。つまり、以後においてカメラ傾き角度θが10°からずれても、θ=10°(θREF)を維持した状態で撮影を行ったかのような画像が出力画像IBとして得られ続ける。
[First case]
A first case corresponding to FIG. 16 will be described. As shown in FIG. 16, after the shooting mode is started, the photographer tries to shoot the subject obliquely, and the camera 1 is tilted in the roll direction so that θ = 10 °, and the tilt state is stable. After the angle θ REF is set to 10 °, the correction flag is turned on (steps S17 and S18), and thereafter, inclination correction (step S20) is performed with θ REF = 10 ° as a target. That is, after that, even if the camera tilt angle θ deviates from 10 °, an image as if the image was taken while maintaining θ = 10 ° (θ REF ) is continuously obtained as the output image IB.

θ=10°でロール方向の傾き状態が安定しているとき、その傾きを持った構図で被写体撮影を行おうとする意図を撮影者が有していると推測され、このような場合には、水平基準線HLを常に画像の水平方向に一致させる補正(従来の傾き補正)よりも、θREF=10°を目標にして傾き補正を行った方が撮影者の意図に沿うと考えられる。 When the tilt state in the roll direction is stable at θ = 10 °, it is assumed that the photographer has an intention to shoot the subject with a composition having the tilt. In such a case, It is considered that it is more in line with the photographer's intention to perform the tilt correction with θ REF = 10 ° as a target than the correction (conventional tilt correction) in which the horizontal reference line HL always matches the horizontal direction of the image.

[第2ケース]
図17に対応する第2ケースを説明する。第2ケースでは、図17に示す如く、撮影モードの起動後、第1期間中において撮影者が角度θを所望角度(例えば0°)に維持した結果、当該所望角度を基準角度θREFに設定した傾き補正が開始される(ステップS17、S18及びS20)。その後、第2期間においてカメラ1が右方向(撮影者から見て時計周り方向)に大きく傾けられて“|θ[i]|>θTH”が成立したとする。そうすると、ステップS25にて補正フラグがオフとされて傾き補正の実行は停止される。
[Second case]
A second case corresponding to FIG. 17 will be described. In the second case, as shown in FIG. 17, as a result of the photographer maintaining the angle θ at a desired angle (for example, 0 °) during the first period after activation of the photographing mode, the desired angle is set to the reference angle θ REF . The tilt correction is started (steps S17, S18 and S20). Thereafter, in the second period, it is assumed that the camera 1 is greatly tilted to the right (clockwise as viewed from the photographer) and “| θ [i] |> θ TH ” is established. Then, in step S25, the correction flag is turned off and the execution of the inclination correction is stopped.

比較的小さなカメラ傾き角度θは撮影者が意図しない傾きである可能性が高いため、傾き補正によって打ち消されることが有益である。しかし、θTHを超えるような比較的大きなカメラ傾き角度θが検出される状態は、撮影者が明確な意図を持ってカメラ1をロール方向に傾けた状態に相当する、と推測できる。故に、このような状態が観測された場合には、傾き補正の実行を停止することが撮影者の意図に沿うと考えられる。 Since a relatively small camera tilt angle θ is likely to be an unintended tilt by the photographer, it is beneficial to cancel it by tilt correction. However, it can be inferred that a state in which a relatively large camera tilt angle θ exceeding θ TH is detected corresponds to a state in which the photographer tilts the camera 1 in the roll direction with a clear intention. Therefore, when such a state is observed, it is considered that stopping the execution of the inclination correction is in line with the photographer's intention.

尚、制御部53は、傾き補正の実行停止後の第3期間中の複数のカメラ傾き角度θに基づきカメラ1の傾き状態が再び安定したと判定すると(ステップS16のY;再安定の様子は図17に示さず)、第3期間中の複数のカメラ傾き角度θに基づき基準角度θREFを再設定して(ステップS17)、ステップS20の傾き補正を再開する。 When the control unit 53 determines that the tilt state of the camera 1 is stabilized again based on the plurality of camera tilt angles θ during the third period after the tilt correction execution is stopped (Y in step S16; 17), the reference angle θ REF is reset based on the plurality of camera tilt angles θ during the third period (step S17), and the tilt correction in step S20 is resumed.

[第3ケース]
図18に対応する第3ケースを説明する。第3ケースでは、図18に示す如く、撮影モードの起動後、第1期間中において撮影者が角度θを所望角度(例えば0°)に維持した結果、当該所望角度を基準角度θREFに設定した傾き補正が開始される(ステップS17、S18及びS20)。その後、第2期間においてカメラ1が右方向(撮影者から見て時計周り方向)に継続的に傾けられた結果、図15のステップS22からステップS24への遷移が発生したとする。そうすると、制御部53は、第2期間中に得られた複数のカメラ傾き角度θの全部又は一部に応じた角度(典型的には最新のカメラ傾き角度θ)にて基準角度θREFを更新すると共に補正フラグをオフとすることで(ステップS24及びS25)、ステップS20の傾き補正の実行を停止する。
[Third case]
A third case corresponding to FIG. 18 will be described. In the third case, as shown in FIG. 18, as a result of the photographer maintaining the angle θ at a desired angle (for example, 0 °) during the first period after the shooting mode is started, the desired angle is set to the reference angle θ REF . The tilt correction is started (steps S17, S18 and S20). Thereafter, it is assumed that the transition from step S22 to step S24 in FIG. 15 occurs as a result of the camera 1 being continuously tilted to the right (clockwise as viewed from the photographer) in the second period. Then, the control unit 53 updates the reference angle θ REF with an angle (typically the latest camera tilt angle θ) corresponding to all or part of the plurality of camera tilt angles θ obtained during the second period. At the same time, by turning off the correction flag (steps S24 and S25), the execution of the inclination correction in step S20 is stopped.

この場合、その後の第3期間において、制御部53は傾き補正部52にステップS30の第2傾き補正を実行させる。制御部53は、第3期間中の複数のカメラ傾き角度θに基づきカメラ1の傾き状態が再び安定したと判定すると(ステップS16のY;再安定の様子は図18に示さず)、第3期間中の複数のカメラ傾き角度θに基づき基準角度θREFを再設定して(ステップS17)、ステップS30の第2傾き補正の代わりにステップS20の傾き補正を再開する。 In this case, in the subsequent third period, the control unit 53 causes the tilt correction unit 52 to execute the second tilt correction in step S30. If the control unit 53 determines that the tilt state of the camera 1 is stabilized again based on the plurality of camera tilt angles θ during the third period (Y in step S16; the state of re-stable is not shown in FIG. 18), the third The reference angle θ REF is reset based on a plurality of camera tilt angles θ during the period (step S17), and the tilt correction in step S20 is resumed instead of the second tilt correction in step S30.

右へ左へと変動するロール方向の傾きは撮影者が意図しない傾きである可能性が高いため、傾き補正によって打ち消されることが有益である。しかし、同一方向への連続的な傾き変化が検出される状態は、撮影者が明確な意図を持ってカメラ1をロール方向に回転させている状態に相当する、と推測できる。故に、このような状態が観測された場合には、傾き補正の実行を停止することが撮影者の意図に沿うと考えられる。   Since it is highly possible that the inclination in the roll direction that fluctuates from right to left is an inclination that the photographer does not intend, it is beneficial to cancel the inclination by inclination correction. However, it can be presumed that the state in which the continuous tilt change in the same direction is detected corresponds to the state in which the photographer rotates the camera 1 in the roll direction with a clear intention. Therefore, when such a state is observed, it is considered that stopping the execution of the inclination correction is in line with the photographer's intention.

但し、このような場合において単に傾き補正を停止すると、カメラ1の傾き変化に追従しつつ表示画面13の水平方向を向いていた水平基準線HLが、傾き補正の停止と同時に表示画面13上で急激に回転するような作用が発生し、撮影者が違和感を覚えることがある。これを回避すべく、第3ケースにおいて傾き補正を停止した後には、代わりに第2傾き補正を実行開始して基準角度θREF分の回転補正を行う。しかしながら、ステップS24において基準角度θREFに常に0°が設定されるように図15の動作を変形することも可能である(この場合、第2傾き補正が実行されることは無い)。 However, if tilt correction is simply stopped in such a case, the horizontal reference line HL that faces the horizontal direction of the display screen 13 while following the tilt change of the camera 1 is displayed on the display screen 13 simultaneously with the stop of tilt correction. An action that rotates rapidly occurs, and the photographer may feel uncomfortable. In order to avoid this, after the inclination correction is stopped in the third case, the execution of the second inclination correction is started instead, and the rotation correction for the reference angle θ REF is performed. However, the operation of FIG. 15 can be modified so that the reference angle θ REF is always set to 0 ° in step S24 (in this case, the second inclination correction is not executed).

[応用技術]
上述のカメラ1の動作についての幾つかの応用技術を説明する。
[Applied technology]
Several application techniques regarding the operation of the camera 1 will be described.

制御部53は、ステップS17又はS24にて基準角度θREFを設定した後、カメラ傾き角度θの変化速度を監視し、カメラ傾き角度θの変化速度が所定速度を超えた場合(即ち単位時間当たりのθの変化量が所定量を超えた場合)、一旦設定した基準角度θREFを初期角度0°に戻すようにしても良い。カメラ1がロール方向に高速で回転されたとき、撮影者の望む撮影構図が変更された可能性が高く、その場合には、変更前の構図に対応する基準角度θREFをリセットして新たな構図に対応した基準角度θREFを再設定すべきである(その方が撮影者の意図に沿う)。 After setting the reference angle θ REF in step S17 or S24, the control unit 53 monitors the change rate of the camera tilt angle θ, and when the change rate of the camera tilt angle θ exceeds a predetermined speed (that is, per unit time). The reference angle θ REF once set may be returned to the initial angle 0 ° (when the change amount of θ exceeds a predetermined amount). When the camera 1 is rotated in the roll direction at high speed, there is a high possibility that the photographing composition desired by the photographer has been changed. In this case, the reference angle θ REF corresponding to the composition before the change is reset and a new one is set. The reference angle θ REF corresponding to the composition should be reset (in line with the photographer's intention).

制御部53は、ロール方向の動き以外のカメラ1の動きを検出する動き検出部(不図示)を更に備えていても良い。ロール方向の動き以外のカメラ1の動き(以下、対象動きという)には、例えば、カメラ1のヨー方向の動き(鉛直線を回転軸として光軸300を水平方向に回転させる動き)、カメラ1のピッチ方向の動き(水平線を回転軸として光軸300を垂直方向に回転させる動き)、及び、任意の方向(例えば光軸300の平行方向や直交方向)へカメラ1を平行移動させる並進動きが含まれる。動き検出部は、ジャイロセンサや撮像素子33の出力信号に基づき、公知の方法によって対象動きの向きや大きさを検出することができる。制御部53は、ステップS17又はS24にて基準角度θREFを設定した後、所定量を超える大きさを持った対象動きが検出された場合においても、一旦設定した基準角度θREFを初期角度0°に戻すようにしても良い。この場合にも、撮影者の望む撮影構図が変更された可能性が高いからである。 The control unit 53 may further include a motion detection unit (not shown) that detects the motion of the camera 1 other than the motion in the roll direction. The movement of the camera 1 other than the movement in the roll direction (hereinafter referred to as the target movement) includes, for example, a movement in the yaw direction of the camera 1 (a movement that rotates the optical axis 300 in the horizontal direction with the vertical line as the rotation axis), and the camera 1 Movement in the pitch direction (movement that rotates the optical axis 300 in the vertical direction with the horizontal line as the rotation axis) and translational movement that translates the camera 1 in an arbitrary direction (for example, a parallel direction or an orthogonal direction of the optical axis 300). included. The motion detection unit can detect the direction and magnitude of the target motion by a known method based on the output signal of the gyro sensor or the image sensor 33. After setting the reference angle θ REF in step S17 or S24, the control unit 53 sets the reference angle θ REF once set to the initial angle 0 even when a target motion having a magnitude exceeding a predetermined amount is detected. You may make it return to °. This is also because there is a high possibility that the photographing composition desired by the photographer has been changed.

主制御部12に内包される表示制御部(不図示)は、現在のカメラ傾き角度θ、及び、ステップS20の傾き補正又はステップS30の第2傾き補正が現在実行されているか否かを示す補正実行有無情報を、出力画像IBと共に、表示画面13に表示するようにしても良い。   A display control unit (not shown) included in the main control unit 12 corrects whether the current camera tilt angle θ and whether the tilt correction in step S20 or the second tilt correction in step S30 is currently being executed. Execution presence / absence information may be displayed on the display screen 13 together with the output image IB.

主制御部12に内包される記録制御部(不図示)は、図15の動作において順次得られる複数の出力画像IBを動画像として記録媒体14に記録することができ、この際、当該動画像の撮影期間中の各時刻におけるカメラ傾き角度θ、及び、当該動画像の撮影期間中の各時刻における補正実行有無情報を、当該動画像に関連付けて記録媒体14に記録しておいても良い(例えば、当該動画像の画像データを格納する画像ファイルのヘッダ領域にカメラ傾き角度θ及び補正実行有無情報を書き込んでおいても良い)。   A recording control unit (not shown) included in the main control unit 12 can record a plurality of output images IB sequentially obtained in the operation of FIG. 15 on the recording medium 14 as moving images. The camera tilt angle θ at each time during the shooting period and the correction execution information at each time during the shooting period of the moving image may be recorded on the recording medium 14 in association with the moving image ( For example, the camera tilt angle θ and correction execution presence / absence information may be written in the header area of the image file storing the image data of the moving image).

図15のステップS12におけるカメラ傾き角度θの検出及びステップS20における傾き補正は、各フレームの露光終了後に実施されても良いし、IS回転処理によって傾き補正を実現する場合にあっては各フレームの露光期間中に複数回実施されても良い。   The detection of the camera tilt angle θ in step S12 and the tilt correction in step S20 in FIG. 15 may be performed after the exposure of each frame is completed, or when the tilt correction is realized by IS rotation processing, each frame is detected. It may be performed a plurality of times during the exposure period.

本実施形態によれば、撮影者による特段の手動操作を必要とすることなく、撮影者の意図に沿う形で、傾き補正の実行有無を制御したり、補正目標とも言える基準角度θREFを設定したりすることが可能となる。 According to this embodiment, without requiring a special manual operation by the photographer, whether or not to perform tilt correction is controlled in accordance with the photographer's intention, or a reference angle θ REF that can be called a correction target is set. It becomes possible to do.

<<変形等>>
本発明の実施形態は、特許請求の範囲に示された技術的思想の範囲内において、適宜、種々の変更が可能である。以上の実施形態は、あくまでも、本発明の実施形態の例であって、本発明ないし各構成要件の用語の意義は、以上の実施形態に記載されたものに制限されるものではない。上述の説明文中に示した具体的な数値は、単なる例示であって、当然の如く、それらを様々な数値に変更することができる。上述の実施形態に適用可能な注釈事項として、以下に、注釈1及び注釈2を記す。各注釈に記載した内容は、矛盾なき限り、任意に組み合わせることが可能である。
<< Deformation, etc. >>
The embodiment of the present invention can be appropriately modified in various ways within the scope of the technical idea shown in the claims. The above embodiment is merely an example of the embodiment of the present invention, and the meaning of the term of the present invention or each constituent element is not limited to that described in the above embodiment. The specific numerical values shown in the above description are merely examples, and as a matter of course, they can be changed to various numerical values. As annotations applicable to the above-described embodiment, annotation 1 and annotation 2 are described below. The contents described in each comment can be arbitrarily combined as long as there is no contradiction.

[注釈1]
カメラ1は任意の電子機器に搭載されるものであっても良い。尚、カメラ1も電子機器の一種である。電子機器は、任意の情報の取得、再生又は加工等を行うことのできる任意の情報機器であり、例えば、デジタルカメラ、携帯電話機、情報端末、パーソナルコンピュータ、電子書籍リーダ、電子辞書、ゲーム機器又はナビゲーション装置である。
[Note 1]
The camera 1 may be mounted on an arbitrary electronic device. The camera 1 is also a kind of electronic device. The electronic device is an arbitrary information device that can acquire, reproduce, or process arbitrary information. For example, a digital camera, a mobile phone, an information terminal, a personal computer, an electronic book reader, an electronic dictionary, a game device, It is a navigation device.

[注釈2]
カメラ1を、ハードウェア、或いは、ハードウェアとソフトウェアの組み合わせによって構成することができる。カメラ1にて実現される機能の全部又は一部である任意の特定の機能をプログラムとして記述して、該プログラムをカメラ1に搭載可能なフラッシュメモリに保存しておき、該プログラムをプログラム実行装置(例えば、カメラ1に搭載可能なマイクロコンピュータ)上で実行することによって、その特定の機能を実現するようにしてもよい。上記プログラムは任意の記録媒体(不図示)に記憶及び固定されうる。上記プログラムを記憶及び固定する記録媒体(不図示)はカメラ1と異なる機器(サーバ機器等)に搭載又は接続されても良い。
[Note 2]
The camera 1 can be configured by hardware or a combination of hardware and software. Arbitrary specific functions that are all or part of the functions realized by the camera 1 are described as a program, the program is stored in a flash memory that can be mounted on the camera 1, and the program is executed by a program execution device. The specific function may be realized by executing on the microcomputer (for example, a microcomputer that can be mounted on the camera 1). The program can be stored and fixed in an arbitrary recording medium (not shown). A recording medium (not shown) for storing and fixing the program may be mounted or connected to a device (such as a server device) different from the camera 1.

1 カメラ
11 撮像部
13 表示画面
33 撮像素子
51 傾き検出部
52 傾き補正部
53 傾き補正制御部
300 光軸
IA 入力画像
IB 出力画像
HL 水平基準線
θ カメラ傾き角度
θREF 基準角度
DESCRIPTION OF SYMBOLS 1 Camera 11 Imaging part 13 Display screen 33 Image sensor 51 Inclination detection part 52 Inclination correction part 53 Inclination correction control part 300 Optical axis IA Input image IB Output image HL Horizontal reference line θ Camera inclination angle θ REF reference angle

Claims (8)

光学系及び前記光学系を介して結像される光学像の信号を出力する撮像素子を有する撮像部を備え、前記撮像素子の出力信号から出力画像を取得するカメラにおいて、
前記光学系の光軸周りのカメラ傾き角度を検出する傾き検出部と、
前記カメラ傾き角度に基づき、当該カメラの傾きによる前記出力画像の傾きの角度を基準角度に補正する傾き補正を実行可能な傾き補正部と、
前記カメラ傾き角度の大きさ又は複数の時刻における複数のカメラ傾き角度に基づき、前記傾き補正の実行有無の制御又は前記基準角度の設定を行う傾き補正制御部と、を更に備えた
ことを特徴とするカメラ。
In a camera that includes an imaging unit having an optical system and an image sensor that outputs a signal of an optical image formed through the optical system, and acquires an output image from an output signal of the image sensor,
An inclination detection unit for detecting a camera inclination angle around the optical axis of the optical system;
An inclination correction unit capable of executing inclination correction for correcting the angle of inclination of the output image due to the inclination of the camera to a reference angle based on the camera inclination angle;
A tilt correction control unit configured to control whether to perform tilt correction or to set the reference angle based on the size of the camera tilt angle or a plurality of camera tilt angles at a plurality of times. Camera.
前記傾き補正制御部は、前記傾き補正の実行中において所定閾値より大きな大きさを持つ前記カメラ傾き角度が検出されたとき、前記傾き補正の実行を停止させる
ことを特徴とする請求項1に記載のカメラ。
The tilt correction control unit stops the tilt correction execution when the camera tilt angle having a magnitude larger than a predetermined threshold is detected during the tilt correction. Camera.
前記傾き補正制御部は、第1期間中の複数のカメラ傾き角度に基づき前記基準角度を設定して前記傾き補正の実行を開始した後、第2期間において前記所定閾値より大きな大きさを持つ前記カメラ傾き角度が検出されたとき、前記傾き補正の実行を停止させる
ことを特徴とする請求項2に記載のカメラ。
The tilt correction control unit sets the reference angle based on a plurality of camera tilt angles during a first period and starts executing the tilt correction, and then has a magnitude greater than the predetermined threshold in a second period. The camera according to claim 2, wherein execution of the tilt correction is stopped when a camera tilt angle is detected.
前記傾き補正制御部は、前記傾き補正の実行中において時系列上で同一方向に連続的に変化する複数のカメラ傾き角度が検出されたとき、前記傾き補正の実行を停止させる
ことを特徴とする請求項1〜請求項3の何れかに記載のカメラ。
The tilt correction control unit stops execution of the tilt correction when a plurality of camera tilt angles continuously changing in the same direction on a time series are detected during the tilt correction. The camera according to claim 1.
前記傾き補正制御部は、第1期間中の複数のカメラ傾き角度に基づき前記基準角度を設定して前記傾き補正の実行を開始した後、第2期間において時系列上で同一方向に連続的に変化する複数のカメラ傾き角度が検出されたとき、前記傾き補正の実行を停止させる
ことを特徴とする請求項4に記載のカメラ。
The tilt correction control unit sets the reference angle based on a plurality of camera tilt angles during the first period and starts executing the tilt correction, and then continuously in the same direction in time series in the second period. The camera according to claim 4, wherein execution of the tilt correction is stopped when a plurality of changing camera tilt angles are detected.
前記傾き補正制御部は、前記傾き補正の実行前に得られた複数のカメラ傾き角度に基づき、前記光軸周りにおける当該カメラの傾き状態の安定有無を判定し、当該傾き状態が安定している場合、前記傾き補正の実行前に得られた複数のカメラ傾き角度に基づき前記基準角度を設定して前記傾き補正を開始させる
ことを特徴とする請求項1〜請求項5の何れかに記載のカメラ。
The tilt correction control unit determines whether the tilt state of the camera around the optical axis is stable based on a plurality of camera tilt angles obtained before the tilt correction is performed, and the tilt state is stable. 6. The tilt correction is started by setting the reference angle based on a plurality of camera tilt angles obtained before execution of the tilt correction. camera.
前記傾き補正部は、前記傾き補正において、
前記カメラ傾き角度に基づき、前記撮像素子を前記光軸周りで回転させて前記撮像素子の出力信号から前記出力画像を生成する、又は、前記カメラ傾き角度に基づき、前記撮像素子の出力信号による入力画像に画像回転処理を含む画像処理を施すことで前記出力画像を生成する
ことを特徴とする請求項1〜請求項6の何れかに記載のカメラ。
In the inclination correction, the inclination correction unit,
Based on the camera tilt angle, the image sensor is rotated around the optical axis to generate the output image from the output signal of the image sensor, or based on the camera tilt angle, input by the output signal of the image sensor The camera according to claim 1, wherein the output image is generated by performing image processing including image rotation processing on the image.
前記傾き補正制御部は、前記カメラ傾き角度の変化速度、又は、前記傾き以外の前記カメラの動きに応じて、一旦設定した前記基準角度を所定の初期角度に戻す
ことを特徴とする請求項1〜請求項7の何れかに記載のカメラ。
The tilt correction control unit returns the reference angle once set to a predetermined initial angle according to a change speed of the camera tilt angle or a movement of the camera other than the tilt. The camera according to claim 7.
JP2012251953A 2012-11-16 2012-11-16 Camera Pending JP2014099832A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012251953A JP2014099832A (en) 2012-11-16 2012-11-16 Camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012251953A JP2014099832A (en) 2012-11-16 2012-11-16 Camera

Publications (1)

Publication Number Publication Date
JP2014099832A true JP2014099832A (en) 2014-05-29

Family

ID=50941482

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012251953A Pending JP2014099832A (en) 2012-11-16 2012-11-16 Camera

Country Status (1)

Country Link
JP (1) JP2014099832A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016126164A (en) * 2014-12-27 2016-07-11 オリンパス株式会社 Imaging device and imaging method
KR101699202B1 (en) * 2016-01-19 2017-01-23 라인 가부시키가이샤 Method and system for recommending optimum position of photographing
KR101792720B1 (en) * 2014-11-14 2017-11-02 엘지전자 주식회사 Mobile terminal and method for controlling the same
JP7066905B1 (en) 2021-09-06 2022-05-13 Dmg森精機株式会社 Information processing equipment and machine tools
WO2023032876A1 (en) * 2021-09-06 2023-03-09 Dmg森精機株式会社 Information processing device, and machine tool
JP2023038151A (en) * 2021-09-06 2023-03-16 Dmg森精機株式会社 Information processing device, and machine tool
US11863862B2 (en) 2018-07-17 2024-01-02 Interdigital Ce Patent Holdings, Sas Device and method for image display

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101792720B1 (en) * 2014-11-14 2017-11-02 엘지전자 주식회사 Mobile terminal and method for controlling the same
JP2016126164A (en) * 2014-12-27 2016-07-11 オリンパス株式会社 Imaging device and imaging method
KR101699202B1 (en) * 2016-01-19 2017-01-23 라인 가부시키가이샤 Method and system for recommending optimum position of photographing
US11863862B2 (en) 2018-07-17 2024-01-02 Interdigital Ce Patent Holdings, Sas Device and method for image display
JP7066905B1 (en) 2021-09-06 2022-05-13 Dmg森精機株式会社 Information processing equipment and machine tools
WO2023032662A1 (en) * 2021-09-06 2023-03-09 Dmg森精機株式会社 Iinformation processing device and machine tool
WO2023032876A1 (en) * 2021-09-06 2023-03-09 Dmg森精機株式会社 Information processing device, and machine tool
JP2023037692A (en) * 2021-09-06 2023-03-16 Dmg森精機株式会社 Information processing device and machine tool
JP2023038151A (en) * 2021-09-06 2023-03-16 Dmg森精機株式会社 Information processing device, and machine tool
JP7405899B2 (en) 2021-09-06 2023-12-26 Dmg森精機株式会社 Information processing equipment and machine tools

Similar Documents

Publication Publication Date Title
JP2014099832A (en) Camera
US9172856B2 (en) Folded imaging path camera
US7796871B2 (en) Apparatus and method for taking panoramic photograph
US9282242B2 (en) Method and electric device for taking panoramic photograph
US8373761B2 (en) Shake correcting apparatus and method thereof in digital photographing apparatus
JP6071545B2 (en) IMAGING DEVICE, IMAGE PROCESSING DEVICE AND ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
US10194085B2 (en) Image pickup apparatus and its control method
US9111129B2 (en) Subject detecting method and apparatus, and digital photographing apparatus
WO2013021728A1 (en) Imaging device and imaging method
JP2013070164A (en) Imaging device and imaging method
JP2007116309A (en) Image information reproduction apparatus
US9300875B2 (en) Imaging device display controller
JP2013138413A (en) Imaging apparatus
JP5914824B2 (en) Imaging device
JP2014074838A (en) Imaging device
JP2006332809A (en) Imaging apparatus
TW201536050A (en) Image-capturing method for correcting deviation-viewing angle, its computer program product, and image-capturing device for correcting deviation viewing angle
JP2016050973A (en) Image-capturing device and control method thereof
WO2017104102A1 (en) Imaging device
JP2007201570A (en) Image processor, photography apparatus, image processing method and control program
JP6289070B2 (en) Imaging apparatus and control method thereof
JP2015119299A (en) Imaging apparatus
US20210195119A1 (en) Image processing apparatus, image capturing apparatus and image processing method
JP2015008417A (en) Imaging apparatus
JP2008287704A (en) Face image detection device, face image detection method and photographing device