JP2015109547A - Shake correction method, shake correction device and program - Google Patents

Shake correction method, shake correction device and program Download PDF

Info

Publication number
JP2015109547A
JP2015109547A JP2013251162A JP2013251162A JP2015109547A JP 2015109547 A JP2015109547 A JP 2015109547A JP 2013251162 A JP2013251162 A JP 2013251162A JP 2013251162 A JP2013251162 A JP 2013251162A JP 2015109547 A JP2015109547 A JP 2015109547A
Authority
JP
Japan
Prior art keywords
image
blur correction
camera motion
camera
small
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
JP2013251162A
Other languages
Japanese (ja)
Inventor
達哉 大澤
Tatsuya Osawa
達哉 大澤
島村 潤
Jun Shimamura
潤 島村
行信 谷口
Yukinobu Taniguchi
行信 谷口
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2013251162A priority Critical patent/JP2015109547A/en
Publication of JP2015109547A publication Critical patent/JP2015109547A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To correct a shake of an image even when a three-dimensional position of a camera is moving.SOLUTION: A shake correction device comprises: an image acquisition unit which acquires an image; an image division unit which divides the image into tile shape small images; a camera movement estimation unit which estimates a camera movement based on the image and the small images, which is movement of the camera during exposure time while photographing the image, and is represented by six degrees of freedom; a shake correction kernel calculation unit which calculates a shake correction kernel based on the estimated camera movement; a shake correction unit which performs shake correction for each small image by use of the calculated shake correction kernel; and an image integration unit integrating the small images on which the shake correction is applied to generate an output image that is the same size as the image.

Description

本発明は、画像におけるブレを補正するブレ補正方法、ブレ補正装置及びプログラムに関する。   The present invention relates to a shake correction method, a shake correction apparatus, and a program for correcting shake in an image.

コンピュータビジョン分野では、撮影の際における露出不足などにより画像にブレが生じてしまった場合にこのブレを補正し、鮮明な画像を復元する研究が多く行われている。例えば、非特許文献1には、ブレが生じている画像を、露出時間中において異なるカメラの姿勢から撮影された鮮明な画像を足し合わせた画像と定義し、カメラの姿勢と鮮明な画像と同時に復元する方法が提案されている。   In the field of computer vision, many studies have been made to correct a blur and restore a clear image when the image blurs due to underexposure during shooting. For example, Non-Patent Document 1 defines a blurred image as an image obtained by adding together clear images taken from different camera postures during the exposure time, and simultaneously with the camera posture and the clear image. A method of restoration has been proposed.

Oliver Whyte, Josef Sivic, Andrew Zisserman, and Jean Ponce, "Non-uniform Deblurring for Shaken Images", International Journal of Computer Vision, Volume 98, Issue 2, June 2012, p.168-186Oliver Whyte, Josef Sivic, Andrew Zisserman, and Jean Ponce, "Non-uniform Deblurring for Shaken Images", International Journal of Computer Vision, Volume 98, Issue 2, June 2012, p.168-186

前述のように、カメラの姿勢と鮮明な画像とを同時に復元する方法では、露出時間中にカメラは大きく動かないという前提を考慮することで高速な演算を可能としている。また、非特許文献1に記載の方法では、露出時間中におけるカメラの三次元位置は不変であり、カメラの姿勢(向き)がブレの要因であるという仮定の下に画像の復元を行っている。   As described above, the method of simultaneously restoring the camera posture and the clear image enables high-speed computation by considering the premise that the camera does not move greatly during the exposure time. In the method described in Non-Patent Document 1, the three-dimensional position of the camera during the exposure time is unchanged, and the image is restored under the assumption that the camera posture (orientation) is a factor of blurring. .

しかしながら、前述の仮定は撮影者による画像の撮影といった一般的な条件の下で成り立つことがあるものの、ウェアラブルカメラ、アクションカメラなど呼ばれている人間の身体に取り付けるカメラで撮影するような場合では、身体の動きに合わせてカメラ自体も大きく動くことがあるため、前述の仮定が成立しない状況が生じる。このような状況では、非特許文献1に記載の方法では、ブレを補正することができないことがあるという問題がある。   However, although the above assumptions may hold under general conditions such as shooting by the photographer, in the case of shooting with a camera attached to the human body, such as a wearable camera or action camera, Since the camera itself may move greatly in accordance with the movement of the body, a situation occurs where the above assumption is not satisfied. In such a situation, there is a problem that the method described in Non-Patent Document 1 may not be able to correct blurring.

本発明は、上記のような問題を解決するためになされたものであって、カメラの三次元位置が動いている場合であっても、画像において生じたブレを補正することができるブレ補正方法、ブレ補正装置及びプログラムを提供することを目的としている。   The present invention has been made in order to solve the above-described problem, and is a blur correction method capable of correcting blur caused in an image even when the three-dimensional position of the camera is moving. An object of the present invention is to provide a shake correction apparatus and a program.

本発明の一態様は、ブレ補正装置が行うブレ補正方法であって、画像を取得する画像取得ステップと、前記画像をタイル形状の小画像に分割する画像分割ステップと、前記画像及び前記小画像に基づいて前記画像の撮影における露出時間中におけるカメラのカメラ運動であって6自由度を用いて表されるカメラ運動を推定するカメラ運動推定ステップと、推定されたカメラ運動に基づいてブレ補正カーネルを算出する第1のブレ補正カーネル算出ステップと、算出されたブレ補正カーネルを用いて前記小画像それぞれに対してブレ補正を行う第1のブレ補正ステップと、ブレ補正が施された小画像を統合して前記画像と同じサイズの出力画像を生成する画像統合ステップと、を有することを特徴とするブレ補正方法である。   One aspect of the present invention is a shake correction method performed by a shake correction apparatus, an image acquisition step of acquiring an image, an image division step of dividing the image into tile-shaped small images, the image and the small image A camera motion estimation step for estimating the camera motion of the camera during the exposure time in capturing the image based on the camera motion and expressed using six degrees of freedom; and a blur correction kernel based on the estimated camera motion A first blur correction kernel calculating step for calculating the first blur correction step, a first blur correction step for performing blur correction on each of the small images using the calculated blur correction kernel, and a small image subjected to the blur correction. An image integration step of integrating and generating an output image having the same size as the image.

