JP2007036894A - Image processing device - Google Patents
Image processing device Download PDFInfo
- Publication number
- JP2007036894A JP2007036894A JP2005219634A JP2005219634A JP2007036894A JP 2007036894 A JP2007036894 A JP 2007036894A JP 2005219634 A JP2005219634 A JP 2005219634A JP 2005219634 A JP2005219634 A JP 2005219634A JP 2007036894 A JP2007036894 A JP 2007036894A
- Authority
- JP
- Japan
- Prior art keywords
- value
- correction
- blur
- threshold value
- pixel
- 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
本発明は2次元画像を処理するための画像処理技術に関し、特に撮影動作等により劣化したブレ画像を原画像に近い画像に補正するための画像処理技術に関する。 The present invention relates to an image processing technique for processing a two-dimensional image, and more particularly to an image processing technique for correcting a blurred image deteriorated by a photographing operation or the like to an image close to an original image.
カメラ等の撮像装置によって撮影された画像が手ブレや被写体ブレ等によりブレを生じた際に、ブレ画像を復元(補正)する画像復元方法が知られている。
一般的に用いられる画像復元処理として、手ブレ部分を回復させる回復フィルタ(例えば逆フィルタやウイーナフィルタ等)による処理や、画像の点広がり関数(PSF:Point Spread Function)から手ぶれ部分を復元するための情報を推定する処理などがある。たとえば下記特許文献1には、手ブレの軌跡データに基づき生成した点広がり関数を用いて手ブレ画像を復元する際に、手ブレ軌跡上の画素周辺の画素の輝度値を考慮して復元を行う技術が開示されている。
また、ブレが生じたときに視認される「ボケ」を、輪郭強調によって修正することが可能であり、たとえば下記特許文献2には、遅延回路と振幅制限回路を設けた輪郭補正方法が開示されている。
There is known an image restoration method for restoring (correcting) a blurred image when an image taken by an imaging device such as a camera is shaken due to camera shake or subject blur.
Commonly used image restoration processing is a restoration filter (for example, an inverse filter or a Wiener filter) that restores the camera shake part, or restores the camera shake part from an image point spread function (PSF). There is a process for estimating information for the purpose. For example, in
Further, “blur” visually recognized when blurring can be corrected by contour emphasis. For example,
ところで、上記特許文献1に開示された技術では、ブレ軌跡の周辺画素の輝度値をそのブレ軌跡からの距離に応じて推定することでブレ画像を復元するが、その推定演算(特許文献1の式(11)参照)による演算部の負担が大きい。
また、上記特許文献2に開示された技術によって輪郭を強調した場合には、人間の肌のようになめらかなグラデーションの部分において不自然な強調が行われてしまう。
By the way, in the technique disclosed in
Further, when the contour is emphasized by the technique disclosed in
本発明は、上述した観点に鑑みてなされてものであって、その目的は、簡便な処理によってブレ画像を適切に補正するようにした画像処理装置を提供することにある。 The present invention has been made in view of the above-described viewpoints, and an object thereof is to provide an image processing apparatus that appropriately corrects a blurred image by a simple process.
上記課題を克服するため、本発明は、ブレ画像におけるブレ領域の中心画素を中心とした、少なくとも当該ブレ領域を含む画素領域に対して、当該画素領域の中心付近の画素における画素値の変化を強調するフィルタを施し、前記中心画素に対応した画素値の第1補正値を生成するフィルタ手段と、第1閾値から当該第1閾値より大きい第2閾値までの範囲内に収まるように、前記第1補正値を制限して第2補正値を生成するリミッタ手段と、
前記ブレ画像において前記中心画素を順に走査し、各画素における画素値を前記第2補正値とする補正手段とを備えた画像処理装置である。
In order to overcome the above-described problem, the present invention changes the pixel value of a pixel near the center of the pixel area with respect to a pixel area including at least the blur area, with the center pixel of the blur area in the blur image as the center. Filter means for applying an emphasis filter and generating a first correction value of a pixel value corresponding to the central pixel, and the first threshold value so as to fall within a range from a first threshold value to a second threshold value greater than the first threshold value. Limiter means for limiting the one correction value to generate the second correction value;
The image processing apparatus includes a correcting unit that sequentially scans the central pixel in the blurred image and sets a pixel value in each pixel as the second correction value.
好適には、前記第1閾値は、前記ブレ領域に含まれる画素の画素値の最小値とし、前記第2閾値は、前記ブレ領域に含まれる画素の画素値の最大値とし、
前記補正手段は、前記最大値および最小値の差分値が所定の第3閾値よりも小さいことを条件として、前記ブレ領域の補正を行わない。
Preferably, the first threshold value is a minimum value of pixel values of pixels included in the blur region, and the second threshold value is a maximum value of pixel values of pixels included in the blur region,
The correction means does not correct the blur region on the condition that the difference value between the maximum value and the minimum value is smaller than a predetermined third threshold value.
好適には、前記補正手段は、前記差分値が前記第3閾値よりも小さい所定の第4閾値よりもさらに小さいことを条件として、前記ブレ領域の補正を行う。 Preferably, the correction unit corrects the blur region on the condition that the difference value is further smaller than a predetermined fourth threshold value that is smaller than the third threshold value.
好適には、前記補正手段は、ブレ画像から得られるRGBの色ごとの前記最大値および最小値の差分値の中で最大のものを、前記第3閾値または第4閾値と比較する。 Preferably, the correction means compares the maximum difference value between the maximum value and the minimum value for each RGB color obtained from the blurred image with the third threshold value or the fourth threshold value.
好適には、前記補正手段は、水平軸からの角度が0度、±30度、±45度、±60度、±90度のブレ方向に限定して、前記ブレ領域を補正する。 Preferably, the correction unit corrects the blur region by limiting the blur direction to angles of 0 degrees, ± 30 degrees, ± 45 degrees, ± 60 degrees, and ± 90 degrees from the horizontal axis.
好適には、前記ブレ領域の水平軸からのブレ方向を検出するための角度検出手段または加速度検出手段、を備える。 Preferably, an angle detection unit or an acceleration detection unit for detecting a blur direction from the horizontal axis of the blur region is provided.
好適には、前記補正手段は、ブレ画像から得られるRGBの色ごとの前記最大値および最小値の差分値の中で最大のものが前記第3閾値よりも大きいことを条件として、全色を補正する。 Preferably, the correction means sets all colors on the condition that the maximum value among the difference values of the maximum value and the minimum value for each RGB color obtained from the blurred image is larger than the third threshold value. to correct.
本発明によれば、簡便な処理によってブレ画像を適切に補正することができる。 According to the present invention, it is possible to appropriately correct a blurred image by a simple process.
以下、本発明の実施形態を添付図面に関連付けて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
図1は、本発明の画像処理装置の一実施形態であるデジタルスチルカメラ1のシステム構成図である。実施形態に係るデジタルスチルカメラ1は、ブレ補正機能を備えたカメラである。
図1に示すように、実施形態に係るデジタルスチルカメラ1は、撮影レンズ21、CCDなどの撮像素子22を含むレンズ光学系2、レンズ光学系2により取得した被写体像の画像信号を処理し、CPU11へ転送する信号処理系(CDS(相関二重サンプリング)・AGC(自動利得制御)回路3、A/D変換回路4、画像処理部5)、レンズ光学系1を駆動するモータドライバ6、タイミングジェネレータ(TG)7、メモリ8、ブレ検出センサ9、表示部10、全体を統括するCPU11などを備えて構成される。
FIG. 1 is a system configuration diagram of a
As shown in FIG. 1, the
デジタルスチルカメラ1では、先ず、レンズ光学系2を通して入射した被写体像が撮像素子22に結像される。
CPU11は、タイミングジェネレータ7を駆動し、ここで生成されたパルスにより撮像素子22が駆動される。これにより、被写体像の蓄積および転送が行われる。
撮像素子22から出力された画像信号は、CDS・AGC回路3によってサンプリングされ、かつ、所定の増幅率で増幅される。
増幅された画像信号は、A/D変換回路4によってデジタルデータ(画像データ)に変換される。
In the digital
The
The image signal output from the
The amplified image signal is converted into digital data (image data) by the A /
画像処理部5は、撮像素子から出力された画像信号をRGBデータに変換してCPU11に出力する。
The
ブレ検出センサ9は、たとえば2つの角速度センサを含み、この2つの角速度センサによって、デジタルスチルカメラ1に固定された2軸(ヨー、ピッチ)回りの角速度を検出することで、撮影時の上記2軸の回りのカメラのブレ量およびブレ方向を算出する。
The blur detection sensor 9 includes, for example, two angular velocity sensors, and the two angular velocity sensors detect the angular velocities around two axes (yaw and pitch) fixed to the digital still
CPU11は、RGBの色ごとにブレ補正処理を行う。
ここで、撮影時にシャッターボタンに加わる力などによってカメラが動いたためボケてしまった画像(以下、ブレ画像と称する)は、レンズの焦点が合わないことによって生ずるピンボケ画像と比較して、ボケの態様が異なっている。すなわち、ピンボケ画像では点画像が円形に広がったボケの態様となるが、ブレ画像では、特定の方向にのみ広がるボケの態様となる。
そこで、本実施形態におけるブレ補正処理は、この特定の方向のブレに着目し、ブレ検出センサ9によって算出された、カメラのブレ量およびブレ方向に基づいて、ブレ画像を画素単位で走査し、元の画像を復元する。
ブレ補正処理については後述する。
The
Here, an image that is blurred due to the camera moving due to a force applied to the shutter button during shooting (hereinafter referred to as a blurred image) is more out of focus than a defocused image that is generated when the lens is out of focus. Is different. That is, in the out-of-focus image, the point image has a blurry form spreading in a circular shape, but in the blurred image, the blurring image has a blurring form spreading only in a specific direction.
Therefore, the blur correction process in the present embodiment pays attention to the blur in this specific direction, scans the blur image in units of pixels based on the blur amount and blur direction of the camera calculated by the blur detection sensor 9, Restore the original image.
The blur correction process will be described later.
復元された画像は、メモリ8内のフレームメモリに格納される。CPU11は、フレームメモリのデータに基づいて、被写体の画像を表示するための表示駆動信号を表示部10に送出する
The restored image is stored in a frame memory in the memory 8. The
以下、本実施形態におけるブレ補正処理の補正原理について説明する。
図2は、手ブレ方向に対して垂直な方向から見た、画像上の画素(ピクセル)に対する成分値の分布を示し、(a)は手ブレが発生していない場合、(b)は手ブレが発生した場合である。図2は、RGBの中のいずれか1つの色の成分値の変化を示している。
ここで、手ブレがなく正しく露光されて得られた、ある色についての成分値が、図2(a)に示すように、画素位置に関係なく一定であると想定する。その場合に、正常な露光時間の5分の1の時間で1画素(1ピクセル)ずつ移動し、合計5画素分の手ブレが発生したとすると、図2(b)に示すように、5分の1の成分値の画像が右方向へ1画素ずつずれることで、両側にブレ領域(ボケ)が生ずる。すなわち、図2(b)では、成分値の大きい部分が手ブレ量の5画素分小さくなっており(左側)、小さい部分が5ピクセル分大きくなっている(右側)。
Hereinafter, the correction principle of the blur correction process in the present embodiment will be described.
FIG. 2 shows a distribution of component values with respect to pixels (pixels) on the image as viewed from a direction perpendicular to the camera shake direction. FIG. 2A shows a case where no camera shake occurs, and FIG. This is when blurring occurs. FIG. 2 shows a change in the component value of any one color of RGB.
Here, it is assumed that the component value for a certain color obtained by correct exposure without camera shake is constant regardless of the pixel position, as shown in FIG. In this case, assuming that one pixel (1 pixel) is moved by one-fifth of the normal exposure time and camera shake for a total of five pixels has occurred, as shown in FIG. The image of the component value of 1 is shifted by one pixel in the right direction, thereby causing blurring areas (blurs) on both sides. That is, in FIG. 2B, the portion with the large component value is reduced by 5 pixels of the camera shake amount (left side), and the small portion is increased by 5 pixels (right side).
実施形態におけるブレ補正処理では、このボケ部分を補正するため、ボケの傾斜(図2(b)の階段状の部分)の中央部で成分値の傾斜を急峻にする、すなわち、輪郭をはっきりさせることで、元の画像(手ブレがない画像)に補正する。 In the blur correction process in the embodiment, in order to correct this blur part, the slope of the component value is made steep at the center part of the blur inclination (stepped part in FIG. 2B), that is, the outline is clarified. Thus, the original image (image without camera shake) is corrected.
実施形態に係るブレ補正処理は、(1)フィルタ処理、(2)リミッタ処理、を含む。以下、順にこれらの処理を説明する。 The blur correction processing according to the embodiment includes (1) filter processing and (2) limiter processing. Hereinafter, these processes will be described in order.
(1)フィルタ処理
フィルタ処理は、前述したブレ領域の中央部付近で成分値の傾斜を強調するためのデジタルフィルタ処理である。
図3を参照して、本フィルタ処理を説明する。図3において、(a)はブレ領域を量子化した図であり、(b)は本フィルタ処理のフィルタ係数を示す図であり、(c)はフィルタ結果(補正された成分値)を示す図である。
(1) Filter process The filter process is a digital filter process for emphasizing the gradient of the component value near the center of the blur region described above.
The filter process will be described with reference to FIG. 3, (a) is a diagram obtained by quantizing a blur region, (b) is a diagram showing filter coefficients of the present filter processing, and (c) is a diagram showing filter results (corrected component values). It is.
図3(a)において、ブレ領域の長さがN個の画素数に相当する場合に、このブレ領域の中心の画素(中心画素)に対して、図3(b)に示すようなフィルタ係数を設定する。すなわち、ブレ領域の中心画素に(2×E+1)を乗じ、中心画素以外の両側N個の画素には、−(E/N)を乗じ、これらフィルタ係数により畳み込み(convolution)を行うFIR(Finite Impulse Response)フィルタを構成する。これによって、中心画素付近の成分値の変化度合いを強調するフィルタとなっている。
なお、Eは、補正の程度を表す係数であって、1が標準である。
このフィルタ処理の結果、図3(c)に見られるように、ブレ領域の傾斜が急峻となる。この中心画素のフィルタ結果は、本発明の第1補正値に相当する。
In FIG. 3A, when the length of the blur region corresponds to the number of N pixels, the filter coefficient as shown in FIG. 3B is applied to the center pixel (center pixel) of the blur region. Set. In other words, FIR (Finite) is used to multiply the center pixel of the blur region by (2 × E + 1), multiply the N pixels on both sides other than the center pixel by − (E / N), and perform convolution with these filter coefficients. Impulse Response) filter. Thus, the filter emphasizes the degree of change in the component value near the center pixel.
E is a coefficient representing the degree of correction, and 1 is a standard.
As a result of this filtering process, as shown in FIG. 3C, the inclination of the blur region becomes steep. The filter result of the center pixel corresponds to the first correction value of the present invention.
図3(b)に示した例では、中心画素から両側N個の画素を畳み込み演算の対象としたが、少なくともブレ領域分(中心画素から両側N/2個以上)の画素をフィルタ処理の対象とすることができる。 In the example shown in FIG. 3B, N pixels on both sides from the center pixel are subjected to the convolution calculation, but at least pixels corresponding to the blur region (N / 2 or more on both sides from the center pixel) are subjected to the filtering process. It can be.
(2)リミッタ処理
上記フィルタ処理の結果、ブレ領域の傾斜が急峻となるため、ボケが改善されるが、ブレ領域の両側には、大きなアンダーシュート、オーバーシュートが生ずる。したがって、自然な画質を得るために、このアンダーシュート、オーバーシュートを除去するための処理がリミッタ処理である。
このリミッタ処理は、所定の第1閾値〜第2閾値(>第1閾値)の範囲内に、第1補正値を制限するための処理であるが、この第1閾値および第2閾値は、所定値であってもよく、また、ブレ領域の画素の成分値の範囲によって規定してもよい。本実施形態では、後者の場合について説明する。
かかる場合、先ず、ブレ領域の各画素の成分値の最大値および最小値を特定する。そして、この最小値から最大値までの範囲内に収まるように、前記第1補正値を制限することによって、第2補正値を得る。これによって、アンダーシュート、オーバーシュートが除去される。
このリミッタ処理は、最大値フィルタ処理および最小値フィルタ処理とも称する。
(2) Limiter processing As a result of the filter processing described above, the blur region has a steep slope, which improves blurring. However, large undershoots and overshoots occur on both sides of the blur region. Therefore, in order to obtain a natural image quality, the process for removing the undershoot and overshoot is the limiter process.
The limiter process is a process for limiting the first correction value within a range of a predetermined first threshold value to a second threshold value (> first threshold value). The first threshold value and the second threshold value are predetermined values. It may be a value, or may be defined by the range of component values of pixels in the blur region. In the present embodiment, the latter case will be described.
In such a case, first, the maximum value and the minimum value of the component values of each pixel in the blur region are specified. Then, the second correction value is obtained by limiting the first correction value so as to be within the range from the minimum value to the maximum value. As a result, undershoot and overshoot are eliminated.
This limiter process is also referred to as a maximum value filter process and a minimum value filter process.
図4は、リミッタ処理によって得られた第2補正値を示す。
図4に示すように、リミッタ処理によって得られた第2補正値は、ブレ領域の長さ(ボケ幅)が小さくなっているとともに、オーバーシュートおよびアンダーシュートが抑制されたことで、滑らかな成分値変化となったことがわかる。
FIG. 4 shows the second correction value obtained by the limiter process.
As shown in FIG. 4, the second correction value obtained by the limiter process has a smooth component because the length (blur width) of the blur region is small and overshoot and undershoot are suppressed. It turns out that it became a value change.
以上、本実施形態におけるブレ補正処理の補正原理について説明したが、以上の処理はRGBの色ごとに行われる。
また、図3,4では、ボケ幅が5画素である場合について図示してきたが、ボケ幅が10,15画素,…と増えていくに従い、ブレ補正効果が十分に得られるようになる。また、図3(b)に示した補正効果を表す係数E(効果係数E)を増加させることによっても、ブレ補正効果が増す。
The correction principle of the blur correction process in the present embodiment has been described above, but the above process is performed for each RGB color.
3 and 4 illustrate the case where the blur width is 5 pixels. However, as the blur width increases to 10, 15 pixels,..., The blur correction effect is sufficiently obtained. Further, the blur correction effect can be increased by increasing the coefficient E (effect coefficient E) representing the correction effect shown in FIG.
なお、元々成分値の変化が少ない被写体に対して上記フィルタ処理を行ってしまうと、かえって不自然な画像となる場合がある。たとえば、被写体が人物の顔の場合、比較的成分値が小さい肌色をベースとして頬や鼻などの陰影があるが、これを手ブレとして認識し、フィルタ処理を行うと、元の画像と異なる画像、たとえば角張った鼻の画像となってしまう。
これを防止するため、上記フィルタ処理は、濃度差(成分値の最大値および最小値の差分)がある程度以上存在する場合に限り行うようにすることが望ましい。
Note that if the above-described filter processing is performed on a subject that originally has a small change in component value, an unnatural image may be obtained. For example, if the subject is a human face, there are shadows such as cheeks and nose based on the skin color with a relatively small component value, but if this is recognized as camera shake and filtered, an image different from the original image For example, it becomes an image of an angular nose.
In order to prevent this, it is desirable to perform the filtering process only when a density difference (difference between the maximum value and the minimum value of the component values) exists to some extent.
逆に、地面や芝生など、成分値の変化が非常に少ない被写体に対しては、上記手ブレによって平面化した画像となってしまうことがないように、上記フィルタ処理を行って、輪郭を強調するようにした方が望ましい。 Conversely, for subjects with very little change in component values, such as the ground or lawn, the above filter processing is performed to enhance the contour so that the image is not flattened due to camera shake. It is desirable to do so.
かかる観点から、上述した最大値および最小値の差分値に対して、大小2つの閾値(第3閾値、第4閾値:但し、第3閾値>第4閾値)を設け、差分値が第3閾値よりも小さいことを条件として補正処理を行わないようにし、第4閾値よりもさらに小さいことを条件として補正処理を行うようにするとよい。
実験結果では、差分値の30%程度の値に第3閾値、10%程度の値に第4閾値を設定することで画質の良い結果が得られた。
From this point of view, two threshold values (third threshold value, fourth threshold value: third threshold value> fourth threshold value) are provided for the difference value between the maximum value and the minimum value, and the difference value is the third threshold value. It is preferable not to perform the correction process on the condition that the value is smaller than the threshold value, and to perform the correction process on the condition that the value is smaller than the fourth threshold value.
In the experimental results, a result with good image quality was obtained by setting the third threshold value to a value of about 30% of the difference value and the fourth threshold value to a value of about 10%.
また、カラー画像において色が変化するときには、RGBの3原色ともに大きく変化することは少ない。したがって、少なくとも1原色は上記第3閾値内の変化しかないことが多い。
しかしながら、ブレ領域に色の変化点が含まれている場合に、その変化点で一部の原色のみフィルタ処理を行わないとすると、その変化点で色の変化が生じ、色滲みになってしまう。これを避けるため、3原色の中で、少なくとも1原色についての上記差分値(最大値と最小値の差分)が第3閾値を越える場合には、3原色ともに補正処理を行うことが望ましい。換言すれば、3原色ともに上記差分値が第3閾値以下である場合には、3原色ともに補正処理を行わないことが望ましい。
Further, when the color changes in the color image, it is rare that the three primary colors of RGB change greatly. Therefore, at least one primary color often only changes within the third threshold.
However, when a color change point is included in the blur area, if only some of the primary colors are not filtered at the change point, a color change occurs at the change point and color blur occurs. . In order to avoid this, when the difference value (difference between the maximum value and the minimum value) for at least one primary color among the three primary colors exceeds the third threshold value, it is desirable to perform correction processing for all three primary colors. In other words, when the difference value is less than or equal to the third threshold value for all three primary colors, it is desirable not to perform correction processing for all three primary colors.
また、手ブレは、実際にはあらゆる方向に生じうるが、マトリクス状に配列されたすべての画素のあらゆる方向に補正処理を行うことは困難であるので、水平軸に対する補正対象角度(ブレ方向)を限定して行うことが処理速度向上の点から望ましい。
画素のマトリクスにおいて、ブレ方向が0度、±45度、±90度の角度では、容易に画素を選択でき、上記補正処理を行うことができる。また、マトリクスのX軸方向に2画素、Y軸方向に1画素進んだ、または、後退した位置の画素を選択することで、±30度のブレ方向に対して補正処理を行うことができ、マトリクスのX軸方向に1画素、Y軸方向に2画素進んだ、または、後退した位置の画素を選択することで、±60度のブレ方向に対して補正処理を行うことができる。
実験結果では、このように水平軸からの角度が0度、±30度、±45度、±60度、±90度のブレ方向に限定して(丸めて)補正処理を行った場合でも、ほぼ満足できる結果を得ることができた。
In addition, camera shake can actually occur in any direction, but since it is difficult to perform correction processing in all directions of all pixels arranged in a matrix, the correction target angle with respect to the horizontal axis (blur direction) It is desirable from the viewpoint of improving the processing speed.
In the pixel matrix, when the blur direction is an angle of 0 degrees, ± 45 degrees, and ± 90 degrees, the pixels can be easily selected, and the above correction process can be performed. In addition, by selecting a pixel at a position where two pixels are advanced in the X-axis direction and one pixel advanced or retracted in the Y-axis direction of the matrix, correction processing can be performed for a blur direction of ± 30 degrees. By selecting a pixel at a position advanced by one pixel in the X-axis direction and two pixels advanced or retracted in the Y-axis direction of the matrix, correction processing can be performed with respect to a blur direction of ± 60 degrees.
In the experimental results, even when correction processing is performed by limiting the angle from the horizontal axis to 0 degrees, ± 30 degrees, ± 45 degrees, ± 60 degrees, ± 90 degrees (rounded) in this way, The results were almost satisfactory.
次に、図5を参照して、水平軸からの角度(ブレ方向)が+45度である場合に、上述した補正処理を実際の画像に適用した処理について述べる。
図5は、補正処理を実際の画像に適用した処理を説明するための図である。
Next, with reference to FIG. 5, processing in which the above-described correction processing is applied to an actual image when the angle from the horizontal axis (blurring direction) is +45 degrees will be described.
FIG. 5 is a diagram for explaining a process in which the correction process is applied to an actual image.
この補正処理は、処理対象であるブレ画像を、順次水平方向に走査していくことで行う。
先ず、ブレ領域の長さがN個の画素数に相当した場合に、このN個の画素のデータを格納するための(2×N+1)個のレジスタ(メモリ領域)をCPU11内に設ける。
処理対象の画素(中心画素)を中心として、ブレ方向である+45度の方向に沿って、中心画素と両側N個の画素(計(2×N+1)個の画素)のデータ(RGBの別および成分値)をCPU11内のレジスタに格納しておく。
図5では、黒丸で示した画素(計(2×N+1)個の画素)のデータがレジスタに格納される。
This correction process is performed by sequentially scanning the blurred image to be processed in the horizontal direction.
First, when the length of the blur area corresponds to the number of N pixels, (2 × N + 1) registers (memory areas) for storing data of the N pixels are provided in the
Centered on the pixel to be processed (center pixel) and along the +45 degree direction which is the blur direction, data of the center pixel and N pixels on both sides (total (2 × N + 1) pixels) Component value) is stored in a register in the
In FIG. 5, data of pixels (total (2 × N + 1) pixels) indicated by black circles are stored in the register.
次に、レジスタに格納された画素のデータに基づいて、中心画素についての第1補正値を算出する。なお、この第1補正値を算出する処理は、RGBの色ごとに行う。
第1補正値は、畳み込み演算によるフィルタ処理により得られる。すなわち、中心画素の成分値に(2×E+1)を掛け、中心画素の両側N個の画素の成分値に(−E/N)を掛けた後にすべてを合算し、その合算結果をその中心画素における第1補正値とする。
Next, a first correction value for the center pixel is calculated based on the pixel data stored in the register. Note that the process of calculating the first correction value is performed for each RGB color.
The first correction value is obtained by a filter process using a convolution operation. That is, the component value of the center pixel is multiplied by (2 × E + 1), the component values of the N pixels on both sides of the center pixel are multiplied by (−E / N), and then all are added together, and the summation result is the center pixel. The first correction value at.
次に、中心画素から+45度方向に(N/2)個の画素の範囲内において、中心画素を含む(2×N+1)個の画素の成分値の中から最大値および最小値を特定する。この最大値および最小値がRGBの色ごとに特定される。
さらに、RGBの各色の中で最大値と最小値の差分値のうち最も大きいものと、前述した大小2つの閾値(第3閾値、第4閾値:但し、第3閾値>第4閾値)とを比較する。
そして、差分値が第3閾値と第4閾値の間にあることを条件として、補正処理を行わない。すなわち、第1補正値を使わずに、レジスタに格納されている元の成分値のままとする。
差分値が第3閾値よりも大きいか、または、第4閾値よりも小さいことを条件として、補正処理を行う。その際には、特定した最大値および最小値によって第1補正値を制限して、最終的な補正値である第2補正値とする。すなわち、第1補正値が最大値よりも大きいことを条件として、その最大値を第2補正値とし、第1補正値が最小値よりも小さいことを条件として、その最小値を第2補正値とし、第1補正値が最大値と最小値の間にあることを条件として、その第1補正値を第2補正値とする。
Next, the maximum value and the minimum value are specified from the component values of (2 × N + 1) pixels including the center pixel within the range of (N / 2) pixels in the direction of +45 degrees from the center pixel. The maximum value and the minimum value are specified for each RGB color.
Further, among the RGB colors, the largest difference value between the maximum value and the minimum value, and the above-described two threshold values (third threshold value, fourth threshold value: where third threshold value> fourth threshold value) are set. Compare.
Then, the correction process is not performed on condition that the difference value is between the third threshold value and the fourth threshold value. That is, the first correction value is not used, and the original component value stored in the register is maintained.
The correction process is performed on the condition that the difference value is larger than the third threshold value or smaller than the fourth threshold value. In that case, the first correction value is limited by the specified maximum value and minimum value, and the final correction value is the second correction value. That is, on the condition that the first correction value is larger than the maximum value, the maximum value is set as the second correction value, and on the condition that the first correction value is smaller than the minimum value, the minimum value is set as the second correction value. On the condition that the first correction value is between the maximum value and the minimum value, the first correction value is set as the second correction value.
そして、元の成分値、または、算出された第2補正値を、中心画素における最終的な補正値として、メモリ8内のフレームメモリに書き込む。この中心画素がブレ画像に対して水平方向に走査され、順次、上述した処理を繰り返し行って、フレームメモリに書き込まれる。全画素に対する処理を行うことによって、ブレ画像に対して+45度方向に走査した場合と同じ結果が得られることになる。 Then, the original component value or the calculated second correction value is written in the frame memory in the memory 8 as the final correction value in the center pixel. The center pixel is scanned in the horizontal direction with respect to the blurred image, and the above-described processing is sequentially repeated and written in the frame memory. By performing the process for all the pixels, the same result as that obtained when the blur image is scanned in the +45 degree direction can be obtained.
なお、上述した説明では、手ブレの方向が直線的かつ等速度であることを前提としてきたが、上述した補正方法は、手ブレの方向が直線的かつ等速度であることに限られない。
たとえば、実際の手ブレにおいては、その速度が次第に速くなる、または、次第に遅くなることがある。したがって、図2(a)に示した、画素と成分値との関係は、図6(a)に示すように、隣接する画素間の成分値の変化が少なくなったり、大きくなったりする。図6(a)では、成分値の段差のある左右のボケは異なるが、ボケの幅は同じである。
この図6(a)に示した手ブレに対して、上述した補正処理を適用した結果、図6(b)に示すように、輪郭が強調され、ほぼ満足な補正画像が得られた。
In the above description, it has been assumed that the direction of camera shake is linear and constant speed, but the correction method described above is not limited to the direction of camera shake being linear and constant speed.
For example, in actual camera shake, the speed may gradually increase or decrease gradually. Therefore, the relationship between the pixel and the component value shown in FIG. 2A is such that the change in the component value between adjacent pixels is reduced or increased, as shown in FIG. 6A. In FIG. 6 (a), the left and right blurs with different component values are different, but the blur width is the same.
As a result of applying the above-described correction processing to the camera shake shown in FIG. 6A, the contour is emphasized as shown in FIG. 6B, and a substantially satisfactory corrected image is obtained.
また、手ブレ方向が途中で変化する場合には、ボケが2方向以上に発生することになるが、かかる場合には、各方向で上記補正処理を繰り返すようにすればよい。なお、その場合には、効力係数Eを小さめにしておいた方がノイズの影響を受けにくい。 In addition, when the camera shake direction changes in the middle, blurring occurs in two or more directions. In such a case, the correction process may be repeated in each direction. In this case, it is less susceptible to noise if the efficacy coefficient E is made smaller.
以上詳述したように、実施形態に係るデジタルスチルカメラによれば、ブレ領域(ボケ部分)の輪郭をFIRフィルタによって強調するため、周波数領域の演算を行う必要がなく、CPUの演算における負担が軽減されるとともに、ボケ幅に応じて補正の実行の有無を適切に制御するため、不自然な補正を防止することができる。 As described above in detail, according to the digital still camera according to the embodiment, since the outline of the blur region (blurred portion) is emphasized by the FIR filter, it is not necessary to perform the calculation of the frequency region, and the burden on the calculation of the CPU is reduced. In addition to being reduced, the presence / absence of correction is appropriately controlled according to the blur width, so that unnatural correction can be prevented.
なお、本発明の実施形態は、上述した実施形態に拘泥せず、当業者であれば、本発明の要旨を変更しない範囲内で様々な改変が可能である。
例えば、本実施例では、ブレ検出センサ9として、2つの角速度センサを用いた場合について説明したが、加速度センサを用いてブレ量およびブレ方向を算出してもよい。また、本実施例では、信号処理部5がRGBデータを出力し、このRGBの各色成分値を用いて補正する場合について説明したが、信号処理部5が入力された信号に対して輝度信号や色信号を形成するなどの信号処理を行ってカラー画像信号を形成するものであればよく、輝度データ(Y)と色差データ(U,V)を出力してもよい。この輝度データと色差データを出力する場合には、輝度値と色差の成分値を用いて同様の方法で補正を行うことができる。
The embodiments of the present invention are not limited to the above-described embodiments, and those skilled in the art can make various modifications without departing from the scope of the present invention.
For example, in the present embodiment, the case where two angular velocity sensors are used as the shake detection sensor 9 has been described, but the shake amount and the shake direction may be calculated using an acceleration sensor. In the present embodiment, the case where the
1…デジタルスチルカメラ
2…レンズ光学系
21…撮影レンズ、22…撮像素子
3…CDS・AGC回路
4…A/D変換回路
5…画像処理部
6…モータドライバ
7…タイミングジェネレータ
8…メモリ
9…ブレ検出センサ
10…表示部
11…CPU
1 ... Digital still
DESCRIPTION OF
Claims (7)
第1閾値から当該第1閾値より大きい第2閾値までの範囲内に収まるように、前記第1補正値を制限して第2補正値を生成するリミッタ手段と、
前記ブレ画像において前記中心画素を順に走査し、各画素における画素値を前記第2補正値とする補正手段と
を備えた画像処理装置。 A filter that emphasizes changes in the pixel values of pixels in the vicinity of the center of the pixel area is applied to the pixel area including at least the blur area centered on the center pixel of the blur area in the blurred image, and corresponds to the center pixel. Filter means for generating a first correction value of the pixel value obtained,
Limiter means for generating a second correction value by limiting the first correction value so as to fall within a range from a first threshold value to a second threshold value greater than the first threshold value;
An image processing apparatus comprising: a correction unit that sequentially scans the central pixel in the blurred image and sets a pixel value in each pixel as the second correction value.
前記補正手段は、前記最大値および最小値の差分値が所定の第3閾値よりも小さいことを条件として、前記ブレ領域の補正を行わない
ことを特徴とする請求項1記載の画像処理装置。 The first threshold value is a minimum value of pixel values of pixels included in the blur region, and the second threshold value is a maximum value of pixel values of pixels included in the blur region,
The image processing apparatus according to claim 1, wherein the correction unit does not correct the blur region on condition that a difference value between the maximum value and the minimum value is smaller than a predetermined third threshold value.
ことを特徴とする請求項2記載の画像処理装置。 The image processing apparatus according to claim 2, wherein the correction unit corrects the blur region on condition that the difference value is further smaller than a predetermined fourth threshold value that is smaller than the third threshold value. .
ことを特徴とする請求項2または3記載の画像処理装置。 The said correction | amendment means compares the largest thing in the difference value of the said maximum value and minimum value for every RGB color obtained from a blurring image with the said 3rd threshold value or a 4th threshold value. 2. The image processing apparatus according to 2 or 3.
ことを特徴とする請求項1〜4のいずれかに記載の画像処理装置。 The correction unit corrects the blur region by limiting the blur direction to angles of 0 degrees, ± 30 degrees, ± 45 degrees, ± 60 degrees, and ± 90 degrees from a horizontal axis. The image processing apparatus according to any one of 1 to 4.
ことを特徴とする請求項1〜5のいずれかに記載の画像処理装置。 The image processing apparatus according to claim 1, further comprising an angle detection unit or an acceleration detection unit for detecting a blur direction from a horizontal axis of the blur region.
ことを特徴とする請求項4記載の画像処理装置。
The correction means corrects all colors on condition that the maximum difference value between the maximum value and the minimum value for each RGB color obtained from a blurred image is larger than the third threshold value. The image processing apparatus according to claim 4, wherein:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005219634A JP2007036894A (en) | 2005-07-28 | 2005-07-28 | Image processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005219634A JP2007036894A (en) | 2005-07-28 | 2005-07-28 | Image processing device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2007036894A true JP2007036894A (en) | 2007-02-08 |
Family
ID=37795563
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2005219634A Pending JP2007036894A (en) | 2005-07-28 | 2005-07-28 | Image processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2007036894A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009284101A (en) * | 2008-05-20 | 2009-12-03 | Canon Inc | Imaging device and control method thereof |
| WO2010021009A1 (en) * | 2008-08-19 | 2010-02-25 | 富士通株式会社 | Image correction device and image correction method |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH08265572A (en) * | 1995-03-27 | 1996-10-11 | Sharp Corp | Image processing device |
| JP2001148474A (en) * | 1999-11-24 | 2001-05-29 | Sony Corp | Solid-state imaging device |
| JP2002290773A (en) * | 2001-03-23 | 2002-10-04 | Sharp Corp | Image enhancement device and image enhancement program |
| JP2005026962A (en) * | 2003-07-01 | 2005-01-27 | Nikon Corp | Signal processing apparatus, signal processing program, and electronic camera |
-
2005
- 2005-07-28 JP JP2005219634A patent/JP2007036894A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH08265572A (en) * | 1995-03-27 | 1996-10-11 | Sharp Corp | Image processing device |
| JP2001148474A (en) * | 1999-11-24 | 2001-05-29 | Sony Corp | Solid-state imaging device |
| JP2002290773A (en) * | 2001-03-23 | 2002-10-04 | Sharp Corp | Image enhancement device and image enhancement program |
| JP2005026962A (en) * | 2003-07-01 | 2005-01-27 | Nikon Corp | Signal processing apparatus, signal processing program, and electronic camera |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009284101A (en) * | 2008-05-20 | 2009-12-03 | Canon Inc | Imaging device and control method thereof |
| WO2010021009A1 (en) * | 2008-08-19 | 2010-02-25 | 富士通株式会社 | Image correction device and image correction method |
| JP5158202B2 (en) * | 2008-08-19 | 2013-03-06 | 富士通株式会社 | Image correction apparatus and image correction method |
| US8433153B2 (en) | 2008-08-19 | 2013-04-30 | Fujitsu Limited | Image correction apparatus and image correction method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4121780B2 (en) | Method for reducing motion blur in digital images | |
| JP4487191B2 (en) | Image processing apparatus and image processing program | |
| JP5596138B2 (en) | Imaging apparatus, image processing apparatus, image processing method, and image processing program | |
| EP3706069A2 (en) | Image processing method, image processing apparatus, learnt model manufacturing method, and image processing system | |
| JP2006129236A (en) | Ringing eliminating device and computer readable recording medium with ringing elimination program recorded thereon | |
| JP5237978B2 (en) | Imaging apparatus and imaging method, and image processing method for the imaging apparatus | |
| JP4454657B2 (en) | Blur correction apparatus and method, and imaging apparatus | |
| JP2006333061A (en) | Camera shake compensating device | |
| JP2005520442A (en) | Method and apparatus for processing sensor images | |
| WO2011096157A1 (en) | Imaging device and method, and image processing method for imaging device | |
| WO2009145931A1 (en) | Device and method for estimating defocus blur size in an image | |
| CN115496673A (en) | Image processing method, image processing device, image processing system, and storage medium | |
| JP2009088935A (en) | Image recording apparatus, image correcting apparatus, and image pickup apparatus | |
| JP2009272890A (en) | Image processing apparatus and method, and imaging device | |
| JP5007241B2 (en) | Image processing device | |
| US10235742B2 (en) | Image processing apparatus, image capturing apparatus, image processing method, and non-transitory computer-readable storage medium for adjustment of intensity of edge signal | |
| JP4145308B2 (en) | Image stabilizer | |
| JP2007036894A (en) | Image processing device | |
| JP7337555B2 (en) | Image processing device, imaging device, image processing method, program, and storage medium | |
| JP2007036799A (en) | Image processing device | |
| JP5743772B2 (en) | Image processing system | |
| JP4383379B2 (en) | Image stabilizer | |
| JP2008021271A (en) | Image processing apparatus, image restoration method, and program | |
| JP5561389B2 (en) | Image processing program, image processing apparatus, electronic camera, and image processing method | |
| CN101960835A (en) | Method for generating change factor information data and signal processing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080216 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100127 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100202 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100601 |