JP2008160294A - Blur correction device - Google Patents
Blur correction device Download PDFInfo
- Publication number
- JP2008160294A JP2008160294A JP2006344461A JP2006344461A JP2008160294A JP 2008160294 A JP2008160294 A JP 2008160294A JP 2006344461 A JP2006344461 A JP 2006344461A JP 2006344461 A JP2006344461 A JP 2006344461A JP 2008160294 A JP2008160294 A JP 2008160294A
- Authority
- JP
- Japan
- Prior art keywords
- correction
- blur
- pixel value
- filter
- amount
- 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
Images
Landscapes
- Studio Devices (AREA)
Abstract
Description
本発明は、手ぶれなどにより劣化した画像に対して補正を行うぶれ補正装置に関するものである。 The present invention relates to a shake correction apparatus that corrects an image deteriorated due to camera shake or the like.
従来の電子式のぶれ補正の主要な方法の一つとして、撮影した画像に対し、ぶれに応じてぶれ補正するような二次元のフィルタ処理(ぶれの逆フィルタ)をかけて、画像の劣化を改善するものがある。具体的には、撮影時のぶれの点広がり関数(PSF)を求め、その点広がり関数に基づき、畳み込みによる逆フィルタやウィーナフィルタなどによって、ぶれ補正を行う手法がよく用いられている(例えば、特許文献1参照)。また、ぶれの方向や程度に基づいて、ぶれを補正するフィルタを作成する手法が用いられている(例えば、特許文献2参照)。
しかしながら、従来のぶれ補正装置においては、基本的に、フィルタはぶれに応じて1種類のみ作成され、その1種類のフィルタを画像にかけて、ぶれ補正を行っていた。このような1種類のみのフィルタによるぶれ補正では、フィルタの大きさが無限であることが理想的であるが、実際には、画像及びフィルタの大きさはともに有限であり、また、フィルタを大きくすると処理量が増大するため、限られた大きさのフィルタを用いて、ぶれを補正せざるを得なかった。このように、フィルタの大きさを制限すると、撮像した被写体やぶれの形状などによってぶれ補正処理に誤差が生じ、特に、画素値の変化(コントラスト)が大きい部分などでは、部分的に過補正が起きやすく、適切な補正がなされないという問題があった。 However, in the conventional blur correction apparatus, basically, only one type of filter is created according to the blur, and the one type of filter is applied to the image to perform the blur correction. In such a blur correction using only one type of filter, it is ideal that the size of the filter is infinite. However, in practice, both the size of the image and the filter are finite, and the size of the filter is increased. Then, since the processing amount increases, it is necessary to correct blur using a filter of a limited size. As described above, if the filter size is limited, an error occurs in the blur correction process depending on the imaged subject and the shape of the blur. In particular, in a portion where the change (contrast) of the pixel value is large, partial overcorrection occurs. There was a problem that it was easy and proper correction was not made.
本発明は、従来の問題を解決するためになされたもので、過補正が少ない、より適切なぶれ補正を行うことのできる、ぶれ補正装置を提供することを目的とする。 The present invention has been made to solve the conventional problems, and an object thereof is to provide a shake correction apparatus that can perform more appropriate shake correction with less overcorrection.
本発明に係るぶれ補正装置は、画像を入力するための画像入力手段と、画像のぶれを検出するぶれ検出手段と、画像の画素値の変化方向及び変化量を検出する画素値検出手段と、画素値の変化方向及び変化量に応じて調整された補正量に基づいて、画像に対してぶれの補正処理を行う補正手段とを備える。 A blur correction apparatus according to the present invention includes an image input unit for inputting an image, a blur detection unit for detecting a blur of the image, a pixel value detection unit for detecting a change direction and a change amount of a pixel value of the image, And a correction unit that performs blur correction processing on the image based on the correction amount adjusted according to the change direction and the change amount of the pixel value.
この構成によれば、画素値の変化方向及び変化量に応じて、ぶれ補正の補正量を調整することにより、過補正が生じ易い箇所において過補正を低減することができる。この結果、過補正が少ない、より適切なぶれ補正を行うぶれ補正装置を提供することができる。 According to this configuration, it is possible to reduce overcorrection at a place where overcorrection is likely to occur by adjusting the correction amount of blur correction according to the change direction and change amount of the pixel value. As a result, it is possible to provide a shake correction apparatus that performs more appropriate shake correction with less overcorrection.
本発明に係るぶれ補正装置は、画素値の変化方向及び変化量に応じて、ぶれを補正するフィルタに基づく補正量を調整する補正調整手段を更に備える。 The shake correction apparatus according to the present invention further includes a correction adjustment unit that adjusts a correction amount based on a filter that corrects shake according to the change direction and the change amount of the pixel value.
この構成によれば、フィルタによるぶれ補正の補正量を調整することにより、ぶれを補正するフィルタによって生じる過補正を低減することができる。この結果、フィルタによるぶれ補正において、過補正が少ない、より適切なぶれ補正を行うぶれ補正装置を提供することができる。 According to this configuration, it is possible to reduce overcorrection caused by the filter that corrects the shake by adjusting the correction amount of the shake correction by the filter. As a result, it is possible to provide a camera shake correction apparatus that performs more appropriate camera shake correction with less overcorrection in camera shake correction.
本発明に係るぶれ補正装置では、補正調整手段は、ぶれの方向と実質的に一致する画素値の変化方向の画素値の変化量に応じて、補正量を調整する。 In the shake correction apparatus according to the present invention, the correction adjustment unit adjusts the correction amount according to the change amount of the pixel value in the change direction of the pixel value substantially matching the blur direction.
この構成によれば、ぶれの方向に対応する画素値の変化方向の画素値の変化量に応じて補正量を調整することにより、ぶれの方向において画素値の変化量が大きい場合に生じる過補正を低減することができる。この結果、補正箇所が生じ易い箇所において過補正を低減でき、過補正が少ない、より適切なぶれ補正を行うぶれ補正装置を提供することができる。 According to this configuration, the correction amount is adjusted in accordance with the change amount of the pixel value in the change direction of the pixel value corresponding to the blur direction, thereby causing an overcorrection that occurs when the change amount of the pixel value in the blur direction is large. Can be reduced. As a result, it is possible to provide a shake correction apparatus that can reduce over-correction at a place where a correction place is likely to be generated and performs more appropriate shake correction with less over-correction.
本発明に係るぶれ補正装置では、補正調整手段は、フィルタの係数の重み分布に応じて、補正量を調整する。 In the shake correction apparatus according to the present invention, the correction adjustment means adjusts the correction amount according to the weight distribution of the filter coefficients.
この構成によれば、フィルタの係数の重み分布に応じて補正量を調整することにより、フィルタの係数の偏りに起因する過補正を低減することができる。この結果、補正箇所が生じ易い箇所において過補正を低減でき、過補正が少ない、より適切なぶれ補正を行うぶれ補正装置を提供することができる。 According to this configuration, by adjusting the correction amount according to the weight distribution of the filter coefficient, it is possible to reduce overcorrection caused by the bias of the filter coefficient. As a result, it is possible to provide a shake correction apparatus that can reduce over-correction at a place where a correction place is likely to be generated and performs more appropriate shake correction with less over-correction.
本発明に係るぶれ補正方法は、画像を入力し、画像のぶれを検出し、画像の画素値の変化方向及び変化量を検出し、画素値の変化方向及び変化量に応じて調整された補正量に基づいて、画像に対してぶれの補正処理を行うことを特徴とする。 The blur correction method according to the present invention inputs an image, detects the blur of the image, detects the change direction and the change amount of the pixel value of the image, and the correction adjusted according to the change direction and the change amount of the pixel value Based on the amount, blur correction processing is performed on the image.
この構成によれば、画素値の変化方向及び変化量に応じて、ぶれ補正の補正量を調整することにより、過補正が生じ易い箇所において過補正を低減することができる。この結果、過補正が少ない、より適切なぶれ補正を行うぶれ補正方法を提供することができる。 According to this configuration, it is possible to reduce overcorrection at a place where overcorrection is likely to occur by adjusting the correction amount of blur correction according to the change direction and change amount of the pixel value. As a result, it is possible to provide a shake correction method that performs more appropriate shake correction with less overcorrection.
本発明に係るぶれ補正方法では、画素値の変化方向及び変化量に応じて、ぶれを補正するフィルタに基づく補正量を調整する。 In the shake correction method according to the present invention, the correction amount based on the filter for correcting the shake is adjusted according to the change direction and the change amount of the pixel value.
この構成によれば、フィルタによるぶれ補正の補正量を調整することにより、ぶれを補正するフィルタによって生じる過補正を低減することができる。この結果、フィルタによるぶれ補正において、過補正が少ない、より適切なぶれ補正を行うぶれ補正装置を提供することができる。 According to this configuration, it is possible to reduce overcorrection caused by the filter that corrects the shake by adjusting the correction amount of the shake correction by the filter. As a result, it is possible to provide a camera shake correction apparatus that performs more appropriate camera shake correction with less overcorrection in camera shake correction.
本発明に係るぶれ補正方法では、ぶれの方向と実質的に一致する画素値の変化方向の画素値の変化量に応じて、補正量を調整する。 In the shake correction method according to the present invention, the correction amount is adjusted according to the change amount of the pixel value in the change direction of the pixel value substantially matching the blur direction.
この構成によれば、ぶれの方向に対応する画素値の変化方向の画素値の変化量に応じて補正量を調整することにより、ぶれの方向において画素値の変化量が大きい場合に生じる過補正を低減することができる。この結果、補正箇所が生じ易い箇所において過補正を低減でき、過補正が少ない、より適切なぶれ補正を行うぶれ補正方法を提供することができる。
本発明に係るぶれ補正方法では、フィルタの係数の重み分布に応じて、補正量を調整する。
According to this configuration, the correction amount is adjusted in accordance with the change amount of the pixel value in the change direction of the pixel value corresponding to the blur direction, so that the overcorrection that occurs when the change amount of the pixel value in the blur direction is large Can be reduced. As a result, it is possible to provide a shake correction method that can reduce overcorrection at a place where a correction place is likely to occur, and perform more appropriate shake correction with less overcorrection.
In the shake correction method according to the present invention, the correction amount is adjusted according to the weight distribution of the filter coefficients.
この構成によれば、フィルタの係数の重み分布に応じて補正量を調整することにより、フィルタの係数の偏りに起因する過補正を低減することができる。この結果、補正箇所が生じ易い箇所において過補正を低減でき、過補正が少ない、より適切なぶれ補正を行うぶれ補正方法を提供することができる。 According to this configuration, by adjusting the correction amount according to the weight distribution of the filter coefficient, it is possible to reduce overcorrection caused by the bias of the filter coefficient. As a result, it is possible to provide a shake correction method that can reduce overcorrection at a place where a correction place is likely to occur, and perform more appropriate shake correction with less overcorrection.
本発明によれば、ぶれ補正処理の過補正が起き易い場合に、入力画像の画素値の変化方向及び変化量に応じて、画像を補正するための補正量を調整することにより、過補正の少ないより適切で補正精度の高い画像を得ることができるぶれ補正装置を提供することができる。 According to the present invention, when overcorrection of the blur correction process is likely to occur, the overcorrection is corrected by adjusting the correction amount for correcting the image according to the change direction and the change amount of the pixel value of the input image. It is possible to provide a shake correction apparatus that can obtain a smaller and more appropriate image with high correction accuracy.
(第1の実施の形態)
以下、本発明の第1の実施の形態に係るぶれ補正装置及びぶれ補正方法について、図面を用いて説明する。
(First embodiment)
Hereinafter, a shake correction apparatus and a shake correction method according to a first embodiment of the present invention will be described with reference to the drawings.
図1は、本実施の形態のぶれ補正装置の一例を示したものである。図1において、本実施の形態に係るぶれ補正装置は、撮像手段101、信号処理手段102、画素値検出手段103、ぶれ検出手段104、フィルタ作成手段105、補正調整手段106、及び補正手段107を備える。
FIG. 1 shows an example of a shake correction apparatus according to the present embodiment. In FIG. 1, a shake correction apparatus according to the present embodiment includes an
撮像手段101は、被写体を撮像して、被写体の画像の映像信号を信号処理手段102に入力する。信号処理手段102は、撮像手段101から入力された映像信号に対し、ホワイトバランスなどの一般的な映像信号処理を行う。ここでは、撮像手段101と信号処理手段102が、画像入力手段として使用されている。ぶれ検出手段104は、カメラのぶれを検出する。フィルタ作成手段105は、ぶれ検出手段104で得られたぶれの方向・形状を基に、ぶれを補正する二次元のフィルタを作成する。
The
画素値検出手段103は、画像上の処理中の箇所の画素値(例えば、画像の輝度または彩度)の変化方向及び変化量を検出する。つまり、画素値検出手段103は、画像のコントラストの方向及び量を検出する。
The pixel
補正調整手段106は、画素値の変化方向及び変化量に応じて、ぶれ補正処理における補正量を調整するための値を出力する。本実施の形態では、補正調整手段106は、画素値検出手段103で検出される画素値の変化方向及び変化量と、ぶれ検出手段104で検出されるぶれの方向に応じて、ぶれ補正処理における補正量を調整する。ぶれの方向は、フィルタ作成手段105で作成されるフィルタに基づいて判断されてもよい。この場合、補正調整手段106は、画素値の変化方向及び変化量とフィルタとを比較して、ぶれ補正処理における補正量を調整する。
The
補正手段107は、ぶれ検出手段104で検出されたぶれを補正するフィルタに基づいて、画像入力手段から入力された画像に対して補正処理を行う。本実施の形態では、補正手段107は、フィルタ作成手段105で作成されるフィルタを基に、入力された画像に対してぶれ補正処理(フィルタ処理)を行う。このとき、フィルタによる補正量は、補正調整手段106により調整されており、補正手段107は、調整された補正量に基づいて補正処理を行い、補正画像を作成することになる。
以上のように構成されるぶれ補正装置の動作について、図2のフローチャートを用いて説明する。
The
The operation of the shake correction apparatus configured as described above will be described with reference to the flowchart of FIG.
まず、ステップS100において、画像を入力する。本実施の形態では、撮像手段101により被写体が撮像され、得られた画像が映像信号として入力される。そして、この映像信号に対し、信号処理手段102がホワイトバランスや明るさの調整などの画像に対する一般的な処理を行う。
First, in step S100, an image is input. In the present embodiment, a subject is imaged by the imaging means 101, and the obtained image is input as a video signal. The
ステップS101において、画像のぶれを検出する。本実施の形態では、ぶれ検出手段104が、撮像手段101により被写体が撮像された際に、カメラがどのようにぶれたかついて、ぶれの方向や形状の検出を行う。具体的なぶれの検出方法として、ジャイロセンサを用いる方法や、撮影した画像からぶれを求める方法などがある。但し、ぶれの検出方法は、これらに限定されない。そして、図3に示すように、ぶれ検出手段104が、検出されたぶれに基づいて、点広がり関数(PSF)を取得する。点広がり関数は、任意の点の画素値が撮影時のぶれによりどのように拡散したかを示す関数である。
In step S101, image blur is detected. In the present embodiment, the
そして、ステップS102において、ぶれを補正するフィルタを作成する。本実施の形態では、フィルタ作成手段105がフィルタを作成する。フィルタ作成手段105は、点広がり関数を基に、二次元のフィルタを作成する。例えば、フィルタは、畳み込みによるフィルタやウィーナフィルタなどによって構成される。但し、フィルタの作成方法は、これらに限定されない。 In step S102, a filter for correcting blur is created. In the present embodiment, the filter creation means 105 creates a filter. The filter creation means 105 creates a two-dimensional filter based on the point spread function. For example, the filter is configured by a convolution filter, a Wiener filter, or the like. However, the filter creation method is not limited to these.
従来では、補正量を調整せずにフィルタを画像にかけていたため、部分的に過補正が生じていた。過補正が生じる原因の一つとして、フィルタの大きさの問題が挙げられる。通常、フィルタによるぶれ補正では、画像及びフィルタの大きさが無限であることが理想的であるが、フィルタの大きさが処理の時間や回路の規模などにも影響するため、フィルタの大きさが制限されることが多い。このため、フィルタの大きさの制限に起因して、補正量の誤差が発生するという問題があった。例えば、フィルタの大きさが制限されているために、ぶれ補正処理の計算を打ち切った部分においては、ぶれが生じているにもかかわらず、ぶれが生じていないものとしてみなされたうえで、ぶれ補正処理が行われる。この結果、ぶれの有無によって画素値が大きく異なる場合は、ぶれの補正量に誤差が発生する。 Conventionally, since the filter is applied to the image without adjusting the correction amount, partial overcorrection has occurred. One cause of overcorrection is the problem of filter size. Usually, in the blur correction using a filter, it is ideal that the size of the image and the filter is infinite. However, since the size of the filter affects the processing time and the scale of the circuit, the size of the filter is small. Often limited. For this reason, there has been a problem that an error in the correction amount occurs due to the limitation of the size of the filter. For example, because the size of the filter is limited, in the part where the calculation of the blur correction process is terminated, it is assumed that there is no blur, but the blur is not generated. Correction processing is performed. As a result, if the pixel value varies greatly depending on the presence or absence of blur, an error occurs in the blur correction amount.
具体的に、過補正の発生について説明する。図4に示すように、ぶれた画像では、ぶれにより周辺画素の画素値が混入する。ここで、図4(a)に示すように、注目画素と周辺画素の画素値が近似している場合は、ぶれの有無にかかわらず、画像の画素値はあまり異ならない。つまり、周辺画素の画素値が混入しても、ぶれの補正量の誤差は小さい。一方、図4(b)に示すように、周辺画素の画素値に対する注目画素の画素値の変化量が大きい場合は、ぶれの有無によって画素値が大きく異なってしまう。このような場合、ぶれ補正処理のための計算が打ち切られると、ぶれの有無による画素値の差を無視してぶれ補正処理を行うことになるため、その差が補正量に影響を与え、補正量に誤差が生じる。例えば、画像上で輝度の変化量が大きい箇所では、この輝度の変化量が大きい方向へのぶれが生じると、補正量の誤差が発生しやすくなる。つまり、ぶれの方向と一致する画素値の変化方向の画素値の変化量によって過補正が生じる。 Specifically, the occurrence of overcorrection will be described. As shown in FIG. 4, in the blurred image, pixel values of surrounding pixels are mixed due to the blur. Here, as shown in FIG. 4A, when the pixel values of the target pixel and the peripheral pixels are approximate, the pixel values of the image are not so different regardless of the presence or absence of blurring. That is, even if the pixel values of the surrounding pixels are mixed, the error in the amount of blur correction is small. On the other hand, as shown in FIG. 4B, when the amount of change in the pixel value of the pixel of interest with respect to the pixel values of the surrounding pixels is large, the pixel value varies greatly depending on the presence or absence of blurring. In such a case, if the calculation for the blur correction process is terminated, the blur correction process is performed ignoring the difference in pixel value due to the presence / absence of the blur, and the difference affects the correction amount. There is an error in the quantity. For example, at a location where the amount of change in luminance is large on the image, an error in the correction amount is likely to occur if blurring occurs in the direction in which the amount of change in luminance is large. That is, overcorrection is caused by the amount of change in the pixel value in the change direction of the pixel value that matches the blur direction.
以上のような誤差を調整するために、本実施の形態では、画像の画素値の変化方向及び変化量を検出し、画素値の変化方向及び変化量に応じて、補正量を調整する。 In this embodiment, in order to adjust the error as described above, the change direction and change amount of the pixel value of the image are detected, and the correction amount is adjusted according to the change direction and change amount of the pixel value.
具体的には、ステップS103において、画素値検出手段103が画素値の変化方向及び変化量を検出する。例えば、画素値検出手段103は、補正処理の対象となる箇所の周辺画素について、輝度の変化方向と変化量を検出する。この検出の方法としては、例えば、図5に示すように、ぶれ補正の処理対象領域における水平方向の画素値と垂直方向の画素値に基づいて、画素値の変化方向と変化量を得る方法がある。また、処理対象領域での画素値が最大となる画素位置及び最小となる画素位置に基づいて、画素値の変化方向と変化量を得る方法を採用してもよい。
Specifically, in step S103, the pixel
そして、ステップS104において、補正調整手段106がぶれ補正の補正量を調整する。補正調整手段106は、上述の処理対象領域における画素値の方向及び変化量に関する情報を画素値検出手段103から受け取り、ぶれ方向に関する情報をぶれ検出手段104から受け取る。ぶれ方向に関する情報は、フィルタ作成手段105によって作成されるフィルタに基づいて生成されてもよい。この場合、補正調整手段106は、ぶれ方向に関する情報をフィルタ作成手段105から受け取る。
In step S104, the
補正調整手段106は、画素値の変化方向及び変化量に関する情報とぶれ方向に関する情報とを基に、ぶれ補正の処理対象領域で過補正が起きるか否かを判定し、その結果により、画素値の変化方向及び変化量に応じて、フィルタ作成手段105により作成されるフィルタの補正量を調整し、調整された補正量を補正手段107へ出力する。そして、補正手段107が、調整された補正量に基づいてフィルタを画像にかける(即ち、コンボリューションを行う)ことにより、ぶれが補正された画像を作成する。
The
次に、補正量を調整するための値を算出する方法の一例を説明する。補正手段107におけるぶれ補正処理で、補正後の画像の画素値を「P’」、補正前の画像の画素値を「P」、そして、フィルタによる補正量を「D」として、以下の式(1)が成り立つとする。
P’ = P + D ・・・・・(1)
Next, an example of a method for calculating a value for adjusting the correction amount will be described. In the shake correction processing in the
P ′ = P + D (1)
この場合、以下の式(2)に示すように、補正量Dを調整する補正ゲインを「G」として補正量Dに乗算することによって、補正量Dの強弱を調整する。
P’ = P + D × G ・・・・・(2)
補正ゲインGは、画素値の変化方向及び変化量に応じて、補正調整手段106が算出する。
In this case, the intensity of the correction amount D is adjusted by multiplying the correction amount D by setting the correction gain for adjusting the correction amount D to “G” as shown in the following equation (2).
P ′ = P + D × G (2)
The correction gain G is calculated by the
次に、補正ゲインGを決定する方法の一例を説明する。図6に示すように、補正処理の対象となる処理対象領域において過補正を抑えるために、ぶれの方向と実質的に一致する画素値の変化方向の画素値の変化量の大きさによって補正ゲインGを決定する。例えば、図6に示すように、画素値の変化量が「P1」と「P2」の区間にある場合、画素値の変化量が大きくなるほど、補正ゲインGを小さくする。このようにして求められた補正ゲインを「G1」とする。つまり、補正ゲインG1により、ぶれの方向と実質的に一致する画素値の変化方向の画素値の変化量に応じて、補正量を変化させる。具体的には、補正調整手段106が、ぶれの方向と実質的に一致する画素値の変化方向の画素値の変化量に応じて補正ゲインG1を出力し、式(2)に示すように、補正量に補正ゲインG1を乗算することによって補正量を調整する。
Next, an example of a method for determining the correction gain G will be described. As shown in FIG. 6, in order to suppress overcorrection in the processing target area to be corrected, the correction gain is determined by the magnitude of the change amount of the pixel value in the change direction of the pixel value substantially matching the blur direction. G is determined. For example, as illustrated in FIG. 6, when the change amount of the pixel value is in a section between “P1” and “P2”, the correction gain G is decreased as the change amount of the pixel value is increased. The correction gain obtained in this way is set as “G1”. That is, the correction amount is changed by the correction gain G1 according to the change amount of the pixel value in the change direction of the pixel value substantially matching the blur direction. Specifically, the
本実施の形態に係るぶれ補正装置及びぶれ補正方法によれば、ぶれの方向に対応する画素値の変化方向の画素値の変化量に応じて補正量を調整することにより、ぶれの方向において画素値の変化量が大きい場合に生じる過補正を低減することができる。この結果、補正箇所が生じ易い箇所において過補正を低減でき、過補正が少ない、より適切なぶれ補正を行うぶれ補正装置を提供することができる。 According to the shake correction apparatus and the shake correction method according to the present embodiment, by adjusting the correction amount according to the change amount of the pixel value in the change direction of the pixel value corresponding to the shake direction, the pixels in the shake direction are adjusted. The overcorrection that occurs when the amount of change in value is large can be reduced. As a result, it is possible to provide a shake correction apparatus that can reduce over-correction at a place where a correction place is likely to be generated and performs more appropriate shake correction with less over-correction.
(第2の実施の形態)
以下、本発明の第2の実施の形態に係るぶれ補正装置及びぶれ補正方法について説明する。但し、第2の実施の形態に係るぶれ補正装置は、図1に示すような第1の実施の形態に係るぶれ補正装置と同様の構成を有しており、重複する部分については説明を省略する。また、第2の実施の形態に係るぶれ補正方法は、図2に示すような第1の実施の形態に係るぶれ補正方法と同様の工程を有しており、重複する部分については説明を省略する。
(Second Embodiment)
Hereinafter, a shake correction apparatus and a shake correction method according to the second embodiment of the present invention will be described. However, the shake correction apparatus according to the second embodiment has the same configuration as the shake correction apparatus according to the first embodiment as shown in FIG. To do. Further, the shake correction method according to the second embodiment has the same steps as the shake correction method according to the first embodiment as shown in FIG. To do.
本実施の形態では、フィルタの係数の重み分布に応じて、ぶれ補正の補正量を調整する。即ち、ぶれ補正における過補正の発生要因として、フィルタの係数の偏りが挙げられるが、本実施の形態では、このフィルタの係数の偏りを考慮した補正ゲインを「G2」として、補正ゲインG2により補正量の調整を行う。 In this embodiment, the amount of blur correction is adjusted according to the weight distribution of the filter coefficients. In other words, the cause of overcorrection in blur correction is the bias of the filter coefficient. In this embodiment, the correction gain considering the bias of the filter coefficient is set to “G2”, and correction is performed by the correction gain G2. Adjust the amount.
具体的に、過補正の発生について説明する。通常、フィルタをかける際には、ノイズの増加を抑えるため、フィルタの最大係数がある箇所を中心としてフィルタをかけることが多いが、この最大係数の箇所がフィルタの重心と一致するとは限らない。ここで、フィルタの重心とは、フィルタの係数の重みが釣り合う箇所である。 Specifically, the occurrence of overcorrection will be described. Usually, when applying a filter, in order to suppress an increase in noise, the filter is often applied around a portion having the maximum coefficient of the filter, but the portion having the maximum coefficient does not always coincide with the center of gravity of the filter. Here, the center of gravity of the filter is a place where the weights of the coefficients of the filter are balanced.
最大係数の箇所がフィルタの重心と一致する場合は、過補正は小さい。一方、最大係数の箇所がフィルタの重心と一致しない場合は、最大係数の箇所とフィルタの重心との乖離が過補正の発生に影響を与える。 If the location of the maximum coefficient matches the center of gravity of the filter, the overcorrection is small. On the other hand, when the location of the maximum coefficient does not coincide with the center of gravity of the filter, the deviation between the location of the maximum coefficient and the center of gravity of the filter affects the occurrence of overcorrection.
次に、図7を参照して、フィルタの最大係数の箇所とフィルタの重心との乖離に起因する過補正について説明する。図7(a)に示すように、フィルタの最大係数がフィルタの中央付近にあり、最大係数の両側の係数の重みがほぼ釣り合っている(最大係数の箇所がフィルタの重心と一致している)場合は、過補正は小さい。一方、図7(b)に示すように、フィルタの最大係数がフィルタの端部付近にあり、最大係数の両側の係数の重みが一方に偏っている(最大係数の箇所がフィルタの重心と一致しない)場合は、過補正が大きくなる。 Next, with reference to FIG. 7, the overcorrection caused by the difference between the location of the maximum coefficient of the filter and the center of gravity of the filter will be described. As shown in FIG. 7A, the maximum coefficient of the filter is in the vicinity of the center of the filter, and the weights of the coefficients on both sides of the maximum coefficient are substantially balanced (the position of the maximum coefficient matches the center of gravity of the filter). If so, overcorrection is small. On the other hand, as shown in FIG. 7B, the maximum coefficient of the filter is near the end of the filter, and the weight of the coefficient on both sides of the maximum coefficient is biased to one side (the position of the maximum coefficient matches the center of gravity of the filter) If not, overcorrection will increase.
このようなフィルタの係数の最大係数の箇所とフィルタの重心との乖離に起因する過補正の影響を調整するために、ぶれの方向に対して、フィルタの係数の重み分布を検出し、フィルタの係数の偏りの大きさに応じて、補正ゲインG2を決定する。つまり、フィルタの係数の重み分布に応じて補正ゲインG2を算出し、ぶれの方向と実質的に一致する画素値の変化方向の補正量を変化させる。具体的には、補正調整手段106が、フィルタの係数の重み分布に応じて、補正量を調整するための補正ゲインG2を出力し、補正ゲインG2に従って補正量を調整する。
In order to adjust the influence of overcorrection caused by the difference between the location of the maximum coefficient of the filter coefficient and the center of gravity of the filter, the weight distribution of the filter coefficient is detected in the blur direction, and the filter The correction gain G2 is determined according to the magnitude of the coefficient bias. That is, the correction gain G2 is calculated according to the weight distribution of the filter coefficients, and the correction amount in the change direction of the pixel value substantially matching the blur direction is changed. Specifically, the
補正ゲインG2を決定する方法の一例を説明する。補正調整手段106は、フィルタの係数の最大係数の箇所が、ぶれの方向にどれほど偏っているかによって、補正ゲインG2を算出する。例えば、図8に示すように、垂直方向にぶれが生じている場合、垂直方向の最大係数の箇所の偏りが検出される。具体的には、最大係数の箇所を基準として、フィルタの係数の上側の合計「m」と下側の合計「n」を求め、以下の式(3)に示すように、係数の合計「m」と「n」の比率「R」を算出することにより、最大係数の箇所と重心との乖離を検出する。
R =m/n (m<n)
R =n/m (m≧n) ・・・・・(3)
An example of a method for determining the correction gain G2 will be described. The
R = m / n (m <n)
R = n / m (m ≧ n) (3)
式(3)によれば、比率Rが「1」に近いほど乖離の程度が小さいと判断され、比率Rが「0」に近いほど乖離の程度が大きいと判断される。このように、比率Rの大きさによりフィルタの係数の最大係数の箇所と重心との乖離が判断され、乖離の程度が大きいときは、補正ゲインG2を小さくする。 According to Equation (3), it is determined that the degree of divergence is smaller as the ratio R is closer to “1”, and the degree of divergence is larger as the ratio R is closer to “0”. Thus, the deviation between the location of the maximum coefficient of the filter coefficient and the center of gravity is determined based on the ratio R, and when the degree of deviation is large, the correction gain G2 is reduced.
上記の例では、最大係数の箇所を基準として、フィルタの係数の合計の比率により補正ゲインG2を算出したが、別の例として、フィルタの重心となる箇所を求めて、これと最大係数の箇所との乖離を検出し、この乖離の程度に基づいて補正ゲインG2を算出してもよい。 In the above example, the correction gain G2 is calculated based on the ratio of the total coefficients of the filter with the location of the maximum coefficient as a reference. However, as another example, the location of the center of gravity of the filter is obtained, and this is the location of the maximum coefficient. May be detected, and the correction gain G2 may be calculated based on the degree of the deviation.
また、上記の例では、フィルタの最大係数の箇所とフィルタの重心との乖離に基づいて補正ゲインG2を算出したが、PSFの最大係数に対応するフィルタの係数の箇所とフィルタの重心との乖離に基づいて補正ゲインG2を算出してもよい。 In the above example, the correction gain G2 is calculated based on the difference between the location of the maximum coefficient of the filter and the center of gravity of the filter. However, the difference between the location of the filter coefficient corresponding to the maximum coefficient of the PSF and the center of gravity of the filter is calculated. The correction gain G2 may be calculated based on the above.
本実施の形態に係るぶれ補正装置及びぶれ補正方法によれば、フィルタの係数の重み分布に応じて補正量を調整することにより、フィルタの係数の偏りに起因する過補正を低減することができる。この結果、補正箇所が生じ易い箇所において過補正を低減でき、過補正が少ない、より適切なぶれ補正を行うぶれ補正装置を提供することができる。
(その他の実施の形態)
According to the shake correction apparatus and the shake correction method according to the present embodiment, it is possible to reduce overcorrection caused by the bias of the filter coefficient by adjusting the correction amount according to the weight distribution of the filter coefficient. . As a result, it is possible to provide a shake correction apparatus that can reduce overcorrection at a place where a correction place is likely to be generated, and perform more appropriate shake correction with less overcorrection.
(Other embodiments)
以上説明したように、第1及び第2の実施の形態において、補正ゲインG1と補正ゲインG2が算出されるが、その他の実施の形態として、下記の式(4)に示すように、補正ゲインG1と補正ゲインG2を乗算することにより、補正ゲインGを得てもよい。
G = G1 × G2 ・・・・・(4)
As described above, in the first and second embodiments, the correction gain G1 and the correction gain G2 are calculated. As another embodiment, as shown in the following equation (4), the correction gain G1 is calculated. The correction gain G may be obtained by multiplying G1 and the correction gain G2.
G = G1 × G2 (4)
この場合、式(4)に示す補正ゲインGにより調整された補正量で、補正手段107が画像に対してぶれ補正を行う。この結果、画素値の変化量及びフィルタの係数の重み分布の両方に起因する過補正を低減でき、より適切な補正結果を得ることができる。
In this case, the
また、下記の式(5)に示すように、補正量Dの範囲を制限するクリップ値Cを設けることにより、補正量を調整してもよい。
−C ≦ D ≦ C ・・・・・(5)
Further, as shown in the following equation (5), the correction amount may be adjusted by providing a clip value C that limits the range of the correction amount D.
−C ≦ D ≦ C (5)
式(5)によれば、クリップ値Cにより補正量Dがクリップされるため、補正量の調整が過大にならないように制限され、この結果、より適切な補正結果を得ることができる。
また、補正量の調整は、フィルタの係数自体を部分的に増減させる方法などによって行われてもよい。
According to the equation (5), the correction amount D is clipped by the clip value C, so that the adjustment of the correction amount is limited so as not to be excessive. As a result, a more appropriate correction result can be obtained.
Further, the adjustment of the correction amount may be performed by a method of partially increasing or decreasing the filter coefficient itself.
なお、第1の実施の形態では、図1に示すように、一般的な画像信号処理を行う信号処理手段102の後段に、補正手段107などのぶれ補正処理を行う手段を配置したが、必要に応じて、信号処理手段102の前段に、ぶれ補正処理を行う手段を配置してもよい。また、ぶれ補正処理を行う手段を、信号処理手段102の処理の一部として実装するような構成にしてもよい。 In the first embodiment, as shown in FIG. 1, a means for performing blur correction processing such as the correction means 107 is disposed after the signal processing means 102 for performing general image signal processing. Accordingly, a means for performing the shake correction process may be arranged in the preceding stage of the signal processing means 102. Further, the means for performing the blur correction process may be implemented as a part of the process of the signal processing means 102.
また、第1の実施の形態では、画像入力手段である撮像手段101及び信号処理手段102によって、入力画像が得られるという構成になっているが、これらの画像入力手段の代わりに、撮影された画像を格納する記録媒体から読み出された画像に対して、ぶれ補正処理を行うような構成にすることも可能である。 Further, in the first embodiment, the input image is obtained by the image pickup means 101 and the signal processing means 102 which are image input means. However, instead of these image input means, a photograph was taken. It is also possible to adopt a configuration in which blur correction processing is performed on an image read from a recording medium that stores the image.
また、第1の実施の形態では、フィルタ作成手段105は、ぶれ検出手段104で得られたぶれの方向・形状を基に、ぶれを補正する二次元のフィルタを作成するが、フィルタ作成手段105は、フィルタを格納する記録媒体から所望のフィルタを選択的に読み出してもよい。
In the first embodiment, the
以上のように、本発明に係るぶれ補正装置は、過補正の少ないより適切な補正結果を得ることができるという効果を有し、手ぶれなどにより劣化した画像に対してぶれ補正を行う撮像装置として有用である。 As described above, the shake correction apparatus according to the present invention has an effect of obtaining a more appropriate correction result with less overcorrection, and is an image pickup apparatus that performs shake correction on an image deteriorated due to camera shake or the like. Useful.
101 撮像手段
102 信号処理手段
103 画素値検出手段
104 ぶれ検出手段
105 補正フィルタ作成手段
106 補正調整手段
107 補正手段
DESCRIPTION OF
Claims (8)
前記画像のぶれを検出するぶれ検出手段と、
前記画像の画素値の変化方向及び変化量を検出する画素値検出手段と、
前記画素値の変化方向及び変化量に応じて調整された補正量に基づいて、前記画像に対して前記ぶれの補正処理を行う補正手段と、
を備えることを特徴とする、ぶれ補正装置。 An image input means for inputting an image;
Blur detection means for detecting blur of the image;
Pixel value detection means for detecting a change direction and a change amount of a pixel value of the image;
Correction means for performing the blur correction processing on the image based on a correction amount adjusted according to a change direction and a change amount of the pixel value;
A shake correction apparatus comprising:
前記画像のぶれを検出し、
前記画像の画素値の変化方向及び変化量を検出し、
前記画素値の変化方向及び変化量に応じて調整された補正量に基づいて、前記画像に対して前記ぶれの補正処理を行うことを特徴とする、ぶれ補正方法。 Enter an image,
Detecting blur of the image,
Detecting a change direction and a change amount of a pixel value of the image;
A blur correction method, wherein the blur correction process is performed on the image based on a correction amount adjusted according to a change direction and a change amount of the pixel value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006344461A JP2008160294A (en) | 2006-12-21 | 2006-12-21 | Blur correction device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006344461A JP2008160294A (en) | 2006-12-21 | 2006-12-21 | Blur correction device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008160294A true JP2008160294A (en) | 2008-07-10 |
Family
ID=39660748
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006344461A Pending JP2008160294A (en) | 2006-12-21 | 2006-12-21 | Blur correction device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008160294A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108737734A (en) * | 2018-06-15 | 2018-11-02 | Oppo广东移动通信有限公司 | Image compensation method and device, computer readable storage medium and electronic equipment |
-
2006
- 2006-12-21 JP JP2006344461A patent/JP2008160294A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108737734A (en) * | 2018-06-15 | 2018-11-02 | Oppo广东移动通信有限公司 | Image compensation method and device, computer readable storage medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4487191B2 (en) | Image processing apparatus and image processing program | |
US8792009B2 (en) | Image pickup apparatus that performs image pickup using rolling shutter method, method of controlling the same, and storage medium | |
JP2011029735A (en) | Image processor, imaging device, and image processing method | |
JP2008160300A (en) | Image processor, and imaging apparatus | |
JP2012170006A (en) | Image processing device, image processing method, image processing program, and imaging device | |
JP6648914B2 (en) | Image processing apparatus, image processing method, and program | |
US20110158541A1 (en) | Image processing device, image processing method and program | |
US8989510B2 (en) | Contrast enhancement using gradation conversion processing | |
EP1968308A1 (en) | Image processing method, image processing program, image processing device, and imaging device | |
JP2018207413A (en) | Imaging apparatus | |
JP2007006045A (en) | Method and device for correcting camera shake, and imaging apparatus | |
JP5836110B2 (en) | Imaging apparatus and control method thereof | |
JP2006311058A (en) | Motion vector detection circuit and detection method thereof, and camera shake correction apparatus | |
KR20110075366A (en) | A digital photographing apparatus, a method for controlling the same, and a computer-readable medium | |
TW202044819A (en) | Roll compensation and blur reduction in tightly synchronized optical image stabilization (ois) | |
JP2008160294A (en) | Blur correction device | |
JP4383379B2 (en) | Image stabilizer | |
JP6730423B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2009177792A (en) | Image processing unit and imaging device | |
JP2015195453A (en) | Image processing device and image processing method | |
JP2010026994A (en) | Image processing method, image processing apparatus and image processing system | |
JP2009121870A (en) | Stereo image processing device, stereo image processing method, and program | |
JP2016208343A (en) | Image processing system, control method of the same, control program, and imaging apparatus | |
JP2010079815A (en) | Image correction device | |
JP2007043393A (en) | Image processor, image processing method, image processing program, and program recording medium |