また、本発明の一態様は、上記のブレ補正方法において、前記カメラ運動推定ステップは、複数のカメラ運動の仮説を生成するカメラ運動仮説生成ステップと、前記カメラ運動の仮説ごとにブレ補正カーネルを算出する第2のブレ補正カーネル算出ステップと、前記第2のブレ補正カーネル算出ステップにおいて算出されたブレ補正カーネルを用いて前記小画像のブレを補正する第2のブレ補正ステップと、前記第2のブレ補正ステップにおいてブレ補正が施された小画像から前記カメラ運動の仮説それぞれに対応する仮説画像を生成する仮説画像生成ステップと、前記カメラ運動の仮説それぞれに対応する仮説画像の精鋭度を算出する評価ステップと、前記仮説画像それぞれの精鋭度に基づいて前記カメラ運動を決定するカメラ運動決定ステップと、を有することを特徴とする。   According to another aspect of the present invention, in the shake correction method, the camera motion estimation step includes: a camera motion hypothesis generation step that generates a plurality of camera motion hypotheses; and a camera shake correction kernel for each camera motion hypothesis. A second blur correction kernel calculation step to calculate; a second blur correction step to correct blur of the small image using the blur correction kernel calculated in the second blur correction kernel calculation step; and the second A hypothesis image generation step for generating a hypothesis image corresponding to each of the camera motion hypotheses from the small image that has undergone the blur correction in the blur correction step, and calculating a sharpness of the hypothesis image corresponding to each of the camera motion hypotheses And a camera motion determination step for determining the camera motion based on the sharpness of each hypothesis image. Characterized in that it has Tsu and up, the.

また、本発明の一態様は、画像を取得する画像取得部と、前記画像をタイル形状の小画像に分割する画像分割部と、前記画像及び前記小画像に基づいて前記画像の撮影における露出時間中におけるカメラのカメラ運動であって6自由度を用いて表されるカメラ運動を推定するカメラ運動推定部と、推定されたカメラ運動に基づいてブレ補正カーネルを算出するブレ補正カーネル算出部と、算出されたブレ補正カーネルを用いて前記小画像それぞれに対してブレ補正を行うブレ補正部と、ブレ補正が施された小画像を統合して前記画像と同じサイズの出力画像を生成する画像統合部と、を備えることを特徴とするブレ補正装置である。   According to another aspect of the present invention, an image acquisition unit that acquires an image, an image division unit that divides the image into tile-shaped small images, and an exposure time in shooting the image based on the image and the small image A camera motion estimator that estimates camera motion represented by 6 degrees of freedom, a shake correction kernel calculator that calculates a shake correction kernel based on the estimated camera motion, A blur correction unit that performs blur correction on each of the small images using the calculated blur correction kernel, and image integration that generates an output image having the same size as the image by integrating the small images subjected to the blur correction A motion compensation device comprising: a motion compensation unit.

また、本発明の一態様は、上記のブレ補正方法をコンピュータに実行させるためのプログラムである。   One embodiment of the present invention is a program for causing a computer to execute the above-described blur correction method.

本発明によれば、画像に基づいて当該画像を撮影した際の露出時間中のカメラ運動を推定し、推定結果に基づいてブレ補正を施すので、カメラの三次元位置が動いている場合であっても画像において生じたブレを補正することができる。   According to the present invention, the camera motion during the exposure time when the image is captured based on the image is estimated, and the blur correction is performed based on the estimation result, so that the three-dimensional position of the camera is moving. Even in this case, the blurring that occurs in the image can be corrected.

本発明に係る実施形態におけるブレ補正装置1の構成例を示すブロック図である。It is a block diagram which shows the structural example of the blurring correction apparatus 1 in embodiment which concerns on this invention. 同実施形態における画像分割部12による画像分割の一例を示す図である。It is a figure which shows an example of the image division by the image division part 12 in the embodiment. 同実施形態におけるブレ補正装置1が行うブレ補正処理を示すフローチャートである。It is a flowchart which shows the blurring correction process which the blurring correction apparatus 1 in the embodiment performs. カメラ運動推定部13がカメラ運動を推定するステップS303の処理を示すフローチャートである。It is a flowchart which shows the process of step S303 in which the camera motion estimation part 13 estimates a camera motion. カメラ運動推定部13が投票の際に用いるテーブルの一例を示す図である。It is a figure which shows an example of the table which the camera motion estimation part 13 uses in the case of voting.

以下、図面を参照して、本発明に係る実施形態におけるブレ補正方法、ブレ補正装置及びプログラムを説明する。図1は、本発明に係る実施形態におけるブレ補正装置1の構成例を示すブロック図である。図1に示すように、ブレ補正装置1は、画像取得部11、画像分割部12、カメラ運動推定部13、ブレ補正カーネル算出部14、ブレ補正部15、画像統合部16、及び、仮説評価記憶部21を備えている。   Hereinafter, a shake correction method, a shake correction apparatus, and a program according to an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration example of a shake correction apparatus 1 according to an embodiment of the present invention. As shown in FIG. 1, the shake correction apparatus 1 includes an image acquisition unit 11, an image division unit 12, a camera motion estimation unit 13, a shake correction kernel calculation unit 14, a shake correction unit 15, an image integration unit 16, and a hypothesis evaluation. A storage unit 21 is provided.

画像取得部11は、撮影などにより得られた画像データを取得する。画像取得部11は、例えば、デジタルカメラやビデオカメラ等における画像センサー(撮像素子)であってもよいし、デジタルカメラなどの外部の装置により得られた画像を入力するインターフェースであってもよい。   The image acquisition unit 11 acquires image data obtained by shooting or the like. The image acquisition unit 11 may be, for example, an image sensor (imaging device) in a digital camera, a video camera, or the like, or an interface that inputs an image obtained by an external device such as a digital camera.

