JP2014131177A - Image processing device, camera, image processing method, and image processing program - Google Patents
Image processing device, camera, image processing method, and image processing program Download PDFInfo
- Publication number
- JP2014131177A JP2014131177A JP2012287825A JP2012287825A JP2014131177A JP 2014131177 A JP2014131177 A JP 2014131177A JP 2012287825 A JP2012287825 A JP 2012287825A JP 2012287825 A JP2012287825 A JP 2012287825A JP 2014131177 A JP2014131177 A JP 2014131177A
- Authority
- JP
- Japan
- Prior art keywords
- image
- change amount
- image processing
- amount
- frame 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
Links
- 238000012545 processing Methods 0.000 title claims abstract description 31
- 238000003672 processing method Methods 0.000 title claims description 4
- 230000008859 change Effects 0.000 claims abstract description 90
- 238000005096 rolling process Methods 0.000 claims abstract description 64
- 238000012937 correction Methods 0.000 claims abstract description 30
- 238000004364 calculation method Methods 0.000 claims abstract description 16
- 230000009466 transformation Effects 0.000 claims description 38
- 238000000034 method Methods 0.000 claims description 23
- 230000008569 process Effects 0.000 claims description 16
- 238000003384 imaging method Methods 0.000 claims description 11
- 238000006073 displacement reaction Methods 0.000 claims description 5
- 238000003702 image correction Methods 0.000 description 14
- 238000013519 translation Methods 0.000 description 14
- 238000012986 modification Methods 0.000 description 8
- 230000004048 modification Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- CNQCVBJFEGMYDW-UHFFFAOYSA-N lawrencium atom Chemical compound [Lr] CNQCVBJFEGMYDW-UHFFFAOYSA-N 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Images
Abstract
Description
本発明は、画像処理装置、カメラ、画像処理方法、および画像処理プログラムに関する。 The present invention relates to an image processing device, a camera, an image processing method, and an image processing program.
6軸のアフィン変換モデルで2つの画像間の位置ずれ量を求め、この位置ずれ量を用いてこれら2つの画像間の位置合わせを行って、これら2つの画像を合成する画像処理装置が知られている(特許文献1参照)。 An image processing apparatus that obtains a positional deviation amount between two images using a six-axis affine transformation model, performs alignment between the two images using the positional deviation amount, and combines these two images is known. (See Patent Document 1).
上述した従来技術を、時間方向に連続する複数のフレーム画像において、撮影時の手振れによる位置ずれとローリングシャッタによる歪みとを補正するために用いる場合、アフィン変換モデルで用いる変数が6つと多いので、変数を算出する際の演算負荷が大きくなってしまうという問題があった。 When the above-described conventional technique is used to correct positional deviation due to camera shake during shooting and distortion due to a rolling shutter in a plurality of frame images continuous in the time direction, there are as many as six variables used in the affine transformation model. There has been a problem that the calculation load when calculating the variables becomes large.
(1)請求項1に記載の発明による画像処理装置は、撮像素子により撮像され、連続して取得される複数のフレーム画像において、フレーム画像ごとの変化量を、幾何変換モデルを用いて算出する変化量算出手段と、変化量算出手段により算出された変化量を用いて、フレーム画像を補正する補正手段と、を備え、前記変化量は、撮像素子のローリングシャッタによる歪みに関する情報を含むことを特徴とする。
(2)請求項6に記載の発明によるカメラは、撮像素子と、請求項1〜5のいずれか一項に記載の画像処理装置と、を備えることを特徴とする。
(3)請求項7に記載の発明による画像処理方法は、撮像素子により撮像され、連続して取得される複数のフレーム画像において、フレーム画像ごとの変化量を、幾何変換モデルを用いて算出する変化量算出工程と、変化量算出工程により算出された変化量を用いて、フレーム画像を補正する補正工程と、を有し、前記変化量は、撮像素子のローリングシャッタによる歪みに関する情報を含むことを特徴とする。
(4)請求項8に記載の発明による画像処理プログラムは、撮像素子により撮像され、連続して取得される複数のフレーム画像において、フレーム画像ごとの変化量を、幾何変換モデルを用いて算出する変化量算出処理と、変化量算出処理により算出された変化量を用いて、フレーム画像を補正する補正処理と、をコンピュータに実行させるための画像処理プログラムであって、前記変化量は、撮像素子のローリングシャッタによる歪みに関する情報を含むことを特徴とする。
(1) The image processing apparatus according to the first aspect of the present invention calculates, using a geometric transformation model, a change amount for each frame image in a plurality of frame images captured and continuously acquired by an image sensor. A change amount calculation unit; and a correction unit that corrects the frame image using the change amount calculated by the change amount calculation unit, wherein the change amount includes information on distortion caused by a rolling shutter of the image sensor. Features.
(2) A camera according to a sixth aspect of the invention includes an image pickup device and the image processing apparatus according to any one of the first to fifth aspects.
(3) In the image processing method according to the seventh aspect of the present invention, a change amount for each frame image is calculated using a geometric transformation model in a plurality of frame images captured and continuously acquired by the image sensor. A change amount calculating step, and a correction step of correcting the frame image using the change amount calculated by the change amount calculating step, wherein the change amount includes information on distortion caused by a rolling shutter of the image sensor. It is characterized by.
(4) An image processing program according to an eighth aspect of the present invention calculates, using a geometric transformation model, a change amount for each frame image in a plurality of frame images captured and continuously acquired by an image sensor. An image processing program for causing a computer to execute a change amount calculation process and a correction process for correcting a frame image using the change amount calculated by the change amount calculation process. It includes information on distortion caused by a rolling shutter.
本発明によれば、演算負荷を抑制しながら、フレーム画像の位置ずれとローリングシャッタによる歪みとを補正することができる。 According to the present invention, it is possible to correct misalignment of a frame image and distortion due to a rolling shutter while suppressing a calculation load.
以下、図面を参照して本発明を実施するための一実施の形態について説明する。図1は、本発明の実施形態による画像処理装置を搭載したカメラの構成例を示すブロック図である。カメラ100は、操作部材101と、撮像レンズ102と、撮像素子103と、制御装置104と、メモリカードスロット105と、モニタ106とを備えている。操作部材101は、使用者によって操作される種々の入力部材、例えば電源ボタン、レリーズボタン、録画ボタン、十字キー、決定ボタン、再生ボタン、削除ボタンなどを含んでいる。
Hereinafter, an embodiment for carrying out the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration example of a camera equipped with an image processing apparatus according to an embodiment of the present invention. The
撮像レンズ102は、被写体像を撮像素子103の撮像面に結像するように配置されている。撮像レンズ102は、図1では代表して1枚のレンズで表しているが、実際は複数の光学レンズから構成される。
The
撮像素子103は、行列状に多数配列された画素を有するX−Yアドレス型の光電変換素子(CMOSイメージセンサ)である。撮像素子103は、制御装置104の制御に応じて駆動して撮像レンズ102により結像される被写体像を撮像し、撮像して得た画像信号を制御装置104へ出力する。本実施の形態において、撮像素子103は、走査ライン(画素行)ごとに順次画像信号を読み出す方式(いわゆるローリングシャッタ方式)により駆動される。
The
制御装置104は、CPU、メモリ、およびその他の周辺回路により構成され、前記画像信号の処理に加え、カメラ100全体の制御を行う。なお、制御装置104を構成するメモリには、SDRAMやフラッシュメモリが含まれる。SDRAMは、揮発性のメモリであって、CPUがプログラム実行時にプログラムを展開するためのワークメモリとして使用されたり、データを一時的に記録するためのバッファメモリとして使用されたりする。また、フラッシュメモリは、不揮発性のメモリであって、制御装置104が実行するプログラムのデータや、プログラム実行時に読み込まれる種々のパラメータなどが記録されている。
The
メモリカードスロット105は、記憶媒体としてのメモリカードを挿入するためのスロットである。モニタ106は、カメラ100の背面に搭載された液晶モニタ(背面モニタ)である。
The
制御装置104は、カメラ100の電源スイッチが操作されると電源をオンして、撮像素子103から時系列で取得した画像を表示用に画像処理した表示用画像データ(スルー画)をモニタ106に表示させる。
When the power switch of the
制御装置104は、レリーズボタンが操作されて静止画像の撮影が指示されると、撮像素子103から入力された画像信号に対して所定の画像処理を行う。そして、画像処理後の画像データをJPEG形式などの圧縮画像データに圧縮し、その圧縮画像データを静止画像ファイルとしてメモリカードスロット105に挿入されたメモリカードに記憶させる。
When the release button is operated to instruct to take a still image, the
一方、制御装置104は、録画ボタンが操作されて動画像の撮影開始が指示されると、撮像素子103から出力された各フレームの画像信号に対して所定の画像処理を行う。そして、画像処理後の画像データをMPEG形式やMotionJPEGなどの圧縮画像データに圧縮し、その圧縮画像データをメモリカードスロット105に挿入されたメモリカードに記憶させる。
On the other hand, when the recording button is operated and the start of moving image shooting is instructed, the
そして、再度録画ボタンが操作されて動画像の撮影終了が指示されると、制御装置104は、動画像の撮影終了時点までの圧縮画像データをメモリカードに記憶させ、メモリカードに動画ファイルを完成させる。なお、動画像の撮影時、カメラ100は、1秒間に所定のフレーム数(たとえば、24〜60フレーム)の画像を撮影する。
When the recording button is operated again to instruct the end of moving image shooting, the
<画像補正処理>
本実施形態のカメラ100は、動画像に対して、撮影時の手振れによるフレーム画像間の位置ずれを補正すると共に、撮像素子103のローリングシャッタ方式に起因してフレーム画像に発生する歪み(以下、ローリングシャッタ歪み)を補正する画像補正処理を行う。図2は、制御装置104が実行する画像補正処理の流れを説明するフローチャートである。制御装置104は、操作部材101の操作により、メモリカードスロット105に挿入されたメモリカードに記録された動画像の中から画像補正処理を実行する動画像が選択されると、図2に例示する処理を実行するプログラムを起動する。
<Image correction processing>
The
ステップS1において制御装置104は、上記選択された動画像に対応する動画データの各フレーム画像を上記メモリカードから読み出して、ステップS2へ進む。なお、上記選択された動画像は、図3(A)に示すように、時間的に連続するn枚のフレーム画像(F1〜Fn)から構成されるものとする。
In step S1, the
ステップS2において制御装置104は、図3(B)に示すように、2〜n枚目の各フレーム画像(F2〜Fn)において、隣接する直前フレーム画像(F1〜Fn−1)からの変化量を、隣接変化量P(P2〜Pn)として算出する。すなわち、2枚目のフレーム画像F2においては1枚目のフレーム画像F1からの隣接変化量P2を算出し、3枚目のフレーム画像F3においては2枚目のフレーム画像F2からの隣接変化量P3を算出し、…、n枚目のフレーム画像Fnにおいてはn−1枚目のフレーム画像Fn−1からの隣接変化量Pnを算出する。
In step S2, the
隣接変化量Pは、式(1)に示す幾何変換モデル(アフィン変換モデル)を用いて算出される。式(1)は、画像の座標(x,y)を、アフィン変換によって座標(x’,y’)に変換する式である。
n枚目のフレーム画像Fnにおける座標(x’,y’)の画素値と、n−1枚目のフレーム画像Fn−1における座標(x,y)の画素値との差分が小さくなるような幾何変換係数p0〜p5が、これら2つのフレーム画像間における、平行移動、回転、変形、拡大/縮小の量を表している。本実施形態では、これらの幾何変換係数p0〜p5を、隣接変化量Pとして算出する。なお、これらの幾何変換係数p0〜p5については、後で詳しく説明する。 n-th coordinates in the frame image F n (x ', y' ) and the pixel value of the difference between the pixel value of coordinates (x, y) in the n-1 th frame image F n-1 is smaller Such geometric transformation coefficients p0 to p5 represent the amounts of translation, rotation, deformation, and enlargement / reduction between these two frame images. In the present embodiment, these geometric transformation coefficients p0 to p5 are calculated as the adjacent change amount P. Note that these geometric transformation coefficients p0 to p5 will be described in detail later.
ステップS3において制御装置104は、図3(C)に示すように、2〜n枚目の各フレーム画像(F2〜Fn)において、開始フレーム画像(1枚目のフレーム画像)F1からの変化量を基準変化量Q(Q2〜Qn)として算出する。すなわち、2枚目のフレーム画像F2においては開始フレーム画像F1からの基準変化量Q2を算出し、3枚目のフレーム画像F3においては開始フレーム画像F1からの基準変化量Q3を算出し、…、n枚目のフレーム画像Fnにおいては開始フレーム画像F1からの基準変化量Qnを算出する。この基準変化量Qは、式(1)において行列として表現された隣接変化量P(p0〜p5)を積算することにより算出される。具体的には、基準変化量Qは、Q2=P2、Q3=Q2×P3、Q4=Q3×P4、…、Qn=Qn−1×Pn、のように算出される。
Controller in
ステップS4において制御装置104は、2〜n枚目の各フレーム画像(F2〜Fn)において、基準変化量Q(Q2〜Qn)を用いて、開始フレーム画像からの変化(位置ずれおよびローリングシャッタ歪み)を補正する補正処理を行う。なお、基準変化量Qを用いた画像補正方法については、公知の方法を用いるものとする。その後、制御装置104は、補正後の動画データをメモリカードに記録して、図2の処理を終了する。
In step S <b> 4, the
<幾何変換モデル>
次に、上述した隣接変化量Pを算出するために用いる幾何変換モデルについて詳しく説明する。上記式(1)に示した幾何変換モデルにおいて、6つの幾何変換係数p0〜p5がそれぞれ変数である場合、6つの変数を算出する必要があり、演算量が多くなってしまう。これに対して、フレーム画像間の位置ずれ量(平行移動量と回転量)のみを表す幾何変換モデルであれば、式(2)に示すように、3つの変数a、b、θで表すことができる。すなわち、式(2)は、式(1)におけるp0をcosθ、p1を−sinθ、p2をsinθ、p3をcosθ、p4をa、p5をbと表した式である。なお、式(2)において、aはx方向(横方向)における平行移動量、bはy方向(縦方向)における平行移動量、θは回転量を表す変数である。
Next, the geometric transformation model used for calculating the above-described adjacent change amount P will be described in detail. In the geometric transformation model shown in the above equation (1), when the six geometric transformation coefficients p0 to p5 are variables, it is necessary to calculate six variables, which increases the amount of calculation. On the other hand, if it is a geometric transformation model that represents only the amount of displacement between the frame images (the amount of translation and the amount of rotation), it is represented by three variables a, b, and θ as shown in equation (2). Can do. In other words, the expression (2) is an expression in which p0 in the expression (1) is expressed as cos θ, p1 as −sin θ, p2 as sin θ, p3 as cos θ, p4 as a, and p5 as b. In Equation (2), a is a parallel movement amount in the x direction (lateral direction), b is a parallel movement amount in the y direction (vertical direction), and θ is a variable representing the rotation amount.
また、撮影時の手振れによるカメラ100の回転量は小さいと予測されることから、式(2)におけるθが微小であるとしてcosθ=1と近似することで、式(3)に示すように、式(2)をさらに簡略化することができる。すなわち、式(3)は、式(1)におけるp0を1、p1をc、p2を−c、p3を1、p4をa、p5をbと表した式である。なお、式(3)において、aはx方向(横方向)における平行移動量、bはy方向(縦方向)における平行移動量、cは回転量を表す変数である。
しかし、式(3)は、フレーム画像間の位置ずれ量(平行移動量および回転量)しか表すことができないので、フレーム間の位置ずれを補正することはできるが、ローリングシャッタ歪みを補正することはできない。そこで、本実施形態では、式(3)が示す幾何変換モデルをベースとして、変数を増やさずに(すなわち変数が3つのまま)、フレーム画像間の位置ずれの補正に加えローリングシャッタ歪みを補正する幾何変換モデルを提案する。 However, since Equation (3) can only represent the amount of misalignment between frame images (the amount of translation and the amount of rotation), the misalignment between frames can be corrected, but the rolling shutter distortion can be corrected. I can't. Therefore, in the present embodiment, based on the geometric transformation model represented by Expression (3), the rolling shutter distortion is corrected in addition to the correction of the positional deviation between the frame images without increasing the variables (that is, with three variables). A geometric transformation model is proposed.
ここで、ローリングシャッタ歪みを補正する幾何変換モデルを説明する前に、ローリングシャッタ歪みについて考察する。ローリングシャッタ歪みは、撮像素子103の画素行ごとに画像信号の読み出し時刻が異なることに起因して発生する。すなわち、同一被写体において読み出し時刻が異なる位置が発生するので、カメラ100が動いたり(すなわち振れたり)、被写体が高速で動いたりしている場合に、取得された画像上で被写体に歪みが生じる。
Here, before explaining the geometric transformation model for correcting the rolling shutter distortion, the rolling shutter distortion will be considered. Rolling shutter distortion occurs due to the image signal readout time being different for each pixel row of the
図4は、ローリングシャッタ歪みを説明する図である。図4では、実際の被写体の形状を点線で示し、ローリングシャッタ歪みが発生した被写体の形状を実線で示す。カメラ100が右方向に移動した場合には、図4(A)に示すフレーム画像において、被写体が左へ移動すると共に、被写体の下部よりも上部が右にずれるように斜めに変形する。カメラ100が左方向に移動した場合には、図4(B)に示すフレーム画像において、被写体が右へ移動すると共に、被写体の下部よりも上部が左にずれるように斜めに変形する。カメラ100が下方向に移動した場合には、図4(C)に示すフレーム画像において、被写体が上へ移動すると共に、被写体の上部と下部との間が広がるように、すなわち縦方向に拡大するように変形する。カメラ100が上方向に移動した場合には、図4(D)に示すフレーム画像において、被写体が下へ移動すると共に、被写体の上部と下部との間が狭まるように、すなわち縦方向に縮小するように変形する。なお、カメラ100ではなく被写体が移動している場合には、逆方向の歪みが発生する。
FIG. 4 is a diagram for explaining rolling shutter distortion. In FIG. 4, the actual shape of the subject is indicated by a dotted line, and the shape of the subject in which rolling shutter distortion has occurred is indicated by a solid line. When the
このように、ローリングシャッタ歪みは、横方向に斜めに歪む変形と、縦方向に拡大/縮小する変形との2種類の変形によって表される。このことをふまえ、本実施形態で用いる幾何変換モデルでは、次式(4)に示すように、上記式(3)に対して、横方向に斜めに歪む変形に対応する幾何変換係数(1行2列目の係数)と、縦方向に拡大/縮小する変形に対応する幾何変換係数(2行2列目の係数)とに、ローリングシャッタ歪みを補正するための補正項α、βを追加する。この補正項α、βは、2つのフレーム画像(隣接フレーム)間における、ローリングシャッタ歪みの変化量を表す。
また、式(4)において、w,hは、ローリングシャッタ歪みの基準となる座標値を表し、たとえば、フレーム画像の中心点の座標値を表す。したがって、式(4)において、横方向の平行移動に対応する幾何変換係数(1行3列目の係数)に追加された補正項−wαと、縦方向の平行移動に対応する幾何変換係数(2行3列目の係数)に追加された補正項−hβとは、ローリングシャッタ歪みの基準をフレーム画像の中心に設定するためのものである。 In Expression (4), w and h represent coordinate values serving as a reference for rolling shutter distortion, for example, coordinate values of the center point of the frame image. Therefore, in Equation (4), the correction term −wα added to the geometric transformation coefficient corresponding to the horizontal translation (the coefficient in the first row and the third column) and the geometric transformation coefficient corresponding to the vertical translation ( The correction term -hβ added to the coefficient in the 2nd row and the 3rd column is for setting the rolling shutter distortion reference at the center of the frame image.
次に、ローリングシャッタ歪みの変化量(補正項)α、βの算出方法について考察する。図5は、カメラ100による撮影されたフレーム画像の一例であり、図5(A)は時刻t0、図5(B)は時刻t1、図5(C)は時刻t2のフレーム画像を示す。なお、これらのフレーム画像は、時刻t0、t1、t2の順で撮影されたとする。また、時刻t0の時点では、カメラ100および被写体Obは静止していたが、時刻t0から時刻t1にかけて、および時刻t1から時刻t2にかけては、被写体Obに対してカメラ100が左方向に動いていたとする。この場合、時刻t0のフレーム画像では、図5(A)に示すように、被写体Obにローリングシャッタ歪みが発生していない。時刻t1のフレーム画像では、図5(B)に示すように、時刻t0のフレーム画像から被写体Obが右方向に移動すると共に、横方向に斜めに変形するローリングシャッタ歪みが発生している。時刻t2のフレーム画像では、図5(C)に示すように、時刻t1のフレーム画像から被写体Obが右方向に移動すると共に、横方向に斜めに変形するローリングシャッタ歪みが発生している。
Next, a method of calculating the rolling shutter distortion change amounts (correction terms) α and β will be considered. FIG. 5 shows an example of a frame image taken by the
ローリングシャッタ歪みは、撮像素子103のスキャン速度(読み出し走査の速度)と、撮像素子103上での被写体の移動速度とに応じて変化する。すなわち、スキャン速度が遅いほど、フレーム画像で発生するローリングシャッタ歪みの量は大きくなる。また、被写体の移動速度が速いほど、フレーム画像で発生するローリングシャッタ歪みの量は大きくなる。スキャン速度は、動画撮影中変化しないため、動画撮影中においてローリングシャッタ歪みの変動は、撮像素子103上での被写体の移動速度に依存すると考えられる。
The rolling shutter distortion changes in accordance with the scanning speed (reading scanning speed) of the
また、図5では、時刻t0の時点でローリングシャッタ歪みが発生していない(ゼロである)ので、時刻t0から時刻t1におけるローリングシャッタ歪みの変化量と、時刻t0から時刻t1におけるローリングシャッタ歪みの変化量とを積算することで、時刻t2におけるローリングシャッタ歪みの量が求められると考えられる。すなわち、フレーム画像間でのローリングシャッタ歪みの変化量を求めることで、ローリングシャッタ歪みの量を求めることができ、ローリングシャッタ歪みを補正できると考えられる。 Further, in FIG. 5, since the rolling shutter distortion does not occur (is zero) at time t0, the amount of change in rolling shutter distortion from time t0 to time t1 and the rolling shutter distortion from time t0 to time t1. It is considered that the amount of rolling shutter distortion at time t2 is obtained by integrating the amount of change. That is, it is considered that the amount of rolling shutter distortion can be obtained by obtaining the amount of change in rolling shutter distortion between frame images, and the rolling shutter distortion can be corrected.
ここで、フレーム画像において、時刻t0から時刻t1における被写体Obの移動量をm1とし、時刻t1から時刻t2における被写体Obの移動量をm2とする。時刻t0では被写体が静止しており、時刻t0から時刻t1の時点で被写体が移動しているので、時刻t0から時刻t1におけるローリングシャッタ歪みの変化量は、被写体の移動速度、すなわち被写体Obの移動量m1から求めることができると考えられる。 Here, in the frame image, the movement amount of the subject Ob from the time t0 to the time t1 is m1, and the movement amount of the subject Ob from the time t1 to the time t2 is m2. Since the subject is stationary at time t0 and the subject is moving from time t0 to time t1, the amount of change in rolling shutter distortion from time t0 to time t1 is the moving speed of the subject, that is, the movement of the subject Ob. It can be determined from the quantity m1.
また、被写体Obの移動量m1と被写体Obの移動量m2とが同じである場合、時刻t0から時刻t1までと、時刻t1から時刻t2までとにおいて、被写体Obの移動速度が同じである。この場合、時刻t1のフレーム画像におけるローリングシャッタ歪みの量と、時刻t2のフレーム画像におけるローリングシャッタ歪みの量とが同じであると考えられる。したがって、時刻t1から時刻t2におけるローリングシャッタ歪みの変化量は0となる。 When the movement amount m1 of the subject Ob is the same as the movement amount m2 of the subject Ob, the movement speed of the subject Ob is the same from time t0 to time t1 and from time t1 to time t2. In this case, it is considered that the amount of rolling shutter distortion in the frame image at time t1 is the same as the amount of rolling shutter distortion in the frame image at time t2. Therefore, the amount of change in rolling shutter distortion from time t1 to time t2 is zero.
一方、被写体Obの移動量m1と被写体Obの移動量m2とが異なる場合、時刻t0から時刻t1までと、時刻t1から時刻t2までとにおいて、被写体Obの移動速度が変化している。被写体Obの移動速度が変化した分、ローリングシャッタ歪みの量が異なるため、時刻t1から時刻t2におけるローリングシャッタ歪みの変化量は、被写体Obの移動速度の変化量、すなわち被写体Obの移動量m2と被写体Obの移動量m1との差分に応じて変動すると考えられる。 On the other hand, when the moving amount m1 of the subject Ob is different from the moving amount m2 of the subject Ob, the moving speed of the subject Ob changes from time t0 to time t1 and from time t1 to time t2. Since the amount of rolling shutter distortion differs by the amount of movement of the subject Ob, the amount of change in rolling shutter distortion from time t1 to time t2 is the amount of change in the movement speed of the subject Ob, that is, the amount of movement m2 of the subject Ob. It is considered that it fluctuates according to the difference from the movement amount m1 of the subject Ob.
このように、直前フレーム画像からのローリングシャッタ歪みの変化量は、2枚目のフレーム画像においては被写体Obの移動量、すなわち画像の平行移動量から求めることができ、3枚目のフレーム以降においては被写体Obの移動量の変化量、すなわち画像の平行移動量の変化量によって求めることができると考えられる。 In this way, the amount of change in rolling shutter distortion from the previous frame image can be obtained from the movement amount of the subject Ob in the second frame image, that is, the parallel movement amount of the image. It is considered that can be obtained from the amount of change in the amount of movement of the subject Ob, that is, the amount of change in the amount of parallel movement of the image.
このことをふまえ、本実施形態の幾何変換モデルでは、式(4)におけるローリングシャッタ歪みの変化量(補正項)α、βを、以下の式(5)、式(6)により表す。なお、式(5)および(6)において、k1、k2は、定数である。a’は、現在のフレーム画像(隣接変化量Pを算出する対象のフレーム画像)の直前のフレーム画像において算出された、横方向の平行移動量aである。b’は、現在のフレーム画像(隣接変化量Pを算出する対象のフレーム画像)の直前のフレーム画像において算出された、縦方向の平行移動量bである。
α=k1(a−a’)・・・(5)
β=k2(b−b’)・・・(6)
Based on this, in the geometric transformation model of the present embodiment, the changes (correction terms) α and β of the rolling shutter distortion in the equation (4) are expressed by the following equations (5) and (6). In equations (5) and (6), k1 and k2 are constants. a ′ is the horizontal translation amount a calculated in the frame image immediately before the current frame image (the frame image for which the adjacent change amount P is calculated). b ′ is the vertical translation amount b calculated in the frame image immediately before the current frame image (the frame image for which the adjacent change amount P is calculated).
α = k1 (aa ′) (5)
β = k2 (bb ′) (6)
すなわち、横方向に斜めに歪む変形に対応する変化量αは、現在のフレーム画像における横方向の平行移動量aと、直前のフレーム画像における横方向の平行移動量a’との差分、すなわち横方向の平行移動量aの変化量に応じて算出される。また、縦方向に拡大/縮小する変形に対応する変化量βは、現在のフレーム画像における縦方向の平行移動量bと、直前のフレーム画像における縦方向の平行移動量b’との差分、すなわち縦方向の平行移動量bの変化量に応じて算出される。 That is, the change amount α corresponding to the deformation distorted obliquely in the horizontal direction is the difference between the horizontal translation amount a in the current frame image and the horizontal translation amount a ′ in the immediately previous frame image, that is, the horizontal amount. It is calculated according to the amount of change in the direction parallel movement amount a. Further, the amount of change β corresponding to the deformation expanding / reducing in the vertical direction is the difference between the vertical translation amount b in the current frame image and the vertical translation amount b ′ in the immediately preceding frame image, that is, It is calculated according to the change amount of the parallel translation amount b in the vertical direction.
また、定数k1、k2は、撮像素子103のスキャン速度に応じて設定される。スキャン速度が速いほどフレーム画像で発生するローリングシャッタ歪みは小さくなるので、定数k1、k2を小さく設定し、ローリングシャッタ歪みの補正量を小さくする。一方、スキャン速度が遅いほどフレーム画像で発生するローリングシャッタ歪みは大きくなるので、定数k1、k2を大きく設定し、ローリングシャッタ歪みの補正量を大きくする。
The constants k1 and k2 are set according to the scan speed of the
なお、隣接変化量Pは時系列順に算出するので、現在のフレーム画像における隣接変化量Pnを算出する時点で、直前のフレーム画像における隣接変化量Pn−1は既に算出されている。そのため、現在のフレーム画像における隣接変化量Pnを算出する時点で、直前のフレーム画像における平行移動量a’、b’は既知である。しかし、2枚目のフレーム画像における隣接変化量P2を算出する際には、1枚目のフレーム画像ではa’、b’が算出されないので、たとえば、a’=b’=0とする。 Since the adjacent change amount P is calculated in chronological order, the adjacent change amount P n−1 in the immediately preceding frame image has already been calculated at the time of calculating the adjacent change amount P n in the current frame image. Therefore, at the time of calculating the adjacent change amount P n in the current frame image, the parallel movement amounts a ′ and b ′ in the immediately previous frame image are known. However, when calculating the adjacent change amount P2 in the second frame image, since a ′ and b ′ are not calculated in the first frame image, for example, a ′ = b ′ = 0.
上述したステップS2(図2)において、制御装置104は、各フレーム画像において、式(5)および式(6)を用いて、式(4)に示す幾何変換モデルを更新し、更新した幾何変換モデルを用いて隣接変化量Pを算出する。式(4)〜式(6)によれば、変数がa、b、cの3つであるため、変数が6つである場合と比べて、演算負荷を軽減することができる。なお、幾何変換モデルにおける変数の算出方法については、公知の手法を用いるものとする。
In step S2 (FIG. 2) described above, the
また、この隣接変化量Pは、隣接フレーム画像間における、位置ずれ量(平行移動量および回転量)とローリングシャッタ歪みの変化量とを表している。このため、ステップS3(図2)において、制御装置104は、各フレーム画像について、開始フレームからの位置ずれ量とローリングシャッタ歪みの変化量とを表す基準変化量Qを算出することができる。したがって、ステップS4(図2)において、制御装置104は、各フレームの基準変化量Qを用いて、動画像においてフレーム画像間の位置ずれを補正すると共にローリングシャッタ歪みを補正することができる。
Further, the adjacent change amount P represents a positional shift amount (parallel movement amount and rotation amount) and a change amount of rolling shutter distortion between adjacent frame images. For this reason, in step S3 (FIG. 2), the
以上説明した実施形態によれば、次の作用効果が得られる。
(1)カメラ100は、撮像素子103により撮像され、連続して取得される複数のフレーム画像において、フレーム画像ごとの変化量(隣接変化量P)を、幾何変換モデル(式(4))を用いて算出する制御装置104と、隣接変化量Pを用いてフレーム画像を補正する制御装置104と、を備える。幾何変換モデル(式(4))は、フレーム画像の位置ずれを補正するための幾何変換係数に、撮像素子103のローリングシャッタによる歪みを補正するための補正項(α,β)を付加したものである。補正項(α,β)は、フレーム画像の位置ずれ量(平行移動量)を変数(a,b)として表され、フレーム画像ごとに、過去のフレーム画像の位置ずれ量(a’,b’)を用いて更新される。これにより、演算負荷を抑制しながら、フレーム画像の位置ずれとローリングシャッタによる歪みとを補正することができる。
According to the embodiment described above, the following operational effects can be obtained.
(1) The
(2)上記(1)のカメラ100において、上記補正項(α,β)は、フレーム画像の位置ずれ量を示す変数(a,b)と、過去のフレーム画像の位置ずれ量(a’,b’)との差分(a−a’,b−b’)を用いて表されるようにした。これにより、撮像素子103上での被写体の移動速度に応じて、ローリングシャッタ歪みを適切に補正することができる。
(2) In the
(3)上記(2)のカメラ100において、上記補正項(α,β)は、上記差分(a−a’,b−b’)と、撮像素子103のスキャン速度に応じて設定された定数(k1,k2)とを用いて表される。これにより、撮像素子103のスキャン速度に応じて、ローリングシャッタ歪みを適切に補正することができる。
(3) In the
(変形例1)
上述した実施の形態では、メモリカードに記録された動画データを読み出し、読み出した動画データの各フレームに基づいて隣接変化量Pを算出する場合について説明した。しかしながら、制御装置104は、動画データの撮影中に、撮像素子103により動画データのフレームが撮像されるごとに、隣接変化量Pを算出するようにしてもよい。
(Modification 1)
In the above-described embodiment, the case where the moving image data recorded in the memory card is read and the adjacent change amount P is calculated based on each frame of the read moving image data has been described. However, the
変形例1の制御装置104は、動画像の撮影開始後、撮像素子103から各フレーム画像が出力されるごとに、直前のフレーム画像からの変化量を隣接変化量Pとして算出する。そして制御装置104は、フレーム画像データと隣接変化量Pを関連付けてメモリカードに記録する。
The
動画像の撮影が終了すると、制御装置104は、上記画像補正処理(図2)を開始し、ステップS1およびS2に代えて、動画データのフレーム画像に関連付けられた隣接変化量Pをメモリカードから読み出す。そして制御装置104は、読み出した隣接変化量Pに基づいてステップS3以降の処理を行い、補正後の動画データをメモリカードに記録する。
When shooting of the moving image ends, the
このように動画像の撮影中にリアルタイムで隣接変化量Pを算出して、動画像の撮影後に画像補正処理を行うことにより、補正された動画データを早期に取得することができる。 As described above, by calculating the adjacent change amount P in real time during moving image shooting and performing image correction processing after moving image shooting, the corrected moving image data can be acquired early.
(変形例2)
上述した実施の形態では、動画データに対して上記画像補正処理(図2)を行う例について説明したが、連写撮影により連続して取得される複数のフレーム画像に対して、上記画像補正処理(図2)を行うようにしてもよい。
(Modification 2)
In the above-described embodiment, the example in which the image correction process (FIG. 2) is performed on the moving image data has been described. However, the image correction process is performed on a plurality of frame images continuously acquired by continuous shooting. (FIG. 2) may be performed.
(変形例3)
上述した実施の形態では、幾何変換モデル(式(4))において、ローリングシャッタ歪みを補正するための補正項α,βを、過去のフレーム画像における平行移動量a’,b’を用いて求める例について説明した。しかしながら、カメラ100に、カメラ100の移動速度を検出するためのセンサ(たとえば、角速度センサ)を設け、当該センサにより検出されたカメラ100の移動速度に基づいて補正項α,βを求めるようにしてもよい。
(Modification 3)
In the embodiment described above, correction terms α and β for correcting rolling shutter distortion in the geometric transformation model (formula (4)) are obtained using the parallel movement amounts a ′ and b ′ in the past frame images. An example was described. However, the
(変形例4)
上述した実施の形態では、幾何変換モデル(式(4))において、ローリングシャッタ歪みを補正するための補正項α,βを、直前のフレーム画像における平行移動量a’,b’を用いて求める例について説明した。しかしながら、補正項α,βを求めるために用いる平行移動量は、過去のフレーム画像1枚分に限らなくてよく、複数の過去のフレーム画像における平行移動量を用いて、補正項α、βを求めるようにしてもよい。
(Modification 4)
In the embodiment described above, correction terms α and β for correcting rolling shutter distortion in the geometric transformation model (formula (4)) are obtained using the parallel movement amounts a ′ and b ′ in the immediately preceding frame image. An example was described. However, the translation amount used for obtaining the correction terms α and β is not limited to one past frame image, and the correction terms α and β are calculated using the translation amounts in a plurality of past frame images. You may make it ask.
(変形例5)
上述した実施の形態では、カメラ100の制御装置104が不図示のメモリに記録されたプログラムを実行することで、上記画像補正処理(図2)を行う例について説明した。このプログラムは、製品出荷時に予め記録されていてもよいし、製品出荷後、メモリカードなどの記録媒体やインターネットなどのデータ信号を通じて提供されてもよい。図6はその様子を示す図である。カメラ100は、メモリカードなどの記録媒体200を介してプログラムの提供を受ける。また、カメラ100は通信回線201との接続機能を有する。コンピュータ202は上記プログラムを提供するサーバコンピュータであり、ハードディスク203などの記録媒体にプログラムを格納する。通信回線201は、インターネット、パソコン通信などの通信回線、あるいは専用通信回線などである。コンピュータ202はハードディスク203を使用してプログラムを読み出し、通信回線201を介してプログラムをカメラ100に送信する。すなわち、プログラムをデータ信号として搬送波を介して、通信回線201を介して送信する。このように、プログラムは、記録媒体やデータ信号(搬送波)などの種々の形態のコンピュータ読み込み可能なコンピュータプログラム製品として供給できる。
(Modification 5)
In the above-described embodiment, the example in which the
(変形例6)
上述した実施の形態では、カメラ100が備える制御装置104が上記画像補正処理(図2)を実行する例について説明した。しかしながら、上記画像補正処理を実行するためのプログラムをパソコンなどその他の端末に記録して、当該端末上で処理を実行することも可能である。この場合、カメラで撮影した動画データを端末側に取り込んで、これを対象に上記画像補正処理を行う。また、本発明はカメラ付き携帯電話などに適用することも可能である。
(Modification 6)
In the above-described embodiment, the example in which the
以上の説明はあくまで一例であり、上記実施形態の構成に何ら限定されるものではない。また、上記実施形態に各変形例の構成を適宜組み合わせてもかまわない。 The above description is merely an example, and is not limited to the configuration of the above embodiment. Moreover, you may combine the structure of each modification suitably with the said embodiment.
100…カメラ、101…操作部材、102…撮像レンズ、103…撮像素子、104…制御装置、105…メモリカードスロット、106…モニタ
DESCRIPTION OF
Claims (8)
前記変化量算出手段により算出された変化量を用いて、フレーム画像を補正する補正手段と、
を備え、
前記変化量は、前記撮像素子のローリングシャッタによる歪みに関する情報を含むことを特徴とする画像処理装置。 Change amount calculating means for calculating a change amount for each frame image using a geometric transformation model in a plurality of frame images captured and continuously acquired by the image sensor;
Correction means for correcting the frame image using the change amount calculated by the change amount calculation means;
With
The image processing apparatus according to claim 1, wherein the change amount includes information related to distortion caused by a rolling shutter of the image sensor.
前記幾何変換モデルは、フレーム画像の位置ずれを補正するための幾何変換係数に、前記撮像素子のローリングシャッタによる歪みを補正するための補正項を付加したものであり、
前記補正項は、フレーム画像の位置ずれ量を変数として表され、フレーム画像ごとに、過去のフレーム画像の位置ずれ量を用いて更新されることを特徴とする画像処理装置。 The image processing apparatus according to claim 1.
The geometric transformation model is obtained by adding a correction term for correcting distortion caused by a rolling shutter of the image sensor to a geometric transformation coefficient for correcting a positional deviation of a frame image.
The image processing apparatus is characterized in that the correction term is expressed by using a positional deviation amount of a frame image as a variable, and is updated using a positional deviation amount of a past frame image for each frame image.
前記補正項は、前記変数と、前記過去のフレーム画像の位置ずれ量との差分を用いて表されることを特徴とする画像処理装置。 The image processing apparatus according to claim 2,
The image processing apparatus, wherein the correction term is expressed using a difference between the variable and a positional deviation amount of the past frame image.
前記補正項は、前記差分と、前記撮像素子のスキャン速度に応じて設定された定数とを用いて表されることを特徴とする画像処理装置。 The image processing apparatus according to claim 3.
The image processing apparatus, wherein the correction term is expressed using the difference and a constant set in accordance with a scanning speed of the image sensor.
前記位置ずれ量は、隣接するフレーム画像間の平行移動量を表すことを特徴とする画像処理装置。 In the image processing apparatus according to any one of claims 2 to 4,
The image processing apparatus according to claim 1, wherein the displacement amount represents a parallel movement amount between adjacent frame images.
請求項1〜5のいずれか一項に記載の画像処理装置と、
を備えることを特徴とするカメラ。 The imaging element;
The image processing apparatus according to any one of claims 1 to 5,
A camera comprising:
前記変化量算出工程により算出された変化量を用いて、フレーム画像を補正する補正工程と、
を有し、
前記変化量は、前記撮像素子のローリングシャッタによる歪みに関する情報を含むことを特徴とする画像処理方法。 A change amount calculating step of calculating a change amount for each frame image using a geometric transformation model in a plurality of frame images captured and continuously acquired by the image sensor;
A correction step of correcting the frame image using the change amount calculated by the change amount calculation step;
Have
The image processing method, wherein the change amount includes information on distortion caused by a rolling shutter of the image sensor.
前記変化量算出処理により算出された変化量を用いて、フレーム画像を補正する補正処理と、
をコンピュータに実行させるための画像処理プログラムであって、
前記変化量は、前記撮像素子のローリングシャッタによる歪みに関する情報を含むことを特徴とする画像処理プログラム。 Change amount calculation processing for calculating a change amount for each frame image using a geometric transformation model in a plurality of frame images captured and continuously acquired by the image sensor;
A correction process for correcting a frame image using the change amount calculated by the change amount calculation process;
An image processing program for causing a computer to execute
The image processing program characterized in that the amount of change includes information related to distortion caused by a rolling shutter of the image sensor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012287825A JP2014131177A (en) | 2012-12-28 | 2012-12-28 | Image processing device, camera, image processing method, and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012287825A JP2014131177A (en) | 2012-12-28 | 2012-12-28 | Image processing device, camera, image processing method, and image processing program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014131177A true JP2014131177A (en) | 2014-07-10 |
Family
ID=51409196
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012287825A Pending JP2014131177A (en) | 2012-12-28 | 2012-12-28 | Image processing device, camera, image processing method, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014131177A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101627795B1 (en) * | 2014-12-24 | 2016-06-08 | 전자부품연구원 | Method for Rolling Shutter Correction with Key-Frame and Gyroscope and Photographing Apparatus using the same |
JP2018103268A (en) * | 2016-12-22 | 2018-07-05 | セイコーエプソン株式会社 | Robot and imaging method |
KR20190014959A (en) * | 2017-08-04 | 2019-02-13 | 삼성전자주식회사 | Electronic device for playing movie based on movment information and operating mehtod thereof |
-
2012
- 2012-12-28 JP JP2012287825A patent/JP2014131177A/en active Pending
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101627795B1 (en) * | 2014-12-24 | 2016-06-08 | 전자부품연구원 | Method for Rolling Shutter Correction with Key-Frame and Gyroscope and Photographing Apparatus using the same |
WO2016104830A1 (en) * | 2014-12-24 | 2016-06-30 | 전자부품연구원 | Rolling shutter correction method using key frame and gyroscope, and photographing device to which method is applied |
JP2018103268A (en) * | 2016-12-22 | 2018-07-05 | セイコーエプソン株式会社 | Robot and imaging method |
JP2021154487A (en) * | 2016-12-22 | 2021-10-07 | セイコーエプソン株式会社 | Robot system, working method, and pick-up method |
JP7205569B2 (en) | 2016-12-22 | 2023-01-17 | セイコーエプソン株式会社 | Robotic system, working method and pick-up method |
KR20190014959A (en) * | 2017-08-04 | 2019-02-13 | 삼성전자주식회사 | Electronic device for playing movie based on movment information and operating mehtod thereof |
KR102330264B1 (en) * | 2017-08-04 | 2021-11-23 | 삼성전자주식회사 | Electronic device for playing movie based on movment information and operating mehtod thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4509917B2 (en) | Image processing apparatus and camera system | |
JP4509925B2 (en) | Image processing apparatus, camera system, image processing method, and moving image display method | |
JP4446193B2 (en) | Image processing apparatus and method, and program | |
JP5794705B2 (en) | Imaging apparatus, control method thereof, and program | |
JP3925415B2 (en) | Image processing apparatus and method, recording medium, and program | |
JP5531194B2 (en) | Image processing apparatus, image processing method, and image processing program | |
US20090225174A1 (en) | Image processing apparatus, image processing method, hand shake blur area estimation device, hand shake blur area estimation method, and program | |
JP5621485B2 (en) | Imaging apparatus and image processing apparatus | |
US20070223909A1 (en) | Camera phone, method of controlling the camera phone, and photography support method used for the camera phone | |
JP2006203463A (en) | Image display method, image pick-up method, and image synthesizing method | |
JP2007243335A (en) | Camera shake correction method, camera shake correction apparatus, and imaging apparatus | |
JP4771901B2 (en) | Imaging apparatus, image distortion correction method, and program | |
JP2014131177A (en) | Image processing device, camera, image processing method, and image processing program | |
JP4678061B2 (en) | Image processing apparatus, digital camera equipped with the same, and image processing program | |
JP7453267B2 (en) | Imaging device, imaging device, operating method of the imaging device, and program | |
JP3925560B2 (en) | Image processing apparatus and method, recording medium, and program | |
JP4499686B2 (en) | Image processing apparatus and method, recording medium, and program | |
JP4597073B2 (en) | Camera shake correction method, camera shake correction apparatus, and imaging apparatus | |
CN110692235B (en) | Image processing apparatus, image processing program, and image processing method | |
US8786677B2 (en) | Imaging device | |
JP2004363869A (en) | Imaging apparatus with image distortion correcting function | |
JP3925559B2 (en) | Image processing apparatus and method, recording medium, and program | |
JP2009027437A (en) | Image processor, image processing method and imaging device | |
JP5401696B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2008160274A (en) | Motion vector detection method, its apparatus and its program, electronic hand-blur correction method, its apparatus and its program, as well as imaging apparatus |