JP2010079815A - Image correction device - Google Patents
Image correction device Download PDFInfo
- Publication number
- JP2010079815A JP2010079815A JP2008250196A JP2008250196A JP2010079815A JP 2010079815 A JP2010079815 A JP 2010079815A JP 2008250196 A JP2008250196 A JP 2008250196A JP 2008250196 A JP2008250196 A JP 2008250196A JP 2010079815 A JP2010079815 A JP 2010079815A
- Authority
- JP
- Japan
- Prior art keywords
- filter
- value
- filter coefficient
- range
- local difference
- 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
- 238000003702 image correction Methods 0.000 title claims abstract description 48
- 238000012545 processing Methods 0.000 claims abstract description 77
- 238000004364 calculation method Methods 0.000 claims abstract description 74
- 238000012937 correction Methods 0.000 claims abstract description 31
- 238000000034 method Methods 0.000 claims description 63
- 125000004122 cyclic group Chemical group 0.000 claims description 61
- 230000008569 process Effects 0.000 claims description 55
- 238000011156 evaluation Methods 0.000 claims description 15
- 230000006866 deterioration Effects 0.000 description 42
- 230000015556 catabolic process Effects 0.000 description 38
- 238000006731 degradation reaction Methods 0.000 description 38
- 230000001174 ascending effect Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 8
- 238000003384 imaging method Methods 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000005484 gravity Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000001351 cycling effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Abstract
Description
本発明は、デジタルカメラ、プリンタ、パーソナルコンピュータ、テレビなどの画像撮影機器および画像表示機器に適用される画像補正装置に関し、特に、手振れ等に起因した画像劣化を画像処理によって補正する画像補正装置に関するものである。 The present invention relates to an image correction apparatus applied to an image photographing apparatus and an image display apparatus such as a digital camera, a printer, a personal computer, and a television. Is.
従来から、デジタルカメラやカメラ付き携帯端末機器における絞り値、焦点距離、フォーカス等の収差による画像劣化や、手振れによる画像劣化を補正または修復する機能が、種々提案されている。例えば、特許文献1に記載されているように、レンズ等の光学系と、CCDやC−MOSセンサ等の撮像素子とを有する近年のデジタルカメラは、手振れを補正するために、光学系の振動を軽減する機械的な機構を備えている。また、特許文献2に記載されているように、撮像素子で撮影された画像の画像データを変換する演算回路を用いて、画像を補正する技術も提案されている。 Conventionally, various functions have been proposed for correcting or repairing image degradation due to aberrations such as aperture value, focal length, and focus, and image degradation due to camera shake in a digital camera or camera-equipped mobile terminal device. For example, as described in Patent Document 1, a recent digital camera having an optical system such as a lens and an image pickup device such as a CCD or C-MOS sensor has a vibration of the optical system in order to correct camera shake. It has a mechanical mechanism to reduce In addition, as described in Patent Document 2, a technique for correcting an image using an arithmetic circuit that converts image data of an image captured by an image sensor has been proposed.
上記従来技術においては、手振れによりカメラが振動したときに、その振動をセンサで検出し、検出された信号、すなわち、手振れによるカメラの移動速度に基づいて補正量を算出する。そして、算出した補正量に基づいて、光学レンズおよび/または撮像素子を移動させたり、画像処理演算によって撮像素子の各画素の値を補正したりすることによって、手振れに起因する画像劣化を補正または防止する。その結果、手振れに起因する画像劣化を補正した画像または画像劣化を防止した画像が、フラッシュメモリ等の記憶媒体に記録される。 In the above prior art, when the camera vibrates due to camera shake, the vibration is detected by a sensor, and a correction amount is calculated based on the detected signal, that is, the moving speed of the camera due to camera shake. Then, based on the calculated correction amount, the optical lens and / or the image sensor is moved, or the value of each pixel of the image sensor is corrected by image processing calculation, thereby correcting image degradation caused by camera shake or To prevent. As a result, an image in which image degradation due to camera shake is corrected or an image in which image degradation is prevented is recorded in a storage medium such as a flash memory.
しかしながら、上述従来技術においては、撮影時におけるカメラの移動速度を検出するための手振れセンサが必要となるので、装置の構成が複雑になるという問題があった。また、手振れセンサの出力に基づいて画像劣化を補正する必要があるが、撮像装置と連動しないプリンタやパーソナルコンピュータのような画像表示機器に手振れ画像が入力された場合には、画像を補正できないという問題があった。 However, the above-described conventional technique has a problem that the configuration of the apparatus is complicated because a camera shake sensor for detecting the moving speed of the camera at the time of shooting is required. In addition, it is necessary to correct image degradation based on the output of the camera shake sensor. However, if a camera shake image is input to an image display device such as a printer or a personal computer that is not linked to the imaging device, the image cannot be corrected. There was a problem.
本発明は、上記のような問題点を解決するためになされたものであり、手振れセンサがなくても、入力画像の補正処理が実施可能な画像補正装置を提供することを目的とする。 The present invention has been made to solve the above-described problems, and an object thereof is to provide an image correction apparatus capable of performing an input image correction process without a camera shake sensor.
本発明に係る画像補正装置は、入力画像の画像領域の全部または一部からなる差分値決定領域内の各注目画素について、当該注目画素の画像データと、当該注目画素の周辺に設定される窓領域内の近傍画素の画像データとの差分からなる局所差分値を、当該注目画素に対する当該近傍画素の相対位置を示す画素単位の座標ごとに算出し、前記差分値決定領域内の全ての前記注目画素に関する前記座標ごとの前記局所差分値の最大値を、前記座標ごとの窓領域最大局所差分値として決定する最大局所差分値決定手段を備える。そして、前記座標の水平方向または垂直方向の少なくとも一方向において隣り合う前記窓領域最大局所差分値同士の差分を、最大局所差分勾配値として前記座標ごとに決定する勾配算出手段と、前記勾配算出手段で決定された前記最大局所差分勾配値のうち、所定値以上の前記最大局所差分勾配値に対応する前記座標の範囲をフィルタ係数存在範囲として求めるフィルタ範囲決定手段とを備える。そして、前記フィルタ範囲決定手段で決定された前記フィルタ係数存在範囲内の前記最大局所差分勾配値に基づいて、当該フィルタ係数存在範囲内のフィルタ係数を算出するフィルタ係数決定手段と、前記フィルタ係数算出手段で算出された前記フィルタ係数を用いて、フィルタ処理の逆処理を前記入力画像に施す補正手段とを備える。 The image correction apparatus according to the present invention includes, for each target pixel in a difference value determination region including all or part of an image region of an input image, image data of the target pixel and a window set around the target pixel. A local difference value consisting of a difference from the image data of neighboring pixels in the region is calculated for each pixel coordinate indicating a relative position of the neighboring pixel with respect to the target pixel, and all the attentions in the difference value determination region are calculated. A maximum local difference value determining unit that determines a maximum value of the local difference value for each coordinate relating to a pixel as a window region maximum local difference value for each coordinate is provided. A gradient calculating unit that determines, for each coordinate, a difference between the window region maximum local difference values adjacent to each other in at least one of a horizontal direction or a vertical direction of the coordinates; and a gradient calculating unit And a filter range determining means for obtaining, as a filter coefficient existence range, a range of the coordinates corresponding to the maximum local difference gradient value not less than a predetermined value among the maximum local difference gradient values determined in (1). Then, based on the maximum local difference gradient value in the filter coefficient existence range determined by the filter range decision means, filter coefficient determination means for calculating a filter coefficient in the filter coefficient existence range, and the filter coefficient calculation Correction means for performing reverse processing of filter processing on the input image using the filter coefficient calculated by the means.
本発明の画像補正装置によれば、入力画像の劣化を表すフィルタ係数を入力画像のみから算出し、このフィルタ係数を用いて入力画像に補正処理を行う。そのため、手振れセンサがなくても、入力画像の補正処理を実施することができる。 According to the image correction apparatus of the present invention, the filter coefficient representing the degradation of the input image is calculated only from the input image, and the input image is corrected using the filter coefficient. Therefore, the input image correction process can be performed without a camera shake sensor.
<実施の形態1>
図1は、本実施の形態に係る画像補正装置の構成を示すブロック図である。図に示すように、本実施の形態に係る画像補正装置は、記憶手段100と、最大局所差分値決定手段2と、勾配算出手段3と、フィルタ範囲決定手段4と、フィルタ係数決定手段5と、補正手段102と、記憶手段103とを備える。最大局所差分値決定手段2、および、勾配算出手段3、および、フィルタ範囲決定手段4、および、フィルタ係数決定手段5は、劣化推定手段101を構成している。
<Embodiment 1>
FIG. 1 is a block diagram showing the configuration of the image correction apparatus according to the present embodiment. As shown in the figure, the image correction apparatus according to the present embodiment includes a
記憶手段100には、画像が記憶されている。最大局所差分値決定手段2には、記憶手段100から出力された画像が入力画像として入力される。最大局所差分値決定手段2は、記憶手段100から出力される入力画像の窓領域最大局所差分値を求める。勾配算出手段3は、最大局所差分値決定手段2から出力される窓領域最大局所差分値から最大局所差分勾配値を求める。フィルタ範囲決定手段4は、勾配算出手段3から出力される最大局所差分勾配値からフィルタ係数存在範囲を求める。
An image is stored in the
フィルタ係数決定手段5は、勾配算出手段3から出力される最大局所差分勾配値と、フィルタ範囲決定手段4から出力されるフィルタ係数存在範囲とから、フィルタ係数を求める。補正手段102は、フィルタ係数決定手段5から出力されるフィルタ係数を用いて、記憶手段100から出力された入力画像を補正することにより、補正画像を生成する。記憶手段103は、補正手段102から出力される補正画像を記憶する。
The filter coefficient determination unit 5 obtains a filter coefficient from the maximum local difference gradient value output from the
次に基本動作について説明する。一般に手振れや焦点ずれなどの劣化は、線形で表すことができると考えられる。つまり、劣化のある入力画像の画像データをy(i,j)(i,j;画素単位の座標、0≦i<I、0≦j<J)とし、入力画像の劣化を表す線形フィルタのフィルタ係数をa(n,m)(0≦n≦N、0≦m≦M)とし、劣化のない画像データをx(i,j)とすると、次式(1)の関係が成り立つ。 Next, the basic operation will be described. In general, it is considered that deterioration such as camera shake and defocus can be expressed linearly. That is, image data of a degraded input image is y (i, j) (i, j; coordinates in pixel units, 0 ≦ i <I, 0 ≦ j <J). When the filter coefficient is a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M), and image data without deterioration is x (i, j), the relationship of the following equation (1) is established.
本実施の形態に係る画像補正装置の劣化推定手段101は、記憶手段100からの入力画像の画像データy(i,j)(以下、入力画像y(i,j)と記すこともある)から、その入力画像の劣化を表すフィルタ係数a(n,m)を推定する。その後、本実施の形態に係る画像補正装置の補正手段102は、所定の範囲(n,m)(0≦n≦N、0≦m≦M)のフィルタ係数a(n,m)を用いて、フィルタ処理の逆処理を入力画像y(i,j)に施す。こうして、本実施の形態に係る画像補正装置は、劣化のない画像の画像データ(以下、画像x(i,j)と記すこともある)に相当する補正画像の画像データ(以下、補正画像w(i,j)と記すこともある)を得るように構成されている。
The
以下、図1に従って、本実施の形態に係る画像補正装置の詳細な動作を説明する。まず、記憶手段100には、入力画像y(i,j)(0≦i<I、0≦j<J)が保存されている。記憶手段100から読み出された入力画像y(i,j)は、最大局所差分値決定手段2に入力される。本実施の形態に係る最大局所差分値決定手段2は、図2に示すように、I画素×J画素の入力画像の画像領域201の一部、例えば、中央の1/4程度の領域(Ic画素×Jc画素)を差分値決定領域202と定める。最大局所差分値決定手段2では、差分値決定領域202内の各注目画素203について、次式(2)で示される局所差分値d(i,j)(n,m)を求める。
Hereinafter, the detailed operation of the image correction apparatus according to the present embodiment will be described with reference to FIG. First, the
この式(2)において、y(i,j)(Is≦i≦Is+Ic,Js≦j≦Js+Jc)は、注目画素203についての画像データである。図3に示すように、窓領域204は、各注目画素203の周辺に予め設定される。式(2)に係るy(i+n,j+m)は、窓領域204内の近傍画素205の画像データである。座標(n,m)は、当該注目画素203に対する近傍画素205の相対位置を示す画素単位の座標である。
In this equation (2), y (i, j) (Is ≦ i ≦ Is + Ic, Js ≦ j ≦ Js + Jc) is image data for the
図3に係る窓領域204は、注目画素203を基準(0,0)にして水平方向には左右(−N〜N)に広がるように設定され、垂直方向には上方向(0〜M)のみに広がるように設定されている。本実施の形態に係る窓領域204は、注目画素203において互いに隣接する第1,第2の窓領域を含む。本実施の形態では、第1の窓領域は、窓領域204の中心線から左側の窓領域204a(−N≦n≦0、0≦m≦M)であり、第2の窓領域は、窓領域204の中心線から右側の窓領域204b(0≦n≦N、0≦m≦M)であるものとする。なお、窓領域204の大きさは、後に述べるように、フィルタ係数の存在範囲に影響するので、画像補正装置を接続するシステム、手振れなどの劣化の起こり得る範囲、あるいは、補正対象とする劣化の範囲に合わせて設定する。
The
以上のように、最大局所差分値決定手段2は、入力画像の画像領域201の一部からなる差分値決定領域202内の各注目画素203について、当該注目画素203の画像データy(i,j)と、当該注目画素203の周辺に設定される窓領域204内の近傍画素205の画像データy(i+n,j+m)との差分からなる局所差分値d(i,j)(n,m)を算出する。最大局所差分値決定手段2は、その局所差分値d(i,j)(n,m)を、注目画素203に対する近傍画素205の相対位置を示す画素単位の座標(n,m)ごとに算出する。
As described above, the maximum local difference value determining unit 2 determines the image data y (i, j of the
次に、最大局所差分値決定手段2は、次式(3)のように、差分値決定領域202内の全ての注目画素203に関する座標(n,m)ごとの局所差分値d(i,j)(n,m)の最大値を、座標(n,m)ごとの窓領域最大局所差分値D(n,m)(−N≦n≦N,0≦m≦M)として決定する。
Next, the maximum local difference value determining unit 2 determines the local difference value d (i, j ) for each coordinate (n, m) related to all the
なお、本実施の形態では、窓領域204は、水平方向には−N≦n≦Nとして左右方向に設定したのに対し、垂直方向には0≦m≦Mとして上方向のみに設定した。このように設定した理由は、基本的に、D(n,m)=D(−n,−m)が成り立つため、注目画素203を中心とする領域のうち、上半分または下半分または左半分または右半分のいずれかの領域を求めれば十分となるからである。
In the present embodiment, the
こうして求められた窓領域最大局所差分値D(n,m)は、例えば、入力画像が手振れなどの劣化のない自然画像である場合、所定の閾値α(>0)を用いて、D(n,m)>α(ただし、(n,m)≠(0,0))となる特徴がある。例えば、入力画像が、画素(N’,M’)の範囲外で劣化していない場合、すなわち、式(1)において、a(n,m)=0(n>N’またはm>M’)の場合、D(n,m)>α(n<−N’またはn>N’またはm>M’)となる特徴がある。 The window region maximum local difference value D (n, m) thus determined is, for example, D (n) using a predetermined threshold α (> 0) when the input image is a natural image without deterioration such as camera shake. , M)> α (where (n, m) ≠ (0,0)). For example, when the input image is not deteriorated outside the range of the pixel (N ′, M ′), that is, in the expression (1), a (n, m) = 0 (n> N ′ or m> M ′ ) Is characterized by D (n, m)> α (n <−N ′ or n> N ′ or m> M ′).
さらに、例えば、入力画像が水平方向のみの手振れにより劣化している場合、すなわち、式(1)において、a(n,m)=0(0≦n≦N、m>0),a(n,0)>0(0≦n≦N)の場合、窓領域最大局所差分値D(n,m)は、D(n,m)>α(0≦n≦N、m>0)となる。発明者は、以上のような特徴を有する窓領域最大局所差分値D(n,m)について考察を行った。その結果、座標(n,0)の水平方向において隣り合う窓領域最大局所差分値同士の差分からなる勾配値h(n)(=D(n+1,0)−D(n,0))は、フィルタ係数a(n,0)にほぼ比例する傾向があることを見出した。 Further, for example, when the input image is deteriorated due to camera shake only in the horizontal direction, that is, in equation (1), a (n, m) = 0 (0 ≦ n ≦ N, m> 0), a (n , 0)> 0 (0 ≦ n ≦ N), the window region maximum local difference value D (n, m) is D (n, m)> α (0 ≦ n ≦ N, m> 0). . The inventor considered the window region maximum local difference value D (n, m) having the above characteristics. As a result, the gradient value h (n) (= D (n + 1,0) −D (n, 0)) consisting of the difference between the window region maximum local difference values adjacent in the horizontal direction of the coordinate (n, 0) is It has been found that there is a tendency to be approximately proportional to the filter coefficient a (n, 0).
実際に、画像x(i,j)、つまり、手振れのない自然画像をもとに、N=4,M=0,a(n,0)=0.2(0≦n≦N)として、式(1)により、水平方向に劣化を有する入力画像y(i,j)を作成し、その窓領域最大局所差分値D(n,m)を求めた。そのときのDの結果は、D(0,0)=0,D(1,0)=43,D(2,0)=82,D(3,0)=116,D(4,0)=149,D(5,0)=178,D(6,0)=179,D(n,0)≧179(n>6)となった。 Actually, based on an image x (i, j), that is, a natural image without camera shake, N = 4, M = 0, a (n, 0) = 0.2 (0 ≦ n ≦ N), An input image y (i, j) having degradation in the horizontal direction is created by the equation (1), and the window region maximum local difference value D (n, m) is obtained. The results of D at that time are as follows: D (0,0) = 0, D (1,0) = 43, D (2,0) = 82, D (3,0) = 116, D (4,0) = 149, D (5,0) = 178, D (6,0) = 179, D (n, 0) ≧ 179 (n> 6).
それらの差分からなる勾配値h(n)(=D(n+1,0)−D(n,0))を求めると、h(0)=43,h(1)=39,h(2)=34,h(3)=33,h(4)=29,h(5)=1,h(n)<2(n>6)となった。このように、式(1)のフィルタ係数a(n,0)が一定の値(上の例では0.2)である場合には、勾配値h(0)〜h(4)もほぼ一定の値となった。 When the gradient value h (n) (= D (n + 1,0) −D (n, 0)) comprising these differences is obtained, h (0) = 43, h (1) = 39, h (2) = 34, h (3) = 33, h (4) = 29, h (5) = 1, h (n) <2 (n> 6). Thus, when the filter coefficient a (n, 0) in the expression (1) is a constant value (0.2 in the above example), the gradient values h (0) to h (4) are also substantially constant. It became the value of.
次に、手振れのない自然画像x(i,j)をもとに、N=4,M=0として、式(1)により、水平方向に劣化を有する入力画像y(i,j)を作成し、その窓領域最大局所差分値D(n,m)を求めた。ただし、ここでは、上のように、式(1)のフィルタ係数a(n,0)を一定の値にするのではなく、a(0,0)=3/11,a(1,0)=2/11,a(2,0)=1/11,a(3,0)=2/11,a(4,0)=3/11とした。つまり、nの値の順に大、中、小、中、大の比重をつけた。そのときのDの結果は、D(0,0)=0,D(1,0)=55,D(2,0)=88,D(3,0)=104,D(4,0)=137,D(5,0)=176,D(6,0)=179,D(n,0)≧179(n>6)となった。 Next, based on the natural image x (i, j) with no camera shake, N = 4 and M = 0, and an input image y (i, j) having a degradation in the horizontal direction is created by Expression (1). The window region maximum local difference value D (n, m) was obtained. However, as described above, the filter coefficient a (n, 0) in the equation (1) is not set to a constant value, but a (0, 0) = 3/11, a (1,0) = 2/11, a (2, 0) = 1/11, a (3, 0) = 2/11, a (4, 0) = 3/11. That is, specific gravity of large, medium, small, medium, and large was given in order of the value of n. The results of D at that time are as follows: D (0,0) = 0, D (1,0) = 55, D (2,0) = 88, D (3,0) = 104, D (4,0) = 137, D (5,0) = 176, D (6,0) = 179, D (n, 0) ≧ 179 (n> 6).
それらの差分からなる勾配値h(n)を求めると、h(0)=55,h(1)=33,h(2)=16,h(3)=33,h(4)=39,h(5)=3,h(n)<2(n>6)となり、nの値の順に大、中、小、中、大の比重となった。このように、式(1)のフィルタ係数a(n,0)に応じて、勾配値h(0)〜h(4)も変化した。 When the gradient value h (n) consisting of the difference is obtained, h (0) = 55, h (1) = 33, h (2) = 16, h (3) = 33, h (4) = 39, h (5) = 3, h (n) <2 (n> 6), and the specific gravity was large, medium, small, medium, and large in the order of the value of n. As described above, the gradient values h (0) to h (4) also change in accordance with the filter coefficient a (n, 0) of the equation (1).
以上のことから、若干の誤差はあるものの、水平方向の手振れがある場合には、勾配値h(n)(=D(n+1,0)−D(n,0))から、手振れのフィルタ係数a(n,m)を推定することができる。 From the above, although there is a slight error, if there is a horizontal hand shake, the filter coefficient of the hand shake is calculated from the gradient value h (n) (= D (n + 1,0) −D (n, 0)). a (n, m) can be estimated.
同様に、例えば、入力画像が垂直方向のみの手振れにより劣化している場合、すなわち、式(1)において、a(n,m)=0(n>0),a(0,m)>0(0≦m≦M)の場合、窓領域最大局所差分値D(n,m)は、D(n,m)>α(n>0)となる。発明者は、座標(0,m)の垂直方向において隣り合う窓領域最大局所差分値同士の差分からなる勾配値h(m)(=D(0,m+1)−D(0,m))についても調べた。その結果、上述と同様に、勾配値h(m)は、フィルタ係数a(0,m)にほぼ比例する傾向があることを見出した。このような傾向により、垂直方向の手振れがある場合には、勾配値h(m)(=D(0、m+1)−D(0,m))から、手振れのフィルタ係数a(n,m)を推定することができる。 Similarly, for example, when the input image is deteriorated due to camera shake only in the vertical direction, that is, in equation (1), a (n, m) = 0 (n> 0), a (0, m)> 0 In the case of (0 ≦ m ≦ M), the window region maximum local difference value D (n, m) is D (n, m)> α (n> 0). The inventor makes a gradient value h (m) (= D (0, m + 1) −D (0, m)) consisting of a difference between window region maximum local difference values adjacent in the vertical direction of the coordinates (0, m). I also investigated. As a result, it was found that the gradient value h (m) tends to be substantially proportional to the filter coefficient a (0, m), as described above. Due to such a tendency, when there is camera shake in the vertical direction, the filter coefficient a (n, m) of camera shake is calculated from the gradient value h (m) (= D (0, m + 1) −D (0, m)). Can be estimated.
なお、以上のように、座標の水平方向または垂直方向において隣り合う窓領域最大局所差分値D(n,m)同士の差分からなる勾配値hが、水平方向または垂直方向の手振れを表すフィルタ係数a(n,m)に比例することは、劣化のない画像x(i,j)を離散的な変換点を持つ画像としてモデル化することで、説明することができる。 Note that, as described above, the gradient coefficient h, which is the difference between the window region maximum local difference values D (n, m) adjacent in the horizontal direction or the vertical direction of the coordinates, represents the filter coefficient representing the horizontal or vertical camera shake. Proportional to a (n, m) can be explained by modeling an image x (i, j) having no deterioration as an image having discrete transformation points.
以上のようにすれば、フィルタ係数a(n,m)を推定することができる。そこで、本実施の形態に係る勾配算出手段3は、座標(n,m)の水平方向または垂直方向の少なくとも一方向において隣り合う窓領域最大局所差分値D(n,m)同士の差分を、最大局所差分勾配値h(n,m)として座標(n,m)ごとに決定して出力する。 As described above, the filter coefficient a (n, m) can be estimated. Therefore, the gradient calculating means 3 according to the present embodiment calculates the difference between the window region maximum local difference values D (n, m) adjacent in at least one direction of the coordinate (n, m) in the horizontal direction or the vertical direction. The maximum local differential gradient value h (n, m) is determined and output for each coordinate (n, m).
次に、このような動作を行う勾配算出手段3の構成について説明する。図4は、勾配算出手段3の構成例を示すブロック図である。図に示すように、勾配算出手段3は、入力画像評価手段301と、領域選択手段302と、勾配算出範囲決定手段303と、減算手段304と、最大値選択手段305とを備える。次に、勾配算出手段3が備える各手段の動作を図4に基づき説明する。
Next, the configuration of the gradient calculating means 3 that performs such an operation will be described. FIG. 4 is a block diagram illustrating a configuration example of the
まず、最大局所差分値決定手段2から出力される窓領域最大局所差分値D(n,m)(−N≦n≦N,0≦m≦M)は、入力画像評価手段301に入力される。入力画像評価手段301は、最大局所差分値決定手段2で決定された窓領域最大局所差分値D(n,m)(−N≦n≦N,0≦m≦M)に基づいて、手振れの範囲を推定するための所定の閾値αを決定する。 First, the window region maximum local difference value D (n, m) (−N ≦ n ≦ N, 0 ≦ m ≦ M) output from the maximum local difference value determination unit 2 is input to the input image evaluation unit 301. . Based on the window region maximum local difference value D (n, m) (−N ≦ n ≦ N, 0 ≦ m ≦ M) determined by the maximum local difference value determining unit 2, the input image evaluation unit 301 A predetermined threshold value α for estimating the range is determined.
所定の閾値αは、例えば、D(n,m)(−N≦n≦N,0≦m≦M)の最大値Dmaxと、予め定めた定数γ(0<γ≦1)とを用いて、α=Dmax・γとして決定してもよい。あるいは、D(n,m)(−N≦n≦N,0≦m≦M)の平均値と標準偏差をそれぞれ、Dave,Dσとし、α=Dave−Dσとしてもよい。 The predetermined threshold α is, for example, a maximum value Dmax of D (n, m) (−N ≦ n ≦ N, 0 ≦ m ≦ M) and a predetermined constant γ (0 <γ ≦ 1). , Α = Dmax · γ may be determined. Alternatively, the average value and standard deviation of D (n, m) (−N ≦ n ≦ N, 0 ≦ m ≦ M) may be Dave and Dσ, respectively, and α = Dave−Dσ.
本実施の形態に係る勾配算出手段3は、左側の窓領域204a内の窓領域最大局所差分値D(n,m)と、右側の窓領域204b内の窓領域最大局所差分値D(n,m)とに基づいて、左側の窓領域204aまたは右側の窓領域204bのいずれかを選択する。本実施の形態では、勾配算出手段3が備える領域選択手段302が、左側の窓領域204a内の窓領域最大局所差分値と、右側の窓領域204b内の窓領域最大局所差分値とに基づいて、左側の窓領域204aまたは右側の窓領域204bのうち、劣化特性が強く表れている窓領域を選択する。
The gradient calculation means 3 according to the present embodiment includes a window region maximum local difference value D (n, m) in the
具体的には、例えば、領域選択手段302は、入力画像評価手段301から出力される所定の閾値αより小さくなる窓領域最大局所差分値D(n,m)の水平座標nの絶対値の最大値を、左側の窓領域204aおよび右側の窓領域204bについて比較する。すなわち、n_min=Max{n;D(−n,m)<α,0≦n≦N,0≦m≦M}と、n_max=Max{n;D(n,m)<α,0≦n≦N,0≦m≦M}とを比較する。そして、n_max>n_minであれば、図5(a)に示すように、右側の窓領域204b(0≦n≦N、0≦m≦M)を選択する。一方、そうでなければ、図5(b)に示すように、左側の窓領域204a(−N≦n≦0、0≦m≦M)を選択する。
Specifically, for example, the
次に、勾配算出範囲決定手段303は、窓領域最大局所差分値D(n,m)と、入力画像評価手段301で決定された所定の閾値αとに基づいて、最大局所差分勾配値h(n,m)を算出すべき座標(n,m)の範囲を決定する。本実施の形態では、領域選択手段302で選択された窓領域204a,bの範囲が、勾配算出範囲決定手段303に出力される。そして、本実施の形態に係る勾配算出範囲決定手段303は、領域選択手段302で選択された領域の窓領域最大局所差分値D(n,m)について、以下の動作を行う。なお、以下において、勾配算出範囲決定手段303が決定する座標(n,m)の範囲を、勾配算出範囲と記すこともある。
Next, the gradient calculation
勾配算出範囲決定手段303は、入力画像評価手段301から出力される所定の閾値αより小さくなる窓領域最大局所差分値D(n,m)の垂直座標mの最大値を求める。すなわち、m_max=Max{m;D(n,m)<α,−N≦n≦N,0≦m≦M}を求める。そして、勾配算出範囲決定手段303は、領域選択手段302で右側の窓領域204bを選択した場合には、座標(n,m)の範囲(0≦n≦n_max、0≦m≦m_max)を勾配算出範囲とする。一方、勾配算出範囲決定手段303は、領域選択手段302で左側の窓領域204aを選択した場合には、座標(n,m)の範囲(−n_min≦n≦0、0≦m≦m_max)を勾配算出範囲とする。
The gradient calculation
減算手段304は、領域選択手段302で選択した窓領域のうち、勾配算出範囲決定手段303で決定された勾配算出範囲内において、座標(n,m)の水平方向および垂直方向において隣り合う窓領域最大局所差分値D(n,m)同士の差分からなる勾配値を算出する。すなわち、勾配算出範囲が、0≦n≦n_max、0≦m≦m_maxである場合には、水平方向の勾配値dh(n,m)(=D(n+1,m)−D(n,m))と、垂直方向の勾配値dv(n,m)(=D(n,m+1)−D(n,m))とを算出する。勾配算出範囲が、−n_min≦n≦0、0≦m≦m_maxである場合には、水平方向の勾配値dh(n,m)(=D(n−1,m)−D(n,m))と、垂直方向の勾配値dv(n,m)(=D(n,m+1)−D(n,m))とを算出する。 The subtracting means 304 is a window area adjacent in the horizontal direction and the vertical direction of coordinates (n, m) within the gradient calculation range determined by the gradient calculation range determination means 303 among the window areas selected by the area selection means 302. A gradient value consisting of a difference between the maximum local difference values D (n, m) is calculated. That is, when the gradient calculation range is 0 ≦ n ≦ n_max and 0 ≦ m ≦ m_max, the horizontal gradient value dh (n, m) (= D (n + 1, m) −D (n, m) ) And the vertical gradient value dv (n, m) (= D (n, m + 1) −D (n, m)). When the gradient calculation range is −n_min ≦ n ≦ 0 and 0 ≦ m ≦ m_max, the horizontal gradient value dh (n, m) (= D (n−1, m) −D (n, m )) And the vertical gradient value dv (n, m) (= D (n, m + 1) -D (n, m)).
最大値選択手段305は、減算手段304から出力される2つの勾配値dh(n,m),dv(n,m)のうち、大きい方の値を選択して求める。すなわち、h’(n,m)=Max{dh(n,m),dv(n,m)}を求める。なお、表示の都合上、勾配算出範囲が0≦n≦n_max、0≦m≦m_maxであった場合には、次式(4)で表されるhに置き換え、勾配算出範囲が−n_min≦n≦0、0≦m≦m_maxであった場合には、次式(5)で表されるhに置き換えて、以下説明を行う。なお、次式(4)において、n_lim=n_maxであり、次式(5)において、n_lim=n_minである。
The maximum
最大値選択手段305は、以上により求めたh(n,m)(0≦n≦n_lim、0≦m≦m_max)を、最大局所差分勾配値として出力する。以上をまとまると、本実施の形態に係る勾配算出手段3は、座標(n,m)の水平方向または垂直方向の少なくとも一方向において隣り合う窓領域最大局所差分値D(n,m)同士の差分を、最大局所差分勾配値h(n,m)として所定の座標(n,m)ごとに決定して出力する。また、本実施の形態に係る勾配算出手段3は、領域選択手段302が選択した窓領域204a,b内の座標についてのみ、最大局所差分勾配値h(n,m)を算出する。また、本実施の形態に係る勾配算出手段3は、勾配算出範囲決定手段303で決定された範囲内の座標についてのみ、最大局所差分勾配値h(n,m)を算出する。
The maximum
こうして、勾配算出手段3から出力される最大局所差分勾配値h(n,m)は、上述したように、座標(n,m)の水平方向または垂直方向において隣り合う窓領域最大局所差分値D(n,m)の差分値となっている。そのため、この最大局所差分勾配値h(n,m)の値は、先に例示したように、入力画像y(i,j)の劣化を表すフィルタ係数a(n,m)の値に比例すると考えられる。しかしながら、先の例示において、h(5)、h(n)(n>6)が微小な値を有していたように、実際の劣化のある入力画像y(i,j)においては、フィルタ係数a(n,m)の存在範囲外であっても、最大局所差分勾配値h(n,m)は完全には0とならないことがある。 Thus, the maximum local difference gradient value h (n, m) output from the gradient calculating means 3 is the window region maximum local difference value D adjacent in the horizontal or vertical direction of the coordinates (n, m) as described above. The difference value is (n, m). Therefore, the value of the maximum local difference gradient value h (n, m) is proportional to the value of the filter coefficient a (n, m) representing the deterioration of the input image y (i, j), as exemplified above. Conceivable. However, in the previous example, as h (5), h (n) (n> 6) have a minute value, the input image y (i, j) with actual deterioration has a filter. Even if the coefficient a (n, m) is outside the existing range, the maximum local difference gradient value h (n, m) may not be completely zero.
そこで、図1に係るフィルタ範囲決定手段4は、勾配算出手段3で決定された最大局所差分勾配値h(n,m)のうち、予め定めた所定値ε(≧0)以上の最大局所差分勾配値に対応する座標(n,m)の範囲をフィルタ係数存在範囲として求める。すなわち、次式(6)で求まる範囲Sをフィルタ係数存在範囲として出力する。
Therefore, the filter range determination unit 4 according to FIG. 1 has a maximum local difference equal to or greater than a predetermined value ε (≧ 0) among the maximum local difference gradient values h (n, m) determined by the
図1に係るフィルタ係数決定手段5は、フィルタ範囲決定手段4で決定されたフィルタ係数存在範囲S内の最大局所差分勾配値h(n,m)((n,m)∈S)に基づいて、当該フィルタ係数存在範囲S内のフィルタ係数a(n,m)を算出する。本実施の形態では、フィルタ係数決定手段5は、勾配算出手段3から出力される最大局所差分勾配値h(n,m)と、フィルタ範囲決定手段4から出力されるフィルタ係数存在範囲Sとに基づいて、定数Aを次式(7)から求める。 The filter coefficient determination means 5 according to FIG. 1 is based on the maximum local difference gradient value h (n, m) ((n, m) εS) in the filter coefficient existence range S determined by the filter range determination means 4. Then, the filter coefficient a (n, m) within the filter coefficient existence range S is calculated. In the present embodiment, the filter coefficient determining means 5 includes the maximum local difference gradient value h (n, m) output from the gradient calculating means 3 and the filter coefficient existence range S output from the filter range determining means 4. Based on this, the constant A is obtained from the following equation (7).
そして、フィルタ係数決定手段5は、フィルタ係数存在範囲S内の最大局所差分勾配値h(n,m)と、定数Aとに基づいて、次式(8)の上側の式から、フィルタ係数存在範囲S内のフィルタ係数a(n,m)((n,m)∈S)を算出する。そして、フィルタ係数決定手段5は、残りの範囲内のフィルタ係数については、次式(8)の下側の式のように置き換えることにより、所定の範囲内の全てのフィルタ係数a(n,m)(0≦n≦N、0≦m≦M)を決定する。 Then, the filter coefficient determination means 5 calculates the filter coefficient existence based on the maximum local difference gradient value h (n, m) in the filter coefficient existence range S and the constant A from the upper expression of the following expression (8). A filter coefficient a (n, m) ((n, m) εS) within the range S is calculated. Then, the filter coefficient determination means 5 replaces the filter coefficients in the remaining range as shown in the lower expression of the following expression (8), thereby obtaining all the filter coefficients a (n, m in the predetermined range. ) (0 ≦ n ≦ N, 0 ≦ m ≦ M) is determined.
なお、上記において、フィルタ範囲決定手段4は、h(n,m)≧εとなる座標(n,m)のフィルタ係数存在範囲Sを求めたが、これに限るものではない。例えば、フィルタ範囲決定手段4は、h(n,m)<εとなる最大局所差分勾配値h(n,m)に対して、h(n,m)=0と値を置き換え、フィルタ係数存在範囲Sを、S={(n,m;0≦n≦n_lim、0≦m≦m_max)}として出力するように構成してもよい。この場合も、フィルタ係数決定手段5から出力されるフィルタ係数a(n,m)は、上述の構成と全く同じ結果になる。 In the above description, the filter range determination unit 4 calculates the filter coefficient existence range S at the coordinates (n, m) where h (n, m) ≧ ε, but the present invention is not limited to this. For example, the filter range determination means 4 replaces the value with h (n, m) = 0 for the maximum local difference gradient value h (n, m) where h (n, m) <ε, and the filter coefficient exists. The range S may be output as S = {(n, m; 0 ≦ n ≦ n_lim, 0 ≦ m ≦ m_max)}. Also in this case, the filter coefficient a (n, m) output from the filter coefficient determining means 5 has the same result as the above-described configuration.
以上に説明した最大局所差分値決定手段2、および、勾配算出手段3、および、フィルタ範囲決定手段4、および、フィルタ係数決定手段5からなる劣化推定手段101は、入力画像y(i,j)(0≦i<I,0≦j<J)から、その入力画像の劣化を表す線形フィルタのフィルタ係数a(n,m)(0≦n≦N,0≦m≦M)を出力する。 The degradation estimation means 101 including the maximum local difference value determination means 2, the gradient calculation means 3, the filter range determination means 4, and the filter coefficient determination means 5 described above is the input image y (i, j). From (0 ≦ i <I, 0 ≦ j <J), the filter coefficient a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) of the linear filter representing the degradation of the input image is output.
劣化推定手段101が備えるフィルタ係数決定手段5から出力されたフィルタ係数a(n,m)は、補正手段102に入力される。図1に係る補正手段102は、フィルタ係数a(n,m)を用いて、フィルタ処理の逆処理を入力画像y(i,j)に施し、補正画像w(i,j)として出力する。フィルタ処理の逆処理は、一般にデコンボリューションと呼ばれ、例えば、Richardson-Lucyアルゴリズムや、ウィーナフィルタなどの方式を使用することができる。
The filter coefficient a (n, m) output from the filter coefficient determination unit 5 provided in the
補正手段102から出力される補正画像w(i,j)は、記憶手段103に書き込まれる。なお、記憶手段103は、記憶手段100と物理的に同じハードディスク、メモリなどの記憶装置を共用してもよい。
The corrected image w (i, j) output from the
以上のように、本実施の形態に係る画像補正装置は、入力画像y(i,j)のみから、その入力画像の劣化を表すフィルタ係数a(n,m)を推定し、このフィルタ係数を用いて、入力画像に補正処理を施すことができる。そのため、撮影時に劣化を特定する手振れセンサなどが不要となるという効果がある。また、撮像装置と連動しない画像表示機器に適用しても、画像の劣化を推定し、補正画像w(i,j)が得られるという効果がある。 As described above, the image correction apparatus according to the present embodiment estimates the filter coefficient a (n, m) representing the degradation of the input image from only the input image y (i, j), and uses this filter coefficient. In this way, the input image can be corrected. For this reason, there is an effect that a camera shake sensor or the like for identifying deterioration at the time of shooting is not necessary. Further, even when applied to an image display device that is not interlocked with the imaging device, there is an effect that the image degradation is estimated and a corrected image w (i, j) can be obtained.
なお、本実施の形態においては、入力画像y(i,j)は、記憶手段100に記憶された画像であるものとして、劣化推定手段101および補正手段102に入力される構成とした。しかしこれに限るものではなく、入力画像y(i,j)は、CCD、CMOSなどの撮像装置の画像であるものとして、直接、劣化推定手段101および補正手段102に入力される構成であってもよい。
In the present embodiment, the input image y (i, j) is assumed to be an image stored in the
また、本実施の形態に係る最大局所差分値決定手段2、勾配算出手段3、フィルタ範囲決定手段4、フィルタ係数決定手段5、および、補正手段102の各手段は、電子回路として構成してもよいし、マイクロコンピュータのようなプロセッサ上で動作するソフトウェアとして構成してもよい。 The maximum local difference value determining means 2, the gradient calculating means 3, the filter range determining means 4, the filter coefficient determining means 5, and the correcting means 102 according to the present embodiment may be configured as an electronic circuit. Alternatively, it may be configured as software that operates on a processor such as a microcomputer.
また、本実施の形態に係る最大局所差分値決定手段2は、入力画像の画像領域201のうち、中央の1/4程度の領域を差分値決定領域202とした。しかし、差分値決定領域202はこれに限るものではなく、入力画像の画像領域201の全体または一部からなる任意の領域に設定してもよい。例えば、画像領域201の中心にいる人物に焦点を合わせて写真を撮影するような場合には、画面の中心では焦点が合い、画面の周辺部では遠景となって焦点が合わないことがある。このような場合には、本実施の形態で記述したように、入力画像の画像領域201の中央部の領域を差分値決定領域202とすることにより、中心にいる人物に合わせて、手振れによる入力画像の劣化を表すフィルタ係数a(n,m)を効果的に検出することができる。逆に、焦点の合っていない遠景のぼやけを補正したい場合には、画像領域201の全体、または、周辺部の領域を差分値決定領域202としてもよい。
In addition, the maximum local difference value determination unit 2 according to the present embodiment sets a region about a quarter of the center of the
また、顔検出等の技術を用いて、画像領域201上において焦点を合わすべき位置を指定する手段をさらに備えている場合は、焦点を合わせた位置周辺の領域を差分値決定領域202とすることにより、上述のフィルタ係数a(n,m)を少ない演算量で検出することができる。
In addition, when a means for designating a position to be focused on the
また、本実施の形態においては、最大局所差分値決定手段2は、注目画素203から、水平方向に−N≦n≦N、垂直方向に0≦m≦Mの範囲を窓領域204として、窓領域最大局所差分値D(n,m)を求めた。しかし、窓領域204の範囲は、注目画素203から、水平方向に0≦n≦N、垂直方向に−M≦m≦Mとしても、上述と全く同じ効果を得ることができる。基本的に、D(n,m)=D(−n,−m)が成り立つため、−N≦n≦N、−M≦m≦Mの座標(n,m)の領域のうち、半分の領域を窓領域204とすることで、演算量を削減することができる。
Further, in the present embodiment, the maximum local difference value determining means 2 uses the
また、本実施の形態に係る勾配算出手段3は、領域選択手段302を備える構成とし、この領域選択手段302により、左側の窓領域204a(−N≦n≦0)および右側の窓領域204b(0≦n≦N)のうち、入力画像の劣化特性が強く表れている方を選択するとした。しかしこれに限るものではなく、勾配算出手段3は、左右の領域を選択せずに、窓領域204全体から、最大局所差分勾配値hを求めるものであってもよい。この場合の勾配算出手段3の構成を、図6を用いて以下説明する。
In addition, the
図6に係る勾配算出手段3が備える勾配算出範囲決定手段303は、入力画像評価手段301で決定された所定の閾値αに基づいて、上述のn_min、n_max、m_maxを求める。そして、勾配算出範囲決定手段303は、座標(n,m)の範囲(−n_min≦n≦n_max、0≦m≦m_max)を勾配算出範囲とする。
The gradient calculation
減算手段304は、勾配算出範囲決定手段303で決定した勾配算出範囲について、座標(n,m)の水平方向および垂直方向において隣り合う窓領域最大局所差分値D(n,m)同士の差分からなる勾配値を算出する。例えば、0≦n≦n_max、0≦m≦m_maxの範囲については、水平方向の勾配値dh1(n,m)(=D(n+1,m)−D(n,m))と、垂直方向の勾配値dv1(n,m)(=D(n,m+1)−D(n,m))とを算出する。−n_min≦n≦0、0≦m≦m_maxの範囲については、水平方向の勾配値dh2(n,m)(=D(n−1,m)−D(n,m))と、垂直方向の勾配値dv2(n,m)(=D(n,m+1)−D(n,m))とを算出する。
The subtracting
最大値選択手段305は、減算手段304から出力される4つの勾配値から、次式(9)により、h(n,m)を求める(ただし、n_lim=Max{n_max,n_min})。そして、最大値選択手段305は、求めたh(n,m)(0≦n≦n_lim、0≦m≦m_max)を、最大局所差分勾配値として出力する。
The maximum
このように、勾配算出手段3が、領域選択手段302を備えず、左側の窓領域204aおよび右側の窓領域204bのうち、入力画像の劣化特性が強く表れている方を選択しなくても、最大局所差分勾配値h(n,m)を出力することができる。しかしながら、通常、入力画像の劣化が手振れ起因である場合、例えば、右上方向の手振れと、この方向と90度をなす左上方向の手振れとが互いに同程度の強度で混在することは少ない。そのため、本実施の形態のように、勾配算出手段3が、領域選択手段302により、左側の窓領域204aまたは右側の窓領域204bのいずれかの窓領域を選択することで、減算手段304の演算量を削減することができる。
As described above, the
なお、この効果が得られる構成を説明するために、本実施の形態では、注目画素203において互いに隣接する第1,第2の窓領域は、左側の窓領域204aおよび右側の窓領域204bであるものとした。そして、勾配算出手段3は、領域選択手段302により、それらの窓領域204a,bのうち、入力画像の劣化特性が強く表れている窓領域を選択した。しかし、選択される窓領域は、左側の窓領域204aおよび右側の窓領域204bに限るものではない。
In order to describe a configuration that can obtain this effect, in the present embodiment, the first and second window regions adjacent to each other in the
例えば、最大局所差分値決定手段2において設定された窓領域204が、0≦n≦N(または−N≦n≦0)、−M≦m≦Mのように、水平方向が注目画素203の右方向(または左方向)に広がり、垂直方向は上下方向に広がるように設定されている場合を想定する。この場合、第1,第2の窓領域のいずれか一方は、窓領域204の中心から上側の窓領域(0≦m≦M)であるとし、他方は、窓領域204の中心から下側の窓領域(−M≦m≦0)であるとしてもよい。そして、勾配算出手段3は、領域選択手段302により、上下の窓領域のうち、入力画像の劣化特性が強く表れている窓領域を選択するものであってもよい。このように構成しても、上述と全く同じ効果を得ることができる。
For example, if the
また、本実施の形態においては、領域選択手段302は、入力画像評価手段301で決定された所定の閾値αより小さくなる窓領域最大局所差分値D(n,m)の水平座標nの絶対値の最大値を、左側の窓領域204aおよび右側の窓領域204bについて比較し、その比較に基づいて、いずれか一方の窓領域を選択した。しかし、領域選択の方法はこれに限るものではない。窓領域最大局所差分値D(n,m)の値が小さいほど、手振れなどの画像劣化特性が表れるので、左右の窓領域204a,bのうち、D(n,m)の値が小さい領域を選択するように構成すればよい。
Further, in the present embodiment, the
例えば、左の窓領域204aにおけるD(n,m)の総和と、右の窓領域204bにおけるD(n,m)の総和とを比較して、窓領域を選択してもよい。すなわち、次式(10)により、左の窓領域204aにおけるD(n,m)の総和Dlと、右の窓領域204bにおけるD(n,m)の総和Drとを求める。そして、領域選択手段302は、Dl>Drならば、右の窓領域204bを選択し、Dl>Drでない場合には、左の窓領域204aを選択する。
For example, the window region may be selected by comparing the sum of D (n, m) in the
また、本実施の形態に係る勾配算出手段3は、入力画像評価手段301と、勾配算出範囲決定手段303とを備える構成とした。そして、勾配算出範囲決定手段303は、入力画像評価手段301から出力される所定の閾値αと、窓領域最大局所差分値D(n,m)とから、最大局所差分勾配値を算出すべき勾配算出範囲を決定した。しかし、これに限るものではなく、勾配算出手段3は、入力画像評価手段301および勾配算出範囲決定手段303を備えずに、窓領域204全体、左側の窓領域204a、右側の窓領域204bのいずれかを勾配算出範囲として決定する構成にしてもよい。
In addition, the
図7は、入力画像評価手段301および勾配算出範囲決定手段303を備えない場合の勾配算出手段3の構成を示す図である。図7に係る勾配算出手段3では、まず、窓領域最大局所差分値D(n,m)が、領域選択手段302に入力される。領域選択手段302は、例えば、上の式(10)から、Dl、Drを求め、Dl>Drならば、右の窓領域204bを選択し、Dl>Drでない場合には、左の窓領域204aを選択する。
FIG. 7 is a diagram illustrating a configuration of the
次に、減算手段304は、領域選択手段302で選択した領域について、座標(n,m)の水平方向および垂直方向において隣り合う窓領域最大局所差分値D(n,m)同士の差分からなる勾配値を算出する。例えば、右側の窓領域204bが選択された場合には、座標(n,m)の範囲(0≦n≦N、0≦m≦M)について,水平方向の勾配値dh(n,m)(=D(n+1,m)−D(n,m))と、垂直方向の勾配値dv(n,m)(=D(n,m+1)−D(n,m))とを算出する。左側の窓領域204bが選択された場合には、座標(n,m)の範囲(−N≦n≦0、0≦m≦M)について,水平方向の勾配値dh(n,m)(=D(n−1,m)−D(n,m))と、垂直方向の勾配値dv(n,m)(=D(n,m+1)−D(n,m))とを算出する。
Next, the subtracting means 304 consists of the difference between the window area maximum local difference values D (n, m) adjacent in the horizontal direction and the vertical direction of the coordinates (n, m) for the area selected by the area selecting means 302. Calculate the slope value. For example, when the
最大値選択手段305は、減算手段304から出力される2つの勾配値dh(n,m),dv(n,m)のうち、大きい方の値を選択して求める。すなわち、h’(n,m)=Max{dh(n,m),dv(n,m)}を求める。左側の窓領域204bが選択された場合には、h(n,m)=h’(n,m)(0≦n≦N、0≦m≦M)とし、右側の窓領域204aが選択された場合には、h(n,m)=h’(n−N,m)(0≦n≦N、0≦m≦M)とする。そして、最大値選択手段305は、以上により求めたh(n,m)(0≦n≦N、0≦m≦M)を、最大局所差分勾配値として出力する。
The maximum
以上のような、図7に係る勾配算出手段3は、演算範囲が常に固定であるため、回路構成が簡単になるという特徴がある。しかしながら、発生し得る手振れの範囲が広く、窓領域204の範囲を決定する(N,M)を大きく設定する必要がある場合には、演算の処理量が多くなる。これに対し、本実施の形態に係る勾配算出手段3は、入力画像評価手段301と、勾配算出範囲決定手段303とを備えるため、入力画像に応じた所定の閾値αにより勾配算出範囲を制限することができる。そのため、減算手段304以降の演算における処理量(または回路規模ないし消費電力)を削減することができる。
As described above, the
また、本実施の形態に係る勾配算出手段3は、座標(n,m)の水平方向および垂直方向において隣り合う窓領域最大局所差分値D(n,m)同士の差分を求め、その最大値を最大局所差分勾配値h(n,m)として出力するように構成した。しかしこれに限るものではなく、勾配算出手段3は、座標(n,m)の水平方向または垂直方向いずれか一方のみにおいて隣り合う窓領域最大局所差分値D(n,m)同士の差分を最大局所差分勾配値h(n,m)として出力するようにしてもよい。 Further, the gradient calculating means 3 according to the present embodiment obtains a difference between the window region maximum local difference values D (n, m) adjacent in the horizontal direction and the vertical direction of the coordinates (n, m), and the maximum value thereof. Is output as the maximum local difference gradient value h (n, m). However, the present invention is not limited to this, and the gradient calculation means 3 maximizes the difference between the adjacent window region maximum local difference values D (n, m) only in either the horizontal direction or the vertical direction of the coordinates (n, m). You may make it output as local difference gradient value h (n, m).
例えば、車載の撮像装置のブレのように、水平方向のブレはほとんど発生しないが、垂直方向のブレが強く発生する場合には、勾配算出手段3は、座標(n,m)の垂直方向のみにおいて隣り合う窓領域最大局所差分値D(n,m)の差分を、最大局所差分勾配値h(n,m)として出力するようにしてもよい。また、一般に、デジタルカメラを手持ちで撮影する場合にも、シャッターを押す動作により、垂直方向の手振れが発生しやすいため、上述と同様の構成にすればよい。勾配算出手段3をこのような構成することにより、水平方向における勾配値の算出を省略するため、演算量を削減できるという効果を得ることができる。また、撮像装置の構成や撮像装置の設置方法によっては、シャッターを押す方向が、保存される画像の水平方向となる場合がある。このような場合には、水平方向のみにおいて隣り合う窓領域最大局所差分値D(n,m)の差分を、最大局所差分勾配値h(n,m)として出力するように勾配算出手段3を構成すれば、上述と同様、演算量を削減することができる。
For example, in the case where the blur in the horizontal direction hardly occurs like the blur of the in-vehicle image pickup apparatus, but the blur in the vertical direction occurs strongly, the gradient calculation means 3 is only in the vertical direction of the coordinates (n, m). The difference between the adjacent window region maximum local difference values D (n, m) may be output as the maximum local difference gradient value h (n, m). In general, even when a digital camera is photographed by hand, a camera shake in the vertical direction is likely to occur due to the operation of pressing the shutter. By configuring the gradient calculating means 3 in this way, the calculation of the gradient value in the horizontal direction is omitted, so that the amount of calculation can be reduced. In addition, depending on the configuration of the imaging device and the installation method of the imaging device, the direction in which the shutter is pressed may be the horizontal direction of the stored image. In such a case, the
<実施の形態2>
図8は、本実施の形態に係る画像補正装置の構成を示すブロック図である。なお、以下の実施の形態2に係る構成のうち、新たに説明しないものについては、実施の形態1と同じ構成については、同一の符号を付すものとする。図に示すように、本実施の形態に係る画像補正装置は、記憶手段100と、劣化推定手段101と、逆フィルタ設定手段6と、巡回型フィルタ手段7と、記憶手段103とを備える。逆フィルタ設定手段6、および、巡回型フィルタ手段7は、補正手段102を構成している。
<Embodiment 2>
FIG. 8 is a block diagram showing the configuration of the image correction apparatus according to the present embodiment. In addition, about the structure which is not newly demonstrated among the structures which concern on the following Embodiment 2, the same code | symbol shall be attached | subjected about the same structure as Embodiment 1. FIG. As shown in the figure, the image correction apparatus according to the present embodiment includes storage means 100, deterioration estimation means 101, inverse filter setting means 6, cyclic filter means 7, and storage means 103. The inverse filter setting unit 6 and the
記憶手段100には、画像が記憶されている。劣化推定手段101には、記憶手段100から出力された画像が入力画像として入力される。劣化推定手段101は、この入力画像から、当該入力画像の劣化を表す線形フィルタを所定の範囲で求め、そのフィルタ係数を第1のフィルタ係数として出力する。本実施の形態にかかる補正手段102は、劣化推定手段101から出力される所定の範囲の2次元線形フィルタを示す第1のフィルタ係数を用いて、フィルタ処理の逆処理を入力画像に施す。
An image is stored in the
補正手段102が備える逆フィルタ設定手段6は、劣化推定手段101からの第1のフィルタ係数に基づいて、巡回型フィルタ処理を行うための第2のフィルタ係数、および、入力画像の画素に対して巡回型フィルタ処理を施すべき順番を決定する。補正手段102が備える巡回型フィルタ手段7は、逆フィルタ設定手段6で決定した第2のフィルタ係数、および、順番に基づいて、記憶手段100からの入力画像に巡回型フィルタ処理を施す。こうして、巡回型フィルタ手段7は、フィルタ処理の逆処理に相当する巡回型フィルタ処理を、入力画像に施すことにより、補正画像を生成する。記憶手段103は、巡回型フィルタ手段7から出力される補正画像を記憶する。
The inverse filter setting unit 6 included in the correcting
次に基本動作について説明する。実施の形態1で述べたように、一般に手振れや焦点ずれなどの劣化は、線形で表すことができると考えられる。つまり、劣化のある画像データをy(i,j)(i,j;画素単位の座標、0≦i<I、0≦j<J)とし、入力画像の劣化を表す線形フィルタのフィルタ係数をa(n,m)(0≦n≦N、0≦m≦M)とし、劣化のない画像データをx(i,j)とすると、式(1)の関係が成り立つ。本実施の形態に係る画像補正装置の劣化推定手段101は、実施の形態1と同様、入力画像y(i,j)から、その入力画像の劣化を表すフィルタ係数a(n,m)を推定する。ここでのフィルタ係数a(n,m)は、所定の範囲内の座標(n,m)ごとに与えられており、本実施の形態に係る所定の範囲の形状は、0≦n≦N、0≦m≦Mで表される長方形である。
Next, the basic operation will be described. As described in Embodiment 1, it is generally considered that deterioration such as camera shake and defocus can be expressed linearly. In other words, the image data with deterioration is y (i, j) (i, j; coordinates in pixel units, 0 ≦ i <I, 0 ≦ j <J), and the filter coefficient of the linear filter representing the deterioration of the input image is set. When a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) is assumed and image data without deterioration is x (i, j), the relationship of Expression (1) is established. Similar to the first embodiment, the
本実施の形態に係る画像補正装置の補正手段102は、所定の範囲の2次元線形フィルタを示す第1のフィルタ係数a(n,m)を用いて、フィルタ処理の逆処理を入力画像y(i,j)に施す。こうして、本実施の形態に係る画像補正装置は、劣化のない画像x(i,j)に相当する補正画像w(i,j)を得るように構成されている。
The
以下、図8に従って、本実施の形態に係る画像補正装置の詳細な動作を説明する。まず、記憶手段100には、入力画像y(i,j)(0≦i<I、0≦j<J)が保存されている。記憶手段100から読み出された入力画像y(i,j)は、劣化推定手段101に入力される。劣化推定手段101は、入力画像y(i,j)から、入力画像の劣化を表す線形フィルタのフィルタ係数a(n,m)を求めて出力する。本実施の形態に係る劣化推定手段101は、実施の形態1に係る最大局所差分値決定手段2、および、勾配算出手段3、および、フィルタ範囲決定手段4、および、フィルタ係数決定手段5から構成されるものとする。
The detailed operation of the image correction apparatus according to this embodiment will be described below with reference to FIG. First, the
劣化推定手段101から出力されたフィルタ係数a(n,m)と、記憶手段100からの入力画像y(i,j)とは、補正手段102に入力される。本実施の形態に係る画像補正装置が備える補正手段102は、所定の範囲(0≦n≦N、0≦m≦M)の線形フィルタのフィルタ係数である第1のフィルタ係数a(n,m)を用いて、フィルタ処理の逆処理を入力画像y(i,j)に施す。
The filter coefficient a (n, m) output from the
この動作を行うため、本実施の形態に係る補正手段102が備える逆フィルタ設定手段6および巡回型フィルタ手段7は、以下の動作を行う。まず、逆フィルタ設定手段6は、フィルタ係数a(n,m)に基づいて、巡回型フィルタ処理を行うための第2のフィルタ係数であるフィルタ係数b(n,m)、および、入力画像の画素に対して巡回型フィルタ処理を施すべき順番を決定する。なお、以下、入力画像y(i,j)の画素(i,j)に対して巡回型フィルタ処理を施すべき順番を、巡回型フィルタ処理の順番と記すこともある。次に、巡回型フィルタ手段7は、逆フィルタ設定手段6で決定したフィルタ係数b(n,m)、および、巡回型フィルタ処理の順番に基づいて、記憶手段100からの入力画像に巡回型フィルタ処理を施す。この処理により、補正手段102は、補正画像w(i,j)を生成し、補正画像w(i,j)を出力する。以下、逆フィルタ設定手段6および巡回型フィルタ手段7の動作について詳しく説明する。
In order to perform this operation, the inverse filter setting unit 6 and the
一般に、式(1)が成り立つ場合には、a(n,m)≠0を条件として、次式(11)が成り立つ。 In general, when equation (1) holds, the following equation (11) holds on condition that a (n, m) ≠ 0.
劣化がある入力画像y(i,j)から補正画像w(i,j)への変換は、式(11)を書き換えた次式(12)で表される2次元の巡回型フィルタ処理により実現できる。なお、式(12)に示されるb(n,m)は、巡回型フィルタ処理を行うためのフィルタ係数であり、b(0,0)=1/a(0,0)、b(n,m)=a(n,m)/a(0,0)((n,m)≠(0,0)、0≦n≦N、0≦m≦M)である。 The conversion from the input image y (i, j) having a deterioration to the corrected image w (i, j) is realized by a two-dimensional cyclic filter process represented by the following expression (12) obtained by rewriting the expression (11). it can. Note that b (n, m) shown in Expression (12) is a filter coefficient for performing the cyclic filter processing, and b (0,0) = 1 / a (0,0), b (n, m) = a (n, m) / a (0,0) ((n, m) ≠ (0,0), 0 ≦ n ≦ N, 0 ≦ m ≦ M).
式(12)より、ある画素(i,j)の入力画像y(i,j)と、過去に求めた補正画像w(i−n,j−m)(0≦n≦N、0≦m≦M、(n,m)≠(0,0))とから、新しい補正画像w(i,j)が算出可能となる。式(12)で表される2次元の巡回型フィルタ処理とは、新しい補正画像の算出を、入力画像の画素(i,j)の水平方向および垂直方向それぞれについて「昇順」に巡回して行う処理を意味する。この2次元の巡回型フィルタ処理により、入力画像の全画素(i,j)(0≦i<I、0≦j<J)の補正画像w(i,j)を算出することが可能となる。 From Expression (12), an input image y (i, j) of a pixel (i, j) and a corrected image w (in, jm) (0 ≦ n ≦ N, 0 ≦ m) obtained in the past. ≦ M, (n, m) ≠ (0,0)), a new corrected image w (i, j) can be calculated. In the two-dimensional cyclic filter processing expressed by Expression (12), the calculation of a new corrected image is performed in an “ascending order” in the horizontal and vertical directions of the pixel (i, j) of the input image. Means processing. By this two-dimensional cyclic filter processing, it becomes possible to calculate a corrected image w (i, j) of all pixels (i, j) (0 ≦ i <I, 0 ≦ j <J) of the input image. .
ただし、2次元の巡回型フィルタ処理を行うためには、新しい補正画像w(i,j)の元となる過去の補正画像、つまり、式(12)の右辺の補正画像w(i,j)の初期値が必要である。次に、補正画像w(i,j)の初期値と、初期値を与えるべき画素(i,j)の範囲について説明する。式(12)により算出される補正画像w(i,j)と、劣化のない画像x(i,j)との間には、次式(13)で示される関係が成り立つ。 However, in order to perform the two-dimensional recursive filter processing, the past corrected image that is the basis of the new corrected image w (i, j), that is, the corrected image w (i, j) on the right side of Expression (12). The initial value of is required. Next, the initial value of the corrected image w (i, j) and the range of the pixel (i, j) that should be given the initial value will be described. The relationship represented by the following equation (13) is established between the corrected image w (i, j) calculated by equation (12) and the image x (i, j) without deterioration.
この式(13)は、所定の範囲(0≦i<N、0≦j<M)内の全ての画素(i,j)において、w(i,j)=x(i,j)が成立する場合には、帰納的に、全ての画素(i,j)(0≦i<I、0≦j<J)について、w(i,j)=x(i,j)が成立することを意味する。すなわち、w(i,j)=x(i,j)(0≦i<N、0≦j<M)を初期値として与えれば、式(12)により、全ての画素(i,j)(0≦i<I、0≦j<J)において、劣化のない画像x(i,j)に相当する補正画像w(x,j)が得られることを意味する。 In this equation (13), w (i, j) = x (i, j) is established in all pixels (i, j) within a predetermined range (0 ≦ i <N, 0 ≦ j <M). In that case, it is recursively determined that w (i, j) = x (i, j) holds for all pixels (i, j) (0 ≦ i <I, 0 ≦ j <J). means. That is, if w (i, j) = x (i, j) (0 ≦ i <N, 0 ≦ j <M) is given as an initial value, all pixels (i, j) ( In 0 ≦ i <I, 0 ≦ j <J), it means that a corrected image w (x, j) corresponding to an image x (i, j) having no deterioration is obtained.
しかしながら、実際には、劣化のない画像x(i,j)の値は不明であるため、本実施の形態では、補正画像w(i,j)の初期値として、w(i,j)=y(i,j)(0≦i<N、0≦j<M)と設定する。つまり、その範囲(0≦i<N、0≦j<M)内の入力画像の画素(i,j)については巡回型フィルタ処理をしないものとする。 However, in practice, since the value of the image x (i, j) without deterioration is unknown, in the present embodiment, as the initial value of the corrected image w (i, j), w (i, j) = y (i, j) (0 ≦ i <N, 0 ≦ j <M) is set. That is, it is assumed that the cyclic filter processing is not performed on the pixel (i, j) of the input image within the range (0 ≦ i <N, 0 ≦ j <M).
この場合、補正画像w(i,j)の初期値の誤差が、巡回型フィルタ処理により、画像全体に伝播するという問題がある。そこで、本実施の形態に係る逆フィルタ設定手段6は、フィルタ係数b(n,m)((n,m)≠(0,0))の絶対値を1未満に設定する。例えば、逆フィルタ設定手段6は、次式(14)により、絶対値が1未満に設定されるフィルタ係数b(n,m)を決定する。 In this case, there is a problem that the error of the initial value of the corrected image w (i, j) is propagated to the entire image by the cyclic filter processing. Therefore, the inverse filter setting means 6 according to the present embodiment sets the absolute value of the filter coefficient b (n, m) ((n, m) ≠ (0,0)) to be less than 1. For example, the inverse filter setting means 6 determines the filter coefficient b (n, m) whose absolute value is set to less than 1 by the following equation (14).
ただし、B=Max{|a(n,m)|;(n,m)≠(0,0),0≦n≦N,0≦m≦M}であり、C(0<C<1)は定数である。式(14)によりフィルタ係数b(n,m)((n,m)≠(0,0))を設定した後、フィルタのゲインが1となるように、b(0,0)を次式(15)により設定する。 However, B = Max {| a (n, m) |; (n, m) ≠ (0,0), 0 ≦ n ≦ N, 0 ≦ m ≦ M}, and C (0 <C <1) Is a constant. After setting the filter coefficient b (n, m) ((n, m) ≠ (0,0)) by the equation (14), b (0,0) is expressed by the following equation so that the gain of the filter becomes 1. Set by (15).
以上のように、フィルタ係数b(n,m)((n,m)≠(0,0))の絶対値を1より小さくすることにより、補正画像w(i,j)の初期値の誤差が、画像全体に伝播する影響を小さくすることができる。なお、実験によると、定数Cとして、0.5程度の値を設定したときには、誤差パターンを低減でき、かつ、十分な補正効果が得られた。 As described above, by making the absolute value of the filter coefficient b (n, m) ((n, m) ≠ (0,0)) smaller than 1, the error of the initial value of the corrected image w (i, j) However, the influence which propagates to the whole image can be made small. According to experiments, when a value of about 0.5 was set as the constant C, the error pattern could be reduced and a sufficient correction effect was obtained.
上記の説明においては、a(0,0)≠0であると仮定し、初期値が設定されていない補正画像w(i,j)を、入力画像の画素(i,j)の水平方向および垂直方向それぞれについて昇順に算出した。しかし、a(0,0)=0の場合は、巡回型フィルタ処理の順番を、上述とは異なる順番に変更することで、上述と同様の処理が可能となる。例えば、入力画像の劣化が、水平、垂直、または、斜め方向のいずれか一方向の1次元のフィルタ処理で表されると仮定する。このように仮定した場合、所定の範囲(0≦n≦N、0≦m≦M)内の4隅の座標のフィルタ係数a(0,0)、a(N,0)、a(0,M)、a(N,M)のいずれかの値は、ほとんどの場合、非零となる。 In the above description, it is assumed that a (0,0) ≠ 0, and the corrected image w (i, j) with no initial value is set in the horizontal direction of the pixel (i, j) of the input image and Calculations were performed in ascending order for each vertical direction. However, when a (0, 0) = 0, the same processing as described above can be performed by changing the order of the cyclic filter processing to an order different from the above. For example, it is assumed that the degradation of the input image is represented by a one-dimensional filtering process in any one of the horizontal, vertical, and diagonal directions. Assuming this, filter coefficients a (0,0), a (N, 0), a (0,0) at the coordinates of the four corners within a predetermined range (0 ≦ n ≦ N, 0 ≦ m ≦ M). Most of the values of M) and a (N, M) are non-zero.
仮に、それらの値が非零とならなかったとしても、劣化推定手段101が、フィルタ係数a(N,0)、a(0,M)、a(N,M)が非零となる領域にあわせて、所定の範囲を定める係数N、Mを設定するようにすれば、それらのうちいずれか一つは、必ず非零となる。そこで、以下、フィルタ係数a(N,0)、a(0,M)、a(N,M)のいずれか一つが非零である場合について説明する。 Even if those values do not become non-zero, the deterioration estimation means 101 is in a region where the filter coefficients a (N, 0), a (0, M), and a (N, M) are non-zero. In addition, if the coefficients N and M that define a predetermined range are set, any one of them is always non-zero. Thus, hereinafter, a case where any one of the filter coefficients a (N, 0), a (0, M), and a (N, M) is non-zero will be described.
例えば、a(N,0)≠0の場合には、次式(16)により、フィルタ係数b(n,m)を設定する。 For example, when a (N, 0) ≠ 0, the filter coefficient b (n, m) is set by the following equation (16).
ただし、B=Max{|a(n,m)|;(n,m)≠(N,0),0≦n≦N,0≦m≦M}であり、C(0<C<1)は定数である。式(16)によりフィルタ係数b(n,m)((n,m)≠(0,0))を設定した後、b(0,0)を式(15)により設定する。さらに、補正画像w(i,j)の初期値として、w(i,j)=y(i,j)(I−N≦i<I、0≦j<M)と設定する。そして、次式(17)で表される2次元の巡回型フィルタ処理を行う。 However, B = Max {| a (n, m) |; (n, m) ≠ (N, 0), 0 ≦ n ≦ N, 0 ≦ m ≦ M}, and C (0 <C <1) Is a constant. After setting the filter coefficient b (n, m) ((n, m) ≠ (0,0)) by the equation (16), b (0,0) is set by the equation (15). Further, w (i, j) = y (i, j) (IN ≦ i <I, 0 ≦ j <M) is set as an initial value of the corrected image w (i, j). Then, a two-dimensional cyclic filter process represented by the following equation (17) is performed.
式(17)より、ある画素(i,j)の入力画像y(i,j)と、過去に求めた補正画像w(i+n,j−m)(0≦n≦N、0≦m≦M、(n,m)≠(0,0))とから、新しい補正画像w(i,j)が算出可能となる。式(17)で表される2次元の巡回型フィルタ処理とは、新しい補正画像の算出を、入力画像の画素(i,j)の水平方向については「降順」、垂直方向については「昇順」に巡回して行う処理を意味する。 From Expression (17), an input image y (i, j) of a certain pixel (i, j) and a corrected image w (i + n, j−m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) obtained in the past. , (N, m) ≠ (0,0)), a new corrected image w (i, j) can be calculated. The two-dimensional cyclic filter processing expressed by Expression (17) is to calculate a new corrected image by “descending order” for the horizontal direction of the pixel (i, j) of the input image and “ascending order” for the vertical direction. This means processing performed in a round.
以上、a(N,0)≠0の場合について説明したが、a(0,M)≠0の場合には、次式(18)により、フィルタ係数b(n,m)を設定する。 The case where a (N, 0) ≠ 0 has been described above. However, when a (0, M) ≠ 0, the filter coefficient b (n, m) is set by the following equation (18).
ただし、B=Max{|a(n,m)|;(n,m)≠(0,M),0≦n≦N,0≦m≦M}であり、C(0<C<1)は定数である。式(18)によりフィルタ係数b(n,m)((n,m)≠(0,0))を設定した後、b(0,0)を式(15)により設定する。さらに、補正画像w(i,j)の初期値として、w(i,j)=y(i,j)(0≦i<N、J−M≦j<J)と設定する。そして、次式(19)で表される2次元の巡回型フィルタ処理を行う。 However, B = Max {| a (n, m) |; (n, m) ≠ (0, M), 0 ≦ n ≦ N, 0 ≦ m ≦ M}, and C (0 <C <1) Is a constant. After setting the filter coefficient b (n, m) ((n, m) ≠ (0,0)) according to the equation (18), b (0,0) is set according to the equation (15). Further, w (i, j) = y (i, j) (0 ≦ i <N, J−M ≦ j <J) is set as an initial value of the corrected image w (i, j). Then, a two-dimensional cyclic filter process represented by the following equation (19) is performed.
式(19)より、ある画素(i,j)の入力画像y(i,j)と、過去に求めた補正画像w(i−n,j+m)(0≦n≦N、0≦m≦M、(n,m)≠(0,0))とから、新しい補正画像w(i,j)が算出可能となる。式(19)で表される2次元の巡回型フィルタ処理とは、新しい補正画像の算出を、入力画像の画素(i,j)の水平方向については「昇順」、垂直方向については「降順」に巡回して行う処理を意味する。 From Expression (19), an input image y (i, j) of a certain pixel (i, j) and a corrected image w (i−n, j + m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) obtained in the past. , (N, m) ≠ (0,0)), a new corrected image w (i, j) can be calculated. The two-dimensional cyclic filter processing represented by the equation (19) is to calculate a new corrected image by “ascending order” for the horizontal direction of the pixel (i, j) of the input image and “descending order” for the vertical direction. This means processing performed in a round.
以上、a(0,M)≠0の場合について説明したが、a(N,M)≠0の場合には、次式(20)により、フィルタ係数b(n,m)を設定する。 The case where a (0, M) ≠ 0 has been described above. However, when a (N, M) ≠ 0, the filter coefficient b (n, m) is set by the following equation (20).
ただし、B=Max{|a(n,m)|;(n,m)≠(N,M),0≦n≦N,0≦m≦M}であり、C(0<C<1)は定数である。式(20)によりフィルタ係数b(n,m)((n,m)≠(0,0))を設定した後、b(0,0)を式(15)により設定する。さらに、補正画像w(i,j)の初期値として、w(i,j)=y(i,j)(I−N≦i<I、J−M≦j<J)と設定する。そして、次式(21)で表される2次元の巡回型フィルタ処理を行う。 However, B = Max {| a (n, m) |; (n, m) ≠ (N, M), 0 ≦ n ≦ N, 0 ≦ m ≦ M}, and C (0 <C <1) Is a constant. After setting the filter coefficient b (n, m) ((n, m) ≠ (0,0)) by the equation (20), b (0,0) is set by the equation (15). Further, w (i, j) = y (i, j) (IN ≦ i <I, J−M ≦ j <J) is set as an initial value of the corrected image w (i, j). Then, a two-dimensional cyclic filter process represented by the following equation (21) is performed.
式(21)より、ある画素(i,j)の入力画像y(i,j)と、過去に求めた補正画像w(i+n,j+m)(0≦n≦N、0≦m≦M、(n,m)≠(0,0))とから、新しい補正画像w(i,j)が算出可能となる。式(21)で表される2次元の巡回型フィルタ処理とは、新しい補正画像の算出を、入力画像の画素(i,j)の水平方向および垂直方向それぞれについて「降順」に巡回して行う処理を意味する。 From Expression (21), an input image y (i, j) of a pixel (i, j) and a corrected image w (i + n, j + m) (0 ≦ n ≦ N, 0 ≦ m ≦ M, ( n, m) ≠ (0,0)), a new corrected image w (i, j) can be calculated. The two-dimensional cyclic filter processing represented by Expression (21) is to perform calculation of a new corrected image by cycling in “descending order” in the horizontal direction and the vertical direction of the pixel (i, j) of the input image. Means processing.
以上のような処理を行うべく、逆フィルタ設定手段6は、図9に示したフローチャートに従って動作するように構成する。まず、本実施の形態に係る逆フィルタ設定手段6は、所定の範囲(0≦n≦N、0≦m≦M)内の4隅の座標(n,m)(n=0またはN、m=0またはM)のうち、所定の値となるフィルタ係数a(n,m)(n=0またはN、m=0またはM)に対応する座標を求める。ここでの所定の値とは、0以外の値である。それから、本実施の形態に係る逆フィルタ設定手段6は、当該求めた座標(n,m)(n=0またはN、m=0またはM)に対応させた所定の順番を、巡回型フィルタ処理の順番として決定する(ステップS1)。 In order to perform the processing as described above, the inverse filter setting means 6 is configured to operate according to the flowchart shown in FIG. First, the inverse filter setting means 6 according to the present embodiment has coordinates (n, m) (n = 0 or N, m) of four corners within a predetermined range (0 ≦ n ≦ N, 0 ≦ m ≦ M). = 0 or M), the coordinates corresponding to the filter coefficient a (n, m) (n = 0 or N, m = 0 or M) having a predetermined value are obtained. The predetermined value here is a value other than zero. Then, the inverse filter setting means 6 according to the present embodiment performs a cyclic filter process on a predetermined order corresponding to the obtained coordinates (n, m) (n = 0 or N, m = 0 or M). Is determined as the order (step S1).
本実施の形態では、座標(0,0)に対応させた所定の順番は、入力画像の画素の水平方向、垂直方向それぞれについて昇順とする。同様に、座標(N,0)に対応させた所定の順番は、入力画像の画素の水平方向については降順、垂直方向については昇順とする。座標(0,M)に対応させた所定の順番は、入力画像の画素の水平方向については昇順、垂直方向については降順とする。座標(N,M)に対応させた所定の順番は、入力画像の画素の水平方向、垂直方向それぞれについて降順とする。 In the present embodiment, the predetermined order corresponding to the coordinates (0, 0) is ascending order for each of the horizontal direction and the vertical direction of the pixels of the input image. Similarly, the predetermined order corresponding to the coordinates (N, 0) is a descending order in the horizontal direction and an ascending order in the vertical direction of the pixels of the input image. The predetermined order corresponding to the coordinates (0, M) is ascending order in the horizontal direction of pixels of the input image and descending order in the vertical direction. The predetermined order corresponding to the coordinates (N, M) is a descending order for each of the horizontal direction and the vertical direction of the pixels of the input image.
これにより、例えば、まず、a(0,0)の値を調べ、a(0,0)≠0であれば、「式(12)で表される巡回型フィルタ処理、つまり、巡回型フィルタ処理の順番は、水平方向、垂直方向それぞれについて昇順」と決定し、ステップS2へ進む。そうでない場合は、a(N,0)の値を調べ、a(N,0)≠0であれば、「式(17)で表される巡回型フィルタ処理、つまり、巡回型フィルタ処理の順番は、水平方向については降順、垂直方向については昇順」と決定し、ステップS3へ進む。そうでない場合は、a(0,M)の値を調べ、a(0,M)≠0であれば、「式(19)で表される巡回型フィルタ処理、つまり、巡回型フィルタ処理の順番は、水平方向については昇順、垂直方向については降順」と決定し、ステップS4へ進む。そうでない場合は、「式(21)で表される巡回型フィルタ処理、つまり、巡回型フィルタ処理の順番は、水平方向、垂直方向それぞれについて降順」と決定し、ステップS5へ進む。 Thus, for example, first, the value of a (0,0) is checked, and if a (0,0) ≠ 0, “the cyclic filter processing represented by Expression (12), that is, the cyclic filter processing is performed. Is determined as “ascending order in the horizontal direction and the vertical direction”, and the process proceeds to step S2. Otherwise, the value of a (N, 0) is examined, and if a (N, 0) ≠ 0, “the cyclic filter processing represented by the equation (17), that is, the cyclic filter processing order. Is determined as “descending order for the horizontal direction and ascending order for the vertical direction”, and the process proceeds to step S3. Otherwise, the value of a (0, M) is examined, and if a (0, M) ≠ 0, “the cyclic filter processing represented by the equation (19), that is, the cyclic filter processing order. Are determined as “ascending order for the horizontal direction and descending order for the vertical direction”, and the process proceeds to step S4. Otherwise, it is determined that “the cyclic filter processing represented by Expression (21), that is, the order of the cyclic filter processing is descending in the horizontal direction and the vertical direction”, and the process proceeds to step S5.
ステップS2では、式(14)により、b(n,m)((n,m)≠(0,0))を求め、ステップS6へ進む。ステップS3では、式(16)により、b(n,m)((n,m)≠(0,0))を求め、ステップS6へ進む。ステップS4では、式(18)により、b(n,m)((n,m)≠(0,0))を求め、ステップS6へ進む。ステップS5では、式(20)により、b(n,m)((n,m)≠(0,0))を求め、ステップS6へ進む。これらステップS2〜S5後のステップS6では、式(15)によりb(0,0)を求める。 In step S2, b (n, m) ((n, m) ≠ (0,0)) is obtained from equation (14), and the process proceeds to step S6. In step S3, b (n, m) ((n, m) ≠ (0,0)) is obtained from equation (16), and the process proceeds to step S6. In step S4, b (n, m) ((n, m) ≠ (0,0)) is obtained from equation (18), and the process proceeds to step S6. In step S5, b (n, m) ((n, m) ≠ (0,0)) is obtained from equation (20), and the process proceeds to step S6. In step S6 after these steps S2 to S5, b (0, 0) is obtained by equation (15).
以上のようにして、本実施の形態に係る逆フィルタ設定手段6は、フィルタ係数a(n,m)に基づいて、巡回型フィルタ処理を行うためのフィルタ係数b(n,m)、および、入力画像y(i,j)の画素(i,j)に対して巡回型フィルタ処理を施すべき順番を決定する動作を行う。なお、本実施の形態では、式(14)、式(16)、式(18)、式(20)において、B=0となる場合、すなわち、フィルタ係数a(n,m)のうち非零の値が1つしか存在しない場合には、b(n,m)=0((n,m)≠0、0≦n≦N、0≦m≦M)と設定する。 As described above, the inverse filter setting unit 6 according to the present embodiment, based on the filter coefficient a (n, m), the filter coefficient b (n, m) for performing the cyclic filter processing, and The operation of determining the order in which the cyclic filter processing is to be performed on the pixel (i, j) of the input image y (i, j) is performed. In the present embodiment, in Expression (14), Expression (16), Expression (18), and Expression (20), when B = 0, that is, nonzero among the filter coefficients a (n, m). If only one value exists, b (n, m) = 0 ((n, m) ≠ 0, 0 ≦ n ≦ N, 0 ≦ m ≦ M) is set.
そして、本実施の形態の巡回型フィルタ手段7は、逆フィルタ設定手段6で決定したフィルタ係数b(n,m)(0≦n≦N、0≦m≦M)、および、巡回型フィルタ処理の順番に基づいて、入力画像y(i,j)にフィルタ処理の逆処理に相当する巡回型フィルタ処理を施す。そして、巡回型フィルタ手段7は、この処理により生成した補正画像w(i,j)を出力する。
Then, the
巡回型フィルタ手段7から出力される補正画像w(i,j)は、記憶手段103に書き込まれる。なお、記憶手段103は、記憶手段100と物理的に同じハードディスク、メモリなどの記憶装置を共用してもよい。なお、逆フィルタ設定手段6、巡回型フィルタ手段7の各手段は、電子回路として構成してもよいし、マイクロコンピュータのようなプロセッサ上で動作するソフトウェアとして構成してもよい。
The corrected image w (i, j) output from the
以上のような動作を行う本実施の形態に係る画像補正装置によれば、入力画像の劣化を表すフィルタ係数a(n,m)を用いて、フィルタ処理の逆処理を入力画像に施す補正処理を、簡単なフィルタ演算処理により行うことができる。これにより、従来のRichardson-Lucyアルゴリズムのように反復処理を行ったり、FFTと逆FFTを繰り返すなどの処理が不要となるので、補正手段102の処理量(または回路規模ないし消費電力)を削減することができる。また、本実施の形態に係る劣化推定手段101は、実施の形態1に係る劣化推定手段と同じであるため、実施の形態1の効果も得ることができる。 According to the image correction apparatus according to the present embodiment that performs the operation as described above, the correction process that performs the reverse process of the filter process on the input image using the filter coefficient a (n, m) that represents the degradation of the input image. Can be performed by a simple filter calculation process. This eliminates the need for iterative processing such as the conventional Richardson-Lucy algorithm or repeated FFT and inverse FFT, thereby reducing the processing amount (or circuit scale or power consumption) of the correction means 102. be able to. Moreover, since the degradation estimation means 101 which concerns on this Embodiment is the same as the degradation estimation means which concerns on Embodiment 1, the effect of Embodiment 1 can also be acquired.
なお、本実施の形態においては、フィルタ係数a(n,m)のうち非零の値が1つしか存在しない場合には、b(n,m)=0((n,m)≠0、0≦n≦N、0≦m≦M)と設定するとした。しかしこれに限るものではなく、フィルタ係数a(n,m)のうち、非零の値が1つしか存在しない場合には、入力画像y(i,j)を巡回型フィルタ手段7に通さず、入力画像y(i,j)をそのまま補正画像w(i,j)として出力するように構成してもよい。 In the present embodiment, when there is only one non-zero value among the filter coefficients a (n, m), b (n, m) = 0 ((n, m) ≠ 0, 0 ≦ n ≦ N, 0 ≦ m ≦ M). However, the present invention is not limited to this. If there is only one non-zero value among the filter coefficients a (n, m), the input image y (i, j) is not passed through the recursive filter means 7. The input image y (i, j) may be output as it is as the corrected image w (i, j).
また、本実施の形態では、逆フィルタ設定手段6は、ステップS1において、4隅の座標のフィルタ係数a(n,m)(n=0またはN、m=0またはM)それぞれの値が非零であるかを順に判定した。そして、その判定に基づいて、逆フィルタ設定手段6は、非零の値をとるフィルタ係数の座標(n,m)(n=0またはN、m=0またはM)に対応させた所定の順番を、巡回型フィルタ処理の順番として決定した。しかし、これに限ったものではなく、逆フィルタ設定手段6は、ステップS1において、4隅の座標(n,m)のうち、最大の絶対値をとるフィルタ係数a(n,m)(n=0またはN、m=0またはM)に対応する座標を求める。それから、逆フィルタ設定手段6は、当該求めた座標(n,m)(n=0またはN、m=0またはM)に対応させた所定の順番を、巡回型フィルタ処理の順番として決定してもよい。 In this embodiment, the inverse filter setting means 6 determines that the values of the filter coefficients a (n, m) (n = 0 or N, m = 0 or M) at the four corner coordinates are non-zero in step S1. It was judged in order whether it was zero. Then, based on the determination, the inverse filter setting means 6 has a predetermined order corresponding to the coordinates (n, m) (n = 0 or N, m = 0 or M) of the filter coefficient taking a non-zero value. Was determined as the order of the cyclic filter processing. However, the present invention is not limited to this. In step S1, the inverse filter setting means 6 uses the filter coefficient a (n, m) (n = n) that takes the maximum absolute value among the coordinates (n, m) at the four corners. The coordinates corresponding to 0 or N, m = 0 or M) are obtained. Then, the inverse filter setting means 6 determines a predetermined order corresponding to the obtained coordinates (n, m) (n = 0 or N, m = 0 or M) as the order of the cyclic filter processing. Also good.
このように構成すると、逆フィルタ設定手段6は、最大の絶対値をとるフィルタ係数がa(0,0)である場合には、「巡回型フィルタ処理の順番は、水平方向、垂直方向それぞれについて昇順」と決定し、ステップS2へ進む。最大の絶対値をとるフィルタ係数がa(N,0)である場合には、「巡回型フィルタ処理の順番は、水平方向については降順、垂直方向については昇順」と決定し、ステップS3へ進む。最大の絶対値をとるフィルタ係数がa(0,M)である場合には、「巡回型フィルタ処理の順番は、水平方向については昇順、垂直方向については降順」と決定し、ステップS4へ進む。最大の絶対値をとるフィルタ係数がa(N,M)である場合には、「巡回型フィルタ処理の順番は、水平方向、垂直方向それぞれについては降順」と決定し、ステップS5へ進む。それ以降の動作は、上述のステップS6以降の動作と同じである。 When configured in this way, the inverse filter setting means 6 indicates that “the order of the cyclic filter processing is in each of the horizontal direction and the vertical direction when the filter coefficient having the maximum absolute value is a (0, 0). Ascending order "is determined, and the process proceeds to step S2. When the filter coefficient that takes the maximum absolute value is a (N, 0), it is determined that “the order of cyclic filter processing is descending in the horizontal direction and ascending in the vertical direction”, and the process proceeds to step S3. . If the filter coefficient that takes the maximum absolute value is a (0, M), “the order of the cyclic filter processing is ascending order in the horizontal direction and descending order in the vertical direction”, and the process proceeds to step S4. . If the filter coefficient that takes the maximum absolute value is a (N, M), it is determined that “the order of cyclic filter processing is descending in the horizontal direction and the vertical direction”, and the process proceeds to step S5. The subsequent operation is the same as the operation after step S6 described above.
以上のように、4隅の座標のうち、最大の絶対値をとるフィルタ係数a(n,m)(n=0またはN、m=0またはM)に対応する座標を求め、その座標に対応させた所定の順番を上述の順番として決定するように構成すると、逆処理の精度が高くなり、補正画像w(i,j)の画質を向上させることができる。 As described above, the coordinates corresponding to the filter coefficient a (n, m) (n = 0 or N, m = 0 or M) taking the maximum absolute value among the coordinates of the four corners are obtained, and the corresponding coordinates are obtained. If the predetermined order is determined as the above-described order, the accuracy of the reverse processing is increased, and the image quality of the corrected image w (i, j) can be improved.
なお、以上の本実施の形態に係る画像補正装置は、実施の形態1と同じ劣化推定手段101を備えるとし、その劣化推定手段101からのフィルタ係数a(n,m)が、逆フィルタ設定手段6に入力されていた。しかしこれに限るものではなく、例えば、撮像装置に取り付けた手振れセンサにより手振れを検出し、その検出結果が、所定の範囲の線形フィルタのフィルタ係数a(n,m)(0≦n≦N、0≦m≦M)として、逆フィルタ設定手段6に入力される構成であってもよい。この場合も、上述と同様に、入力画像の劣化を表すフィルタ係数a(n,m)を用いて、フィルタ処理の逆処理を入力画像に施す補正処理を、簡単なフィルタ演算処理により行うことができる。なお、予め対象とする撮像装置が決まっており、その撮像装置の焦点ずれによるぼやけの補正を望む場合もある。その場合には、予め想定した焦点深度による複数のぼやけ特性をフィルタ係数a(n,m)として保持し、焦点深度の値から切り換えたフィルタ係数a(n,m)を、逆フィルタ設定手段6に入力する構成にしてもよい。
Note that the image correction apparatus according to the present embodiment described above includes the same
<実施の形態3>
本実施の形態に係る画像補正装置は、逆フィルタ設定手段6の動作において、実施の形態2に係る画像補正装置と異なる。実施の形態2では、例えば、入力画像の劣化が、水平、垂直、または、斜め方向のいずれか一方向の1次元のフィルタ処理で表されると仮定した。そして、実施の形態2に係る逆フィルタ設定手段6は、4隅の座標のいずれかの座標(n,m)(n=0またはN、m=0またはM)を基準に、フィルタ係数b(n,m)、および、巡回型フィルタ処理の順番を決定した。しかしながら、焦点ずれによるぼやけのような劣化がある場合には、フィルタ係数a(n,m)の値の分布が円形に広がり、4隅のフィルタ係数a(n,m)がいずれも0となる場合もある。また、直線的な手振れの場合であっても、手振れの特性によっては、4隅のフィルタ係数a(n,m)の値が小さくなり、逆処理の精度が低くなることもある。
<
The image correction apparatus according to the present embodiment differs from the image correction apparatus according to the second embodiment in the operation of the inverse filter setting means 6. In the second embodiment, for example, it is assumed that the degradation of the input image is represented by one-dimensional filter processing in one of the horizontal, vertical, and diagonal directions. Then, the inverse filter setting means 6 according to the second embodiment uses the filter coefficient b ((n, m) (n = 0 or N, m = 0 or M) as a reference based on any of the four corner coordinates. n, m) and the order of the cyclic filter processing. However, when there is degradation such as blur due to defocusing, the distribution of the values of the filter coefficients a (n, m) spreads circularly, and the filter coefficients a (n, m) at the four corners are all zero. In some cases. Even in the case of linear camera shake, depending on the characteristics of camera shake, the values of the filter coefficients a (n, m) at the four corners may be small, and the accuracy of the inverse processing may be low.
そこで、本実施の形態に係る逆フィルタ設定手段6は、所定の範囲内の座標(n,m)(0≦n≦N、0≦m≦M)のうち、最大の絶対値をとるフィルタ係数a(N0,M0)に対応する一の座標(N0,M0)を求める。そして、当該求めた一の座標(N0,M0)を基準に所定の範囲(0≦n≦N、0≦m≦M)を複数の区分範囲S1〜S4に区分する。それから、一の区分範囲Sk(k=1〜4のいずれか一つの値)内のフィルタ係数a(n,m)((n,m)∈Sk)の値に基づいて、対応する区分範囲内のフィルタ係数b(n,m)((n,m)∈Sk)を決定する。 Therefore, the inverse filter setting means 6 according to the present embodiment has a filter coefficient that takes the maximum absolute value among coordinates (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) within a predetermined range. One coordinate (N0, M0) corresponding to a (N0, M0) is obtained. Then, a predetermined range (0 ≦ n ≦ N, 0 ≦ m ≦ M) is divided into a plurality of divided ranges S 1 to S 4 on the basis of the obtained one coordinate (N0, M0). Then, based on the values of one segment range S k (k = 1~4 of any one of the values) filter coefficients in a (n, m) (( n, m) ∈S k), the corresponding partition A filter coefficient b (n, m) ((n, m) εS k ) within the range is determined.
このような、本実施の形態に係る逆フィルタ設定手段6の動作を、図10のフローチャートに従って説明する。なお、ステップS11前の動作は、実施の形態2のステップS1前の動作と同じである。まず、逆フィルタ設定手段6は、所定の範囲内の座標(n,m)(0≦n≦N、0≦m≦M)のうち、最大の絶対値をとるフィルタ係数フィルタ係数a(N0,M0)に対応する一の座標(N0,M0)を求める(ステップS11)。 The operation of the inverse filter setting unit 6 according to this embodiment will be described with reference to the flowchart of FIG. The operation before step S11 is the same as the operation before step S1 of the second embodiment. First, the inverse filter setting means 6 is a filter coefficient filter coefficient a (N0, N) that takes the maximum absolute value among coordinates (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) within a predetermined range. One coordinate (N0, M0) corresponding to (M0) is obtained (step S11).
次のステップでは、所定の範囲(0≦n≦N、0≦m≦M)を、複数の区分範囲S1〜S4に区分する。本実施の形態では、区分範囲S1={(n,m);0≦n≦N0、0≦m≦M0}、区分範囲S2={(n,m);N0≦n≦N、0≦m≦M0}、区分範囲S3={(n,m);0≦n≦N0、M0≦m≦M}、区分範囲S4={(n,m);N0≦n≦N、M0≦m≦M}である。 In the next step, a predetermined range (0 ≦ n ≦ N, 0 ≦ m ≦ M) is divided into a plurality of divided ranges S 1 to S 4 . In the present embodiment, the segment range S 1 = {(n, m); 0 ≦ n ≦ N0, 0 ≦ m ≦ M0}, the segment range S 2 = {(n, m); N0 ≦ n ≦ N, 0 ≦ m ≦ M0}, section range S 3 = {(n, m); 0 ≦ n ≦ N0, M0 ≦ m ≦ M}, section range S 4 = {(n, m); N0 ≦ n ≦ N, M0 ≦ m ≦ M}.
そして、この区分範囲S1〜S4の中から、一の区分範囲Sk(k=1〜4のいずれか一つの値)を選択する。この一の区分範囲Skを選択する方法としては、例えば、最も範囲の広い区分範囲Skを選択する。すなわち、水平方向については、N0>N−N0ならば、区分範囲S1,S3を選択し、そうでない場合には、S2,S4を選択する。垂直方向については、M0>M−M0ならば、区分範囲S1,S2を選択し、そうでない場合には、S3,S4を選択する。この2つの判定により、4つの区分範囲S1〜S4から一の区分範囲Skを選択できる。なお、ここでは、区分範囲S1〜S4の範囲の広さに基づいて選択する方法を説明したが、これに限るものではなく、各区分範囲S1〜S4のフィルタ係数a(n,m)の値の総和を求め、総和の最も大きい区分範囲を、一の区分範囲Skとして選択してもよい。 Then, one division range S k (one value of k = 1 to 4) is selected from the division ranges S 1 to S 4 . As a method of selecting this one segment range S k , for example, the segment range S k having the widest range is selected. That is, in the horizontal direction, if N0> N−N0, the segment ranges S 1 and S 3 are selected, and if not, S 2 and S 4 are selected. In the vertical direction, if M0> M−M0, the segment ranges S 1 and S 2 are selected, and if not, S 3 and S 4 are selected. With these two determinations, one segment range S k can be selected from the four segment ranges S 1 to S 4 . Here, division range S 1 has been described a method of selecting on the basis of the breadth of the range of to S 4, the present invention is not limited to this, the filter coefficients a (n of each segment range S 1 to S 4, obtains the sum of the values of m), the largest division range of the summation, may be selected as one of the division range S k.
その後、選択した一の区分範囲Skを、これまでの説明で用いた所定の範囲(0≦n≦N、0≦m≦M)に置き換える(ステップS12)。例えば、区分範囲S1が選択された場合には、a(n,m)(0≦n≦N、0≦m≦M)=a(n,m)(0≦n≦N0、0≦m≦M0)と置き換えて、ステップS13へ進む。同様にして、区分範囲S2が選択された場合には、a(n,m)(0≦n≦N、0≦m≦M)=a(n+N0,m)(0≦n≦N−N0、0≦m≦M0)と置き換えて、ステップS13へ進む。また、区分範囲S3が選択された場合には、a(n,m)(0≦n≦N、0≦m≦M)=a(n,m+M0)(0≦n≦N0、0≦m≦M−M0)と置き換えて、ステップS13へ進む。また、区分範囲S4が選択された場合には、a(n,m)(0≦n≦N、0≦m≦M)=a(n+N0,m+M0)(0≦n≦N−N0、0≦m≦M−M0)と置き換えて、ステップS13へ進む。 Then, replace one segment range S k selected, the predetermined range used in the description so far (0 ≦ n ≦ N, 0 ≦ m ≦ M) ( step S12). For example, when the segment range S 1 is selected, a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) = a (n, m) (0 ≦ n ≦ N0, 0 ≦ m ≦ M0), and the process proceeds to step S13. Similarly, when the segment range S 2 is selected, a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) = a (n + N0, m) (0 ≦ n ≦ N−N0) , 0 ≦ m ≦ M0), and the process proceeds to step S13. When the segment range S 3 is selected, a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) = a (n, m + M0) (0 ≦ n ≦ N0, 0 ≦ m ≦ M−M0), the process proceeds to step S13. Further, when the division range S 4 is selected, a (n, m) ( 0 ≦ n ≦ N, 0 ≦ m ≦ M) = a (n + N0, m + M0) (0 ≦ n ≦ N-N0,0 ≦ m ≦ M−M0), and the process proceeds to step S13.
ステップS12の後、逆フィルタ設定手段6は、そのステップS12で選択された区分範囲Skに対応させた所定の順番を、巡回型フィルタ手段7で行う巡回型フィルタ処理の順番として決定する(ステップS13)。例えば、ステップS12で区分範囲S1が選択された場合には、フィルタ係数a(n,m)(0≦n≦N、0≦m≦M)のうち、フィルタ係数a(N,M)の値が最も大きい。そのため、その場合には、逆フィルタ設定手段6は、巡回型フィルタ処理の順番を、入力画像の画素の水平方向、垂直方向それぞれについて降順と決定し、ステップS17に進むようにする。また、ステップS12で区分範囲S2が選択された場合には、フィルタ係数a(n,m)(0≦n≦N、0≦m≦M)のうち、フィルタ係数a(0,M)の値が最も大きい。そのため、その場合には、逆フィルタ設定手段6は、巡回型フィルタ処理の順番を、入力画像の画素の水平方向については昇順、垂直方向については降順と決定し、ステップS16に進むようにする。 After step S12, the inverse filter setting unit 6 determines the predetermined order in which to correspond to the divided ranges S k selected in the step S12, as the order of the recursive filter process performed by the recursive filter unit 7 (step S13). For example, when the segment range S 1 is selected in step S12, the filter coefficient a (N, M) of the filter coefficients a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) is selected. The value is the largest. Therefore, in that case, the inverse filter setting means 6 determines the order of the cyclic filter processing as descending order for each of the horizontal direction and the vertical direction of the pixels of the input image, and proceeds to step S17. Further, when the division range S 2 is selected in step S12, the filter coefficients a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) of the filter coefficient a (0, M) The value is the largest. Therefore, in that case, the inverse filter setting means 6 determines the order of the cyclic filter processing as ascending order for the horizontal direction of pixels of the input image and descending order for the vertical direction, and proceeds to step S16.
また、ステップS12で区分範囲S3が選択された場合には、フィルタ係数a(n,m)(0≦n≦N、0≦m≦M)のうち、フィルタ係数a(N,0)の値が最も大きい。そのため、その場合には、逆フィルタ設定手段6は、巡回型フィルタ処理の順番を、入力画像の画素の水平方向については降順、垂直方向それぞれについて昇順と決定し、ステップS15に進むようにする。また、ステップS12で区分範囲S4が選択された場合には、フィルタ係数a(n,m)(0≦n≦N、0≦m≦M)のうち、フィルタ係数a(0,0)の値が最も大きい。そのため、その場合には、逆フィルタ設定手段6は、巡回型フィルタ処理の順番を、入力画像の画素の水平方向、垂直方向それぞれについて昇順と決定し、ステップS14に進むようにする。 Further, when the division range S 3 is selected in step S12, out of the filter coefficients a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M), the filter coefficient a (N, 0) The value is the largest. Therefore, in that case, the inverse filter setting means 6 determines the order of the cyclic filter processing as descending order for the horizontal direction and ascending order for the vertical direction of the pixels of the input image, and proceeds to step S15. Further, in the case where division range S 4 is selected step S12, among the filter coefficients a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M), the filter coefficient a (0,0) The value is the largest. Therefore, in this case, the inverse filter setting unit 6 determines the order of the cyclic filter processing as ascending order in each of the horizontal direction and the vertical direction of the pixels of the input image, and proceeds to step S14.
ステップS14〜ステップS17の動作は、実施の形態2のステップS2〜ステップS5の動作と同じである。こうして、逆フィルタ設定手段6は、ステップS12で置き換えたフィルタ係数a(n,m)(0≦n≦N,0≦m≦M)の値に基づいて、フィルタ係数b(n,m)(0≦n≦、N、0≦m≦M)を決定する。このことを、ステップS12で置き換える前のフィルタ係数a(n,m)((n,m)∈Sk)で言い換えると、逆フィルタ設定手段6は、一の区分範囲Sk(k=1〜4のいずれか一つ)内のフィルタ係数a(n,m)((n,m)∈Sk)の値に基づいて、対応する区分範囲内のフィルタ係数b(n,m)((n,m)∈Sk)を決定する。ステップS14〜ステップS17以降に行うステップS18以降の動作は、実施の形態2のステップS6以降の動作と同じである。 The operations in steps S14 to S17 are the same as the operations in steps S2 to S5 in the second embodiment. In this way, the inverse filter setting means 6 determines the filter coefficient b (n, m) (based on the value of the filter coefficient a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) replaced in step S12. 0 ≦ n ≦, N, 0 ≦ m ≦ M). In other words, with the filter coefficient a (n, m) ((n, m) εS k ) before replacement in step S12, the inverse filter setting means 6 has one section range S k (k = 1 to 1). Based on the value of the filter coefficient a (n, m) ((n, m) εS k ) in any one of 4), the filter coefficient b (n, m) ((n , M) εS k ). The operation after step S18 performed after step S14 to step S17 is the same as the operation after step S6 of the second embodiment.
以上のような本実施の形態に係る画像補正装置によれば、最大の絶対値をとるフィルタ係数a(N0,M0)の座標(N0,M0)を基準に、フィルタ処理の逆処理に相当する巡回型フィルタ処理を行う。そのため、入力画像の劣化を表すフィルタ係数a(n,m)(0≦n≦N、0≦m≦M)の値が、所定の範囲内の4隅の座標いずれにおいても小さい場合でも、精度の良い逆処理を行うことができ、補正画像の画質をよくすることができるという効果を得ることができる。 The image correction apparatus according to the present embodiment as described above corresponds to the inverse process of the filter process based on the coordinates (N0, M0) of the filter coefficient a (N0, M0) having the maximum absolute value. Perform recursive filtering. Therefore, even if the value of the filter coefficient a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) representing the degradation of the input image is small at any of the four corner coordinates within the predetermined range, the accuracy is high. Therefore, it is possible to obtain an effect that the image quality of the corrected image can be improved.
なお、本実施の形態に係るステップS13では、区分範囲Skに対応させた所定の順番を、巡回型フィルタ処理の順番として決定した。しかしこれに限るものではなく、実施の形態2のステップS1と同様にしてもよい。例えば、逆フィルタ設定手段6は、ステップS12で新たに設定した範囲(0≦n≦N、0≦m≦M)、つまり、一の区分範囲Sk内の4隅の座標のうち、所定の値をとるフィルタ係数a(n,m)に対応する座標を基準に、巡回型フィルタ処理の順番を決定してもよい。 In step S13 according to this embodiment, the predetermined order in which to correspond to the divided ranges S k, was determined as the order of the recursive filter. However, the present invention is not limited to this, and may be the same as step S1 in the second embodiment. For example, the inverse filter setting unit 6, the newly set range in step S12 (0 ≦ n ≦ N, 0 ≦ m ≦ M), that is, among the four corner coordinates in one segment range S k, given The order of the cyclic filter processing may be determined based on the coordinates corresponding to the filter coefficient a (n, m) that takes a value.
<実施の形態4>
実施の形態3に係る画像補正装置では、劣化推定手段101から出力された所定の範囲内のフィルタ係数a(n,m)(0≦n≦N,0≦m≦M)のうち、一の区分範囲Sk(k=1〜4のいずれか一つの値)内のフィルタ係数a(n,m)((n,m)∈Sk)に基づいて、フィルタ係数b(n,m)を決定した。しかしながら、残りの区分範囲Sl(l≠k)内に、大きな値をもつフィルタ係数a(n,m)((n,m)∈Sl)が存在する場合もある。そこで、本実施の形態に係る画像補正装置は、実施の形態3に係る逆フィルタ設定手段6の動作を繰り返すことにより、複数の区分範囲Sk内のフィルタ係数a(n,m)((n,m)∈Sk)の値に基づいて、対応する区分範囲内のフィルタ係数b(n,m)((n,m)∈Sk)を決定する。
<Embodiment 4>
In the image correction apparatus according to the third embodiment, one of the filter coefficients a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) within a predetermined range output from the
このような逆フィルタ設定手段6を備える画像補正装置の動作を、図11のフローチャートに従って説明する。まず、画像補正装置は、入力画像の劣化を表すフィルタ係数a(n,m)を、所定の範囲(n,m)(0≦n≦N,0≦m≦M)内で求める(ステップS21)。フィルタ係数a(n,m)の求め方としては、例えば、実施の形態1に示した劣化推定手段101を用いる。 The operation of the image correction apparatus including the inverse filter setting unit 6 will be described with reference to the flowchart of FIG. First, the image correction apparatus obtains a filter coefficient a (n, m) representing deterioration of the input image within a predetermined range (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) (step S21). ). As a method for obtaining the filter coefficient a (n, m), for example, the degradation estimation means 101 shown in the first embodiment is used.
次に、逆フィルタ設定手段6は、所定の範囲内の座標(n,m)(0≦n≦N、0≦m≦M)のうち、最大の絶対値をとるフィルタ係数a(N0,M0)に対応する一の座標(N0,M0)を求める(ステップS22)。なお、ステップS23〜ステップS29までの動作は、実施の形態3のステップS11〜ステップ18までの動作と同じであるため、説明を省略する。これにより、逆フィルタ設定手段6は、ステップS24において、巡回型フィルタ処理の順番を決定し、ステップS25〜S29において、一の区分範囲Sk内のフィルタ係数b(n,m)((n,m)∈Sk)を決定する。
Next, the inverse filter setting means 6 has a filter coefficient a (N0, M0) that takes the maximum absolute value among the coordinates (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M) within a predetermined range. ) (1) (N0, M0) is obtained (step S22). In addition, since the operation | movement from step S23 to step S29 is the same as the operation | movement from step S11 of
巡回型フィルタ手段7は、逆フィルタ設定手段6が決定した巡回型フィルタ処理の順番と、一の区分範囲Sk内のフィルタ係数b(n,m)((n,m)∈Sk)とに基づいて、入力画像に巡回型フィルタ処理を施し、補正画像を求める(ステップS30)。 The recursive filter means 7 includes the order of recursive filter processing determined by the inverse filter setting means 6 and the filter coefficients b (n, m) ((n, m) εS k ) within one division range S k . Based on the above, a cyclic filter process is performed on the input image to obtain a corrected image (step S30).
ステップS30後、残りの区分範囲Sl(l≠k)内のフィルタ係数a(n,m)((n,m)∈Sl)の値に基づいて、残存する劣化があるか否かを判断する(ステップS31)。ステップS31で、残存する劣化があると判断された場合には、逆フィルタ設定手段6は、残りの区分範囲Slから、一の区分範囲を選択し、ステップS24に戻る。ステップS31で、残存する劣化がないと判断された場合には、画像補正処理を終了する。なお、ループによる2回目以降の各ステップの動作は、初回とほぼ同じであるが、ステップS30では、前回のループで求めた補正画像に対して巡回型フィルタ処理を施す。 After step S30, based on the value of the filter coefficient a (n, m) ((n, m) εS l ) in the remaining segment range S 1 (l ≠ k), it is determined whether there is any remaining degradation. Judgment is made (step S31). In step S31, when it is determined that there is deterioration remains the inverse filter setting unit 6, from the rest of the division range S l, selects one division range, the flow returns to step S24. If it is determined in step S31 that there is no remaining deterioration, the image correction process is terminated. The operation of each step after the second time by the loop is substantially the same as the first time, but in step S30, the cyclic filter process is performed on the corrected image obtained in the previous loop.
以上のような本実施の形態に係る画像補正装置によれば、一の区分範囲Sk内のフィルタ係数a(n,m)((n,m)∈Sk)のみを用いて補正するだけではなく、残りの区分範囲Sl(l≠k)内にも大きな値をとるフィルタ係数a(n,m)((n,m)∈Sl)がある場合には、そのフィルタ係数を用いて、補正を行うことができる。 According to the image correction apparatus according to the present embodiment as described above, only correction is performed using only the filter coefficient a (n, m) ((n, m) εS k ) within one division range S k . If there is a filter coefficient a (n, m) ((n, m) ∈ S l ) having a large value in the remaining segment range S l (l ≠ k), the filter coefficient is used. Correction can be performed.
なお、上述の本実施の形態においては、ステップS31において、残りの区分範囲Sl(l≠k)内のフィルタ係数a(n,m)((n,m)∈Sl)の値に基づいて、残存する劣化があるか否かを判断し、劣化がある場合には、ステップS24に戻るものとした。しかし、ループさせる方法は、これに限るものではない。例えば、ステップS31の処理において、入力画像の代わりに、ステップS30で求めた補正画像を用いてステップS21の処理を行い、再度、所定の範囲全体のフィルタ係数a(n,m)(0≦n≦N,0≦m≦M)を求める。そして、求めたフィルタ係数a(n,m)(0≦n≦N,0≦m≦M)の値に基づいて、残存する劣化があるか否かを判断し、劣化がある場合には、ステップS22に戻るものであってもよい。 In the present embodiment described above, in step S31, based on the value of the remaining sections range S l (l ≠ k) filter coefficients in a (n, m) (( n, m) ∈S l) Thus, it is determined whether or not there is any remaining deterioration. If there is deterioration, the process returns to step S24. However, the looping method is not limited to this. For example, in the process of step S31, the process of step S21 is performed using the corrected image obtained in step S30 instead of the input image, and the filter coefficient a (n, m) (0 ≦ n) for the entire predetermined range is again obtained. ≦ N, 0 ≦ m ≦ M). Then, based on the value of the obtained filter coefficient a (n, m) (0 ≦ n ≦ N, 0 ≦ m ≦ M), it is determined whether there is any remaining deterioration. You may return to step S22.
2 最大局所差分値決定手段、3 勾配算出手段、4 フィルタ範囲決定手段、5 フィルタ係数決定手段、6 逆フィルタ設定手段、7 巡回型フィルタ手段、100,103 記憶手段、101 劣化推定手段、102 補正手段、201 画像領域、202 差分値決定領域、203 注目画素、204,204a,204b 窓領域、205 近傍画素、301 入力画像評価手段、302 領域選択手段、303 勾配算出範囲決定手段、304 減算手段、305 最大値選択手段。 2 maximum local difference value determining means, 3 gradient calculating means, 4 filter range determining means, 5 filter coefficient determining means, 6 inverse filter setting means, 7 cyclic filter means, 100, 103 storage means, 101 deterioration estimation means, 102 correction Means, 201 image area, 202 difference value determination area, 203 pixel of interest, 204, 204a, 204b window area, 205 neighboring pixels, 301 input image evaluation means, 302 area selection means, 303 gradient calculation range determination means, 304 subtraction means, 305 Maximum value selection means.
Claims (8)
前記座標の水平方向または垂直方向の少なくとも一方向において隣り合う前記窓領域最大局所差分値同士の差分を、最大局所差分勾配値として前記座標ごとに決定する勾配算出手段と、
前記勾配算出手段で決定された前記最大局所差分勾配値のうち、所定値以上の前記最大局所差分勾配値に対応する前記座標の範囲をフィルタ係数存在範囲として求めるフィルタ範囲決定手段と、
前記フィルタ範囲決定手段で決定された前記フィルタ係数存在範囲内の前記最大局所差分勾配値に基づいて、当該フィルタ係数存在範囲内のフィルタ係数を算出するフィルタ係数決定手段と、
前記フィルタ係数算出手段で算出された前記フィルタ係数を用いて、フィルタ処理の逆処理を前記入力画像に施す補正手段とを備える、
画像補正装置。 For each pixel of interest in the difference value determination area consisting of all or part of the image area of the input image, image data of the pixel of interest, and image data of neighboring pixels in the window area set around the pixel of interest The local difference value consisting of the difference is calculated for each pixel coordinate indicating the relative position of the neighboring pixel with respect to the target pixel, and the local difference for each coordinate regarding all the target pixels in the difference value determination region Maximum local difference value determining means for determining a maximum value as a window region maximum local difference value for each coordinate;
A gradient calculating means for determining a difference between the window region maximum local difference values adjacent in at least one of the horizontal direction or the vertical direction of the coordinates for each coordinate as a maximum local difference gradient value;
A filter range determining means for obtaining, as a filter coefficient existence range, a range of the coordinates corresponding to the maximum local difference gradient value not less than a predetermined value among the maximum local difference gradient values determined by the gradient calculating means;
Filter coefficient determining means for calculating a filter coefficient within the filter coefficient existence range based on the maximum local difference gradient value within the filter coefficient existence range determined by the filter range determination means;
Correction means for performing reverse processing of filter processing on the input image using the filter coefficient calculated by the filter coefficient calculation means;
Image correction device.
前記最大局所差分値決定手段で決定された前記窓領域最大局所差分値に基づいて、所定の閾値を決定する入力画像評価手段と、
前記窓領域最大局所差分値と、前記入力画像評価手段で決定された前記所定の閾値とに基づいて、前記最大局所差分勾配値を算出すべき前記座標の範囲を決定する勾配算出範囲決定手段とを備え、
前記勾配算出範囲決定手段で決定された前記範囲内の前記座標についてのみ、前記最大局所差分勾配値を算出する、
請求項1に記載の画像補正装置。 The gradient calculating means includes
An input image evaluation unit that determines a predetermined threshold based on the window region maximum local difference value determined by the maximum local difference value determination unit;
Gradient calculation range determining means for determining a range of the coordinates where the maximum local differential gradient value should be calculated based on the window region maximum local difference value and the predetermined threshold value determined by the input image evaluation means. With
Calculating the maximum local difference gradient value only for the coordinates within the range determined by the gradient calculation range determination means;
The image correction apparatus according to claim 1.
前記勾配算出手段は、
前記第1の窓領域内の前記窓領域最大局所差分値と、前記第2の窓領域内の前記窓領域最大局所差分値とに基づいて、前記第1,第2の窓領域のいずれかを選択し、当該選択した前記窓領域内の前記座標についてのみ、前記最大局所差分勾配値を算出する、
請求項1または請求項2に記載の画像補正装置。 The window region includes first and second window regions adjacent to each other in the target pixel,
The gradient calculating means includes
Based on the window region maximum local difference value in the first window region and the window region maximum local difference value in the second window region, one of the first and second window regions is determined. Selecting and calculating the maximum local difference gradient value only for the coordinates in the selected window region;
The image correction apparatus according to claim 1.
前記補正手段は、
前記第1のフィルタ係数に基づいて、巡回型フィルタ処理を行うための第2のフィルタ係数、および、前記入力画像の画素に対して巡回型フィルタ処理を施すべき順番を決定する逆フィルタ設定手段と、
前記逆フィルタ設定手段で決定した前記第2のフィルタ係数、および、前記順番に基づいて、前記入力画像に巡回型フィルタ処理を施す巡回型フィルタ手段とを含む、
画像補正装置。 Using a first filter coefficient indicating a two-dimensional linear filter in a predetermined range, and comprising a correcting means for performing an inverse process of the filter process on the input image,
The correction means includes
A second filter coefficient for performing cyclic filter processing based on the first filter coefficient, and an inverse filter setting means for determining an order in which cyclic filter processing should be performed on pixels of the input image; ,
Cyclic filter means for applying cyclic filter processing to the input image based on the second filter coefficient determined by the inverse filter setting means and the order,
Image correction device.
前記逆フィルタ設定手段は、
前記所定の範囲内の4隅の座標に対応する前記第1のフィルタ係数の値に基づいて、4隅の座標から1つの座標を選択し、当該選択した座標に対応させた所定の順番を前記順番として決定する、
請求項4に記載の画像補正装置。 The predetermined range is represented by coordinates indicating a rectangle,
The inverse filter setting means includes
Based on the value of the first filter coefficient corresponding to the coordinates of the four corners within the predetermined range, one coordinate is selected from the coordinates of the four corners, and a predetermined order corresponding to the selected coordinates is Decide as order,
The image correction apparatus according to claim 4.
前記第2のフィルタ係数の絶対値を1未満に設定する、
請求項4または請求項5に記載の画像補正装置。 The inverse filter setting means includes
Setting the absolute value of the second filter coefficient to less than 1;
The image correction apparatus according to claim 4 or 5.
前記所定の範囲内の座標のうち、最大の絶対値をとる前記第1のフィルタ係数に対応する一の前記座標を求め、当該求めた一の座標を基準に前記所定の範囲を区分してなる複数の区分範囲のうち、少なくとも一の前記区分範囲内の前記第1のフィルタ係数の値に基づいて、対応する前記区分範囲内の前記第2のフィルタ係数を決定する、
請求項4に記載の画像補正装置。 The inverse filter setting means includes
Among the coordinates within the predetermined range, one coordinate corresponding to the first filter coefficient having the maximum absolute value is obtained, and the predetermined range is divided based on the obtained one coordinate. Determining the second filter coefficient in the corresponding segment range based on the value of the first filter coefficient in at least one of the segment ranges among a plurality of segment ranges;
The image correction apparatus according to claim 4.
前記座標の水平方向または垂直方向の少なくとも一方向において隣り合う前記窓領域最大局所差分値同士の差分を、最大局所差分勾配値として前記座標ごとに決定する勾配算出手段と、
前記勾配算出手段で決定された前記最大局所差分勾配値のうち、所定値以上の前記最大局所差分勾配値に対応する前記座標の範囲をフィルタ係数存在範囲として求めるフィルタ範囲決定手段と、
前記フィルタ範囲決定手段で決定された前記フィルタ係数存在範囲内の前記最大局所差分勾配値に基づいて、当該フィルタ係数存在範囲内の第1のフィルタ係数を算出するフィルタ係数決定手段と、
前記第1のフィルタ係数に基づいて、巡回型フィルタ処理を行うための第2のフィルタ係数、および、前記入力画像の画素に対して巡回型フィルタ処理を施すべき順番を決定する逆フィルタ設定手段と、
前記逆フィルタ設定手段で決定した前記第2のフィルタ係数、および、前記順番に基づいて、前記入力画像に巡回型フィルタ処理を施す巡回型フィルタ手段とを含む、
画像補正装置。 For each pixel of interest in the difference value determination area consisting of all or part of the image area of the input image, image data of the pixel of interest, and image data of neighboring pixels in the window area set around the pixel of interest The local difference value consisting of the difference is calculated for each pixel coordinate indicating the relative position of the neighboring pixel with respect to the target pixel, and the local difference for each coordinate regarding all the target pixels in the difference value determination region Maximum local difference value determining means for determining a maximum value as a window region maximum local difference value for each coordinate;
A gradient calculating means for determining a difference between the window region maximum local difference values adjacent in at least one of the horizontal direction or the vertical direction of the coordinates for each coordinate as a maximum local difference gradient value;
A filter range determining means for obtaining, as a filter coefficient existence range, a range of the coordinates corresponding to the maximum local difference gradient value not less than a predetermined value among the maximum local difference gradient values determined by the gradient calculating means;
Filter coefficient determining means for calculating a first filter coefficient in the filter coefficient existence range based on the maximum local difference gradient value in the filter coefficient existence range determined by the filter range determination means;
A second filter coefficient for performing cyclic filter processing based on the first filter coefficient, and an inverse filter setting means for determining an order in which cyclic filter processing should be performed on pixels of the input image; ,
Cyclic filter means for applying cyclic filter processing to the input image based on the second filter coefficient determined by the inverse filter setting means and the order,
Image correction device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008250196A JP2010079815A (en) | 2008-09-29 | 2008-09-29 | Image correction device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008250196A JP2010079815A (en) | 2008-09-29 | 2008-09-29 | Image correction device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010079815A true JP2010079815A (en) | 2010-04-08 |
Family
ID=42210146
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008250196A Pending JP2010079815A (en) | 2008-09-29 | 2008-09-29 | Image correction device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010079815A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108446657A (en) * | 2018-03-28 | 2018-08-24 | 京东方科技集团股份有限公司 | Gesture shakes recognition methods and device, gesture identification method |
CN111930156A (en) * | 2020-08-17 | 2020-11-13 | 北京配天技术有限公司 | Vibration suppression method, vibration suppression system, vibration suppression device and robot equipment |
-
2008
- 2008-09-29 JP JP2008250196A patent/JP2010079815A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108446657A (en) * | 2018-03-28 | 2018-08-24 | 京东方科技集团股份有限公司 | Gesture shakes recognition methods and device, gesture identification method |
CN108446657B (en) * | 2018-03-28 | 2022-02-25 | 京东方科技集团股份有限公司 | Gesture jitter recognition method and device and gesture recognition method |
US11281897B2 (en) | 2018-03-28 | 2022-03-22 | Beijing Boe Optoelectronics Technology Co., Ltd. | Gesture shaking recognition method and apparatus, and gesture recognition method |
CN111930156A (en) * | 2020-08-17 | 2020-11-13 | 北京配天技术有限公司 | Vibration suppression method, vibration suppression system, vibration suppression device and robot equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9036032B2 (en) | Image pickup device changing the size of a blur kernel according to the exposure time | |
JP5980294B2 (en) | Data processing apparatus, imaging apparatus, and data processing method | |
US8385678B2 (en) | Image restoration apparatus and method | |
JP4415188B2 (en) | Image shooting device | |
RU2527198C2 (en) | Image processing device and image processing device control method | |
JP2016057638A (en) | Method of generating focus signal from plurality of edge widths | |
JP5374119B2 (en) | Distance information acquisition device, imaging device, and program | |
TWI496105B (en) | Image synthesis device and computer program for image synthesis | |
JP2013030895A (en) | Signal processing apparatus, imaging apparatus, signal processing method, and program | |
JP6172935B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2018107526A (en) | Image processing device, imaging apparatus, image processing method and computer program | |
JP2008053775A (en) | Image processing method, program of image processing method, recording medium where program of image processing method is recorded, and image processing circuit | |
JP2008160300A (en) | Image processor, and imaging apparatus | |
JP2022179514A (en) | Control apparatus, imaging apparatus, control method, and program | |
JP2015216576A (en) | Image processing apparatus, image processing method, imaging apparatus, electronic apparatus, and program | |
JP5968379B2 (en) | Image processing apparatus and control method thereof | |
JP2005332381A (en) | Image processing method, device and program | |
JP6282133B2 (en) | Imaging device, control method thereof, and control program | |
JP6395429B2 (en) | Image processing apparatus, control method thereof, and storage medium | |
JP2010079815A (en) | Image correction device | |
US9710897B2 (en) | Image processing apparatus, image processing method, and recording medium | |
JP5526984B2 (en) | Image processing apparatus, image processing method, computer program for image processing, and imaging apparatus | |
JP6381212B2 (en) | Imaging apparatus and control method thereof | |
JP2020086216A (en) | Imaging control device, imaging apparatus and imaging control program | |
JP2014110624A (en) | Image processing device, image processing method, and program |