画像分割部12は、画像取得部11が取得した画像を、予め定められたサイズのタイル形状の小画像に分割する。このとき、画像分割部12は、隣り合うタイル形状の小画像がオーバーラップするように画像を分割する。図2は、本実施形態における画像分割部12による画像分割の一例を示す図である。図2に示すように、画像を一定サイズのタイル形状の領域に分割し、複数のタイル形状の領域を含む小画像に分ける。このとき、隣り合う小画像は、タイル形状の領域を重複して含むように定められる。例えば、図2に示す例では、画像における小画像Aと小画像Bとは、領域aと領域bとを重複して含むように定められている。   The image dividing unit 12 divides the image acquired by the image acquiring unit 11 into small tile-shaped images having a predetermined size. At this time, the image dividing unit 12 divides the images so that adjacent small tile-shaped images overlap. FIG. 2 is a diagram illustrating an example of image division by the image division unit 12 in the present embodiment. As shown in FIG. 2, the image is divided into tile-shaped areas of a certain size and divided into small images including a plurality of tile-shaped areas. At this time, adjacent small images are determined so as to include overlapping tile-shaped regions. For example, in the example illustrated in FIG. 2, the small image A and the small image B in the image are determined so as to include the region a and the region b in an overlapping manner.

カメラ運動推定部13は、画像取得部11が取得した画像を撮影したカメラのカメラ運動について複数の仮説を予測する。カメラ運動推定部13は、予測した仮説ごとに、当該仮説が正しいとした場合のカメラ運動を用いて小画像それぞれのブレ補正カーネルを算出し、算出したブレ補正カーネルで小画像のブレを補正する。カメラ運動推定部13は、ブレが補正された各小画像を統合して復元した画像に対する評価を行う。カメラ運動推定部13は、カメラ運動についての仮説ごとに、評価結果を対応付けて仮説評価記憶部21に記憶させる。カメラ運動推定部13は、仮説ごとに算出した評価結果に基づいて、尤もらしいカメラ運動を仮説から推定する。   The camera motion estimation unit 13 predicts a plurality of hypotheses about the camera motion of the camera that captured the image acquired by the image acquisition unit 11. For each predicted hypothesis, the camera motion estimation unit 13 calculates a shake correction kernel for each small image using the camera motion when the hypothesis is correct, and corrects the shake of the small image using the calculated shake correction kernel. . The camera motion estimation unit 13 performs evaluation on an image restored by integrating each small image whose blur is corrected. The camera motion estimation unit 13 associates the evaluation result with each hypothesis about the camera motion and stores it in the hypothesis evaluation storage unit 21. The camera motion estimation unit 13 estimates a likely camera motion from the hypothesis based on the evaluation result calculated for each hypothesis.

ブレ補正カーネル算出部14は、カメラ運動推定部13が推定したカメラ運動に基づいて、画像における小画像それぞれに対するブレ補正カーネルを算出する。
ブレ補正部15は、小画像ごとにブレ補正カーネル算出部14が算出したブレ補正カーネルを用いて、画像分割部12から入力する各小画像に対するブレ補正を行う。
画像統合部16は、ブレ補正部15によってブレ補正が施された各小画像を統合して鮮明な画像を生成する。画像統合部16は、生成した画像を出力画像として外部に出力する。
The blur correction kernel calculation unit 14 calculates a blur correction kernel for each small image in the image based on the camera motion estimated by the camera motion estimation unit 13.
The blur correction unit 15 performs blur correction on each small image input from the image dividing unit 12 using the blur correction kernel calculated by the blur correction kernel calculation unit 14 for each small image.
The image integration unit 16 integrates the small images that have undergone the shake correction by the shake correction unit 15 to generate a clear image. The image integration unit 16 outputs the generated image to the outside as an output image.

図3は、本実施形態におけるブレ補正装置1が行うブレ補正処理を示すフローチャートである。ブレ補正装置1においてブレ補正処理が開始されると、画像取得部11がカメラなどにより撮影された画像データImを取得する(ステップS301)。   FIG. 3 is a flowchart showing a shake correction process performed by the shake correction apparatus 1 according to the present embodiment. When the shake correction process is started in the shake correction device 1, the image acquisition unit 11 acquires image data Im photographed by a camera or the like (step S301).

画像分割部12は、画像取得部11が取得した画像データImが示す画像を複数の小画像に分割する(ステップS301)。このとき、画像分割部12は、図2に示したように、隣接する小画像同士がオーバーラップされて配置されるように画像を分割する。分割数(小画像の数)やオーバーラップの度合いなどは予め定めておく。各小画像に対して周波数領域の演算を行うため、画像分割部12は、小画像に窓関数をかけておく。例えば、オーバーラップの度合いを小画像の面積に対して50%とし、窓関数にバートレット・ハン(Bartlett-Han)窓関数を利用すると重畳演算で元画像に統合できる。   The image dividing unit 12 divides the image indicated by the image data Im acquired by the image acquiring unit 11 into a plurality of small images (step S301). At this time, as shown in FIG. 2, the image dividing unit 12 divides the image so that adjacent small images are overlapped with each other. The number of divisions (number of small images), the degree of overlap, and the like are determined in advance. In order to perform a frequency domain operation on each small image, the image dividing unit 12 applies a window function to the small image. For example, if the degree of overlap is 50% with respect to the area of the small image and a Bartlett-Han window function is used as the window function, the overlap can be integrated with the original image.

カメラ運動推定部13は、画像分割部12によって得られた小画像に基づいて、露出時間中におけるカメラ運動を推定する(ステップS303)。   The camera motion estimation unit 13 estimates the camera motion during the exposure time based on the small image obtained by the image dividing unit 12 (step S303).

図4は、カメラ運動推定部13がカメラ運動を推定するステップS303の処理を示すフローチャートである。カメラ運動推定部13は、カメラ運動の推定を開始すると、カメラ運動の仮説を予測する(ステップS401)。カメラ運動は、三次元位置とカメラの姿勢との6自由度のパラメータ(Tx,Ty,Tz,θx,θy,θz)で表される。なお、(Tx,Ty,Tz)が予め定められた世界座標系における三次元位置であり、(θx,θy,θz)が世界座標系におけるX軸、Y軸及びZ軸に対する回転量である。   FIG. 4 is a flowchart showing the process of step S303 in which the camera motion estimation unit 13 estimates the camera motion. When the camera motion estimation unit 13 starts estimating the camera motion, the camera motion estimation unit 13 predicts a hypothesis of the camera motion (step S401). The camera motion is represented by parameters (Tx, Ty, Tz, θx, θy, θz) of six degrees of freedom between the three-dimensional position and the camera posture. Note that (Tx, Ty, Tz) is a predetermined three-dimensional position in the world coordinate system, and (θx, θy, θz) is a rotation amount with respect to the X axis, the Y axis, and the Z axis in the world coordinate system.

露出開始時刻におけるカメラ運動を(0,0,0,0,0,0)とする。また、露出時間内のサンプリング数kを事前に定めておくことにする。一般的には露出時間中におけるカメラは自由に運動を行うが、カメラ運動の仮説は、初期位置から終点位置まで等速でカメラが運動することを仮定して仮説を予測する。すなわち、終点(k回目のサンプリング)におけるカメラ運動をMk=(Tx,Ty,Tz,θx,θy,θz)とした場合、露出開始時刻から露出終了時刻(k回目のサンプリング)までの間における時刻(i回目のサンプリング)のカメラ運動Miは、Mi=(i−1)Mk/(k−1)で表すことができる。   Let the camera motion at the exposure start time be (0, 0, 0, 0, 0, 0). In addition, the sampling number k within the exposure time is determined in advance. In general, the camera moves freely during the exposure time, but the hypothesis of the camera motion predicts the hypothesis assuming that the camera moves at a constant speed from the initial position to the end position. That is, when the camera motion at the end point (kth sampling) is Mk = (Tx, Ty, Tz, θx, θy, θz), the time between the exposure start time and the exposure end time (kth sampling). The camera motion Mi of (i-th sampling) can be expressed as Mi = (i−1) Mk / (k−1).

仮説の予測は、ランダムサンプリングにより行う。カメラ運動の要素(Tx,Ty,Tz,θx,θy,θz)それぞれが取り得る値の範囲を予め定めておき、一様分布からランダムにサンプリングを行って得られた値の組み合わせを仮説とする。カメラ運動推定部13は、最終的に6つのパラメータの組み合わせを予め定められたN個選択し、選択した各パラメータの値の組み合わせを仮説として立てる。   Hypothesis prediction is performed by random sampling. A range of values that each of the camera motion elements (Tx, Ty, Tz, θx, θy, θz) can take is determined in advance, and a combination of values obtained by random sampling from a uniform distribution is assumed as a hypothesis. . The camera motion estimation unit 13 finally selects N predetermined combinations of six parameters, and sets a combination of the selected parameter values as a hypothesis.

カメラ運動推定部13は、立てた仮説(ランダムにサンプリングしたパラメータ値の組み合わせ)に基づいて、各小画像のブレ補正カーネルを算出する(ステップS402)。ブレ補正カーネルは、小画像ごとに一様とする近似を行うことで、全体として自由運動に伴う非均一なブレ補正カーネルを算出する。   The camera motion estimation unit 13 calculates a blur correction kernel for each small image based on the established hypothesis (a combination of randomly sampled parameter values) (step S402). The blur correction kernel performs an approximation that is uniform for each small image, thereby calculating a non-uniform blur correction kernel associated with free motion as a whole.

なお、処理の対象になる画像を撮影するカメラで既知のパターンを撮影するなどして、カメラ校正を事前に行い、カメラの内部パラメータを示す内部行列を予め取得しておく。カメラ運動推定部13は、立てた仮説と内部行列などに基づいて、公知の技術を用いてブレ補正カーネルaを算出する。公知の技術として、例えば次の参考文献1に記載の技術を用いることができる。なお、カメラ運動推定部13は、参考文献1に記載されている技術と同様に、デプスは任意の一つの値をとることとする。
[参考文献1]Neel Joshi, Sing Bing Kang, C.Lawrence Zitnick, and Richard Szeliski, "Image Deblurring using Inertial Measurement Sensors", ACM Transactions on Graphics, Volume 29, Issue. 4, July 2010, Article No.30
In addition, camera calibration is performed in advance by capturing a known pattern with a camera that captures an image to be processed, and an internal matrix indicating internal parameters of the camera is acquired in advance. The camera motion estimation unit 13 calculates a shake correction kernel a using a known technique based on the established hypothesis and the internal matrix. As a known technique, for example, the technique described in Reference Document 1 below can be used. Note that the camera motion estimation unit 13 takes an arbitrary value as in the technique described in Reference Document 1.
[Reference 1] Neel Joshi, Sing Bing Kang, C. Lawrence Zitnick, and Richard Szeliski, "Image Deblurring using Inertial Measurement Sensors", ACM Transactions on Graphics, Volume 29, Issue. 4, July 2010, Article No.30

カメラ運動推定部13は、小画像ごとに算出したブレ補正カーネルaを利用して、各小画像の補正を行う(ステップS403)。小画像のデータをgとした場合、次式(1)により周波数空間での演算によってブレ補正後の小画像fを算出することができる。   The camera motion estimation unit 13 corrects each small image by using the shake correction kernel a calculated for each small image (step S403). When the data of the small image is g, the small image f after blur correction can be calculated by the calculation in the frequency space by the following equation (1).

Figure 2015109547
Figure 2015109547

式(1)において、F(・)はフーリエ変換による周波数空間への変換を行う関数を示す。F−1(・)は逆変換、すなわち逆フーリエ変換による時間空間への変換を行う関数を示す。また、○は、対応ベクトル要素同士の積演算を示すオペレーション記号である。また、F(・)はF(・)の複素共役を表す。 In Expression (1), F (•) represents a function for performing conversion to a frequency space by Fourier transform. F −1 (•) represents a function that performs inverse transformation, that is, transformation into time space by inverse Fourier transformation. In addition, ◯ is an operation symbol indicating a product operation between corresponding vector elements. F (•) * represents a complex conjugate of F (•).

カメラ運動推定部13は、式(1)による補正で得られた各小画像fを用いて、補正後の一枚の画像を生成する(ステップS404)。カメラ運動推定部13が各小画像fから生成する画像は、画像取得部11が取得した画像と同じサイズの画像である。各小画像fからの画像の生成は、例えば、画像を小画像に分割する際にオーバーラップの度合いを50%とし、窓関数にバートレット・ハン窓関数を利用した場合には単純な重畳演算で行うことができる。すなわち、元の画像における小画像gの領域に、補正で得られた小画像fを足し込む処理となる。   The camera motion estimation unit 13 generates a single corrected image using each small image f obtained by the correction according to the equation (1) (step S404). The image generated by the camera motion estimation unit 13 from each small image f is an image having the same size as the image acquired by the image acquisition unit 11. An image is generated from each small image f by, for example, a simple superimposition operation when the degree of overlap is 50% when an image is divided into small images and a Bartlett Hann window function is used as a window function. It can be carried out. That is, the processing is to add the small image f obtained by the correction to the area of the small image g in the original image.

カメラ運動推定部13は、小画像fから生成した画像を評価する(ステップS405)。小画像fから生成した画像、すなわち補正後の画像の評価は、例えば参考文献2に記載されている画像に対する精鋭度(Sharpness metric)の評価指標を利用して画像の評価を行うことができる。参考文献2に記載されている評価指標以外にも、画像におけるブレの度合いに反比例した評価値や、画像における被写体などのエッジの尖鋭度を算出できれば、任意の評価関数を用いることができる。
[参考文献2]Rony Ferzli and Lina J. Karam, "A No-Reference Objective Image Sharpness Metric Based on the Notion of Just Noticeable Blur(JNB)", IEEE Transaction on Image Processing, Vol.18, No.4, April 2009, p.717-727
The camera motion estimation unit 13 evaluates an image generated from the small image f (step S405). Evaluation of an image generated from the small image f, that is, an image after correction, can be performed using an evaluation index of sharpness metric with respect to the image described in Reference Document 2, for example. In addition to the evaluation index described in Reference Document 2, any evaluation function can be used as long as an evaluation value inversely proportional to the degree of blurring in the image or the sharpness of the edge of the subject in the image can be calculated.
[Reference 2] Rony Ferzli and Lina J. Karam, "A No-Reference Objective Image Sharpness Metric Based on the Notion of Just Noticeable Blur (JNB)", IEEE Transaction on Image Processing, Vol.18, No.4, April 2009, p.717-727

カメラ運動推定部13は、仮説と、当該仮説に基づいた補正で得られた画像の評価結果を示すスコアSとを対応付けて仮説評価記憶部21に記憶させる(ステップS406)。
カメラ運動推定部13は、仮説評価記憶部21に記憶させた仮説とスコアSとの組の数が予め定められた数Nに達したか否かを判定する(ステップS407)。
The camera motion estimation unit 13 stores the hypothesis and the score S indicating the evaluation result of the image obtained by the correction based on the hypothesis in the hypothesis evaluation storage unit 21 in association with each other (step S406).
The camera motion estimation unit 13 determines whether or not the number of sets of hypotheses and scores S stored in the hypothesis evaluation storage unit 21 has reached a predetermined number N (step S407).

記憶させた仮説とスコアSとの組の数がNに達していない場合(ステップS407:NO)、カメラ運動推定部13は処理をステップS401に戻して、新たな仮説を立てる。
一方、記憶させた仮説とスコアSとの組の数がNに達している場合(ステップS407:YES)、カメラ運動推定部13は、仮説評価記憶部21に記憶されているN個の仮説とスコアSとの組を用いて、露出時間内におけるカメラ運動を決定する(ステップS408)。
If the number of pairs of stored hypotheses and scores S has not reached N (step S407: NO), the camera motion estimation unit 13 returns the processing to step S401 to establish a new hypothesis.
On the other hand, when the number of stored hypotheses and scores S has reached N (step S407: YES), the camera motion estimator 13 includes the N hypotheses stored in the hypothesis evaluation storage 21. A camera motion within the exposure time is determined using the set with the score S (step S408).

カメラ運動の推定において、カメラ運動推定部13は、「(N個の仮説に対するスコアSの総和)×(露出時間内のサンプリング数k)」が1となるように、各仮説に対するスコアSを正規化する。また、6自由度のカメラ運動を量子化した投票箱を用意し、すべての仮説のカメラ運動について正規化を行ったスコアS’を対応する投票箱に投票する。   In the camera motion estimation, the camera motion estimation unit 13 normalizes the score S for each hypothesis so that “(the sum of the scores S for N hypotheses) × (sampling number k within the exposure time)” is 1. Turn into. Also, a ballot box in which the camera motion of 6 degrees of freedom is quantized is prepared, and the score S ′ normalized for the camera motion of all hypotheses is voted on the corresponding ballot box.

カメラ運動推定部13による投票について具体的に説明する。図5は、カメラ運動推定部13が投票の際に用いるテーブルの一例を示す図である。投票に用いられるテーブルは、カメラ運動を示す各パラメータが取り得る範囲の値を量子化して予め作成される。図5に示すように、テーブルは、量子化された値の組み合わせを識別する番号と、カメラ運動を示す各パラメータ(Tx,Ty,Tz,θx,θy,θz)と、投票数との項目を示す列を有し、量子化された値の組み合わせ(投票箱)ごとの行を有する。   The vote by the camera motion estimation unit 13 will be specifically described. FIG. 5 is a diagram illustrating an example of a table used by the camera motion estimation unit 13 for voting. The table used for voting is created in advance by quantizing the range of values that each parameter indicating the camera motion can take. As shown in FIG. 5, the table includes items for identifying a combination of quantized values, parameters indicating camera motion (Tx, Ty, Tz, θx, θy, θz), and the number of votes. And a row for each quantized value combination (voting box).

カメラ運動を示す各パラメータは、例えば0≦Tx,Ty,Tz<10、0≦θx,θy,θz<360のように取り得る値を制限することができる。また、図5に示されている例では、パラメータTxは0.1単位に量子化されている。他のパラメータについても同様に量子化される。例えば、テーブルには、番号「2」、カメラ運動(0.1,0,0,0,0,0)及び投票数「0.03」の投票箱が存在する。   Each parameter indicating the camera motion can be limited to a possible value such as 0 ≦ Tx, Ty, Tz <10, 0 ≦ θx, θy, θz <360. In the example shown in FIG. 5, the parameter Tx is quantized to 0.1 units. The other parameters are similarly quantized. For example, the table includes a ballot box having a number “2”, a camera motion (0.1, 0, 0, 0, 0, 0), and a vote number “0.03”.

カメラ運動推定部13は、N個の仮説を用いて投票を行う。このとき、カメラ運動推定部13は、各仮説を構成するk個のカメラ運動ごとに投票を行う。各カメラ運動に対応するスコアS’は、当該カメラ運動のパラメータに最も近いパラメータの組み合わせの投票箱に投票される。ここで、最も近いパラメータの組み合わせは、例えば投票箱のパラメータ値とカメラ運動との距離(パラメータごとの差の二乗和平方根)が最も小さいものや、パラメータごとの差の総和が最も小さいものである。   The camera motion estimation unit 13 performs voting using N hypotheses. At this time, the camera motion estimation unit 13 performs voting for each k camera motions constituting each hypothesis. The score S 'corresponding to each camera motion is voted on the ballot box of the parameter combination closest to the camera motion parameter. Here, the closest parameter combination is, for example, the one having the smallest distance between the parameter value of the ballot box and the camera motion (the square root of the square of the difference for each parameter) or the smallest sum of the differences for each parameter. .

前述の投票の結果、投票数の高い投票箱に対応するパラメータで示されるカメラ運動は、露出時間中においてカメラが当該カメラ運動で示される位置及び姿勢であった時間が長いことを示すことになる。カメラ運動推定部13は、投票数の最も高いカメラ運動を露出時間中におけるカメラ運動の推定結果としてブレ補正カーネル算出部14に出力する。   As a result of the above-described voting, the camera motion indicated by the parameter corresponding to the ballot box with a high number of votes indicates that the time during which the camera was in the position and posture indicated by the camera motion is long. . The camera motion estimation unit 13 outputs the camera motion having the highest vote count to the blur correction kernel calculation unit 14 as a camera motion estimation result during the exposure time.

また、この投票により、仮説の条件であったカメラ運動が等速であるという条件は当てはまらず、量子化された三次元位置及び姿勢はスコアによる重み付けがなされており、一般的な6自由度のカメラ運動を表現することができる。   In addition, this vote does not apply the hypothetical condition that the camera motion is constant speed, and the quantized three-dimensional position and posture are weighted according to the score. Can express camera movement.

これにより、カメラ運動の推定空間の次元を六次元と低く保ちながらサンプリング数k×六次元のカメラ運動を表現することができる。また、N個の仮説それぞれに対する処理(ステップS401からステップS407までの各処理)は並列して演算することが可能であるため、並列演算を行うことにより、カメラ運動の推定に要する時間を短縮することが可能である。   Thereby, it is possible to represent a camera motion of sampling number k × six dimensions while keeping the dimension of the camera motion estimation space as low as six dimensions. In addition, since the processing for each of the N hypotheses (each processing from step S401 to step S407) can be performed in parallel, the time required for camera motion estimation is reduced by performing the parallel operation. It is possible.

なお、図5に示したテーブルにおける投票箱では、6パラメータのうち1つのパラメータ以外が0であるパラメータの組み合わせが例示されているが、6パラメータの各値の組み合わせは、カメラ運動において取り得る範囲の値を量子化した値の任意の組み合わせ或いはすべての組み合わせであってもよい。   In the ballot box in the table shown in FIG. 5, a combination of parameters in which all but six parameters are zero is exemplified, but the combinations of the values of the six parameters are possible ranges in the camera motion. Any combination or all combinations of values obtained by quantizing the values may be used.

図3に戻りブレ補正処理の説明を続ける。
カメラ運動推定部13がカメラ運動を推定すると、ブレ補正カーネル算出部14は、カメラ運動推定部13が推定したカメラ運動を用いて、各小画像に対するブレ補正カーネルを算出する(ステップS304)。なお、ブレ補正カーネル算出部14によるブレ補正カーネルの算出は、ステップS402におけるカメラ運動推定部13が行う処理と同様である。
Returning to FIG. 3, the description of the blur correction process will be continued.
When the camera motion estimation unit 13 estimates the camera motion, the blur correction kernel calculation unit 14 calculates a blur correction kernel for each small image using the camera motion estimated by the camera motion estimation unit 13 (step S304). Note that the calculation of the blur correction kernel by the blur correction kernel calculation unit 14 is the same as the processing performed by the camera motion estimation unit 13 in step S402.

ブレ補正部15は、ブレ補正カーネル算出部14により算出されたブレ補正カーネルを用いて、各小画像におけるブレ補正を行う(ステップS305)。ブレ補正部15による各小画像におけるブレ補正は、ステップS403におけるカメラ運動推定部13が行う処理と同様である。   The blur correction unit 15 performs blur correction on each small image using the blur correction kernel calculated by the blur correction kernel calculation unit 14 (step S305). The blur correction in each small image by the blur correction unit 15 is the same as the process performed by the camera motion estimation unit 13 in step S403.

画像統合部16は、ブレ補正部15によりブレ補正が行われた各小画像を統合して出力画像を生成し、生成した画像を出力し(ステップS306)、ブレ補正処理を終了させる。画像統合部16による各小画像の統合は、ステップS404におけるカメラ運動推定部13が行う処理と同様である。   The image integration unit 16 integrates the small images that have undergone the blur correction by the blur correction unit 15 to generate an output image, outputs the generated image (step S306), and ends the blur correction process. The integration of the small images by the image integration unit 16 is the same as the process performed by the camera motion estimation unit 13 in step S404.

本実施形態のブレ補正装置1は、上述したブレ補正処理において、画像を撮影する際の露出時間中にカメラが動いたためにブレが生じた画像から、カメラの動きであるカメラ運動を推定し、推定結果に基づいたブレ補正カーネルで小画像ごとにブレ補正を行い、ブレ補正された小画像からブレ補正された画像を生成する。このブレ補正処理によって、ブレが生じた画像から、鮮明なブレのない画像を算出することができる。また、前述のように、カメラ運動を推定する際の処理は、並列化が容易であるので、演算に要する時間を短縮して鮮明なブレのない画像を短時間で得ることが可能となる。   The blur correction device 1 according to the present embodiment estimates the camera motion, which is the movement of the camera, from an image in which blur occurs because the camera has moved during the exposure time when shooting an image in the above-described blur correction processing. Blur correction is performed for each small image by the blur correction kernel based on the estimation result, and an image subjected to blur correction is generated from the small image subjected to blur correction. By this blur correction process, a clear blur-free image can be calculated from the blurring image. Further, as described above, since the process for estimating the camera motion can be easily performed in parallel, it is possible to reduce the time required for the calculation and obtain a clear and blur-free image in a short time.

また、本実施形態のブレ補正装置1によれば、撮影の露出時間中にカメラが動いたためにブレが生じた画像からブレのない画像を得ることができるので、ウェアラブルカメラやアクションカメラのようにカメラが大きく動くような場合においてもブレを補正した画像を得ることができる。   In addition, according to the shake correction apparatus 1 of the present embodiment, a blur-free image can be obtained from an image that has been shaken because the camera has moved during the exposure time of shooting. Even when the camera moves greatly, it is possible to obtain an image in which blurring is corrected.

また、本実施形態のブレ補正装置1では、カメラ運動推定部13がランダムサンプリングにより定めたN個の仮説に基づいてカメラ運動の推定を行うことにより、推定に用いる事前の情報として画像と画像を取得するカメラの内部パラメータ(内部行列)があれば十分であるため、様々な利用シーンに適用することが容易である。   Further, in the shake correction apparatus 1 of the present embodiment, the camera motion estimation unit 13 estimates the camera motion based on N hypotheses determined by random sampling, so that an image and an image are used as prior information used for the estimation. Since it is sufficient if there is an internal parameter (internal matrix) of the camera to be acquired, it is easy to apply to various usage scenes.

上述した実施形態におけるブレ補正装置1をコンピュータで実現するようにしてもよい。その場合、この機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。更に「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであってもよく、更に前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよく、PLD(Programmable Logic Device)やFPGA(Field Programmable Gate Array)等のハードウェアを用いて実現されるものであってもよい。   You may make it implement | achieve the blurring correction apparatus 1 in embodiment mentioned above with a computer. In that case, a program for realizing this function may be recorded on a computer-readable recording medium, and the program recorded on this recording medium may be read into a computer system and executed. Here, the “computer system” includes an OS and hardware such as peripheral devices. The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Further, the “computer-readable recording medium” is a program that dynamically holds a program for a short time, like a communication line when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory inside a computer system serving as a server or a client in that case may be included and a program held for a certain period of time. Further, the program may be for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in the computer system. It may be realized using hardware such as PLD (Programmable Logic Device) or FPGA (Field Programmable Gate Array).

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes designs and the like that do not depart from the gist of the present invention.

1…ブレ補正装置
11…画像取得部
12…画像分割部
13…カメラ運動推定部
14…ブレ補正カーネル算出部
15…ブレ補正部
16…画像統合部
21…仮説評価記憶部
DESCRIPTION OF SYMBOLS 1 ... Shake correction apparatus 11 ... Image acquisition part 12 ... Image division part 13 ... Camera motion estimation part 14 ... Shake correction kernel calculation part 15 ... Shake correction part 16 ... Image integration part 21 ... Hypothesis evaluation storage part

Claims (4)

ブレ補正装置が行うブレ補正方法であって、
画像を取得する画像取得ステップと、
前記画像をタイル形状の小画像に分割する画像分割ステップと、
前記画像及び前記小画像に基づいて前記画像の撮影における露出時間中におけるカメラのカメラ運動であって6自由度を用いて表されるカメラ運動を推定するカメラ運動推定ステップと、
推定されたカメラ運動に基づいてブレ補正カーネルを算出する第1のブレ補正カーネル算出ステップと、
算出されたブレ補正カーネルを用いて前記小画像それぞれに対してブレ補正を行う第1のブレ補正ステップと、
ブレ補正が施された小画像を統合して前記画像と同じサイズの出力画像を生成する画像統合ステップと、
を有することを特徴とするブレ補正方法。
A blur correction method performed by the blur correction device,
An image acquisition step of acquiring an image;
An image dividing step of dividing the image into tile-shaped small images;
A camera motion estimation step for estimating a camera motion of the camera during an exposure time in capturing the image based on the image and the small image and represented using 6 degrees of freedom;
A first blur correction kernel calculating step for calculating a blur correction kernel based on the estimated camera motion;
A first blur correction step for performing blur correction on each of the small images using the calculated blur correction kernel;
An image integration step of integrating a small image subjected to blur correction to generate an output image having the same size as the image;
A blur correction method comprising:
請求項1に記載のブレ補正方法であって、
前記カメラ運動推定ステップは、
複数のカメラ運動の仮説を生成するカメラ運動仮説生成ステップと、
前記カメラ運動の仮説ごとにブレ補正カーネルを算出する第2のブレ補正カーネル算出ステップと、
前記第2のブレ補正カーネル算出ステップにおいて算出されたブレ補正カーネルを用いて前記小画像のブレを補正する第2のブレ補正ステップと、
前記第2のブレ補正ステップにおいてブレ補正が施された小画像から前記カメラ運動の仮説それぞれに対応する仮説画像を生成する仮説画像生成ステップと、
前記カメラ運動の仮説それぞれに対応する仮説画像の精鋭度を算出する評価ステップと、
前記仮説画像それぞれの精鋭度に基づいて前記カメラ運動を決定するカメラ運動決定ステップと、
を有することを特徴とするブレ補正方法。
The blur correction method according to claim 1,
The camera motion estimation step includes
A camera motion hypothesis generation step for generating a plurality of camera motion hypotheses;
A second blur correction kernel calculating step for calculating a blur correction kernel for each camera motion hypothesis;
A second blur correction step of correcting blur of the small image using the blur correction kernel calculated in the second blur correction kernel calculation step;
A hypothesis image generation step of generating a hypothesis image corresponding to each of the hypotheses of the camera motion from the small image subjected to the blur correction in the second blur correction step;
An evaluation step for calculating a sharpness of a hypothesis image corresponding to each of the hypotheses of the camera motion;
A camera motion determination step for determining the camera motion based on the sharpness of each of the hypothesis images;
A blur correction method comprising:
画像を取得する画像取得部と、
前記画像をタイル形状の小画像に分割する画像分割部と、
前記画像及び前記小画像に基づいて前記画像の撮影における露出時間中におけるカメラのカメラ運動であって6自由度を用いて表されるカメラ運動を推定するカメラ運動推定部と、
推定されたカメラ運動に基づいてブレ補正カーネルを算出するブレ補正カーネル算出部と、
算出されたブレ補正カーネルを用いて前記小画像それぞれに対してブレ補正を行うブレ補正部と、
ブレ補正が施された小画像を統合して前記画像と同じサイズの出力画像を生成する画像統合部と、
を備えることを特徴とするブレ補正装置。
An image acquisition unit for acquiring images;
An image dividing unit for dividing the image into tile-shaped small images;
A camera motion estimator for estimating a camera motion represented by using 6 degrees of freedom during the exposure time in capturing the image based on the image and the small image;
A blur correction kernel calculation unit that calculates a blur correction kernel based on the estimated camera motion;
A blur correction unit that performs blur correction on each of the small images using the calculated blur correction kernel;
An image integration unit that generates an output image having the same size as the image by integrating the small images subjected to blur correction;
A shake correction apparatus comprising:
請求項1又は請求項2に記載のブレ補正方法をコンピュータに実行させるためのプログラム。   A program for causing a computer to execute the shake correction method according to claim 1.
JP2013251162A 2013-12-04 2013-12-04 Shake correction method, shake correction device and program Pending JP2015109547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013251162A JP2015109547A (en) 2013-12-04 2013-12-04 Shake correction method, shake correction device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013251162A JP2015109547A (en) 2013-12-04 2013-12-04 Shake correction method, shake correction device and program

Publications (1)

Publication Number Publication Date
JP2015109547A true JP2015109547A (en) 2015-06-11

Family

ID=53439610

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013251162A Pending JP2015109547A (en) 2013-12-04 2013-12-04 Shake correction method, shake correction device and program

Country Status (1)

Country Link
JP (1) JP2015109547A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040711A (en) * 2015-11-11 2017-08-11 佳能株式会社 Device for image stabilization and its control method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107040711A (en) * 2015-11-11 2017-08-11 佳能株式会社 Device for image stabilization and its control method

Similar Documents

Publication Publication Date Title
Aittala et al. Burst image deblurring using permutation invariant convolutional neural networks
EP3099044B1 (en) Multi-frame noise reduction method and terminal
Hu et al. Joint depth estimation and camera shake removal from single blurry image
JP2020005326A (en) Systems and methods for digital video stabilization via constraint-based rotation smoothing
JP2020536460A (en) Image stabilization method for panoramic images, devices and mobile terminals
WO2011084279A2 (en) Algorithms for estimating precise and relative object distances in a scene
US9613404B2 (en) Image processing method, image processing apparatus and electronic device
JP2015019958A5 (en) Magnetic resonance imaging apparatus, image processing apparatus, image processing method, and image processing program
JP5901447B2 (en) Image processing apparatus, imaging apparatus including the same, image processing method, and image processing program
JP7032913B2 (en) Image processing device, image processing method, computer program
JP2017092756A (en) Image processing system, image processing method, image projecting system and program
Zhang et al. Combining inertial measurements with blind image deblurring using distance transform
JP2015046678A (en) Image processing device, image processing method and imaging device
CN113438409B (en) Delay calibration method, delay calibration device, computer equipment and storage medium
CN109074658B (en) Method for 3D multi-view reconstruction by feature tracking and model registration
JP2020087005A (en) Image processor, image generation method and program
CN110689486A (en) Image processing method, device, equipment and computer storage medium
CN117173232A (en) Depth image acquisition method, device and equipment
JP2006195790A (en) Lens distortion estimation apparatus, lens distortion estimation method, and lens distortion estimation program
JP5281479B2 (en) Camera motion / object shape restoration method, camera motion / object shape restoration device, camera motion / object shape restoration program, and recording medium recording the program
JP6359985B2 (en) Depth estimation model generation device and depth estimation device
JP2015109547A (en) Shake correction method, shake correction device and program
EP2980752B1 (en) Image processing device, image processing system, image processing method, and image processing program
Zhen et al. Multi-image motion deblurring aided by inertial sensors
JP2015109548A (en) Shake correction method, shake correction device and program